@agentclientprotocol/claude-agent-acp 0.85.2-preview.21 → 0.85.2-preview.23
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/dist/v2/initialize.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare function v1InitializeRequest(request: v2.InitializeRequest): Init
|
|
|
14
14
|
/**
|
|
15
15
|
* The v2 `initialize` response for the v1 response of the agent.
|
|
16
16
|
*
|
|
17
|
-
* It does not advertise the
|
|
18
|
-
*
|
|
17
|
+
* It does not advertise what the v2 surface does not serve yet: the unstable
|
|
18
|
+
* `providers` methods, and the extensions of {@link UNSERVED_EXTENSION_KEYS}.
|
|
19
19
|
*/
|
|
20
20
|
export declare function v2InitializeResponse(response: InitializeResponse): v2.InitializeResponse;
|
|
21
21
|
//# sourceMappingURL=initialize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/v2/initialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,0CAA0C,CAAC;AAE/D,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/v2/initialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,0CAA0C,CAAC;AAE/D,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,CA0BpF;AASD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,EAAE,CAAC,kBAAkB,CAoBxF"}
|
package/dist/v2/initialize.js
CHANGED
|
@@ -20,10 +20,12 @@ export function v1InitializeRequest(request) {
|
|
|
20
20
|
// reads, writes, and runs commands itself.
|
|
21
21
|
fs: { readTextFile: false, writeTextFile: false },
|
|
22
22
|
terminal: false,
|
|
23
|
-
// Every v2 client handles boolean config options
|
|
24
|
-
// for a marker. With
|
|
25
|
-
// rather than as transcript messages
|
|
26
|
-
|
|
23
|
+
// Every v2 client handles boolean config options, notices, and
|
|
24
|
+
// compaction updates; v1 asks for a marker. With them, the agent reports
|
|
25
|
+
// advisories as notices rather than as transcript messages, and a
|
|
26
|
+
// compaction as a compaction entity rather than as a "Compact
|
|
27
|
+
// conversation" tool call, also on replay.
|
|
28
|
+
session: { configOptions: { boolean: {} }, notices: {}, compaction: {} },
|
|
27
29
|
// v1 marks terminal auth support with a boolean, v2 with an object.
|
|
28
30
|
auth: {
|
|
29
31
|
terminal: capabilities?.auth?.terminal != null,
|
|
@@ -35,17 +37,24 @@ export function v1InitializeRequest(request) {
|
|
|
35
37
|
...(request._meta != null ? { _meta: request._meta } : {}),
|
|
36
38
|
};
|
|
37
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* The top-level `_meta` keys of the agent's v1 `initialize` response that
|
|
42
|
+
* advertise an extension the v2 surface does not serve yet: `steering`, for
|
|
43
|
+
* `_session/steering`.
|
|
44
|
+
*/
|
|
45
|
+
const UNSERVED_EXTENSION_KEYS = ["steering"];
|
|
38
46
|
/**
|
|
39
47
|
* The v2 `initialize` response for the v1 response of the agent.
|
|
40
48
|
*
|
|
41
|
-
* It does not advertise the
|
|
42
|
-
*
|
|
49
|
+
* It does not advertise what the v2 surface does not serve yet: the unstable
|
|
50
|
+
* `providers` methods, and the extensions of {@link UNSERVED_EXTENSION_KEYS}.
|
|
43
51
|
*/
|
|
44
52
|
export function v2InitializeResponse(response) {
|
|
45
53
|
if (!response.agentInfo) {
|
|
46
54
|
throw new Error("ACP v2 requires agentInfo, and the agent reported none");
|
|
47
55
|
}
|
|
48
56
|
const meta = response.agentCapabilities?._meta;
|
|
57
|
+
const topMeta = Object.fromEntries(Object.entries(response._meta ?? {}).filter(([key]) => !UNSERVED_EXTENSION_KEYS.includes(key)));
|
|
49
58
|
return {
|
|
50
59
|
protocolVersion: v2.PROTOCOL_VERSION,
|
|
51
60
|
info: response.agentInfo,
|
|
@@ -56,7 +65,7 @@ export function v2InitializeResponse(response) {
|
|
|
56
65
|
...(meta != null ? { _meta: meta } : {}),
|
|
57
66
|
},
|
|
58
67
|
authMethods: (response.authMethods ?? []).map(v2AuthMethod),
|
|
59
|
-
...(
|
|
68
|
+
...(Object.keys(topMeta).length > 0 ? { _meta: topMeta } : {}),
|
|
60
69
|
};
|
|
61
70
|
}
|
|
62
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-update.d.ts","sourceRoot":"","sources":["../../src/v2/session-update.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,0CAA0C,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIlE;;;;GAIG;AACH,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,GACvC,EAAE,CAAC,aAAa,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"session-update.d.ts","sourceRoot":"","sources":["../../src/v2/session-update.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,0CAA0C,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIlE;;;;GAIG;AACH,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,GACvC,EAAE,CAAC,aAAa,GAAG,SAAS,CA0C9B"}
|
package/package.json
CHANGED