rvlib-shipkit 2.31.0 → 2.33.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 (408) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/package.json +1 -1
  3. package/src/advisors/acts.ts +16 -15
  4. package/src/advisors/advice.ts +56 -102
  5. package/src/advisors/advisor-view.ts +122 -76
  6. package/src/advisors/app-graph.ts +1 -1
  7. package/src/advisors/app.ts +3 -11
  8. package/src/advisors/cf-api.ts +1 -1
  9. package/src/advisors/dir-bucket.ts +4 -3
  10. package/src/advisors/edge/api.ts +20 -221
  11. package/src/advisors/edge/bucket.ts +2 -2
  12. package/src/advisors/edge/handler.ts +13 -155
  13. package/src/advisors/edge/here.ts +5 -5
  14. package/src/advisors/edge/pages.ts +12 -9
  15. package/src/advisors/edge/shell.ts +6 -5
  16. package/src/advisors/edge/sign-in.ts +101 -36
  17. package/src/advisors/edge/status.ts +19 -6
  18. package/src/advisors/edge/types.ts +36 -60
  19. package/src/advisors/expose.ts +29 -29
  20. package/src/advisors/here.ts +12 -12
  21. package/src/advisors/invite-send.ts +79 -35
  22. package/src/advisors/invite.ts +31 -8
  23. package/src/advisors/job.ts +24 -16
  24. package/src/advisors/login.ts +40 -15
  25. package/src/advisors/owner-store.ts +46 -22
  26. package/src/advisors/photos.ts +3 -3
  27. package/src/advisors/project.ts +27 -25
  28. package/src/advisors/reach.ts +89 -0
  29. package/src/advisors/rights.ts +1 -1
  30. package/src/advisors/routes.ts +55 -74
  31. package/src/advisors/scan.ts +0 -4
  32. package/src/advisors/setup-run.ts +14 -14
  33. package/src/advisors/share-trace.ts +3 -3
  34. package/src/advisors/{door-probe.ts → sign-in-probe.ts} +7 -6
  35. package/src/advisors/speaks.ts +29 -0
  36. package/src/advisors/sync.ts +97 -183
  37. package/src/advisors/tunnel.ts +6 -5
  38. package/src/advisors/users-listen.ts +92 -0
  39. package/src/advisors/users-router.ts +261 -87
  40. package/src/advisors/users-store.ts +81 -0
  41. package/src/agent-time/blocked-scan.ts +181 -0
  42. package/src/agent-time/registry.ts +12 -5
  43. package/src/agent-time/store.ts +9 -109
  44. package/src/asks/ask-bar-fold.ts +2 -1
  45. package/src/asks/ask-close.ts +2 -1
  46. package/src/asks/ask-doc.ts +2 -1
  47. package/src/asks/ask-migrate.ts +3 -2
  48. package/src/asks/ask-steps-fold.ts +2 -1
  49. package/src/asks/ask-store.ts +4 -3
  50. package/src/check.ts +3 -43
  51. package/src/checks/SK001-package-json-shape.check.ts +4 -55
  52. package/src/checks/SK004-gitignore-policy.check.ts +24 -69
  53. package/src/checks/SK013-one-way-in-policy.check.ts +3 -7
  54. package/src/checks/SK017-vscode-hub-task.check.ts +4 -4
  55. package/src/checks/SK019-tests-run-in-units.check.ts +3 -14
  56. package/src/checks/SK020-self-spawning-check.check.ts +5 -7
  57. package/src/checks/SK035-public-clean.check.ts +1 -1
  58. package/src/checks/SK039-vscode-watch-generated.check.ts +1 -1
  59. package/src/checks/SK042-post-kinds.check.ts +5 -14
  60. package/src/checks/SK054-agent-allow-list.check.ts +5 -74
  61. package/src/checks/SK055-retired-config-keys.check.ts +45 -0
  62. package/src/cli/cmd_Advisors.ts +11 -45
  63. package/src/cli/cmd_Asks.ts +3 -10
  64. package/src/cli/cmd_Backup.ts +25 -127
  65. package/src/cli/cmd_BackupTargets.ts +1 -1
  66. package/src/cli/cmd_Capacity.ts +6 -2
  67. package/src/cli/cmd_Checks.ts +0 -14
  68. package/src/cli/cmd_Ci.ts +2 -1
  69. package/src/cli/cmd_Db.ts +3 -82
  70. package/src/cli/cmd_Home.ts +4 -32
  71. package/src/cli/cmd_Hq.ts +0 -17
  72. package/src/cli/cmd_Releases.ts +57 -4
  73. package/src/cli/cmd_Review.ts +333 -354
  74. package/src/cli/cmd_Shot.ts +26 -4
  75. package/src/cli/cmd_SocialDrafts.ts +6 -13
  76. package/src/cli/cmd_ThreadSyncNeeds.ts +6 -2
  77. package/src/cli/cmd_Time.ts +1 -1
  78. package/src/cli/cmd_Trailer.ts +1 -1
  79. package/src/cli/inbox-hook-run.ts +5 -23
  80. package/src/cli/registry-heads.ts +5 -55
  81. package/src/cli/registry.ts +1 -5
  82. package/src/cli/review-here.ts +1 -1
  83. package/src/cli.ts +15 -4
  84. package/src/collections/collection-types.ts +1 -1
  85. package/src/collections/review.ts +5 -4
  86. package/src/core/admission.ts +268 -0
  87. package/src/core/agent-allow-policy.ts +32 -2
  88. package/src/core/agent-env.ts +8 -0
  89. package/src/core/allow-rows.ts +74 -0
  90. package/src/core/check-file-names.ts +19 -106
  91. package/src/core/code-lines.ts +36 -21
  92. package/src/core/footprint.ts +17 -13
  93. package/src/core/identities-root.ts +1 -4
  94. package/src/core/layout.ts +1 -2
  95. package/src/core/machine-db.ts +33 -208
  96. package/src/core/machine-layout.ts +14 -127
  97. package/src/core/machine-read.ts +5 -2
  98. package/src/core/mask-source.ts +60 -0
  99. package/src/core/memory-watch.ts +17 -14
  100. package/src/core/motherhome.ts +8 -35
  101. package/src/core/one-way-in-policy.ts +0 -3
  102. package/src/core/peer-sk.ts +8 -0
  103. package/src/core/repo-walk.ts +0 -9
  104. package/src/core/retention.ts +1 -9
  105. package/src/core/retired-checks.ts +2 -0
  106. package/src/core/tmux-policy.ts +1 -1
  107. package/src/core/tree-watch.ts +2 -2
  108. package/src/core/when.ts +7 -45
  109. package/src/gate/admit-heavy.ts +150 -0
  110. package/src/gate/check-runner.ts +6 -0
  111. package/src/gate/discover-checks.ts +42 -32
  112. package/src/gate/gate-checks.ts +21 -131
  113. package/src/gate/head-gate.ts +1 -1
  114. package/src/gate/job-run.ts +2 -1
  115. package/src/gate/pre-commit-discovery.ts +22 -28
  116. package/src/gate/run-check.ts +3 -4
  117. package/src/gate/run-ci.ts +4 -0
  118. package/src/gate/run-fix.ts +5 -17
  119. package/src/gate/run-fixers.ts +6 -42
  120. package/src/home/app-sign.ts +2 -2
  121. package/src/home/backup-status.ts +52 -92
  122. package/src/home/backup-verdict.ts +2 -2
  123. package/src/home/daemon-jobs.ts +51 -95
  124. package/src/home/database-words.ts +1 -2
  125. package/src/home/databases.ts +9 -25
  126. package/src/home/home-launchd.ts +0 -6
  127. package/src/home/home-paths.ts +8 -4
  128. package/src/home/home-routes.ts +3 -10
  129. package/src/home/home-state.ts +2 -14
  130. package/src/home/inbox-shape.ts +14 -15
  131. package/src/home/inbox.ts +1 -1
  132. package/src/home/machine-repair.ts +102 -103
  133. package/src/home/resume.ts +1 -15
  134. package/src/home/run-daemon.ts +7 -12
  135. package/src/home/space-page.ts +3 -2
  136. package/src/home/supervise.ts +3 -7
  137. package/src/hooks/commit-msg-run.ts +61 -0
  138. package/src/hooks/commit-run.ts +16 -166
  139. package/src/hooks/gate-outcome.ts +108 -0
  140. package/src/hooks/git-hook.ts +9 -9
  141. package/src/hooks/hook-config.ts +8 -8
  142. package/src/hooks/leak-guard.ts +1 -1
  143. package/src/hooks/pre-commit-checks.ts +1 -1
  144. package/src/hooks/run-hooks.ts +2 -6
  145. package/src/hooks/shared-file.ts +3 -2
  146. package/src/hq/daemon-db.ts +8 -8
  147. package/src/hq/door.ts +3 -16
  148. package/src/hq/hq-db.ts +4 -3
  149. package/src/hq/hq-local.ts +1 -2
  150. package/src/hq/hq-store.ts +0 -15
  151. package/src/hq/item-direct.ts +8 -10
  152. package/src/hq/item-fill.ts +37 -0
  153. package/src/hq/kinds/item-gone.ts +7 -10
  154. package/src/hq/kinds/item-msg.ts +12 -18
  155. package/src/hq/kinds/item.ts +13 -19
  156. package/src/hq/kinds/report.ts +3 -4
  157. package/src/hq/owner-switch.ts +3 -3
  158. package/src/hq/report.ts +5 -9
  159. package/src/hq/switch.ts +2 -11
  160. package/src/hq/thread-sync.ts +5 -17
  161. package/src/hq/{shapes-words.ts → threads-words.ts} +2 -12
  162. package/src/http/owner-word.ts +1 -1
  163. package/src/identities/machine.ts +16 -0
  164. package/src/init-repo.ts +0 -1
  165. package/src/ledger/check-stats.ts +6 -5
  166. package/src/ledger/db.ts +2 -4
  167. package/src/ledger/record-kept.ts +117 -48
  168. package/src/ledger/run-log.ts +21 -2
  169. package/src/ledger/slow-tests.ts +96 -0
  170. package/src/ledger/store.ts +3 -86
  171. package/src/ledger/suite-log.ts +8 -2
  172. package/src/media-store/backup/facts.ts +3 -37
  173. package/src/media-store/backup/keys.ts +1 -8
  174. package/src/media-store/backup/manifest.ts +6 -67
  175. package/src/media-store/backup/restore.ts +4 -13
  176. package/src/media-store/backup/retention.ts +13 -1
  177. package/src/media-store/backup/run.ts +6 -267
  178. package/src/media-store/backup/snapshot.ts +2 -38
  179. package/src/media-store/backup/sources.ts +3 -113
  180. package/src/media-store/backup/target-send.ts +5 -29
  181. package/src/media-store/db.ts +8 -7
  182. package/src/media-store/forget-one.ts +1 -1
  183. package/src/media-store/forget.ts +1 -80
  184. package/src/orchestrator/guards.ts +0 -1
  185. package/src/orchestrator/presence.ts +2 -2
  186. package/src/orchestrator/routes.ts +1 -1
  187. package/src/orchestrator/started.ts +0 -9
  188. package/src/orchestrator/talk-key.ts +3 -4
  189. package/src/orchestrator/unheard.ts +1 -1
  190. package/src/plan/planner.ts +3 -2
  191. package/src/recordings/edit.ts +3 -3
  192. package/src/recordings/marks-draw.ts +17 -6
  193. package/src/recordings/marks.ts +120 -9
  194. package/src/reflections/reflections-queue.ts +3 -10
  195. package/src/release/notes.ts +1 -1
  196. package/src/release/public-clean.ts +66 -6
  197. package/src/release/run-bump.ts +11 -0
  198. package/src/release/run-release.ts +4 -0
  199. package/src/releases/from-thread.ts +3 -3
  200. package/src/releases/model.ts +186 -36
  201. package/src/releases/store.ts +13 -3
  202. package/src/releases/validate.ts +83 -0
  203. package/src/repo-config.ts +36 -64
  204. package/src/review/answer-kinds.ts +63 -4
  205. package/src/review/blocked-guard.ts +11 -0
  206. package/src/review/blocked-object.ts +298 -0
  207. package/src/review/cells.ts +144 -230
  208. package/src/review/close.ts +39 -1
  209. package/src/review/doc-save.ts +3 -2
  210. package/src/review/draft-item.ts +1 -1
  211. package/src/review/events.ts +3 -7
  212. package/src/review/expect.ts +23 -39
  213. package/src/review/format.ts +79 -46
  214. package/src/review/glyphs.ts +1 -0
  215. package/src/review/hand-over.ts +3 -3
  216. package/src/review/heard.ts +1 -1
  217. package/src/review/holds-sync.ts +2 -1
  218. package/src/review/inbox-hook.ts +2 -2
  219. package/src/review/inbox-read.ts +39 -33
  220. package/src/review/instruction-guards.ts +12 -0
  221. package/src/review/instructions.ts +0 -1
  222. package/src/review/item-db.ts +13 -43
  223. package/src/review/item-hq.ts +2 -2
  224. package/src/review/item-rows.ts +3 -14
  225. package/src/review/kind-catalog.ts +3 -1
  226. package/src/review/kinds.ts +18 -8
  227. package/src/review/live-view.ts +3 -0
  228. package/src/review/media-kind.ts +1 -1
  229. package/src/review/mentions.ts +1 -2
  230. package/src/review/model.ts +158 -114
  231. package/src/review/move.ts +149 -0
  232. package/src/review/need-threads.ts +3 -2
  233. package/src/review/object-card.ts +11 -0
  234. package/src/review/object-read.ts +6 -1
  235. package/src/review/one-block.ts +1 -1
  236. package/src/review/owner-read.ts +1 -1
  237. package/src/review/phone-push.ts +10 -9
  238. package/src/review/previews.ts +32 -4
  239. package/src/review/push.ts +2 -2
  240. package/src/review/recap.ts +129 -0
  241. package/src/review/referring.ts +6 -3
  242. package/src/review/reflection-object.ts +4 -3
  243. package/src/review/routes.ts +51 -47
  244. package/src/review/secret-route.ts +3 -2
  245. package/src/review/settle.ts +0 -6
  246. package/src/review/snooze.ts +5 -3
  247. package/src/review/speaker.ts +68 -0
  248. package/src/review/start-title.ts +19 -0
  249. package/src/review/store-parties.ts +28 -0
  250. package/src/review/store.ts +94 -59
  251. package/src/review/{wakes.ts → thread-events.ts} +92 -7
  252. package/src/review/thread-md.ts +35 -14
  253. package/src/review/thread-state.ts +804 -0
  254. package/src/review/threads.ts +29 -347
  255. package/src/review/traces.ts +104 -7
  256. package/src/review/trailer-item.ts +1 -1
  257. package/src/review/unit.ts +7 -9
  258. package/src/review/verdict-items.ts +12 -10
  259. package/src/review/view-layout.ts +25 -1
  260. package/src/review/watch-feed.ts +1 -2
  261. package/src/review/working-guards.ts +2 -3
  262. package/src/rules/untrack-generated.ts +1 -15
  263. package/src/secrets/copy.ts +4 -4
  264. package/src/secrets/lapse.ts +2 -1
  265. package/src/serve/hub-app/advisor-app.tsx +4 -4
  266. package/src/serve/hub-app/advisor-face.tsx +9 -3
  267. package/src/serve/hub-app/advisor-host.ts +27 -27
  268. package/src/serve/hub-app/advisors-model.ts +17 -8
  269. package/src/serve/hub-app/advisors-rights.tsx +1 -1
  270. package/src/serve/hub-app/advisors-st.ts +15 -14
  271. package/src/serve/hub-app/advisors-view.tsx +13 -11
  272. package/src/serve/hub-app/app-bridge.ts +23 -3
  273. package/src/serve/hub-app/asks-page.tsx +1 -1
  274. package/src/serve/hub-app/auto-text.tsx +71 -16
  275. package/src/serve/hub-app/check-view.tsx +0 -8
  276. package/src/serve/hub-app/controls.css +14 -3
  277. package/src/serve/hub-app/database-view.tsx +1 -2
  278. package/src/serve/hub-app/dock-st.ts +1 -1
  279. package/src/serve/hub-app/git-view.tsx +3 -1
  280. package/src/serve/hub-app/hub.css +12 -5
  281. package/src/serve/hub-app/icons.tsx +1 -1
  282. package/src/serve/hub-app/inbox-view.tsx +1 -2
  283. package/src/serve/hub-app/live-sources.ts +2 -2
  284. package/src/serve/hub-app/main-panel.tsx +2 -1
  285. package/src/serve/hub-app/panel-repo.ts +0 -9
  286. package/src/serve/hub-app/pic.tsx +29 -12
  287. package/src/serve/hub-app/polled.ts +16 -2
  288. package/src/serve/hub-app/recordings-st.ts +23 -2
  289. package/src/serve/hub-app/recordings-view.tsx +68 -10
  290. package/src/serve/hub-app/ref-pill.ts +1 -1
  291. package/src/serve/hub-app/repo-st.ts +1 -2
  292. package/src/serve/hub-app/review/advisor-add.tsx +1 -1
  293. package/src/serve/hub-app/review/advisor-invite.tsx +1 -1
  294. package/src/serve/hub-app/review/draft-body.tsx +2 -2
  295. package/src/serve/hub-app/review/heard-line.tsx +1 -1
  296. package/src/serve/hub-app/review/instructions-view.tsx +1 -8
  297. package/src/serve/hub-app/review/kind-states.tsx +14 -9
  298. package/src/serve/hub-app/review/kit.tsx +4 -11
  299. package/src/serve/hub-app/review/lane-bar.tsx +3 -3
  300. package/src/serve/hub-app/review/lightbox.tsx +15 -11
  301. package/src/serve/hub-app/review/line-window.ts +4 -1
  302. package/src/serve/hub-app/review/live-bar-st.ts +2 -2
  303. package/src/serve/hub-app/review/live-view.tsx +57 -1
  304. package/src/serve/hub-app/review/object-panel.tsx +20 -8
  305. package/src/serve/hub-app/review/question-views.tsx +191 -53
  306. package/src/serve/hub-app/review/recap-bar.tsx +40 -0
  307. package/src/serve/hub-app/review/request-cell.tsx +48 -0
  308. package/src/serve/hub-app/review/review-cells.tsx +154 -96
  309. package/src/serve/hub-app/review/review-host.ts +8 -4
  310. package/src/serve/hub-app/review/review-kit.ts +17 -11
  311. package/src/serve/hub-app/review/review-list.tsx +30 -35
  312. package/src/serve/hub-app/review/review-st.ts +32 -42
  313. package/src/serve/hub-app/review/review-thread.tsx +139 -85
  314. package/src/serve/hub-app/review/review-views.tsx +127 -68
  315. package/src/serve/hub-app/review/share-lines.tsx +4 -4
  316. package/src/serve/hub-app/review/start-st.ts +2 -5
  317. package/src/serve/hub-app/review/superseded-runs.ts +4 -3
  318. package/src/serve/hub-app/review/thread-close.tsx +10 -7
  319. package/src/serve/hub-app/review/thread-st.ts +381 -202
  320. package/src/serve/hub-app/review/tone-bar.tsx +129 -0
  321. package/src/serve/hub-app/review/tones.ts +53 -0
  322. package/src/serve/hub-app/review/trailer-body.tsx +2 -2
  323. package/src/serve/hub-app/review/trailer-st.ts +3 -2
  324. package/src/serve/hub-app/review/trailer-voices-st.ts +3 -2
  325. package/src/serve/hub-app/review.css +189 -106
  326. package/src/serve/hub-app/search-view.tsx +1 -1
  327. package/src/serve/hub-app/social/social-model.ts +0 -4
  328. package/src/serve/hub-app/source-acts.ts +2 -1
  329. package/src/serve/hub-app/stores/stores-page.tsx +2 -2
  330. package/src/serve/hub-app/terminal-sources.tsx +2 -1
  331. package/src/serve/hub-app/thread-row.tsx +3 -4
  332. package/src/serve/hub-app/tree-build.ts +0 -4
  333. package/src/serve/hub-app/urls-view.tsx +2 -1
  334. package/src/serve/hub-app/view-layout.css +13 -3
  335. package/src/serve/hub-app/wikis-view.tsx +5 -2
  336. package/src/serve/hub-runtime.ts +7 -37
  337. package/src/serve/project-gutter-route.ts +6 -2
  338. package/src/serve/read-thread.ts +20 -2
  339. package/src/serve/read-worker.ts +9 -1
  340. package/src/serve/record-pages.ts +46 -0
  341. package/src/serve/serve-hub.ts +2 -2
  342. package/src/serve/terminal-host.ts +1 -1
  343. package/src/serve/terminal-route.ts +1 -3
  344. package/src/serve/tracked-watch.ts +1 -3
  345. package/src/setup-house.ts +2 -2
  346. package/src/shipkit-files.ts +1 -1
  347. package/src/shipkit.ts +1 -6
  348. package/src/shot/client.ts +2 -1
  349. package/src/shot/film-box.ts +0 -20
  350. package/src/shot/on-place.ts +141 -0
  351. package/src/social/drafts.ts +1 -1
  352. package/src/social/kinds.ts +6 -29
  353. package/src/social/load.ts +2 -2
  354. package/src/social/post-object.ts +3 -2
  355. package/src/social/release-stage.ts +1 -1
  356. package/src/social/stage.ts +2 -2
  357. package/src/stores/model.ts +4 -0
  358. package/src/stores/routes.ts +11 -3
  359. package/src/suite/judge-suites.ts +58 -0
  360. package/src/suite/red-alone.ts +54 -18
  361. package/src/suite/runner-shapes.ts +2 -2
  362. package/src/suite/suite-cli.ts +67 -14
  363. package/src/suite/test-units.ts +2 -1
  364. package/src/urls/fill.ts +1 -1
  365. package/src/urls/places.ts +1 -2
  366. package/src/vault/vault-config.ts +2 -2
  367. package/src/vault/vault-init.ts +1 -5
  368. package/src/wiki/graph-page.ts +14 -2
  369. package/src/advisors/copy-truth.ts +0 -49
  370. package/src/advisors/door-child.ts +0 -112
  371. package/src/advisors/door-serve.ts +0 -52
  372. package/src/advisors/door.ts +0 -118
  373. package/src/checks/SK016-legacy-check-shapes.check.ts +0 -189
  374. package/src/checks/SK029-explicit-check-files.check.ts +0 -112
  375. package/src/checks/SK048-one-local-file.check.ts +0 -36
  376. package/src/core/config-rewrite.ts +0 -111
  377. package/src/core/daemon-port.ts +0 -10
  378. package/src/core/legacy-shapes.ts +0 -263
  379. package/src/core/migrate-layout.ts +0 -638
  380. package/src/core/port-check-cli.ts +0 -52
  381. package/src/core/port-check-file.ts +0 -295
  382. package/src/core/port-check-files.ts +0 -31
  383. package/src/gate/discover-legacy-checks.ts +0 -26
  384. package/src/home/home-move.ts +0 -527
  385. package/src/home/machine-fold.ts +0 -810
  386. package/src/hq/item-shapes.ts +0 -54
  387. package/src/hq/kinds/items-read.ts +0 -4
  388. package/src/media-store/backup/daemon.ts +0 -220
  389. package/src/media-store/backup/kept.ts +0 -241
  390. package/src/media-store/backup/prune.ts +0 -359
  391. package/src/media-store/backup/secret.ts +0 -88
  392. package/src/media-store/backup/ssh-space.ts +0 -202
  393. package/src/media-store/backup/watch.ts +0 -117
  394. package/src/review/band.ts +0 -182
  395. package/src/review/folders.ts +0 -216
  396. package/src/review/hook-ask.ts +0 -58
  397. package/src/review/role.ts +0 -48
  398. package/src/review/thread-fold.ts +0 -64
  399. package/src/review/wait.ts +0 -91
  400. package/src/rules/rule.ts +0 -43
  401. package/src/serve/hook-thread.ts +0 -37
  402. package/src/serve/hook-work.ts +0 -92
  403. package/src/serve/hook-worker.ts +0 -57
  404. package/src/serve/hub-app/review/dock.tsx +0 -147
  405. package/src/serve/hub-app/review/faces.tsx +0 -18
  406. package/src/serve/hub-app/review/item-verdict.tsx +0 -112
  407. package/src/serve/hub-app/review/review-board.tsx +0 -48
  408. /package/src/{scaffold → core}/jsonc-spans.ts +0 -0
@@ -16,7 +16,7 @@ export const renderShot = (r: ShotResult, cwd: string): string[] => {
16
16
  const rel = relative(cwd, f)
17
17
  return rel.startsWith('..') ? f : rel
18
18
  }
19
- const lines = [`ok ${shown(r.out)} in ${r.ms} ms (${phases}; ${r.via}) ${r.note}`]
19
+ const lines = [`ok ${shown(r.out)} in ${r.ms} ms (${phases}; ${r.on != null ? `on ${r.on}, ` : ''}${r.via}) ${r.note}`]
20
20
  for (const f of r.tiles?.slice(1) ?? []) lines.push(`ok ${shown(f)} (next tile)`)
21
21
  for (const e of r.errors.slice(0, 10)) lines.push(`WARN page ${e}`)
22
22
  if (r.errors.length > 10) lines.push(`WARN page ${r.errors.length - 10} more errors`)
@@ -30,6 +30,16 @@ export const fileUrlOf = (s: string, cwd: string): string => {
30
30
  return statSync(p, { throwIfNoEntry: false })?.isFile() ? pathToFileURL(p).href : s
31
31
  }
32
32
 
33
+ /** the house checkout's path under the home: a place runs its shot from its own at the same place */
34
+ async function houseRelHere(cwd: string): Promise<string> {
35
+ const { homedir } = await import('os')
36
+ const { houseRootOf } = await import('../home/home-start.ts')
37
+ const { installedHouseRoot } = await import('../home/home-launchd.ts')
38
+ const root = installedHouseRoot() ?? houseRootOf(cwd, homedir())
39
+ if (root == null || !root.startsWith(`${homedir()}/`)) throw new Error('FAIL shot --on: no house checkout under the home folder here, so the place has none to run from')
40
+ return relative(homedir(), root)
41
+ }
42
+
33
43
  export class ShotCommand extends Command {
34
44
  static override paths = [['shot']]
35
45
  static essential = { args: '<url>' }
@@ -38,7 +48,7 @@ export class ShotCommand extends Command {
38
48
  category: 'Serve',
39
49
  description: 'a webp of any url through the warm browser (a png with --out x.png), or an mp4 clip with --video',
40
50
  details:
41
- 'one warm headless chromium for the whole machine (the `shot` global process, started when down). A still reuses the warm page when it already shows the url, so a warm shot answers in about 0.1 s. A page with `<meta name="shot-ready" content="wait">` is shot once it sets content="ready"; any other page --wait ms after its load; a page that navigates while it loads (a sign in that redirects) gets its wait again where it lands. --full shoots the whole page at the width of the viewport: one file while the page fits the tallest side of its format (webp 16383 px, jpg and png 65535), else tiles in that format, <name>-1, <name>-2… top to bottom, every one printed, so nothing of the page is lost and the format stays the one asked (a jpg instead of a webp would change what the caller asked for, a cut would drop the end of the page); a whole page stops at 131072 px, the cut said in the note. A file of this machine is a url too (its path, or file://). --video films a page that is a canvas through its WebCodecs encoder (H.264 muxed with no second encode), and any other page as chromium paints it (its screencast, encoded by ffmpeg as the frames arrive); --dom films the page even when a canvas fills it. --step <hook> films frame by frame: before each frame the page draws its time t (seconds) in `await window[hook](t)`, then its ready mark, so a slow page films smooth at its fps; a canvas page is encoded by its own WebCodecs at the exact time n / fps, any other page a screenshot a frame. A still with --step is the page drawn at --at s. A session: cookies follow every shot (one jar in memory for the whole machine), the local storage of a page does not: a shot at another viewport, a clip and the idle close (60 s) each start with an empty one, as two browser contexts do. So when an app keeps its session in local storage, open its sign in at the viewport you shoot at; a request the page sees answered 401 or 403 prints its own WARN line. A theme: --theme <hub theme> draws the page with that prefers-color-scheme and the hub reads its `hub:theme` as that theme, written nowhere, so the next shot keeps none; with no flag every shot of the machine takes serve.shotTheme of the house config.',
51
+ 'one warm headless chromium for the whole machine (the `shot` global process, started when down). A still reuses the warm page when it already shows the url, so a warm shot answers in about 0.1 s. A page with `<meta name="shot-ready" content="wait">` is shot once it sets content="ready"; any other page --wait ms after its load; a page that navigates while it loads (a sign in that redirects) gets its wait again where it lands. --full shoots the whole page at the width of the viewport: one file while the page fits the tallest side of its format (webp 16383 px, jpg and png 65535), else tiles in that format, <name>-1, <name>-2… top to bottom, every one printed, so nothing of the page is lost and the format stays the one asked (a jpg instead of a webp would change what the caller asked for, a cut would drop the end of the page); a whole page stops at 131072 px, the cut said in the note. A file of this machine is a url too (its path, or file://). --video films a page that is a canvas through its WebCodecs encoder (H.264 muxed with no second encode), and any other page as chromium paints it (its screencast, encoded by ffmpeg as the frames arrive); --dom films the page even when a canvas fills it. --step <hook> films frame by frame: before each frame the page draws its time t (seconds) in `await window[hook](t)`, then its ready mark, so a slow page films smooth at its fps; a canvas page is encoded by its own WebCodecs at the exact time n / fps, any other page a screenshot a frame. A still with --step is the page drawn at --at s. A session: cookies follow every shot (one jar in memory for the whole machine), the local storage of a page does not: a shot at another viewport, a clip and the idle close (60 s) each start with an empty one, as two browser contexts do. So when an app keeps its session in local storage, open its sign in at the viewport you shoot at; a request the page sees answered 401 or 403 prints its own WARN line. A theme: --theme <hub theme> draws the page with that prefers-color-scheme and the hub reads its `hub:theme` as that theme, written nowhere, so the next shot keeps none; with no flag every shot of the machine takes serve.shotTheme of the house config. Another place: --on <place> runs the same shot on a machine that reports to the hq (sk machines), over ssh, by its own `sk shot` from its house checkout, so its warm browser draws the page and its localhost is its own; each file comes back to --out and leaves its /tmp. A place that does not answer ssh, has no shot service or runs a shipkit whose sk shot refuses the ask fails in one line with the fix. wm, the GPU box, runs no shipkit place (no daemon, no pm, no shot service): --on wm is refused; a repo whose repo.config.ts names it in browsers.box already films on it with a plain sk shot.',
42
52
  examples: [
43
53
  ['a still of a running dev server', 'sk shot localhost:5173/'],
44
54
  ['a whole tall page at a phone width', 'sk shot :5173/guest --viewport 390,844 --full --out shots/guest.png'],
@@ -46,6 +56,7 @@ export class ShotCommand extends Command {
46
56
  ['a 3 s clip', 'sk shot :4808/ --video 3 --out clips/walk.mp4'],
47
57
  ['a clip of a whole web app page, canvas or not', 'sk shot :5173/settings --video 3 --dom'],
48
58
  ['the hub in its dark theme, whatever the default', 'sk shot :4804/ --theme dark'],
59
+ ['the hub of another machine of the house, shot by its own browser, the file brought here', 'sk shot :4799/ --on studio --out shots/studio.webp'],
49
60
  ['a slow 3D page stepped frame by frame through window.__trailerStep(t)', 'sk shot :4808/ --video 3 --step __trailerStep --out clips/walk.mp4'],
50
61
  ],
51
62
  })
@@ -64,14 +75,25 @@ export class ShotCommand extends Command {
64
75
  step = Option.String('--step', { description: 'a window function the page draws time t (s) in: a clip steps it frame by frame, a still draws --at' })
65
76
  at = Option.String('--at', { description: 'with --step, the time a still is drawn at (default 0)' })
66
77
  theme = Option.String('--theme', { description: 'dark, dim, grey or light: the page drawn in that hub theme, this shot only (default the house config serve.shotTheme)' })
78
+ on = Option.String('--on', { description: 'another place of the house (sk machines): the shot runs in its own warm browser, its localhost is its own, the file comes back to --out; wm, a box with no shipkit place, is refused' })
67
79
  json = Option.Boolean('--json', false, { description: 'one json line: out, ms, phases, errors, note, via, and tiles when a whole page is tiled' })
68
80
 
69
81
  async execute(): Promise<number> {
70
82
  const cwd = process.cwd()
71
83
  const err = (l: string) => this.context.stderr.write(`${l}\n`)
72
84
  try {
73
- const a = askOf({ url: fileUrlOf(this.url, cwd), full: this.full, viewport: this.viewport, dpr: this.dpr, out: this.out, reload: this.reload, wait: this.wait, video: this.video, fps: this.fps, long: this.long, dom: this.dom, step: this.step, at: this.at, theme: this.theme }, cwd)
74
- const r = isClip(a) ? await clipUrl(a, err) : await shotUrl(a, err)
85
+ const place = this.on == null ? 'here' : await (await import('../shot/on-place.ts')).lookPlace(this.on)
86
+ if (place !== 'here' && 'refused' in place) throw new Error(place.refused)
87
+ const a = askOf({ url: place === 'here' ? fileUrlOf(this.url, cwd) : this.url, full: this.full, viewport: this.viewport, dpr: this.dpr, out: this.out, reload: this.reload, wait: this.wait, video: this.video, fps: this.fps, long: this.long, dom: this.dom, step: this.step, at: this.at, theme: this.theme }, cwd)
88
+ const r =
89
+ place !== 'here'
90
+ ? await (async () => {
91
+ const { placeSsh, shotOnPlace } = await import('../shot/on-place.ts')
92
+ return shotOnPlace(place, a, { ssh: placeSsh, houseRel: await houseRelHere(cwd), say: err })
93
+ })()
94
+ : isClip(a)
95
+ ? await clipUrl(a, err)
96
+ : await shotUrl(a, err)
75
97
  if (this.json) this.context.stdout.write(`${JSON.stringify(r)}\n`)
76
98
  else for (const l of renderShot(r, cwd)) this.context.stdout.write(`${l}\n`)
77
99
  return 0
@@ -22,16 +22,16 @@ class SocialDraftsImportCommand extends Command {
22
22
  static override paths = [['social', 'drafts', 'import']]
23
23
  static override usage = Command.Usage({
24
24
  category: 'Social',
25
- description: 'the old drafts folders into the database: a look, or the write after a backup',
25
+ description: 'the old drafts folders into the database: a look, or the write',
26
26
  details:
27
- "Reads each folder through the desk's own builder: its group, one post per account it reaches (a group heading becomes one post per account), every file. A look by default: each repo's groups, posts by state, files on the disk, in the Space, named and missing. --go runs sk backup and pins that run 30 days (sk backup pin) first and stops when one fails (the threads are the hq's, its live copy their backup), then keeps every file by its key (a file the Space holds already is never sent again), writes the events with each posted link's moment as the timeline gave it, makes a thread refer to each new group (the version it was staged from, else one opened on it), then loads the desk from the database and compares it with the folders' desk, every draft and post field by field: any difference fails. Re-runnable: what did not move writes nothing. It never writes in the folders. --all: every house repo. Page: wiki tools/shipkit/social.md, The verbs, the thread's block, the import",
27
+ "Reads each folder through the desk's own builder: its group, one post per account it reaches (a group heading becomes one post per account), every file. A look by default: each repo's groups, posts by state, files on the disk, in the Space, named and missing. --go (the threads are the hq's, its live copy their backup; the folders stay, git or the disk keeps them) keeps every file by its key (a file the Space holds already is never sent again), writes the events with each posted link's moment as the timeline gave it, makes a thread refer to each new group (the version it was staged from, else one opened on it), then loads the desk from the database and compares it with the folders' desk, every draft and post field by field: any difference fails. Re-runnable: what did not move writes nothing. It never writes in the folders. --all: every house repo. Page: wiki tools/shipkit/social.md, The verbs, the thread's block, the import",
28
28
  examples: [
29
29
  ['a look in this repo', 'sk social drafts import'],
30
- ['every house repo, after the backups', 'sk social drafts import --all --go'],
30
+ ['every house repo', 'sk social drafts import --all --go'],
31
31
  ],
32
32
  })
33
33
  all = Option.Boolean('--all', false, { description: 'every house repo' })
34
- go = Option.Boolean('--go', false, { description: 'write, after the backups and the drill' })
34
+ go = Option.Boolean('--go', false, { description: 'write' })
35
35
  override async execute(): Promise<number> {
36
36
  return guarded(this.context, 'social drafts import', async () => {
37
37
  const out = say(this.context)
@@ -44,19 +44,12 @@ class SocialDraftsImportCommand extends Command {
44
44
  const { loadSocialUnit } = await import('../social/unit.ts')
45
45
  const { importRepo } = await import('../social/import-drafts.ts')
46
46
  const roots = (this.all ? (await houseRepoRoots(process.cwd())).map((r) => r.path) : [findRepoRoot(process.cwd())]).filter((r) => existsSync(draftsDir(r)))
47
- if (this.go)
48
- for (const argv of [['sk', 'backup'], ['sk', 'backup', 'pin', '--days', '30', '--why', 'before the social migration']]) {
49
- out(`first: ${argv.join(' ')}`)
50
- const b = Bun.spawnSync(argv, { stdout: 'pipe', stderr: 'pipe' })
51
- for (const l of `${b.stdout?.toString() ?? ''}${b.stderr?.toString() ?? ''}`.trim().split('\n').slice(-3)) out(` ${l}`)
52
- if (b.exitCode !== 0) throw new Error(`${argv.join(' ')} failed: nothing written`)
53
- }
54
47
  let bad = 0
55
48
  for (const root of roots) {
56
49
  const [config, ids, unit] = await Promise.all([loadRepoConfig(root, { fresh: true }).catch(() => null), loadIdentities({ cwd: root }), loadSocialUnit(root)])
57
50
  const r = await importRepo(root, ids, { ...(config?.speaksAs ? { speaksAs: config.speaksAs } : {}), unit, go: this.go, sender: 'machine' })
58
51
  out(`${root}: ${r.groups} groups, posts ${r.posts.draft} draft, ${r.posts.posted} posted, ${r.posts.dropped} dropped; files ${r.files.local} on the disk, ${r.files.space} in the Space only, ${r.files.missing} named with no file`)
59
- if (r.facts.entries > 0) out(` the media facts record: ${r.facts.entries} entries, ${r.facts.used} of folders read${r.facts.orphans.length > 0 ? `, ${r.facts.entries - r.facts.used} of no folder (${r.facts.orphans.join(', ')}): left in the record, which the backup keeps` : ''}`)
52
+ if (r.facts.entries > 0) out(` the media facts record: ${r.facts.entries} entries, ${r.facts.used} of folders read${r.facts.orphans.length > 0 ? `, ${r.facts.entries - r.facts.used} of no folder (${r.facts.orphans.join(', ')}): left in the record` : ''}`)
60
53
  for (const m of r.missing) out(` NOT LOADED ${m}: the builder left it out (sk social shows why)`)
61
54
  bad += r.missing.length
62
55
  if (!this.go) continue
@@ -65,7 +58,7 @@ class SocialDraftsImportCommand extends Command {
65
58
  out(` ${r.differs.length} field${r.differs.length === 1 ? '' : 's'} differ between the folders and the database`)
66
59
  bad += r.differs.length
67
60
  }
68
- out(this.go ? 'then: sk thread events --check' : `a look: nothing written. sk social drafts import${this.all ? ' --all' : ''} --go backs up, then writes`)
61
+ out(this.go ? 'then: sk thread events --check' : `a look: nothing written. sk social drafts import${this.all ? ' --all' : ''} --go writes`)
69
62
  return bad > 0 ? 1 : 0
70
63
  })
71
64
  }
@@ -18,7 +18,7 @@ export class ThreadSyncNeedsCommand extends Command {
18
18
  const { syncNeedThreads } = await import('../review/need-threads.ts')
19
19
  const { NEED_KINDS } = await import('../review/need-address.ts')
20
20
  const { readAll, storeDir } = await import('../review/store.ts')
21
- const { orderedThreads, turnOf } = await import('../review/threads.ts')
21
+ const { orderedThreads, threadState } = await import('../review/thread-state.ts')
22
22
  const out = (l: string): void => void this.context.stdout.write(`${l}\n`)
23
23
  const home = `http://127.0.0.1:${homePort()}`
24
24
  const get = async <T>(path: string): Promise<T> => {
@@ -37,7 +37,11 @@ export class ThreadSyncNeedsCommand extends Command {
37
37
  const kinds = Object.values(NEED_KINDS).map((k) => `${k}:`)
38
38
  const turns = (root: string): string => {
39
39
  const by: Record<string, number> = {}
40
- for (const t of orderedThreads(readAll(storeDir(root)).items)) if (kinds.some((k) => t.head.item.on?.startsWith(k))) by[turnOf(t)] = (by[turnOf(t)] ?? 0) + 1
40
+ for (const t of orderedThreads(readAll(storeDir(root)).items)) {
41
+ if (!kinds.some((k) => t.head.item.on?.startsWith(k))) continue
42
+ const turn = threadState(t).turn
43
+ by[turn] = (by[turn] ?? 0) + 1
44
+ }
41
45
  return Object.entries(by).map(([k, n]) => `${n} ${k}`).join(', ') || 'none'
42
46
  }
43
47
  let failed = 0
@@ -100,7 +100,7 @@ export class TimeCommand extends Command {
100
100
  try {
101
101
  db = openIndex()
102
102
  } catch (e) {
103
- // a fold, a way back or a repair at work ends by itself: one line and the exit code of a wait, no stack
103
+ // a repair at work ends by itself: one line and the exit code of a wait, no stack
104
104
  const { StoreRefused, WAIT_EXIT } = await import('../core/machine-db.ts')
105
105
  if (!(e instanceof StoreRefused)) throw e
106
106
  this.context.stderr.write(`FAIL: ${e.message}\n`)
@@ -149,7 +149,7 @@ export class TrailerPlanCommand extends Command {
149
149
  const known = new Set([...l.t.shots, ...l.t.footage].map((s) => s.name))
150
150
  const unknown = shots.filter((s) => !known.has(s))
151
151
  if (unknown.length > 0) throw new b.Refused(`${basename(file)} has no shot ${unknown.join(', ')}; its shots: ${[...known].join(', ')}`)
152
- if (this.waiting !== undefined && !ID_RE.test(this.waiting)) throw new b.Refused(`--waiting takes a version's id (YYYYMMDD-HHMMSS-slug, as sk thread add prints it), got ${this.waiting}`)
152
+ if (this.waiting !== undefined && !ID_RE.test(this.waiting)) throw new b.Refused(`--waiting takes a version's id (YYYYMMDD-HHMMSS-slug, as sk thread post prints it), got ${this.waiting}`)
153
153
  const by = this.by ?? process.env.SK_AGENT
154
154
  if (marks[0] !== 'clear' && !by) throw new b.Refused('--by <lane>: the owner reads who plans each shot (or set SK_AGENT)')
155
155
  const { trailer, cut } = cutIdOf(file)
@@ -82,7 +82,7 @@ type Io = { out: (l: string) => void; err: (l: string) => void }
82
82
 
83
83
  /** the hook's work on one event, its input as the text on its stdin, for the repo `cwd` stands in: a resumed lane's
84
84
  * threads taken back, then the hook, as the command runs it under its `run` (a refusal is one FAIL line and its exit
85
- * code). The one body both ways run: this process (inboxHookBoot), and the daemon's hook thread (serve/hook-worker.ts) */
85
+ * code). The one body the hook's process runs (inboxHookBoot) */
86
86
  export async function hookWork(text: string, cwd: string, io: Io): Promise<number> {
87
87
  await (await import('../review/take-back.ts')).takeBackAtBoot()
88
88
  const { hookPasses, parseHookInput } = await import('../review/inbox-hook.ts')
@@ -98,27 +98,15 @@ export async function hookWork(text: string, cwd: string, io: Io): Promise<numbe
98
98
  }
99
99
  }
100
100
 
101
- /** the hook as the whole process, `t0` its start. The daemon answers first, from its warm hook thread
102
- * (review/hook-ask.ts): the call logged, its lines printed, nothing else loaded. Not served (the daemon down, slow,
103
- * on other code, or the env moves a store): the steps of every `sk` call (cli.ts: one copy of the lib, the machine's
104
- * link, the call logged, pm started when it is down), then hookWork. One step is not in the cli's order: pm is asked
101
+ /** the hook as the whole process, `t0` its start: the steps of every `sk` call (cli.ts: one copy of the lib, the
102
+ * machine's link, the call logged, pm started when it is down), then hookWork. One step is not in the cli's order: pm is asked
105
103
  * while the hook works and awaited at its end, since the hook never needs its answer */
106
104
  export async function inboxHookBoot(argv: string[], t0: number, io: Io = { out: (l) => void process.stdout.write(`${l}\n`), err: (l) => void process.stderr.write(`${l}\n`) }): Promise<number> {
107
105
  const text = process.stdin.isTTY === true ? '' : await new Response(Bun.stdin.stream()).text().catch(() => '')
108
- const served = await (await import('../review/hook-ask.ts')).askDaemon(text, process.cwd())
109
- const logged = async (): Promise<void> => {
110
- const { callsFile, logCall } = await import('./kit/calls.ts')
111
- logCall(callsFile((await import('node:os')).homedir(), 'sk'), 'sk', argv).matched('thread inbox', performance.now() - t0)
112
- }
113
- if (served !== null) {
114
- await logged()
115
- lines(served.out, io.out)
116
- lines(served.err, io.err)
117
- return served.code
118
- }
119
106
  ;(await import('../core/one-lib.ts')).installOneLib()
120
107
  await (await import('../core/machine-link.ts')).linkMachineCopy()
121
- await logged()
108
+ const { callsFile, logCall } = await import('./kit/calls.ts')
109
+ logCall(callsFile((await import('node:os')).homedir(), 'sk'), 'sk', argv).matched('thread inbox', performance.now() - t0)
122
110
  const { autostart } = await import('../home/autostart.ts')
123
111
  const pm = autostart(argv).catch((e: unknown) => void io.err(`WARN pm was not asked: ${e instanceof Error ? e.message : String(e)}`))
124
112
  try {
@@ -127,9 +115,3 @@ export async function inboxHookBoot(argv: string[], t0: number, io: Io = { out:
127
115
  await pm
128
116
  }
129
117
  }
130
-
131
- /** what a served hook printed, line by line, as its own run prints each */
132
- function lines(text: string, put: (l: string) => void): void {
133
- if (text === '') return
134
- for (const l of text.split('\n').slice(0, text.endsWith('\n') ? -1 : undefined)) put(l)
135
- }
@@ -32,7 +32,6 @@ export const HEADS: Heads = {
32
32
  "gp": ['GlobalProcesses'],
33
33
  "gui": ['Home'],
34
34
  "history": ['History'],
35
- "home": ['Home'],
36
35
  "hooks": ['Hooks'],
37
36
  "hq": ['Hq'],
38
37
  "identities": ['Social'],
@@ -73,7 +72,6 @@ export const HEADS: Heads = {
73
72
  "trace-audit": ['TraceAudit'],
74
73
  "trailer": ['Trailer'],
75
74
  "tui": ['Tui'],
76
- "units": ['Checks'],
77
75
  "urls": ['Urls'],
78
76
  "vault": ['Vault'],
79
77
  "veille": ['Veille'],
@@ -90,7 +88,6 @@ export const HEADS: Heads = {
90
88
  "advisors drafts": ['Advisors'],
91
89
  "advisors enable": ['Advisors'],
92
90
  "advisors expose": ['Advisors'],
93
- "advisors live": ['Advisors'],
94
91
  "advisors people": ['Advisors'],
95
92
  "advisors photo": ['Advisors'],
96
93
  "advisors renew": ['Advisors'],
@@ -121,8 +118,6 @@ export const HEADS: Heads = {
121
118
  "assets gen": ['Assets'],
122
119
  "assets identity": ['Assets'],
123
120
  "backup drill": ['Backup'],
124
- "backup pin": ['Backup'],
125
- "backup prune": ['Backup'],
126
121
  "backup restore": ['Backup'],
127
122
  "backup runs": ['Backup'],
128
123
  "backup status": ['Backup'],
@@ -130,7 +125,6 @@ export const HEADS: Heads = {
130
125
  "backup undelete": ['Backup'],
131
126
  "daemon job": ['Home'],
132
127
  "db drop": ['Db'],
133
- "db fold": ['Db'],
134
128
  "db rebuild": ['Db'],
135
129
  "db repair": ['Db'],
136
130
  "db threads": ['Db'],
@@ -162,15 +156,12 @@ export const HEADS: Heads = {
162
156
  "history check": ['History'],
163
157
  "history forget": ['History'],
164
158
  "history send": ['History'],
165
- "home move": ['Home'],
166
159
  "hooks commit-msg": ['Hooks'],
167
160
  "hooks install": ['Hooks'],
168
161
  "hooks list": ['Hooks'],
169
162
  "hooks post-commit": ['Hooks'],
170
163
  "hooks pre-commit": ['Hooks'],
171
- "hq cards": ['Hq'],
172
164
  "hq close": ['Hq'],
173
- "hq door": ['Hq'],
174
165
  "hq drill": ['Hq'],
175
166
  "hq end": ['Hq'],
176
167
  "hq forget": ['Hq'],
@@ -215,43 +206,9 @@ export const HEADS: Heads = {
215
206
  "rec rm": ['Rec'],
216
207
  "rec start": ['Rec'],
217
208
  "releases add": ['Releases'],
209
+ "releases check": ['Releases'],
218
210
  "releases refresh": ['Releases'],
219
211
  "releases remove": ['Releases'],
220
- "review add": ['Review'],
221
- "review add-view": ['Review'],
222
- "review anim": ['Review'],
223
- "review ask": ['Review'],
224
- "review auto": ['Review'],
225
- "review blocked": ['Review'],
226
- "review board": ['Review'],
227
- "review claim": ['Review'],
228
- "review delete": ['Review'],
229
- "review dispatch": ['Review'],
230
- "review dispatcher": ['Review'],
231
- "review done": ['Review'],
232
- "review drop": ['Review'],
233
- "review export": ['Review'],
234
- "review fixed": ['Review'],
235
- "review import": ['Review'],
236
- "review inbox": ['Review'],
237
- "review ls": ['Review'],
238
- "review marks": ['Review'],
239
- "review migrate": ['Review'],
240
- "review next": ['Review'],
241
- "review pick": ['Review'],
242
- "review ready": ['Review'],
243
- "review reassign": ['Review'],
244
- "review release": ['Review'],
245
- "review reopen": ['Review'],
246
- "review reply": ['Review'],
247
- "review seen": ['Review'],
248
- "review show": ['Review'],
249
- "review stage": ['Review'],
250
- "review topics": ['Review'],
251
- "review update": ['Review'],
252
- "review watch": ['Review'],
253
- "review withdraw": ['Review'],
254
- "review wontfix": ['Review'],
255
212
  "secret account": ['Secret'],
256
213
  "secret archive": ['Secret'],
257
214
  "secret audit": ['Secret'],
@@ -293,46 +250,40 @@ export const HEADS: Heads = {
293
250
  "space proof": ['Space'],
294
251
  "space setup": ['Space'],
295
252
  "space snapshot": ['Space'],
296
- "thread add": ['Review'],
297
253
  "thread add-view": ['Review'],
298
254
  "thread anim": ['Review'],
299
255
  "thread ask": ['Review'],
300
256
  "thread assign": ['Review'],
301
257
  "thread attach": ['Review'],
302
258
  "thread auto": ['Review'],
303
- "thread blocked": ['Review'],
304
259
  "thread board": ['Review'],
305
260
  "thread claim": ['Review'],
261
+ "thread close": ['Review'],
306
262
  "thread delete": ['Review'],
307
- "thread dispatch": ['Review'],
308
- "thread dispatcher": ['Review'],
309
263
  "thread done": ['Review'],
310
- "thread drop": ['Review'],
311
264
  "thread events": ['SocialDrafts'],
312
- "thread export": ['Review'],
313
265
  "thread fixed": ['Review'],
314
266
  "thread fold-reflections": ['ThreadReflect'],
315
267
  "thread holds": ['ThreadHolds'],
316
- "thread import": ['Review'],
317
268
  "thread inbox": ['Review'],
318
269
  "thread kinds": ['ThreadKinds'],
319
270
  "thread ls": ['Review'],
320
271
  "thread marks": ['Review'],
321
- "thread migrate": ['Review'],
322
272
  "thread next": ['Review'],
323
- "thread pick": ['Review'],
324
273
  "thread post": ['Review'],
325
274
  "thread propose": ['Review'],
326
275
  "thread ready": ['Review'],
327
- "thread reassign": ['Review'],
276
+ "thread recap": ['Review'],
328
277
  "thread reflect": ['ThreadReflect'],
329
278
  "thread release": ['Review'],
279
+ "thread rename": ['Review'],
330
280
  "thread reopen": ['Review'],
331
281
  "thread reply": ['Review'],
332
282
  "thread seen": ['Review'],
333
283
  "thread share": ['Advisors'],
334
284
  "thread show": ['Review'],
335
285
  "thread stage": ['Review'],
286
+ "thread suggest-move": ['Review'],
336
287
  "thread sync-needs": ['ThreadSyncNeeds'],
337
288
  "thread tag": ['Review'],
338
289
  "thread take": ['Review'],
@@ -438,7 +389,6 @@ export const HEADS: Heads = {
438
389
  "trace-audit": ['TraceAudit'],
439
390
  "trailer": ['Trailer'],
440
391
  "tui": ['Tui'],
441
- "units": ['Checks'],
442
392
  "urls": ['Urls'],
443
393
  "vault": ['Vault'],
444
394
  "web": ['Home'],
@@ -112,6 +112,7 @@ const ROWS: readonly Row[] = [
112
112
  row('Release', 'ReleaseCommand'),
113
113
  row('Releases', 'ReleasesCommand'),
114
114
  row('Releases', 'ReleasesAddCommand'),
115
+ row('Releases', 'ReleasesCheckCommand'),
115
116
  row('Releases', 'ReleasesRefreshCommand'),
116
117
  row('Releases', 'ReleasesRemoveCommand'),
117
118
  row('Hooks', 'HooksInstallCommand'),
@@ -153,7 +154,6 @@ const ROWS: readonly Row[] = [
153
154
  row('Home', 'PmInstallCommand'),
154
155
  row('Home', 'PmUninstallCommand'),
155
156
  row('Home', 'PmRestartCommand'),
156
- row('Home', 'HomeMoveCommand'),
157
157
  row('Home', 'GuiCommand'),
158
158
  row('Contracts', 'ContractsCommand'),
159
159
  row('Asks', 'AsksCommand'),
@@ -215,15 +215,11 @@ const ROWS: readonly Row[] = [
215
215
  row('When', 'WhenCommand'),
216
216
  row('CacheAudit', 'CacheAuditCommand'),
217
217
  row('TraceAudit', 'TraceAuditCommand'),
218
- row('Checks', 'UnitsAliasCommand'),
219
- row('Hq', 'HqCardsAliasCommand'),
220
- row('Hq', 'HqDoorCommand'),
221
218
  row('Commands', 'CommandsCommand'),
222
219
  row('Capacity', 'CapacityCommand'),
223
220
  row('Lanes', 'LanesCommand'),
224
221
  row('Machines', 'MachinesCommand'),
225
222
  row('Db', 'DbCommand'),
226
- row('Db', 'DbFoldCommand'),
227
223
  row('Db', 'DbThreadsCommand'),
228
224
  row('Db', 'DbDropCommand'),
229
225
  row('Db', 'DbRepairCommand'),
@@ -100,7 +100,7 @@ export async function recordedStores(session: string, skip: (dir: string) => boo
100
100
  const dirs: string[] = []
101
101
  const gone: string[] = []
102
102
  for (const d of readSessionRecord(session)?.stores ?? []) {
103
- if (scratchStore(d) || !existsSync(d) || (await reviewRoot(dirname(dirname(d)))) === null) {
103
+ if (!existsSync(d) || (await reviewRoot(dirname(dirname(d)))) === null || scratchStore(canonicalStore(d))) {
104
104
  gone.push(d)
105
105
  continue
106
106
  }
package/src/cli.ts CHANGED
@@ -58,8 +58,16 @@ async function headGate(raw: string[]): Promise<number | null> {
58
58
  return o === null ? null : await m.runHeadGate(process.cwd(), { ...o, print: (l) => process.stdout.write(`${l}\n`) })
59
59
  }
60
60
 
61
- /** true for the one line the inbox hook is wired as, `sk thread inbox --hook` (or its older name), nothing else on it */
62
- export const isInboxHookLine = (raw: readonly string[]): boolean => raw.length === 3 && (raw[0] === 'thread' || raw[0] === 'review') && raw[1] === 'inbox' && raw[2] === '--hook'
61
+ /** a heavy line waits while the machine is full (gate/admit-heavy.ts; `sk ci` waits inside the gate, before its
62
+ * first heavy check that misses the cache); a module that fails to load lets it run */
63
+ async function admitHeavy(argv: readonly string[]): Promise<void> {
64
+ let m
65
+ try { m = await import('./gate/admit-heavy.ts') } catch { return }
66
+ await m.admitLine(argv, process.cwd())
67
+ }
68
+
69
+ /** true for the one line the inbox hook is wired as, `sk thread inbox --hook`, nothing else on it */
70
+ export const isInboxHookLine = (raw: readonly string[]): boolean => raw.length === 3 && raw[0] === 'thread' && raw[1] === 'inbox' && raw[2] === '--hook'
63
71
 
64
72
  /** the inbox hook, which every session of every house repo runs at each prompt and each turn's end, run by its own
65
73
  * small module before the registry loads: the 80 command files cost it 0.1 s each time (cli/inbox-hook-run.ts makes
@@ -97,8 +105,10 @@ if (import.meta.main) {
97
105
  call.matched('line' in line ? commandPath(() => line.line.command) : 'help', performance.now() - t0)
98
106
  const pm = pmAsked(argv)
99
107
  await b.takeBackAtBoot()
100
- if ('line' in line) process.exitCode = await line.line.run()
101
- else console.log(line.version)
108
+ if ('line' in line) {
109
+ await admitHeavy(argv)
110
+ process.exitCode = await line.line.run()
111
+ } else console.log(line.version)
102
112
  await pm
103
113
  } else {
104
114
  let cli = b.cli!
@@ -112,6 +122,7 @@ if (import.meta.main) {
112
122
  call.matched(commandPath(() => cli.process(run)), performance.now() - t0)
113
123
  const pm = pmAsked(run)
114
124
  await b.takeBackAtBoot()
125
+ await admitHeavy(run)
115
126
  await cli.runExit(run)
116
127
  await pm
117
128
  }
@@ -13,7 +13,7 @@ import type { WhenAt, WhenSource } from '../core/when.ts'
13
13
  import type { RunsCells } from '../core/runs-matrix.ts'
14
14
  import type { CheckFrom } from '../gate/gate-checks.ts'
15
15
  import type { AskState } from '../review/model.ts'
16
- import type { OwnerWait } from '../review/wait.ts'
16
+ import { type OwnerWait } from '../review/thread-state.ts'
17
17
 
18
18
  export type NeedSeverity = 'red' | 'yellow'
19
19
 
@@ -9,12 +9,13 @@ import type { ThreadIndex } from '../review/cells.ts'
9
9
  import { countsUnread } from '../review/owner-read.ts'
10
10
  import { storeIndex } from '../review/store-index.ts'
11
11
  import { hasStore, readAllCached, storeDir, warmStore } from '../review/store.ts'
12
- import { countedAsItsAsk, oldest } from '../review/threads.ts'
12
+ import { oldest } from '../review/threads.ts'
13
13
  import { cutsOf, trailerIds } from '../review/trailer-desk.ts'
14
14
  import { voicesDesk } from '../review/trailer-voices.ts'
15
15
  import { recordVoices } from '../trailer/sound/brand.ts'
16
16
  import { brandSound } from '../trailer/sound/index.ts'
17
17
  import { REVIEW_COL, TRAILER_COL, type Collection, type Instance } from './collection-types.ts'
18
+ import { countedAsItsAsk } from '../review/thread-state.ts'
18
19
 
19
20
  type Entry = ThreadIndex['entries'][number]
20
21
 
@@ -25,8 +26,8 @@ type Entry = ThreadIndex['entries'][number]
25
26
  export function waitingThreads(root: string): { threads: Entry[]; unread: Entry[] } {
26
27
  const mine = (storeIndex(root)?.ix.entries ?? []).filter((e) => !countedAsItsAsk(e.t))
27
28
  return {
28
- threads: mine.filter((e) => e.row.turn === 'yours').sort((a, b) => oldest(a.t.head, b.t.head)),
29
- unread: mine.filter((e) => e.row.unread && countsUnread(e.row.turn)),
29
+ threads: mine.filter((e) => e.row.state.turn === 'yours').sort((a, b) => oldest(a.t.head, b.t.head)),
30
+ unread: mine.filter((e) => e.row.unread && countsUnread(e.row.state.turn)),
30
31
  }
31
32
  }
32
33
 
@@ -42,7 +43,7 @@ export function reviewCollection(root: string): Collection | null {
42
43
  await warmStore(dir)
43
44
  return waitingThreads(root).threads.map(({ t: { head: x }, row }): Instance => ({
44
45
  id: `thread:${x.item.id}`,
45
- text: `${x.item.title} (${STATUS_LABEL[row.status]})`,
46
+ text: `${x.item.title} (${STATUS_LABEL[row.state.status]})`,
46
47
  label: x.item.title,
47
48
  slot: x.item.origin.by === 'agent' ? (x.item.origin.lane ?? 'thread') : 'question',
48
49
  type: 'thread',