@agentclientprotocol/claude-agent-acp 0.85.2-preview.22 → 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.
@@ -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 unstable `providers` methods, which the v2
18
- * surface does not serve yet.
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,CA0BpF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,EAAE,CAAC,kBAAkB,CAiBxF"}
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"}
@@ -37,17 +37,24 @@ export function v1InitializeRequest(request) {
37
37
  ...(request._meta != null ? { _meta: request._meta } : {}),
38
38
  };
39
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"];
40
46
  /**
41
47
  * The v2 `initialize` response for the v1 response of the agent.
42
48
  *
43
- * It does not advertise the unstable `providers` methods, which the v2
44
- * surface does not serve yet.
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}.
45
51
  */
46
52
  export function v2InitializeResponse(response) {
47
53
  if (!response.agentInfo) {
48
54
  throw new Error("ACP v2 requires agentInfo, and the agent reported none");
49
55
  }
50
56
  const meta = response.agentCapabilities?._meta;
57
+ const topMeta = Object.fromEntries(Object.entries(response._meta ?? {}).filter(([key]) => !UNSERVED_EXTENSION_KEYS.includes(key)));
51
58
  return {
52
59
  protocolVersion: v2.PROTOCOL_VERSION,
53
60
  info: response.agentInfo,
@@ -58,7 +65,7 @@ export function v2InitializeResponse(response) {
58
65
  ...(meta != null ? { _meta: meta } : {}),
59
66
  },
60
67
  authMethods: (response.authMethods ?? []).map(v2AuthMethod),
61
- ...(response._meta != null ? { _meta: response._meta } : {}),
68
+ ...(Object.keys(topMeta).length > 0 ? { _meta: topMeta } : {}),
62
69
  };
63
70
  }
64
71
  /**
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.85.2-preview.22",
6
+ "version": "0.85.2-preview.23",
7
7
  "description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
8
8
  "main": "dist/lib.js",
9
9
  "types": "dist/lib.d.ts",