tmux-ide 2.9.2 → 2.9.3

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 (263) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +2071 -625
  3. package/package.json +14 -5
  4. package/packages/contracts/src/desktop-host.ts +3 -0
  5. package/packages/contracts/src/saved-machines.ts +19 -0
  6. package/packages/contracts/src/terminal-replica.ts +1 -1
  7. package/packages/core/package.json +3 -2
  8. package/packages/core/src/terminal-delivery.ts +51 -3
  9. package/packages/core/src/terminal-fnv64-wasm.ts +4 -3
  10. package/packages/core/src/terminal-replica-hash-cache.ts +129 -31
  11. package/packages/core/src/terminal-replica-owned-row.ts +27 -0
  12. package/packages/core/src/terminal-replica.ts +13 -28
  13. package/packages/daemon/dist/command-center/daemon-fleet-facts-observer.js +96 -10
  14. package/packages/daemon/dist/command-center/resources/saved-machine-route.js +40 -1
  15. package/packages/daemon/dist/command-center/ws-events.js +5 -24
  16. package/packages/daemon/dist/lib/canonical-daemon-bootstrap.js +8 -0
  17. package/packages/daemon/dist/lib/canonical-daemon.js +28 -2
  18. package/packages/daemon/dist/lib/daemon-embed.js +1 -1
  19. package/packages/daemon/dist/lib/daemon-service-manager.js +122 -0
  20. package/packages/daemon/dist/lib/daemon-service-plan.js +127 -0
  21. package/packages/daemon/dist/lib/daemon-service.js +259 -0
  22. package/packages/daemon/dist/lib/install-origin.js +2 -0
  23. package/packages/daemon/dist/lib/local-fleet-request.js +9 -3
  24. package/packages/daemon/dist/lib/log.js +6 -10
  25. package/packages/daemon/dist/lib/managed-installer-update.js +67 -0
  26. package/packages/daemon/dist/lib/{tui-download-lock.js → private-operation-lock.js} +11 -11
  27. package/packages/daemon/dist/lib/remote-daemon-info.js +3 -2
  28. package/packages/daemon/dist/lib/remote-daemon-lifecycle.js +4 -4
  29. package/packages/daemon/dist/lib/remote-tmux-command.js +10 -0
  30. package/packages/daemon/dist/lib/runtime-namespace.js +28 -16
  31. package/packages/daemon/dist/lib/saved-machines.js +40 -2
  32. package/packages/daemon/dist/lib/ssh-daemon-transport.js +24 -9
  33. package/packages/daemon/dist/lib/tmux-server-owner.js +1 -1
  34. package/packages/daemon/dist/lib/tmux-server-registration.js +21 -3
  35. package/packages/daemon/dist/lib/tui-binary.js +2 -2
  36. package/packages/daemon/dist/lib/update.js +18 -0
  37. package/packages/daemon/dist/lib/workspace-multiplexer-verbs.js +24 -1
  38. package/packages/daemon/dist/machines.js +40 -4
  39. package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Info.plist +2 -2
  40. package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/MacOS/tmux-ide-notifier +0 -0
  41. package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Resources/Assets.car +0 -0
  42. package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/_CodeSignature/CodeResources +2 -2
  43. package/packages/daemon/dist/terminal/attachments/direct-websocket.js +4 -1
  44. package/packages/daemon/dist/terminal/attachments/native-runtime.js +22 -13
  45. package/packages/daemon/dist/terminal/mirror/mirror-service.js +101 -3
  46. package/packages/daemon/dist/terminal/mirror/registered-window-guard.js +62 -0
  47. package/packages/daemon/dist/terminal/mirror/session-channel.js +75 -4
  48. package/packages/daemon/dist/terminal/mirror/shared-window-index.js +45 -0
  49. package/packages/daemon/dist/terminal/pane-stream/pane-stream-websocket.js +11 -1
  50. package/packages/daemon/dist/terminal/session-runtime/multiplexer-backend.js +1 -0
  51. package/packages/daemon/dist/terminal/session-runtime/registry.js +56 -7
  52. package/packages/daemon/dist/terminal/session-runtime/semantic-mutation-executor.js +3 -1
  53. package/packages/daemon/dist/tui/mirror/dialog-model.js +2 -35
  54. package/packages/daemon/dist/tui/mirror/runtime/application-daemon-authority-owner.js +8 -0
  55. package/packages/daemon/dist/tui/mirror/runtime/application-home-fleet.js +20 -2
  56. package/packages/daemon/dist/tui/mirror/runtime/application-machine-agents.js +7 -1
  57. package/packages/daemon/dist/tui/mirror/runtime/application-machine-authority.js +59 -9
  58. package/packages/daemon/dist/tui/mirror/runtime/application-machine-navigation.js +27 -19
  59. package/packages/daemon/dist/tui/mirror/runtime/application-machine-sidebar.jsx +23 -18
  60. package/packages/daemon/dist/tui/mirror/runtime/application-machine-startup.js +31 -2
  61. package/packages/daemon/dist/tui/mirror/runtime/application-palette-search-owner.js +7 -3
  62. package/packages/daemon/dist/tui/mirror/runtime/application-performance-log.js +3 -0
  63. package/packages/daemon/dist/tui/mirror/runtime/application-terminal-input-ingress.js +146 -2
  64. package/packages/daemon/dist/tui/mirror/runtime/application-terminal-interaction-controller.js +201 -50
  65. package/packages/daemon/dist/tui/mirror/runtime/bounded-performance-record-writer.js +50 -10
  66. package/packages/daemon/dist/tui/mirror/runtime/terminal-fast-lane-renderer-adapter.js +6 -5
  67. package/packages/daemon/dist/tui/mirror/runtime/terminal-pane-input-router.js +3 -0
  68. package/packages/daemon/dist/tui/mirror/runtime/workspace-terminal-fast-lane.js +8 -2
  69. package/packages/daemon/dist/tui/mirror/terminal-text.js +35 -0
  70. package/packages/daemon/dist/tui/mirror/workspace/connection-feedback.js +5 -3
  71. package/packages/daemon/src/command-center/daemon-fleet-facts-observer.ts +100 -10
  72. package/packages/daemon/src/command-center/resources/saved-machine-route.ts +48 -1
  73. package/packages/daemon/src/command-center/ws-events.ts +5 -25
  74. package/packages/daemon/src/lib/canonical-daemon-bootstrap.ts +12 -0
  75. package/packages/daemon/src/lib/canonical-daemon.ts +44 -2
  76. package/packages/daemon/src/lib/daemon-embed.ts +1 -0
  77. package/packages/daemon/src/lib/daemon-service-manager.ts +152 -0
  78. package/packages/daemon/src/lib/daemon-service-plan.ts +153 -0
  79. package/packages/daemon/src/lib/daemon-service.ts +301 -0
  80. package/packages/daemon/src/lib/install-origin.ts +5 -0
  81. package/packages/daemon/src/lib/local-fleet-request.ts +19 -3
  82. package/packages/daemon/src/lib/log.ts +13 -9
  83. package/packages/daemon/src/lib/managed-installer-update.ts +79 -0
  84. package/packages/daemon/src/lib/{tui-download-lock.ts → private-operation-lock.ts} +15 -11
  85. package/packages/daemon/src/lib/remote-daemon-info.ts +3 -3
  86. package/packages/daemon/src/lib/remote-daemon-lifecycle.ts +4 -4
  87. package/packages/daemon/src/lib/remote-tmux-command.ts +12 -0
  88. package/packages/daemon/src/lib/runtime-namespace.ts +27 -18
  89. package/packages/daemon/src/lib/saved-machines.ts +40 -1
  90. package/packages/daemon/src/lib/ssh-daemon-transport.ts +25 -7
  91. package/packages/daemon/src/lib/tmux-server-owner.ts +1 -0
  92. package/packages/daemon/src/lib/tmux-server-registration.ts +21 -3
  93. package/packages/daemon/src/lib/tui-binary.ts +2 -2
  94. package/packages/daemon/src/lib/update.ts +24 -0
  95. package/packages/daemon/src/lib/workspace-multiplexer-verbs.ts +22 -0
  96. package/packages/daemon/src/machines.ts +53 -5
  97. package/packages/daemon/src/terminal/attachments/direct-websocket.ts +8 -2
  98. package/packages/daemon/src/terminal/attachments/native-runtime.ts +28 -13
  99. package/packages/daemon/src/terminal/mirror/mirror-service.ts +105 -3
  100. package/packages/daemon/src/terminal/mirror/registered-window-guard.ts +66 -0
  101. package/packages/daemon/src/terminal/mirror/session-channel.ts +92 -4
  102. package/packages/daemon/src/terminal/mirror/shared-window-index.ts +42 -0
  103. package/packages/daemon/src/terminal/pane-stream/pane-stream-websocket.ts +12 -1
  104. package/packages/daemon/src/terminal/session-runtime/multiplexer-backend.ts +2 -0
  105. package/packages/daemon/src/terminal/session-runtime/registry.ts +70 -8
  106. package/packages/daemon/src/terminal/session-runtime/semantic-mutation-executor.ts +3 -1
  107. package/packages/daemon/src/tui/mirror/dialog-model.ts +2 -32
  108. package/packages/daemon/src/tui/mirror/runtime/application-daemon-authority-owner.ts +8 -0
  109. package/packages/daemon/src/tui/mirror/runtime/application-home-fleet.ts +19 -2
  110. package/packages/daemon/src/tui/mirror/runtime/application-machine-agents.ts +6 -1
  111. package/packages/daemon/src/tui/mirror/runtime/application-machine-authority.ts +60 -11
  112. package/packages/daemon/src/tui/mirror/runtime/application-machine-navigation.ts +39 -33
  113. package/packages/daemon/src/tui/mirror/runtime/application-machine-sidebar.tsx +31 -23
  114. package/packages/daemon/src/tui/mirror/runtime/application-machine-startup.ts +38 -2
  115. package/packages/daemon/src/tui/mirror/runtime/application-palette-search-owner.ts +7 -4
  116. package/packages/daemon/src/tui/mirror/runtime/application-performance-log.ts +3 -0
  117. package/packages/daemon/src/tui/mirror/runtime/application-root-v2.tsx +1 -1
  118. package/packages/daemon/src/tui/mirror/runtime/application-shell-view.tsx +47 -46
  119. package/packages/daemon/src/tui/mirror/runtime/application-terminal-input-ingress.ts +165 -2
  120. package/packages/daemon/src/tui/mirror/runtime/application-terminal-interaction-controller.ts +207 -53
  121. package/packages/daemon/src/tui/mirror/runtime/bounded-performance-record-writer.ts +49 -9
  122. package/packages/daemon/src/tui/mirror/runtime/terminal-fast-lane-renderer-adapter.ts +6 -5
  123. package/packages/daemon/src/tui/mirror/runtime/terminal-pane-input-router.ts +4 -0
  124. package/packages/daemon/src/tui/mirror/runtime/workspace-terminal-fast-lane.ts +8 -3
  125. package/packages/daemon/src/tui/mirror/terminal-text.ts +32 -0
  126. package/packages/daemon/src/tui/mirror/workspace/connection-feedback.ts +6 -3
  127. package/packages/daemon-client/src/fleet-connection-status.ts +10 -1
  128. package/packages/daemon-client/src/workspace-client.ts +4 -1
  129. package/packages/contracts/src/__tests__/actions-contract.test.ts +0 -119
  130. package/packages/contracts/src/__tests__/agent-graph-overlay.test.ts +0 -428
  131. package/packages/contracts/src/__tests__/app-window-mutation.test.ts +0 -51
  132. package/packages/contracts/src/__tests__/app-window-state.test.ts +0 -34
  133. package/packages/contracts/src/__tests__/application-shell.test.ts +0 -645
  134. package/packages/contracts/src/__tests__/automation-operations.test.ts +0 -78
  135. package/packages/contracts/src/__tests__/causal-cell.test.ts +0 -47
  136. package/packages/contracts/src/__tests__/client-view-state.test.ts +0 -115
  137. package/packages/contracts/src/__tests__/cohesion-fixture.test.ts +0 -106
  138. package/packages/contracts/src/__tests__/commands.test.ts +0 -86
  139. package/packages/contracts/src/__tests__/control.test.ts +0 -154
  140. package/packages/contracts/src/__tests__/daemon-events.test.ts +0 -405
  141. package/packages/contracts/src/__tests__/daemon-resources.test.ts +0 -143
  142. package/packages/contracts/src/__tests__/daemon-wire.test.ts +0 -149
  143. package/packages/contracts/src/__tests__/desktop-host.test.ts +0 -269
  144. package/packages/contracts/src/__tests__/desktop-missions.test.ts +0 -215
  145. package/packages/contracts/src/__tests__/experience-conformance.test.ts +0 -153
  146. package/packages/contracts/src/__tests__/experience-kernel-boundary.test.ts +0 -113
  147. package/packages/contracts/src/__tests__/experience-shell.test.ts +0 -65
  148. package/packages/contracts/src/__tests__/fixtures/daemon-wire-v2.json +0 -35
  149. package/packages/contracts/src/__tests__/fixtures/daemon-wire-v3.json +0 -35
  150. package/packages/contracts/src/__tests__/fixtures/daemon-wire-v4.json +0 -35
  151. package/packages/contracts/src/__tests__/fixtures/scoped-receipt.ts +0 -62
  152. package/packages/contracts/src/__tests__/fleet-agent-graph.test.ts +0 -231
  153. package/packages/contracts/src/__tests__/fleet-catalog.test.ts +0 -270
  154. package/packages/contracts/src/__tests__/fleet-lifecycle.test.ts +0 -62
  155. package/packages/contracts/src/__tests__/focus-overlay.test.ts +0 -110
  156. package/packages/contracts/src/__tests__/ide-config.test.ts +0 -64
  157. package/packages/contracts/src/__tests__/interaction-evidence.test.ts +0 -288
  158. package/packages/contracts/src/__tests__/interaction-receipt-v2.test.ts +0 -72
  159. package/packages/contracts/src/__tests__/issue-error.test.ts +0 -78
  160. package/packages/contracts/src/__tests__/mission-projections.test.ts +0 -186
  161. package/packages/contracts/src/__tests__/missions.test.ts +0 -272
  162. package/packages/contracts/src/__tests__/multiplexer-verbs.test.ts +0 -242
  163. package/packages/contracts/src/__tests__/pane-appearance.test.ts +0 -146
  164. package/packages/contracts/src/__tests__/pane-read-result.test.ts +0 -55
  165. package/packages/contracts/src/__tests__/pane-stream.test.ts +0 -536
  166. package/packages/contracts/src/__tests__/pane-widget-marker.test.ts +0 -327
  167. package/packages/contracts/src/__tests__/performance-metrics.test.ts +0 -73
  168. package/packages/contracts/src/__tests__/performance-qualification.test.ts +0 -137
  169. package/packages/contracts/src/__tests__/rich-card-widget.test.ts +0 -29
  170. package/packages/contracts/src/__tests__/session-runtime.test.ts +0 -512
  171. package/packages/contracts/src/__tests__/startup-readiness.test.ts +0 -409
  172. package/packages/contracts/src/__tests__/terminal-attachment-stream.test.ts +0 -72
  173. package/packages/contracts/src/__tests__/terminal-attachments.test.ts +0 -329
  174. package/packages/contracts/src/__tests__/terminal-delivery.test.ts +0 -88
  175. package/packages/contracts/src/__tests__/terminal-runtime-inventory.test.ts +0 -68
  176. package/packages/contracts/src/__tests__/terminals.test.ts +0 -87
  177. package/packages/contracts/src/__tests__/tmux-server-scope.test.ts +0 -166
  178. package/packages/contracts/src/__tests__/transport-contract-loading.test.ts +0 -91
  179. package/packages/contracts/src/__tests__/visual-tokens.test.ts +0 -224
  180. package/packages/contracts/src/__tests__/window-links.test.ts +0 -243
  181. package/packages/contracts/src/__tests__/workspace-changes-resource.test.ts +0 -317
  182. package/packages/contracts/src/__tests__/workspace-changes-view.test.ts +0 -122
  183. package/packages/contracts/src/__tests__/workspace-config.test.ts +0 -294
  184. package/packages/contracts/src/__tests__/workspace-files-resource.test.ts +0 -261
  185. package/packages/contracts/src/__tests__/workspace-files-tree.test.ts +0 -147
  186. package/packages/contracts/src/__tests__/workspace-pane-creation.test.ts +0 -249
  187. package/packages/contracts/src/__tests__/workspace-promotion.test.ts +0 -94
  188. package/packages/contracts/src/__tests__/workspace-resource-identity.test.ts +0 -90
  189. package/packages/contracts/src/daemon-resource-request.test.ts +0 -192
  190. package/packages/contracts/src/native-operation-identity.test.ts +0 -23
  191. package/packages/contracts/src/workspace-admission.test.ts +0 -21
  192. package/packages/contracts/src/workspace-catalog-resource.test.ts +0 -146
  193. package/packages/core/src/agent-provisioning.test.ts +0 -42
  194. package/packages/core/src/application-shell-session.test.ts +0 -105
  195. package/packages/core/src/interaction-evidence.test.ts +0 -134
  196. package/packages/core/src/interaction-flow.test.ts +0 -66
  197. package/packages/core/src/interaction-receipts.test.ts +0 -671
  198. package/packages/core/src/navigator.test.ts +0 -34
  199. package/packages/core/src/optimistic-projection-conformance.test.ts +0 -75
  200. package/packages/core/src/optimistic-projection.test.ts +0 -118
  201. package/packages/core/src/performance-metrics.test.ts +0 -121
  202. package/packages/core/src/performance-qualification.test.ts +0 -283
  203. package/packages/core/src/saved-machines.test.ts +0 -80
  204. package/packages/core/src/terminal-compact-cold.test.ts +0 -87
  205. package/packages/core/src/terminal-conformance.test.ts +0 -48
  206. package/packages/core/src/terminal-delivery-cache-lifetime.test.ts +0 -167
  207. package/packages/core/src/terminal-delivery-encode-cooperative.test.ts +0 -140
  208. package/packages/core/src/terminal-delivery-representation-hash.test.ts +0 -77
  209. package/packages/core/src/terminal-delivery.test.ts +0 -1471
  210. package/packages/core/src/terminal-fnv64-wasm.test.ts +0 -61
  211. package/packages/core/src/terminal-replica-cold.test.ts +0 -31
  212. package/packages/core/src/terminal-replica-cooperative.test.ts +0 -170
  213. package/packages/core/src/terminal-replica-hash-cache.test.ts +0 -283
  214. package/packages/core/src/terminal-replica.test.ts +0 -347
  215. package/packages/core/src/workspace-selection.test.ts +0 -63
  216. package/packages/daemon/dist/__tests__/support.js +0 -33
  217. package/packages/daemon/dist/lib/__tests__/fixtures/workspace-state-writer.js +0 -58
  218. package/packages/daemon/dist/lib/__tests__/installed-recovery-fixture.js +0 -400
  219. package/packages/daemon/dist/terminal/__tests__/MockPtyAdapter.js +0 -182
  220. package/packages/daemon/dist/terminal/mirror/__tests__/scripted-channel.js +0 -98
  221. package/packages/daemon/dist/terminal/mirror/__tests__/simulated-channel.js +0 -156
  222. package/packages/daemon/src/tui/mirror/__snapshots__/activity-surface-renderer.test.tsx.snap +0 -42
  223. package/packages/daemon/src/tui/mirror/__snapshots__/changes-terminal-surface-renderer.test.tsx.snap +0 -267
  224. package/packages/daemon/src/tui/mirror/__snapshots__/home-files-surface-renderer.test.tsx.snap +0 -267
  225. package/packages/daemon/src/tui/mirror/__snapshots__/missions-surface-renderer.test.tsx.snap +0 -134
  226. package/packages/daemon/src/tui/mirror/__snapshots__/recipes-gallery-renderer.test.tsx.snap +0 -141
  227. package/packages/daemon/src/tui/mirror/__snapshots__/shell-chrome-renderer.test.tsx.snap +0 -134
  228. package/packages/daemon/src/tui/mirror/runtime/__snapshots__/application-shell-view-renderer.test.tsx.snap +0 -87
  229. package/packages/daemon/src/tui/mirror/workspace/__snapshots__/agent-terminal-canvas-renderer.test.tsx.snap +0 -348
  230. package/packages/daemon/src/tui/mirror/workspace/__snapshots__/application-shell-renderer.test.tsx.snap +0 -134
  231. package/packages/daemon/src/tui/mirror/workspace/__snapshots__/command-palette-surface-renderer.test.tsx.snap +0 -255
  232. package/packages/daemon/src/tui/mirror/workspace/__snapshots__/pane-frame-renderer.test.tsx.snap +0 -525
  233. package/packages/daemon/src/tui/mirror/workspace/__snapshots__/terminal-pane-header-polish-renderer.test.tsx.snap +0 -31
  234. package/packages/daemon/src/tui/mirror/workspace/__snapshots__/workbench-shell-renderer.test.tsx.snap +0 -134
  235. package/packages/daemon-client/src/application-shell-session.test.ts +0 -196
  236. package/packages/daemon-client/src/automation-client.test.ts +0 -214
  237. package/packages/daemon-client/src/bootstrap-coordinator.test.ts +0 -145
  238. package/packages/daemon-client/src/connection-supervisor.test.ts +0 -109
  239. package/packages/daemon-client/src/direct-application-shell-transport.test.ts +0 -941
  240. package/packages/daemon-client/src/first-latest-coordinator.test.ts +0 -175
  241. package/packages/daemon-client/src/fleet-dial-scheduler.test.ts +0 -114
  242. package/packages/daemon-client/src/fleet-environments.test.ts +0 -40
  243. package/packages/daemon-client/src/generation-bound-store-timers.test.ts +0 -74
  244. package/packages/daemon-client/src/owner-action-client.test.ts +0 -245
  245. package/packages/daemon-client/src/pane-stream-client.test.ts +0 -2841
  246. package/packages/daemon-client/src/pane-stream-clock-calibration.test.ts +0 -207
  247. package/packages/daemon-client/src/pane-stream-loopback-benchmark.test.ts +0 -51
  248. package/packages/daemon-client/src/push-resource-session.test.ts +0 -509
  249. package/packages/daemon-client/src/resource-replica.test.ts +0 -186
  250. package/packages/daemon-client/src/runtime-resource-ledger.test.ts +0 -18
  251. package/packages/daemon-client/src/scoped-tmux-server-transport.test.ts +0 -114
  252. package/packages/daemon-client/src/terminal-fast-lane.test.ts +0 -835
  253. package/packages/daemon-client/src/tmux-server-client.test.ts +0 -279
  254. package/packages/daemon-client/src/tmux-server-interaction-events.test.ts +0 -230
  255. package/packages/daemon-client/src/workspace-catalog-v2.test.ts +0 -109
  256. package/packages/daemon-client/src/workspace-client-boundaries.test.ts +0 -59
  257. package/packages/daemon-client/src/workspace-client-operations.test.ts +0 -96
  258. package/packages/daemon-client/src/workspace-client.test.ts +0 -2912
  259. package/packages/daemon-client/src/workspace-event-supervisor.test.ts +0 -1086
  260. package/packages/daemon-client/src/workspace-pane-client.test.ts +0 -80
  261. package/packages/presentation/src/presentation-contract.test.ts +0 -63
  262. package/packages/tmux-bridge/src/runner.test.ts +0 -614
  263. package/packages/tmux-bridge/src/targeting.test.ts +0 -107
@@ -1,156 +0,0 @@
1
- /**
2
- * A simulated control-mode channel for MirrorService unit tests.
3
- *
4
- * Backed by the REAL {@link ControlChannelCore}, fed raw control-mode lines
5
- * (`%begin`/`%end` blocks, `%output`, notifications) — so the tests exercise
6
- * the genuine FIFO reply matching and synchronous dispatch the seed recipe's
7
- * gaplessness proof depends on, without a tmux process.
8
- *
9
- * Every command written pushes exactly one reply sink, so the simulator MUST
10
- * answer every command in write order. `autoReply` answers the boring ones
11
- * (identity join, stamping, fire-and-forget input) immediately; commands it
12
- * declines (returns null for) wait for a manual {@link reply}, letting a test
13
- * interleave `%output` lines between a probe and its reply.
14
- */
15
- import { ControlChannelCore, } from "../control-channel.js";
16
- export class SimulatedChannel {
17
- autoReply;
18
- core;
19
- written = [];
20
- disposed = false;
21
- replyNum = 0;
22
- constructor(handlers, autoReply) {
23
- this.autoReply = autoReply;
24
- this.core = new ControlChannelCore(handlers);
25
- }
26
- start() {
27
- const started = new Promise((resolve, reject) => {
28
- this.core.push({ kind: "promise", resolve: () => resolve(), reject, lines: [] });
29
- });
30
- this.feedLines("%begin 1 0 0", "%end 1 0 0"); // the greeting block
31
- return started;
32
- }
33
- request(cmd) {
34
- const result = new Promise((resolve, reject) => {
35
- this.core.push({ kind: "promise", resolve, reject, lines: [] });
36
- });
37
- this.record(cmd);
38
- return result;
39
- }
40
- commandInline(cmd, onReply) {
41
- this.core.push({ kind: "inline", onReply, lines: [] });
42
- this.record(cmd);
43
- }
44
- commandListInline(cmd, replyCount, resultIndex, onReply) {
45
- this.core.pushCommandList(replyCount, resultIndex, onReply);
46
- this.written.push(cmd);
47
- // Acknowledge the outer command now. Source-shaped fixtures may also
48
- // auto-answer the selected branch; capture lists deliberately return null
49
- // and leave that second reply manual.
50
- this.reply([]);
51
- const auto = this.autoReply(cmd);
52
- if (auto)
53
- for (let index = 1; index < replyCount; index += 1)
54
- this.reply(index === resultIndex ? auto : []);
55
- }
56
- send(cmd, onReply) {
57
- this.core.push({ kind: "discard", ...(onReply ? { onReply } : {}) });
58
- this.record(cmd);
59
- }
60
- commandListBoundedInline(cmd, count, index, limits, onReply) {
61
- if (!this.core.pushBoundedCommandList(count, index, limits, onReply)) {
62
- onReply({ ok: false, lines: [] });
63
- return;
64
- }
65
- this.written.push(cmd);
66
- this.reply([]);
67
- const auto = this.autoReply(cmd);
68
- if (auto)
69
- for (let i = 1; i < count; i++)
70
- this.reply(i === index ? auto : []);
71
- }
72
- dispose() {
73
- this.disposed = true;
74
- return Promise.resolve();
75
- }
76
- /** Feed a reply block for the OLDEST unanswered command. */
77
- reply(lines, ok = true) {
78
- this.replyNum += 1;
79
- this.feedLines(`%begin 1 ${this.replyNum} 1`, ...lines, `${ok ? "%end" : "%error"} 1 ${this.replyNum} 1`);
80
- }
81
- /** Feed raw control-mode lines (notifications, `%output`, …). */
82
- feedLines(...lines) {
83
- this.core.feed(lines.map((line) => `${line}\r\n`).join(""));
84
- }
85
- output(pane, text) {
86
- this.feedLines(`%output ${pane} ${text}`);
87
- }
88
- record(cmd) {
89
- this.written.push(cmd);
90
- const auto = this.autoReply(cmd);
91
- if (auto)
92
- this.reply(auto);
93
- }
94
- }
95
- /** The standard 3-pane / 2-window fixture:
96
- * `@1` (window.test.one, "main"): `%1` (pane.alpha, active) | `%2` (pane.beta)
97
- * `@2` (window.test.two, "aux"): `%3` (unstamped → generated + stamped back)
98
- */
99
- export const FIXTURE = {
100
- session: "zz-sim",
101
- layoutW1: "aaaa,200x50,0,0{100x50,0,0,1,99x50,101,0,2}",
102
- layoutW2: "bbbb,200x50,0,0,3",
103
- truthRows: ["%1\t1\t@1\t1", "%2\t0\t@1\t1", "%3\t0\t@2\t0"],
104
- windowRows: (layoutW1, layoutW2) => [
105
- `@1\twindow.test.one\tmain\t1\t${layoutW1}\t0\toff`,
106
- `@2\twindow.test.two\taux\t0\t${layoutW2}\t0\toff`,
107
- ],
108
- descriptorRows: [
109
- "%1\tpane.alpha\t\t\tzsh\t/tmp/a\t0\tmain\t@1\tAlpha\t$1\t0\tAlpha IDE\tmission-a\t1\t1\twindow.test.one\tzz-sim\t2\t2\t",
110
- "%2\tpane.beta\t\t\tzsh\t/tmp/b\t0\tmain\t@1\tBeta\t$1\t1\tBeta IDE\t\t0\t1\twindow.test.one\tzz-sim\t2\t2\t",
111
- "%3\t\t\t\tzsh\t/tmp/c\t1\taux\t@2\tGamma\t$1\t0\tGamma IDE\t\t1\t0\t\tzz-sim\t1\t2\t",
112
- ],
113
- };
114
- /** Auto-reply script for the fixture: answers identity-join and input
115
- * commands, leaves capture/cursor probes (and anything unrecognized) manual. */
116
- export function fixtureAutoReply(state) {
117
- return (cmd) => {
118
- if (cmd.startsWith('display-message -p "#{qa:session_name}'))
119
- return ["zz-sim\t$1\t1234\t1700000000"];
120
- if (cmd.includes("qa:@tmux_ide_pane_id"))
121
- return state.descriptorRows;
122
- if (cmd.startsWith("list-panes -s"))
123
- return state.truthRows;
124
- if (cmd.startsWith("list-windows"))
125
- return state.windowRows.map((row, index) => {
126
- const parts = row.split("\t");
127
- if (parts.length === 7)
128
- parts.push(parts[4]);
129
- if (parts.length === 8)
130
- parts.push("emacs");
131
- if (parts.length === 9)
132
- parts.push(String(index));
133
- return parts.join("\t");
134
- });
135
- // Product-owned seeds are one atomic `set-option ; capture-pane` command
136
- // list. The capture reply remains manual just like a bare capture probe.
137
- if (cmd.includes("capture-pane"))
138
- return null;
139
- if (cmd.startsWith("if-shell -t"))
140
- return [];
141
- if (cmd.startsWith("set-option"))
142
- return [];
143
- if (cmd.startsWith("send-keys") || cmd.startsWith("refresh-client"))
144
- return [];
145
- if (/^display-message -p -t @[0-9]+ "#\{pane-border-status\}"$/u.test(cmd))
146
- return ["off"];
147
- return null; // capture-pane / display-message: manual
148
- };
149
- }
150
- export function fixtureState() {
151
- return {
152
- truthRows: [...FIXTURE.truthRows],
153
- windowRows: FIXTURE.windowRows(FIXTURE.layoutW1, FIXTURE.layoutW2),
154
- descriptorRows: [...FIXTURE.descriptorRows],
155
- };
156
- }
@@ -1,42 +0,0 @@
1
- // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
-
3
- exports[`ActivitySurface OpenTUI renderer records the %sx%s compact native dock-body baseline 1`] = `
4
- " Activity · 6 updates · 1 attention · 1 blocked · 1 working
5
- ● Codex 5.5: Building native Activity 12:48 working█
6
- ● mission M31: Files surface verified 12:47 done█
7
- ● ! review: Card 04 needs attention now blocked░
8
- ● Claude: Waiting for integration 12:44 idle░
9
- 1-4 of 6"
10
- `;
11
-
12
- exports[`ActivitySurface OpenTUI renderer records the %sx%s standard native dock-body baseline 1`] = `
13
- " Activity · 6 updates · 1 attention · 1 blocked · 1 working
14
- ● agent Codex 5.5 · Building native Activity 12:48 · working
15
- ● event mission M31 · Files surface verified 12:47 · done
16
- ● ! event review · Card 04 needs attention now · blocked
17
- ● agent Claude · Waiting for integration 12:44 · idle
18
- ● event workspace · Activity feed refreshed 12:42 · unknown
19
- ● agent 設計 agent · Checked responsive rows 12:40 · done
20
-
21
-
22
- j/k select · 1-6 of 6"
23
- `;
24
-
25
- exports[`ActivitySurface OpenTUI renderer records the %sx%s wide native dock-body baseline 1`] = `
26
- " Activity · 6 updates · 1 attention · 1 blocked · 1 working
27
- ● agent Codex 5.5 · Building native Activity — projection and renderer 12:48 · working
28
- ● event mission M31 · Files surface verified — 47 tests passed 12:47 · done
29
- ● ! event review · Card 04 needs attention — one renderer snapshot changed now · blocked
30
- ● agent Claude · Waiting for integration 12:44 · idle
31
- ● event workspace · Activity feed refreshed 12:42 · unknown
32
- ● agent 設計 agent · Checked responsive rows — compact, standard, and wide 12:40 · done
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
- j/k select · enter inspect · 1-6 of 6"
42
- `;
@@ -1,267 +0,0 @@
1
- // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
-
3
- exports[`Changes and terminal surfaces OpenTUI renderer renders Changes %sx%s with projected chip parity 1`] = `
4
- " Changes 3 files · +18 -3 │ app▏ │ ○ [r]
5
- ready
6
- ○ Staged (1) diff --git a/src/app.ts b/src/app.ts
7
- M○ README.md +2 @@ -1 +1 @@
8
- ○ Unstaged (1) -old
9
- M● src/app.… +12 -3 · [s stage] +new
10
- ○ Untracked (1) context
11
- ?○ notes/todo.md +4
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
- ]/[ hunk · / filter · ^e e ○ [s stage] ○ [u unstage] ○ [S all] ○ [U all]"
28
- `;
29
-
30
- exports[`Changes and terminal surfaces OpenTUI renderer renders Changes %sx%s with projected chip parity 2`] = `
31
- " Changes 3 files · +18 -3 │ app▏ │ ○ [r refresh]
32
- ready
33
- ○ Staged (1) diff --git a/src/app.ts b/src/app.ts
34
- M○ README.md +2 @@ -1 +1 @@
35
- ○ Unstaged (1) -old
36
- M● src/app.ts +12 -3 · [s stage] +new
37
- ○ Untracked (1) context
38
- ?○ notes/todo.md +4
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
- ]/[ hunk · ^e edit · / filter · r refresh · ^g home · ^q quit ○ [s stage] ○ [u unstage] ○ [S all] ○ [U all]"
71
- `;
72
-
73
- exports[`Changes and terminal surfaces OpenTUI renderer renders Changes %sx%s with projected chip parity 3`] = `
74
- " Changes 3 files · +18 -3 │ app▏ │ ○ [r refresh]
75
- ready
76
- ○ Staged (1) diff --git a/src/app.ts b/src/app.ts
77
- M○ README.md +2 @@ -1 +1 @@
78
- ○ Unstaged (1) -old
79
- M● src/app.ts +12 -3 · [s stage] +new
80
- ○ Untracked (1) context
81
- ?○ notes/todo.md +4
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
- ]/[ hunk · ^e edit · / filter · r refresh · ^g home · ^q quit ○ [s stage] ○ [u unstage] ○ [S all] ○ [U all]"
134
- `;
135
-
136
- exports[`Changes and terminal surfaces OpenTUI renderer renders terminal chrome %sx%s without expanding body cells 1`] = `
137
- " api server ● [⛶ zoom] ○ [+ split] ● [/ search] ● [SYNC]
138
- framebuffer body stays opaque
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
- focused · attention · zoomed · ↑12/120 · workspace %7"
161
- `;
162
-
163
- exports[`Changes and terminal surfaces OpenTUI renderer renders terminal chrome %sx%s without expanding body cells 2`] = `
164
- " api server ● [⛶ zoom] ○ [+ split] ● [/ search] ● [SYNC]
165
- framebuffer body stays opaque
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
- focused · attention · zoomed · ↑12/120 · workspace %7"
204
- `;
205
-
206
- exports[`Changes and terminal surfaces OpenTUI renderer renders terminal chrome %sx%s without expanding body cells 3`] = `
207
- " api server ● [⛶ zoom] ○ [+ split] ● [/ search] ● [SYNC]
208
- framebuffer body stays opaque
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
- focused · attention · zoomed · ↑12/120 · workspace %7"
267
- `;