@github/copilot-sdk 1.0.13-preview.6 → 1.0.13
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.
- package/README.md +26 -0
- package/dist/cjs/cliVersion.js +1 -1
- package/dist/cjs/client.js +25 -6
- package/dist/cjs/generated/rpc.js +45 -3
- package/dist/cjs/session.js +108 -10
- package/dist/cliVersion.d.ts +1 -1
- package/dist/cliVersion.js +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.js +25 -6
- package/dist/generated/rpc.d.ts +685 -7
- package/dist/generated/rpc.js +45 -3
- package/dist/generated/session-events.d.ts +172 -9
- package/dist/index.d.ts +1 -1
- package/dist/session.d.ts +52 -1
- package/dist/session.js +108 -10
- package/dist/types.d.ts +10 -3
- package/package.json +10 -10
package/dist/generated/rpc.js
CHANGED
|
@@ -410,7 +410,11 @@ function createServerRpc(connection) {
|
|
|
410
410
|
*
|
|
411
411
|
* @returns Validated device-managed settings discovered before a session exists.
|
|
412
412
|
*/
|
|
413
|
-
read: async () => connection.sendRequest("managedSettings.read", {})
|
|
413
|
+
read: async () => connection.sendRequest("managedSettings.read", {}),
|
|
414
|
+
/**
|
|
415
|
+
* Force-refreshes enterprise managed settings for every account: wipes the persistent server-policy cache (the whole `<cacheHome>/managed-settings` directory) and drops this runtime process's in-memory retained server policy. It does not itself fetch policy — the effect is that the next time a session resolves managed settings for an account, that resolution re-fetches the account's org policy from the network instead of serving a cached response. Note that `managedSettings.read` returns only device/MDM settings and never triggers the account server-policy fetch, so a host implementing "sync account policy" should start a fresh session resolution rather than treat a subsequent `managedSettings.read` as the refreshed org policy. Mirrors the invalidation a sign-out performs, broadened from the one signing-out account to all of them; device/MDM layers describe the machine, not the account, and are left untouched. Rejects if the on-disk cache cannot be removed.
|
|
416
|
+
*/
|
|
417
|
+
clearCache: async () => connection.sendRequest("managedSettings.clearCache", {})
|
|
414
418
|
},
|
|
415
419
|
/** @experimental */
|
|
416
420
|
runtime: {
|
|
@@ -974,9 +978,9 @@ function createSessionRpc(connection, sessionId) {
|
|
|
974
978
|
/** @experimental */
|
|
975
979
|
model: {
|
|
976
980
|
/**
|
|
977
|
-
* Gets the
|
|
981
|
+
* Gets the session's authoritative model snapshot, including the committed Auto preference and any newer unclaimed Auto preference waiting for a future user turn.
|
|
978
982
|
*
|
|
979
|
-
* @returns The
|
|
983
|
+
* @returns The session's authoritative model snapshot. Auto preference fields are configuration for the virtual `auto` model and do not change the selected model identifier. The context tier reflects `Session.getContextTier()`, restored from the session journal on resume.
|
|
980
984
|
*/
|
|
981
985
|
getCurrent: async () => connection.sendRequest("session.model.getCurrent", { sessionId }),
|
|
982
986
|
/**
|
|
@@ -987,6 +991,14 @@ function createSessionRpc(connection, sessionId) {
|
|
|
987
991
|
* @returns The model identifier active on the session after the switch.
|
|
988
992
|
*/
|
|
989
993
|
switchTo: async (params) => connection.sendRequest("session.model.switchTo", { sessionId, ...params }),
|
|
994
|
+
/**
|
|
995
|
+
* Requests an Auto preference change without changing the session's selected model. The latest unclaimed request wins; the runtime commits it only after a later prompt using the `auto` model mints a usable model and token pair. A `pending` response confirms that the request was accepted, not that it committed. Observe eventual success through `session.model_change`, failure through the ephemeral `session.auto_tier_switch_failed` event, or current unclaimed state through `session.model.getCurrent`.
|
|
996
|
+
*
|
|
997
|
+
* @param params An Auto preference request for the session. This updates Auto configuration only; it does not change the selected model to `auto`.
|
|
998
|
+
*
|
|
999
|
+
* @returns Immediate acknowledgement and Auto preference snapshot after a switch request. This result never implies that a pending preference committed.
|
|
1000
|
+
*/
|
|
1001
|
+
switchAutoTier: async (params) => connection.sendRequest("session.model.switchAutoTier", { sessionId, ...params }),
|
|
990
1002
|
/**
|
|
991
1003
|
* Updates the session's reasoning effort without changing the selected model.
|
|
992
1004
|
*
|
|
@@ -1193,6 +1205,15 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1193
1205
|
diff: async (params) => connection.sendRequest("session.workspaces.diff", { sessionId, ...params })
|
|
1194
1206
|
},
|
|
1195
1207
|
/** @experimental */
|
|
1208
|
+
autopilotObjective: {
|
|
1209
|
+
/**
|
|
1210
|
+
* Reads the current canonical autopilot objective state for this session.
|
|
1211
|
+
*
|
|
1212
|
+
* @returns Canonical runtime state for the session's current autopilot objective.
|
|
1213
|
+
*/
|
|
1214
|
+
getState: async () => connection.sendRequest("session.autopilotObjective.getState", { sessionId })
|
|
1215
|
+
},
|
|
1216
|
+
/** @experimental */
|
|
1196
1217
|
completions: {
|
|
1197
1218
|
/**
|
|
1198
1219
|
* Gets the characters that should trigger host-driven completions for the session. Empty disables host-driven completions (e.g. local sessions, or a relay host that does not advertise them).
|
|
@@ -1286,6 +1307,22 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1286
1307
|
* @returns Background tasks currently tracked by the session.
|
|
1287
1308
|
*/
|
|
1288
1309
|
list: async () => connection.sendRequest("session.tasks.list", { sessionId }),
|
|
1310
|
+
/**
|
|
1311
|
+
* Registers a client-owned task, or reclaims an orphaned task belonging to the same extension principal.
|
|
1312
|
+
*
|
|
1313
|
+
* @param params Registers or reclaims a client-owned task.
|
|
1314
|
+
*
|
|
1315
|
+
* @returns Result of registering or reclaiming a client-owned task.
|
|
1316
|
+
*/
|
|
1317
|
+
register: async (params) => connection.sendRequest("session.tasks.register", { sessionId, ...params }),
|
|
1318
|
+
/**
|
|
1319
|
+
* Publishes generic progress or a terminal outcome for a client-owned task.
|
|
1320
|
+
*
|
|
1321
|
+
* @param params Updates a client-owned task.
|
|
1322
|
+
*
|
|
1323
|
+
* @returns Result of publishing a client-owned task update.
|
|
1324
|
+
*/
|
|
1325
|
+
update: async (params) => connection.sendRequest("session.tasks.update", { sessionId, ...params }),
|
|
1289
1326
|
/**
|
|
1290
1327
|
* Refreshes metadata for any detached background shells the runtime knows about.
|
|
1291
1328
|
*
|
|
@@ -2754,6 +2791,11 @@ function registerClientSessionApiHandlers(connection, getHandlers) {
|
|
|
2754
2791
|
if (!handler) throw new Error(`No factory handler registered for session: ${params.sessionId}`);
|
|
2755
2792
|
return handler.abort(params);
|
|
2756
2793
|
});
|
|
2794
|
+
connection.onRequest("tasks.cancel", async (params) => {
|
|
2795
|
+
const handler = getHandlers(params.sessionId).tasks;
|
|
2796
|
+
if (!handler) throw new Error(`No tasks handler registered for session: ${params.sessionId}`);
|
|
2797
|
+
return handler.cancel(params);
|
|
2798
|
+
});
|
|
2757
2799
|
connection.onRequest("sessionFs.readFile", async (params) => {
|
|
2758
2800
|
const handler = getHandlers(params.sessionId).sessionFs;
|
|
2759
2801
|
if (!handler) throw new Error(`No sessionFs handler registered for session: ${params.sessionId}`);
|
|
@@ -9,7 +9,7 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
|
9
9
|
/**
|
|
10
10
|
* Union of all session event variants emitted by the Copilot CLI runtime.
|
|
11
11
|
*/
|
|
12
|
-
export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | 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 | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | 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 | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
|
|
12
|
+
export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | 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 | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | 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 | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
|
|
13
13
|
/**
|
|
14
14
|
* Routing preference used when the session model is `auto`.
|
|
15
15
|
*/
|
|
@@ -56,6 +56,20 @@ export type Verbosity =
|
|
|
56
56
|
| "medium"
|
|
57
57
|
/** A more detailed response was requested. */
|
|
58
58
|
| "high";
|
|
59
|
+
/**
|
|
60
|
+
* What the user must do to recover from a failure, named as an action rather than as one client's affordance. The runtime cannot know which affordance a client offers — a slash command, a settings pane, a link — so the accompanying message stays host-agnostic and each client renders its own copy from this value. Absent when the runtime knows of no action the user can take.
|
|
61
|
+
*/
|
|
62
|
+
export type RemediationAction =
|
|
63
|
+
/** Authenticate again with the Copilot backend. The current credential is absent, expired, or rejected. */
|
|
64
|
+
"sign_in"
|
|
65
|
+
/** Authenticate as a different account. The current account exists but lacks access to the requested resource. */
|
|
66
|
+
| "switch_account"
|
|
67
|
+
/** Inspect which account is currently authenticated before deciding what to change. */
|
|
68
|
+
| "show_account"
|
|
69
|
+
/** Review or widen the sandbox policy. The blocked path or host is named by the accompanying message or by the tool result the action arrived with. */
|
|
70
|
+
| "review_sandbox_policy"
|
|
71
|
+
/** Permit outbound network access in the sandbox policy. */
|
|
72
|
+
| "allow_sandbox_outbound";
|
|
59
73
|
/**
|
|
60
74
|
* The session mode the agent is operating in
|
|
61
75
|
*/
|
|
@@ -122,6 +136,18 @@ export type ModelChangeSource =
|
|
|
122
136
|
| "automatic"
|
|
123
137
|
/** An SDK or RPC caller selected the model. */
|
|
124
138
|
| "sdk";
|
|
139
|
+
/**
|
|
140
|
+
* Terminal reason an Auto preference activation failed.
|
|
141
|
+
*/
|
|
142
|
+
export type AutoTierSwitchFailureReason =
|
|
143
|
+
/** The candidate model was rejected by model policy. */
|
|
144
|
+
"policy_rejected"
|
|
145
|
+
/** The Auto routing request failed or returned an unusable response. */
|
|
146
|
+
| "request_failed"
|
|
147
|
+
/** The runtime could not prepare the Auto routing request. */
|
|
148
|
+
| "setup_failed"
|
|
149
|
+
/** The provider does not support Auto routing. */
|
|
150
|
+
| "unsupported";
|
|
125
151
|
/**
|
|
126
152
|
* Permission mode for the session.
|
|
127
153
|
*/
|
|
@@ -1246,6 +1272,7 @@ export interface ErrorData {
|
|
|
1246
1272
|
* GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
|
|
1247
1273
|
*/
|
|
1248
1274
|
providerCallId?: string;
|
|
1275
|
+
remediation?: RemediationAction;
|
|
1249
1276
|
/**
|
|
1250
1277
|
* Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
|
|
1251
1278
|
*/
|
|
@@ -1626,6 +1653,7 @@ export interface WarningData {
|
|
|
1626
1653
|
* Human-readable warning message for display in the timeline
|
|
1627
1654
|
*/
|
|
1628
1655
|
message: string;
|
|
1656
|
+
remediation?: RemediationAction;
|
|
1629
1657
|
/**
|
|
1630
1658
|
* Optional URL associated with this warning that the user can open in a browser
|
|
1631
1659
|
*/
|
|
@@ -1669,6 +1697,10 @@ export interface ModelChangeEvent {
|
|
|
1669
1697
|
* Model change details including previous and new model identifiers
|
|
1670
1698
|
*/
|
|
1671
1699
|
export interface ModelChangeData {
|
|
1700
|
+
/**
|
|
1701
|
+
* Committed Auto preference after the model configuration change, when applicable.
|
|
1702
|
+
*/
|
|
1703
|
+
autoTier?: AutoTier | null;
|
|
1672
1704
|
/**
|
|
1673
1705
|
* 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.
|
|
1674
1706
|
*/
|
|
@@ -1681,6 +1713,7 @@ export interface ModelChangeData {
|
|
|
1681
1713
|
* Newly selected model identifier
|
|
1682
1714
|
*/
|
|
1683
1715
|
newModel: string;
|
|
1716
|
+
previousAutoTier?: AutoTier;
|
|
1684
1717
|
/**
|
|
1685
1718
|
* Model that was previously selected, if any
|
|
1686
1719
|
*/
|
|
@@ -1699,6 +1732,47 @@ export interface ModelChangeData {
|
|
|
1699
1732
|
source?: ModelChangeSource;
|
|
1700
1733
|
verbosity?: Verbosity;
|
|
1701
1734
|
}
|
|
1735
|
+
/**
|
|
1736
|
+
* Session event "session.auto_tier_switch_failed". A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume.
|
|
1737
|
+
*/
|
|
1738
|
+
export interface AutoTierSwitchFailedEvent {
|
|
1739
|
+
/**
|
|
1740
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1741
|
+
*/
|
|
1742
|
+
agentId?: string;
|
|
1743
|
+
data: AutoTierSwitchFailedData;
|
|
1744
|
+
/**
|
|
1745
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
1746
|
+
*/
|
|
1747
|
+
ephemeral: true;
|
|
1748
|
+
/**
|
|
1749
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
1750
|
+
*/
|
|
1751
|
+
id: string;
|
|
1752
|
+
/**
|
|
1753
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
1754
|
+
*/
|
|
1755
|
+
parentId: string | null;
|
|
1756
|
+
/**
|
|
1757
|
+
* ISO 8601 timestamp when the event was created
|
|
1758
|
+
*/
|
|
1759
|
+
timestamp: string;
|
|
1760
|
+
/**
|
|
1761
|
+
* Type discriminator. Always "session.auto_tier_switch_failed".
|
|
1762
|
+
*/
|
|
1763
|
+
type: "session.auto_tier_switch_failed";
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume.
|
|
1767
|
+
*/
|
|
1768
|
+
export interface AutoTierSwitchFailedData {
|
|
1769
|
+
effectiveAutoTier?: AutoTier;
|
|
1770
|
+
reason: AutoTierSwitchFailureReason;
|
|
1771
|
+
/**
|
|
1772
|
+
* Auto preference that failed to activate, or null when returning to provider-default routing failed.
|
|
1773
|
+
*/
|
|
1774
|
+
requestedAutoTier: AutoTier | null;
|
|
1775
|
+
}
|
|
1702
1776
|
/**
|
|
1703
1777
|
* Session event "session.mode_changed". Agent mode change details including previous and new modes
|
|
1704
1778
|
*/
|
|
@@ -5832,6 +5906,7 @@ export interface ToolExecutionCompleteError {
|
|
|
5832
5906
|
* Human-readable error message
|
|
5833
5907
|
*/
|
|
5834
5908
|
message: string;
|
|
5909
|
+
remediation?: RemediationAction;
|
|
5835
5910
|
}
|
|
5836
5911
|
/**
|
|
5837
5912
|
* Tool execution result on success
|
|
@@ -7445,11 +7520,11 @@ export interface PermissionRequestShell {
|
|
|
7445
7520
|
*/
|
|
7446
7521
|
possibleUrls: PermissionRequestShellPossibleUrl[];
|
|
7447
7522
|
/**
|
|
7448
|
-
* True when the
|
|
7523
|
+
* True when the tool is asking to run this command outside the sandbox, either because the command detaches and cannot be sandboxed at all, or because a sandboxed run looked blocked (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the command runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
|
|
7449
7524
|
*/
|
|
7450
7525
|
requestSandboxBypass?: boolean;
|
|
7451
7526
|
/**
|
|
7452
|
-
*
|
|
7527
|
+
* What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
|
|
7453
7528
|
*/
|
|
7454
7529
|
requestSandboxBypassReason?: string;
|
|
7455
7530
|
/**
|
|
@@ -7562,11 +7637,11 @@ export interface PermissionRequestRead {
|
|
|
7562
7637
|
*/
|
|
7563
7638
|
path: string;
|
|
7564
7639
|
/**
|
|
7565
|
-
* True when the
|
|
7640
|
+
* True when the tool is asking to re-run this search outside the sandbox, after a sandboxed run looked blocked (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the search runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
|
|
7566
7641
|
*/
|
|
7567
7642
|
requestSandboxBypass?: boolean;
|
|
7568
7643
|
/**
|
|
7569
|
-
*
|
|
7644
|
+
* What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
|
|
7570
7645
|
*/
|
|
7571
7646
|
requestSandboxBypassReason?: string;
|
|
7572
7647
|
/**
|
|
@@ -7634,11 +7709,11 @@ export interface PermissionRequestUrl {
|
|
|
7634
7709
|
*/
|
|
7635
7710
|
redirectedFrom?: string;
|
|
7636
7711
|
/**
|
|
7637
|
-
* True when
|
|
7712
|
+
* True when the tool is asking to run this URL fetch outside the sandbox, after the network policy denied the approved URL or the sandbox proxy could not reach it (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the fetch runs only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
|
|
7638
7713
|
*/
|
|
7639
7714
|
requestSandboxBypass?: boolean;
|
|
7640
7715
|
/**
|
|
7641
|
-
*
|
|
7716
|
+
* What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
|
|
7642
7717
|
*/
|
|
7643
7718
|
requestSandboxBypassReason?: string;
|
|
7644
7719
|
/**
|
|
@@ -8095,11 +8170,11 @@ export interface PermissionPromptRequestUrl {
|
|
|
8095
8170
|
*/
|
|
8096
8171
|
redirectedFrom?: string;
|
|
8097
8172
|
/**
|
|
8098
|
-
* True when
|
|
8173
|
+
* True when the tool is asking to run this URL fetch outside the sandbox, after the network policy denied the approved URL or the sandbox proxy could not reach it (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the fetch runs only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
|
|
8099
8174
|
*/
|
|
8100
8175
|
requestSandboxBypass?: boolean;
|
|
8101
8176
|
/**
|
|
8102
|
-
*
|
|
8177
|
+
* What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
|
|
8103
8178
|
*/
|
|
8104
8179
|
requestSandboxBypassReason?: string;
|
|
8105
8180
|
/**
|
|
@@ -10695,10 +10770,20 @@ export interface McpServersLoadedServer {
|
|
|
10695
10770
|
* Version of the plugin that supplied the effective MCP server config, only when source is plugin
|
|
10696
10771
|
*/
|
|
10697
10772
|
pluginVersion?: string;
|
|
10773
|
+
serverMetadata?: McpServerMetadata;
|
|
10698
10774
|
source?: McpServerSource;
|
|
10699
10775
|
status: McpServerStatus;
|
|
10700
10776
|
transport?: McpServerTransport;
|
|
10701
10777
|
}
|
|
10778
|
+
/**
|
|
10779
|
+
* Server-advertised metadata learned through modern discovery or legacy initialization.
|
|
10780
|
+
*/
|
|
10781
|
+
export interface McpServerMetadata {
|
|
10782
|
+
/**
|
|
10783
|
+
* Non-empty natural-language guidance for using the server, or null when the server omitted instructions or advertised an empty string.
|
|
10784
|
+
*/
|
|
10785
|
+
instructions: string | null;
|
|
10786
|
+
}
|
|
10702
10787
|
/**
|
|
10703
10788
|
* Session event "session.mcp_server_status_changed". Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error.
|
|
10704
10789
|
*/
|
|
@@ -10743,6 +10828,84 @@ export interface McpServerStatusChangedData {
|
|
|
10743
10828
|
serverName: string;
|
|
10744
10829
|
status: McpServerStatus;
|
|
10745
10830
|
}
|
|
10831
|
+
/**
|
|
10832
|
+
* Session event "session.mcp_server_removed". Payload of `session.mcp_server_removed` identifying an MCP server the graph no longer runs.
|
|
10833
|
+
*/
|
|
10834
|
+
export interface McpServerRemovedEvent {
|
|
10835
|
+
/**
|
|
10836
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
10837
|
+
*/
|
|
10838
|
+
agentId?: string;
|
|
10839
|
+
data: McpServerRemovedData;
|
|
10840
|
+
/**
|
|
10841
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
10842
|
+
*/
|
|
10843
|
+
ephemeral: true;
|
|
10844
|
+
/**
|
|
10845
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
10846
|
+
*/
|
|
10847
|
+
id: string;
|
|
10848
|
+
/**
|
|
10849
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
10850
|
+
*/
|
|
10851
|
+
parentId: string | null;
|
|
10852
|
+
/**
|
|
10853
|
+
* ISO 8601 timestamp when the event was created
|
|
10854
|
+
*/
|
|
10855
|
+
timestamp: string;
|
|
10856
|
+
/**
|
|
10857
|
+
* Type discriminator. Always "session.mcp_server_removed".
|
|
10858
|
+
*/
|
|
10859
|
+
type: "session.mcp_server_removed";
|
|
10860
|
+
}
|
|
10861
|
+
/**
|
|
10862
|
+
* Payload of `session.mcp_server_removed` identifying an MCP server the graph no longer runs.
|
|
10863
|
+
*/
|
|
10864
|
+
export interface McpServerRemovedData {
|
|
10865
|
+
/**
|
|
10866
|
+
* Name of the MCP server that was removed from the graph
|
|
10867
|
+
*/
|
|
10868
|
+
serverName: string;
|
|
10869
|
+
}
|
|
10870
|
+
/**
|
|
10871
|
+
* Session event "session.mcp_server_needs_reconnect". Payload of `session.mcp_server_needs_reconnect` identifying an MCP server whose connection must be re-established.
|
|
10872
|
+
*/
|
|
10873
|
+
export interface McpServerNeedsReconnectEvent {
|
|
10874
|
+
/**
|
|
10875
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
10876
|
+
*/
|
|
10877
|
+
agentId?: string;
|
|
10878
|
+
data: McpServerNeedsReconnectData;
|
|
10879
|
+
/**
|
|
10880
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
10881
|
+
*/
|
|
10882
|
+
ephemeral: true;
|
|
10883
|
+
/**
|
|
10884
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
10885
|
+
*/
|
|
10886
|
+
id: string;
|
|
10887
|
+
/**
|
|
10888
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
10889
|
+
*/
|
|
10890
|
+
parentId: string | null;
|
|
10891
|
+
/**
|
|
10892
|
+
* ISO 8601 timestamp when the event was created
|
|
10893
|
+
*/
|
|
10894
|
+
timestamp: string;
|
|
10895
|
+
/**
|
|
10896
|
+
* Type discriminator. Always "session.mcp_server_needs_reconnect".
|
|
10897
|
+
*/
|
|
10898
|
+
type: "session.mcp_server_needs_reconnect";
|
|
10899
|
+
}
|
|
10900
|
+
/**
|
|
10901
|
+
* Payload of `session.mcp_server_needs_reconnect` identifying an MCP server whose connection must be re-established.
|
|
10902
|
+
*/
|
|
10903
|
+
export interface McpServerNeedsReconnectData {
|
|
10904
|
+
/**
|
|
10905
|
+
* Name of the MCP server that needs to reconnect
|
|
10906
|
+
*/
|
|
10907
|
+
serverName: string;
|
|
10908
|
+
}
|
|
10746
10909
|
/**
|
|
10747
10910
|
* Session event "mcp.tools.list_changed". Payload identifying the MCP server associated with a list change.
|
|
10748
10911
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export { defineFactory, FactoryResumeError, isFactoryRunTerminal } from "./facto
|
|
|
11
11
|
export { Canvas, CanvasError, createCanvas, type CanvasAction, type CanvasDeclaration, type CanvasHostContext, type CanvasHostContextCapabilities, type CanvasJsonSchema, type CanvasOptions, } from "./canvas.js";
|
|
12
12
|
export { defineTool, approveAll, createAttributedPermissionResult, convertMcpCallToolResult, createSessionFsAdapter, CopilotRequestHandler, CopilotWebSocketHandler, CopilotWebSocketCloseStatus, CopilotWebSocketForwarder, SessionFsSqliteTransactionFailure, SYSTEM_MESSAGE_SECTIONS, } from "./types.js";
|
|
13
13
|
export type * from "./generated/session-events.js";
|
|
14
|
-
export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientInfo, CopilotClientMode, CopilotClientOptions, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, FactoryLimits, FactoryMeta, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, MessageOptions, ManagedSettings, ManagedSettingsPermissions, ModelBilling, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, AutoTier, CapiSessionOptions, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, NamedProviderConfig, PermissionHandler, PermissionRequest, PermissionRequestedData, PermissionRequestedEvent, PermissionRequestResult, AttributedPermissionResult, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, PermissionResponseCapability, ProviderConfig, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, ResumeSessionConfig, 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";
|
|
14
|
+
export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientInfo, CopilotClientMode, CopilotClientOptions, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, FactoryLimits, FactoryMeta, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, MessageOptions, 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, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, ResumeSessionConfig, 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";
|
|
15
15
|
export type { RunOptions, ResumeOptions, FactoryResumeErrorCode, SessionFactoryApi, FactoryAgentOptions, FactoryContext, FactoryDefinition, FactoryHandle, FactoryJsonSchema, JsonValue, FactoryPipelineStage, FactoryStepOptions, FactoryRunResult, FactoryRunStatus, FactoryRunSummary, FactoryListRunsOptions, FactoryRunsPage, FactoryRunDetail, FactoryProgressPage, FactoryProgressLine, FactoryPhaseObservation, FactoryPhaseStatus, FactoryAgentSummary, } from "./factory.js";
|
package/dist/session.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createSessionRpc } from "./generated/rpc.js";
|
|
2
|
+
import type { ModelSwitchAutoTierResult } from "./generated/rpc.js";
|
|
2
3
|
import type { OpenCanvasInstance } from "./generated/rpc.js";
|
|
3
|
-
import type { MessageOptions, ContextTier, ReasoningEffort, ReasoningSummary, ModelCapabilitiesOverride, SessionCapabilities, SessionEvent, SessionEventHandler, SessionEventType, SessionUiApi, TypedSessionEventHandler } from "./types.js";
|
|
4
|
+
import type { MessageOptions, ContextTier, ReasoningEffort, ReasoningSummary, AutoTier, ModelCapabilitiesOverride, SessionCapabilities, SessionEvent, SessionEventHandler, SessionEventType, SessionUiApi, TypedSessionEventHandler } from "./types.js";
|
|
4
5
|
import { type SessionFactoryApi } from "./factory.js";
|
|
5
6
|
/** Assistant message event - the final response from the assistant. */
|
|
6
7
|
export type AssistantMessageEvent = Extract<SessionEvent, {
|
|
@@ -43,6 +44,7 @@ export declare class CopilotSession {
|
|
|
43
44
|
private eventHandlers;
|
|
44
45
|
private typedEventHandlers;
|
|
45
46
|
private toolHandlers;
|
|
47
|
+
private pendingExternalTools;
|
|
46
48
|
private canvases;
|
|
47
49
|
private bearerTokenProviders;
|
|
48
50
|
private commandHandlers;
|
|
@@ -62,6 +64,7 @@ export declare class CopilotSession {
|
|
|
62
64
|
private _capabilities;
|
|
63
65
|
private openCanvasInstances;
|
|
64
66
|
private disconnected;
|
|
67
|
+
private disconnecting;
|
|
65
68
|
private onDisconnected?;
|
|
66
69
|
/**
|
|
67
70
|
* Friendly factory API for running registered factories by name or handle.
|
|
@@ -212,6 +215,7 @@ export declare class CopilotSession {
|
|
|
212
215
|
private removeOpenCanvasFromEvent;
|
|
213
216
|
private removeOpenCanvas;
|
|
214
217
|
private upsertOpenCanvas;
|
|
218
|
+
private _claimExternalTool;
|
|
215
219
|
/**
|
|
216
220
|
* Snapshot of canvas instances currently known to be open for this session.
|
|
217
221
|
* Populated from the `session.resume` response and live `session.canvas.opened`
|
|
@@ -300,6 +304,9 @@ export declare class CopilotSession {
|
|
|
300
304
|
* ```typescript
|
|
301
305
|
* await session.setModel("gpt-5.4");
|
|
302
306
|
* await session.setModel("claude-sonnet-4.6", { reasoningEffort: "high" });
|
|
307
|
+
*
|
|
308
|
+
* // Select the Auto model and its routing preference in one call.
|
|
309
|
+
* await session.setModel("auto", { autoTier: "intelligence" });
|
|
303
310
|
* ```
|
|
304
311
|
*/
|
|
305
312
|
setModel(model: string, options?: {
|
|
@@ -307,7 +314,51 @@ export declare class CopilotSession {
|
|
|
307
314
|
reasoningSummary?: ReasoningSummary;
|
|
308
315
|
contextTier?: ContextTier;
|
|
309
316
|
modelCapabilities?: ModelCapabilitiesOverride;
|
|
317
|
+
/**
|
|
318
|
+
* Routing preference to apply when `model` is `auto`.
|
|
319
|
+
*
|
|
320
|
+
* Pass `null` to return to the provider's default Auto routing. The
|
|
321
|
+
* runtime rejects this option when `model` is anything other than
|
|
322
|
+
* `auto`; use {@link setAutoTier} to change the preference without
|
|
323
|
+
* changing the selected model.
|
|
324
|
+
*
|
|
325
|
+
* @experimental Part of an experimental Auto routing surface and may
|
|
326
|
+
* change or be removed in a future release.
|
|
327
|
+
*/
|
|
328
|
+
autoTier?: AutoTier | null;
|
|
310
329
|
}): Promise<void>;
|
|
330
|
+
/**
|
|
331
|
+
* Change the Auto routing preference without changing the selected model.
|
|
332
|
+
*
|
|
333
|
+
* The runtime does not apply the preference immediately. It records the
|
|
334
|
+
* request and commits it only when a later user turn using the `auto` model
|
|
335
|
+
* successfully obtains a usable model from the provider. A `pending` status
|
|
336
|
+
* therefore confirms that the request was accepted, not that it took effect.
|
|
337
|
+
*
|
|
338
|
+
* Watch for the outcome through the `session.model_change` event on success,
|
|
339
|
+
* or the ephemeral `session.auto_tier_switch_failed` event on failure. You
|
|
340
|
+
* can also read the current committed and in-flight state at any time with
|
|
341
|
+
* `session.rpc.model.getCurrent()`.
|
|
342
|
+
*
|
|
343
|
+
* Only the most recent request survives: issuing a new request replaces any
|
|
344
|
+
* earlier one that has not yet been claimed by a turn.
|
|
345
|
+
*
|
|
346
|
+
* @param autoTier - Routing preference to activate, or `null` to return to
|
|
347
|
+
* the provider's default Auto routing
|
|
348
|
+
* @returns The runtime's immediate acknowledgement and Auto preference snapshot
|
|
349
|
+
*
|
|
350
|
+
* @experimental Part of an experimental Auto routing surface and may change
|
|
351
|
+
* or be removed in a future release.
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
* ```typescript
|
|
355
|
+
* const result = await session.setAutoTier("intelligence");
|
|
356
|
+
* if (result.status === "pending") {
|
|
357
|
+
* // Takes effect on a later turn that uses the `auto` model.
|
|
358
|
+
* }
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
setAutoTier(autoTier: AutoTier | null): Promise<ModelSwitchAutoTierResult>;
|
|
311
362
|
/**
|
|
312
363
|
* Log a message to the session timeline.
|
|
313
364
|
* The message appears in the session event stream and is visible to SDK consumers
|