@tickernelz/paperclip-pro-adapter-utils 2026.1001.2 → 2026.1002.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +1 -1
  2. package/node_modules/@agentclientprotocol/sdk/dist/acp.js +1 -1
  3. package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -1
  4. package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +8 -31
  5. package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -1
  6. package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.d.ts +60 -0
  7. package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js +55 -0
  8. package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js.map +1 -1
  9. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +1 -3
  10. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +0 -2
  11. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -1
  12. package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +428 -114
  13. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +3516 -1530
  14. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +256 -78
  15. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -1
  16. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +0 -7
  17. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +0 -6
  18. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -1
  19. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +19 -7
  20. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -1
  21. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +52 -36
  22. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +62 -35
  23. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -1
  24. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +1 -3
  25. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +0 -2
  26. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -1
  27. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +394 -188
  28. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +4535 -464
  29. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +236 -117
  30. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -1
  31. package/node_modules/@agentclientprotocol/sdk/package.json +1 -1
  32. package/node_modules/@agentclientprotocol/sdk/schema/schema.json +591 -193
  33. package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +547 -303
  34. package/package.json +2 -2
@@ -13,7 +13,7 @@ export type AgentRequest = {
13
13
  /**
14
14
  * Method-specific request parameters.
15
15
  */
16
- params?: WriteTextFileRequest | ReadTextFileRequest | RequestPermissionRequest | CreateTerminalRequest | TerminalOutputRequest | ReleaseTerminalRequest | WaitForTerminalExitRequest | KillTerminalRequest | CreateElicitationRequest | ConnectMcpRequest | MessageMcpRequest | DisconnectMcpRequest | ExtRequest | null;
16
+ params?: WriteTextFileRequest | ReadTextFileRequest | RequestPermissionRequest | CreateTerminalRequest | TerminalOutputRequest | ReleaseTerminalRequest | WaitForTerminalExitRequest | KillTerminalRequest | CreateElicitationRequest | MessageMcpRequest | ExtRequest | null;
17
17
  };
18
18
  /**
19
19
  * JSON RPC Request Id
@@ -1317,54 +1317,19 @@ export type ElicitationUrlMode = (ElicitationSessionScope | ElicitationRequestSc
1317
1317
  *
1318
1318
  * This capability is not part of the spec yet, and may be removed or changed at any point.
1319
1319
  *
1320
- * Request parameters for `mcp/connect`.
1320
+ * Request parameters for `mcp/message`.
1321
1321
  *
1322
1322
  * @experimental
1323
1323
  */
1324
- export type ConnectMcpRequest = {
1324
+ export type MessageMcpRequest = {
1325
1325
  /**
1326
- * The ACP MCP server ID that was provided by the component declaring the MCP server.
1326
+ * The declared ACP MCP server receiving this request.
1327
1327
  */
1328
1328
  serverId: McpServerAcpId;
1329
1329
  /**
1330
- * The _meta property is reserved by ACP to allow clients and agents to attach additional
1331
- * metadata to their interactions. Implementations MUST NOT make assumptions about values at
1332
- * these keys.
1333
- *
1334
- * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1335
- */
1336
- _meta?: {
1337
- [key: string]: unknown;
1338
- } | null;
1339
- };
1340
- /**
1341
- * **UNSTABLE**
1342
- *
1343
- * This capability is not part of the spec yet, and may be removed or changed at any point.
1344
- *
1345
- * Unique identifier for an MCP server using the ACP transport.
1346
- *
1347
- * The value is opaque and generated by the ACP component providing the MCP server. It is
1348
- * used by `mcp/connect` to route connection requests back to the component that declared the
1349
- * server.
1350
- *
1351
- * @experimental
1352
- */
1353
- export type McpServerAcpId = string;
1354
- /**
1355
- * **UNSTABLE**
1356
- *
1357
- * This capability is not part of the spec yet, and may be removed or changed at any point.
1358
- *
1359
- * Request parameters for `mcp/message`.
1360
- *
1361
- * @experimental
1362
- */
1363
- export type MessageMcpRequest = {
1364
- /**
1365
- * The MCP-over-ACP connection this message is sent on.
1330
+ * The caller-generated identifier for the inner MCP request.
1366
1331
  */
1367
- connectionId: McpConnectionId;
1332
+ requestId: McpRequestId;
1368
1333
  /**
1369
1334
  * The inner MCP method name.
1370
1335
  */
@@ -1393,36 +1358,27 @@ export type MessageMcpRequest = {
1393
1358
  *
1394
1359
  * This capability is not part of the spec yet, and may be removed or changed at any point.
1395
1360
  *
1396
- * A unique identifier for an active MCP-over-ACP connection.
1361
+ * Unique identifier for an MCP server using the ACP transport.
1362
+ *
1363
+ * The value is opaque and generated by the ACP component providing the MCP server. It is
1364
+ * used by `mcp/message` to route requests to the component that declared the server.
1397
1365
  *
1398
1366
  * @experimental
1399
1367
  */
1400
- export type McpConnectionId = string;
1368
+ export type McpServerAcpId = string;
1401
1369
  /**
1402
1370
  * **UNSTABLE**
1403
1371
  *
1404
1372
  * This capability is not part of the spec yet, and may be removed or changed at any point.
1405
1373
  *
1406
- * Request parameters for `mcp/disconnect`.
1374
+ * Identifies an inner MCP request active against a server on this ACP connection.
1375
+ *
1376
+ * Generated by the caller and preserved unchanged by proxies. This is distinct
1377
+ * from the outer ACP JSON-RPC request ID.
1407
1378
  *
1408
1379
  * @experimental
1409
1380
  */
1410
- export type DisconnectMcpRequest = {
1411
- /**
1412
- * The MCP-over-ACP connection to close.
1413
- */
1414
- connectionId: McpConnectionId;
1415
- /**
1416
- * The _meta property is reserved by ACP to allow clients and agents to attach additional
1417
- * metadata to their interactions. Implementations MUST NOT make assumptions about values at
1418
- * these keys.
1419
- *
1420
- * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1421
- */
1422
- _meta?: {
1423
- [key: string]: unknown;
1424
- } | null;
1425
- };
1381
+ export type McpRequestId = string;
1426
1382
  /**
1427
1383
  * Allows for sending an arbitrary request that is not part of the ACP spec.
1428
1384
  * Extension methods provide a way to add custom functionality while maintaining
@@ -1442,7 +1398,7 @@ export type AgentResponse = {
1442
1398
  /**
1443
1399
  * Method-specific response data.
1444
1400
  */
1445
- result: InitializeResponse | AuthenticateResponse | ListProvidersResponse | SetProviderResponse | DisableProviderResponse | LogoutResponse | NewSessionResponse | LoadSessionResponse | ListSessionsResponse | DeleteSessionResponse | ForkSessionResponse | ResumeSessionResponse | CloseSessionResponse | SetSessionModeResponse | SetSessionConfigOptionResponse | PromptResponse | StartNesResponse | SuggestNesResponse | CloseNesResponse | ExtResponse | MessageMcpResponse;
1401
+ result: InitializeResponse | AuthenticateResponse | ListProvidersResponse | SetProviderResponse | DisableProviderResponse | LogoutResponse | NewSessionResponse | LoadSessionResponse | ListSessionsResponse | DeleteSessionResponse | ForkSessionResponse | ResumeSessionResponse | CloseSessionResponse | SetSessionModeResponse | SetSessionConfigOptionResponse | PromptResponse | StartNesResponse | SuggestNesResponse | CloseNesResponse | ExtResponse;
1446
1402
  } | {
1447
1403
  /**
1448
1404
  * The id of the request this response answers.
@@ -3310,18 +3266,6 @@ export type CloseNesResponse = {
3310
3266
  * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
3311
3267
  */
3312
3268
  export type ExtResponse = unknown;
3313
- /**
3314
- * **UNSTABLE**
3315
- *
3316
- * This capability is not part of the spec yet, and may be removed or changed at any point.
3317
- *
3318
- * Response to `mcp/message`.
3319
- *
3320
- * This is the inner MCP response result payload. Any JSON value is valid.
3321
- *
3322
- * @experimental
3323
- */
3324
- export type MessageMcpResponse = unknown;
3325
3269
  /**
3326
3270
  * JSON-RPC error object.
3327
3271
  *
@@ -3365,7 +3309,7 @@ export type AgentNotification = {
3365
3309
  /**
3366
3310
  * Method-specific notification parameters.
3367
3311
  */
3368
- params?: SessionNotification | CompleteElicitationNotification | MessageMcpNotification | ExtNotification | null;
3312
+ params?: SessionNotification | CompleteElicitationNotification | ExtNotification | null;
3369
3313
  };
3370
3314
  /**
3371
3315
  * Notification containing a session update from the agent.
@@ -3433,6 +3377,12 @@ export type SessionUpdate = (ContentChunk & {
3433
3377
  sessionUpdate: "compaction_update";
3434
3378
  }) | (CompactionSummaryChunk & {
3435
3379
  sessionUpdate: "compaction_summary_chunk";
3380
+ }) | (SubagentUpdate & {
3381
+ sessionUpdate: "subagent_update";
3382
+ }) | (SessionMessage & {
3383
+ sessionUpdate: "session_message";
3384
+ }) | (SessionMessageChunk & {
3385
+ sessionUpdate: "session_message_chunk";
3436
3386
  });
3437
3387
  /**
3438
3388
  * Unique identifier for a message within a session.
@@ -4094,21 +4044,234 @@ export type CompactionSummaryChunk = {
4094
4044
  } | null;
4095
4045
  };
4096
4046
  /**
4097
- * Notification sent by the agent when a URL-based elicitation is complete.
4047
+ * **UNSTABLE**
4048
+ *
4049
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4050
+ *
4051
+ * Client-initiated session mutations permitted for a specific subagent session.
4052
+ *
4053
+ * A mutation requires an explicit per-child capability; support for the method
4054
+ * on ordinary sessions does not grant support on a child.
4055
+ *
4056
+ * @experimental
4098
4057
  */
4099
- export type CompleteElicitationNotification = {
4058
+ export type SubagentSessionCapabilities = {
4100
4059
  /**
4101
- * The ID of the elicitation that completed.
4060
+ * Permits the client to cancel this child's current work without ending
4061
+ * the session. Omitted or `null` means unsupported; an object (including
4062
+ * `{}`) means supported.
4102
4063
  */
4103
- elicitationId: ElicitationId;
4064
+ cancel?: SessionCancelCapabilities | null;
4065
+ /**
4066
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4067
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4068
+ * these keys.
4069
+ */
4070
+ _meta?: {
4071
+ [key: string]: unknown;
4072
+ } | null;
4073
+ };
4074
+ /**
4075
+ * **UNSTABLE**
4076
+ *
4077
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4078
+ *
4079
+ * Capability to cancel work in a subagent session without ending that session.
4080
+ *
4081
+ * Supplying `{}` advertises support; an omitted or `null` `cancel` does not.
4082
+ *
4083
+ * @experimental
4084
+ */
4085
+ export type SessionCancelCapabilities = {
4104
4086
  /**
4105
4087
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
4106
4088
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4107
4089
  * these keys.
4108
4090
  *
4109
- * Optional. Omitted and `null` are equivalent and mean no metadata.
4091
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4092
+ */
4093
+ _meta?: {
4094
+ [key: string]: unknown;
4095
+ } | null;
4096
+ };
4097
+ /**
4098
+ * **UNSTABLE**
4099
+ *
4100
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4101
+ *
4102
+ * Current foreground-work state of a reusable child session.
4103
+ *
4104
+ * Each update is a whole-object snapshot. Idle does not terminate the child;
4105
+ * the parent can message it again, transitioning it back to running.
4106
+ * Background activity may still emit other session updates while idle.
4107
+ *
4108
+ * @experimental
4109
+ */
4110
+ export type StateUpdate = (RunningStateUpdate & {
4111
+ state: "running";
4112
+ }) | (IdleStateUpdate & {
4113
+ state: "idle";
4114
+ }) | (RequiresActionStateUpdate & {
4115
+ state: "requires_action";
4116
+ }) | (UnknownStateUpdate & {
4117
+ state: "unknown";
4118
+ }) | {
4119
+ /**
4120
+ * Unrecognized state discriminator.
4121
+ */
4122
+ state: string;
4123
+ [key: string]: unknown;
4124
+ };
4125
+ /**
4126
+ * Foreground work is in progress.
4127
+ */
4128
+ export type RunningStateUpdate = {
4129
+ /**
4130
+ * The _meta property is reserved by ACP for additional metadata.
4131
+ * Implementations MUST NOT make assumptions about values at these keys.
4132
+ * Optional; omitted and `null` mean no metadata for this state snapshot.
4133
+ */
4134
+ _meta?: {
4135
+ [key: string]: unknown;
4136
+ } | null;
4137
+ };
4138
+ /**
4139
+ * The child is ready to process another prompt.
4140
+ */
4141
+ export type IdleStateUpdate = {
4142
+ /**
4143
+ * Reason foreground work stopped. Optional; omitted or `null` means not reported.
4144
+ */
4145
+ stopReason?: StopReason | null;
4146
+ /**
4147
+ * **UNSTABLE** Token usage for completed foreground work.
4148
+ *
4149
+ * Optional; omitted or `null` means not reported.
4150
+ *
4151
+ * @experimental
4152
+ */
4153
+ usage?: Usage | null;
4154
+ /**
4155
+ * The _meta property is reserved by ACP for additional metadata.
4156
+ * Implementations MUST NOT make assumptions about values at these keys.
4157
+ * Optional; omitted and `null` mean no metadata for this state snapshot.
4158
+ */
4159
+ _meta?: {
4160
+ [key: string]: unknown;
4161
+ } | null;
4162
+ };
4163
+ /**
4164
+ * Foreground work is blocked on user action.
4165
+ */
4166
+ export type RequiresActionStateUpdate = {
4167
+ /**
4168
+ * The _meta property is reserved by ACP for additional metadata.
4169
+ * Implementations MUST NOT make assumptions about values at these keys.
4170
+ * Optional; omitted and `null` mean no metadata for this state snapshot.
4171
+ */
4172
+ _meta?: {
4173
+ [key: string]: unknown;
4174
+ } | null;
4175
+ };
4176
+ /**
4177
+ * **UNSTABLE**
4178
+ *
4179
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4180
+ *
4181
+ * The Agent cannot currently determine foreground activity.
4182
+ *
4183
+ * Report this when activity becomes unobservable, not merely because the child
4184
+ * has been quiet. The Client MUST stop presenting the previous state as confirmed
4185
+ * current activity, but may retain it as last known. A later state replaces this
4186
+ * snapshot normally.
4187
+ *
4188
+ * This is not a task outcome or session closure. It does not cancel work, resolve
4189
+ * pending requests, or revoke capabilities; capabilities are updated separately.
4190
+ *
4191
+ * @experimental
4192
+ */
4193
+ export type UnknownStateUpdate = {
4194
+ /**
4195
+ * The _meta property is reserved by ACP for additional metadata.
4196
+ * Implementations MUST NOT make assumptions about values at these keys.
4197
+ * Optional; omitted and `null` mean no metadata for this state snapshot.
4198
+ */
4199
+ _meta?: {
4200
+ [key: string]: unknown;
4201
+ } | null;
4202
+ };
4203
+ /**
4204
+ * **UNSTABLE**
4205
+ *
4206
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4207
+ *
4208
+ * Notification that the enclosing parent session created and owns a child session.
4209
+ *
4210
+ * Later updates modify the existing association's metadata, not its ownership.
4211
+ *
4212
+ * Sent on the immediate parent session. The first update for an unknown
4213
+ * [`SubagentUpdate::session_id`] announces the child and MUST be sent
4214
+ * before any live child traffic or live message naming the child as sender
4215
+ * or recipient. Parents may message and reuse an announced child across
4216
+ * multiple operations.
4217
+ * Child events are delivered automatically on the same connection; no child
4218
+ * load, resume, or subscription is needed.
4219
+ *
4220
+ * Only the subagent session ID is required. Omitted patch fields keep their
4221
+ * previous values; `null` clears them. Clearing capabilities disables child
4222
+ * mutations. Clearing state leaves current activity unset/unconfirmed: it does
4223
+ * not imply idle, stop work, or create an `unknown` state snapshot. A concrete
4224
+ * state replaces the entire previous state object, not the session.
4225
+ * The title and description provide the parent's display metadata for the
4226
+ * child. They do not replace the content of individual messages or operations.
4227
+ *
4228
+ * @experimental
4229
+ */
4230
+ export type SubagentUpdate = {
4231
+ /**
4232
+ * The opaque session ID identifying the child in all ACP messages.
4233
+ */
4234
+ sessionId: SessionId;
4235
+ /**
4236
+ * The parent's human-readable display title for this child. It need not be unique.
4237
+ *
4238
+ * Omitted means unchanged; `null` clears it. If unset, the Client chooses
4239
+ * a fallback presentation.
4240
+ */
4241
+ title?: string | null;
4242
+ /**
4243
+ * The parent's human-readable description of the child's role or purpose.
4244
+ *
4245
+ * Omitted means unchanged; `null` clears it. If unset, the Client chooses
4246
+ * a fallback presentation. This is current display metadata, not the
4247
+ * history of instructions sent to the child.
4248
+ */
4249
+ description?: string | null;
4250
+ /**
4251
+ * Client-initiated session mutations permitted for this subagent session.
4252
+ *
4253
+ * Omitted means unchanged; `null` clears the capability set and disables
4254
+ * child mutations. If never supplied, no session mutations are permitted.
4255
+ * Read-only operations retain their normal protocol semantics and capability
4256
+ * requirements. A concrete object replaces the whole capability set.
4257
+ */
4258
+ capabilities?: SubagentSessionCapabilities | null;
4259
+ /**
4260
+ * Current state snapshot for the child session.
4261
+ *
4262
+ * Omitted means unchanged; `null` clears the current activity without
4263
+ * asserting idle or sending an `unknown` snapshot. A concrete state
4264
+ * replaces the previous state object wholesale. If never supplied, the
4265
+ * current activity is unset/unconfirmed.
4266
+ */
4267
+ state?: StateUpdate | null;
4268
+ /**
4269
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4270
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4271
+ * these keys.
4110
4272
  *
4111
4273
  * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4274
+ * Omitted means unchanged; `null` removes the metadata.
4112
4275
  */
4113
4276
  _meta?: {
4114
4277
  [key: string]: unknown;
@@ -4119,35 +4282,87 @@ export type CompleteElicitationNotification = {
4119
4282
  *
4120
4283
  * This capability is not part of the spec yet, and may be removed or changed at any point.
4121
4284
  *
4122
- * Notification parameters for `mcp/message`.
4285
+ * An upsert for an inter-session message.
4286
+ *
4287
+ * @experimental
4288
+ */
4289
+ export type SessionMessage = {
4290
+ /**
4291
+ * Identifier of this message within the enclosing session's transcript.
4292
+ */
4293
+ messageId: MessageId;
4294
+ /**
4295
+ * Optional sending session identity; omission or `null` retains a known value.
4296
+ */
4297
+ senderSessionId?: SessionId | null;
4298
+ /**
4299
+ * Optional receiving session identity; omission or `null` retains a known value.
4300
+ */
4301
+ recipientSessionId?: SessionId | null;
4302
+ /**
4303
+ * Omitted leaves content unchanged; `null` or `[]` clears it.
4304
+ * A non-empty array replaces all content.
4305
+ */
4306
+ content?: Array<ContentBlock> | null;
4307
+ /**
4308
+ * Omitted leaves metadata unchanged; `null` removes it.
4309
+ *
4310
+ * Implementations MUST NOT make assumptions about values in `_meta`.
4311
+ */
4312
+ _meta?: {
4313
+ [key: string]: unknown;
4314
+ } | null;
4315
+ };
4316
+ /**
4317
+ * **UNSTABLE**
4318
+ *
4319
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4123
4320
  *
4124
- * This is used when the wrapped MCP message is a notification and the outer JSON-RPC
4125
- * envelope has no `id`.
4321
+ * A streamed content block of an inter-session message.
4126
4322
  *
4127
4323
  * @experimental
4128
4324
  */
4129
- export type MessageMcpNotification = {
4325
+ export type SessionMessageChunk = {
4130
4326
  /**
4131
- * The MCP-over-ACP connection this message is sent on.
4327
+ * Identifier of this message within the enclosing session's transcript.
4132
4328
  */
4133
- connectionId: McpConnectionId;
4329
+ messageId: MessageId;
4134
4330
  /**
4135
- * The inner MCP method name.
4331
+ * Optional sending session identity; omission or `null` retains a known value.
4136
4332
  */
4137
- method: string;
4333
+ senderSessionId?: SessionId | null;
4138
4334
  /**
4139
- * Optional inner MCP params.
4335
+ * Optional receiving session identity; omission or `null` retains a known value.
4336
+ */
4337
+ recipientSessionId?: SessionId | null;
4338
+ /**
4339
+ * A single content block appended to the message.
4340
+ */
4341
+ content: ContentBlock;
4342
+ /**
4343
+ * Optional and nullable chunk-scoped metadata; omitted or `null` means none.
4140
4344
  *
4141
- * If omitted or set to `null`, the inner MCP message has no params.
4345
+ * Implementations MUST NOT make assumptions about values in `_meta`.
4142
4346
  */
4143
- params?: {
4347
+ _meta?: {
4144
4348
  [key: string]: unknown;
4145
4349
  } | null;
4350
+ };
4351
+ /**
4352
+ * Notification sent by the agent when a URL-based elicitation is complete.
4353
+ */
4354
+ export type CompleteElicitationNotification = {
4355
+ /**
4356
+ * The ID of the elicitation that completed.
4357
+ */
4358
+ elicitationId: ElicitationId;
4146
4359
  /**
4147
4360
  * The _meta property is reserved by ACP to allow clients and agents to attach additional
4148
4361
  * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4149
4362
  * these keys.
4150
4363
  *
4364
+ * Optional. Omitted and `null` are equivalent and mean no metadata.
4365
+ *
4151
4366
  * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
4152
4367
  */
4153
4368
  _meta?: {
@@ -4177,7 +4392,7 @@ export type ClientRequest = {
4177
4392
  /**
4178
4393
  * Method-specific request parameters.
4179
4394
  */
4180
- params?: InitializeRequest | AuthenticateRequest | ListProvidersRequest | SetProviderRequest | DisableProviderRequest | LogoutRequest | NewSessionRequest | LoadSessionRequest | ListSessionsRequest | DeleteSessionRequest | ForkSessionRequest | ResumeSessionRequest | CloseSessionRequest | SetSessionModeRequest | SetSessionConfigOptionRequest | PromptRequest | StartNesRequest | SuggestNesRequest | CloseNesRequest | MessageMcpRequest | ExtRequest | null;
4395
+ params?: InitializeRequest | AuthenticateRequest | ListProvidersRequest | SetProviderRequest | DisableProviderRequest | LogoutRequest | NewSessionRequest | LoadSessionRequest | ListSessionsRequest | DeleteSessionRequest | ForkSessionRequest | ResumeSessionRequest | CloseSessionRequest | SetSessionModeRequest | SetSessionConfigOptionRequest | PromptRequest | StartNesRequest | SuggestNesRequest | CloseNesRequest | ExtRequest | null;
4181
4396
  };
4182
4397
  /**
4183
4398
  * Request parameters for the initialize method.
@@ -4237,6 +4452,21 @@ export type ClientCapabilities = {
4237
4452
  * session-related extensions.
4238
4453
  */
4239
4454
  session?: ClientSessionCapabilities | null;
4455
+ /**
4456
+ * **UNSTABLE**
4457
+ *
4458
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4459
+ *
4460
+ * Whether the client understands exposed subagent sessions.
4461
+ *
4462
+ * Optional and nullable. Omitted or `null` both mean the client does not
4463
+ * advertise support.
4464
+ * Supplying `{}` means the client understands child associations, work-state
4465
+ * snapshots, session-directed messages, and restricted-session semantics.
4466
+ *
4467
+ * @experimental
4468
+ */
4469
+ subagents?: SubagentCapabilities | null;
4240
4470
  /**
4241
4471
  * **UNSTABLE**
4242
4472
  *
@@ -4434,6 +4664,30 @@ export type BooleanConfigOptionCapabilities = {
4434
4664
  export type NoticeCapabilities = {
4435
4665
  [key: string]: unknown;
4436
4666
  };
4667
+ /**
4668
+ * **UNSTABLE**
4669
+ *
4670
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
4671
+ *
4672
+ * Capability marker for exposing reusable child sessions as restricted ACP sessions.
4673
+ *
4674
+ * Supplying `{}` advertises support for child association and state updates,
4675
+ * session-directed messages, and restricted-session semantics. The client
4676
+ * must advertise this capability before the agent sends subagent updates or
4677
+ * session-directed messages.
4678
+ *
4679
+ * @experimental
4680
+ */
4681
+ export type SubagentCapabilities = {
4682
+ /**
4683
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
4684
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
4685
+ * these keys.
4686
+ */
4687
+ _meta?: {
4688
+ [key: string]: unknown;
4689
+ } | null;
4690
+ };
4437
4691
  /**
4438
4692
  * **UNSTABLE**
4439
4693
  *
@@ -4883,7 +5137,7 @@ export type McpServerSse = {
4883
5137
  * ACP transport configuration for MCP.
4884
5138
  *
4885
5139
  * The MCP server is provided by an ACP component and communicates over the ACP channel
4886
- * using `mcp/connect`, `mcp/message`, and `mcp/disconnect`.
5140
+ * using `mcp/message`.
4887
5141
  *
4888
5142
  * @experimental
4889
5143
  */
@@ -5628,7 +5882,7 @@ export type ClientResponse = {
5628
5882
  /**
5629
5883
  * Method-specific response data.
5630
5884
  */
5631
- result: WriteTextFileResponse | ReadTextFileResponse | RequestPermissionResponse | CreateTerminalResponse | TerminalOutputResponse | ReleaseTerminalResponse | WaitForTerminalExitResponse | KillTerminalResponse | CreateElicitationResponse | ConnectMcpResponse | DisconnectMcpResponse | MessageMcpResponse | ExtResponse;
5885
+ result: WriteTextFileResponse | ReadTextFileResponse | RequestPermissionResponse | CreateTerminalResponse | TerminalOutputResponse | ReleaseTerminalResponse | WaitForTerminalExitResponse | KillTerminalResponse | CreateElicitationResponse | MessageMcpResponse | ExtResponse;
5632
5886
  } | {
5633
5887
  /**
5634
5888
  * The id of the request this response answers.
@@ -5892,23 +6146,35 @@ export type ElicitationAcceptAction = {
5892
6146
  /**
5893
6147
  * **UNSTABLE**
5894
6148
  *
5895
- * This capability is not part of the spec yet, and may be removed or changed at any point.
6149
+ * The successful outer ACP `mcp/message` response carries exactly one
6150
+ * inner MCP outcome: an opaque result (including JSON null), or an MCP error.
6151
+ * Outer ACP errors are reserved for binding and runtime failures.
5896
6152
  *
5897
- * Response to `mcp/connect`.
6153
+ * Both branches require their carrier key. An error must be a non-null object.
6154
+ * Unknown outer fields are ignored; inner result and error fields are preserved.
6155
+ * Carrier `_meta` is optional; null or invalid values are treated as absent.
6156
+ * Senders must include exactly one outcome; receivers prefer `result` if both are present.
5898
6157
  *
5899
6158
  * @experimental
5900
6159
  */
5901
- export type ConnectMcpResponse = {
6160
+ export type MessageMcpResponse = {
5902
6161
  /**
5903
- * The unique identifier for this MCP-over-ACP connection.
6162
+ * Required, even if JSON null.
5904
6163
  */
5905
- connectionId: McpConnectionId;
6164
+ result: unknown;
5906
6165
  /**
5907
- * The _meta property is reserved by ACP to allow clients and agents to attach additional
5908
- * metadata to their interactions. Implementations MUST NOT make assumptions about values at
5909
- * these keys.
5910
- *
5911
- * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
6166
+ * Optional ACP carrier metadata.
6167
+ */
6168
+ _meta?: {
6169
+ [key: string]: unknown;
6170
+ } | null;
6171
+ } | {
6172
+ /**
6173
+ * Required, non-null MCP error object.
6174
+ */
6175
+ error: McpError;
6176
+ /**
6177
+ * Optional ACP carrier metadata.
5912
6178
  */
5913
6179
  _meta?: {
5914
6180
  [key: string]: unknown;
@@ -5917,23 +6183,27 @@ export type ConnectMcpResponse = {
5917
6183
  /**
5918
6184
  * **UNSTABLE**
5919
6185
  *
5920
- * This capability is not part of the spec yet, and may be removed or changed at any point.
6186
+ * An inner MCP error, distinct from an outer ACP binding or runtime error.
5921
6187
  *
5922
- * Response to `mcp/disconnect`.
6188
+ * `code` and `message` are required and non-null. `data` is optional;
6189
+ * explicit `null` is preserved separately from an omitted key.
5923
6190
  *
5924
6191
  * @experimental
5925
6192
  */
5926
- export type DisconnectMcpResponse = {
6193
+ export type McpError = {
5927
6194
  /**
5928
- * The _meta property is reserved by ACP to allow clients and agents to attach additional
5929
- * metadata to their interactions. Implementations MUST NOT make assumptions about values at
5930
- * these keys.
5931
- *
5932
- * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
6195
+ * Inner MCP error code; never an ACP error code.
5933
6196
  */
5934
- _meta?: {
5935
- [key: string]: unknown;
5936
- } | null;
6197
+ code: number;
6198
+ /**
6199
+ * Inner MCP error message.
6200
+ */
6201
+ message: string;
6202
+ /**
6203
+ * Optional error data; explicit null is retained.
6204
+ */
6205
+ data?: unknown;
6206
+ [key: string]: unknown;
5937
6207
  };
5938
6208
  /**
5939
6209
  * A JSON-RPC notification object.
@@ -6196,6 +6466,50 @@ export type RejectNesNotification = {
6196
6466
  * The reason a suggestion was rejected.
6197
6467
  */
6198
6468
  export type NesRejectReason = "rejected" | "ignored" | "replaced" | "cancelled";
6469
+ /**
6470
+ * **UNSTABLE**
6471
+ *
6472
+ * This capability is not part of the spec yet, and may be removed or changed at any point.
6473
+ *
6474
+ * Notification parameters for `mcp/message`.
6475
+ *
6476
+ * Sent by the provider to the consumer for an active request (including
6477
+ * subscription acknowledgements and updates); the outer envelope has no `id`.
6478
+ *
6479
+ * @experimental
6480
+ */
6481
+ export type MessageMcpNotification = {
6482
+ /**
6483
+ * The declared ACP MCP server handling the associated request.
6484
+ */
6485
+ serverId: McpServerAcpId;
6486
+ /**
6487
+ * The identifier of the active inner MCP request.
6488
+ */
6489
+ requestId: McpRequestId;
6490
+ /**
6491
+ * The inner MCP method name.
6492
+ */
6493
+ method: string;
6494
+ /**
6495
+ * Optional inner MCP params.
6496
+ *
6497
+ * If omitted or set to `null`, the inner MCP message has no params.
6498
+ */
6499
+ params?: {
6500
+ [key: string]: unknown;
6501
+ } | null;
6502
+ /**
6503
+ * The _meta property is reserved by ACP to allow clients and agents to attach additional
6504
+ * metadata to their interactions. Implementations MUST NOT make assumptions about values at
6505
+ * these keys.
6506
+ *
6507
+ * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
6508
+ */
6509
+ _meta?: {
6510
+ [key: string]: unknown;
6511
+ } | null;
6512
+ };
6199
6513
  /**
6200
6514
  * Notification to cancel an ongoing request.
6201
6515
  *