Skip to content

Commit 2a2f317

Browse files
docs(workflow): document EngineConfig type and experimental copilot-sdk fields
Add EngineConfig, EngineAuthConfig, NetworkPermissions, and EngineNetworkConfig to the Frontmatter Configuration Types table. Add a new 'Engine Configuration Fields' subsection that documents all EngineConfig fields including the experimental copilot-sdk integration: - CopilotSDK (engine.copilot-sdk): enables GitHub Copilot SDK headless sidecar mode; sets COPILOT_SDK_URI on child processes. - CopilotSDKDriver (engine.copilot-sdk-driver): custom driver script or command for the SDK; implies copilot-sdk: true when set. Also add HarnessProvider to the Engine Architecture interface table. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6f788eb commit 2a2f317

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

pkg/workflow/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ The package is intentionally large (~320 source files) because it encodes all Gi
6161
| `AgentFileProvider` | interface | Custom agent file support |
6262
| `ConfigRenderer` | interface | Configuration file rendering |
6363
| `DriverProvider` | interface | Driver-level execution configuration |
64+
| `HarnessProvider` | interface | Harness script configuration — returns the Node.js harness filename or empty string |
6465
| `CodingAgentEngine` | interface | Composite interface combining all engine capabilities |
6566
| `BaseEngine` | struct | Base implementation shared by all engines |
6667
| `EngineRegistry` | struct | Global registry mapping engine names to implementations |
@@ -105,6 +106,44 @@ The package is intentionally large (~320 source files) because it encodes all Gi
105106
| `ObservabilityConfig` | struct | OTLP/observability configuration |
106107
| `RateLimitConfig` | struct | Rate limit settings |
107108
| `OTLPConfig` | struct | OpenTelemetry protocol configuration |
109+
| `EngineConfig` | struct | Parsed `engine:` frontmatter block — see [Engine Configuration Fields](#engine-configuration-fields) |
110+
| `EngineAuthConfig` | struct | Engine-level auth config (`engine.auth.*``AWF_AUTH_*` env vars for API proxy) |
111+
| `NetworkPermissions` | struct | Parsed `network:` frontmatter block; controls allowed/blocked domain lists |
112+
| `EngineNetworkConfig` | struct | Combines `*EngineConfig` and `*NetworkPermissions` for engine helpers that need both |
113+
114+
#### Engine Configuration Fields
115+
116+
`EngineConfig` is populated by `ExtractEngineConfig` from the `engine:` frontmatter key. It is stored on `EngineNetworkConfig.Engine` and forwarded to each engine's `GetExecutionSteps` / `GetInstallationSteps` implementations.
117+
118+
| Field | Type | YAML key | Description |
119+
|-------|------|----------|-------------|
120+
| `ID` | `string` | `engine` | Engine identifier (e.g. `"copilot"`, `"claude"`, `"codex"`) |
121+
| `Version` | `string` | `engine.version` | Pinned engine/CLI version |
122+
| `Model` | `string` | `engine.model` | LLM model name |
123+
| `PermissionMode` | `string` | `engine.permission-mode` | Agent permission mode |
124+
| `MaxTurns` | `string` | `engine.max-turns` | Maximum agent turns |
125+
| `MaxToolDenials` | `string` | `engine.max-tool-denials` | Max repeated tool denials before stopping (Copilot SDK mode only) |
126+
| `MaxRuns` | `int` | `engine.max-runs` | Maximum LLM invocations per run (AWF `apiProxy.maxRuns`) |
127+
| `MaxContinuations` | `int` | `engine.max-continuations` | Maximum autopilot continuations (copilot engine; `> 1` enables `--autopilot`) |
128+
| `MaxAICredits` | `int64` | `engine.max-ai-credits` | Maximum AI credits per run for AWF API-proxy firewall enforcement |
129+
| `Concurrency` | `string` | `engine.concurrency` | Agent job-level concurrency YAML |
130+
| `UserAgent` | `string` | `engine.user-agent` | Custom user-agent string |
131+
| `Command` | `string` | `engine.command` | Custom executable path; skips installation steps when set |
132+
| `HarnessScript` | `string` | `engine.harness-script` | Custom Node.js harness script filename (replaces engine default) |
133+
| `CopilotSDK` | `bool` | `engine.copilot-sdk` | **(Experimental)** Enables GitHub Copilot SDK integration. When `true`, the compiler starts a headless Copilot CLI sidecar and sets `COPILOT_SDK_URI` on child processes so the SDK can connect to it. Implied when `CopilotSDKDriver` is non-empty. |
134+
| `CopilotSDKDriver` | `string` | `engine.copilot-sdk-driver` | **(Experimental)** Custom Copilot SDK driver script filename or command. Supports `.js`/`.cjs`/`.mjs` (Node.js), `.py` (Python), `.ts`/`.mts` (TypeScript), `.rb` (Ruby), or a bare command name for an arbitrary executable on `PATH`. Setting this field implies `copilot-sdk: true`. |
135+
| `Env` | `map[string]string` | `engine.env` | Extra environment variables injected into the agent job |
136+
| `Auth` | `*EngineAuthConfig` | `engine.auth` | Engine-level auth config for the API proxy sidecar |
137+
| `Config` | `string` | `engine.config` | Inline engine configuration JSON/YAML string |
138+
| `Args` | `[]string` | `engine.args` | Extra CLI arguments passed to the engine |
139+
| `Agent` | `string` | `engine.agent` | Agent identifier for `copilot --agent` flag (copilot engine only) |
140+
| `APITarget` | `string` | `engine.api-target` | Custom API endpoint hostname |
141+
| `Bare` | `bool` | `engine.bare` | Disables automatic loading of context/instructions |
142+
| `TokenWeights` | `*types.TokenWeights` | `engine.token-weights` | Custom model cost data for effective token computation |
143+
| `IsInlineDefinition` | `bool` | _(internal)_ | `true` when engine is defined inline via `engine.runtime` |
144+
| `MCPSessionTimeout` | `string` | `engine.mcp.session-timeout` | Go duration for MCP gateway sessions (e.g. `"4h"`) |
145+
| `MCPToolTimeout` | `string` | `engine.mcp.tool-timeout` | Go duration for individual MCP tool calls (e.g. `"2m"`) |
146+
| `Extensions` | `[]string` | `engine.extensions` | Engine-specific plugin names to install before launching (Pi engine) |
108147

109148
### Permissions System
110149

0 commit comments

Comments
 (0)