Skip to content

docs: add Copilot SDK support, driver configuration, and specification guidance#36731

Merged
pelikhan merged 3 commits into
mainfrom
copilot/update-documentation-copilot-sdk
Jun 3, 2026
Merged

docs: add Copilot SDK support, driver configuration, and specification guidance#36731
pelikhan merged 3 commits into
mainfrom
copilot/update-documentation-copilot-sdk

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2026

This updates the Copilot engine docs to explicitly cover Copilot SDK support and how to configure it end to end. It adds clear guidance for selecting an SDK driver, mapping specification-defined environment variables, and wiring the setup in workflow YAML.

  • What changed

    • Added a dedicated Copilot SDK Support section to reference/engines.
    • Replaced Node-only framing with current driver support:
      • safe-basename scripts: .js, .cjs, .mjs, .py, .ts, .mts, .rb
      • bare command names resolved from PATH
    • Linked engine docs directly to the Copilot SDK Driver Specification for the normative contract.
    • Updated reference/copilot-sdk-driver-specification to clarify host-provided runtime controls for timeout and log level.
  • Configuration contract clarified

    • Documented required SDK-mode runtime inputs:
      • GH_AW_PROMPT
      • COPILOT_SDK_URI
      • COPILOT_CONNECTION_TOKEN
    • Documented optional SDK tuning variables:
      • COPILOT_SDK_SEND_TIMEOUT_MS
      • COPILOT_SDK_LOG_LEVEL
    • Clarified gh-aw runtime behavior:
      • COPILOT_SDK_SEND_TIMEOUT_MS is typically injected from workflow timeout-minutes (via GH_AW_TIMEOUT_MINUTES) with headroom
      • COPILOT_SDK_LOG_LEVEL is a host-provided control the driver should honor
    • Clarified token handling: COPILOT_CONNECTION_TOKEN is harness-generated per run and should not be user-set.
  • YAML examples added

    • Added concise configuration examples showing SDK enablement, custom driver selection, and optional env tuning.
engine:
  id: copilot
  copilot-sdk: true
  copilot-sdk-driver: my_driver.ts
  model: gpt-5
  env:
    COPILOT_SDK_SEND_TIMEOUT_MS: "900000"
    COPILOT_SDK_LOG_LEVEL: info

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title docs: add Copilot SDK support guidance to engine reference docs: add Copilot SDK support and driver configuration guidance Jun 3, 2026
Copilot AI requested a review from pelikhan June 3, 2026 21:20
Comment on lines +303 to +322
configuration. You can also set optional SDK tuning variables
in `engine.env`:

- `COPILOT_SDK_SEND_TIMEOUT_MS`
- `COPILOT_SDK_LOG_LEVEL`

Do not set `COPILOT_CONNECTION_TOKEN` manually. The harness
generates it per run and passes the same token to both the
sidecar and driver process.

```yaml wrap
engine:
id: copilot
copilot-sdk: true
copilot-sdk-driver: my_driver.ts
model: gpt-5
env:
COPILOT_SDK_SEND_TIMEOUT_MS: "900000"
COPILOT_SDK_LOG_LEVEL: info
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot the log-level and timeout-minutes variables are set by gh-aw and should be used by the driver to compare the file. Update the documentation and the specification using the W3C specwriter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 7fac799.

I clarified both the engine docs and the W3C-style SDK driver specification so the driver uses gh-aw-provided runtime controls:

  • timeout behavior now explicitly ties to workflow timeout-minutes via host-injected COPILOT_SDK_SEND_TIMEOUT_MS (with the normative fallback behavior)
  • log level behavior now explicitly treats COPILOT_SDK_LOG_LEVEL as a host-provided control the driver must honor when valid

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title docs: add Copilot SDK support and driver configuration guidance docs: add Copilot SDK support, driver configuration, and specification guidance Jun 3, 2026
Copilot AI requested a review from pelikhan June 3, 2026 21:51
@pelikhan pelikhan marked this pull request as ready for review June 3, 2026 21:52
Copilot AI review requested due to automatic review settings June 3, 2026 21:52
@pelikhan pelikhan merged commit f189203 into main Jun 3, 2026
2 checks passed
@pelikhan pelikhan deleted the copilot/update-documentation-copilot-sdk branch June 3, 2026 21:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Copilot engine documentation to describe SDK-mode execution, including how to enable SDK mode, configure/override the SDK driver, and reference the Copilot SDK driver’s normative environment-variable contract.

Changes:

  • Adds a “Copilot SDK Support” section to the engine reference, including driver selection rules and YAML examples.
  • Links engine configuration docs to the Copilot SDK Driver Specification as the normative contract.
  • Clarifies the SDK driver’s timeout and log-level environment variables in the driver specification.
Show a summary per file
File Description
docs/src/content/docs/reference/engines.md Documents SDK-mode enablement, multi-language/bare-command driver overrides, and required/optional SDK env vars.
docs/src/content/docs/reference/copilot-sdk-driver-specification.md Refines the spec’s description of runtime controls (COPILOT_SDK_SEND_TIMEOUT_MS, COPILOT_SDK_LOG_LEVEL).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 3

Comment on lines +310 to +313
In gh-aw, `COPILOT_SDK_SEND_TIMEOUT_MS` is usually injected
automatically from workflow `timeout-minutes` (via
`GH_AW_TIMEOUT_MINUTES`) with safety headroom. Override it in
`engine.env` only when you need a custom SDK send timeout.
Comment on lines +142 to +143
| `COPILOT_SDK_SEND_TIMEOUT_MS` | No | Send timeout in milliseconds | Input SHOULD be a positive integer; gh-aw typically sets this from workflow `timeout-minutes`; default `600000`; implementations MUST fall back on invalid values |
| `COPILOT_SDK_LOG_LEVEL` | No | SDK client log level | gh-aw may set this for driver runtime logging; valid values: `none`, `error`, `warning`, `info`, `debug`, `all`; invalid values MUST fall back to `warning` |
Comment on lines +159 to +162
`COPILOT_SDK_SEND_TIMEOUT_MS` controls maximum send wait duration for prompt completion in standalone mode.

### 4.4 TypeScript Example (Non-Normative)
When gh-aw hosts the driver, it generally derives and injects this variable from workflow `timeout-minutes` (exposed to the harness as `GH_AW_TIMEOUT_MINUTES`) so SDK completion stays below the step timeout budget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants