Commit b3c36e8
Phase I: RuntimeConnection discriminated config
Replaces the flat connection-related fields on CopilotClientOptions
(cliPath, cliArgs, port, useStdio, cliUrl, tcpConnectionToken,
isChildProcess) with a single discriminated 'connection?: RuntimeConnection'
field. Construct values via factory functions:
RuntimeConnection.forStdio({ path?, args? }) // default
RuntimeConnection.forTcp({ port?, connectionToken?, path?, args? })
RuntimeConnection.forUri(url, { connectionToken? })
The mutually-exclusive combinations that used to be runtime errors are
now caught at compile time by the discriminated union. The previous
isChildProcess flag (only ever used by joinSession() in extension.ts) is
dropped from the public API surface; extension.ts now uses an @internal
_internalConnection hook to enter the parent-process stdio mode.
Other renames in this phase:
- CopilotClientOptions.copilotHome -> baseDirectory.
- Internal CopilotClient.actualPort field -> runtimePort.
All TS test files, scenario fixtures, samples, README, and docs updated
to the new shape. Mirrors C# PR #1343 Phase 9.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 355a0f1 commit b3c36e8
49 files changed
Lines changed: 381 additions & 344 deletions
File tree
- nodejs
- src
- test
- e2e
- harness
- test/scenarios
- auth
- byok-anthropic/typescript/src
- byok-azure/typescript/src
- byok-ollama/typescript/src
- byok-openai/typescript/src
- gh-app/typescript/src
- bundling/fully-bundled/typescript/src
- callbacks
- hooks/typescript/src
- permissions/typescript/src
- user-input/typescript/src
- modes
- default/typescript/src
- minimal/typescript/src
- prompts
- attachments/typescript/src
- reasoning-effort/typescript/src
- system-message/typescript/src
- sessions
- concurrent-sessions/typescript/src
- infinite-sessions/typescript/src
- session-resume/typescript/src
- streaming/typescript/src
- tools
- custom-agents/typescript/src
- mcp-servers/typescript/src
- no-tools/typescript/src
- skills/typescript/src
- tool-filtering/typescript/src
- tool-overrides/typescript/src
- virtual-filesystem/typescript/src
- transport
- reconnect/typescript/src
- stdio/typescript/src
- tcp/typescript/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| |||
1026 | 1025 | | |
1027 | 1026 | | |
1028 | 1027 | | |
1029 | | - | |
| 1028 | + | |
1030 | 1029 | | |
1031 | 1030 | | |
1032 | 1031 | | |
| |||
0 commit comments