Skip to content

Commit f84b4fd

Browse files
Update SDK snapshot for Copilot CLI 1.0.94-5
1 parent 2d5bbe1 commit f84b4fd

126 files changed

Lines changed: 5719 additions & 293 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/sdk-java.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ jobs:
214214
eclipse-temurin:25-jdk-alpine \
215215
sh -c 'set -eux
216216
apk add --no-cache bash git java-cacerts maven nodejs npm
217+
bash --noprofile --norc -c "exit 0"
217218
git config --global --add safe.directory /workspace
218219
export JAVA_TOOL_OPTIONS=-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts
219220
export GITHUB_ENV=/tmp/copilot-sdk-runtime.env

‎docs/features/mcp.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,44 @@ The SDK supports two types of MCP servers:
2626

2727
## Configuration
2828

29+
### Inspect configuration and lifecycle
30+
31+
`session.rpc.mcp.listConfigured()` is a parameterless, passive inventory read.
32+
It does not start or restart servers, authenticate, apply sandbox policy, or
33+
wait for server startup. Configuration discovery and policy filtering determine
34+
which servers appear and their `enabled` values.
35+
36+
This experimental RPC requires an aligned SDK/runtime release. Its earlier
37+
prerelease response allowed `live` to be omitted; SDKs using the required
38+
lifecycle contract do not support that older response shape. When supplying
39+
an external runtime, update it alongside the SDK. The overall protocol version
40+
is unchanged and does not identify this experimental contract revision.
41+
42+
Every entry includes `live.status`. A configured server with no materialized
43+
runtime server reports the existing `not_configured` status, even when
44+
`enabled` is `true`. A runtime server that was explicitly stopped reports
45+
`stopped`. Materialized servers report their actual lifecycle, including
46+
`pending`, `connected`, `needs-auth`, and `failed`; failures include `live.error`
47+
when available.
48+
49+
Configuration and lifecycle describe different facts. If a server's URL,
50+
authentication, or configuration source changes while an old connection remains
51+
alive, inventory still reports that connection's actual lifecycle. A
52+
`connected` status does not mean the latest configuration has been applied.
53+
The runtime owns this observation; clients must not substitute cached state
54+
based only on the server name.
55+
56+
Inventory retries concurrent graph replacement a bounded number of times and
57+
returns an error if it cannot obtain a consistent snapshot. It never omits
58+
`live` to hide a graph race.
59+
60+
An explicit `startServer` or `restartServer` resolves and initializes only the
61+
requested server after a cold session resume without first calling `list`.
62+
This includes user and plugin configurations and the built-in GitHub server
63+
configured through `githubMcpToolConfig`. It does not start other configured
64+
servers or override disabled state, authentication requirements, sandbox policy,
65+
or configuration-source precedence.
66+
2967
### Node.js / TypeScript
3068

3169
```typescript

‎docs/runtime-supervised-host.md‎

Lines changed: 69 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,23 @@ Startup fails if a requested transport cannot become ready, rather than silently
106106
downgrading to local-only hosting. Select transports at startup; dispose and
107107
recreate the host to change them.
108108

109+
`githubEnvironment.requireConnectionBinding` defaults to `true`: sealed
110+
authentication must bind the current handshake challenge, a fresh nonce and
111+
timestamp. Explicit `false` selects compatibility with clients sending unbound
112+
encrypted tokens. Relay encryption and resource authorization stay mandatory,
113+
but an unbound sealed token is replayable. This is the same transitional policy
114+
supported by `copilotd`, not a switch to plaintext authentication.
115+
109116
GitHub-only hosting does not open a local listener. Its host handle has an
110117
environment ID but no local URL or connection token. `environmentId` is absent
111118
for local-only hosting. Disposal ends transport and registration activity without
112119
deleting the saved MC environment record or application-owned sessions.
113120

114121
Registering an environment does not publish every application session. Use
115-
`publishSession` for existing resident sessions; factory callbacks and durable
116-
catalog behavior are unchanged. Environment management is independent of a
122+
`publishSession` for an existing resident session, and `listSessions` to read
123+
the host's complete advertised catalog of live and dormant sessions. Listing
124+
does not start a host, publish a session, or paginate results. Factory callbacks
125+
and durable catalog behavior are unchanged. Environment management is independent of a
117126
running host and available only through generated `rpc.environments.list`,
118127
`rpc.environments.get`, and `rpc.environments.delete` operations, using each
119128
language's naming conventions.
@@ -378,7 +387,8 @@ configuration before calling these methods, just as in the creation examples.
378387
Python and .NET handles support asynchronous context management; Java handles
379388
support try-with-resources. Go callers explicitly invoke `Dispose(ctx)`.
380389

381-
Only durable catalog entries marked as application-owned invoke the resume
390+
Durable catalog entries marked as application-owned, including published
391+
application sessions, invoke the resume
382392
factory. If its resume callback is missing, restoration fails rather than silently
383393
falling back to host-owned creation. Published resident sessions attach directly and do not invoke either
384394
factory. This callback does not provide arbitrary adoption or reconfiguration
@@ -398,11 +408,33 @@ and `sessionUri`. Publication does not call the factory, copy history, replace
398408
the native session, or transfer ownership. Its metadata and workspace come
399409
from the resident session, not from an application-supplied configuration.
400410

401-
Published sessions are discoverable only for this listener's lifetime. They
402-
are not imported into its durable catalog. Stopping the listener detaches its
403-
participation without deleting the original session or transcript. A missing
404-
or replaced resident session cannot be silently restored from disk by the
405-
listener.
411+
Publication records the session in the durable, compute-scoped host catalog.
412+
Stopping the listener detaches its participation without deleting the catalog
413+
entry, original session, or transcript. A later host using the same compute
414+
identity can discover it as a dormant session. Restoring an application-owned
415+
session requires the owning application's `resumeSession` callback to configure
416+
its tools, hooks, and handlers; the host does not silently substitute host-owned
417+
session construction. A currently attached resident session still attaches
418+
directly without invoking a factory. The SDK does not expose an unpublish operation.
419+
420+
### Listing host sessions
421+
422+
Call the owner-bound host handle to read every live or dormant session currently
423+
advertised by its host. The runtime returns the complete catalog in one response;
424+
the method does not start a host or publish sessions. The host ID is supplied
425+
by the handle, so the call stays on the original owning connection.
426+
Each method returns a `HostListSessionsResult` with a `sessions` collection,
427+
not the collection directly. In Node.js, use
428+
`const { sessions } = await host.listSessions()`.
429+
430+
| SDK | Method |
431+
| --- | --- |
432+
| Node.js | `host.listSessions()` |
433+
| Python | `await host.list_sessions()` |
434+
| Go | `host.ListSessions(ctx)` |
435+
| .NET | `host.ListSessionsAsync(cancellationToken)` |
436+
| Java | `host.listSessions()` |
437+
| Rust | `host.list_sessions().await` |
406438

407439
### CLI hosting commands
408440

@@ -417,14 +449,11 @@ Sharing also shows the session URI. Use an AHP 0.9 client with the connection
417449
token and ordinary GitHub resource authentication; the connection token alone
418450
does not bypass resource authorization.
419451

420-
`/ahp status` shows connection information. `/ahp stop` stops the **entire
421-
listener and all its shares**. `/remote unshare` removes the foreground session.
422-
The pinned host has no per-session unregister operation, so unsharing drains
423-
and restarts the listener at the same endpoint with the same connection token
424-
before republishing other shares. Other clients must reconnect; local sessions
425-
and their identities remain unchanged. Exiting the owning CLI stops the
426-
listener as well. There is one listener per CLI/effective catalog, not one
427-
listener per shared session.
452+
`/ahp status` shows connection information. `/ahp stop` stops the entire
453+
listener and its active participation, not its durable catalog. Other clients
454+
must reconnect after hosting restarts; local sessions and their identities
455+
remain unchanged. Exiting the owning CLI stops the listener as well. Hosting
456+
lifetime is separate from durable publication.
428457

429458
`--ahp-host [--listen host:port] [--workspace directory]` serves this same backend
430459
in the CLI process, using normal SDK session construction, managed policy,
@@ -440,19 +469,36 @@ Outbound relay, host-picker and explicitly configured external-daemon controls r
440469

441470
## Durable catalog and single host owner
442471

443-
The runtime passes its actual resolved data directory to the host library; the single AHP
444-
catalog lives at `<effective Copilot home>/ahp/sessions`. It follows the same
472+
The runtime passes its actual resolved data directory and compute identity to
473+
the host library. Durable catalogs are scoped to both the effective Copilot
474+
home and compute identity. The effective home follows the same
445475
default `~/.copilot`, `COPILOT_HOME`, and SDK `baseDirectory` resolution as that
446-
runtime. The catalog contains sessions previously created through AHP, not all
447-
SDK/CLI sessions. Listener disposal, owner disconnect, and restart retain it.
476+
runtime. Each catalog contains sessions previously created through AHP and
477+
explicitly published resident sessions, not all SDK/CLI sessions.
478+
Listener disposal, owner disconnect, and restart retain it.
448479
A replacement listener can list and resume these sessions after authenticating.
449480

481+
Supply top-level `AhpHostOptions.computeId` to keep the same catalog when switching
482+
between local and Mission Control hosting. If omitted for a local-only start,
483+
the runtime persists a stable identity in its settings; the SDK never generates
484+
one. Mission Control's `githubEnvironment.computeId` remains required. When both
485+
compute IDs are supplied, they must agree or startup fails.
486+
487+
| SDK | Top-level compute identity |
488+
| --- | --- |
489+
| Node.js | `computeId` |
490+
| Python | `compute_id` |
491+
| Go | `ComputeID` |
492+
| .NET | `ComputeId` |
493+
| Java | `setComputeId(...)` |
494+
| Rust | `with_compute_id(...)` |
495+
450496
Only one AHP server may own a catalog at a time. A second start for the
451-
same location fails, including from another runtime. Ordinary runtimes, SDK
497+
same home and compute identity fails, including from another runtime. Ordinary runtimes, SDK
452498
clients, and sessions do not acquire this lock and remain usable. The lock is
453499
kernel-managed, non-blocking, held until shutdown writes finish, and released
454-
even after forced process termination. Different effective homes have separate
455-
catalogs. This does not change standalone `copilotd` defaults or concurrency
500+
even after forced process termination. Different effective homes or compute
501+
identities have separate catalogs. This does not change standalone `copilotd` defaults or concurrency
456502
behavior, and does not add standalone/in-process shared-writer support.
457503

458504
## Current GHES shell limitation

‎dotnet/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ For GitHub Mission Control, set
4444
instead, or configure both transports. GitHub environment name and compute ID are
4545
required; there is no implicit local listener. The host's `Url`, `Token`, and `Pid`
4646
are nullable; `EnvironmentId` contains the GitHub environment ID when configured.
47+
Call `host.ListSessionsAsync()` to read the complete advertised catalog of live
48+
and dormant sessions.
49+
Set top-level `ComputeId` to reuse the durable catalog across local and Mission
50+
Control hosting; it must agree with `GitHubEnvironment.ComputeId` when both are
51+
supplied. The runtime persists an omitted local-only identity. Publication
52+
survives host shutdown; dormant application sessions require your resume callback.
4753
Environment list/get/delete operations are available only through the generated RPC API.
4854
See [runtime-supervised AHP hosting](../docs/runtime-supervised-host.md) for creation
4955
and resume callbacks, resident-session publication, ownership, and shared-snapshot E2Es.

0 commit comments

Comments
 (0)