zcode-app-cli 3.11.2-23 → 3.11.2-24

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcode-app-cli",
3
- "version": "3.11.2-23",
3
+ "version": "3.11.2-24",
4
4
  "description": "Unofficial terminal client for the ZCode agent runtime",
5
5
  "keywords": [
6
6
  "agent",
@@ -51,7 +51,14 @@
51
51
  "check": "bun run build && bun scripts/check-runtime.ts",
52
52
  "check:oauth-callback": "bun scripts/smoke-oauth-callback.ts",
53
53
  "check:tui": "bun scripts/smoke-tui.ts && bun scripts/smoke-tui-features.ts && bun scripts/smoke-tui-clear.ts && bun scripts/smoke-tui-session-title.ts && bun scripts/smoke-tui-pressure.ts && bun scripts/smoke-tui-widths.ts && bun scripts/smoke-tui-fullscreen.ts && bun scripts/smoke-tui-fullscreen-switch.ts && bun scripts/smoke-tui-fullscreen-layout.ts",
54
- "test": "bun test",
54
+ "check:tui-scenarios": "bun run test:tui",
55
+ "test": "bun run test:fast",
56
+ "test:all": "bun run test:fast && bun run test:tui && bun run test:runtime",
57
+ "test:fast": "bun test test/*.test.ts",
58
+ "test:runtime": "bun test test/runtime/*.test.ts",
59
+ "test:tui": "bun test test/tui/*.test.ts",
60
+ "test:tui:manual": "bun scripts/tui-scenario.ts --manual",
61
+ "test:tui-scenario": "bun scripts/tui-scenario.ts",
55
62
  "typecheck": "tsc --noEmit",
56
63
  "verify:tui-perf": "bun scripts/verify-tui-perf.ts",
57
64
  "version:build": "bun scripts/bump-build.ts",
@@ -73,10 +80,14 @@
73
80
  "playwright-core": "1.59.1"
74
81
  },
75
82
  "devDependencies": {
83
+ "@xterm/headless": "6.0.0",
76
84
  "beautiful-mermaid": "^1.1.3",
77
85
  "bun-types": "^1.3.14",
78
86
  "cli-highlight": "^2.1.11",
79
87
  "diff": "^9.0.0",
88
+ "just-bash": "^3.4.2",
89
+ "mountx": "^0.0.2",
90
+ "msw": "^2.15.0",
80
91
  "tsdown": "^0.22.7",
81
92
  "typescript": "^7.0.2",
82
93
  "yaml": "^2.8.1"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "appVersion": "3.11.2",
3
3
  "cliVersion": "0.16.5",
4
- "extractedAt": "2026-09-11T10:26:25.347Z",
4
+ "extractedAt": "2026-09-11T20:51:11.565Z",
5
5
  "sha512": "4UAMZSP9ZWBrnb8wGaP39rb5dB5ikPx4aYPXKXGea1Vmd6L6vGma3rXwRxKbhBxgsCIE9jv6tmrdSL60RrzGcA==",
6
6
  "source": "https://cdn-zcode.z.ai/zcode/electron/releases/3.11.2/linux-x64/ZCode-3.11.2-linux-x64.deb",
7
7
  "runtimeCapabilities": {
@@ -162117,6 +162117,17 @@ var PermissionPreview = class {
162117
162117
  }
162118
162118
  };
162119
162119
  //#endregion
162120
+ //#region packages/zcode-tui/src/permission-request-queue.ts
162121
+ /** Runs complete permission interactions in FIFO order so their dialogs never overlap. */
162122
+ var PermissionRequestQueue = class {
162123
+ tail = Promise.resolve();
162124
+ run(request) {
162125
+ const result = this.tail.then(request);
162126
+ this.tail = result.then(() => void 0, () => void 0);
162127
+ return result;
162128
+ }
162129
+ };
162130
+ //#endregion
162120
162131
  //#region src/app-server-client.ts
162121
162132
  const maximumOutputBytes = 16 * 1024 * 1024;
162122
162133
  const forceTerminationDelayMilliseconds = 500;
@@ -166627,6 +166638,7 @@ var ZCodeTui = class {
166627
166638
  workflowPanel;
166628
166639
  workflowView;
166629
166640
  workflowRefreshInFlight = false;
166641
+ permissionRequests = new PermissionRequestQueue();
166630
166642
  choiceDepth = 0;
166631
166643
  settingSwitchInFlight = false;
166632
166644
  fullscreenWelcomeVisible = true;
@@ -168858,10 +168870,13 @@ var ZCodeTui = class {
168858
168870
  if (wasActive && !this.attachmentBar.isActive()) this.focusEditor();
168859
168871
  this.ui.requestRender();
168860
168872
  }
168861
- async requestPermission(requestValue, context) {
168862
- const request = isRecord(requestValue) ? requestValue : {};
168873
+ requestPermission(requestValue, context) {
168863
168874
  const contextRecord = isRecord(context) ? context : void 0;
168864
168875
  const signal = contextRecord?.abortSignal instanceof AbortSignal ? contextRecord.abortSignal : this.turnAbortController?.signal;
168876
+ return this.permissionRequests.run(() => this.requestPermissionUnqueued(requestValue, signal));
168877
+ }
168878
+ async requestPermissionUnqueued(requestValue, signal) {
168879
+ const request = isRecord(requestValue) ? requestValue : {};
168865
168880
  const toolName = asString(request.toolName) ?? "tool";
168866
168881
  const asksUserQuestion = isAskUserQuestionTool(toolName);
168867
168882
  const toolCallId = asString(request.toolCallId) ?? asString(request.toolUseId) ?? asString(request.callId);
@@ -170524,7 +170539,7 @@ var ZCodeTui = class {
170524
170539
  return await choose(this.ui, this.choiceHost, this.theme, options);
170525
170540
  } finally {
170526
170541
  this.choiceDepth = Math.max(0, this.choiceDepth - 1);
170527
- this.focusEditor();
170542
+ if (this.choiceDepth === 0) this.focusEditor();
170528
170543
  this.ui.requestRender();
170529
170544
  }
170530
170545
  }
@@ -170534,7 +170549,7 @@ var ZCodeTui = class {
170534
170549
  return await promptText(this.ui, this.choiceHost, this.theme, options);
170535
170550
  } finally {
170536
170551
  this.choiceDepth = Math.max(0, this.choiceDepth - 1);
170537
- this.focusEditor();
170552
+ if (this.choiceDepth === 0) this.focusEditor();
170538
170553
  this.ui.requestRender();
170539
170554
  }
170540
170555
  }