@github/copilot-sdk-win32-x64 1.0.17-preview.0 → 1.0.17-preview.2
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/copilot-sdk/extension.js +251 -226
- package/copilot-sdk/generated/rpc.d.ts +300 -9
- package/copilot-sdk/generated/session-events.d.ts +10 -0
- package/copilot-sdk/index.js +251 -226
- package/package.json +1 -1
- package/prebuilds/win32-x64/OneAuthInterop.dll +0 -0
- package/prebuilds/win32-x64/copilot-runtime.exe +0 -0
- package/prebuilds/win32-x64/runtime.node +2 -2
- package/ripgrep/bin/win32-x64/rg.exe +0 -0
- package/schemas/api.schema.json +466 -9
- package/schemas/session-events.schema.json +18 -0
- package/tgrep/bin/win32-x64/tgrep.exe +0 -0
package/copilot-sdk/extension.js
CHANGED
|
@@ -5102,7 +5102,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5102
5102
|
*
|
|
5103
5103
|
* @experimental
|
|
5104
5104
|
*/
|
|
5105
|
-
send: async (params) => connection.sendRequest("session.send", {
|
|
5105
|
+
send: async (params) => connection.sendRequest("session.send", { ...params, sessionId }),
|
|
5106
5106
|
/**
|
|
5107
5107
|
* Sends zero or more user messages to the session in a single turn and returns their message IDs. All provided messages are appended to the conversation in order, then exactly one agent turn runs over the resulting history. When the list is empty, one turn runs over the existing history with no new user message. Remote-backed (Mission Control) sessions do not support this method and will return an error.
|
|
5108
5108
|
*
|
|
@@ -5112,7 +5112,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5112
5112
|
*
|
|
5113
5113
|
* @experimental
|
|
5114
5114
|
*/
|
|
5115
|
-
sendMessages: async (params) => connection.sendRequest("session.sendMessages", {
|
|
5115
|
+
sendMessages: async (params) => connection.sendRequest("session.sendMessages", { ...params, sessionId }),
|
|
5116
5116
|
/** @experimental */
|
|
5117
5117
|
sandbox: {
|
|
5118
5118
|
/**
|
|
@@ -5128,7 +5128,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5128
5128
|
*
|
|
5129
5129
|
* @returns Result of attempting to disable sandboxing for the current session.
|
|
5130
5130
|
*/
|
|
5131
|
-
disableForSession: async (params) => connection.sendRequest("session.sandbox.disableForSession", {
|
|
5131
|
+
disableForSession: async (params) => connection.sendRequest("session.sandbox.disableForSession", { ...params, sessionId }),
|
|
5132
5132
|
/**
|
|
5133
5133
|
* Adds the path offered by a pending sandbox escalation permission request's sandboxPathGrant to the session's sandbox policy and approves the request, so the blocked operation re-runs inside the sandbox rather than outside it. The request is rejected unless the exact request is still pending, carries a sandboxPathGrant, and the grant still takes effect under the current managed policy. Does not persist the path; hosts that store sandbox settings save it themselves.
|
|
5134
5134
|
*
|
|
@@ -5136,7 +5136,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5136
5136
|
*
|
|
5137
5137
|
* @returns Result of accepting a sandbox path grant.
|
|
5138
5138
|
*/
|
|
5139
|
-
grantPathForRequest: async (params) => connection.sendRequest("session.sandbox.grantPathForRequest", {
|
|
5139
|
+
grantPathForRequest: async (params) => connection.sendRequest("session.sandbox.grantPathForRequest", { ...params, sessionId })
|
|
5140
5140
|
},
|
|
5141
5141
|
/**
|
|
5142
5142
|
* Aborts the current agent turn.
|
|
@@ -5147,7 +5147,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5147
5147
|
*
|
|
5148
5148
|
* @experimental
|
|
5149
5149
|
*/
|
|
5150
|
-
abort: async (params) => connection.sendRequest("session.abort", {
|
|
5150
|
+
abort: async (params) => connection.sendRequest("session.abort", { ...params, sessionId }),
|
|
5151
5151
|
/**
|
|
5152
5152
|
* Interrupts the current main agent turn while leaving running background work (subagents, sidekicks, and promoted attached shells) alive. No-op when the main loop is not processing.
|
|
5153
5153
|
*
|
|
@@ -5157,7 +5157,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5157
5157
|
*
|
|
5158
5158
|
* @experimental
|
|
5159
5159
|
*/
|
|
5160
|
-
interruptMainTurn: async (params) => connection.sendRequest("session.interruptMainTurn", {
|
|
5160
|
+
interruptMainTurn: async (params) => connection.sendRequest("session.interruptMainTurn", { ...params, sessionId }),
|
|
5161
5161
|
/**
|
|
5162
5162
|
* Cancels every running background agent (task-registry subagents plus sidekick agents) without interrupting the main agent loop. Promoted attached shells are left running.
|
|
5163
5163
|
*
|
|
@@ -5173,7 +5173,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5173
5173
|
*
|
|
5174
5174
|
* @experimental
|
|
5175
5175
|
*/
|
|
5176
|
-
shutdown: async (params) => connection.sendRequest("session.shutdown", {
|
|
5176
|
+
shutdown: async (params) => connection.sendRequest("session.shutdown", { ...params, sessionId }),
|
|
5177
5177
|
/** @experimental */
|
|
5178
5178
|
gitHubAuth: {
|
|
5179
5179
|
/**
|
|
@@ -5189,7 +5189,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5189
5189
|
*
|
|
5190
5190
|
* @returns Indicates whether the credential update succeeded.
|
|
5191
5191
|
*/
|
|
5192
|
-
setCredentials: async (params) => connection.sendRequest("session.gitHubAuth.setCredentials", {
|
|
5192
|
+
setCredentials: async (params) => connection.sendRequest("session.gitHubAuth.setCredentials", { ...params, sessionId })
|
|
5193
5193
|
},
|
|
5194
5194
|
/** @experimental */
|
|
5195
5195
|
accounts: {
|
|
@@ -5200,7 +5200,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5200
5200
|
*
|
|
5201
5201
|
* @returns The enumerated collection, keyed by the same selector as the query.
|
|
5202
5202
|
*/
|
|
5203
|
-
enumerate: async (params) => connection.sendRequest("session.accounts.enumerate", {
|
|
5203
|
+
enumerate: async (params) => connection.sendRequest("session.accounts.enumerate", { ...params, sessionId }),
|
|
5204
5204
|
/**
|
|
5205
5205
|
* Read one typed accounts datum: the active account, a neutral status summary, or the last authentication errors.
|
|
5206
5206
|
*
|
|
@@ -5208,7 +5208,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5208
5208
|
*
|
|
5209
5209
|
* @returns The read result, keyed by the same selector as the query.
|
|
5210
5210
|
*/
|
|
5211
|
-
get: async (params) => connection.sendRequest("session.accounts.get", {
|
|
5211
|
+
get: async (params) => connection.sendRequest("session.accounts.get", { ...params, sessionId }),
|
|
5212
5212
|
/**
|
|
5213
5213
|
* Apply one non-interactive accounts mutation: switch the active account, log an account out, or set credentials from a token.
|
|
5214
5214
|
*
|
|
@@ -5216,7 +5216,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5216
5216
|
*
|
|
5217
5217
|
* @returns Result of a non-interactive accounts mutation.
|
|
5218
5218
|
*/
|
|
5219
|
-
set: async (params) => connection.sendRequest("session.accounts.set", {
|
|
5219
|
+
set: async (params) => connection.sendRequest("session.accounts.set", { ...params, sessionId }),
|
|
5220
5220
|
/** @experimental */
|
|
5221
5221
|
login: {
|
|
5222
5222
|
/**
|
|
@@ -5226,7 +5226,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5226
5226
|
*
|
|
5227
5227
|
* @returns A started login flow: its opaque id and first step.
|
|
5228
5228
|
*/
|
|
5229
|
-
begin: async (params) => connection.sendRequest("session.accounts.login.begin", {
|
|
5229
|
+
begin: async (params) => connection.sendRequest("session.accounts.login.begin", { ...params, sessionId }),
|
|
5230
5230
|
/**
|
|
5231
5231
|
* Advance an in-flight login flow, optionally fulfilling an input-required step, and return the next step.
|
|
5232
5232
|
*
|
|
@@ -5234,13 +5234,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5234
5234
|
*
|
|
5235
5235
|
* @returns One step in an interactive login flow. The consumer acts on the step and calls advance to proceed. Browser-open is encoded as two distinct steps by design: `open-url` is CONSUMER-driven (the provider surfaces the authorize URL and the consumer opens it — github.com/GHEC web), while `needs-interaction` is PROVIDER-driven (the provider opens the browser or broker UI itself and does not surface a URL — Entra).
|
|
5236
5236
|
*/
|
|
5237
|
-
advance: async (params) => connection.sendRequest("session.accounts.login.advance", {
|
|
5237
|
+
advance: async (params) => connection.sendRequest("session.accounts.login.advance", { ...params, sessionId }),
|
|
5238
5238
|
/**
|
|
5239
5239
|
* Cancel an in-flight login flow and release its resources.
|
|
5240
5240
|
*
|
|
5241
5241
|
* @param params Cancel an in-flight login flow.
|
|
5242
5242
|
*/
|
|
5243
|
-
cancel: async (params) => connection.sendRequest("session.accounts.login.cancel", {
|
|
5243
|
+
cancel: async (params) => connection.sendRequest("session.accounts.login.cancel", { ...params, sessionId })
|
|
5244
5244
|
}
|
|
5245
5245
|
},
|
|
5246
5246
|
/** @experimental */
|
|
@@ -5252,7 +5252,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5252
5252
|
*
|
|
5253
5253
|
* @returns Result of collecting a session debug bundle.
|
|
5254
5254
|
*/
|
|
5255
|
-
collectLogs: async (params) => connection.sendRequest("session.debug.collectLogs", {
|
|
5255
|
+
collectLogs: async (params) => connection.sendRequest("session.debug.collectLogs", { ...params, sessionId })
|
|
5256
5256
|
},
|
|
5257
5257
|
/** @experimental */
|
|
5258
5258
|
canvas: {
|
|
@@ -5275,13 +5275,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5275
5275
|
*
|
|
5276
5276
|
* @returns Open canvas instance snapshot.
|
|
5277
5277
|
*/
|
|
5278
|
-
open: async (params) => connection.sendRequest("session.canvas.open", {
|
|
5278
|
+
open: async (params) => connection.sendRequest("session.canvas.open", { ...params, sessionId }),
|
|
5279
5279
|
/**
|
|
5280
5280
|
* Closes an open canvas instance.
|
|
5281
5281
|
*
|
|
5282
5282
|
* @param params Canvas close parameters.
|
|
5283
5283
|
*/
|
|
5284
|
-
close: async (params) => connection.sendRequest("session.canvas.close", {
|
|
5284
|
+
close: async (params) => connection.sendRequest("session.canvas.close", { ...params, sessionId }),
|
|
5285
5285
|
/** @experimental */
|
|
5286
5286
|
action: {
|
|
5287
5287
|
/**
|
|
@@ -5291,7 +5291,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5291
5291
|
*
|
|
5292
5292
|
* @returns Canvas action invocation result.
|
|
5293
5293
|
*/
|
|
5294
|
-
invoke: async (params) => connection.sendRequest("session.canvas.action.invoke", {
|
|
5294
|
+
invoke: async (params) => connection.sendRequest("session.canvas.action.invoke", { ...params, sessionId })
|
|
5295
5295
|
}
|
|
5296
5296
|
},
|
|
5297
5297
|
/** @experimental */
|
|
@@ -5303,7 +5303,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5303
5303
|
*
|
|
5304
5304
|
* @returns Complete current or terminal workflow run envelope.
|
|
5305
5305
|
*/
|
|
5306
|
-
run: async (params) => connection.sendRequest("session.workflow.run", {
|
|
5306
|
+
run: async (params) => connection.sendRequest("session.workflow.run", { ...params, sessionId }),
|
|
5307
5307
|
/**
|
|
5308
5308
|
* Resumes a dynamic workflow run using its persisted name, arguments, journal, and accounting.
|
|
5309
5309
|
*
|
|
@@ -5311,7 +5311,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5311
5311
|
*
|
|
5312
5312
|
* @returns Resolved persisted workflow identity and resumed run envelope.
|
|
5313
5313
|
*/
|
|
5314
|
-
resume: async (params) => connection.sendRequest("session.workflow.resume", {
|
|
5314
|
+
resume: async (params) => connection.sendRequest("session.workflow.resume", { ...params, sessionId }),
|
|
5315
5315
|
/**
|
|
5316
5316
|
* Gets the current or settled envelope for a dynamic workflow run.
|
|
5317
5317
|
*
|
|
@@ -5319,7 +5319,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5319
5319
|
*
|
|
5320
5320
|
* @returns Complete current or terminal workflow run envelope.
|
|
5321
5321
|
*/
|
|
5322
|
-
getRun: async (params) => connection.sendRequest("session.workflow.getRun", {
|
|
5322
|
+
getRun: async (params) => connection.sendRequest("session.workflow.getRun", { ...params, sessionId }),
|
|
5323
5323
|
/**
|
|
5324
5324
|
* Lists durable dynamic workflow runs for this session in creation order.
|
|
5325
5325
|
*
|
|
@@ -5327,7 +5327,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5327
5327
|
*
|
|
5328
5328
|
* @returns A page of workflow runs in durable creation order.
|
|
5329
5329
|
*/
|
|
5330
|
-
listRuns: async (params) => connection.sendRequest("session.workflow.listRuns", {
|
|
5330
|
+
listRuns: async (params) => connection.sendRequest("session.workflow.listRuns", { ...params, sessionId }),
|
|
5331
5331
|
/**
|
|
5332
5332
|
* Gets durable and live observability detail for one dynamic workflow run.
|
|
5333
5333
|
*
|
|
@@ -5335,7 +5335,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5335
5335
|
*
|
|
5336
5336
|
* @returns Full workflow run observability detail.
|
|
5337
5337
|
*/
|
|
5338
|
-
getRunDetail: async (params) => connection.sendRequest("session.workflow.getRunDetail", {
|
|
5338
|
+
getRunDetail: async (params) => connection.sendRequest("session.workflow.getRunDetail", { ...params, sessionId }),
|
|
5339
5339
|
/**
|
|
5340
5340
|
* Pages durable progress for one dynamic workflow run.
|
|
5341
5341
|
*
|
|
@@ -5343,7 +5343,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5343
5343
|
*
|
|
5344
5344
|
* @returns A bidirectional page of workflow progress.
|
|
5345
5345
|
*/
|
|
5346
|
-
getRunProgress: async (params) => connection.sendRequest("session.workflow.getRunProgress", {
|
|
5346
|
+
getRunProgress: async (params) => connection.sendRequest("session.workflow.getRunProgress", { ...params, sessionId }),
|
|
5347
5347
|
/**
|
|
5348
5348
|
* Requests cancellation of a dynamic workflow run and returns its run envelope.
|
|
5349
5349
|
*
|
|
@@ -5351,7 +5351,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5351
5351
|
*
|
|
5352
5352
|
* @returns Complete current or terminal workflow run envelope.
|
|
5353
5353
|
*/
|
|
5354
|
-
cancel: async (params) => connection.sendRequest("session.workflow.cancel", {
|
|
5354
|
+
cancel: async (params) => connection.sendRequest("session.workflow.cancel", { ...params, sessionId }),
|
|
5355
5355
|
/**
|
|
5356
5356
|
* Pauses a running dynamic workflow and returns its settled run envelope.
|
|
5357
5357
|
*
|
|
@@ -5359,7 +5359,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5359
5359
|
*
|
|
5360
5360
|
* @returns Complete current or terminal workflow run envelope.
|
|
5361
5361
|
*/
|
|
5362
|
-
pause: async (params) => connection.sendRequest("session.workflow.pause", {
|
|
5362
|
+
pause: async (params) => connection.sendRequest("session.workflow.pause", { ...params, sessionId }),
|
|
5363
5363
|
/**
|
|
5364
5364
|
* Records a batch of ordered dynamic workflow progress lines.
|
|
5365
5365
|
*
|
|
@@ -5367,7 +5367,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5367
5367
|
*
|
|
5368
5368
|
* @returns Acknowledgement that a workflow request was accepted.
|
|
5369
5369
|
*/
|
|
5370
|
-
log: async (params) => connection.sendRequest("session.workflow.log", {
|
|
5370
|
+
log: async (params) => connection.sendRequest("session.workflow.log", { ...params, sessionId }),
|
|
5371
5371
|
/**
|
|
5372
5372
|
* Runs one dynamic-workflow-scoped subagent and returns its result.
|
|
5373
5373
|
*
|
|
@@ -5375,7 +5375,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5375
5375
|
*
|
|
5376
5376
|
* @returns Result of one workflow-scoped subagent call.
|
|
5377
5377
|
*/
|
|
5378
|
-
agent: async (params) => connection.sendRequest("session.workflow.agent", {
|
|
5378
|
+
agent: async (params) => connection.sendRequest("session.workflow.agent", { ...params, sessionId }),
|
|
5379
5379
|
/** @experimental */
|
|
5380
5380
|
journal: {
|
|
5381
5381
|
/**
|
|
@@ -5385,7 +5385,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5385
5385
|
*
|
|
5386
5386
|
* @returns Result of reading a workflow journal entry.
|
|
5387
5387
|
*/
|
|
5388
|
-
get: async (params) => connection.sendRequest("session.workflow.journal.get", {
|
|
5388
|
+
get: async (params) => connection.sendRequest("session.workflow.journal.get", { ...params, sessionId }),
|
|
5389
5389
|
/**
|
|
5390
5390
|
* Stores a memoized dynamic workflow journal entry.
|
|
5391
5391
|
*
|
|
@@ -5393,7 +5393,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5393
5393
|
*
|
|
5394
5394
|
* @returns Acknowledgement that a workflow request was accepted.
|
|
5395
5395
|
*/
|
|
5396
|
-
put: async (params) => connection.sendRequest("session.workflow.journal.put", {
|
|
5396
|
+
put: async (params) => connection.sendRequest("session.workflow.journal.put", { ...params, sessionId })
|
|
5397
5397
|
}
|
|
5398
5398
|
},
|
|
5399
5399
|
/** @experimental */
|
|
@@ -5411,7 +5411,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5411
5411
|
*
|
|
5412
5412
|
* @returns The model identifier active on the session after the switch.
|
|
5413
5413
|
*/
|
|
5414
|
-
switchTo: async (params) => connection.sendRequest("session.model.switchTo", {
|
|
5414
|
+
switchTo: async (params) => connection.sendRequest("session.model.switchTo", { ...params, sessionId }),
|
|
5415
5415
|
/**
|
|
5416
5416
|
* 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`.
|
|
5417
5417
|
*
|
|
@@ -5419,7 +5419,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5419
5419
|
*
|
|
5420
5420
|
* @returns Immediate acknowledgement and Auto preference snapshot after a switch request. This result never implies that a pending preference committed.
|
|
5421
5421
|
*/
|
|
5422
|
-
switchAutoTier: async (params) => connection.sendRequest("session.model.switchAutoTier", {
|
|
5422
|
+
switchAutoTier: async (params) => connection.sendRequest("session.model.switchAutoTier", { ...params, sessionId }),
|
|
5423
5423
|
/**
|
|
5424
5424
|
* Replaces or clears the host-supplied model allowlist for a running session.
|
|
5425
5425
|
*
|
|
@@ -5427,7 +5427,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5427
5427
|
*
|
|
5428
5428
|
* @returns The applied host allowlist and effective session model policy after intersection.
|
|
5429
5429
|
*/
|
|
5430
|
-
setAllowedModels: async (params) => connection.sendRequest("session.model.setAllowedModels", {
|
|
5430
|
+
setAllowedModels: async (params) => connection.sendRequest("session.model.setAllowedModels", { ...params, sessionId }),
|
|
5431
5431
|
/**
|
|
5432
5432
|
* Updates the session's reasoning effort without changing the selected model.
|
|
5433
5433
|
*
|
|
@@ -5435,7 +5435,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5435
5435
|
*
|
|
5436
5436
|
* @returns Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns.
|
|
5437
5437
|
*/
|
|
5438
|
-
setReasoningEffort: async (params) => connection.sendRequest("session.model.setReasoningEffort", {
|
|
5438
|
+
setReasoningEffort: async (params) => connection.sendRequest("session.model.setReasoningEffort", { ...params, sessionId }),
|
|
5439
5439
|
/**
|
|
5440
5440
|
* Lists models available to this session using its own auth and integration context. Connected hosts (CLI TUI, GitHub App) should call this through the session client so remote sessions return the remote CLI's available models rather than the caller's.
|
|
5441
5441
|
*
|
|
@@ -5443,7 +5443,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5443
5443
|
*
|
|
5444
5444
|
* @returns The list of models available to this session.
|
|
5445
5445
|
*/
|
|
5446
|
-
list: async (params) => connection.sendRequest("session.model.list", {
|
|
5446
|
+
list: async (params) => connection.sendRequest("session.model.list", { ...params, sessionId })
|
|
5447
5447
|
},
|
|
5448
5448
|
/** @experimental */
|
|
5449
5449
|
mode: {
|
|
@@ -5460,7 +5460,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5460
5460
|
*
|
|
5461
5461
|
* @returns Outcome of a session mode change, including any model switch it triggered and follow-up the host must perform.
|
|
5462
5462
|
*/
|
|
5463
|
-
set: async (params) => connection.sendRequest("session.mode.set", {
|
|
5463
|
+
set: async (params) => connection.sendRequest("session.mode.set", { ...params, sessionId })
|
|
5464
5464
|
},
|
|
5465
5465
|
/** @experimental */
|
|
5466
5466
|
name: {
|
|
@@ -5475,7 +5475,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5475
5475
|
*
|
|
5476
5476
|
* @param params New friendly name to apply to the session.
|
|
5477
5477
|
*/
|
|
5478
|
-
set: async (params) => connection.sendRequest("session.name.set", {
|
|
5478
|
+
set: async (params) => connection.sendRequest("session.name.set", { ...params, sessionId }),
|
|
5479
5479
|
/**
|
|
5480
5480
|
* Persists an auto-generated session summary as the session's name when no user-set name exists.
|
|
5481
5481
|
*
|
|
@@ -5483,7 +5483,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5483
5483
|
*
|
|
5484
5484
|
* @returns Indicates whether the auto-generated summary was applied as the session's name.
|
|
5485
5485
|
*/
|
|
5486
|
-
setAuto: async (params) => connection.sendRequest("session.name.setAuto", {
|
|
5486
|
+
setAuto: async (params) => connection.sendRequest("session.name.setAuto", { ...params, sessionId })
|
|
5487
5487
|
},
|
|
5488
5488
|
/** @experimental */
|
|
5489
5489
|
plan: {
|
|
@@ -5498,7 +5498,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5498
5498
|
*
|
|
5499
5499
|
* @param params Replacement contents to write to the session plan file.
|
|
5500
5500
|
*/
|
|
5501
|
-
update: async (params) => connection.sendRequest("session.plan.update", {
|
|
5501
|
+
update: async (params) => connection.sendRequest("session.plan.update", { ...params, sessionId }),
|
|
5502
5502
|
/**
|
|
5503
5503
|
* Deletes the session plan file from the workspace.
|
|
5504
5504
|
*/
|
|
@@ -5531,7 +5531,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5531
5531
|
*
|
|
5532
5532
|
* @returns Current workspace metadata for the session, including its absolute filesystem path when available.
|
|
5533
5533
|
*/
|
|
5534
|
-
updateMetadata: async (params) => connection.sendRequest("session.workspaces.updateMetadata", {
|
|
5534
|
+
updateMetadata: async (params) => connection.sendRequest("session.workspaces.updateMetadata", { ...params, sessionId }),
|
|
5535
5535
|
/**
|
|
5536
5536
|
* Ensures a local session workspace exists and returns it.
|
|
5537
5537
|
*
|
|
@@ -5539,7 +5539,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5539
5539
|
*
|
|
5540
5540
|
* @returns Current workspace metadata for the session, including its absolute filesystem path when available.
|
|
5541
5541
|
*/
|
|
5542
|
-
ensure: async (params) => connection.sendRequest("session.workspaces.ensure", {
|
|
5542
|
+
ensure: async (params) => connection.sendRequest("session.workspaces.ensure", { ...params, sessionId }),
|
|
5543
5543
|
/**
|
|
5544
5544
|
* Lists files stored in the session workspace files directory.
|
|
5545
5545
|
*
|
|
@@ -5553,13 +5553,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5553
5553
|
*
|
|
5554
5554
|
* @returns Contents of the requested workspace file as a UTF-8 string.
|
|
5555
5555
|
*/
|
|
5556
|
-
readFile: async (params) => connection.sendRequest("session.workspaces.readFile", {
|
|
5556
|
+
readFile: async (params) => connection.sendRequest("session.workspaces.readFile", { ...params, sessionId }),
|
|
5557
5557
|
/**
|
|
5558
5558
|
* Creates or overwrites a file in the session workspace files directory.
|
|
5559
5559
|
*
|
|
5560
5560
|
* @param params Relative path and UTF-8 content for the workspace file to create or overwrite.
|
|
5561
5561
|
*/
|
|
5562
|
-
createFile: async (params) => connection.sendRequest("session.workspaces.createFile", {
|
|
5562
|
+
createFile: async (params) => connection.sendRequest("session.workspaces.createFile", { ...params, sessionId }),
|
|
5563
5563
|
/**
|
|
5564
5564
|
* Returns metadata for a file or directory in the session workspace files directory.
|
|
5565
5565
|
*
|
|
@@ -5567,25 +5567,25 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5567
5567
|
*
|
|
5568
5568
|
* @returns Filesystem metadata for a path in the session workspace files directory.
|
|
5569
5569
|
*/
|
|
5570
|
-
statFile: async (params) => connection.sendRequest("session.workspaces.statFile", {
|
|
5570
|
+
statFile: async (params) => connection.sendRequest("session.workspaces.statFile", { ...params, sessionId }),
|
|
5571
5571
|
/**
|
|
5572
5572
|
* Creates a directory in the session workspace files directory.
|
|
5573
5573
|
*
|
|
5574
5574
|
* @param params Directory to create within the session workspace files directory.
|
|
5575
5575
|
*/
|
|
5576
|
-
createDirectory: async (params) => connection.sendRequest("session.workspaces.createDirectory", {
|
|
5576
|
+
createDirectory: async (params) => connection.sendRequest("session.workspaces.createDirectory", { ...params, sessionId }),
|
|
5577
5577
|
/**
|
|
5578
5578
|
* Removes a file or directory from the session workspace files directory.
|
|
5579
5579
|
*
|
|
5580
5580
|
* @param params File or directory to remove from the session workspace files directory.
|
|
5581
5581
|
*/
|
|
5582
|
-
removePath: async (params) => connection.sendRequest("session.workspaces.removePath", {
|
|
5582
|
+
removePath: async (params) => connection.sendRequest("session.workspaces.removePath", { ...params, sessionId }),
|
|
5583
5583
|
/**
|
|
5584
5584
|
* Renames a file or directory within the session workspace files directory.
|
|
5585
5585
|
*
|
|
5586
5586
|
* @param params Source and destination paths for a rename within the session workspace files directory.
|
|
5587
5587
|
*/
|
|
5588
|
-
renamePath: async (params) => connection.sendRequest("session.workspaces.renamePath", {
|
|
5588
|
+
renamePath: async (params) => connection.sendRequest("session.workspaces.renamePath", { ...params, sessionId }),
|
|
5589
5589
|
/**
|
|
5590
5590
|
* Lists workspace checkpoints in chronological order.
|
|
5591
5591
|
*
|
|
@@ -5599,7 +5599,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5599
5599
|
*
|
|
5600
5600
|
* @returns Checkpoint content as a UTF-8 string, or null when the checkpoint or workspace is missing.
|
|
5601
5601
|
*/
|
|
5602
|
-
readCheckpoint: async (params) => connection.sendRequest("session.workspaces.readCheckpoint", {
|
|
5602
|
+
readCheckpoint: async (params) => connection.sendRequest("session.workspaces.readCheckpoint", { ...params, sessionId }),
|
|
5603
5603
|
/**
|
|
5604
5604
|
* Adds a compaction summary checkpoint to the local session workspace.
|
|
5605
5605
|
*
|
|
@@ -5607,7 +5607,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5607
5607
|
*
|
|
5608
5608
|
* @returns Persisted summary metadata and refreshed workspace metadata.
|
|
5609
5609
|
*/
|
|
5610
|
-
addSummary: async (params) => connection.sendRequest("session.workspaces.addSummary", {
|
|
5610
|
+
addSummary: async (params) => connection.sendRequest("session.workspaces.addSummary", { ...params, sessionId }),
|
|
5611
5611
|
/**
|
|
5612
5612
|
* Truncates local workspace compaction summaries after a rollback.
|
|
5613
5613
|
*
|
|
@@ -5615,7 +5615,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5615
5615
|
*
|
|
5616
5616
|
* @returns Current workspace metadata for the session, including its absolute filesystem path when available.
|
|
5617
5617
|
*/
|
|
5618
|
-
truncateSummaries: async (params) => connection.sendRequest("session.workspaces.truncateSummaries", {
|
|
5618
|
+
truncateSummaries: async (params) => connection.sendRequest("session.workspaces.truncateSummaries", { ...params, sessionId }),
|
|
5619
5619
|
/**
|
|
5620
5620
|
* Reads the autopilot objective state file from the local session workspace.
|
|
5621
5621
|
*
|
|
@@ -5629,7 +5629,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5629
5629
|
*
|
|
5630
5630
|
* @returns Result of writing the autopilot objective file.
|
|
5631
5631
|
*/
|
|
5632
|
-
writeAutopilotObjective: async (params) => connection.sendRequest("session.workspaces.writeAutopilotObjective", {
|
|
5632
|
+
writeAutopilotObjective: async (params) => connection.sendRequest("session.workspaces.writeAutopilotObjective", { ...params, sessionId }),
|
|
5633
5633
|
/**
|
|
5634
5634
|
* Deletes the autopilot objective state file from the local session workspace.
|
|
5635
5635
|
*
|
|
@@ -5649,7 +5649,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5649
5649
|
*
|
|
5650
5650
|
* @returns Descriptor for the saved paste file, or null when the workspace is unavailable.
|
|
5651
5651
|
*/
|
|
5652
|
-
saveLargePaste: async (params) => connection.sendRequest("session.workspaces.saveLargePaste", {
|
|
5652
|
+
saveLargePaste: async (params) => connection.sendRequest("session.workspaces.saveLargePaste", { ...params, sessionId }),
|
|
5653
5653
|
/**
|
|
5654
5654
|
* Computes a diff for the session workspace. Never rejects for a busy session: a `session`-mode diff that cannot read the session's file-change captures falls back to an unstaged git diff with `isFallback: true` and reports why in `unavailableReason`.
|
|
5655
5655
|
*
|
|
@@ -5657,7 +5657,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5657
5657
|
*
|
|
5658
5658
|
* @returns Workspace diff result for the requested mode.
|
|
5659
5659
|
*/
|
|
5660
|
-
diff: async (params) => connection.sendRequest("session.workspaces.diff", {
|
|
5660
|
+
diff: async (params) => connection.sendRequest("session.workspaces.diff", { ...params, sessionId })
|
|
5661
5661
|
},
|
|
5662
5662
|
/** @experimental */
|
|
5663
5663
|
autopilotObjective: {
|
|
@@ -5683,7 +5683,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5683
5683
|
*
|
|
5684
5684
|
* @returns Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
|
|
5685
5685
|
*/
|
|
5686
|
-
request: async (params) => connection.sendRequest("session.completions.request", {
|
|
5686
|
+
request: async (params) => connection.sendRequest("session.completions.request", { ...params, sessionId })
|
|
5687
5687
|
},
|
|
5688
5688
|
/** @experimental */
|
|
5689
5689
|
instructions: {
|
|
@@ -5716,7 +5716,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5716
5716
|
*
|
|
5717
5717
|
* @returns Indicates whether fleet mode was successfully activated.
|
|
5718
5718
|
*/
|
|
5719
|
-
start: async (params) => connection.sendRequest("session.fleet.start", {
|
|
5719
|
+
start: async (params) => connection.sendRequest("session.fleet.start", { ...params, sessionId })
|
|
5720
5720
|
},
|
|
5721
5721
|
/** @experimental */
|
|
5722
5722
|
agent: {
|
|
@@ -5727,13 +5727,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5727
5727
|
*
|
|
5728
5728
|
* @returns Agents available to the session.
|
|
5729
5729
|
*/
|
|
5730
|
-
list: async (params) => connection.sendRequest("session.agent.list", {
|
|
5730
|
+
list: async (params) => connection.sendRequest("session.agent.list", { ...params, sessionId }),
|
|
5731
5731
|
/**
|
|
5732
5732
|
* Sets an in-memory authored prompt override for an available agent. For built-in agents, this replaces only the static base prompt while preserving runtime-owned dynamic prompt composition and behavior. The special `general-purpose` agent is not overrideable. Overrides are not persisted; resumed and forked sessions start without them, so the host must re-apply them.
|
|
5733
5733
|
*
|
|
5734
5734
|
* @param params An in-memory authored prompt override for an available agent.
|
|
5735
5735
|
*/
|
|
5736
|
-
setPrompt: async (params) => connection.sendRequest("session.agent.setPrompt", {
|
|
5736
|
+
setPrompt: async (params) => connection.sendRequest("session.agent.setPrompt", { ...params, sessionId }),
|
|
5737
5737
|
/**
|
|
5738
5738
|
* Gets the currently selected custom agent for the session.
|
|
5739
5739
|
*
|
|
@@ -5747,7 +5747,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5747
5747
|
*
|
|
5748
5748
|
* @returns The newly selected custom agent.
|
|
5749
5749
|
*/
|
|
5750
|
-
select: async (params) => connection.sendRequest("session.agent.select", {
|
|
5750
|
+
select: async (params) => connection.sendRequest("session.agent.select", { ...params, sessionId }),
|
|
5751
5751
|
/**
|
|
5752
5752
|
* Clears the selected custom agent and returns the session to the default agent.
|
|
5753
5753
|
*/
|
|
@@ -5768,7 +5768,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5768
5768
|
*
|
|
5769
5769
|
* @returns Identifier assigned to the newly started background agent task.
|
|
5770
5770
|
*/
|
|
5771
|
-
startAgent: async (params) => connection.sendRequest("session.tasks.startAgent", {
|
|
5771
|
+
startAgent: async (params) => connection.sendRequest("session.tasks.startAgent", { ...params, sessionId }),
|
|
5772
5772
|
/**
|
|
5773
5773
|
* Lists background tasks tracked by the session.
|
|
5774
5774
|
*
|
|
@@ -5782,7 +5782,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5782
5782
|
*
|
|
5783
5783
|
* @returns Result of registering or reclaiming a client-owned task.
|
|
5784
5784
|
*/
|
|
5785
|
-
register: async (params) => connection.sendRequest("session.tasks.register", {
|
|
5785
|
+
register: async (params) => connection.sendRequest("session.tasks.register", { ...params, sessionId }),
|
|
5786
5786
|
/**
|
|
5787
5787
|
* Publishes generic progress or a terminal outcome for a client-owned task.
|
|
5788
5788
|
*
|
|
@@ -5790,7 +5790,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5790
5790
|
*
|
|
5791
5791
|
* @returns Result of publishing a client-owned task update.
|
|
5792
5792
|
*/
|
|
5793
|
-
update: async (params) => connection.sendRequest("session.tasks.update", {
|
|
5793
|
+
update: async (params) => connection.sendRequest("session.tasks.update", { ...params, sessionId }),
|
|
5794
5794
|
/**
|
|
5795
5795
|
* Refreshes metadata for any detached background shells the runtime knows about.
|
|
5796
5796
|
*
|
|
@@ -5810,7 +5810,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5810
5810
|
*
|
|
5811
5811
|
* @returns Progress information for the task, or null when no task with that ID is tracked.
|
|
5812
5812
|
*/
|
|
5813
|
-
getProgress: async (params) => connection.sendRequest("session.tasks.getProgress", {
|
|
5813
|
+
getProgress: async (params) => connection.sendRequest("session.tasks.getProgress", { ...params, sessionId }),
|
|
5814
5814
|
/**
|
|
5815
5815
|
* Returns the first sync-waiting task that can currently be promoted to background mode.
|
|
5816
5816
|
*
|
|
@@ -5824,7 +5824,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5824
5824
|
*
|
|
5825
5825
|
* @returns Indicates whether the task was successfully promoted to background mode.
|
|
5826
5826
|
*/
|
|
5827
|
-
promoteToBackground: async (params) => connection.sendRequest("session.tasks.promoteToBackground", {
|
|
5827
|
+
promoteToBackground: async (params) => connection.sendRequest("session.tasks.promoteToBackground", { ...params, sessionId }),
|
|
5828
5828
|
/**
|
|
5829
5829
|
* Atomically promotes the first promotable sync-waiting task to background mode and returns it.
|
|
5830
5830
|
*
|
|
@@ -5838,7 +5838,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5838
5838
|
*
|
|
5839
5839
|
* @returns Indicates whether the background task was successfully cancelled.
|
|
5840
5840
|
*/
|
|
5841
|
-
cancel: async (params) => connection.sendRequest("session.tasks.cancel", {
|
|
5841
|
+
cancel: async (params) => connection.sendRequest("session.tasks.cancel", { ...params, sessionId }),
|
|
5842
5842
|
/**
|
|
5843
5843
|
* Removes a completed or cancelled background task from tracking.
|
|
5844
5844
|
*
|
|
@@ -5846,7 +5846,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5846
5846
|
*
|
|
5847
5847
|
* @returns Indicates whether the task was removed. False when the task does not exist or is still running/idle.
|
|
5848
5848
|
*/
|
|
5849
|
-
remove: async (params) => connection.sendRequest("session.tasks.remove", {
|
|
5849
|
+
remove: async (params) => connection.sendRequest("session.tasks.remove", { ...params, sessionId }),
|
|
5850
5850
|
/**
|
|
5851
5851
|
* Sends a message to a background agent task.
|
|
5852
5852
|
*
|
|
@@ -5854,7 +5854,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5854
5854
|
*
|
|
5855
5855
|
* @returns Indicates whether the message was delivered, with an error message when delivery failed.
|
|
5856
5856
|
*/
|
|
5857
|
-
sendMessage: async (params) => connection.sendRequest("session.tasks.sendMessage", {
|
|
5857
|
+
sendMessage: async (params) => connection.sendRequest("session.tasks.sendMessage", { ...params, sessionId })
|
|
5858
5858
|
},
|
|
5859
5859
|
/** @experimental */
|
|
5860
5860
|
skills: {
|
|
@@ -5875,13 +5875,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5875
5875
|
*
|
|
5876
5876
|
* @param params Name of the skill to enable for the session.
|
|
5877
5877
|
*/
|
|
5878
|
-
enable: async (params) => connection.sendRequest("session.skills.enable", {
|
|
5878
|
+
enable: async (params) => connection.sendRequest("session.skills.enable", { ...params, sessionId }),
|
|
5879
5879
|
/**
|
|
5880
5880
|
* Disables a skill for the session.
|
|
5881
5881
|
*
|
|
5882
5882
|
* @param params Name of the skill to disable for the session.
|
|
5883
5883
|
*/
|
|
5884
|
-
disable: async (params) => connection.sendRequest("session.skills.disable", {
|
|
5884
|
+
disable: async (params) => connection.sendRequest("session.skills.disable", { ...params, sessionId }),
|
|
5885
5885
|
/**
|
|
5886
5886
|
* Reloads skill definitions for the session.
|
|
5887
5887
|
*
|
|
@@ -5908,19 +5908,19 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5908
5908
|
*
|
|
5909
5909
|
* @returns Tools exposed by the connected MCP server. Throws when the server is not connected.
|
|
5910
5910
|
*/
|
|
5911
|
-
listTools: async (params) => connection.sendRequest("session.mcp.listTools", {
|
|
5911
|
+
listTools: async (params) => connection.sendRequest("session.mcp.listTools", { ...params, sessionId }),
|
|
5912
5912
|
/**
|
|
5913
5913
|
* Enables an MCP server for the session.
|
|
5914
5914
|
*
|
|
5915
5915
|
* @param params Name of the MCP server to enable for the session.
|
|
5916
5916
|
*/
|
|
5917
|
-
enable: async (params) => connection.sendRequest("session.mcp.enable", {
|
|
5917
|
+
enable: async (params) => connection.sendRequest("session.mcp.enable", { ...params, sessionId }),
|
|
5918
5918
|
/**
|
|
5919
5919
|
* Disables an MCP server for the session.
|
|
5920
5920
|
*
|
|
5921
5921
|
* @param params Name of the MCP server to disable for the session.
|
|
5922
5922
|
*/
|
|
5923
|
-
disable: async (params) => connection.sendRequest("session.mcp.disable", {
|
|
5923
|
+
disable: async (params) => connection.sendRequest("session.mcp.disable", { ...params, sessionId }),
|
|
5924
5924
|
/**
|
|
5925
5925
|
* Reloads MCP server connections for the session.
|
|
5926
5926
|
*/
|
|
@@ -5938,7 +5938,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5938
5938
|
*
|
|
5939
5939
|
* @returns Outcome of an MCP sampling execution: success result, failure error, or cancellation.
|
|
5940
5940
|
*/
|
|
5941
|
-
executeSampling: async (params) => connection.sendRequest("session.mcp.executeSampling", {
|
|
5941
|
+
executeSampling: async (params) => connection.sendRequest("session.mcp.executeSampling", { ...params, sessionId }),
|
|
5942
5942
|
/**
|
|
5943
5943
|
* Cancels an in-flight MCP sampling execution by request ID.
|
|
5944
5944
|
*
|
|
@@ -5946,7 +5946,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5946
5946
|
*
|
|
5947
5947
|
* @returns Indicates whether an in-flight sampling execution with the given requestId was found and cancelled.
|
|
5948
5948
|
*/
|
|
5949
|
-
cancelSamplingExecution: async (params) => connection.sendRequest("session.mcp.cancelSamplingExecution", {
|
|
5949
|
+
cancelSamplingExecution: async (params) => connection.sendRequest("session.mcp.cancelSamplingExecution", { ...params, sessionId }),
|
|
5950
5950
|
/**
|
|
5951
5951
|
* Sets how environment-variable values supplied to MCP servers are resolved (direct or indirect).
|
|
5952
5952
|
*
|
|
@@ -5954,7 +5954,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5954
5954
|
*
|
|
5955
5955
|
* @returns Env-value mode recorded on the session after the update.
|
|
5956
5956
|
*/
|
|
5957
|
-
setEnvValueMode: async (params) => connection.sendRequest("session.mcp.setEnvValueMode", {
|
|
5957
|
+
setEnvValueMode: async (params) => connection.sendRequest("session.mcp.setEnvValueMode", { ...params, sessionId }),
|
|
5958
5958
|
/**
|
|
5959
5959
|
* Removes the auto-managed `github` MCP server when present.
|
|
5960
5960
|
*
|
|
@@ -5966,19 +5966,19 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5966
5966
|
*
|
|
5967
5967
|
* @param params Server name and optional configuration for an individual MCP server start. Omit `config` for a config-free start-by-name of an already-configured server.
|
|
5968
5968
|
*/
|
|
5969
|
-
startServer: async (params) => connection.sendRequest("session.mcp.startServer", {
|
|
5969
|
+
startServer: async (params) => connection.sendRequest("session.mcp.startServer", { ...params, sessionId }),
|
|
5970
5970
|
/**
|
|
5971
5971
|
* Restarts an individual MCP server on the live session (stops then starts). Omit `config` for a config-free restart-by-name of an already-configured server; supply `config` to restart with a replacement configuration. Session-scoped and ephemeral: does NOT modify persistent user configuration (`mcp.config.*`).
|
|
5972
5972
|
*
|
|
5973
5973
|
* @param params Server name and optional replacement configuration for an individual MCP server restart. Omit `config` for a config-free restart-by-name of an already-configured server.
|
|
5974
5974
|
*/
|
|
5975
|
-
restartServer: async (params) => connection.sendRequest("session.mcp.restartServer", {
|
|
5975
|
+
restartServer: async (params) => connection.sendRequest("session.mcp.restartServer", { ...params, sessionId }),
|
|
5976
5976
|
/**
|
|
5977
5977
|
* Stops an individual MCP server on the session's host.
|
|
5978
5978
|
*
|
|
5979
5979
|
* @param params Server name for an individual MCP server stop.
|
|
5980
5980
|
*/
|
|
5981
|
-
stopServer: async (params) => connection.sendRequest("session.mcp.stopServer", {
|
|
5981
|
+
stopServer: async (params) => connection.sendRequest("session.mcp.stopServer", { ...params, sessionId }),
|
|
5982
5982
|
/**
|
|
5983
5983
|
* Checks whether a named MCP server is currently running on the session's host.
|
|
5984
5984
|
*
|
|
@@ -5986,7 +5986,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5986
5986
|
*
|
|
5987
5987
|
* @returns Whether the named MCP server is running.
|
|
5988
5988
|
*/
|
|
5989
|
-
isServerRunning: async (params) => connection.sendRequest("session.mcp.isServerRunning", {
|
|
5989
|
+
isServerRunning: async (params) => connection.sendRequest("session.mcp.isServerRunning", { ...params, sessionId }),
|
|
5990
5990
|
/** @experimental */
|
|
5991
5991
|
oauth: {
|
|
5992
5992
|
/**
|
|
@@ -5996,13 +5996,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
5996
5996
|
*
|
|
5997
5997
|
* @returns Indicates whether the pending MCP OAuth response was accepted.
|
|
5998
5998
|
*/
|
|
5999
|
-
handlePendingRequest: async (params) => connection.sendRequest("session.mcp.oauth.handlePendingRequest", {
|
|
5999
|
+
handlePendingRequest: async (params) => connection.sendRequest("session.mcp.oauth.handlePendingRequest", { ...params, sessionId }),
|
|
6000
6000
|
/**
|
|
6001
6001
|
* Notifies the session that MCP OAuth authentication succeeded and updated credentials were persisted, so cached tool definitions can be refreshed.
|
|
6002
6002
|
*
|
|
6003
6003
|
* @param params Identifies the MCP server whose persisted OAuth credentials were updated.
|
|
6004
6004
|
*/
|
|
6005
|
-
authenticationStateChanged: async (params) => connection.sendRequest("session.mcp.oauth.authenticationStateChanged", {
|
|
6005
|
+
authenticationStateChanged: async (params) => connection.sendRequest("session.mcp.oauth.authenticationStateChanged", { ...params, sessionId }),
|
|
6006
6006
|
/**
|
|
6007
6007
|
* Prepares an inert, expiring owned OAuth login bound to the original session requester and exact installation. Does not activate, connect, read credentials or open a browser.
|
|
6008
6008
|
*
|
|
@@ -6010,15 +6010,21 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6010
6010
|
*
|
|
6011
6011
|
* @returns An inert runtime-issued login handle. Preparation alone performs no activation or OAuth work.
|
|
6012
6012
|
*/
|
|
6013
|
-
prepareLogin: async (params) => connection.sendRequest("session.mcp.oauth.prepareLogin", {
|
|
6013
|
+
prepareLogin: async (params) => connection.sendRequest("session.mcp.oauth.prepareLogin", { ...params, sessionId }),
|
|
6014
6014
|
/**
|
|
6015
6015
|
* Starts OAuth authentication for a remote MCP server. Owned servers require the original one-use prepareLogin handle and exact installation ID; manual servers retain the existing direct login behaviour.
|
|
6016
6016
|
*
|
|
6017
|
-
* @param params Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback
|
|
6017
|
+
* @param params Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, callback handling, and static OAuth client selection.
|
|
6018
6018
|
*
|
|
6019
6019
|
* @returns OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.
|
|
6020
6020
|
*/
|
|
6021
|
-
login: async (params) => connection.sendRequest("session.mcp.oauth.login", {
|
|
6021
|
+
login: async (params) => connection.sendRequest("session.mcp.oauth.login", { ...params, sessionId }),
|
|
6022
|
+
/**
|
|
6023
|
+
* Completes a runtime-managed MCP OAuth login after the authorization server redirects to a host-managed callback URL.
|
|
6024
|
+
*
|
|
6025
|
+
* @param params Host-delivered callback for a runtime-managed MCP OAuth login.
|
|
6026
|
+
*/
|
|
6027
|
+
complete: async (params) => connection.sendRequest("session.mcp.oauth.complete", { ...params, sessionId }),
|
|
6022
6028
|
/**
|
|
6023
6029
|
* Passively probes a configured remote MCP server to classify whether OAuth is required or a cached/override token is accepted. Does not start OAuth, emit pending OAuth requests, or mutate MCP connection state.
|
|
6024
6030
|
*
|
|
@@ -6026,7 +6032,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6026
6032
|
*
|
|
6027
6033
|
* @returns Passive MCP OAuth probe result. `authenticated` means the server accepted the probe request while an OAuth-origin access token was attached; it does not prove the server required or independently validated that token. The probe does not make a second unauthenticated request. Failed is an expected probe-domain outcome; JSON-RPC errors are reserved for API-call failures.
|
|
6028
6034
|
*/
|
|
6029
|
-
probe: async (params) => connection.sendRequest("session.mcp.oauth.probe", {
|
|
6035
|
+
probe: async (params) => connection.sendRequest("session.mcp.oauth.probe", { ...params, sessionId }),
|
|
6030
6036
|
/**
|
|
6031
6037
|
* Cancels the exact owned OAuth login issued to this original session requester, without clearing shared credentials.
|
|
6032
6038
|
*
|
|
@@ -6034,7 +6040,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6034
6040
|
*
|
|
6035
6041
|
* @returns Honest terminal cancellation result; persistence or recovery failures remain RPC errors.
|
|
6036
6042
|
*/
|
|
6037
|
-
cancelLogin: async (params) => connection.sendRequest("session.mcp.oauth.cancelLogin", {
|
|
6043
|
+
cancelLogin: async (params) => connection.sendRequest("session.mcp.oauth.cancelLogin", { ...params, sessionId }),
|
|
6038
6044
|
/**
|
|
6039
6045
|
* Responds to a pending MCP OAuth authorization request by its request id.
|
|
6040
6046
|
*
|
|
@@ -6042,7 +6048,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6042
6048
|
*
|
|
6043
6049
|
* @returns Indicates whether the pending MCP OAuth response was accepted.
|
|
6044
6050
|
*/
|
|
6045
|
-
respond: async (params) => connection.sendRequest("session.mcp.oauth.respond", {
|
|
6051
|
+
respond: async (params) => connection.sendRequest("session.mcp.oauth.respond", { ...params, sessionId })
|
|
6046
6052
|
},
|
|
6047
6053
|
/** @experimental */
|
|
6048
6054
|
headers: {
|
|
@@ -6053,7 +6059,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6053
6059
|
*
|
|
6054
6060
|
* @returns Indicates whether the pending MCP headers refresh response was accepted.
|
|
6055
6061
|
*/
|
|
6056
|
-
handlePendingHeadersRefreshRequest: async (params) => connection.sendRequest("session.mcp.headers.handlePendingHeadersRefreshRequest", {
|
|
6062
|
+
handlePendingHeadersRefreshRequest: async (params) => connection.sendRequest("session.mcp.headers.handlePendingHeadersRefreshRequest", { ...params, sessionId })
|
|
6057
6063
|
},
|
|
6058
6064
|
/** @experimental */
|
|
6059
6065
|
apps: {
|
|
@@ -6064,7 +6070,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6064
6070
|
*
|
|
6065
6071
|
* @returns Resource contents returned by the MCP server.
|
|
6066
6072
|
*/
|
|
6067
|
-
readResource: async (params) => connection.sendRequest("session.mcp.apps.readResource", {
|
|
6073
|
+
readResource: async (params) => connection.sendRequest("session.mcp.apps.readResource", { ...params, sessionId }),
|
|
6068
6074
|
/**
|
|
6069
6075
|
* List tools that an MCP App view is allowed to call (SEP-1865 visibility filter). Returns tools whose `_meta.ui.visibility` is unset (default `["model","app"]`) or includes `"app"`.
|
|
6070
6076
|
*
|
|
@@ -6072,7 +6078,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6072
6078
|
*
|
|
6073
6079
|
* @returns App-callable tools from the named MCP server.
|
|
6074
6080
|
*/
|
|
6075
|
-
listTools: async (params) => connection.sendRequest("session.mcp.apps.listTools", {
|
|
6081
|
+
listTools: async (params) => connection.sendRequest("session.mcp.apps.listTools", { ...params, sessionId }),
|
|
6076
6082
|
/**
|
|
6077
6083
|
* Call an MCP tool from an MCP App view (SEP-1865). Enforces the visibility check that prevents an app iframe from invoking model-only tools. Returns the standard MCP `CallToolResult`.
|
|
6078
6084
|
*
|
|
@@ -6080,13 +6086,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6080
6086
|
*
|
|
6081
6087
|
* @returns Standard MCP CallToolResult
|
|
6082
6088
|
*/
|
|
6083
|
-
callTool: async (params) => connection.sendRequest("session.mcp.apps.callTool", {
|
|
6089
|
+
callTool: async (params) => connection.sendRequest("session.mcp.apps.callTool", { ...params, sessionId }),
|
|
6084
6090
|
/**
|
|
6085
6091
|
* Replace the host context returned to MCP App guests on `ui/initialize`. Hosts use this to advertise theme, locale, or other metadata to the guest UI.
|
|
6086
6092
|
*
|
|
6087
6093
|
* @param params Host context to advertise to MCP App guests.
|
|
6088
6094
|
*/
|
|
6089
|
-
setHostContext: async (params) => connection.sendRequest("session.mcp.apps.setHostContext", {
|
|
6095
|
+
setHostContext: async (params) => connection.sendRequest("session.mcp.apps.setHostContext", { ...params, sessionId }),
|
|
6090
6096
|
/**
|
|
6091
6097
|
* Read the current host context advertised to MCP App guests.
|
|
6092
6098
|
*
|
|
@@ -6100,7 +6106,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6100
6106
|
*
|
|
6101
6107
|
* @returns Diagnostic snapshot of MCP Apps wiring for the named server.
|
|
6102
6108
|
*/
|
|
6103
|
-
diagnose: async (params) => connection.sendRequest("session.mcp.apps.diagnose", {
|
|
6109
|
+
diagnose: async (params) => connection.sendRequest("session.mcp.apps.diagnose", { ...params, sessionId })
|
|
6104
6110
|
},
|
|
6105
6111
|
/** @experimental */
|
|
6106
6112
|
resources: {
|
|
@@ -6111,7 +6117,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6111
6117
|
*
|
|
6112
6118
|
* @returns Resource contents returned by the MCP server.
|
|
6113
6119
|
*/
|
|
6114
|
-
read: async (params) => connection.sendRequest("session.mcp.resources.read", {
|
|
6120
|
+
read: async (params) => connection.sendRequest("session.mcp.resources.read", { ...params, sessionId }),
|
|
6115
6121
|
/**
|
|
6116
6122
|
* Enumerate one page of resources a connected MCP server exposes (proxies MCP `resources/list`). Pass `cursor` to continue from a prior result's `nextCursor`.
|
|
6117
6123
|
*
|
|
@@ -6119,7 +6125,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6119
6125
|
*
|
|
6120
6126
|
* @returns One page of resources advertised by the named MCP server.
|
|
6121
6127
|
*/
|
|
6122
|
-
list: async (params) => connection.sendRequest("session.mcp.resources.list", {
|
|
6128
|
+
list: async (params) => connection.sendRequest("session.mcp.resources.list", { ...params, sessionId }),
|
|
6123
6129
|
/**
|
|
6124
6130
|
* Enumerate one page of resource templates a connected MCP server exposes (proxies MCP `resources/templates/list`). Pass `cursor` to continue from a prior result's `nextCursor`.
|
|
6125
6131
|
*
|
|
@@ -6127,7 +6133,26 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6127
6133
|
*
|
|
6128
6134
|
* @returns One page of resource templates advertised by the named MCP server.
|
|
6129
6135
|
*/
|
|
6130
|
-
listTemplates: async (params) => connection.sendRequest("session.mcp.resources.listTemplates", {
|
|
6136
|
+
listTemplates: async (params) => connection.sendRequest("session.mcp.resources.listTemplates", { ...params, sessionId })
|
|
6137
|
+
},
|
|
6138
|
+
/** @experimental */
|
|
6139
|
+
prompts: {
|
|
6140
|
+
/**
|
|
6141
|
+
* Enumerate one page of prompts a connected MCP server exposes (proxies MCP `prompts/list`). Pass `cursor` to continue from a prior result's `nextCursor`.
|
|
6142
|
+
*
|
|
6143
|
+
* @param params MCP server whose prompts to enumerate.
|
|
6144
|
+
*
|
|
6145
|
+
* @returns One page of prompts advertised by the named MCP server.
|
|
6146
|
+
*/
|
|
6147
|
+
list: async (params) => connection.sendRequest("session.mcp.prompts.list", { ...params, sessionId }),
|
|
6148
|
+
/**
|
|
6149
|
+
* Get a prompt's messages from a connected MCP server (proxies MCP `prompts/get`). Content is preserved as opaque JSON. Does not send messages to the model, execute tools, or fetch referenced resources.
|
|
6150
|
+
*
|
|
6151
|
+
* @param params MCP server, prompt name, and optional string-valued arguments.
|
|
6152
|
+
*
|
|
6153
|
+
* @returns Prompt messages returned by the MCP server without sending them to the model.
|
|
6154
|
+
*/
|
|
6155
|
+
get: async (params) => connection.sendRequest("session.mcp.prompts.get", { ...params, sessionId })
|
|
6131
6156
|
}
|
|
6132
6157
|
},
|
|
6133
6158
|
/** @experimental */
|
|
@@ -6139,7 +6164,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6139
6164
|
*
|
|
6140
6165
|
* @returns Per-source session diagnostics configuration.
|
|
6141
6166
|
*/
|
|
6142
|
-
configure: async (params) => connection.sendRequest("session.diagnostics.configure", {
|
|
6167
|
+
configure: async (params) => connection.sendRequest("session.diagnostics.configure", { ...params, sessionId }),
|
|
6143
6168
|
/**
|
|
6144
6169
|
* Reads a bounded batch of retained session diagnostics for the selected sources. Records are never consumed and each reader advances independently through its opaque cursor.
|
|
6145
6170
|
*
|
|
@@ -6147,7 +6172,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6147
6172
|
*
|
|
6148
6173
|
* @returns One cursor-addressed page of retained session diagnostics.
|
|
6149
6174
|
*/
|
|
6150
|
-
read: async (params) => connection.sendRequest("session.diagnostics.read", {
|
|
6175
|
+
read: async (params) => connection.sendRequest("session.diagnostics.read", { ...params, sessionId })
|
|
6151
6176
|
},
|
|
6152
6177
|
/** @experimental */
|
|
6153
6178
|
connectors: {
|
|
@@ -6176,7 +6201,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6176
6201
|
*
|
|
6177
6202
|
* @returns Validated Connector catalog snapshot cached by the session.
|
|
6178
6203
|
*/
|
|
6179
|
-
list: async (params) => connection.sendRequest("session.connectors.list", {
|
|
6204
|
+
list: async (params) => connection.sendRequest("session.connectors.list", { ...params, sessionId }),
|
|
6180
6205
|
/**
|
|
6181
6206
|
* Refreshes and validates the Connector catalog for the pinned opaque account selection.
|
|
6182
6207
|
*
|
|
@@ -6184,7 +6209,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6184
6209
|
*
|
|
6185
6210
|
* @returns Validated Connector catalog snapshot cached by the session.
|
|
6186
6211
|
*/
|
|
6187
|
-
refresh: async (params) => connection.sendRequest("session.connectors.refresh", {
|
|
6212
|
+
refresh: async (params) => connection.sendRequest("session.connectors.refresh", { ...params, sessionId }),
|
|
6188
6213
|
/**
|
|
6189
6214
|
* Initiates an idempotent Connector connection request without opening a browser. Returns connected when the service is immediately authoritative, consent_required with a validated URL, or pending with an opaque continuation ID.
|
|
6190
6215
|
*
|
|
@@ -6192,7 +6217,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6192
6217
|
*
|
|
6193
6218
|
* @returns Typed result of initiating or continuing a Connector connection.
|
|
6194
6219
|
*/
|
|
6195
|
-
connect: async (params) => connection.sendRequest("session.connectors.connect", {
|
|
6220
|
+
connect: async (params) => connection.sendRequest("session.connectors.connect", { ...params, sessionId }),
|
|
6196
6221
|
/**
|
|
6197
6222
|
* Re-initiates an idempotent Connector connection request without browser or UI effects, with the same typed outcomes as connect.
|
|
6198
6223
|
*
|
|
@@ -6200,7 +6225,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6200
6225
|
*
|
|
6201
6226
|
* @returns Typed result of initiating or continuing a Connector connection.
|
|
6202
6227
|
*/
|
|
6203
|
-
reconnect: async (params) => connection.sendRequest("session.connectors.reconnect", {
|
|
6228
|
+
reconnect: async (params) => connection.sendRequest("session.connectors.reconnect", { ...params, sessionId }),
|
|
6204
6229
|
/**
|
|
6205
6230
|
* Continues a pending Connector connection with caller-supplied attempt, interval, and deadline bounds. The runtime never opens the returned consent URL.
|
|
6206
6231
|
*
|
|
@@ -6208,7 +6233,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6208
6233
|
*
|
|
6209
6234
|
* @returns Typed result of initiating or continuing a Connector connection.
|
|
6210
6235
|
*/
|
|
6211
|
-
continueConnection: async (params) => connection.sendRequest("session.connectors.continueConnection", {
|
|
6236
|
+
continueConnection: async (params) => connection.sendRequest("session.connectors.continueConnection", { ...params, sessionId }),
|
|
6212
6237
|
/**
|
|
6213
6238
|
* Disconnects one Connector for the pinned opaque account selection, refreshes the authoritative catalog, and removes its session-owned MCP projection.
|
|
6214
6239
|
*
|
|
@@ -6216,7 +6241,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6216
6241
|
*
|
|
6217
6242
|
* @returns Authoritative result after disconnect and MCP reconciliation.
|
|
6218
6243
|
*/
|
|
6219
|
-
disconnect: async (params) => connection.sendRequest("session.connectors.disconnect", {
|
|
6244
|
+
disconnect: async (params) => connection.sendRequest("session.connectors.disconnect", { ...params, sessionId }),
|
|
6220
6245
|
/**
|
|
6221
6246
|
* Reconciles the authoritative cached or freshly requested Connector catalog into the session Connector MCP projection and returns live status.
|
|
6222
6247
|
*
|
|
@@ -6224,7 +6249,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6224
6249
|
*
|
|
6225
6250
|
* @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
|
|
6226
6251
|
*/
|
|
6227
|
-
reconcile: async (params) => connection.sendRequest("session.connectors.reconcile", {
|
|
6252
|
+
reconcile: async (params) => connection.sendRequest("session.connectors.reconcile", { ...params, sessionId })
|
|
6228
6253
|
},
|
|
6229
6254
|
/** @experimental */
|
|
6230
6255
|
managedSettings: {
|
|
@@ -6250,13 +6275,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6250
6275
|
*
|
|
6251
6276
|
* @returns Result of installing a plugin.
|
|
6252
6277
|
*/
|
|
6253
|
-
install: async (params) => connection.sendRequest("session.plugins.install", {
|
|
6278
|
+
install: async (params) => connection.sendRequest("session.plugins.install", { ...params, sessionId }),
|
|
6254
6279
|
/**
|
|
6255
6280
|
* Uninstalls a plugin when permitted by the live session's retained managed policy.
|
|
6256
6281
|
*
|
|
6257
6282
|
* @param params Name (or spec) of the plugin to uninstall.
|
|
6258
6283
|
*/
|
|
6259
|
-
uninstall: async (params) => connection.sendRequest("session.plugins.uninstall", {
|
|
6284
|
+
uninstall: async (params) => connection.sendRequest("session.plugins.uninstall", { ...params, sessionId }),
|
|
6260
6285
|
/**
|
|
6261
6286
|
* Updates an installed plugin using the live session's authoritative account, working directory, and retained managed policy.
|
|
6262
6287
|
*
|
|
@@ -6264,19 +6289,19 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6264
6289
|
*
|
|
6265
6290
|
* @returns Result of updating a single plugin.
|
|
6266
6291
|
*/
|
|
6267
|
-
update: async (params) => connection.sendRequest("session.plugins.update", {
|
|
6292
|
+
update: async (params) => connection.sendRequest("session.plugins.update", { ...params, sessionId }),
|
|
6268
6293
|
/**
|
|
6269
6294
|
* Enables installed plugins when permitted by the live session's retained managed policy.
|
|
6270
6295
|
*
|
|
6271
6296
|
* @param params Plugin names (or specs) to enable in the session's authoritative working directory.
|
|
6272
6297
|
*/
|
|
6273
|
-
enable: async (params) => connection.sendRequest("session.plugins.enable", {
|
|
6298
|
+
enable: async (params) => connection.sendRequest("session.plugins.enable", { ...params, sessionId }),
|
|
6274
6299
|
/**
|
|
6275
6300
|
* Disables installed plugins when permitted by the live session's retained managed policy.
|
|
6276
6301
|
*
|
|
6277
6302
|
* @param params Plugin names (or specs) to disable in the session's authoritative working directory.
|
|
6278
6303
|
*/
|
|
6279
|
-
disable: async (params) => connection.sendRequest("session.plugins.disable", {
|
|
6304
|
+
disable: async (params) => connection.sendRequest("session.plugins.disable", { ...params, sessionId }),
|
|
6280
6305
|
/** @experimental */
|
|
6281
6306
|
marketplaces: {
|
|
6282
6307
|
/**
|
|
@@ -6292,7 +6317,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6292
6317
|
*
|
|
6293
6318
|
* @returns Result of registering a new marketplace.
|
|
6294
6319
|
*/
|
|
6295
|
-
add: async (params) => connection.sendRequest("session.plugins.marketplaces.add", {
|
|
6320
|
+
add: async (params) => connection.sendRequest("session.plugins.marketplaces.add", { ...params, sessionId }),
|
|
6296
6321
|
/**
|
|
6297
6322
|
* Removes a marketplace when permitted by the live session's retained managed policy.
|
|
6298
6323
|
*
|
|
@@ -6300,7 +6325,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6300
6325
|
*
|
|
6301
6326
|
* @returns Outcome of the remove attempt, including dependent-plugin info when applicable.
|
|
6302
6327
|
*/
|
|
6303
|
-
remove: async (params) => connection.sendRequest("session.plugins.marketplaces.remove", {
|
|
6328
|
+
remove: async (params) => connection.sendRequest("session.plugins.marketplaces.remove", { ...params, sessionId }),
|
|
6304
6329
|
/**
|
|
6305
6330
|
* Browses a marketplace resolved through the live session's working directory and retained managed policy.
|
|
6306
6331
|
*
|
|
@@ -6308,7 +6333,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6308
6333
|
*
|
|
6309
6334
|
* @returns Plugins advertised by the marketplace.
|
|
6310
6335
|
*/
|
|
6311
|
-
browse: async (params) => connection.sendRequest("session.plugins.marketplaces.browse", {
|
|
6336
|
+
browse: async (params) => connection.sendRequest("session.plugins.marketplaces.browse", { ...params, sessionId }),
|
|
6312
6337
|
/**
|
|
6313
6338
|
* Refreshes marketplaces resolved through the live session's working directory and retained managed policy.
|
|
6314
6339
|
*
|
|
@@ -6316,14 +6341,14 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6316
6341
|
*
|
|
6317
6342
|
* @returns Result of refreshing one or more marketplace catalogs.
|
|
6318
6343
|
*/
|
|
6319
|
-
refresh: async (params) => connection.sendRequest("session.plugins.marketplaces.refresh", {
|
|
6344
|
+
refresh: async (params) => connection.sendRequest("session.plugins.marketplaces.refresh", { ...params, sessionId })
|
|
6320
6345
|
},
|
|
6321
6346
|
/**
|
|
6322
6347
|
* Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately.
|
|
6323
6348
|
*
|
|
6324
6349
|
* @param params Optional flags controlling which side effects the reload performs.
|
|
6325
6350
|
*/
|
|
6326
|
-
reload: async (params) => connection.sendRequest("session.plugins.reload", {
|
|
6351
|
+
reload: async (params) => connection.sendRequest("session.plugins.reload", { ...params, sessionId })
|
|
6327
6352
|
},
|
|
6328
6353
|
/** @experimental */
|
|
6329
6354
|
provider: {
|
|
@@ -6334,7 +6359,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6334
6359
|
*
|
|
6335
6360
|
* @returns A snapshot of the provider endpoint the session is currently configured to talk to.
|
|
6336
6361
|
*/
|
|
6337
|
-
getEndpoint: async (params) => connection.sendRequest("session.provider.getEndpoint", {
|
|
6362
|
+
getEndpoint: async (params) => connection.sendRequest("session.provider.getEndpoint", { ...params, sessionId }),
|
|
6338
6363
|
/**
|
|
6339
6364
|
* Adds BYOK providers and/or models to the session's registry at runtime, extending the additive registry built from the session's `providers`/`models` options. Both fields are optional, so a call may add providers only, models only, or both. Within a single call providers are registered before models, so a model may reference a provider added in the same call; across calls a model may reference any provider already registered (from session creation or a prior add). A model whose referenced provider is not registered by the end of the call is rejected. Newly added models become selectable via `model.list` / `model.switchTo` and are inherited by sub-agents spawned afterwards.
|
|
6340
6365
|
*
|
|
@@ -6342,7 +6367,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6342
6367
|
*
|
|
6343
6368
|
* @returns The selectable model entries synthesized for the models added by this call.
|
|
6344
6369
|
*/
|
|
6345
|
-
add: async (params) => connection.sendRequest("session.provider.add", {
|
|
6370
|
+
add: async (params) => connection.sendRequest("session.provider.add", { ...params, sessionId }),
|
|
6346
6371
|
/**
|
|
6347
6372
|
* Atomically updates the session's BYOK provider and model registry by applying the supplied snapshot, replacing existing entries, updating models, or removing entries absent from the snapshot.
|
|
6348
6373
|
*
|
|
@@ -6350,7 +6375,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6350
6375
|
*
|
|
6351
6376
|
* @returns The selectable model entries and selection ids synthesized for the synchronized BYOK models.
|
|
6352
6377
|
*/
|
|
6353
|
-
sync: async (params) => connection.sendRequest("session.provider.sync", {
|
|
6378
|
+
sync: async (params) => connection.sendRequest("session.provider.sync", { ...params, sessionId }),
|
|
6354
6379
|
/**
|
|
6355
6380
|
* Withdraws named host-managed models from the session's BYOK registry, leaving every other entry untouched. The scoped counterpart to `provider.sync`: a snapshot can only describe entries the caller knows about, so using it to remove one model silently withdraws rows registered by another source, such as a plugin calling `provider.add` at runtime. Naming what to remove leaves unrelated entries alone. Selection ids that are not registered are ignored, so withdrawal is idempotent. A provider is removed only when one of the withdrawn models was the last entry referencing it; a provider that simply has no models, which is the normal state while its rows are supplied by catalog discovery, is left in place.
|
|
6356
6381
|
*
|
|
@@ -6358,7 +6383,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6358
6383
|
*
|
|
6359
6384
|
* @returns What the withdrawal actually removed from the registry.
|
|
6360
6385
|
*/
|
|
6361
|
-
withdraw: async (params) => connection.sendRequest("session.provider.withdraw", {
|
|
6386
|
+
withdraw: async (params) => connection.sendRequest("session.provider.withdraw", { ...params, sessionId })
|
|
6362
6387
|
},
|
|
6363
6388
|
/** @experimental */
|
|
6364
6389
|
options: {
|
|
@@ -6369,7 +6394,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6369
6394
|
*
|
|
6370
6395
|
* @returns Indicates whether the session options patch was applied successfully.
|
|
6371
6396
|
*/
|
|
6372
|
-
update: async (params) => connection.sendRequest("session.options.update", {
|
|
6397
|
+
update: async (params) => connection.sendRequest("session.options.update", { ...params, sessionId })
|
|
6373
6398
|
},
|
|
6374
6399
|
/** @experimental */
|
|
6375
6400
|
lsp: {
|
|
@@ -6378,7 +6403,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6378
6403
|
*
|
|
6379
6404
|
* @param params Parameters for (re)loading the merged LSP configuration set.
|
|
6380
6405
|
*/
|
|
6381
|
-
initialize: async (params) => connection.sendRequest("session.lsp.initialize", {
|
|
6406
|
+
initialize: async (params) => connection.sendRequest("session.lsp.initialize", { ...params, sessionId })
|
|
6382
6407
|
},
|
|
6383
6408
|
/** @experimental */
|
|
6384
6409
|
extensions: {
|
|
@@ -6393,13 +6418,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6393
6418
|
*
|
|
6394
6419
|
* @param params Source-qualified extension identifier to enable for the session.
|
|
6395
6420
|
*/
|
|
6396
|
-
enable: async (params) => connection.sendRequest("session.extensions.enable", {
|
|
6421
|
+
enable: async (params) => connection.sendRequest("session.extensions.enable", { ...params, sessionId }),
|
|
6397
6422
|
/**
|
|
6398
6423
|
* Disables an extension for the session.
|
|
6399
6424
|
*
|
|
6400
6425
|
* @param params Source-qualified extension identifier to disable for the session.
|
|
6401
6426
|
*/
|
|
6402
|
-
disable: async (params) => connection.sendRequest("session.extensions.disable", {
|
|
6427
|
+
disable: async (params) => connection.sendRequest("session.extensions.disable", { ...params, sessionId }),
|
|
6403
6428
|
/**
|
|
6404
6429
|
* Reloads extension definitions and processes for the session.
|
|
6405
6430
|
*/
|
|
@@ -6409,7 +6434,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6409
6434
|
*
|
|
6410
6435
|
* @param params Parameters for session.extensions.sendAttachmentsToMessage.
|
|
6411
6436
|
*/
|
|
6412
|
-
sendAttachmentsToMessage: async (params) => connection.sendRequest("session.extensions.sendAttachmentsToMessage", {
|
|
6437
|
+
sendAttachmentsToMessage: async (params) => connection.sendRequest("session.extensions.sendAttachmentsToMessage", { ...params, sessionId })
|
|
6413
6438
|
},
|
|
6414
6439
|
/** @experimental */
|
|
6415
6440
|
tools: {
|
|
@@ -6420,7 +6445,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6420
6445
|
*
|
|
6421
6446
|
* @returns Canonical result returned by a session tool.
|
|
6422
6447
|
*/
|
|
6423
|
-
execute: async (params) => connection.sendRequest("session.tools.execute", {
|
|
6448
|
+
execute: async (params) => connection.sendRequest("session.tools.execute", { ...params, sessionId }),
|
|
6424
6449
|
/**
|
|
6425
6450
|
* Returns the Rust-owned built-in tool descriptors used to construct the session's offered tool set.
|
|
6426
6451
|
*
|
|
@@ -6428,7 +6453,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6428
6453
|
*
|
|
6429
6454
|
* @returns Rust-owned built-in tool descriptors for the session.
|
|
6430
6455
|
*/
|
|
6431
|
-
getBuiltinDescriptors: async (params) => connection.sendRequest("session.tools.getBuiltinDescriptors", {
|
|
6456
|
+
getBuiltinDescriptors: async (params) => connection.sendRequest("session.tools.getBuiltinDescriptors", { ...params, sessionId }),
|
|
6432
6457
|
/**
|
|
6433
6458
|
* Projects a completed task_complete tool call into its label-safe session event payload.
|
|
6434
6459
|
*
|
|
@@ -6436,7 +6461,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6436
6461
|
*
|
|
6437
6462
|
* @returns Task completion notification with summary from the agent
|
|
6438
6463
|
*/
|
|
6439
|
-
taskCompleteEventData: async (params) => connection.sendRequest("session.tools.taskCompleteEventData", {
|
|
6464
|
+
taskCompleteEventData: async (params) => connection.sendRequest("session.tools.taskCompleteEventData", { ...params, sessionId }),
|
|
6440
6465
|
/**
|
|
6441
6466
|
* Provides the result for a pending external tool call.
|
|
6442
6467
|
*
|
|
@@ -6444,7 +6469,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6444
6469
|
*
|
|
6445
6470
|
* @returns Indicates whether the external tool call result was handled successfully.
|
|
6446
6471
|
*/
|
|
6447
|
-
handlePendingToolCall: async (params) => connection.sendRequest("session.tools.handlePendingToolCall", {
|
|
6472
|
+
handlePendingToolCall: async (params) => connection.sendRequest("session.tools.handlePendingToolCall", { ...params, sessionId }),
|
|
6448
6473
|
/**
|
|
6449
6474
|
* Resolves, builds, and validates the runtime tool list for the session.
|
|
6450
6475
|
*
|
|
@@ -6464,7 +6489,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6464
6489
|
*
|
|
6465
6490
|
* @returns Empty result after replacing the calling connection's externally implemented tools.
|
|
6466
6491
|
*/
|
|
6467
|
-
set: async (params) => connection.sendRequest("session.tools.set", {
|
|
6492
|
+
set: async (params) => connection.sendRequest("session.tools.set", { ...params, sessionId }),
|
|
6468
6493
|
/**
|
|
6469
6494
|
* Sets the current session's live subagent settings override, which takes precedence over persisted user settings until cleared. Persisted user settings remain the source of truth for future sessions.
|
|
6470
6495
|
*
|
|
@@ -6472,7 +6497,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6472
6497
|
*
|
|
6473
6498
|
* @returns Empty result after applying subagent settings
|
|
6474
6499
|
*/
|
|
6475
|
-
updateSubagentSettings: async (params) => connection.sendRequest("session.tools.updateSubagentSettings", {
|
|
6500
|
+
updateSubagentSettings: async (params) => connection.sendRequest("session.tools.updateSubagentSettings", { ...params, sessionId })
|
|
6476
6501
|
},
|
|
6477
6502
|
/** @experimental */
|
|
6478
6503
|
commands: {
|
|
@@ -6483,7 +6508,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6483
6508
|
*
|
|
6484
6509
|
* @returns Slash commands available in the session, after applying any include/exclude filters.
|
|
6485
6510
|
*/
|
|
6486
|
-
list: async (params) => connection.sendRequest("session.commands.list", {
|
|
6511
|
+
list: async (params) => connection.sendRequest("session.commands.list", { ...params, sessionId }),
|
|
6487
6512
|
/**
|
|
6488
6513
|
* Invokes a slash command in the session.
|
|
6489
6514
|
*
|
|
@@ -6491,7 +6516,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6491
6516
|
*
|
|
6492
6517
|
* @returns Result of invoking the slash command (text output, prompt to send to the agent, completion, or subcommand selection).
|
|
6493
6518
|
*/
|
|
6494
|
-
invoke: async (params) => connection.sendRequest("session.commands.invoke", {
|
|
6519
|
+
invoke: async (params) => connection.sendRequest("session.commands.invoke", { ...params, sessionId }),
|
|
6495
6520
|
/**
|
|
6496
6521
|
* Reports completion of a pending client-handled slash command.
|
|
6497
6522
|
*
|
|
@@ -6499,7 +6524,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6499
6524
|
*
|
|
6500
6525
|
* @returns Indicates whether the pending client-handled command was completed successfully.
|
|
6501
6526
|
*/
|
|
6502
|
-
handlePendingCommand: async (params) => connection.sendRequest("session.commands.handlePendingCommand", {
|
|
6527
|
+
handlePendingCommand: async (params) => connection.sendRequest("session.commands.handlePendingCommand", { ...params, sessionId }),
|
|
6503
6528
|
/**
|
|
6504
6529
|
* Executes a slash command synchronously and returns any error.
|
|
6505
6530
|
*
|
|
@@ -6507,7 +6532,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6507
6532
|
*
|
|
6508
6533
|
* @returns Error message produced while executing the command, if any.
|
|
6509
6534
|
*/
|
|
6510
|
-
execute: async (params) => connection.sendRequest("session.commands.execute", {
|
|
6535
|
+
execute: async (params) => connection.sendRequest("session.commands.execute", { ...params, sessionId }),
|
|
6511
6536
|
/**
|
|
6512
6537
|
* Enqueues a slash command for FIFO processing on the local session.
|
|
6513
6538
|
*
|
|
@@ -6515,7 +6540,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6515
6540
|
*
|
|
6516
6541
|
* @returns Indicates whether the command was accepted into the local execution queue.
|
|
6517
6542
|
*/
|
|
6518
|
-
enqueue: async (params) => connection.sendRequest("session.commands.enqueue", {
|
|
6543
|
+
enqueue: async (params) => connection.sendRequest("session.commands.enqueue", { ...params, sessionId }),
|
|
6519
6544
|
/**
|
|
6520
6545
|
* Reports whether the host actually executed a queued command and whether to continue processing.
|
|
6521
6546
|
*
|
|
@@ -6523,7 +6548,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6523
6548
|
*
|
|
6524
6549
|
* @returns Indicates whether the queued-command response was matched to a pending request.
|
|
6525
6550
|
*/
|
|
6526
|
-
respondToQueuedCommand: async (params) => connection.sendRequest("session.commands.respondToQueuedCommand", {
|
|
6551
|
+
respondToQueuedCommand: async (params) => connection.sendRequest("session.commands.respondToQueuedCommand", { ...params, sessionId })
|
|
6527
6552
|
},
|
|
6528
6553
|
/** @experimental */
|
|
6529
6554
|
telemetry: {
|
|
@@ -6538,7 +6563,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6538
6563
|
*
|
|
6539
6564
|
* @param params Feature override key/value pairs to attach to subsequent telemetry events from this session.
|
|
6540
6565
|
*/
|
|
6541
|
-
setFeatureOverrides: async (params) => connection.sendRequest("session.telemetry.setFeatureOverrides", {
|
|
6566
|
+
setFeatureOverrides: async (params) => connection.sendRequest("session.telemetry.setFeatureOverrides", { ...params, sessionId })
|
|
6542
6567
|
},
|
|
6543
6568
|
/** @experimental */
|
|
6544
6569
|
ui: {
|
|
@@ -6549,7 +6574,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6549
6574
|
*
|
|
6550
6575
|
* @returns Completed transient query. Ordered chunks and the terminal outcome are also delivered through `ui.ephemeral_query` session events while it runs.
|
|
6551
6576
|
*/
|
|
6552
|
-
ephemeralQuery: async (params) => connection.sendRequest("session.ui.ephemeralQuery", {
|
|
6577
|
+
ephemeralQuery: async (params) => connection.sendRequest("session.ui.ephemeralQuery", { ...params, sessionId }),
|
|
6553
6578
|
/**
|
|
6554
6579
|
* Requests structured input from a UI-capable client.
|
|
6555
6580
|
*
|
|
@@ -6557,7 +6582,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6557
6582
|
*
|
|
6558
6583
|
* @returns The elicitation response (accept with form values, decline, or cancel)
|
|
6559
6584
|
*/
|
|
6560
|
-
elicitation: async (params) => connection.sendRequest("session.ui.elicitation", {
|
|
6585
|
+
elicitation: async (params) => connection.sendRequest("session.ui.elicitation", { ...params, sessionId }),
|
|
6561
6586
|
/**
|
|
6562
6587
|
* Provides the user response for a pending elicitation request.
|
|
6563
6588
|
*
|
|
@@ -6565,7 +6590,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6565
6590
|
*
|
|
6566
6591
|
* @returns Indicates whether the elicitation response was accepted; false if it was already resolved by another client.
|
|
6567
6592
|
*/
|
|
6568
|
-
handlePendingElicitation: async (params) => connection.sendRequest("session.ui.handlePendingElicitation", {
|
|
6593
|
+
handlePendingElicitation: async (params) => connection.sendRequest("session.ui.handlePendingElicitation", { ...params, sessionId }),
|
|
6569
6594
|
/**
|
|
6570
6595
|
* Resolves a pending `user_input.requested` event with the user's response.
|
|
6571
6596
|
*
|
|
@@ -6573,7 +6598,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6573
6598
|
*
|
|
6574
6599
|
* @returns Indicates whether the pending UI request was resolved by this call.
|
|
6575
6600
|
*/
|
|
6576
|
-
handlePendingUserInput: async (params) => connection.sendRequest("session.ui.handlePendingUserInput", {
|
|
6601
|
+
handlePendingUserInput: async (params) => connection.sendRequest("session.ui.handlePendingUserInput", { ...params, sessionId }),
|
|
6577
6602
|
/**
|
|
6578
6603
|
* Resolves a pending `sampling.requested` event with a sampling result, or rejects it.
|
|
6579
6604
|
*
|
|
@@ -6581,7 +6606,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6581
6606
|
*
|
|
6582
6607
|
* @returns Indicates whether the pending UI request was resolved by this call.
|
|
6583
6608
|
*/
|
|
6584
|
-
handlePendingSampling: async (params) => connection.sendRequest("session.ui.handlePendingSampling", {
|
|
6609
|
+
handlePendingSampling: async (params) => connection.sendRequest("session.ui.handlePendingSampling", { ...params, sessionId }),
|
|
6585
6610
|
/**
|
|
6586
6611
|
* Resolves a pending `auto_mode_switch.requested` event with the user's accept/decline decision.
|
|
6587
6612
|
*
|
|
@@ -6589,7 +6614,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6589
6614
|
*
|
|
6590
6615
|
* @returns Indicates whether the pending UI request was resolved by this call.
|
|
6591
6616
|
*/
|
|
6592
|
-
handlePendingAutoModeSwitch: async (params) => connection.sendRequest("session.ui.handlePendingAutoModeSwitch", {
|
|
6617
|
+
handlePendingAutoModeSwitch: async (params) => connection.sendRequest("session.ui.handlePendingAutoModeSwitch", { ...params, sessionId }),
|
|
6593
6618
|
/**
|
|
6594
6619
|
* Resolves a pending `session_limits_exhausted.requested` event with the user's selected limit action.
|
|
6595
6620
|
*
|
|
@@ -6597,7 +6622,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6597
6622
|
*
|
|
6598
6623
|
* @returns Indicates whether the pending UI request was resolved by this call.
|
|
6599
6624
|
*/
|
|
6600
|
-
handlePendingSessionLimitsExhausted: async (params) => connection.sendRequest("session.ui.handlePendingSessionLimitsExhausted", {
|
|
6625
|
+
handlePendingSessionLimitsExhausted: async (params) => connection.sendRequest("session.ui.handlePendingSessionLimitsExhausted", { ...params, sessionId }),
|
|
6601
6626
|
/**
|
|
6602
6627
|
* Resolves a pending `exit_plan_mode.requested` event with the user's response.
|
|
6603
6628
|
*
|
|
@@ -6605,7 +6630,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6605
6630
|
*
|
|
6606
6631
|
* @returns Indicates whether the pending UI request was resolved by this call.
|
|
6607
6632
|
*/
|
|
6608
|
-
handlePendingExitPlanMode: async (params) => connection.sendRequest("session.ui.handlePendingExitPlanMode", {
|
|
6633
|
+
handlePendingExitPlanMode: async (params) => connection.sendRequest("session.ui.handlePendingExitPlanMode", { ...params, sessionId }),
|
|
6609
6634
|
/**
|
|
6610
6635
|
* Registers an in-process handler for auto-mode-switch requests so the server bridge skips dispatch.
|
|
6611
6636
|
*
|
|
@@ -6619,7 +6644,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6619
6644
|
*
|
|
6620
6645
|
* @returns Indicates whether the handle was active and the registration count was decremented.
|
|
6621
6646
|
*/
|
|
6622
|
-
unregisterDirectAutoModeSwitchHandler: async (params) => connection.sendRequest("session.ui.unregisterDirectAutoModeSwitchHandler", {
|
|
6647
|
+
unregisterDirectAutoModeSwitchHandler: async (params) => connection.sendRequest("session.ui.unregisterDirectAutoModeSwitchHandler", { ...params, sessionId })
|
|
6623
6648
|
},
|
|
6624
6649
|
/** @experimental */
|
|
6625
6650
|
permissions: {
|
|
@@ -6630,7 +6655,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6630
6655
|
*
|
|
6631
6656
|
* @returns Indicates whether the operation succeeded.
|
|
6632
6657
|
*/
|
|
6633
|
-
configure: async (params) => connection.sendRequest("session.permissions.configure", {
|
|
6658
|
+
configure: async (params) => connection.sendRequest("session.permissions.configure", { ...params, sessionId }),
|
|
6634
6659
|
/**
|
|
6635
6660
|
* Provides a decision for a pending tool permission request.
|
|
6636
6661
|
*
|
|
@@ -6638,7 +6663,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6638
6663
|
*
|
|
6639
6664
|
* @returns Indicates whether the permission decision was applied; false when the request was already resolved.
|
|
6640
6665
|
*/
|
|
6641
|
-
handlePendingPermissionRequest: async (params) => connection.sendRequest("session.permissions.handlePendingPermissionRequest", {
|
|
6666
|
+
handlePendingPermissionRequest: async (params) => connection.sendRequest("session.permissions.handlePendingPermissionRequest", { ...params, sessionId }),
|
|
6642
6667
|
/**
|
|
6643
6668
|
* Reconstructs the set of pending tool permission requests from the session's event history.
|
|
6644
6669
|
*
|
|
@@ -6652,7 +6677,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6652
6677
|
*
|
|
6653
6678
|
* @returns Indicates whether the operation succeeded.
|
|
6654
6679
|
*/
|
|
6655
|
-
setApproveAll: async (params) => connection.sendRequest("session.permissions.setApproveAll", {
|
|
6680
|
+
setApproveAll: async (params) => connection.sendRequest("session.permissions.setApproveAll", { ...params, sessionId }),
|
|
6656
6681
|
/**
|
|
6657
6682
|
* Sets the permission mode for the session. `manual` follows the normal approval flow, `assisted` attaches LLM safety recommendations, and `allow-all` automatically approves permission requests. The result returns the authoritative post-mutation mode so callers can update local state without racing the `session.permissions_changed` notification.
|
|
6658
6683
|
*
|
|
@@ -6660,7 +6685,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6660
6685
|
*
|
|
6661
6686
|
* @returns Indicates whether the requested permission mode was applied and reports the authoritative post-mutation mode.
|
|
6662
6687
|
*/
|
|
6663
|
-
setMode: async (params) => connection.sendRequest("session.permissions.setMode", {
|
|
6688
|
+
setMode: async (params) => connection.sendRequest("session.permissions.setMode", { ...params, sessionId }),
|
|
6664
6689
|
/**
|
|
6665
6690
|
* Returns the current permission mode for the session.
|
|
6666
6691
|
*
|
|
@@ -6674,7 +6699,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6674
6699
|
*
|
|
6675
6700
|
* @returns Indicates whether the operation succeeded.
|
|
6676
6701
|
*/
|
|
6677
|
-
modifyRules: async (params) => connection.sendRequest("session.permissions.modifyRules", {
|
|
6702
|
+
modifyRules: async (params) => connection.sendRequest("session.permissions.modifyRules", { ...params, sessionId }),
|
|
6678
6703
|
/**
|
|
6679
6704
|
* Sets whether the client wants permission prompts bridged into session events.
|
|
6680
6705
|
*
|
|
@@ -6682,7 +6707,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6682
6707
|
*
|
|
6683
6708
|
* @returns Indicates whether the operation succeeded.
|
|
6684
6709
|
*/
|
|
6685
|
-
setRequired: async (params) => connection.sendRequest("session.permissions.setRequired", {
|
|
6710
|
+
setRequired: async (params) => connection.sendRequest("session.permissions.setRequired", { ...params, sessionId }),
|
|
6686
6711
|
/**
|
|
6687
6712
|
* Clears session-scoped tool approvals and, for full resets, exact session-approved paths.
|
|
6688
6713
|
*
|
|
@@ -6690,7 +6715,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6690
6715
|
*
|
|
6691
6716
|
* @returns Indicates whether the operation succeeded.
|
|
6692
6717
|
*/
|
|
6693
|
-
resetSessionApprovals: async (params) => connection.sendRequest("session.permissions.resetSessionApprovals", {
|
|
6718
|
+
resetSessionApprovals: async (params) => connection.sendRequest("session.permissions.resetSessionApprovals", { ...params, sessionId }),
|
|
6694
6719
|
/**
|
|
6695
6720
|
* Notifies the runtime that a permission prompt UI has been shown to the user.
|
|
6696
6721
|
*
|
|
@@ -6698,7 +6723,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6698
6723
|
*
|
|
6699
6724
|
* @returns Indicates whether the operation succeeded.
|
|
6700
6725
|
*/
|
|
6701
|
-
notifyPromptShown: async (params) => connection.sendRequest("session.permissions.notifyPromptShown", {
|
|
6726
|
+
notifyPromptShown: async (params) => connection.sendRequest("session.permissions.notifyPromptShown", { ...params, sessionId }),
|
|
6702
6727
|
/** @experimental */
|
|
6703
6728
|
paths: {
|
|
6704
6729
|
/**
|
|
@@ -6714,7 +6739,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6714
6739
|
*
|
|
6715
6740
|
* @returns Indicates whether the operation succeeded.
|
|
6716
6741
|
*/
|
|
6717
|
-
add: async (params) => connection.sendRequest("session.permissions.paths.add", {
|
|
6742
|
+
add: async (params) => connection.sendRequest("session.permissions.paths.add", { ...params, sessionId }),
|
|
6718
6743
|
/**
|
|
6719
6744
|
* Updates the session's primary working directory used by the permission policy.
|
|
6720
6745
|
*
|
|
@@ -6722,7 +6747,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6722
6747
|
*
|
|
6723
6748
|
* @returns Indicates whether the operation succeeded.
|
|
6724
6749
|
*/
|
|
6725
|
-
updatePrimary: async (params) => connection.sendRequest("session.permissions.paths.updatePrimary", {
|
|
6750
|
+
updatePrimary: async (params) => connection.sendRequest("session.permissions.paths.updatePrimary", { ...params, sessionId }),
|
|
6726
6751
|
/**
|
|
6727
6752
|
* Reports whether a path falls within any of the session's allowed directories.
|
|
6728
6753
|
*
|
|
@@ -6730,7 +6755,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6730
6755
|
*
|
|
6731
6756
|
* @returns Indicates whether the supplied path is within the session's allowed directories.
|
|
6732
6757
|
*/
|
|
6733
|
-
isPathWithinAllowedDirectories: async (params) => connection.sendRequest("session.permissions.paths.isPathWithinAllowedDirectories", {
|
|
6758
|
+
isPathWithinAllowedDirectories: async (params) => connection.sendRequest("session.permissions.paths.isPathWithinAllowedDirectories", { ...params, sessionId }),
|
|
6734
6759
|
/**
|
|
6735
6760
|
* Reports whether a path falls within the session's workspace (primary) directory.
|
|
6736
6761
|
*
|
|
@@ -6738,7 +6763,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6738
6763
|
*
|
|
6739
6764
|
* @returns Indicates whether the supplied path is within the session's workspace directory.
|
|
6740
6765
|
*/
|
|
6741
|
-
isPathWithinWorkspace: async (params) => connection.sendRequest("session.permissions.paths.isPathWithinWorkspace", {
|
|
6766
|
+
isPathWithinWorkspace: async (params) => connection.sendRequest("session.permissions.paths.isPathWithinWorkspace", { ...params, sessionId })
|
|
6742
6767
|
},
|
|
6743
6768
|
/** @experimental */
|
|
6744
6769
|
locations: {
|
|
@@ -6749,7 +6774,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6749
6774
|
*
|
|
6750
6775
|
* @returns Resolved location-permissions key and type.
|
|
6751
6776
|
*/
|
|
6752
|
-
resolve: async (params) => connection.sendRequest("session.permissions.locations.resolve", {
|
|
6777
|
+
resolve: async (params) => connection.sendRequest("session.permissions.locations.resolve", { ...params, sessionId }),
|
|
6753
6778
|
/**
|
|
6754
6779
|
* Applies persisted location-scoped tool approvals and allowed directories for a working directory to this session's permission service.
|
|
6755
6780
|
*
|
|
@@ -6757,7 +6782,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6757
6782
|
*
|
|
6758
6783
|
* @returns Summary of persisted location permissions applied to the session.
|
|
6759
6784
|
*/
|
|
6760
|
-
apply: async (params) => connection.sendRequest("session.permissions.locations.apply", {
|
|
6785
|
+
apply: async (params) => connection.sendRequest("session.permissions.locations.apply", { ...params, sessionId }),
|
|
6761
6786
|
/**
|
|
6762
6787
|
* Persists a tool approval for a permission location and applies its rules to this session's live permission service.
|
|
6763
6788
|
*
|
|
@@ -6765,7 +6790,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6765
6790
|
*
|
|
6766
6791
|
* @returns Indicates whether the operation succeeded.
|
|
6767
6792
|
*/
|
|
6768
|
-
addToolApproval: async (params) => connection.sendRequest("session.permissions.locations.addToolApproval", {
|
|
6793
|
+
addToolApproval: async (params) => connection.sendRequest("session.permissions.locations.addToolApproval", { ...params, sessionId })
|
|
6769
6794
|
},
|
|
6770
6795
|
/** @experimental */
|
|
6771
6796
|
folderTrust: {
|
|
@@ -6776,7 +6801,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6776
6801
|
*
|
|
6777
6802
|
* @returns Folder trust check result.
|
|
6778
6803
|
*/
|
|
6779
|
-
isTrusted: async (params) => connection.sendRequest("session.permissions.folderTrust.isTrusted", {
|
|
6804
|
+
isTrusted: async (params) => connection.sendRequest("session.permissions.folderTrust.isTrusted", { ...params, sessionId }),
|
|
6780
6805
|
/**
|
|
6781
6806
|
* Adds a folder to the user's trusted folders list.
|
|
6782
6807
|
*
|
|
@@ -6784,7 +6809,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6784
6809
|
*
|
|
6785
6810
|
* @returns Indicates whether the operation succeeded.
|
|
6786
6811
|
*/
|
|
6787
|
-
addTrusted: async (params) => connection.sendRequest("session.permissions.folderTrust.addTrusted", {
|
|
6812
|
+
addTrusted: async (params) => connection.sendRequest("session.permissions.folderTrust.addTrusted", { ...params, sessionId })
|
|
6788
6813
|
},
|
|
6789
6814
|
/** @experimental */
|
|
6790
6815
|
urls: {
|
|
@@ -6795,7 +6820,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6795
6820
|
*
|
|
6796
6821
|
* @returns Indicates whether the operation succeeded.
|
|
6797
6822
|
*/
|
|
6798
|
-
setUnrestrictedMode: async (params) => connection.sendRequest("session.permissions.urls.setUnrestrictedMode", {
|
|
6823
|
+
setUnrestrictedMode: async (params) => connection.sendRequest("session.permissions.urls.setUnrestrictedMode", { ...params, sessionId })
|
|
6799
6824
|
}
|
|
6800
6825
|
},
|
|
6801
6826
|
/**
|
|
@@ -6807,7 +6832,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6807
6832
|
*
|
|
6808
6833
|
* @experimental
|
|
6809
6834
|
*/
|
|
6810
|
-
log: async (params) => connection.sendRequest("session.log", {
|
|
6835
|
+
log: async (params) => connection.sendRequest("session.log", { ...params, sessionId }),
|
|
6811
6836
|
/** @experimental */
|
|
6812
6837
|
metadata: {
|
|
6813
6838
|
/**
|
|
@@ -6829,7 +6854,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6829
6854
|
*
|
|
6830
6855
|
* @returns Client-owned, case-sensitive string metadata persisted with a local session. Clients should namespace keys by owner. Keys must be non-empty and at most 256 UTF-8 bytes; keys under `copilot/` and `github/` are reserved. Values may contain at most 16 KiB of UTF-8 data. A bag may contain at most 128 entries and its serialized sidecar may contain at most 64 KiB. The runtime stores but never interprets these values.
|
|
6831
6856
|
*/
|
|
6832
|
-
updateClientMetadata: async (params) => connection.sendRequest("session.metadata.updateClientMetadata", {
|
|
6857
|
+
updateClientMetadata: async (params) => connection.sendRequest("session.metadata.updateClientMetadata", { ...params, sessionId }),
|
|
6833
6858
|
/**
|
|
6834
6859
|
* Reports whether the local session is currently processing user/agent messages.
|
|
6835
6860
|
*
|
|
@@ -6849,7 +6874,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6849
6874
|
*
|
|
6850
6875
|
* @returns Token breakdown for the session's current context window, or null if uninitialized.
|
|
6851
6876
|
*/
|
|
6852
|
-
contextInfo: async (params) => connection.sendRequest("session.metadata.contextInfo", {
|
|
6877
|
+
contextInfo: async (params) => connection.sendRequest("session.metadata.contextInfo", { ...params, sessionId }),
|
|
6853
6878
|
/**
|
|
6854
6879
|
* Returns the experimental per-source attribution breakdown of the session's current context window as a flat list of entries (skills, subagents, MCP servers, built-in tools, plugin rollups, system/tool-definition costs, with nesting via parentId), plus the successful compaction count. The heaviest individual messages are available separately via `metadata.getContextHeaviestMessages`. Returns null until the session has initialized its system prompt and tool metadata.
|
|
6855
6880
|
*
|
|
@@ -6863,7 +6888,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6863
6888
|
*
|
|
6864
6889
|
* @returns The heaviest individual messages in the session's context window, most-expensive first.
|
|
6865
6890
|
*/
|
|
6866
|
-
getContextHeaviestMessages: async (params) => connection.sendRequest("session.metadata.getContextHeaviestMessages", {
|
|
6891
|
+
getContextHeaviestMessages: async (params) => connection.sendRequest("session.metadata.getContextHeaviestMessages", { ...params, sessionId }),
|
|
6867
6892
|
/**
|
|
6868
6893
|
* Records a working-directory/git context change and emits a `session.context_changed` event. For a local session, a report whose `cwd` diverges from the session's current working directory is ignored (the call still succeeds but records nothing and emits no event): a local session's working directory is authoritative and is moved via `metadata.setWorkingDirectory` (or an SDK `session.resume` that supplies a `workingDirectory`), not by this method.
|
|
6869
6894
|
*
|
|
@@ -6871,7 +6896,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6871
6896
|
*
|
|
6872
6897
|
* @returns Notify the session that its working directory context has changed. Emits a `session.context_changed` event so consumers (telemetry, OTel tracker, ACP, the timeline UI) can react. Use this when the host has detected a cwd/branch/repo change outside the session's normal lifecycle (e.g., after a shell command in interactive mode). For a local session, a report whose `cwd` diverges from the session's current working directory is ignored (the call still succeeds but records nothing and emits no event); move a local session's working directory via `metadata.setWorkingDirectory` instead.
|
|
6873
6898
|
*/
|
|
6874
|
-
recordContextChange: async (params) => connection.sendRequest("session.metadata.recordContextChange", {
|
|
6899
|
+
recordContextChange: async (params) => connection.sendRequest("session.metadata.recordContextChange", { ...params, sessionId }),
|
|
6875
6900
|
/**
|
|
6876
6901
|
* Updates the session's working directory. For local sessions the target is validated first (an absolute path that exists on disk) and the permission primary directory is re-based; a rejected validation fails the call before any session state changes.
|
|
6877
6902
|
*
|
|
@@ -6879,7 +6904,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6879
6904
|
*
|
|
6880
6905
|
* @returns Update the session's working directory. Used by the host when the user explicitly changes cwd (e.g., the `/cd` slash command). The host is responsible for any related side-effects (file index, etc.); it does NOT change the process working directory (a session's cwd is per-session, not process-global). For local sessions the runtime validates the target first (an absolute path that exists on disk) and re-bases the permission primary directory; a rejected validation fails the call before anything is mutated, persisted, or emitted. Location-scoped permission rules are then re-keyed to the new directory (best-effort). Remote sessions only record the path.
|
|
6881
6906
|
*/
|
|
6882
|
-
setWorkingDirectory: async (params) => connection.sendRequest("session.metadata.setWorkingDirectory", {
|
|
6907
|
+
setWorkingDirectory: async (params) => connection.sendRequest("session.metadata.setWorkingDirectory", { ...params, sessionId }),
|
|
6883
6908
|
/**
|
|
6884
6909
|
* Re-tokenizes the session's existing messages against a model and returns aggregate token totals.
|
|
6885
6910
|
*
|
|
@@ -6887,7 +6912,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6887
6912
|
*
|
|
6888
6913
|
* @returns Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.context_info_changed` events. Returns zeros for an empty session.
|
|
6889
6914
|
*/
|
|
6890
|
-
recomputeContextTokens: async (params) => connection.sendRequest("session.metadata.recomputeContextTokens", {
|
|
6915
|
+
recomputeContextTokens: async (params) => connection.sendRequest("session.metadata.recomputeContextTokens", { ...params, sessionId })
|
|
6891
6916
|
},
|
|
6892
6917
|
/** @experimental */
|
|
6893
6918
|
contentExclusion: {
|
|
@@ -6898,18 +6923,18 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6898
6923
|
*
|
|
6899
6924
|
* @returns Batch content-exclusion result. Callers must fail closed when policy evaluation is unavailable.
|
|
6900
6925
|
*/
|
|
6901
|
-
checkPaths: async (params) => connection.sendRequest("session.contentExclusion.checkPaths", {
|
|
6926
|
+
checkPaths: async (params) => connection.sendRequest("session.contentExclusion.checkPaths", { ...params, sessionId })
|
|
6902
6927
|
},
|
|
6903
6928
|
/** @experimental */
|
|
6904
6929
|
shell: {
|
|
6905
6930
|
/**
|
|
6906
|
-
* Starts a shell command
|
|
6931
|
+
* Starts a shell command, returning an RPC error if it cannot be spawned. The command runs as the leader of its own process group (POSIX) or in a dedicated job object (Windows), so a forced termination — via "shell.kill", the request timeout, or session disposal — signals that whole group/job rather than only the direct child. Two gaps are worth planning for: a command that exits on its own does not trigger that teardown, and on POSIX a descendant that moves itself into a new session or process group (for example via "setsid") leaves the signalled group, so either can leave a background process running.
|
|
6907
6932
|
*
|
|
6908
|
-
* @param params Shell command to run, with optional working directory and timeout in milliseconds.
|
|
6933
|
+
* @param params Shell command to run, with optional working directory and timeout in milliseconds. Spawn failures return an RPC error.
|
|
6909
6934
|
*
|
|
6910
|
-
* @returns Identifier of the spawned process,
|
|
6935
|
+
* @returns Identifier of the spawned shell process, usable with shell.kill while the process is running.
|
|
6911
6936
|
*/
|
|
6912
|
-
exec: async (params) => connection.sendRequest("session.shell.exec", {
|
|
6937
|
+
exec: async (params) => connection.sendRequest("session.shell.exec", { ...params, sessionId }),
|
|
6913
6938
|
/**
|
|
6914
6939
|
* Sends a signal to a shell process previously started via "shell.exec". The signal targets the command's whole process group (POSIX) or job object (Windows), so descendants still in that group are signalled too, not just the direct child. On POSIX a descendant that moved itself into a new session or process group (for example via "setsid") is no longer in the signalled group and survives.
|
|
6915
6940
|
*
|
|
@@ -6917,7 +6942,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6917
6942
|
*
|
|
6918
6943
|
* @returns Indicates whether the signal was delivered; false if the process was unknown or already exited.
|
|
6919
6944
|
*/
|
|
6920
|
-
kill: async (params) => connection.sendRequest("session.shell.kill", {
|
|
6945
|
+
kill: async (params) => connection.sendRequest("session.shell.kill", { ...params, sessionId }),
|
|
6921
6946
|
/**
|
|
6922
6947
|
* Executes a user-requested shell command through the session runtime.
|
|
6923
6948
|
*
|
|
@@ -6925,7 +6950,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6925
6950
|
*
|
|
6926
6951
|
* @returns Result of a user-requested shell command.
|
|
6927
6952
|
*/
|
|
6928
|
-
executeUserRequested: async (params) => connection.sendRequest("session.shell.executeUserRequested", {
|
|
6953
|
+
executeUserRequested: async (params) => connection.sendRequest("session.shell.executeUserRequested", { ...params, sessionId }),
|
|
6929
6954
|
/**
|
|
6930
6955
|
* Cancels a user-requested shell command by request ID.
|
|
6931
6956
|
*
|
|
@@ -6933,7 +6958,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6933
6958
|
*
|
|
6934
6959
|
* @returns Cancellation result for a user-requested shell command.
|
|
6935
6960
|
*/
|
|
6936
|
-
cancelUserRequested: async (params) => connection.sendRequest("session.shell.cancelUserRequested", {
|
|
6961
|
+
cancelUserRequested: async (params) => connection.sendRequest("session.shell.cancelUserRequested", { ...params, sessionId })
|
|
6937
6962
|
},
|
|
6938
6963
|
/** @experimental */
|
|
6939
6964
|
history: {
|
|
@@ -6944,7 +6969,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6944
6969
|
*
|
|
6945
6970
|
* @returns Compaction outcome with the number of tokens and messages removed, summary text, and the resulting context window breakdown.
|
|
6946
6971
|
*/
|
|
6947
|
-
compact: async (params) => connection.sendRequest("session.history.compact", {
|
|
6972
|
+
compact: async (params) => connection.sendRequest("session.history.compact", { ...params, sessionId }),
|
|
6948
6973
|
/**
|
|
6949
6974
|
* Truncates persisted session history to a specific event.
|
|
6950
6975
|
*
|
|
@@ -6952,7 +6977,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6952
6977
|
*
|
|
6953
6978
|
* @returns Number of events that were removed by the truncation.
|
|
6954
6979
|
*/
|
|
6955
|
-
truncate: async (params) => connection.sendRequest("session.history.truncate", {
|
|
6980
|
+
truncate: async (params) => connection.sendRequest("session.history.truncate", { ...params, sessionId }),
|
|
6956
6981
|
/**
|
|
6957
6982
|
* Lists the user turns that the session can rewind to. Never rejects for a busy session: rewind reads need the session's file-change captures to be settled, so a session that still holds active work answers with `unavailableReason: "session-busy"` and no points, which the caller can retry.
|
|
6958
6983
|
*
|
|
@@ -6966,7 +6991,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6966
6991
|
*
|
|
6967
6992
|
* @returns Files and aggregate changes for a prospective rewind.
|
|
6968
6993
|
*/
|
|
6969
|
-
previewRewind: async (params) => connection.sendRequest("session.history.previewRewind", {
|
|
6994
|
+
previewRewind: async (params) => connection.sendRequest("session.history.previewRewind", { ...params, sessionId }),
|
|
6970
6995
|
/**
|
|
6971
6996
|
* Rewinds the session conversation, optionally restoring files changed by the discarded turns. Not crash-atomic: file restore and conversation truncation are separate stores, applied in that order, so a process crash between them can leave the workspace rewound while the conversation still contains the discarded turns. There is no recovery journal; re-running the same rewind is the recovery path for a crash before truncation lands, since file restore is idempotent (already-restored files are reported as skipped) and truncation is re-derived from the still-retained boundary event. After truncation lands that boundary no longer exists, so the same request is rejected; the only stage that can still be outstanding is snapshot pruning, whose failure leaves orphan snapshots the capture store tolerates. The reverse inconsistency cannot occur, because truncation is never applied before file restore succeeds.
|
|
6972
6997
|
*
|
|
@@ -6974,7 +6999,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
6974
6999
|
*
|
|
6975
7000
|
* @returns Structured outcome of a rewind request.
|
|
6976
7001
|
*/
|
|
6977
|
-
rewind: async (params) => connection.sendRequest("session.history.rewind", {
|
|
7002
|
+
rewind: async (params) => connection.sendRequest("session.history.rewind", { ...params, sessionId }),
|
|
6978
7003
|
/**
|
|
6979
7004
|
* Cancels any in-progress background compaction on a local session.
|
|
6980
7005
|
*
|
|
@@ -7000,7 +7025,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7000
7025
|
*
|
|
7001
7026
|
* @returns What a successful clear removed. A clear that could not be applied rejects instead of reporting a count.
|
|
7002
7027
|
*/
|
|
7003
|
-
clearContext: async (params) => connection.sendRequest("session.history.clearContext", {
|
|
7028
|
+
clearContext: async (params) => connection.sendRequest("session.history.clearContext", { ...params, sessionId })
|
|
7004
7029
|
},
|
|
7005
7030
|
/** @experimental */
|
|
7006
7031
|
queue: {
|
|
@@ -7017,7 +7042,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7017
7042
|
*
|
|
7018
7043
|
* @returns Result of moving a queued item.
|
|
7019
7044
|
*/
|
|
7020
|
-
moveItem: async (params) => connection.sendRequest("session.queue.moveItem", {
|
|
7045
|
+
moveItem: async (params) => connection.sendRequest("session.queue.moveItem", { ...params, sessionId }),
|
|
7021
7046
|
/**
|
|
7022
7047
|
* Inserts a new queued message at a public visible position.
|
|
7023
7048
|
*
|
|
@@ -7025,7 +7050,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7025
7050
|
*
|
|
7026
7051
|
* @returns Result of inserting a queued message.
|
|
7027
7052
|
*/
|
|
7028
|
-
insertAt: async (params) => connection.sendRequest("session.queue.insertAt", {
|
|
7053
|
+
insertAt: async (params) => connection.sendRequest("session.queue.insertAt", { ...params, sessionId }),
|
|
7029
7054
|
/**
|
|
7030
7055
|
* Removes an addressable queued item by its stable id.
|
|
7031
7056
|
*
|
|
@@ -7033,7 +7058,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7033
7058
|
*
|
|
7034
7059
|
* @returns Result of removing a queued item.
|
|
7035
7060
|
*/
|
|
7036
|
-
removeAt: async (params) => connection.sendRequest("session.queue.removeAt", {
|
|
7061
|
+
removeAt: async (params) => connection.sendRequest("session.queue.removeAt", { ...params, sessionId }),
|
|
7037
7062
|
/**
|
|
7038
7063
|
* Updates the text of an addressable single-message queue item.
|
|
7039
7064
|
*
|
|
@@ -7041,7 +7066,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7041
7066
|
*
|
|
7042
7067
|
* @returns Result of editing a queued message.
|
|
7043
7068
|
*/
|
|
7044
|
-
updateText: async (params) => connection.sendRequest("session.queue.updateText", {
|
|
7069
|
+
updateText: async (params) => connection.sendRequest("session.queue.updateText", { ...params, sessionId }),
|
|
7045
7070
|
/**
|
|
7046
7071
|
* Atomically withdraws an unchanged user message of a local session: from the queued or steering lane while unconsumed, or from the running turn it started while the model has not answered it and nothing the user sent after it is pending. Withdrawing from the running turn interrupts that turn and removes its events from history. A client retaining the original draft may restore it only when removed is true.
|
|
7047
7072
|
*
|
|
@@ -7049,7 +7074,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7049
7074
|
*
|
|
7050
7075
|
* @returns Result of withdrawing a user message.
|
|
7051
7076
|
*/
|
|
7052
|
-
withdrawMessage: async (params) => connection.sendRequest("session.queue.withdrawMessage", {
|
|
7077
|
+
withdrawMessage: async (params) => connection.sendRequest("session.queue.withdrawMessage", { ...params, sessionId }),
|
|
7053
7078
|
/**
|
|
7054
7079
|
* Atomically appends text and attachments to an unchanged, unconsumed local steering message. Returns updated=false if delivery or withdrawal already claimed the message.
|
|
7055
7080
|
*
|
|
@@ -7057,7 +7082,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7057
7082
|
*
|
|
7058
7083
|
* @returns Result of editing a queued message.
|
|
7059
7084
|
*/
|
|
7060
|
-
appendSteering: async (params) => connection.sendRequest("session.queue.appendSteering", {
|
|
7085
|
+
appendSteering: async (params) => connection.sendRequest("session.queue.appendSteering", { ...params, sessionId }),
|
|
7061
7086
|
/**
|
|
7062
7087
|
* Duplicates an addressable queued item immediately after its source.
|
|
7063
7088
|
*
|
|
@@ -7065,13 +7090,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7065
7090
|
*
|
|
7066
7091
|
* @returns Result of duplicating a queued item.
|
|
7067
7092
|
*/
|
|
7068
|
-
duplicateAt: async (params) => connection.sendRequest("session.queue.duplicateAt", {
|
|
7093
|
+
duplicateAt: async (params) => connection.sendRequest("session.queue.duplicateAt", { ...params, sessionId }),
|
|
7069
7094
|
/**
|
|
7070
7095
|
* Acquires or releases the queued-lane drain pause.
|
|
7071
7096
|
*
|
|
7072
7097
|
* @param params Parameters for acquiring or releasing the queued-lane drain pause. Acquisition is exclusive and non-idempotent: `paused: true` against an already-paused session fails with `queue_already_paused`. The pause is never released automatically — it is not tied to the caller's lifetime, so a client that exits without sending `paused: false` leaves the lane frozen. Release is unowned: `paused: false` clears the pause for any caller, including one that never acquired it.
|
|
7073
7098
|
*/
|
|
7074
|
-
setDrainPaused: async (params) => connection.sendRequest("session.queue.setDrainPaused", {
|
|
7099
|
+
setDrainPaused: async (params) => connection.sendRequest("session.queue.setDrainPaused", { ...params, sessionId }),
|
|
7075
7100
|
/**
|
|
7076
7101
|
* Moves an addressable queued message into the live turn's steering lane.
|
|
7077
7102
|
*
|
|
@@ -7079,7 +7104,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7079
7104
|
*
|
|
7080
7105
|
* @returns Result of trying to steer a queued message into a live turn.
|
|
7081
7106
|
*/
|
|
7082
|
-
sendNow: async (params) => connection.sendRequest("session.queue.sendNow", {
|
|
7107
|
+
sendNow: async (params) => connection.sendRequest("session.queue.sendNow", { ...params, sessionId }),
|
|
7083
7108
|
/**
|
|
7084
7109
|
* Removes the most recently queued user-facing item (LIFO).
|
|
7085
7110
|
*
|
|
@@ -7100,7 +7125,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7100
7125
|
*
|
|
7101
7126
|
* @returns Batch of session events returned by a read, with cursor and continuation metadata.
|
|
7102
7127
|
*/
|
|
7103
|
-
read: async (params) => connection.sendRequest("session.eventLog.read", {
|
|
7128
|
+
read: async (params) => connection.sendRequest("session.eventLog.read", { ...params, sessionId }),
|
|
7104
7129
|
/**
|
|
7105
7130
|
* Returns a snapshot of the current tail cursor without consuming events.
|
|
7106
7131
|
*
|
|
@@ -7114,7 +7139,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7114
7139
|
*
|
|
7115
7140
|
* @returns Opaque handle representing an event-type interest registration.
|
|
7116
7141
|
*/
|
|
7117
|
-
registerInterest: async (params) => connection.sendRequest("session.eventLog.registerInterest", {
|
|
7142
|
+
registerInterest: async (params) => connection.sendRequest("session.eventLog.registerInterest", { ...params, sessionId }),
|
|
7118
7143
|
/**
|
|
7119
7144
|
* Releases a consumer's previously-registered interest in an event type.
|
|
7120
7145
|
*
|
|
@@ -7122,7 +7147,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7122
7147
|
*
|
|
7123
7148
|
* @returns Indicates whether the operation succeeded.
|
|
7124
7149
|
*/
|
|
7125
|
-
releaseInterest: async (params) => connection.sendRequest("session.eventLog.releaseInterest", {
|
|
7150
|
+
releaseInterest: async (params) => connection.sendRequest("session.eventLog.releaseInterest", { ...params, sessionId })
|
|
7126
7151
|
},
|
|
7127
7152
|
/** @experimental */
|
|
7128
7153
|
usage: {
|
|
@@ -7142,7 +7167,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7142
7167
|
*
|
|
7143
7168
|
* @returns Prediction result. Available results include prediction details; unavailable results include an explicit reason.
|
|
7144
7169
|
*/
|
|
7145
|
-
predict: async (params) => connection.sendRequest("session.limitPrediction.predict", {
|
|
7170
|
+
predict: async (params) => connection.sendRequest("session.limitPrediction.predict", { ...params, sessionId })
|
|
7146
7171
|
},
|
|
7147
7172
|
/** @experimental */
|
|
7148
7173
|
remote: {
|
|
@@ -7153,7 +7178,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7153
7178
|
*
|
|
7154
7179
|
* @returns GitHub URL for the session and a flag indicating whether remote steering is enabled.
|
|
7155
7180
|
*/
|
|
7156
|
-
enable: async (params) => connection.sendRequest("session.remote.enable", {
|
|
7181
|
+
enable: async (params) => connection.sendRequest("session.remote.enable", { ...params, sessionId }),
|
|
7157
7182
|
/**
|
|
7158
7183
|
* Disables remote session export and steering.
|
|
7159
7184
|
*/
|
|
@@ -7165,7 +7190,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7165
7190
|
*
|
|
7166
7191
|
* @returns Persist a steerability change as a `session.remote_steerable_changed` event. Used by the host (CLI / SDK consumer) when it has just finished enabling or disabling steering on a remote exporter that the runtime does not directly own.
|
|
7167
7192
|
*/
|
|
7168
|
-
notifySteerableChanged: async (params) => connection.sendRequest("session.remote.notifySteerableChanged", {
|
|
7193
|
+
notifySteerableChanged: async (params) => connection.sendRequest("session.remote.notifySteerableChanged", { ...params, sessionId })
|
|
7169
7194
|
},
|
|
7170
7195
|
/** @experimental */
|
|
7171
7196
|
visibility: {
|
|
@@ -7182,7 +7207,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7182
7207
|
*
|
|
7183
7208
|
* @returns Effective sharing status and shareable GitHub URL after updating session visibility.
|
|
7184
7209
|
*/
|
|
7185
|
-
set: async (params) => connection.sendRequest("session.visibility.set", {
|
|
7210
|
+
set: async (params) => connection.sendRequest("session.visibility.set", { ...params, sessionId })
|
|
7186
7211
|
},
|
|
7187
7212
|
/** @experimental */
|
|
7188
7213
|
schedule: {
|
|
@@ -7199,7 +7224,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
7199
7224
|
*
|
|
7200
7225
|
* @returns Remove a scheduled prompt by id. The result entry is omitted if the id was unknown.
|
|
7201
7226
|
*/
|
|
7202
|
-
stop: async (params) => connection.sendRequest("session.schedule.stop", {
|
|
7227
|
+
stop: async (params) => connection.sendRequest("session.schedule.stop", { ...params, sessionId })
|
|
7203
7228
|
}
|
|
7204
7229
|
};
|
|
7205
7230
|
}
|
|
@@ -7212,7 +7237,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7212
7237
|
*
|
|
7213
7238
|
* @experimental
|
|
7214
7239
|
*/
|
|
7215
|
-
sendSystemNotification: async (params) => connection.sendRequest("session.sendSystemNotification", {
|
|
7240
|
+
sendSystemNotification: async (params) => connection.sendRequest("session.sendSystemNotification", { ...params, sessionId }),
|
|
7216
7241
|
/** @experimental */
|
|
7217
7242
|
gitHubAuth: {
|
|
7218
7243
|
/**
|
|
@@ -7240,13 +7265,13 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7240
7265
|
*
|
|
7241
7266
|
* @returns Authentication credentials accepted only at native protocol ingress. Runtime outputs use credential-free `AuthIdentity` metadata.
|
|
7242
7267
|
*/
|
|
7243
|
-
login: async (params) => connection.sendRequest("session.gitHubAuth.login", {
|
|
7268
|
+
login: async (params) => connection.sendRequest("session.gitHubAuth.login", { ...params, sessionId }),
|
|
7244
7269
|
/**
|
|
7245
7270
|
* Switches the session to another available authentication.
|
|
7246
7271
|
*
|
|
7247
7272
|
* @param params Parameters for switching the session's active authentication.
|
|
7248
7273
|
*/
|
|
7249
|
-
switchToAuth: async (params) => connection.sendRequest("session.gitHubAuth.switchToAuth", {
|
|
7274
|
+
switchToAuth: async (params) => connection.sendRequest("session.gitHubAuth.switchToAuth", { ...params, sessionId }),
|
|
7250
7275
|
/**
|
|
7251
7276
|
* Logs out the session's current GitHub authentication.
|
|
7252
7277
|
*
|
|
@@ -7260,7 +7285,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7260
7285
|
*
|
|
7261
7286
|
* @returns Whether the requested authentication was logged out.
|
|
7262
7287
|
*/
|
|
7263
|
-
logoutUser: async (params) => connection.sendRequest("session.gitHubAuth.logoutUser", {
|
|
7288
|
+
logoutUser: async (params) => connection.sendRequest("session.gitHubAuth.logoutUser", { ...params, sessionId }),
|
|
7264
7289
|
/**
|
|
7265
7290
|
* Gets validation errors from the most recent authentication attempt.
|
|
7266
7291
|
*
|
|
@@ -7277,13 +7302,13 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7277
7302
|
*
|
|
7278
7303
|
* @param params Internal canvas provider registration parameters.
|
|
7279
7304
|
*/
|
|
7280
|
-
register: async (params) => connection.sendRequest("session.canvas.provider.register", {
|
|
7305
|
+
register: async (params) => connection.sendRequest("session.canvas.provider.register", { ...params, sessionId }),
|
|
7281
7306
|
/**
|
|
7282
7307
|
* Unregisters an internal canvas provider connection.
|
|
7283
7308
|
*
|
|
7284
7309
|
* @param params Internal canvas provider unregistration parameters.
|
|
7285
7310
|
*/
|
|
7286
|
-
unregister: async (params) => connection.sendRequest("session.canvas.provider.unregister", {
|
|
7311
|
+
unregister: async (params) => connection.sendRequest("session.canvas.provider.unregister", { ...params, sessionId })
|
|
7287
7312
|
}
|
|
7288
7313
|
},
|
|
7289
7314
|
/** @experimental */
|
|
@@ -7295,7 +7320,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7295
7320
|
*
|
|
7296
7321
|
* @returns Complete current or terminal workflow run envelope.
|
|
7297
7322
|
*/
|
|
7298
|
-
runFromTool: async (params) => connection.sendRequest("session.workflow.runFromTool", {
|
|
7323
|
+
runFromTool: async (params) => connection.sendRequest("session.workflow.runFromTool", { ...params, sessionId }),
|
|
7299
7324
|
/**
|
|
7300
7325
|
* Internal tool-originated dynamic workflow resume.
|
|
7301
7326
|
*
|
|
@@ -7303,13 +7328,13 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7303
7328
|
*
|
|
7304
7329
|
* @returns Resolved persisted workflow identity and resumed run envelope.
|
|
7305
7330
|
*/
|
|
7306
|
-
resumeFromTool: async (params) => connection.sendRequest("session.workflow.resumeFromTool", {
|
|
7331
|
+
resumeFromTool: async (params) => connection.sendRequest("session.workflow.resumeFromTool", { ...params, sessionId }),
|
|
7307
7332
|
/**
|
|
7308
7333
|
* Atomically pauses an owned dynamic workflow attempt at a durable checkpoint.
|
|
7309
7334
|
*
|
|
7310
7335
|
* @param params Parameters for an owned durable pause checkpoint.
|
|
7311
7336
|
*/
|
|
7312
|
-
pauseAtCheckpoint: async (params) => connection.sendRequest("session.workflow.pauseAtCheckpoint", {
|
|
7337
|
+
pauseAtCheckpoint: async (params) => connection.sendRequest("session.workflow.pauseAtCheckpoint", { ...params, sessionId })
|
|
7313
7338
|
},
|
|
7314
7339
|
/** @experimental */
|
|
7315
7340
|
model: {
|
|
@@ -7320,7 +7345,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7320
7345
|
*
|
|
7321
7346
|
* @returns The model identifier active on the session after the switch.
|
|
7322
7347
|
*/
|
|
7323
|
-
applyStartupOverlay: async (params) => connection.sendRequest("session.model.applyStartupOverlay", {
|
|
7348
|
+
applyStartupOverlay: async (params) => connection.sendRequest("session.model.applyStartupOverlay", { ...params, sessionId })
|
|
7324
7349
|
},
|
|
7325
7350
|
/** @experimental */
|
|
7326
7351
|
mcp: {
|
|
@@ -7331,7 +7356,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7331
7356
|
*
|
|
7332
7357
|
* @returns MCP server startup filtering result.
|
|
7333
7358
|
*/
|
|
7334
|
-
reloadWithConfig: async (params) => connection.sendRequest("session.mcp.reloadWithConfig", {
|
|
7359
|
+
reloadWithConfig: async (params) => connection.sendRequest("session.mcp.reloadWithConfig", { ...params, sessionId }),
|
|
7335
7360
|
/**
|
|
7336
7361
|
* Configures the built-in GitHub MCP server for the session's current auth context.
|
|
7337
7362
|
*
|
|
@@ -7339,19 +7364,19 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7339
7364
|
*
|
|
7340
7365
|
* @returns Result of configuring GitHub MCP.
|
|
7341
7366
|
*/
|
|
7342
|
-
configureGitHub: async (params) => connection.sendRequest("session.mcp.configureGitHub", {
|
|
7367
|
+
configureGitHub: async (params) => connection.sendRequest("session.mcp.configureGitHub", { ...params, sessionId }),
|
|
7343
7368
|
/**
|
|
7344
7369
|
* Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself.
|
|
7345
7370
|
*
|
|
7346
7371
|
* @param params Registration parameters for an external MCP client.
|
|
7347
7372
|
*/
|
|
7348
|
-
registerExternalClient: async (params) => connection.sendRequest("session.mcp.registerExternalClient", {
|
|
7373
|
+
registerExternalClient: async (params) => connection.sendRequest("session.mcp.registerExternalClient", { ...params, sessionId }),
|
|
7349
7374
|
/**
|
|
7350
7375
|
* Unregisters a previously registered external MCP client by server name. Marked internal as the paired companion of `registerExternalClient`: only in-process callers that registered a client this way can meaningfully unregister it. Disappears alongside `registerExternalClient`: once external clients are described to the runtime as config rather than handed in as instances, lifecycle (including deregistration) is owned entirely by the runtime.
|
|
7351
7376
|
*
|
|
7352
7377
|
* @param params Server name identifying the external client to remove.
|
|
7353
7378
|
*/
|
|
7354
|
-
unregisterExternalClient: async (params) => connection.sendRequest("session.mcp.unregisterExternalClient", {
|
|
7379
|
+
unregisterExternalClient: async (params) => connection.sendRequest("session.mcp.unregisterExternalClient", { ...params, sessionId })
|
|
7355
7380
|
},
|
|
7356
7381
|
/** @experimental */
|
|
7357
7382
|
connectors: {
|
|
@@ -7362,7 +7387,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7362
7387
|
*
|
|
7363
7388
|
* @returns Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included.
|
|
7364
7389
|
*/
|
|
7365
|
-
reconcileForStartup: async (params) => connection.sendRequest("session.connectors.reconcileForStartup", {
|
|
7390
|
+
reconcileForStartup: async (params) => connection.sendRequest("session.connectors.reconcileForStartup", { ...params, sessionId }),
|
|
7366
7391
|
/**
|
|
7367
7392
|
* Removes the runtime-owned Connector MCP projection without changing service-side connections.
|
|
7368
7393
|
*
|
|
@@ -7379,7 +7404,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7379
7404
|
*
|
|
7380
7405
|
* @returns Whether finalizing the invocation effect succeeded, and the failure reason when it did not.
|
|
7381
7406
|
*/
|
|
7382
|
-
finalizeInvocationEffect: async (params) => connection.sendRequest("session.commands.finalizeInvocationEffect", {
|
|
7407
|
+
finalizeInvocationEffect: async (params) => connection.sendRequest("session.commands.finalizeInvocationEffect", { ...params, sessionId })
|
|
7383
7408
|
},
|
|
7384
7409
|
/** @experimental */
|
|
7385
7410
|
settings: {
|
|
@@ -7396,7 +7421,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7396
7421
|
*
|
|
7397
7422
|
* @returns Result of evaluating a Rust-owned settings predicate.
|
|
7398
7423
|
*/
|
|
7399
|
-
evaluatePredicate: async (params) => connection.sendRequest("session.settings.evaluatePredicate", {
|
|
7424
|
+
evaluatePredicate: async (params) => connection.sendRequest("session.settings.evaluatePredicate", { ...params, sessionId })
|
|
7400
7425
|
},
|
|
7401
7426
|
/** @experimental */
|
|
7402
7427
|
queue: {
|
|
@@ -7419,7 +7444,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7419
7444
|
*
|
|
7420
7445
|
* @returns Whether a deferred-idle drain should run.
|
|
7421
7446
|
*/
|
|
7422
|
-
beginDeferredIdleDrain: async (params) => connection.sendRequest("session.queue.beginDeferredIdleDrain", {
|
|
7447
|
+
beginDeferredIdleDrain: async (params) => connection.sendRequest("session.queue.beginDeferredIdleDrain", { ...params, sessionId }),
|
|
7423
7448
|
/**
|
|
7424
7449
|
* Finishes a native deferred-idle drain and reports whether to drain queue work or emit idle.
|
|
7425
7450
|
*
|
|
@@ -7427,13 +7452,13 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7427
7452
|
*
|
|
7428
7453
|
* @returns Action selected by the native deferred-idle drain.
|
|
7429
7454
|
*/
|
|
7430
|
-
finishDeferredIdleDrain: async (params) => connection.sendRequest("session.queue.finishDeferredIdleDrain", {
|
|
7455
|
+
finishDeferredIdleDrain: async (params) => connection.sendRequest("session.queue.finishDeferredIdleDrain", { ...params, sessionId }),
|
|
7431
7456
|
/**
|
|
7432
7457
|
* Marks session.idle as deferred by native background work state.
|
|
7433
7458
|
*
|
|
7434
7459
|
* @param params Inputs for marking session.idle deferred in native state.
|
|
7435
7460
|
*/
|
|
7436
|
-
deferSessionIdle: async (params) => connection.sendRequest("session.queue.deferSessionIdle", {
|
|
7461
|
+
deferSessionIdle: async (params) => connection.sendRequest("session.queue.deferSessionIdle", { ...params, sessionId }),
|
|
7437
7462
|
/**
|
|
7438
7463
|
* Consumes queued native system notifications matching an internal filter.
|
|
7439
7464
|
*
|
|
@@ -7441,7 +7466,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7441
7466
|
*
|
|
7442
7467
|
* @returns Indicates whether a user-facing pending item was removed.
|
|
7443
7468
|
*/
|
|
7444
|
-
consumeSystemNotifications: async (params) => connection.sendRequest("session.queue.consumeSystemNotifications", {
|
|
7469
|
+
consumeSystemNotifications: async (params) => connection.sendRequest("session.queue.consumeSystemNotifications", { ...params, sessionId }),
|
|
7445
7470
|
/**
|
|
7446
7471
|
* Enqueues the internal resume-pending wake item when orphan handling needs a follow-up turn.
|
|
7447
7472
|
*
|
|
@@ -7472,7 +7497,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7472
7497
|
*
|
|
7473
7498
|
* @returns Result of registering or re-arming a scheduled prompt.
|
|
7474
7499
|
*/
|
|
7475
|
-
add: async (params) => connection.sendRequest("session.schedule.add", {
|
|
7500
|
+
add: async (params) => connection.sendRequest("session.schedule.add", { ...params, sessionId }),
|
|
7476
7501
|
/**
|
|
7477
7502
|
* Registers a recurring cron scheduled prompt.
|
|
7478
7503
|
*
|
|
@@ -7480,7 +7505,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7480
7505
|
*
|
|
7481
7506
|
* @returns Result of registering or re-arming a scheduled prompt.
|
|
7482
7507
|
*/
|
|
7483
|
-
addCron: async (params) => connection.sendRequest("session.schedule.addCron", {
|
|
7508
|
+
addCron: async (params) => connection.sendRequest("session.schedule.addCron", { ...params, sessionId }),
|
|
7484
7509
|
/**
|
|
7485
7510
|
* Registers an absolute-time scheduled prompt.
|
|
7486
7511
|
*
|
|
@@ -7488,7 +7513,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7488
7513
|
*
|
|
7489
7514
|
* @returns Result of registering or re-arming a scheduled prompt.
|
|
7490
7515
|
*/
|
|
7491
|
-
addAt: async (params) => connection.sendRequest("session.schedule.addAt", {
|
|
7516
|
+
addAt: async (params) => connection.sendRequest("session.schedule.addAt", { ...params, sessionId }),
|
|
7492
7517
|
/**
|
|
7493
7518
|
* Registers a self-paced scheduled prompt.
|
|
7494
7519
|
*
|
|
@@ -7496,7 +7521,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7496
7521
|
*
|
|
7497
7522
|
* @returns Result of registering or re-arming a scheduled prompt.
|
|
7498
7523
|
*/
|
|
7499
|
-
addSelfPaced: async (params) => connection.sendRequest("session.schedule.addSelfPaced", {
|
|
7524
|
+
addSelfPaced: async (params) => connection.sendRequest("session.schedule.addSelfPaced", { ...params, sessionId }),
|
|
7500
7525
|
/**
|
|
7501
7526
|
* Re-arms an active self-paced scheduled prompt.
|
|
7502
7527
|
*
|
|
@@ -7504,7 +7529,7 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
7504
7529
|
*
|
|
7505
7530
|
* @returns Result of registering or re-arming a scheduled prompt.
|
|
7506
7531
|
*/
|
|
7507
|
-
rearmSelfPaced: async (params) => connection.sendRequest("session.schedule.rearmSelfPaced", {
|
|
7532
|
+
rearmSelfPaced: async (params) => connection.sendRequest("session.schedule.rearmSelfPaced", { ...params, sessionId })
|
|
7508
7533
|
}
|
|
7509
7534
|
};
|
|
7510
7535
|
}
|