@ycodium-ai/agent-kimi 0.2.3072 → 0.2.3076

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 +4 -4
package/dist/index.js CHANGED
@@ -26799,11 +26799,22 @@ function createAcpExecutor(options) {
26799
26799
  // ../../packages/ycodium-acp-executor/src/prompt-dispatch.ts
26800
26800
  var dispatchAcpPrompt = (executor, input2) => {
26801
26801
  const { promise: dispatched, resolve: resolve3 } = Promise.withResolvers();
26802
- const finished = executor.prompt({ ...input2, onDispatched: resolve3 });
26802
+ let written = false;
26803
+ const finished = executor.prompt({
26804
+ ...input2,
26805
+ onDispatched: (turnId) => {
26806
+ written = true;
26807
+ resolve3(turnId);
26808
+ }
26809
+ });
26803
26810
  return Promise.race([
26804
26811
  dispatched.then((turnId) => ({ turnId })),
26805
- // 写入之前就落定:成功(写入前被取消)带 turnId;拒绝原样交给调用方,那是起轮失败。
26806
- finished.then((result) => ({ turnId: result.turnId }))
26812
+ finished.then((result) => {
26813
+ if (!written && input2.expectedActiveTurnId !== void 0 && result.stopReason === "cancelled") {
26814
+ throw new AcpExecutorTurnEndedError();
26815
+ }
26816
+ return { turnId: result.turnId };
26817
+ })
26807
26818
  ]);
26808
26819
  };
26809
26820
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-kimi",
3
- "version": "0.2.3072",
3
+ "version": "0.2.3076",
4
4
  "description": "Kimi Code executor: runs `kimi acp` over Agent Client Protocol stdio.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -21,9 +21,9 @@
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",
26
- "ycodium-executor-testing": "0.0.0"
24
+ "@ycodium-ai/plugin-api": "0.2.3076",
25
+ "ycodium-executor-testing": "0.0.0",
26
+ "ycodium-acp-executor": "0.2.3076"
27
27
  },
28
28
  "ycodium": {
29
29
  "plugin": "./dist/index.js",