@agentclientprotocol/claude-agent-acp 0.85.2-preview.12 → 0.85.2-preview.13
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.
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as v2 from "@agentclientprotocol/sdk/experimental/v2";
|
|
6
6
|
import type { AcpSessionNotification } from "../acp-subagents.js";
|
|
7
|
+
/**
|
|
8
|
+
* The id of the plan of a session. v1 has one plan per session, which every
|
|
9
|
+
* plan update replaces whole, from TodoWrite and from the Task tools alike.
|
|
10
|
+
* v2 tracks plans by id, so that plan gets one.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SESSION_PLAN_ID = "plan";
|
|
7
13
|
/**
|
|
8
14
|
* The v2 form of a v1 session update, or `undefined` when v2 has no
|
|
9
15
|
* counterpart and the update tells a v2 client nothing new.
|
|
@@ -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;;;;;;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,CAwC9B"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { v2AvailableCommands, v2ConfigOptions } from "./session.js";
|
|
2
2
|
import { v2ToolCallUpdate } from "./tool-call.js";
|
|
3
|
+
/**
|
|
4
|
+
* The id of the plan of a session. v1 has one plan per session, which every
|
|
5
|
+
* plan update replaces whole, from TodoWrite and from the Task tools alike.
|
|
6
|
+
* v2 tracks plans by id, so that plan gets one.
|
|
7
|
+
*/
|
|
8
|
+
export const SESSION_PLAN_ID = "plan";
|
|
3
9
|
/**
|
|
4
10
|
* The v2 form of a v1 session update, or `undefined` when v2 has no
|
|
5
11
|
* counterpart and the update tells a v2 client nothing new.
|
|
@@ -30,6 +36,13 @@ export function v2SessionUpdate(update) {
|
|
|
30
36
|
case "tool_call":
|
|
31
37
|
case "tool_call_update":
|
|
32
38
|
return v2ToolCallUpdate(update);
|
|
39
|
+
case "plan":
|
|
40
|
+
// A v2 plan of items is replaced whole as well.
|
|
41
|
+
return {
|
|
42
|
+
sessionUpdate: "plan_update",
|
|
43
|
+
plan: { type: "items", planId: SESSION_PLAN_ID, entries: update.entries },
|
|
44
|
+
...(update._meta != null ? { _meta: update._meta } : {}),
|
|
45
|
+
};
|
|
33
46
|
case "current_mode_update":
|
|
34
47
|
// v2 has no modes: the mode is the `mode` config option. Every mode
|
|
35
48
|
// change also reaches the client as a `config_option_update` or in the
|
package/package.json
CHANGED