Summary
The "From plan mode" section of docs/features/fleet-mode.md introduces a TypeScript 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
PlanModeExitAction: outside this one documentation snippet the identifier appears nowhere in
the repository, and it appears nowhere at all in the published package. A reader who searches
the bindings for the documented identifier - or imports it - does not find it.
The four string values shown in the guide are correct. Only the name is wrong.
Where
docs/features/fleet-mode.md, lines 176-185 on main:
Plan-mode UIs can start fleet deployment by returning the autopilot_fleet exit action. The generated session event types describe it as:
type PlanModeExitAction =
| "exit_only"
| "interactive"
| "autopilot"
/** Exit plan mode and continue with parallel autonomous workers. */
| "autopilot_fleet";
What the SDK declares
nodejs/src/generated/session-events.ts:
/**
* Exit plan mode action
*/
export type ExitPlanModeAction =
/** Exit plan mode without starting implementation. */
| "exit_only"
/** Exit plan mode and continue in interactive mode. */
| "interactive"
/** Exit plan mode and continue autonomously. */
| "autopilot"
/** Exit plan mode and continue with parallel autonomous workers. */
| "autopilot_fleet";
It is re-exported from the package root (nodejs/src/index.ts star-exports
./generated/session-events.js), and the generated event payloads use it directly for
actions, recommendedAction and selectedAction. The same four wire values are generated for
all six language bindings.
Reproduction
$ npm init -y
$ npm i --save-exact @github/copilot-sdk@1.0.8 typescript@5.9.3
tsconfig.json:
{
"compilerOptions": {
"strict": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2022",
"skipLibCheck": true,
"noEmit": true
},
"files": ["old-name.ts"]
}
old-name.ts - the identifier the guide shows:
import type { PlanModeExitAction } from "@github/copilot-sdk";
export type Action = PlanModeExitAction;
$ npx tsc --project tsconfig.json
old-name.ts(1,15): error TS2305: Module '"@github/copilot-sdk"' has no exported member 'PlanModeExitAction'.
Pointing files at new-name.ts instead, with the identifier the SDK declares:
import type { ExitPlanModeAction } from "@github/copilot-sdk";
export const action: ExitPlanModeAction = "autopilot_fleet";
$ npx tsc --project tsconfig.json
$ echo $?
0
Expected
The snippet names the union the SDK actually declares, so a reader can locate and import it.
Note
The snippet declares its own type alias rather than importing one, so it compiles as written and
the documentation validation workflow accepts it either way. The problem is only that the
displayed identifier is not the one the SDK exports.
Summary
The "From plan mode" section of
docs/features/fleet-mode.mdintroduces a TypeScript snippetwith "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 exportPlanModeExitAction: outside this one documentation snippet the identifier appears nowhere inthe repository, and it appears nowhere at all in the published package. A reader who searches
the bindings for the documented identifier - or imports it - does not find it.
The four string values shown in the guide are correct. Only the name is wrong.
Where
docs/features/fleet-mode.md, lines 176-185 onmain:What the SDK declares
nodejs/src/generated/session-events.ts:It is re-exported from the package root (
nodejs/src/index.tsstar-exports./generated/session-events.js), and the generated event payloads use it directly foractions,recommendedActionandselectedAction. The same four wire values are generated forall six language bindings.
Reproduction
tsconfig.json:{ "compilerOptions": { "strict": true, "module": "NodeNext", "moduleResolution": "NodeNext", "target": "ES2022", "skipLibCheck": true, "noEmit": true }, "files": ["old-name.ts"] }old-name.ts- the identifier the guide shows:Pointing
filesatnew-name.tsinstead, with the identifier the SDK declares:Expected
The snippet names the union the SDK actually declares, so a reader can locate and import it.
Note
The snippet declares its own type alias rather than importing one, so it compiles as written and
the documentation validation workflow accepts it either way. The problem is only that the
displayed identifier is not the one the SDK exports.