Skip to content

Fix the plan-mode exit action type name in the fleet mode guide - #2090

Merged
SteveSandersonMS merged 1 commit into
mainfrom
sdk-bugfix-158
Jul 27, 2026
Merged

Fix the plan-mode exit action type name in the fleet mode guide#2090
SteveSandersonMS merged 1 commit into
mainfrom
sdk-bugfix-158

Conversation

@examon

@examon examon commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The "From plan mode" section of docs/features/fleet-mode.md introduces its snippet with "The
generated session event types describe it as:", and then labels the union PlanModeExitAction.
The generated session-event union is ExitPlanModeAction; the SDK does not export the
documented name, which appears nowhere in the repository outside that snippet and nowhere in the
published package.

This renames the identifier in that one snippet. The four string values were already correct.

Fixes #2089

The change

-type PlanModeExitAction =
+type ExitPlanModeAction =

One token, in docs/features/fleet-mode.md.

Why this identifier

  • The sentence above the snippet says "generated session event types", and
    ExitPlanModeAction is declared in nodejs/src/generated/session-events.ts and re-exported
    as a type from the package root.
  • The generated session-event payloads use it directly for actions, recommendedAction and
    selectedAction.
  • The comment the snippet keeps for autopilot_fleet matches the one on that declaration.

Before and after

Against the published package (@github/copilot-sdk@1.0.8, TypeScript 5.9.3, strict,
moduleResolution: NodeNext, skipLibCheck):

# the identifier the guide showed
$ npx tsc --project tsconfig.json
old-name.ts(1,15): error TS2305: Module '"@github/copilot-sdk"' has no exported member 'PlanModeExitAction'.

# the identifier the guide now shows
$ npx tsc --project tsconfig.json
$ echo $?
0

A value outside the union is still rejected (error TS2322: Type '"autopilot_swarm"' is not assignable to type 'ExitPlanModeAction'), so the corrected name really does resolve to the
four-value union.

Checks

npm run extract && npm run validate:ts in scripts/docs-validation passes before and after
this change - the snippet declares its own alias, so it compiled either way. The four values and
their order match nodejs/src/generated/session-events.ts exactly.

Only docs/features/fleet-mode.md changes; no generated file, binding source, or public API is
touched.

The "From plan mode" section of docs/features/fleet-mode.md introduces
its snippet with "The generated session event types describe it as:",
but names the union `PlanModeExitAction`. The generated session-event
API declares `ExitPlanModeAction`, and the Node.js package root
re-exports it as a type. `PlanModeExitAction` appeared only in this
documentation example and is not an importable SDK symbol, so importing
that formerly documented name from `@github/copilot-sdk` does not
compile.

The four string values were already correct; only the name changes.
Copilot AI review requested due to automatic review settings July 27, 2026 03:48
@examon
examon requested a review from a team as a code owner July 27, 2026 03:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Corrects the fleet mode guide to use the exported session-event type name.

Changes:

  • Renames PlanModeExitAction to ExitPlanModeAction in the TypeScript snippet.
Show a summary per file
File Description
docs/features/fleet-mode.md Aligns the documented type name with the generated SDK export.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@SteveSandersonMS
SteveSandersonMS merged commit 0fae55a into main Jul 27, 2026
17 checks passed
@SteveSandersonMS
SteveSandersonMS deleted the sdk-bugfix-158 branch July 27, 2026 14:48
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.

Docs: fleet mode guide labels the plan-mode exit action union with a name the SDK does not export

3 participants