@huseynsnmz/pi-board 0.0.0-stage → 0.14.0

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 (297) hide show
  1. package/CHANGELOG.md +256 -0
  2. package/IMPLEMENTATION_PLAN.md +920 -0
  3. package/LICENSE +21 -0
  4. package/PRD.md +484 -0
  5. package/PROGRESS.md +142 -0
  6. package/README.md +439 -2
  7. package/VERIFY.md +115 -0
  8. package/docs/BATCH_SELECTION_READ_FLOW.md +277 -0
  9. package/docs/EXPLORATION.md +187 -0
  10. package/docs/PTY_ATTACH_IMPLEMENTATION_PLAN.md +581 -0
  11. package/docs/RELEASE.md +148 -0
  12. package/docs/superpowers/plans/2026-08-15-screenlog-gc.md +704 -0
  13. package/docs/superpowers/plans/2026-08-16-attach-double-cursor-jiggle-retry.md +499 -0
  14. package/docs/superpowers/plans/2026-08-21-attach-coldstart-jiggle-rearm.md +797 -0
  15. package/docs/superpowers/plans/2026-08-21-dashboard-keypress-lag.md +366 -0
  16. package/docs/superpowers/plans/2026-08-21-issue-14-needs-input-no-auto-done.md +576 -0
  17. package/docs/superpowers/plans/2026-08-22-jiggle-shrink-and-hold.md +337 -0
  18. package/docs/superpowers/plans/2026-08-22-launch-cwd-favorites.md +916 -0
  19. package/docs/superpowers/plans/2026-08-22-question-tool-grouping.md +211 -0
  20. package/docs/superpowers/plans/2026-08-22-rename-state-labels.md +182 -0
  21. package/docs/superpowers/plans/2026-08-22-stable-list-order.md +51 -0
  22. package/docs/superpowers/plans/2026-08-27-locks-acquirelock-spin.md +614 -0
  23. package/docs/superpowers/plans/2026-08-27-pty-runner-test-flaky.md +32 -0
  24. package/docs/superpowers/plans/2026-08-29-code-refs-badges.md +223 -0
  25. package/docs/superpowers/plans/2026-08-30-circular-navigation.md +308 -0
  26. package/docs/superpowers/plans/2026-08-30-post-exit-timing-fix.md +37 -0
  27. package/docs/superpowers/plans/2026-08-30-pty-attach-quality-debt.md +311 -0
  28. package/docs/superpowers/plans/2026-08-30-readme-v2.md +294 -0
  29. package/docs/superpowers/plans/2026-09-01-attach-detach-gate-cursor-anchor.md +284 -0
  30. package/docs/superpowers/plans/2026-09-02-attach-detach-editor-state.md +722 -0
  31. package/docs/superpowers/plans/2026-09-03-code-refs-pr-backlink-narrow.md +551 -0
  32. package/docs/superpowers/plans/2026-09-03-detach-gate-glyph-fallback.md +146 -0
  33. package/docs/superpowers/plans/2026-09-04-evidence-outputpreview.md +209 -0
  34. package/docs/superpowers/plans/2026-09-04-warm-host-reclaim.md +796 -0
  35. package/docs/superpowers/plans/2026-09-05-issue-13-drainnextfollowup-pty-probe.md +114 -0
  36. package/docs/superpowers/plans/2026-09-05-issue-38-windows-wezterm-ime-cursor.md +73 -0
  37. package/docs/superpowers/plans/2026-09-05-issue-39-truncate-codepoint-boundary.md +143 -0
  38. package/docs/superpowers/plans/2026-09-05-issue-61-mention-fallback-guards.md +226 -0
  39. package/docs/superpowers/plans/2026-09-05-issue-63-flaky-manual-completion.md +87 -0
  40. package/docs/superpowers/plans/2026-09-05-issue-64-changelog-release-helper.md +53 -0
  41. package/docs/superpowers/plans/2026-09-05-pty-host-stacking-sock-race.md +731 -0
  42. package/docs/superpowers/plans/2026-09-08-attach-ctrl-left-detach.md +30 -0
  43. package/docs/superpowers/plans/2026-09-08-dashboard-shrink-repaint.md +68 -0
  44. package/docs/superpowers/plans/2026-09-08-issue-11-attach-runtime-desync-heal.md +917 -0
  45. package/docs/superpowers/plans/2026-09-08-legacy-stale-host-recovery.md +125 -0
  46. package/docs/superpowers/plans/2026-09-08-spawn-async-error-swallow.md +56 -0
  47. package/docs/superpowers/plans/2026-09-08-stale-model-attach-guard.md +96 -0
  48. package/docs/superpowers/plans/2026-09-09-claimpid-blocks-replace.md +267 -0
  49. package/docs/superpowers/plans/2026-09-09-harden-runner-architecture.md +603 -0
  50. package/docs/superpowers/plans/2026-09-09-single-writer-completion.md +252 -0
  51. package/docs/superpowers/plans/2026-09-10-reader-consistency.md +115 -0
  52. package/docs/superpowers/plans/2026-09-14-attach-cursor-dectcem-gate.md +469 -0
  53. package/docs/superpowers/plans/2026-09-14-attach-snapshot.md +92 -0
  54. package/docs/superpowers/plans/2026-09-14-host-meta-orphan-lock.md +771 -0
  55. package/docs/superpowers/plans/2026-09-14-issue-106-terminal-frame-cognition.md +299 -0
  56. package/docs/superpowers/plans/2026-09-14-issue-113-foreground-preview-race.md +609 -0
  57. package/docs/superpowers/plans/2026-09-14-terminal-model.md +145 -0
  58. package/docs/superpowers/plans/2026-09-15-coordinator-pipe-root-normalize.md +224 -0
  59. package/docs/superpowers/plans/2026-09-15-lease-publish-eprem-reclaim.md +341 -0
  60. package/docs/superpowers/plans/2026-09-18-detach-anchor-reporter-endpoint.md +875 -0
  61. package/docs/superpowers/plans/2026-09-20-control-lifecycle.md +116 -0
  62. package/docs/superpowers/plans/2026-09-20-issue-121-perf-gate-out-of-coverage.md +517 -0
  63. package/docs/superpowers/plans/2026-09-23-a5-mid-stream-assertion.md +25 -0
  64. package/docs/superpowers/plans/2026-09-23-cwd-browse-tab-drill.md +393 -0
  65. package/docs/superpowers/plans/2026-09-23-terminal-query-forwarding.md +51 -0
  66. package/docs/superpowers/plans/2026-09-23-unconditional-detach-key.md +58 -0
  67. package/docs/superpowers/plans/2026-09-24-control-reconcile-flake.md +698 -0
  68. package/docs/superpowers/plans/2026-09-24-probe-attached-clients.md +605 -0
  69. package/docs/superpowers/plans/2026-09-29-issue-145-holding-semantic-state.md +1183 -0
  70. package/docs/superpowers/plans/2026-09-29-issue-145-user-verification.md +66 -0
  71. package/docs/superpowers/plans/2026-09-30-board-delete-key-x-y-confirm.md +649 -0
  72. package/docs/superpowers/plans/2026-09-30-issue-153-runner-stop-boot-window.md +618 -0
  73. package/docs/superpowers/plans/2026-09-30-issue-95-test-discipline.md +555 -0
  74. package/docs/superpowers/plans/2026-09-30-publish-dispatch-tag-check.md +259 -0
  75. package/docs/superpowers/plans/2026-10-06-attach-settle-scheme-delivery.md +751 -0
  76. package/docs/superpowers/plans/2026-10-09-issue-167-attach-middle-paste.md +509 -0
  77. package/docs/superpowers/plans/2026-10-09-issue-169-fullscreen-mouse-ownership.md +346 -0
  78. package/docs/superpowers/plans/2026-10-10-attach-delete-in-place.md +832 -0
  79. package/docs/superpowers/plans/2026-10-10-issue-174-selection-mirror-paste-source.md +510 -0
  80. package/docs/superpowers/plans/2026-10-14-issue-170-attach-reply-guard.md +771 -0
  81. package/docs/superpowers/plans/2026-10-14-issue-178-accept-registration-race.md +1257 -0
  82. package/docs/superpowers/plans/2026-10-14-issue-184-snapshot-window-contract.md +657 -0
  83. package/docs/superpowers/plans/2026-10-14-issue-185-attach-wheel-alt-screen.md +47 -0
  84. package/docs/superpowers/plans/2026-10-14-issue-187-motionless-drag.md +931 -0
  85. package/docs/superpowers/plans/2026-10-14-issue-189-mixed-input-segments.md +823 -0
  86. package/docs/superpowers/plans/2026-10-15-issue-188-x10-mouse-release.md +526 -0
  87. package/docs/superpowers/plans/2026-10-16-issue-198-attach-wheel-forward-fallback.md +32 -0
  88. package/docs/superpowers/plans/2026-10-18-attach-wheel-replay-pseudo-scrollback.md +437 -0
  89. package/docs/superpowers/plans/2026-10-19-issue-213-reply-guard-csi-key.md +257 -0
  90. package/docs/superpowers/plans/2026-10-19-issue-214-attach-forward-alt-modifier.md +202 -0
  91. package/docs/superpowers/plans/2026-10-21-issue-221-ask-user-question.md +198 -0
  92. package/docs/superpowers/plans/2026-10-23-issue-222-attach-ready.md +290 -0
  93. package/docs/superpowers/plans/2026-10-23-issue-225-monotonic-foreground-state.md +450 -0
  94. package/docs/superpowers/plans/2026-10-23-issue-229-vim-jkl.md +449 -0
  95. package/docs/superpowers/plans/2026-10-23-issue-232-attach-bg-only-cells.md +153 -0
  96. package/docs/superpowers/plans/2026-10-23-lease-heartbeat-staleness.md +537 -0
  97. package/docs/superpowers/plans/2026-10-23-selected-row-highlight.md +405 -0
  98. package/docs/superpowers/plans/2026-10-24-issue-217-windows-pid-reuse-stopping.md +367 -0
  99. package/docs/superpowers/plans/2026-10-24-issue-230-warm-host-background-runs.md +806 -0
  100. package/docs/superpowers/plans/2026-10-24-issue-238-windows-process-identity-token.md +490 -0
  101. package/docs/superpowers/plans/2026-10-24-issue-241-coordinator-root-exit.md +461 -0
  102. package/docs/superpowers/plans/2026-10-25-issue-239-coordinator-replacement-identity.md +504 -0
  103. package/docs/superpowers/plans/2026-10-26-issue-245-key-hints-doc-sync.md +244 -0
  104. package/docs/superpowers/plans/2026-10-27-issue-172-fullscreen-selection-clear.md +344 -0
  105. package/docs/superpowers/plans/2026-10-27-issue-252-select-key-hints.md +209 -0
  106. package/docs/superpowers/plans/2026-10-28-issue-255-coordinator-endpoint-zombie.md +442 -0
  107. package/docs/superpowers/plans/2026-10-28-issue-257-legacy-pty-runner-endpoint-cleanup.md +256 -0
  108. package/docs/superpowers/plans/2026-11-03-cwd-favorites-full-pool.md +266 -0
  109. package/docs/superpowers/specs/2026-08-15-screenlog-gc-design.md +105 -0
  110. package/docs/superpowers/specs/2026-08-16-attach-double-cursor-jiggle-retry-design.md +142 -0
  111. package/docs/superpowers/specs/2026-08-21-attach-coldstart-jiggle-rearm-design.md +110 -0
  112. package/docs/superpowers/specs/2026-08-21-dashboard-keypress-lag-design.md +59 -0
  113. package/docs/superpowers/specs/2026-08-21-issue-14-needs-input-no-auto-done-design.md +109 -0
  114. package/docs/superpowers/specs/2026-08-22-cwd-favorites-design.md +131 -0
  115. package/docs/superpowers/specs/2026-08-22-jiggle-shrink-and-hold-design.md +111 -0
  116. package/docs/superpowers/specs/2026-08-22-question-tool-grouping-design.md +114 -0
  117. package/docs/superpowers/specs/2026-08-22-rename-state-labels-design.md +80 -0
  118. package/docs/superpowers/specs/2026-08-27-locks-acquirelock-spin-design.md +97 -0
  119. package/docs/superpowers/specs/2026-08-27-pty-runner-test-flaky-design.md +35 -0
  120. package/docs/superpowers/specs/2026-08-29-code-refs-badges-design.md +128 -0
  121. package/docs/superpowers/specs/2026-08-30-circular-navigation-design.md +47 -0
  122. package/docs/superpowers/specs/2026-08-30-eprm-atomicwrite-race-design.md +77 -0
  123. package/docs/superpowers/specs/2026-08-30-post-exit-timing-fix-design.md +80 -0
  124. package/docs/superpowers/specs/2026-08-30-pty-attach-quality-debt-design.md +105 -0
  125. package/docs/superpowers/specs/2026-08-30-readme-v2-design.md +115 -0
  126. package/docs/superpowers/specs/2026-09-01-attach-detach-gate-cursor-anchor-design.md +78 -0
  127. package/docs/superpowers/specs/2026-09-02-attach-detach-editor-state-design.md +120 -0
  128. package/docs/superpowers/specs/2026-09-03-code-refs-pr-backlink-narrow-design.md +92 -0
  129. package/docs/superpowers/specs/2026-09-03-detach-gate-glyph-fallback-design.md +99 -0
  130. package/docs/superpowers/specs/2026-09-04-evidence-outputpreview-design.md +50 -0
  131. package/docs/superpowers/specs/2026-09-04-warm-host-reclaim-design.md +106 -0
  132. package/docs/superpowers/specs/2026-09-05-issue-13-drainnextfollowup-pty-probe-design.md +64 -0
  133. package/docs/superpowers/specs/2026-09-05-issue-38-windows-wezterm-ime-design.md +48 -0
  134. package/docs/superpowers/specs/2026-09-05-issue-39-truncate-codepoint-boundary-design.md +64 -0
  135. package/docs/superpowers/specs/2026-09-05-issue-61-mention-fallback-design.md +71 -0
  136. package/docs/superpowers/specs/2026-09-05-issue-63-flaky-manual-completion-design.md +49 -0
  137. package/docs/superpowers/specs/2026-09-05-issue-64-changelog-helper-design.md +76 -0
  138. package/docs/superpowers/specs/2026-09-05-pty-host-stacking-sock-race-design.md +510 -0
  139. package/docs/superpowers/specs/2026-09-07-issue-11-attach-runtime-desync-heal-design.md +130 -0
  140. package/docs/superpowers/specs/2026-09-08-attach-ctrl-left-detach-design.md +58 -0
  141. package/docs/superpowers/specs/2026-09-08-dashboard-shrink-repaint-design.md +52 -0
  142. package/docs/superpowers/specs/2026-09-08-legacy-stale-host-recovery-design.md +87 -0
  143. package/docs/superpowers/specs/2026-09-08-spawn-async-error-swallow-design.md +56 -0
  144. package/docs/superpowers/specs/2026-09-08-stale-model-attach-guard-design.md +79 -0
  145. package/docs/superpowers/specs/2026-09-09-claimpid-blocks-replace-design.md +147 -0
  146. package/docs/superpowers/specs/2026-09-09-harden-runner-architecture-design.md +304 -0
  147. package/docs/superpowers/specs/2026-09-14-attach-cursor-dectcem-gate-design.md +114 -0
  148. package/docs/superpowers/specs/2026-09-14-host-meta-orphan-lock-design.md +120 -0
  149. package/docs/superpowers/specs/2026-09-14-issue-106-terminal-frame-cognition-design.md +146 -0
  150. package/docs/superpowers/specs/2026-09-14-issue-113-foreground-preview-race-design.md +116 -0
  151. package/docs/superpowers/specs/2026-09-15-coordinator-pipe-root-normalize-design.md +84 -0
  152. package/docs/superpowers/specs/2026-09-15-lease-publish-eprem-reclaim-design.md +92 -0
  153. package/docs/superpowers/specs/2026-09-18-detach-anchor-reporter-endpoint-design.md +123 -0
  154. package/docs/superpowers/specs/2026-09-20-issue-121-perf-gate-out-of-coverage-design.md +204 -0
  155. package/docs/superpowers/specs/2026-09-23-a5-mid-stream-assertion-design.md +43 -0
  156. package/docs/superpowers/specs/2026-09-23-cwd-browse-tab-drill-design.md +95 -0
  157. package/docs/superpowers/specs/2026-09-23-terminal-query-forwarding-design.md +63 -0
  158. package/docs/superpowers/specs/2026-09-23-unconditional-detach-key-design.md +57 -0
  159. package/docs/superpowers/specs/2026-09-24-control-reconcile-flake-design.md +98 -0
  160. package/docs/superpowers/specs/2026-09-24-probe-attached-clients-design.md +190 -0
  161. package/docs/superpowers/specs/2026-09-29-issue-145-holding-semantic-state-design.md +394 -0
  162. package/docs/superpowers/specs/2026-09-30-board-delete-key-x-y-confirm-design.md +86 -0
  163. package/docs/superpowers/specs/2026-09-30-issue-153-runner-stop-boot-window-design.md +75 -0
  164. package/docs/superpowers/specs/2026-09-30-issue-95-test-discipline-design.md +226 -0
  165. package/docs/superpowers/specs/2026-09-30-publish-dispatch-tag-check-design.md +129 -0
  166. package/docs/superpowers/specs/2026-10-06-attach-settle-scheme-delivery-design.md +196 -0
  167. package/docs/superpowers/specs/2026-10-09-issue-167-attach-middle-paste-design.md +125 -0
  168. package/docs/superpowers/specs/2026-10-09-issue-169-fullscreen-mouse-ownership-design.md +130 -0
  169. package/docs/superpowers/specs/2026-10-10-attach-delete-in-place-design.md +224 -0
  170. package/docs/superpowers/specs/2026-10-10-issue-174-selection-mirror-paste-source-design.md +154 -0
  171. package/docs/superpowers/specs/2026-10-14-issue-170-attach-reply-guard-design.md +195 -0
  172. package/docs/superpowers/specs/2026-10-14-issue-178-accept-registration-race-design.md +287 -0
  173. package/docs/superpowers/specs/2026-10-14-issue-184-snapshot-window-contract-design.md +288 -0
  174. package/docs/superpowers/specs/2026-10-14-issue-185-attach-wheel-alt-screen-design.md +126 -0
  175. package/docs/superpowers/specs/2026-10-14-issue-187-motionless-drag-design.md +269 -0
  176. package/docs/superpowers/specs/2026-10-14-issue-189-mixed-input-segments-design.md +369 -0
  177. package/docs/superpowers/specs/2026-10-15-issue-188-x10-mouse-release-design.md +252 -0
  178. package/docs/superpowers/specs/2026-10-16-issue-198-attach-wheel-forward-fallback-design.md +67 -0
  179. package/docs/superpowers/specs/2026-10-18-attach-wheel-replay-pseudo-scrollback-design.md +250 -0
  180. package/docs/superpowers/specs/2026-10-19-issue-213-reply-guard-csi-key-design.md +165 -0
  181. package/docs/superpowers/specs/2026-10-19-issue-214-attach-forward-alt-modifier-design.md +131 -0
  182. package/docs/superpowers/specs/2026-10-20-issue-221-ask-user-question-design.md +270 -0
  183. package/docs/superpowers/specs/2026-10-22-issue-225-monotonic-foreground-state-design.md +225 -0
  184. package/docs/superpowers/specs/2026-10-23-issue-222-attach-ready-design.md +204 -0
  185. package/docs/superpowers/specs/2026-10-23-issue-229-vim-jkl-design.md +90 -0
  186. package/docs/superpowers/specs/2026-10-23-issue-232-attach-bg-only-cells-design.md +146 -0
  187. package/docs/superpowers/specs/2026-10-23-lease-heartbeat-staleness-design.md +271 -0
  188. package/docs/superpowers/specs/2026-10-23-selected-row-highlight-design.md +191 -0
  189. package/docs/superpowers/specs/2026-10-24-issue-217-windows-pid-reuse-stopping-design.md +334 -0
  190. package/docs/superpowers/specs/2026-10-24-issue-230-warm-host-background-runs-design.md +283 -0
  191. package/docs/superpowers/specs/2026-10-24-issue-238-windows-process-identity-token-design.md +286 -0
  192. package/docs/superpowers/specs/2026-10-24-issue-241-coordinator-root-exit-design.md +381 -0
  193. package/docs/superpowers/specs/2026-10-25-issue-239-coordinator-replacement-identity-design.md +331 -0
  194. package/docs/superpowers/specs/2026-10-26-issue-245-key-hints-doc-sync-design.md +72 -0
  195. package/docs/superpowers/specs/2026-10-27-issue-172-fullscreen-selection-clear-design.md +248 -0
  196. package/docs/superpowers/specs/2026-10-27-issue-252-select-key-hints-design.md +95 -0
  197. package/docs/superpowers/specs/2026-10-28-issue-255-coordinator-endpoint-zombie-design.md +380 -0
  198. package/docs/superpowers/specs/2026-10-28-issue-257-legacy-pty-runner-endpoint-cleanup-design.md +197 -0
  199. package/docs/superpowers/specs/2026-11-03-cwd-favorites-full-pool-design.md +106 -0
  200. package/index.ts +6 -0
  201. package/package.json +84 -4
  202. package/runner/job-runner-legacy.mjs +68 -0
  203. package/runner/job-runner.mjs +834 -0
  204. package/runner/pty-runner-legacy.mjs +50 -0
  205. package/runner/pty-runner.mjs +2156 -0
  206. package/runner/state-coordinator.mjs +673 -0
  207. package/runner/state-runner.mjs +203 -0
  208. package/runner/title-runner.mjs +80 -0
  209. package/scripts/budget-audit.mjs +135 -0
  210. package/scripts/patch-vulns.mjs +59 -0
  211. package/scripts/release.mjs +446 -0
  212. package/scripts/release_helper.mjs +309 -0
  213. package/scripts/run-perf-gate.mjs +40 -0
  214. package/scripts/run-tests.mjs +375 -0
  215. package/src/commands/agent-board.ts +363 -0
  216. package/src/commands/attach-decision.mjs +66 -0
  217. package/src/commands/attach-flow.ts +247 -0
  218. package/src/commands/bg.ts +80 -0
  219. package/src/core/atomic.mjs +184 -0
  220. package/src/core/attach-delete.mjs +24 -0
  221. package/src/core/attach-frame-proof.mjs +862 -0
  222. package/src/core/attach-frame-reporter.mjs +648 -0
  223. package/src/core/attach-frame-stream.mjs +266 -0
  224. package/src/core/attach-view-proof.mjs +709 -0
  225. package/src/core/auto-state.mjs +377 -0
  226. package/src/core/background-runs.mjs +273 -0
  227. package/src/core/code-refs-store.mjs +315 -0
  228. package/src/core/code-refs.mjs +913 -0
  229. package/src/core/control-protocol.mjs +482 -0
  230. package/src/core/coordinator-client.mjs +633 -0
  231. package/src/core/coordinator-journal.mjs +282 -0
  232. package/src/core/coordinator-protocol.mjs +14 -0
  233. package/src/core/cwd-stats.mjs +114 -0
  234. package/src/core/dashboard-render.mjs +10 -0
  235. package/src/core/derive.mjs +117 -0
  236. package/src/core/diagnostics.mjs +133 -0
  237. package/src/core/double-press.mjs +22 -0
  238. package/src/core/editor-state-reporter.mjs +112 -0
  239. package/src/core/events.mjs +286 -0
  240. package/src/core/evidence.mjs +245 -0
  241. package/src/core/follow-up-queue.mjs +211 -0
  242. package/src/core/foreground-preview-cache.mjs +117 -0
  243. package/src/core/foreground-projection-cache.mjs +99 -0
  244. package/src/core/frame-witness-update.mjs +35 -0
  245. package/src/core/heuristics.mjs +313 -0
  246. package/src/core/host-coordination.mjs +300 -0
  247. package/src/core/host-crash.mjs +79 -0
  248. package/src/core/host-probe.mjs +207 -0
  249. package/src/core/host-protocol.mjs +73 -0
  250. package/src/core/ids.mjs +35 -0
  251. package/src/core/ime-cursor-coalesce.mjs +193 -0
  252. package/src/core/invocation.mjs +43 -0
  253. package/src/core/launch-options.mjs +418 -0
  254. package/src/core/launch.mjs +157 -0
  255. package/src/core/locks.mjs +530 -0
  256. package/src/core/paths.mjs +183 -0
  257. package/src/core/pid.mjs +75 -0
  258. package/src/core/prewarm-schedule.mjs +41 -0
  259. package/src/core/process-identity-probe.mjs +228 -0
  260. package/src/core/prompt-transport.mjs +13 -0
  261. package/src/core/pty-attach-jiggle-controller.mjs +356 -0
  262. package/src/core/pty-attach-jiggle-retry.mjs +109 -0
  263. package/src/core/pty-attach-reconnect.mjs +61 -0
  264. package/src/core/pty-attach-render.mjs +229 -0
  265. package/src/core/pty-links.mjs +71 -0
  266. package/src/core/pty-scroll.mjs +522 -0
  267. package/src/core/pty-support.mjs +327 -0
  268. package/src/core/repo.mjs +103 -0
  269. package/src/core/rows.mjs +378 -0
  270. package/src/core/screen-log-gc.mjs +198 -0
  271. package/src/core/screen-log.mjs +160 -0
  272. package/src/core/session-view.mjs +174 -0
  273. package/src/core/state-commands.mjs +757 -0
  274. package/src/core/status-consistency.mjs +98 -0
  275. package/src/core/steering-prompts.mjs +34 -0
  276. package/src/core/steering.mjs +133 -0
  277. package/src/core/stop-latch.mjs +41 -0
  278. package/src/core/store.mjs +523 -0
  279. package/src/core/terminal-attach-client.mjs +981 -0
  280. package/src/core/terminal-attach-protocol.mjs +460 -0
  281. package/src/core/terminal-model.mjs +222 -0
  282. package/src/core/terminal-query-sequences.mjs +239 -0
  283. package/src/core/terminal-reply-guard.mjs +222 -0
  284. package/src/core/terminal-snapshot.mjs +440 -0
  285. package/src/core/test-knobs.mjs +28 -0
  286. package/src/core/title.mjs +43 -0
  287. package/src/core/types.mjs +414 -0
  288. package/src/core/warm-host-sweeper.mjs +168 -0
  289. package/src/core/worktree.mjs +65 -0
  290. package/src/index.ts +274 -0
  291. package/src/runtime/service.mjs +3183 -0
  292. package/src/ui/chrome.ts +20 -0
  293. package/src/ui/dashboard-decisions.mjs +55 -0
  294. package/src/ui/dashboard-evidence.mjs +85 -0
  295. package/src/ui/dashboard.ts +2141 -0
  296. package/src/ui/double-left.ts +36 -0
  297. package/src/ui/pty-attach.ts +3091 -0
@@ -0,0 +1,148 @@
1
+ # Release process
2
+
3
+ Releases are driven by `scripts/release.mjs` and published by CI when a GitHub
4
+ Release is created. Four commands and one merge:
5
+
6
+ ```
7
+ precheck → prepare <bump> → open-pr <version> → merge (merge commit!)
8
+ → finish <version> → .github/workflows/publish.yml publishes to npm
9
+ ```
10
+
11
+ `main` is protected, so a release lands as a pull request — but the npm publish
12
+ is not tied to that PR: it is tied to the GitHub Release, which is created only
13
+ after the PR is merged and the tag is confirmed to be on `main`.
14
+
15
+ ## One-time setup: the npm trusted publisher
16
+
17
+ `publish.yml` publishes with **trusted publishing** (OIDC), so no `NPM_TOKEN`
18
+ secret is stored in the repository. npm has to be told which workflow may
19
+ publish the package — this is a one-time, per-package web step:
20
+
21
+ 1. Open <https://www.npmjs.com/package/@zhuxixi/pi-agent-board> and sign in as
22
+ the package owner.
23
+ 2. Go to **Settings** → **Trusted Publisher** → **GitHub Actions**.
24
+ 3. Fill in: organization `zhuxixi`, repository `pi-agent-board`, workflow
25
+ filename `publish.yml`, environment left empty.
26
+ 4. Save.
27
+
28
+ Until this is configured, the CI publish step fails with an authentication
29
+ error. Publishing locally (the pre-2026-09 flow, see "Local publish fallback"
30
+ below) still works, because the npm account keeps its normal credentials.
31
+
32
+ ## Commands
33
+
34
+ ### `node scripts/release.mjs precheck`
35
+
36
+ Read-only gate. Run it before anything else; it fails closed when the tree is
37
+ dirty, `main` is not in sync with `origin/main`, a `release/*` PR is still open,
38
+ the last tag is not an ancestor of `origin/main` (an orphan tag from a past
39
+ squash merge), or there is nothing functional to release.
40
+
41
+ ### `node scripts/release.mjs prepare <patch|minor|major|X.Y.Z> [--dry-run]`
42
+
43
+ Runs the gate, then:
44
+
45
+ 1. renders the new CHANGELOG section from the conventional commits since the
46
+ last `v*` tag,
47
+ 2. commits it as `docs(changelog): add <version> section`,
48
+ 3. runs `npm version <bump>` — one commit plus the annotated `v<version>` tag,
49
+ 4. switches to `release/v<version>`.
50
+
51
+ Nothing leaves the machine. `--dry-run` prints the section and the plan without
52
+ writing anything; review the preview before running it for real. Pick the bump
53
+ the same way as before: features are a `minor`, fixes alone are a `patch`.
54
+
55
+ ### `node scripts/release.mjs open-pr <version> [--dry-run]`
56
+
57
+ Pushes the release branch and the tag, then opens the PR with the CHANGELOG
58
+ section as its body. The tag is pushed separately because tags are not covered
59
+ by the branch protection rule.
60
+
61
+ ### Merge the PR with a merge commit
62
+
63
+ **Do not squash the release PR.** `npm version` created the tag on a commit that
64
+ only exists on the release branch; a merge commit brings that commit into
65
+ `main`, a squash does not, and the tag becomes unreachable from `main`
66
+ (`git describe` then misreads the changelog range of the next release). Use the
67
+ **Merge pull request** button, or `gh pr merge --merge`.
68
+
69
+ ### `node scripts/release.mjs finish <version> [--dry-run] [--sync-main]`
70
+
71
+ Run it after the merge. It fetches, verifies that `v<version>` is an ancestor of
72
+ `origin/main`, re-checks the CHANGELOG against any functional PR merged after the
73
+ bump, and then creates the GitHub Release with the CHANGELOG section as its
74
+ notes. That release is the publish trigger. `--sync-main` also resets a clean
75
+ local `main` to `origin/main`, dropping the local copy of the two release
76
+ commits (they are content-equal to what the merge brought in).
77
+
78
+ To publish without the orchestration, the underlying commands are
79
+ `gh release create v<version> --title v<version> --notes-file <notes>` where the
80
+ notes are `node scripts/release.mjs notes <version>`.
81
+
82
+ ## What CI does
83
+
84
+ `.github/workflows/publish.yml` runs on `release: published`, checks out the
85
+ tag, and:
86
+
87
+ 1. asserts npm is at least 11.5.1 (trusted publishing needs it; Node 24 ships
88
+ a newer one),
89
+ 2. asserts the tag equals `package.json`'s version,
90
+ 3. runs `npm run typecheck` and `npm test`,
91
+ 4. skips the publish when that version is already on npm, and otherwise
92
+ 5. runs `npm publish --provenance --access public`.
93
+
94
+ Provenance means npm records which repository, workflow, and commit built the
95
+ tarball, and shows it on the package page.
96
+
97
+ ## Recovering from a broken release
98
+
99
+ **Orphan tag** (`finish` refuses with "not an ancestor of origin/main"). The
100
+ release PR was squash-merged. Re-point the tag at the content-equivalent commit
101
+ on `main`, then retry:
102
+
103
+ ```bash
104
+ git fetch origin
105
+ git tag -f v0.9.0 <sha on origin/main with the same content>
106
+ git push origin v0.9.0 --force
107
+ node scripts/release.mjs finish 0.9.0 --sync-main
108
+ ```
109
+
110
+ **CHANGELOG drift** (`finish` refuses with missing PR numbers, or
111
+ `node scripts/release_helper.mjs verify` exits 1). A functional PR merged after
112
+ the changelog section was generated. Add the missing entries to the top section
113
+ in a `docs(changelog)` PR, merge it, then retry — the release notes are read
114
+ again at that point, so the fix is picked up.
115
+
116
+ **The publish failed** (npm outage, trusted publisher not configured yet).
117
+ Re-run the same tag without recreating the release: Actions → **Publish to
118
+ npm** → **Run workflow** → enter the tag.
119
+
120
+ **`npm view <package>` returns 404 right after a successful publish.** That is
121
+ the registry's view index lagging, not a failed publish. Compare endpoints: the
122
+ tarball, `/<package>/latest`, and `/-/package/<package>/dist-tags` answer
123
+ immediately while the root document 404s for a few minutes. Wait; re-publishing
124
+ the same version is rejected with a 403 and is never the fix.
125
+
126
+ **Local publish fallback.** When the trusted publisher is not configured and a
127
+ release cannot wait:
128
+
129
+ ```bash
130
+ npm run verify
131
+ npm publish --registry=https://registry.npmjs.org --access public
132
+ ```
133
+
134
+ The registry must be passed explicitly: this machine defaults to
135
+ `registry.npmmirror.com`. This path skips provenance and the CI checks, so
136
+ prefer fixing the CI path.
137
+
138
+ ## CHANGELOG conventions
139
+
140
+ `scripts/release_helper.mjs` renders the section from conventional commits in
141
+ the range `<last v* tag>..HEAD`. `feat`/`fix`/`perf` become Features / Fixes /
142
+ Performance, everything else (including `test` and `docs`) lands under Changes,
143
+ merges and `npm version` squash subjects are skipped, and `docs(changelog):`
144
+ subjects are ignored so changelog fixes do not feed back into the verify check.
145
+
146
+ Every entry carries the PR number parsed from the trailing `(#N)`. `verify`
147
+ fails when a functional commit's PR is missing from the top section — that is
148
+ what keeps a late merge from shipping without release notes.