@ycodium-ai/agent-grok 0.2.3070 → 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 +15 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -26846,11 +26846,22 @@ function createAcpExecutor(options) {
26846
26846
  // ../../packages/ycodium-acp-executor/src/prompt-dispatch.ts
26847
26847
  var dispatchAcpPrompt = (executor, input2) => {
26848
26848
  const { promise: dispatched, resolve: resolve2 } = Promise.withResolvers();
26849
- const finished = executor.prompt({ ...input2, onDispatched: resolve2 });
26849
+ let written = false;
26850
+ const finished = executor.prompt({
26851
+ ...input2,
26852
+ onDispatched: (turnId) => {
26853
+ written = true;
26854
+ resolve2(turnId);
26855
+ }
26856
+ });
26850
26857
  return Promise.race([
26851
26858
  dispatched.then((turnId) => ({ turnId })),
26852
- // 写入之前就落定:成功(写入前被取消)带 turnId;拒绝原样交给调用方,那是起轮失败。
26853
- finished.then((result) => ({ turnId: result.turnId }))
26859
+ finished.then((result) => {
26860
+ if (!written && input2.expectedActiveTurnId !== void 0 && result.stopReason === "cancelled") {
26861
+ throw new AcpExecutorTurnEndedError();
26862
+ }
26863
+ return { turnId: result.turnId };
26864
+ })
26854
26865
  ]);
26855
26866
  };
26856
26867
 
@@ -28665,7 +28676,7 @@ var executors = [
28665
28676
  ];
28666
28677
  var index_default = definePlugin({
28667
28678
  id: "agent-grok",
28668
- apiVersion: 11,
28679
+ apiVersion: 12,
28669
28680
  executors,
28670
28681
  activate(ctx) {
28671
28682
  ctx.log.info("grok executor ready");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-grok",
3
- "version": "0.2.3070",
3
+ "version": "0.2.3074",
4
4
  "description": "Grok executor: grok CLI 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.3070",
25
- "ycodium-executor-testing": "0.0.0",
26
- "ycodium-acp-executor": "0.2.3070"
24
+ "@ycodium-ai/plugin-api": "0.2.3074",
25
+ "ycodium-acp-executor": "0.2.3074",
26
+ "ycodium-executor-testing": "0.0.0"
27
27
  },
28
28
  "ycodium": {
29
29
  "plugin": "./dist/index.js",