@github/copilot-sdk 1.0.17-unstable.37553872417.gc9f6176 → 1.0.18-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -638,21 +638,15 @@ function createServerRpc(connection) {
638
638
  /** @experimental */
639
639
  settings: {
640
640
  /**
641
- * Drops this runtime process's in-memory user settings cache so the next settings read observes disk.
642
- */
643
- reload: async () => connection.sendRequest("user.settings.reload", {}),
644
- /**
645
- * Lists every known user setting (settings.json overlaid with the legacy config.json, config.json wins), each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
641
+ * Lists every known user setting from settings.json, each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
646
642
  *
647
- * @returns Per-key metadata for every known user setting (settings.json overlaid with the legacy config.json, config.json wins), including settings left at their default. Excludes repository- and enterprise-managed overrides.
643
+ * @returns Per-key metadata for every known user setting in settings.json, including settings left at their default. Excludes repository- and enterprise-managed overrides.
648
644
  */
649
645
  get: async () => connection.sendRequest("user.settings.get", {}),
650
646
  /**
651
- * Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed. Returns the keys whose new value is shadowed by a legacy config.json entry (config.json wins on read), which the runtime leaves in place — such writes do not take effect until the legacy value is removed.
647
+ * Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
652
648
  *
653
649
  * @param params Partial user settings to write to settings.json. Each top-level key is written individually, replacing the existing value; a key whose value is null is removed.
654
- *
655
- * @returns Outcome of writing user settings.
656
650
  */
657
651
  set: async (params) => connection.sendRequest("user.settings.set", params)
658
652
  }
@@ -952,6 +946,37 @@ function createServerRpc(connection) {
952
946
  * @returns Outcome of an agentRegistry.spawn call.
953
947
  */
954
948
  spawn: async (params) => connection.sendRequest("agentRegistry.spawn", params)
949
+ },
950
+ /** @experimental */
951
+ connectors: {
952
+ /**
953
+ * Returns feature availability.
954
+ *
955
+ * @returns Feature availability.
956
+ */
957
+ getCapabilities: async () => connection.sendRequest("connectors.getCapabilities", {}),
958
+ /**
959
+ * Returns eligible accounts.
960
+ *
961
+ * @returns Eligible accounts.
962
+ */
963
+ getAccounts: async () => connection.sendRequest("connectors.getAccounts", {}),
964
+ /**
965
+ * Lists entries for the selected account.
966
+ *
967
+ * @param params Selected account.
968
+ *
969
+ * @returns Entries for the selected account.
970
+ */
971
+ list: async (params) => connection.sendRequest("connectors.list", params),
972
+ /**
973
+ * Refreshes entries for the selected account.
974
+ *
975
+ * @param params Selected account.
976
+ *
977
+ * @returns Entries for the selected account.
978
+ */
979
+ refresh: async (params) => connection.sendRequest("connectors.refresh", params)
955
980
  }
956
981
  };
957
982
  }
@@ -1007,6 +1032,133 @@ function createInternalServerRpc(connection) {
1007
1032
  */
1008
1033
  connect: async (params) => connection.sendRequest("connect", params),
1009
1034
  /** @experimental */
1035
+ agents: {
1036
+ /**
1037
+ * Lists the agents this runtime ships, by name. A consumer separating shipped agents from ones the user or a plugin authored should compare against these names rather than against `AgentInfo.source`: an authored agent may carry the `builtin` source while not being one of these, and the runtime treats the two as separate questions. `disableableNames` is the subset a user may turn off, which a client needs to decide whether to offer a toggle. `yamlBasedNames` is the subset backed by a shipped YAML definition, which a client needs before asking the runtime to load one.
1038
+ *
1039
+ * @returns The agents this runtime ships, named so a consumer can tell them apart from authored ones.
1040
+ */
1041
+ getBuiltins: async () => connection.sendRequest("agents.getBuiltins", {}),
1042
+ /**
1043
+ * Lists the shipped agents a client should offer right now, filtered by the feature flags it passes. `getBuiltins` names every agent the runtime knows about; some of those are gated, so a client rendering a picker wants this narrower list together with the description to show beside each name.
1044
+ *
1045
+ * @param params The feature flags to evaluate shipped agents against.
1046
+ *
1047
+ * @returns The shipped agents available under the requested flags.
1048
+ */
1049
+ getAvailableBuiltins: async (params) => connection.sendRequest("agents.getAvailableBuiltins", params),
1050
+ /**
1051
+ * Loads one shipped agent's YAML definition, for a client that needs what the agent declares rather than only its name. `getBuiltins` reports which names have a definition to load: a name outside its `yamlBasedNames` is special-cased in code and has none. The definition crosses as its own JSON rather than as contract-typed fields, because the runtime parses it with the agent schema's tolerant shape and re-typing it here would drop the keys that shape accepts and this one does not. The projected `__nativeCustomAgent` view the runtime derives is included, so a caller reading the declared model and a caller rendering the agent see the same definition.
1052
+ *
1053
+ * @param params The shipped agent whose definition to load.
1054
+ *
1055
+ * @returns One shipped agent's definition.
1056
+ */
1057
+ getBuiltinDefinition: async (params) => connection.sendRequest("agents.getBuiltinDefinition", params),
1058
+ /**
1059
+ * Projects one shipped agent the way a picker lists it, reading only the metadata at the head of the definition file and stopping before the prompt body. `getBuiltinDefinition` answers the whole definition instead, so a client listing every shipped agent should prefer this one: the cost of a listing grows with the number of agents, and the prompt body is the part a listing never shows. The two also differ in shape. This returns the projected custom agent on its own, whereas `getBuiltinDefinition` returns the authored definition with that projection nested under `__nativeCustomAgent`.
1060
+ *
1061
+ * @param params The shipped agent whose listing entry to load.
1062
+ *
1063
+ * @returns One shipped agent, projected for a listing.
1064
+ */
1065
+ getBuiltinListingDefinition: async (params) => connection.sendRequest("agents.getBuiltinListingDefinition", params),
1066
+ /**
1067
+ * Resolves the model a custom agent asks for against the models actually available, and answers both the model to switch to and the warning a user should see when the agent's preference cannot be met. A custom agent may name several acceptable models in preference order, so the decision is a match rather than a lookup, and an agent whose preference is unavailable is a normal outcome that produces a warning rather than an error. A host must call this rather than pick the first available name itself, because the preference order and the wording of the warning are what keep one installation's agent selection the same as another's.
1068
+ *
1069
+ * @param params The models a custom agent asks for, and the models actually available.
1070
+ *
1071
+ * @returns The model to switch to, and the warning to show when the agent's preference could not be met.
1072
+ */
1073
+ customAgentInitialModelDecision: async (params) => connection.sendRequest("agents.customAgentInitialModelDecision", params)
1074
+ },
1075
+ /** @experimental */
1076
+ globalState: {
1077
+ /**
1078
+ * Reads the host's machine-wide state: which plugins are installed and the one-off flags and timestamps that record what the user has already been shown or migrated. This is the state that outlives a single session and a single workspace, so a host reads it to decide whether to run a first-launch step, offer an onboarding prompt, or skip one it has already completed. The stored credentials are deliberately not part of this result; a caller that needs an authenticated identity asks the account methods for it instead. Reading is non-destructive and every field is optional, because a fresh install has recorded nothing yet.
1079
+ *
1080
+ * @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
1081
+ */
1082
+ load: async () => connection.sendRequest("globalState.load", {}),
1083
+ /**
1084
+ * Reads the host's machine-wide state exactly as `globalState.load` does, but from a caller-supplied configuration directory instead of the one the server resolved for itself. Use this when a consumer scopes a session to its own Copilot home — the SDK's per-session `configDir` override — so the state read matches the directory that session actually uses. An absent or empty `configDir` resolves the server's own home, making this identical to `globalState.load`. The stored credentials are omitted here for the same reason they are omitted from `globalState.load`: a caller that needs an authenticated identity asks the account methods instead, so pointing this at another directory cannot be used to read the credentials kept in it.
1085
+ *
1086
+ * @param params Selects the configuration directory whose machine-wide state to read.
1087
+ *
1088
+ * @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
1089
+ */
1090
+ loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
1091
+ /**
1092
+ * Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appInstallNudgeResponded`, `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
1093
+ *
1094
+ * @param params A single top-level key to record in the host's machine-wide state. The write replaces only that key and leaves the rest of the document untouched, so two writers recording different one-off flags do not overwrite each other. The stored credential keys cannot be written through this method.
1095
+ */
1096
+ writeKey: async (params) => connection.sendRequest("globalState.writeKey", params)
1097
+ },
1098
+ /** @experimental */
1099
+ gitHubRepository: {
1100
+ /**
1101
+ * Resolves the GitHub repository that owns a working-tree path by reading the selected git remote configured for it, preferring `origin`. Returns a null `repository` when the path is inside a git working tree but that selected remote does not resolve to a GitHub host. Fails when the path is not inside a git working tree at all, so a caller can tell 'not a repository' apart from 'a repository with no GitHub remote'.
1102
+ *
1103
+ * @param params Working-tree path whose owning GitHub repository should be resolved.
1104
+ *
1105
+ * @returns The GitHub repository that owns the requested path, when the selected remote (`origin`, else the first) is on a GitHub host.
1106
+ */
1107
+ atPath: async (params) => connection.sendRequest("gitHubRepository.atPath", params)
1108
+ },
1109
+ /** @experimental */
1110
+ gitHubOwners: {
1111
+ /**
1112
+ * Registers a cancellable owner listing and returns its request id. Separate from `gitHubOwners.list` so the id exists before the listing starts: a caller that abandons the listing the moment it begins would otherwise have nothing to name in `gitHubOwners.cancel`. The id serves one listing only. Long-abandoned unused ids can be released by later allocations.
1113
+ *
1114
+ * @returns A freshly registered request id. Registering it before the listing starts is what lets a cancel that races the request still find the owner listing slot. The id serves one listing only. Long-abandoned unused ids can be released by later allocations.
1115
+ */
1116
+ nextRequestId: async () => connection.sendRequest("gitHubOwners.nextRequestId", {}),
1117
+ /**
1118
+ * Lists the logins the authenticated user may act as — their own account first, then the organizations they belong to — by asking the GitHub API under the supplied credential. No credential travels in the request: `authInfo` selects one the runtime already holds, and the runtime resolves the token and the GitHub host from it. A failure the caller should render arrives as `message`; one it should raise arrives as `throwError`.
1119
+ *
1120
+ * @param params Credential to list owners under, and the request id that makes the listing cancellable.
1121
+ *
1122
+ * @returns Outcome of an owner listing. Exactly one of `owners` and `message` is present, except that `throwError` reports a failure the caller is expected to raise rather than render.
1123
+ */
1124
+ list: async (params) => connection.sendRequest("gitHubOwners.list", params),
1125
+ /**
1126
+ * Abandons an owner listing started with the given request id. Answers `canceled: true` while a listing with that id is running. Answers `canceled: false` when the id was never registered, was registered but not used, was released after being abandoned, or its listing has ended. Canceling an unused id releases it, and a later `list` with that id is refused. The cancel acts only on owner listings and never reaches another request of the host.
1127
+ *
1128
+ * @param params The owner listing to abandon.
1129
+ *
1130
+ * @returns Whether the id named a running owner listing.
1131
+ */
1132
+ cancel: async (params) => connection.sendRequest("gitHubOwners.cancel", params)
1133
+ },
1134
+ /** @experimental */
1135
+ git: {
1136
+ /**
1137
+ * Reads the remote that the branch checked out in a working tree tracks, as `branch.<name>.remote` configures it. Reports `origin` rather than failing whenever there is no tracking configuration to read — on a detached HEAD, on a branch with no upstream, or when git itself fails — because a caller asking which remote to talk to needs an answer it can act on, not an error. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on.
1138
+ *
1139
+ * @param params Working-tree path a git query applies to.
1140
+ *
1141
+ * @returns The remote the checked-out branch tracks.
1142
+ */
1143
+ currentBranchRemote: async (params) => connection.sendRequest("git.currentBranchRemote", params),
1144
+ /**
1145
+ * Collects the repository context of a working directory in one call: working tree root, repository identifier and host, current branch, and the HEAD and base commits. Every repository field is omitted when the path is not inside a git working tree, and the requested path is echoed back as `cwd`. The answer is the same `SessionWorkingDirectoryContext` that `session.metadata.recordContextChange` accepts, so a caller polling for a context change can forward the result unchanged. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on. It can become public once an SDK consumer needs to derive session context from a directory itself.
1146
+ *
1147
+ * @param params Working-tree path a git query applies to.
1148
+ *
1149
+ * @returns Updated working directory and git context. Emitted as the new payload of `session.context_changed`.
1150
+ */
1151
+ workingDirectoryContext: async (params) => connection.sendRequest("git.workingDirectoryContext", params),
1152
+ /**
1153
+ * Lists the GitHub repositories a working tree's remotes point at, one entry per distinct repository, so a caller can resolve a base and head repository without parsing remote URLs itself. When several remotes name the same repository, only the first is listed, and the entry keeps that remote name. Remotes pointing at no GitHub host are left out, so an empty list means the tree reaches GitHub through no remote. Failing to read the remotes is reported as an error rather than as an empty list, because the two mean different things to a caller. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on.
1154
+ *
1155
+ * @param params Git working tree whose GitHub remotes should be listed.
1156
+ *
1157
+ * @returns The GitHub repositories a working tree's remotes point at.
1158
+ */
1159
+ reposFromRemotes: async (params) => connection.sendRequest("git.reposFromRemotes", params)
1160
+ },
1161
+ /** @experimental */
1010
1162
  sessions: {
1011
1163
  /**
1012
1164
  * Reads lightweight persisted metadata for one local session without opening it.
@@ -1046,6 +1198,30 @@ function createInternalServerRpc(connection) {
1046
1198
  * @param params Session ID to delete from disk.
1047
1199
  */
1048
1200
  delete: async (params) => connection.sendRequest("sessions.delete", params),
1201
+ /**
1202
+ * Creates the workspace record for a session that has not been opened yet. A host that hands a session off to another application — writing the record and then launching that application against the session ID — needs the record on disk before any session exists to carry it, which the session-scoped workspace methods cannot do. Replaces any existing record and resets the checkpoint index. When writing to the local filesystem, a stored `fork_count` survives on disk. Returns the record it built, so a surviving stored `fork_count` can differ from the answer.
1203
+ *
1204
+ * @param params Identity, state location and starting context for a workspace record.
1205
+ *
1206
+ * @returns The workspace record that was written.
1207
+ */
1208
+ createWorkspace: async (params) => connection.sendRequest("sessions.createWorkspace", params),
1209
+ /**
1210
+ * Reads a session's workspace record straight from disk, without opening the session. Resuming by session ID has to know where the session lives before it can connect, so the lookup cannot come from the session-scoped workspace methods, which resolve their location from a live session's context. Returns no record when the file is absent.
1211
+ *
1212
+ * @param params Where the session's state lives, as a root directory and the session ID under it.
1213
+ *
1214
+ * @returns The workspace record on disk, omitted when the session has none.
1215
+ */
1216
+ loadWorkspace: async (params) => connection.sendRequest("sessions.loadWorkspace", params),
1217
+ /**
1218
+ * Merges fields into a session's workspace record on disk, creating the record when it is absent. The counterpart to `sessions.loadWorkspace`, for the same before-the-session-exists case. It preserves stored workspace-schema fields the request does not supply, does not preserve stored keys outside the workspace schema, and never replaces a stored `fork_count`.
1219
+ *
1220
+ * @param params Where the session's state lives, plus workspace-schema fields to merge into its workspace record. Stored keys outside the schema are not preserved, and a stored `fork_count` is never replaced.
1221
+ *
1222
+ * @returns The merge completed. The record carries the supplied workspace-schema fields, but a stored `fork_count` stays.
1223
+ */
1224
+ updateWorkspaceFields: async (params) => connection.sendRequest("sessions.updateWorkspaceFields", params),
1049
1225
  /**
1050
1226
  * Gets the dynamic-context board entry count associated with a session, when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, `rem_consolidation_complete`) can pair START / END board counts around the detached rem-agent spawn. "Dynamic context board" is a runtime-internal concept that is not part of the public SDK contract; the long-term plan is to relocate the telemetry emission into the runtime so this method can be deleted entirely.
1051
1227
  *
@@ -1920,11 +2096,17 @@ function createSessionRpc(connection, sessionId) {
1920
2096
  /** @experimental */
1921
2097
  mcp: {
1922
2098
  /**
1923
- * Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session.
2099
+ * Lists materialized MCP servers and their connection status. Cache misses may start and wait for MCP servers.
1924
2100
  *
1925
2101
  * @returns MCP servers configured for the session, with their connection status and host-level state.
1926
2102
  */
1927
2103
  list: async () => connection.sendRequest("session.mcp.list", { sessionId }),
2104
+ /**
2105
+ * Lists effective MCP configuration without starting, restarting, authenticating, or waiting for servers. An optional live observation is from an already materialized matching server; this is not a readiness guarantee.
2106
+ *
2107
+ * @returns Effective MCP configuration with optional live observations from matching already materialized servers.
2108
+ */
2109
+ listConfigured: async () => connection.sendRequest("session.mcp.listConfigured", { sessionId }),
1928
2110
  /**
1929
2111
  * Lists the tools exposed by a connected MCP server on this session's host. This performs a live `tools/list` request. Tool UI metadata is returned independently of whether MCP Apps rendering is enabled for the session.
1930
2112
  *
@@ -2438,13 +2620,13 @@ function createSessionRpc(connection, sessionId) {
2438
2620
  */
2439
2621
  list: async () => connection.sendRequest("session.extensions.list", { sessionId }),
2440
2622
  /**
2441
- * Enables an extension for the session.
2623
+ * Enables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
2442
2624
  *
2443
2625
  * @param params Source-qualified extension identifier to enable for the session.
2444
2626
  */
2445
2627
  enable: async (params) => connection.sendRequest("session.extensions.enable", { ...params, sessionId }),
2446
2628
  /**
2447
- * Disables an extension for the session.
2629
+ * Disables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
2448
2630
  *
2449
2631
  * @param params Source-qualified extension identifier to disable for the session.
2450
2632
  */
@@ -2453,6 +2635,12 @@ function createSessionRpc(connection, sessionId) {
2453
2635
  * Reloads extension definitions and processes for the session.
2454
2636
  */
2455
2637
  reload: async () => connection.sendRequest("session.extensions.reload", { sessionId }),
2638
+ /**
2639
+ * Host-only reconciliation of authoritative session-effective extension membership and enablement. Refreshes runtime-owned discovery and preferences without persisting settings, installing plugins, or restarting unchanged activations. Returns ExtensionList only after required starts and process/contribution cleanup settle. Takes no caller inventory or overrides. Missing controllers, unready/incomplete discovery, unavailable workspaces, superseded inputs, and lifecycle failures are errors, not empty membership. Independently proven revocations may be applied before an error; retry converges without restarting healthy activations. Error data contains lifecycleChangesApplied and code: extension_reconciliation_host_required, extension_reconciliation_unavailable, extension_reconciliation_not_ready, extension_reconciliation_discovery_failed, extension_reconciliation_workspace_unavailable, extension_reconciliation_superseded, or extension_reconciliation_lifecycle_failed. Mark host reconciliation state applied only on success. On older runtimes, method-not-found must not fall back to global discovery and persistent extension disables.
2640
+ *
2641
+ * @returns Extensions discovered for the session, with their current status.
2642
+ */
2643
+ reconcile: async () => connection.sendRequest("session.extensions.reconcile", { sessionId }),
2456
2644
  /**
2457
2645
  * Push attachments into the next user-message turn from an extension. The host should surface them as composer pills and forward them via the next session.send call. Callable only by extension-owned connections.
2458
2646
  *
@@ -3373,6 +3561,12 @@ function createInternalSessionRpc(connection, sessionId) {
3373
3561
  },
3374
3562
  /** @experimental */
3375
3563
  mcp: {
3564
+ /**
3565
+ * Records the IDE the host is connected to, so the agent's system prompt can name it and its workspace folder. Null or an omitted `ide` clears the recorded value, which is how a host reports that it is disconnected; there is no separate clear method. Both `ideName` and `workspaceFolder` are required together, because half a state cannot be attributed to a project.
3566
+ *
3567
+ * @param params Records which IDE the host is connected to, or clears it.
3568
+ */
3569
+ setConnectedIdeInfo: async (params) => connection.sendRequest("session.mcp.setConnectedIdeInfo", { ...params, sessionId }),
3376
3570
  /**
3377
3571
  * Reloads MCP server connections for the session with an explicit host-provided configuration.
3378
3572
  *
@@ -11,7 +11,7 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
11
11
  */
12
12
  export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | IndexedSearchEvent | WarningEvent | ModelChangeEvent | ModelDeselectedEvent | AutoTierRecommendationEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | PermissionRecoveryEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolShellOutputEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | PermissionCarriedForwardEvent | PermissionMessageAuthorizationEvent | PermissionMessageAuthorizationReadEvent | PermissionMessageAuthorizationDegradedEvent | PermissionAssentDetectedEvent | PermissionContextualAuthorizationEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | HumanResponseRecordedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | WorkflowRunUpdatedEvent | WorkflowRunStartedEvent | WorkflowRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
- * Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference.
14
+ * Extensible routing preference for the virtual `auto` model. New identifiers must be advertised and enabled by the provider. `fast` is an integrator-only latency preset.
15
15
  */
16
16
  export type AutoTier =
17
17
  /** Optimize for efficiency. */
@@ -21,7 +21,7 @@ export type AutoTier =
21
21
  /** Optimize for intelligence. */
22
22
  | "intelligence"
23
23
  /** Integrator-only preset that optimizes for latency. */
24
- | "fast";
24
+ | "fast" | (string & {});
25
25
  /**
26
26
  * Hosting platform type of the repository (github or ado)
27
27
  */
@@ -308,7 +308,7 @@ export type ModelDeselectedReason =
308
308
  /** A host-managed provider snapshot no longer publishes the selected model. */
309
309
  "provider_withdrawn";
310
310
  /**
311
- * Auto preferences that Copilot API can recommend.
311
+ * Enabled Auto preferences that Copilot API can recommend.
312
312
  */
313
313
  export type RecommendedAutoTier =
314
314
  /** Optimize for efficiency. */
@@ -316,7 +316,7 @@ export type RecommendedAutoTier =
316
316
  /** Balance efficiency and intelligence. */
317
317
  | "balance"
318
318
  /** Optimize for intelligence. */
319
- | "intelligence";
319
+ | "intelligence" | (string & {});
320
320
  /**
321
321
  * Terminal reason an Auto preference activation failed.
322
322
  */
@@ -740,7 +740,7 @@ export type AbortReason =
740
740
  /** Autopilot stopped the run because the active objective reached its user-set --max-ai-credits limit. */
741
741
  | "autopilot_credit_limit";
742
742
  /**
743
- * Configuration source: user, workspace, plugin, builtin, or managed
743
+ * Configuration source: user, workspace, plugin, builtin, managed, or account
744
744
  */
745
745
  export type McpServerSource =
746
746
  /** Server configured in the user's global MCP configuration. */
@@ -752,7 +752,9 @@ export type McpServerSource =
752
752
  /** Server bundled with the runtime. */
753
753
  | "builtin"
754
754
  /** Server supplied by a trusted host-managed catalog. */
755
- | "managed";
755
+ | "managed"
756
+ /** Server contributed by a signed-in account; enablement and organization policy still apply. */
757
+ | "account";
756
758
  /**
757
759
  * Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
758
760
  */
@@ -1206,17 +1208,17 @@ export type ManagedSettingsResolvedSource =
1206
1208
  * The category of runtime action that enterprise managed settings governed (blocked or capped)
1207
1209
  */
1208
1210
  export type ManagedSettingsEnforcedAction =
1209
- /** An attempt to turn on a bypass-permissions ("yolo") escalation was refused or capped because policy disables bypass-permissions mode. */
1211
+ /** An attempt to enter a permission mode governed by managed policy was refused or capped. The `setting` and `escalation` fields identify whether this was bypass permissions or Assisted Permissions. */
1210
1212
  "bypass_permissions_blocked";
1211
1213
  /**
1212
- * For a `bypass_permissions_blocked` action, which permission-escalation primitive was refused
1214
+ * For a `bypass_permissions_blocked` action, which permission-mode or escalation primitive was refused
1213
1215
  */
1214
1216
  export type ManagedSettingsEnforcedEscalation =
1215
1217
  /** Full allow-all permissions — automatically approving tools, paths, and URLs. */
1216
1218
  "allow_all"
1217
1219
  /** Automatic approval of all tool permission requests. */
1218
1220
  | "approve_all"
1219
- /** Assisted mode — keeps normal prompt paths and adds an LLM recommendation, distinct from allow-all. */
1221
+ /** Assisted Permissions — uses an LLM review to reduce prompts, distinct from allow-all and not a hard security boundary. */
1220
1222
  | "assisted_approval"
1221
1223
  /** Unrestricted filesystem access outside the session's allowed directories. */
1222
1224
  | "unrestricted_paths"
@@ -1378,7 +1380,7 @@ export type McpServerStatus =
1378
1380
  | "pending"
1379
1381
  /** The server is configured but disabled. */
1380
1382
  | "disabled"
1381
- /** The server was intentionally stopped and can be restarted on demand when policy permits; a server quarantined by restrictive managed policy stays stopped and cannot be restarted until the policy allows it. */
1383
+ /** The server is not running: it may not have started yet, may have been explicitly stopped, or may be quarantined by restrictive managed policy. It can be restarted on demand when policy permits. */
1382
1384
  | "stopped"
1383
1385
  /** The server is not configured for this session. */
1384
1386
  | "not_configured";
@@ -1445,11 +1447,19 @@ export interface StartData {
1445
1447
  */
1446
1448
  alreadyInUse?: boolean;
1447
1449
  autoTier?: AutoTier;
1450
+ /**
1451
+ * True when autoTier is a managed-policy default. Omitted for user-authored and legacy values.
1452
+ */
1453
+ autoTierManaged?: boolean;
1448
1454
  context?: WorkingDirectoryContext;
1449
1455
  /**
1450
1456
  * Context tier selected at session creation time for models with tiered context pricing; null when no tier is selected (e.g., non-tiered model)
1451
1457
  */
1452
1458
  contextTier?: ContextTier | null;
1459
+ /**
1460
+ * True when contextTier is a managed-policy default. Omitted for user-authored and legacy values.
1461
+ */
1462
+ contextTierManaged?: boolean;
1453
1463
  /**
1454
1464
  * Version string of the Copilot application
1455
1465
  */
@@ -1467,6 +1477,10 @@ export interface StartData {
1467
1477
  * Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
1468
1478
  */
1469
1479
  reasoningEffort?: string;
1480
+ /**
1481
+ * True when the reasoning effort is a managed-policy default bound to reasoningEffortModel. Omitted for agent-authored, user-authored, independent, and legacy effort.
1482
+ */
1483
+ reasoningEffortManaged?: boolean;
1470
1484
  /**
1471
1485
  * Model that owns effort embedded in an authored model selection. Omitted for independent reasoning-effort overrides and legacy events.
1472
1486
  */
@@ -1602,11 +1616,19 @@ export interface ResumeData {
1602
1616
  */
1603
1617
  alreadyInUse?: boolean;
1604
1618
  autoTier?: AutoTier;
1619
+ /**
1620
+ * True when autoTier is a managed-policy default. Omitted for user-authored and legacy values.
1621
+ */
1622
+ autoTierManaged?: boolean;
1605
1623
  context?: WorkingDirectoryContext;
1606
1624
  /**
1607
1625
  * Context tier currently selected at resume time; null when no tier is active
1608
1626
  */
1609
1627
  contextTier?: ContextTier | null;
1628
+ /**
1629
+ * True when contextTier is a managed-policy default. Omitted for user-authored and legacy values.
1630
+ */
1631
+ contextTierManaged?: boolean;
1610
1632
  /**
1611
1633
  * When true, tool calls and permission requests left in flight by the previous session lifetime remain pending after resume and the agentic loop awaits their results. User sends are queued behind the pending work until all such requests reach a terminal state. When false or omitted, pending work is normally marked as interrupted unless the resume passively joined live work owned by another client; sessionWasActive distinguishes that case.
1612
1634
  */
@@ -1623,6 +1645,10 @@ export interface ResumeData {
1623
1645
  * Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
1624
1646
  */
1625
1647
  reasoningEffort?: string;
1648
+ /**
1649
+ * True when the reasoning effort is a managed-policy default bound to reasoningEffortModel. Omitted for agent-authored, user-authored, independent, and legacy effort.
1650
+ */
1651
+ reasoningEffortManaged?: boolean;
1626
1652
  /**
1627
1653
  * Model that owns effort embedded in an authored model selection. Omitted for independent reasoning-effort overrides and legacy events.
1628
1654
  */
@@ -2202,6 +2228,10 @@ export interface ModelChangeData {
2202
2228
  * Committed Auto preference after the model configuration change, when applicable.
2203
2229
  */
2204
2230
  autoTier?: AutoTier | null;
2231
+ /**
2232
+ * True when autoTier is a managed-policy default. Omitted for user-authored and legacy values.
2233
+ */
2234
+ autoTierManaged?: boolean;
2205
2235
  /**
2206
2236
  * Reason the change happened, when not user-initiated. `"rate_limit_auto_switch"` for changes triggered by the auto-mode-switch rate-limit recovery path, or `"refusal_fallback"` when the active model declined a request (content refusal) and the runtime switched to the configured refusal-fallback model. UI clients can use this to render contextual copy.
2207
2237
  */
@@ -2210,6 +2240,10 @@ export interface ModelChangeData {
2210
2240
  * Context tier after the model change; null explicitly clears a previously selected tier
2211
2241
  */
2212
2242
  contextTier?: ContextTier | null;
2243
+ /**
2244
+ * True when contextTier is a managed-policy default. Omitted for user-authored and legacy values.
2245
+ */
2246
+ contextTierManaged?: boolean;
2213
2247
  /**
2214
2248
  * Newly selected model identifier
2215
2249
  */
@@ -2229,6 +2263,10 @@ export interface ModelChangeData {
2229
2263
  * Reasoning effort level after the model change, if applicable
2230
2264
  */
2231
2265
  reasoningEffort?: string | null;
2266
+ /**
2267
+ * True when the reasoning effort is a managed-policy default bound to reasoningEffortModel. Omitted for agent-authored, user-authored, independent, and legacy effort.
2268
+ */
2269
+ reasoningEffortManaged?: boolean;
2232
2270
  /**
2233
2271
  * Model that owns effort embedded in an authored model selection. Omitted for independent reasoning-effort overrides and legacy events.
2234
2272
  */
@@ -6201,6 +6239,10 @@ export interface ModelCallFailureData {
6201
6239
  * Reasoning effort level used for the failed model call, if applicable
6202
6240
  */
6203
6241
  reasoningEffort?: string;
6242
+ /**
6243
+ * Serialized (uncompressed) byte length of the failed request body. A content-free size signal.
6244
+ */
6245
+ requestBodyBytes?: number;
6204
6246
  requestFingerprint?: ModelCallFailureRequestFingerprint;
6205
6247
  /**
6206
6248
  * Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable.
@@ -8852,6 +8894,8 @@ export interface PermissionApprovalEvaluation {
8852
8894
  | "action-too-long"
8853
8895
  /** The script path was not authorized for inspection. */
8854
8896
  | "path-not-authorized"
8897
+ /** A code source was excluded from review by content exclusion policy. */
8898
+ | "content-excluded"
8855
8899
  /** The script working directory was invalid. */
8856
8900
  | "invalid-working-directory"
8857
8901
  /** The script snapshot could not be read. */
@@ -8876,6 +8920,18 @@ export interface PermissionApprovalEvaluation {
8876
8920
  | "unreviewable-script-invocation"
8877
8921
  /** The script argument binding could not be reviewed. */
8878
8922
  | "argument-binding-unreviewable"
8923
+ /** The shell command could not be analyzed for execution evidence. */
8924
+ | "unsupported-command-shape"
8925
+ /** The shell command used a code source that cannot be bound for review. */
8926
+ | "unsupported-source"
8927
+ /** The shell command used a code source computed at run time. */
8928
+ | "dynamic-source"
8929
+ /** The shell command referenced more code sources than can be reviewed. */
8930
+ | "too-many-sources"
8931
+ /** A code-bearing executable could not be inspected. */
8932
+ | "executable-unavailable"
8933
+ /** A code-bearing executable exceeded the binding size limit. */
8934
+ | "executable-too-large"
8879
8935
  /** The script review metadata was malformed. */
8880
8936
  | "malformed-script-action-review"
8881
8937
  /** The script snapshot manifest was malformed. */
@@ -11606,7 +11662,7 @@ export interface ManagedSettingsResolvedData {
11606
11662
  source: ManagedSettingsResolvedSource;
11607
11663
  }
11608
11664
  /**
11609
- * Session event "session.managed_settings_enforced". Runtime enforcement of enterprise managed settings: fires when the session blocks or caps a runtime action because enterprise policy governs it, so SDK clients can explain *why* an action was governed. Unlike `session.managed_settings_resolved` (which reports *what* is managed), this reports a concrete governed action — e.g. a user or host tried to turn on a bypass-permissions escalation while policy disables it. Emitted live (not persisted to the session event log) on user/host-initiated attempts only, never for silent policy application. Marked experimental while the managed-settings surface stabilizes.
11665
+ * Session event "session.managed_settings_enforced". Runtime enforcement of enterprise managed settings: fires when the session blocks or caps a runtime action because enterprise policy governs it, so SDK clients can explain *why* an action was governed. Unlike `session.managed_settings_resolved` (which reports *what* is managed), this reports a concrete governed action — e.g. a user or host tried to turn on bypass permissions or Assisted Permissions while the corresponding policy disables it. Emitted live (not persisted to the session event log) on user/host-initiated attempts only, never for silent policy application. Marked experimental while the managed-settings surface stabilizes.
11610
11666
  */
11611
11667
  /** @experimental */
11612
11668
  export interface ManagedSettingsEnforcedEvent {
@@ -11637,7 +11693,7 @@ export interface ManagedSettingsEnforcedEvent {
11637
11693
  type: "session.managed_settings_enforced";
11638
11694
  }
11639
11695
  /**
11640
- * Runtime enforcement of enterprise managed settings: fires when the session blocks or caps a runtime action because enterprise policy governs it, so SDK clients can explain *why* an action was governed. Unlike `session.managed_settings_resolved` (which reports *what* is managed), this reports a concrete governed action — e.g. a user or host tried to turn on a bypass-permissions escalation while policy disables it. Emitted live (not persisted to the session event log) on user/host-initiated attempts only, never for silent policy application. Marked experimental while the managed-settings surface stabilizes.
11696
+ * Runtime enforcement of enterprise managed settings: fires when the session blocks or caps a runtime action because enterprise policy governs it, so SDK clients can explain *why* an action was governed. Unlike `session.managed_settings_resolved` (which reports *what* is managed), this reports a concrete governed action — e.g. a user or host tried to turn on bypass permissions or Assisted Permissions while the corresponding policy disables it. Emitted live (not persisted to the session event log) on user/host-initiated attempts only, never for silent policy application. Marked experimental while the managed-settings surface stabilizes.
11641
11697
  */
11642
11698
  /** @experimental */
11643
11699
  export interface ManagedSettingsEnforcedData {
@@ -11652,7 +11708,7 @@ export interface ManagedSettingsEnforcedData {
11652
11708
  */
11653
11709
  message: string;
11654
11710
  /**
11655
- * The managed setting key responsible for the enforcement (e.g. `permissions.disableBypassPermissionsMode`).
11711
+ * The managed setting key responsible for the enforcement (for example `permissions.disableBypassPermissionsMode` or `permissions.disableAssistedPermissionsMode`).
11656
11712
  */
11657
11713
  setting: string;
11658
11714
  }
package/dist/index.d.ts CHANGED
@@ -13,5 +13,5 @@ export { defineWorkflow, WorkflowResumeError, isWorkflowRunTerminal } from "./wo
13
13
  export { Canvas, CanvasError, createCanvas, type CanvasAction, type CanvasDeclaration, type CanvasHostContext, type CanvasHostContextCapabilities, type CanvasJsonSchema, type CanvasOptions, } from "./canvas.js";
14
14
  export { defineTool, approveAll, createAttributedPermissionResult, convertMcpCallToolResult, createSessionFsAdapter, CopilotRequestHandler, CopilotWebSocketHandler, CopilotWebSocketCloseStatus, CopilotWebSocketForwarder, SessionFsSqliteTransactionFailure, SessionFsWriteFailure, SYSTEM_MESSAGE_SECTIONS, } from "./types.js";
15
15
  export type * from "./generated/session-events.js";
16
- export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AuthIdentityMetadata, AuthInfoType, ConnectorAccountRequest, ConnectorAvailability, ConnectorCapabilities, ConnectorCatalogEntry, ConnectorCatalogResult, ConnectorCatalogStatus, ConnectorConnectRequest, ConnectorConnectResult, ConnectorContinueRequest, ConnectorDisconnectResult, ConnectorMcpStatus, ConnectorReconcileRequest, ConnectorRuntimeStatus, ConnectorSessionAccount, ConnectorSessionAccountResult, ConnectorStatus, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, SubagentStartHandler, SubagentStartHookInput, SubagentStartHookOutput, SubagentStopHandler, SubagentStopHookInput, SubagentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientInfo, CopilotClientMode, CopilotClientOptions, InstallationConfirmationHandler, InstallationConfirmationRequest, InstallationConfirmationResponse, InstallationDecision, InstallationReview, McpInstallationReview, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionLaunchProfile, ExtensionLaunchProvider, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, ExtensionContextAttachment, MessageOptions, ResponseSchema, MessageSource, ManagedSettings, ManagedSettingsPermissions, ModelBilling, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, AutoTier, CapiSessionOptions, CurrentModel, ModelSwitchAutoTierResult, ModelSwitchAutoTierStatus, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, NamedProviderConfig, PermissionHandler, PermissionRequest, PermissionRequestedData, PermissionRequestedEvent, PermissionRequestResult, AttributedPermissionResult, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, PermissionResponseCapability, ProviderConfig, ProviderConfigModelProvider, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, SandboxConfigSource, ResumeSessionConfig, TranscriptRecovery, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionConfigBase, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventMetadata, SessionLifecycleEventType, SessionLifecycleHandler, SessionHooks, SessionCreatedEvent, SessionDeletedEvent, SessionUpdatedEvent, SessionForegroundEvent, SessionBackgroundEvent, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SessionFsSqliteQueryResult, SessionFsSqliteQueryType, SessionFsSqliteProvider, SessionFsSqliteStatement, SessionFsSqliteTransactionErrorClass, CopilotRequestContext, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, SystemMessageReplaceConfig, SystemMessageSection, TelemetryConfig, TraceContext, TraceContextProvider, Tool, ToolHandler, ToolInvocation, CurrentToolMetadata, ToolTelemetry, ToolResultObject, ToolSearchConfig, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";
16
+ export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AuthIdentityMetadata, AuthInfoType, ConnectorAccountRequest, ConnectorAvailability, ConnectorCapabilities, ConnectorCatalogEntry, ConnectorCatalogResult, ConnectorCatalogStatus, ConnectorConnectRequest, ConnectorConnectResult, ConnectorContinueRequest, ConnectorDisconnectResult, ConnectorMcpStatus, ConnectorReconcileRequest, ConnectorRuntimeStatus, ConnectorSessionAccount, ConnectorSessionAccountResult, ConnectorStatus, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, SubagentStartHandler, SubagentStartHookInput, SubagentStartHookOutput, SubagentStopHandler, SubagentStopHookInput, SubagentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientInfo, CopilotClientMode, CopilotClientOptions, InstallationConfirmationHandler, InstallationConfirmationRequest, InstallationConfirmationResponse, InstallationDecision, InstallationReview, McpInstallationReview, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionLaunchProfile, ExtensionLaunchProvider, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, ExtensionContextAttachment, MessageOptions, ResponseSchema, MessageSource, ManagedSettings, ManagedSettingsPermissions, ModelBilling, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, AutoTier, CapiSessionOptions, CurrentModel, ModelSwitchAutoTierResult, ModelSwitchAutoTierStatus, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, NamedProviderConfig, PermissionHandler, PermissionRequest, PermissionRequestedData, PermissionRequestedEvent, PermissionRequestResult, AttributedPermissionResult, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, PermissionResponseCapability, ProviderConfig, ProviderConfigModelProvider, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, SandboxConfigSource, ResumeSessionConfig, TranscriptRecovery, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionConfigBase, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventMetadata, SessionLifecycleEventType, SessionLifecycleHandler, SessionHooks, SessionCreatedEvent, SessionDeletedEvent, SessionUpdatedEvent, SessionForegroundEvent, SessionBackgroundEvent, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SessionFsSqliteQueryResult, SessionFsSqliteQueryType, SessionFsSqliteProvider, SessionFsSqliteStatement, SessionFsSqliteTransactionErrorClass, SkillProvider, SkillProviderCallOptions, SkillProviderDescriptor, CopilotRequestContext, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, SystemMessageReplaceConfig, SystemMessageSection, TelemetryConfig, TraceContext, TraceContextProvider, Tool, ToolHandler, ToolInvocation, CurrentToolMetadata, ToolTelemetry, ToolResultObject, ToolSearchConfig, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";
17
17
  export type { JsonValue, WorkflowRunOptions, WorkflowResumeOptions, WorkflowLimitOverrides, WorkflowResumeErrorCode, SessionWorkflowApi, WorkflowAgentOptions, WorkflowContext, WorkflowDefinition, WorkflowHandle, WorkflowJsonSchema, WorkflowLimits, WorkflowMeta, WorkflowPipelineStage, WorkflowStepOptions, WorkflowRunResult, WorkflowRunStatus, WorkflowRunSummary, WorkflowListRunsOptions, WorkflowRunsPage, WorkflowRunDetail, WorkflowProgressPage, WorkflowProgressLine, WorkflowPhaseObservation, WorkflowPhaseStatus, WorkflowAgentSummary, } from "./workflow.js";
package/dist/session.d.ts CHANGED
@@ -59,6 +59,7 @@ export declare class CopilotSession {
59
59
  private elicitationHandler?;
60
60
  private exitPlanModeHandler?;
61
61
  private autoModeSwitchHandler?;
62
+ private skillProvider?;
62
63
  private hooks?;
63
64
  private transformCallbacks?;
64
65
  private _rpc;
@@ -235,6 +236,12 @@ export declare class CopilotSession {
235
236
  private _confirm;
236
237
  private _select;
237
238
  private _input;
239
+ private requireSkillProvider;
240
+ /**
241
+ * Runs a provider call with an abort signal tied to the runtime's request
242
+ * cancellation. Failures are logged locally and reported generically.
243
+ */
244
+ private callSkillProvider;
238
245
  /**
239
246
  * Retrieves all events and messages from this session's history.
240
247
  *