@tickernelz/paperclip-pro-adapter-utils 2026.1001.2 → 2026.1002.1
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/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +8 -31
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.d.ts +60 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js +55 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +1 -3
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +0 -2
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +428 -114
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +3516 -1530
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +256 -78
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +0 -7
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +0 -6
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +19 -7
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +52 -36
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +62 -35
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +1 -3
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +0 -2
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +394 -188
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +4535 -464
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +236 -117
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -1
- package/node_modules/@agentclientprotocol/sdk/package.json +1 -1
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +591 -193
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +547 -303
- package/package.json +2 -2
|
@@ -636,8 +636,7 @@ export const zCreateElicitationRequest = preserveCustomPayload(z.intersection(z.
|
|
|
636
636
|
* Unique identifier for an MCP server using the ACP transport.
|
|
637
637
|
*
|
|
638
638
|
* The value is opaque and generated by the ACP component providing the MCP server. It is
|
|
639
|
-
* used by `mcp/
|
|
640
|
-
* server.
|
|
639
|
+
* used by `mcp/message` to route requests to the component that declared the server.
|
|
641
640
|
*
|
|
642
641
|
* @experimental
|
|
643
642
|
*/
|
|
@@ -647,24 +646,14 @@ export const zMcpServerAcpId = z.string();
|
|
|
647
646
|
*
|
|
648
647
|
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
649
648
|
*
|
|
650
|
-
*
|
|
649
|
+
* Identifies an inner MCP request active against a server on this ACP connection.
|
|
651
650
|
*
|
|
652
|
-
*
|
|
653
|
-
|
|
654
|
-
export const zConnectMcpRequest = z.object({
|
|
655
|
-
serverId: zMcpServerAcpId,
|
|
656
|
-
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
657
|
-
});
|
|
658
|
-
/**
|
|
659
|
-
* **UNSTABLE**
|
|
660
|
-
*
|
|
661
|
-
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
662
|
-
*
|
|
663
|
-
* A unique identifier for an active MCP-over-ACP connection.
|
|
651
|
+
* Generated by the caller and preserved unchanged by proxies. This is distinct
|
|
652
|
+
* from the outer ACP JSON-RPC request ID.
|
|
664
653
|
*
|
|
665
654
|
* @experimental
|
|
666
655
|
*/
|
|
667
|
-
export const
|
|
656
|
+
export const zMcpRequestId = z.string();
|
|
668
657
|
/**
|
|
669
658
|
* **UNSTABLE**
|
|
670
659
|
*
|
|
@@ -675,24 +664,12 @@ export const zMcpConnectionId = z.string();
|
|
|
675
664
|
* @experimental
|
|
676
665
|
*/
|
|
677
666
|
export const zMessageMcpRequest = z.object({
|
|
678
|
-
|
|
667
|
+
serverId: zMcpServerAcpId,
|
|
668
|
+
requestId: zMcpRequestId,
|
|
679
669
|
method: z.string(),
|
|
680
670
|
params: z.record(z.string(), z.unknown()).nullish(),
|
|
681
671
|
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
682
672
|
});
|
|
683
|
-
/**
|
|
684
|
-
* **UNSTABLE**
|
|
685
|
-
*
|
|
686
|
-
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
687
|
-
*
|
|
688
|
-
* Request parameters for `mcp/disconnect`.
|
|
689
|
-
*
|
|
690
|
-
* @experimental
|
|
691
|
-
*/
|
|
692
|
-
export const zDisconnectMcpRequest = z.object({
|
|
693
|
-
connectionId: zMcpConnectionId,
|
|
694
|
-
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
695
|
-
});
|
|
696
673
|
/**
|
|
697
674
|
* Allows for sending an arbitrary request that is not part of the ACP spec.
|
|
698
675
|
* Extension methods provide a way to add custom functionality while maintaining
|
|
@@ -718,9 +695,7 @@ export const zAgentRequest = z.object({
|
|
|
718
695
|
zWaitForTerminalExitRequest,
|
|
719
696
|
zKillTerminalRequest,
|
|
720
697
|
zCreateElicitationRequest,
|
|
721
|
-
zConnectMcpRequest,
|
|
722
698
|
zMessageMcpRequest,
|
|
723
|
-
zDisconnectMcpRequest,
|
|
724
699
|
zExtRequest,
|
|
725
700
|
])
|
|
726
701
|
.nullish(),
|
|
@@ -1606,18 +1581,6 @@ export const zCloseNesResponse = z.object({
|
|
|
1606
1581
|
* See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
|
|
1607
1582
|
*/
|
|
1608
1583
|
export const zExtResponse = z.unknown();
|
|
1609
|
-
/**
|
|
1610
|
-
* **UNSTABLE**
|
|
1611
|
-
*
|
|
1612
|
-
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
1613
|
-
*
|
|
1614
|
-
* Response to `mcp/message`.
|
|
1615
|
-
*
|
|
1616
|
-
* This is the inner MCP response result payload. Any JSON value is valid.
|
|
1617
|
-
*
|
|
1618
|
-
* @experimental
|
|
1619
|
-
*/
|
|
1620
|
-
export const zMessageMcpResponse = z.unknown();
|
|
1621
1584
|
/**
|
|
1622
1585
|
* Predefined error codes for common JSON-RPC and ACP-specific errors.
|
|
1623
1586
|
*
|
|
@@ -1682,7 +1645,6 @@ export const zAgentResponse = z.union([
|
|
|
1682
1645
|
zSuggestNesResponse,
|
|
1683
1646
|
zCloseNesResponse,
|
|
1684
1647
|
zExtResponse,
|
|
1685
|
-
zMessageMcpResponse,
|
|
1686
1648
|
]),
|
|
1687
1649
|
}),
|
|
1688
1650
|
z.object({
|
|
@@ -2047,6 +2009,177 @@ export const zCompactionSummaryChunk = z.object({
|
|
|
2047
2009
|
content: zContentBlock,
|
|
2048
2010
|
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2049
2011
|
});
|
|
2012
|
+
/**
|
|
2013
|
+
* **UNSTABLE**
|
|
2014
|
+
*
|
|
2015
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2016
|
+
*
|
|
2017
|
+
* Capability to cancel work in a subagent session without ending that session.
|
|
2018
|
+
*
|
|
2019
|
+
* Supplying `{}` advertises support; an omitted or `null` `cancel` does not.
|
|
2020
|
+
*
|
|
2021
|
+
* @experimental
|
|
2022
|
+
*/
|
|
2023
|
+
export const zSessionCancelCapabilities = z.object({
|
|
2024
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2025
|
+
});
|
|
2026
|
+
/**
|
|
2027
|
+
* **UNSTABLE**
|
|
2028
|
+
*
|
|
2029
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2030
|
+
*
|
|
2031
|
+
* Client-initiated session mutations permitted for a specific subagent session.
|
|
2032
|
+
*
|
|
2033
|
+
* A mutation requires an explicit per-child capability; support for the method
|
|
2034
|
+
* on ordinary sessions does not grant support on a child.
|
|
2035
|
+
*
|
|
2036
|
+
* @experimental
|
|
2037
|
+
*/
|
|
2038
|
+
export const zSubagentSessionCapabilities = z.object({
|
|
2039
|
+
cancel: defaultOnError(zSessionCancelCapabilities.nullish(), () => undefined),
|
|
2040
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2041
|
+
});
|
|
2042
|
+
/**
|
|
2043
|
+
* Foreground work is in progress.
|
|
2044
|
+
*/
|
|
2045
|
+
export const zRunningStateUpdate = z.object({
|
|
2046
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2047
|
+
});
|
|
2048
|
+
/**
|
|
2049
|
+
* The child is ready to process another prompt.
|
|
2050
|
+
*/
|
|
2051
|
+
export const zIdleStateUpdate = z.object({
|
|
2052
|
+
stopReason: defaultOnError(zStopReason.nullish(), () => undefined),
|
|
2053
|
+
usage: defaultOnError(zUsage.nullish(), () => undefined),
|
|
2054
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2055
|
+
});
|
|
2056
|
+
/**
|
|
2057
|
+
* Foreground work is blocked on user action.
|
|
2058
|
+
*/
|
|
2059
|
+
export const zRequiresActionStateUpdate = z.object({
|
|
2060
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2061
|
+
});
|
|
2062
|
+
/**
|
|
2063
|
+
* **UNSTABLE**
|
|
2064
|
+
*
|
|
2065
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2066
|
+
*
|
|
2067
|
+
* The Agent cannot currently determine foreground activity.
|
|
2068
|
+
*
|
|
2069
|
+
* Report this when activity becomes unobservable, not merely because the child
|
|
2070
|
+
* has been quiet. The Client MUST stop presenting the previous state as confirmed
|
|
2071
|
+
* current activity, but may retain it as last known. A later state replaces this
|
|
2072
|
+
* snapshot normally.
|
|
2073
|
+
*
|
|
2074
|
+
* This is not a task outcome or session closure. It does not cancel work, resolve
|
|
2075
|
+
* pending requests, or revoke capabilities; capabilities are updated separately.
|
|
2076
|
+
*
|
|
2077
|
+
* @experimental
|
|
2078
|
+
*/
|
|
2079
|
+
export const zUnknownStateUpdate = z.object({
|
|
2080
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2081
|
+
});
|
|
2082
|
+
/**
|
|
2083
|
+
* **UNSTABLE**
|
|
2084
|
+
*
|
|
2085
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2086
|
+
*
|
|
2087
|
+
* Current foreground-work state of a reusable child session.
|
|
2088
|
+
*
|
|
2089
|
+
* Each update is a whole-object snapshot. Idle does not terminate the child;
|
|
2090
|
+
* the parent can message it again, transitioning it back to running.
|
|
2091
|
+
* Background activity may still emit other session updates while idle.
|
|
2092
|
+
*
|
|
2093
|
+
* @experimental
|
|
2094
|
+
*
|
|
2095
|
+
* Custom variants (unknown `state` values) keep their extra
|
|
2096
|
+
* properties exactly as received; unlike known variants, those keys
|
|
2097
|
+
* bypass lenient-field salvage and arrive unvalidated.
|
|
2098
|
+
*/
|
|
2099
|
+
export const zStateUpdate = preserveCustomPayload(z.union([
|
|
2100
|
+
zRunningStateUpdate.and(z.object({
|
|
2101
|
+
state: z.literal("running"),
|
|
2102
|
+
})),
|
|
2103
|
+
zIdleStateUpdate.and(z.object({
|
|
2104
|
+
state: z.literal("idle"),
|
|
2105
|
+
})),
|
|
2106
|
+
zRequiresActionStateUpdate.and(z.object({
|
|
2107
|
+
state: z.literal("requires_action"),
|
|
2108
|
+
})),
|
|
2109
|
+
zUnknownStateUpdate.and(z.object({
|
|
2110
|
+
state: z.literal("unknown"),
|
|
2111
|
+
})),
|
|
2112
|
+
excludeKnownTags(z.object({
|
|
2113
|
+
state: z.string(),
|
|
2114
|
+
}), "state", ["idle", "requires_action", "running", "unknown"]),
|
|
2115
|
+
]), "state", ["idle", "requires_action", "running", "unknown"]);
|
|
2116
|
+
/**
|
|
2117
|
+
* **UNSTABLE**
|
|
2118
|
+
*
|
|
2119
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2120
|
+
*
|
|
2121
|
+
* Notification that the enclosing parent session created and owns a child session.
|
|
2122
|
+
*
|
|
2123
|
+
* Later updates modify the existing association's metadata, not its ownership.
|
|
2124
|
+
*
|
|
2125
|
+
* Sent on the immediate parent session. The first update for an unknown
|
|
2126
|
+
* [`SubagentUpdate::session_id`] announces the child and MUST be sent
|
|
2127
|
+
* before any live child traffic or live message naming the child as sender
|
|
2128
|
+
* or recipient. Parents may message and reuse an announced child across
|
|
2129
|
+
* multiple operations.
|
|
2130
|
+
* Child events are delivered automatically on the same connection; no child
|
|
2131
|
+
* load, resume, or subscription is needed.
|
|
2132
|
+
*
|
|
2133
|
+
* Only the subagent session ID is required. Omitted patch fields keep their
|
|
2134
|
+
* previous values; `null` clears them. Clearing capabilities disables child
|
|
2135
|
+
* mutations. Clearing state leaves current activity unset/unconfirmed: it does
|
|
2136
|
+
* not imply idle, stop work, or create an `unknown` state snapshot. A concrete
|
|
2137
|
+
* state replaces the entire previous state object, not the session.
|
|
2138
|
+
* The title and description provide the parent's display metadata for the
|
|
2139
|
+
* child. They do not replace the content of individual messages or operations.
|
|
2140
|
+
*
|
|
2141
|
+
* @experimental
|
|
2142
|
+
*/
|
|
2143
|
+
export const zSubagentUpdate = z.object({
|
|
2144
|
+
sessionId: zSessionId,
|
|
2145
|
+
title: defaultOnError(z.string().nullish(), () => undefined),
|
|
2146
|
+
description: defaultOnError(z.string().nullish(), () => undefined),
|
|
2147
|
+
capabilities: defaultOnError(zSubagentSessionCapabilities.nullish(), () => undefined),
|
|
2148
|
+
state: defaultOnError(zStateUpdate.nullish(), () => undefined),
|
|
2149
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2150
|
+
});
|
|
2151
|
+
/**
|
|
2152
|
+
* **UNSTABLE**
|
|
2153
|
+
*
|
|
2154
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2155
|
+
*
|
|
2156
|
+
* An upsert for an inter-session message.
|
|
2157
|
+
*
|
|
2158
|
+
* @experimental
|
|
2159
|
+
*/
|
|
2160
|
+
export const zSessionMessage = z.object({
|
|
2161
|
+
messageId: zMessageId,
|
|
2162
|
+
senderSessionId: defaultOnError(zSessionId.nullish(), () => undefined),
|
|
2163
|
+
recipientSessionId: defaultOnError(zSessionId.nullish(), () => undefined),
|
|
2164
|
+
content: defaultOnError(vecSkipError(zContentBlock).nullish(), () => undefined),
|
|
2165
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2166
|
+
});
|
|
2167
|
+
/**
|
|
2168
|
+
* **UNSTABLE**
|
|
2169
|
+
*
|
|
2170
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2171
|
+
*
|
|
2172
|
+
* A streamed content block of an inter-session message.
|
|
2173
|
+
*
|
|
2174
|
+
* @experimental
|
|
2175
|
+
*/
|
|
2176
|
+
export const zSessionMessageChunk = z.object({
|
|
2177
|
+
messageId: zMessageId,
|
|
2178
|
+
senderSessionId: defaultOnError(zSessionId.nullish(), () => undefined),
|
|
2179
|
+
recipientSessionId: defaultOnError(zSessionId.nullish(), () => undefined),
|
|
2180
|
+
content: zContentBlock,
|
|
2181
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2182
|
+
});
|
|
2050
2183
|
/**
|
|
2051
2184
|
* Different types of updates that can be sent during session processing.
|
|
2052
2185
|
*
|
|
@@ -2103,6 +2236,15 @@ export const zSessionUpdate = z.union([
|
|
|
2103
2236
|
zCompactionSummaryChunk.and(z.object({
|
|
2104
2237
|
sessionUpdate: z.literal("compaction_summary_chunk"),
|
|
2105
2238
|
})),
|
|
2239
|
+
zSubagentUpdate.and(z.object({
|
|
2240
|
+
sessionUpdate: z.literal("subagent_update"),
|
|
2241
|
+
})),
|
|
2242
|
+
zSessionMessage.and(z.object({
|
|
2243
|
+
sessionUpdate: z.literal("session_message"),
|
|
2244
|
+
})),
|
|
2245
|
+
zSessionMessageChunk.and(z.object({
|
|
2246
|
+
sessionUpdate: z.literal("session_message_chunk"),
|
|
2247
|
+
})),
|
|
2106
2248
|
]);
|
|
2107
2249
|
/**
|
|
2108
2250
|
* Notification containing a session update from the agent.
|
|
@@ -2123,24 +2265,6 @@ export const zCompleteElicitationNotification = z.object({
|
|
|
2123
2265
|
elicitationId: zElicitationId,
|
|
2124
2266
|
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2125
2267
|
});
|
|
2126
|
-
/**
|
|
2127
|
-
* **UNSTABLE**
|
|
2128
|
-
*
|
|
2129
|
-
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2130
|
-
*
|
|
2131
|
-
* Notification parameters for `mcp/message`.
|
|
2132
|
-
*
|
|
2133
|
-
* This is used when the wrapped MCP message is a notification and the outer JSON-RPC
|
|
2134
|
-
* envelope has no `id`.
|
|
2135
|
-
*
|
|
2136
|
-
* @experimental
|
|
2137
|
-
*/
|
|
2138
|
-
export const zMessageMcpNotification = z.object({
|
|
2139
|
-
connectionId: zMcpConnectionId,
|
|
2140
|
-
method: z.string(),
|
|
2141
|
-
params: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2142
|
-
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2143
|
-
});
|
|
2144
2268
|
/**
|
|
2145
2269
|
* Allows the Agent to send an arbitrary notification that is not part of the ACP spec.
|
|
2146
2270
|
* Extension notifications provide a way to send one-way messages for custom functionality
|
|
@@ -2158,7 +2282,6 @@ export const zAgentNotification = z.object({
|
|
|
2158
2282
|
.union([
|
|
2159
2283
|
zSessionNotification,
|
|
2160
2284
|
zCompleteElicitationNotification,
|
|
2161
|
-
zMessageMcpNotification,
|
|
2162
2285
|
zExtNotification,
|
|
2163
2286
|
])
|
|
2164
2287
|
.nullish(),
|
|
@@ -2217,6 +2340,23 @@ export const zClientSessionCapabilities = z.object({
|
|
|
2217
2340
|
notices: defaultOnError(zNoticeCapabilities.nullish(), () => undefined),
|
|
2218
2341
|
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2219
2342
|
});
|
|
2343
|
+
/**
|
|
2344
|
+
* **UNSTABLE**
|
|
2345
|
+
*
|
|
2346
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
2347
|
+
*
|
|
2348
|
+
* Capability marker for exposing reusable child sessions as restricted ACP sessions.
|
|
2349
|
+
*
|
|
2350
|
+
* Supplying `{}` advertises support for child association and state updates,
|
|
2351
|
+
* session-directed messages, and restricted-session semantics. The client
|
|
2352
|
+
* must advertise this capability before the agent sends subagent updates or
|
|
2353
|
+
* session-directed messages.
|
|
2354
|
+
*
|
|
2355
|
+
* @experimental
|
|
2356
|
+
*/
|
|
2357
|
+
export const zSubagentCapabilities = z.object({
|
|
2358
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
2359
|
+
});
|
|
2220
2360
|
/**
|
|
2221
2361
|
* **UNSTABLE**
|
|
2222
2362
|
*
|
|
@@ -2305,6 +2445,7 @@ export const zClientCapabilities = z.object({
|
|
|
2305
2445
|
.default({ readTextFile: false, writeTextFile: false }), () => ({ readTextFile: false, writeTextFile: false })),
|
|
2306
2446
|
terminal: defaultOnError(z.boolean().optional().default(false), () => false),
|
|
2307
2447
|
session: defaultOnError(zClientSessionCapabilities.nullish(), () => undefined),
|
|
2448
|
+
subagents: defaultOnError(zSubagentCapabilities.nullish(), () => undefined),
|
|
2308
2449
|
plan: defaultOnError(zPlanCapabilities.nullish(), () => undefined),
|
|
2309
2450
|
auth: defaultOnError(zAuthCapabilities.optional().default({ terminal: false }), () => ({ terminal: false })),
|
|
2310
2451
|
elicitation: defaultOnError(zElicitationCapabilities.nullish(), () => undefined),
|
|
@@ -2427,7 +2568,7 @@ export const zMcpServerSse = z.object({
|
|
|
2427
2568
|
* ACP transport configuration for MCP.
|
|
2428
2569
|
*
|
|
2429
2570
|
* The MCP server is provided by an ACP component and communicates over the ACP channel
|
|
2430
|
-
* using `mcp/
|
|
2571
|
+
* using `mcp/message`.
|
|
2431
2572
|
*
|
|
2432
2573
|
* @experimental
|
|
2433
2574
|
*/
|
|
@@ -2768,7 +2909,6 @@ export const zClientRequest = z.object({
|
|
|
2768
2909
|
zStartNesRequest,
|
|
2769
2910
|
zSuggestNesRequest,
|
|
2770
2911
|
zCloseNesRequest,
|
|
2771
|
-
zMessageMcpRequest,
|
|
2772
2912
|
zExtRequest,
|
|
2773
2913
|
])
|
|
2774
2914
|
.nullish(),
|
|
@@ -2909,28 +3049,49 @@ export const zCreateElicitationResponse = preserveCustomPayload(z.intersection(z
|
|
|
2909
3049
|
/**
|
|
2910
3050
|
* **UNSTABLE**
|
|
2911
3051
|
*
|
|
2912
|
-
*
|
|
3052
|
+
* An inner MCP error, distinct from an outer ACP binding or runtime error.
|
|
2913
3053
|
*
|
|
2914
|
-
*
|
|
3054
|
+
* `code` and `message` are required and non-null. `data` is optional;
|
|
3055
|
+
* explicit `null` is preserved separately from an omitted key.
|
|
2915
3056
|
*
|
|
2916
3057
|
* @experimental
|
|
2917
3058
|
*/
|
|
2918
|
-
export const
|
|
2919
|
-
|
|
2920
|
-
|
|
3059
|
+
export const zMcpError = z.looseObject({
|
|
3060
|
+
code: z
|
|
3061
|
+
.int()
|
|
3062
|
+
.min(-2147483648, {
|
|
3063
|
+
error: "Invalid value: Expected int32 to be >= -2147483648",
|
|
3064
|
+
})
|
|
3065
|
+
.max(2147483647, {
|
|
3066
|
+
error: "Invalid value: Expected int32 to be <= 2147483647",
|
|
3067
|
+
}),
|
|
3068
|
+
message: z.string(),
|
|
3069
|
+
data: z.unknown().optional(),
|
|
2921
3070
|
});
|
|
2922
3071
|
/**
|
|
2923
3072
|
* **UNSTABLE**
|
|
2924
3073
|
*
|
|
2925
|
-
*
|
|
3074
|
+
* The successful outer ACP `mcp/message` response carries exactly one
|
|
3075
|
+
* inner MCP outcome: an opaque result (including JSON null), or an MCP error.
|
|
3076
|
+
* Outer ACP errors are reserved for binding and runtime failures.
|
|
2926
3077
|
*
|
|
2927
|
-
*
|
|
3078
|
+
* Both branches require their carrier key. An error must be a non-null object.
|
|
3079
|
+
* Unknown outer fields are ignored; inner result and error fields are preserved.
|
|
3080
|
+
* Carrier `_meta` is optional; null or invalid values are treated as absent.
|
|
3081
|
+
* Senders must include exactly one outcome; receivers prefer `result` if both are present.
|
|
2928
3082
|
*
|
|
2929
3083
|
* @experimental
|
|
2930
3084
|
*/
|
|
2931
|
-
export const
|
|
2932
|
-
|
|
2933
|
-
|
|
3085
|
+
export const zMessageMcpResponse = z.union([
|
|
3086
|
+
z.object({
|
|
3087
|
+
result: z.unknown(),
|
|
3088
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
3089
|
+
}),
|
|
3090
|
+
z.object({
|
|
3091
|
+
error: zMcpError,
|
|
3092
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
3093
|
+
}),
|
|
3094
|
+
]);
|
|
2934
3095
|
/**
|
|
2935
3096
|
* A JSON-RPC response object.
|
|
2936
3097
|
*/
|
|
@@ -2947,8 +3108,6 @@ export const zClientResponse = z.union([
|
|
|
2947
3108
|
zWaitForTerminalExitResponse,
|
|
2948
3109
|
zKillTerminalResponse,
|
|
2949
3110
|
zCreateElicitationResponse,
|
|
2950
|
-
zConnectMcpResponse,
|
|
2951
|
-
zDisconnectMcpResponse,
|
|
2952
3111
|
zMessageMcpResponse,
|
|
2953
3112
|
zExtResponse,
|
|
2954
3113
|
]),
|
|
@@ -3052,6 +3211,25 @@ export const zRejectNesNotification = z.object({
|
|
|
3052
3211
|
reason: defaultOnError(zNesRejectReason.nullish(), () => undefined),
|
|
3053
3212
|
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
3054
3213
|
});
|
|
3214
|
+
/**
|
|
3215
|
+
* **UNSTABLE**
|
|
3216
|
+
*
|
|
3217
|
+
* This capability is not part of the spec yet, and may be removed or changed at any point.
|
|
3218
|
+
*
|
|
3219
|
+
* Notification parameters for `mcp/message`.
|
|
3220
|
+
*
|
|
3221
|
+
* Sent by the provider to the consumer for an active request (including
|
|
3222
|
+
* subscription acknowledgements and updates); the outer envelope has no `id`.
|
|
3223
|
+
*
|
|
3224
|
+
* @experimental
|
|
3225
|
+
*/
|
|
3226
|
+
export const zMessageMcpNotification = z.object({
|
|
3227
|
+
serverId: zMcpServerAcpId,
|
|
3228
|
+
requestId: zMcpRequestId,
|
|
3229
|
+
method: z.string(),
|
|
3230
|
+
params: z.record(z.string(), z.unknown()).nullish(),
|
|
3231
|
+
_meta: defaultOnError(z.record(z.string(), z.unknown()).nullish(), () => undefined),
|
|
3232
|
+
});
|
|
3055
3233
|
/**
|
|
3056
3234
|
* A JSON-RPC notification object.
|
|
3057
3235
|
*/
|