@ycodium-ai/agent-acp 0.2.3072 → 0.2.3074

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 (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -26783,11 +26783,22 @@ function createAcpExecutor(options) {
26783
26783
  // ../../packages/ycodium-acp-executor/src/prompt-dispatch.ts
26784
26784
  var dispatchAcpPrompt = (executor, input2) => {
26785
26785
  const { promise: dispatched, resolve: resolve2 } = Promise.withResolvers();
26786
- const finished = executor.prompt({ ...input2, onDispatched: resolve2 });
26786
+ let written = false;
26787
+ const finished = executor.prompt({
26788
+ ...input2,
26789
+ onDispatched: (turnId) => {
26790
+ written = true;
26791
+ resolve2(turnId);
26792
+ }
26793
+ });
26787
26794
  return Promise.race([
26788
26795
  dispatched.then((turnId) => ({ turnId })),
26789
- // 写入之前就落定:成功(写入前被取消)带 turnId;拒绝原样交给调用方,那是起轮失败。
26790
- finished.then((result) => ({ turnId: result.turnId }))
26796
+ finished.then((result) => {
26797
+ if (!written && input2.expectedActiveTurnId !== void 0 && result.stopReason === "cancelled") {
26798
+ throw new AcpExecutorTurnEndedError();
26799
+ }
26800
+ return { turnId: result.turnId };
26801
+ })
26791
26802
  ]);
26792
26803
  };
26793
26804
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-acp",
3
- "version": "0.2.3072",
3
+ "version": "0.2.3074",
4
4
  "description": "Generic ACP executor: user-supplied CLI over Agent Client Protocol stdio.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -21,8 +21,8 @@
21
21
  "@types/node": "24.12.4",
22
22
  "esbuild": "0.28.1",
23
23
  "vite-plus": "0.2.2",
24
- "@ycodium-ai/plugin-api": "0.2.3072",
25
- "ycodium-acp-executor": "0.2.3072",
24
+ "@ycodium-ai/plugin-api": "0.2.3074",
25
+ "ycodium-acp-executor": "0.2.3074",
26
26
  "ycodium-executor-testing": "0.0.0"
27
27
  },
28
28
  "ycodium": {