From 709481546b0b26b7db6e5b27cca53c41a3f18642 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 20:53:26 +0000 Subject: [PATCH 1/3] Mark copilot-sdk mode as non-experimental Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .changeset/minor-copilot-sdk-non-experimental.md | 5 +++++ docs/src/content/docs/reference/engines.md | 1 + docs/src/content/docs/reference/frontmatter-full.md | 2 +- pkg/workflow/compiler_validators.go | 1 - pkg/workflow/copilot_sdk_experimental_warning_test.go | 4 ++-- 5 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/minor-copilot-sdk-non-experimental.md diff --git a/.changeset/minor-copilot-sdk-non-experimental.md b/.changeset/minor-copilot-sdk-non-experimental.md new file mode 100644 index 00000000000..5f98e56f246 --- /dev/null +++ b/.changeset/minor-copilot-sdk-non-experimental.md @@ -0,0 +1,5 @@ +--- +"gh-aw": minor +--- + +Mark `engine.copilot-sdk` as stable: remove the experimental compiler warning and surface copilot-sdk mode as an additional Copilot mode in the documentation. diff --git a/docs/src/content/docs/reference/engines.md b/docs/src/content/docs/reference/engines.md index d3f8457e376..722a06b0f47 100644 --- a/docs/src/content/docs/reference/engines.md +++ b/docs/src/content/docs/reference/engines.md @@ -14,6 +14,7 @@ Set `engine:` in your workflow frontmatter and configure the corresponding secre | Engine | `engine:` value | Required Secret | |--------|-----------------|-----------------| | [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli) (default) | `copilot` | [`copilot-requests: write`](/gh-aw/reference/auth/#copilot-requests-write-permission) (recommended) or [`COPILOT_GITHUB_TOKEN`](/gh-aw/reference/auth/#copilot_github_token) | +| [GitHub Copilot (SDK mode)](/gh-aw/reference/engines/#copilot-sdk-support) | `copilot` + `copilot-sdk: true` | same as Copilot CLI | | [Claude by Anthropic (Claude Code)](https://www.anthropic.com/index/claude) | `claude` | [`ANTHROPIC_API_KEY`](/gh-aw/reference/auth/#anthropic_api_key) (standard) or [`engine.auth` Anthropic WIF](/gh-aw/reference/auth/#anthropic-workload-identity-federation-wif) (keyless) | | [OpenAI Codex](https://openai.com/blog/openai-codex) | `codex` | [OPENAI_API_KEY](/gh-aw/reference/auth/#openai_api_key) | | [Google Gemini CLI](https://github.com/google-gemini/gemini-cli) | `gemini` | [`GEMINI_API_KEY`](/gh-aw/reference/auth/#gemini_api_key) (standard) or [`engine.auth` Google WIF](/gh-aw/reference/auth/#google-workload-identity-federation-wif) (keyless) | diff --git a/docs/src/content/docs/reference/frontmatter-full.md b/docs/src/content/docs/reference/frontmatter-full.md index b6dfdaeb308..89852acce8e 100644 --- a/docs/src/content/docs/reference/frontmatter-full.md +++ b/docs/src/content/docs/reference/frontmatter-full.md @@ -2528,7 +2528,7 @@ engine: # (optional) tool-timeout: "example-value" - # Enables the experimental GitHub Copilot SDK integration (copilot engine only). + # Enables the GitHub Copilot SDK integration (copilot engine only). # When true, the harness starts a separate headless Copilot CLI sidecar on the # configured localhost port and sets COPILOT_SDK_URI on child processes. # (optional) diff --git a/pkg/workflow/compiler_validators.go b/pkg/workflow/compiler_validators.go index 4e66882f666..e5b45bed44b 100644 --- a/pkg/workflow/compiler_validators.go +++ b/pkg/workflow/compiler_validators.go @@ -329,7 +329,6 @@ func (c *Compiler) emitExperimentalFeatureWarnings(workflowData *WorkflowData) { {enabled: workflowData.SafeOutputs != nil && workflowData.SafeOutputs.DispatchRepository != nil, message: "Using experimental feature: dispatch-repository"}, {enabled: workflowData.SafeOutputs != nil && workflowData.SafeOutputs.MergePullRequest != nil, message: "Using experimental feature: merge-pull-request"}, {enabled: workflowData.SafeOutputs != nil && workflowData.SafeOutputs.ReplaceLabel != nil, message: "Using experimental feature: replace-label"}, - {enabled: workflowData.EngineConfig != nil && workflowData.EngineConfig.CopilotSDK, message: "Using experimental feature: engine.copilot-sdk"}, {enabled: isFeatureEnabled(constants.GHAWDetectionFeatureFlag, workflowData), message: "Using experimental feature: gh-aw-detection"}, {enabled: len(workflowData.LSP) > 0, message: "Using experimental feature: lsp"}, } diff --git a/pkg/workflow/copilot_sdk_experimental_warning_test.go b/pkg/workflow/copilot_sdk_experimental_warning_test.go index 20734a4be67..dc17cb0949f 100644 --- a/pkg/workflow/copilot_sdk_experimental_warning_test.go +++ b/pkg/workflow/copilot_sdk_experimental_warning_test.go @@ -20,7 +20,7 @@ func TestCopilotSDKExperimentalWarning(t *testing.T) { expectWarning bool }{ { - name: "copilot-sdk enabled produces experimental warning", + name: "copilot-sdk enabled does not produce experimental warning", content: `--- on: workflow_dispatch engine: @@ -32,7 +32,7 @@ permissions: # Test Workflow `, - expectWarning: true, + expectWarning: false, }, { name: "copilot-sdk disabled does not produce experimental warning", From 34aa776287cb3fd6ba90aa820c650d0a6ea2a4d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:43:16 +0000 Subject: [PATCH 2/3] Address review feedback: remove experimental label from copilot-sdk docs and clean up test Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- .github/aw/syntax-agentic.md | 2 +- pkg/workflow/README.md | 2 +- .../copilot_sdk_experimental_warning_test.go | 32 +++++++------------ 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/aw/syntax-agentic.md b/.github/aw/syntax-agentic.md index 9bf1951fe76..e1c584cd879 100644 --- a/.github/aw/syntax-agentic.md +++ b/.github/aw/syntax-agentic.md @@ -300,7 +300,7 @@ description: Agentic workflow specific frontmatter fields for GitHub Agentic Wor - **`antigravity` engine** (experimental): Google Antigravity CLI in headless mode. Requires `ANTIGRAVITY_API_KEY` secret; model via `model:` (maps to `ANTIGRAVITY_MODEL`). Supports `max-turns`, tools allow-list, AWF firewall, and LLM gateway. Does not support `web-search`, `max-continuations`, or native agent files (agent content is prepended to the prompt). - **`opencode` engine** (experimental): Provider-agnostic, open-source AI coding agent (BYOK). Defaults to Copilot routing via `COPILOT_GITHUB_TOKEN` (or `${{ github.token }}` with `copilot-requests` feature). Supports 75+ models via `provider/model` format. Supports AWF firewall and LLM gateway. - **`engine.driver:`** — canonical field to run a custom inner driver script instead of the engine's built-in CLI. For the `pi` engine it launches the driver directly with Node.js (e.g. built-in `pi_agent_core_driver.cjs`, or a workspace-relative path like `.github/drivers/pi_agent_core_driver_sample_node.cjs`); the driver must emit JSONL compatible with `parse_pi_log.cjs` so step summaries and token tracking keep working. Accepts a bare basename (resolved from the setup-action directory) or a workspace-relative path; no absolute paths, no `..`, only `.js`/`.cjs`/`.mjs` (pi). - - **`copilot-sdk` / `engine.driver`** (experimental, copilot only): set `copilot-sdk: true` to start a headless Copilot CLI SDK sidecar. Set `driver: ` on the copilot engine to supply a custom SDK driver (`.js`/`.cjs`/`.mjs`/`.py`/`.ts`/`.mts`/`.rb`, or a bare PATH command); this also enables `copilot-sdk: true` automatically. Tune the repeated-tool-denial safeguard with the top-level `max-tool-denials:` field (default `5`). + - **`copilot-sdk` / `engine.driver`** (copilot only): set `copilot-sdk: true` to start a headless Copilot CLI SDK sidecar. Set `driver: ` on the copilot engine to supply a custom SDK driver (`.js`/`.cjs`/`.mjs`/`.py`/`.ts`/`.mts`/`.rb`, or a bare PATH command); this also enables `copilot-sdk: true` automatically. Tune the repeated-tool-denial safeguard with the top-level `max-tool-denials:` field (default `5`). **Inline driver source** (copilot engine only): instead of pointing to a checked-in file, you can embed the driver source directly in the frontmatter using an object with exactly one runtime key (`node`, `python`, `go`, or `java`). The compiler materializes the source under `.gh-aw/copilot-sdk/` at runtime and generates a launcher wrapper. The required SDK package is installed automatically. diff --git a/pkg/workflow/README.md b/pkg/workflow/README.md index 7fdc2fd52a0..4bd710d4b31 100644 --- a/pkg/workflow/README.md +++ b/pkg/workflow/README.md @@ -147,7 +147,7 @@ The `checkout:` frontmatter key is parsed by `ParseCheckoutConfigs` into one or | `UserAgent` | `string` | `engine.user-agent` | Custom user-agent string | | `Command` | `string` | `engine.command` | Custom executable path; skips installation steps when set | | `HarnessScript` | `string` | `engine.harness-script` | Custom Node.js harness script filename (replaces engine default) | -| `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. Also enabled automatically for the copilot engine when `Driver` is non-empty. | +| `CopilotSDK` | `bool` | `engine.copilot-sdk` | 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. Also enabled automatically for the copilot engine when `Driver` is non-empty. | | `Driver` | `string` | `engine.driver` | **(Experimental)** Custom 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` for the copilot engine. | | `Env` | `map[string]string` | `engine.env` | Extra environment variables injected into the agent job | | `Auth` | `*EngineAuthConfig` | `engine.auth` | Engine-level auth config for the API proxy sidecar | diff --git a/pkg/workflow/copilot_sdk_experimental_warning_test.go b/pkg/workflow/copilot_sdk_experimental_warning_test.go index dc17cb0949f..2c6463a1720 100644 --- a/pkg/workflow/copilot_sdk_experimental_warning_test.go +++ b/pkg/workflow/copilot_sdk_experimental_warning_test.go @@ -13,11 +13,13 @@ import ( "github.com/github/gh-aw/pkg/testutil" ) -func TestCopilotSDKExperimentalWarning(t *testing.T) { +// TestCopilotSDKNoExperimentalWarning tests that the copilot-sdk feature +// does not emit an experimental warning, as the feature is no longer +// considered experimental. +func TestCopilotSDKNoExperimentalWarning(t *testing.T) { tests := []struct { - name string - content string - expectWarning bool + name string + content string }{ { name: "copilot-sdk enabled does not produce experimental warning", @@ -32,7 +34,6 @@ permissions: # Test Workflow `, - expectWarning: false, }, { name: "copilot-sdk disabled does not produce experimental warning", @@ -47,7 +48,6 @@ permissions: # Test Workflow `, - expectWarning: false, }, { name: "no copilot-sdk does not produce experimental warning", @@ -60,7 +60,6 @@ permissions: # Test Workflow `, - expectWarning: false, }, } @@ -73,6 +72,7 @@ permissions: t.Fatal(err) } + // Capture stderr to check for warnings oldStderr := os.Stderr r, w, _ := os.Pipe() os.Stderr = w @@ -81,6 +81,7 @@ permissions: compiler.SetStrictMode(false) err := compiler.CompileWorkflow(testFile) + // Restore stderr w.Close() os.Stderr = oldStderr var buf bytes.Buffer @@ -92,20 +93,9 @@ permissions: return } - expectedMessage := "Using experimental feature: engine.copilot-sdk" - - if tt.expectWarning { - if !strings.Contains(stderrOutput, expectedMessage) { - t.Errorf("Expected warning containing '%s', got stderr:\n%s", expectedMessage, stderrOutput) - } - if compiler.GetWarningCount() == 0 { - t.Error("Expected warning count > 0 but got 0") - } - return - } - - if strings.Contains(stderrOutput, expectedMessage) { - t.Errorf("Did not expect warning '%s', but got stderr:\n%s", expectedMessage, stderrOutput) + unexpectedMessage := "Using experimental feature: engine.copilot-sdk" + if strings.Contains(stderrOutput, unexpectedMessage) { + t.Errorf("Did not expect experimental warning '%s', but got stderr:\n%s", unexpectedMessage, stderrOutput) } }) } From 50b741744e991f6411a037fbc7863f4ca7942f49 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Jul 2026 23:22:15 +0000 Subject: [PATCH 3/3] fix: clarify engine.driver is still experimental in syntax-agentic.md Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- .github/aw/syntax-agentic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/aw/syntax-agentic.md b/.github/aw/syntax-agentic.md index e1c584cd879..b1af6bcab9d 100644 --- a/.github/aw/syntax-agentic.md +++ b/.github/aw/syntax-agentic.md @@ -300,7 +300,7 @@ description: Agentic workflow specific frontmatter fields for GitHub Agentic Wor - **`antigravity` engine** (experimental): Google Antigravity CLI in headless mode. Requires `ANTIGRAVITY_API_KEY` secret; model via `model:` (maps to `ANTIGRAVITY_MODEL`). Supports `max-turns`, tools allow-list, AWF firewall, and LLM gateway. Does not support `web-search`, `max-continuations`, or native agent files (agent content is prepended to the prompt). - **`opencode` engine** (experimental): Provider-agnostic, open-source AI coding agent (BYOK). Defaults to Copilot routing via `COPILOT_GITHUB_TOKEN` (or `${{ github.token }}` with `copilot-requests` feature). Supports 75+ models via `provider/model` format. Supports AWF firewall and LLM gateway. - **`engine.driver:`** — canonical field to run a custom inner driver script instead of the engine's built-in CLI. For the `pi` engine it launches the driver directly with Node.js (e.g. built-in `pi_agent_core_driver.cjs`, or a workspace-relative path like `.github/drivers/pi_agent_core_driver_sample_node.cjs`); the driver must emit JSONL compatible with `parse_pi_log.cjs` so step summaries and token tracking keep working. Accepts a bare basename (resolved from the setup-action directory) or a workspace-relative path; no absolute paths, no `..`, only `.js`/`.cjs`/`.mjs` (pi). - - **`copilot-sdk` / `engine.driver`** (copilot only): set `copilot-sdk: true` to start a headless Copilot CLI SDK sidecar. Set `driver: ` on the copilot engine to supply a custom SDK driver (`.js`/`.cjs`/`.mjs`/`.py`/`.ts`/`.mts`/`.rb`, or a bare PATH command); this also enables `copilot-sdk: true` automatically. Tune the repeated-tool-denial safeguard with the top-level `max-tool-denials:` field (default `5`). + - **`copilot-sdk`** (copilot only): set `copilot-sdk: true` to start a headless Copilot CLI SDK sidecar. **`engine.driver`** (experimental, copilot only): set `driver: ` to supply a custom SDK driver (`.js`/`.cjs`/`.mjs`/`.py`/`.ts`/`.mts`/`.rb`, or a bare PATH command); this also enables `copilot-sdk: true` automatically. Tune the repeated-tool-denial safeguard with the top-level `max-tool-denials:` field (default `5`). **Inline driver source** (copilot engine only): instead of pointing to a checked-in file, you can embed the driver source directly in the frontmatter using an object with exactly one runtime key (`node`, `python`, `go`, or `java`). The compiler materializes the source under `.gh-aw/copilot-sdk/` at runtime and generates a launcher wrapper. The required SDK package is installed automatically.