rvlib-shipkit 2.26.0 → 2.27.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 (442) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +1 -1
  3. package/src/agent-time/diet.ts +77 -0
  4. package/src/agent-time/family.ts +72 -0
  5. package/src/agent-time/hooks.ts +6 -4
  6. package/src/agent-time/limits.ts +44 -0
  7. package/src/agent-time/live.ts +1 -3
  8. package/src/agent-time/mask.ts +96 -18
  9. package/src/agent-time/refused.ts +45 -0
  10. package/src/agent-time/render.ts +122 -21
  11. package/src/agent-time/report-cache.ts +57 -0
  12. package/src/agent-time/report.ts +314 -40
  13. package/src/agent-time/shape.ts +50 -3
  14. package/src/agent-time/store.ts +320 -99
  15. package/src/agent-time/timeline.ts +140 -21
  16. package/src/agent-time/turns.ts +18 -8
  17. package/src/annex/offload.ts +17 -6
  18. package/src/annex/tidy.ts +70 -10
  19. package/src/asks/ask-after.ts +40 -0
  20. package/src/asks/asks-queue.ts +205 -47
  21. package/src/assets/kit-config.ts +7 -3
  22. package/src/assets/kits/identity-kit.ts +289 -10
  23. package/src/check.ts +3 -1
  24. package/src/checks/SK004-gitignore-policy.check.ts +12 -5
  25. package/src/checks/SK013-one-way-in-policy.check.ts +8 -3
  26. package/src/checks/SK026-asks-autoclose.check.ts +5 -5
  27. package/src/checks/SK028-readme.check.ts +7 -66
  28. package/src/checks/SK030-cache-audit.check.ts +6 -1
  29. package/src/checks/SK031-trace-audit.check.ts +2 -0
  30. package/src/checks/SK033-global-contribution.check.ts +3 -1
  31. package/src/checks/SK035-public-clean.check.ts +2 -2
  32. package/src/checks/SK043-scratch-on-the-mac.check.ts +59 -4
  33. package/src/checks/SK047-login-in-description.check.ts +36 -0
  34. package/src/checks/SK048-one-local-file.check.ts +36 -0
  35. package/src/cli/cmd_Asks.ts +71 -5
  36. package/src/cli/cmd_Backup.ts +2 -2
  37. package/src/cli/cmd_Capacity.ts +2 -2
  38. package/src/cli/cmd_CrossRepoActivity.ts +5 -4
  39. package/src/cli/cmd_Db.ts +253 -0
  40. package/src/cli/cmd_History.ts +212 -0
  41. package/src/cli/cmd_Home.ts +31 -3
  42. package/src/cli/cmd_Hq.ts +516 -0
  43. package/src/cli/cmd_Machines.ts +36 -0
  44. package/src/cli/cmd_Media.ts +38 -6
  45. package/src/cli/cmd_Reflect.ts +23 -2
  46. package/src/cli/cmd_Review.ts +548 -116
  47. package/src/cli/cmd_Secret.ts +62 -12
  48. package/src/cli/cmd_Social.ts +83 -1
  49. package/src/cli/cmd_Space.ts +324 -0
  50. package/src/cli/cmd_Time.ts +76 -5
  51. package/src/cli/cmd_Tmp.ts +28 -4
  52. package/src/cli/cmd_Trailer.ts +14 -10
  53. package/src/cli/cmd_Urls.ts +56 -0
  54. package/src/cli/cmd_Vault.ts +583 -0
  55. package/src/cli/family-help.ts +4 -2
  56. package/src/cli/family-pages.ts +1 -1
  57. package/src/cli/registry.ts +24 -3
  58. package/src/collections/actions.ts +63 -13
  59. package/src/collections/collection-types.ts +23 -1
  60. package/src/collections/providers.ts +117 -23
  61. package/src/collections/review.ts +4 -4
  62. package/src/contracts/contract-manifests.ts +6 -5
  63. package/src/contracts/contract-types.ts +6 -4
  64. package/src/contracts/contracts-engine.ts +11 -0
  65. package/src/contracts/manifests/chrome-web-store.contract.ts +31 -0
  66. package/src/core/budget.ts +12 -17
  67. package/src/core/capacity.ts +27 -18
  68. package/src/core/check-runner.ts +7 -4
  69. package/src/core/layout.ts +3 -0
  70. package/src/core/machine-busy.ts +127 -0
  71. package/src/core/machine-commit.ts +6 -1
  72. package/src/core/machine-db.ts +368 -20
  73. package/src/core/machine-layout.ts +137 -0
  74. package/src/core/machine-read.ts +81 -0
  75. package/src/core/migrate-layout.ts +1 -1
  76. package/src/core/one-way-in-policy.ts +64 -7
  77. package/src/core/polling-policy.ts +27 -0
  78. package/src/core/retention.ts +16 -2
  79. package/src/core/scope.ts +107 -14
  80. package/src/core/slots.ts +5 -4
  81. package/src/drill/clean.ts +25 -1
  82. package/src/drill/run.ts +1 -1
  83. package/src/drill/seal.ts +27 -4
  84. package/src/home/activity-shape.ts +2 -0
  85. package/src/home/activity.ts +66 -3
  86. package/src/home/app-sign.ts +15 -4
  87. package/src/home/daemon-jobs.ts +149 -7
  88. package/src/home/database-projects.ts +111 -0
  89. package/src/home/database-words.ts +203 -0
  90. package/src/home/databases.ts +460 -0
  91. package/src/home/global-units.ts +6 -0
  92. package/src/home/gui-app/ShipkitGui.swift +122 -1
  93. package/src/home/gui-app.ts +6 -3
  94. package/src/home/home-move.ts +514 -0
  95. package/src/home/home-paths.ts +12 -3
  96. package/src/home/home-routes.ts +68 -0
  97. package/src/home/inbox-shape.ts +24 -14
  98. package/src/home/machine-fold.ts +820 -0
  99. package/src/home/machine-host.ts +20 -5
  100. package/src/home/machine-repair.ts +503 -0
  101. package/src/home/machine-stores.ts +66 -15
  102. package/src/home/machine-temp.ts +547 -86
  103. package/src/home/resume.ts +79 -0
  104. package/src/home/run-daemon.ts +25 -4
  105. package/src/home/run-pm.ts +18 -5
  106. package/src/home/serve-daemon.ts +18 -3
  107. package/src/home/serve-web.ts +175 -7
  108. package/src/home/space-job.ts +115 -0
  109. package/src/home/space-page.ts +257 -0
  110. package/src/home/space-route.ts +167 -0
  111. package/src/home/space-words.ts +103 -0
  112. package/src/home/time-page-shape.ts +202 -0
  113. package/src/home/time-page.ts +64 -0
  114. package/src/home/vault-page.ts +482 -0
  115. package/src/home/vault-words.ts +132 -0
  116. package/src/hooks/leak-guard.ts +40 -13
  117. package/src/hooks/one-way-in-guard.ts +17 -4
  118. package/src/hq/cards.ts +581 -0
  119. package/src/hq/door-route.ts +43 -0
  120. package/src/hq/door.ts +163 -0
  121. package/src/hq/files-send.ts +348 -0
  122. package/src/hq/forgotten-log.ts +35 -0
  123. package/src/hq/history-check.ts +255 -0
  124. package/src/hq/history-place.ts +146 -0
  125. package/src/hq/history-send.ts +487 -0
  126. package/src/hq/hq-db.ts +99 -0
  127. package/src/hq/hq-local.ts +469 -0
  128. package/src/hq/hq-routes.ts +196 -0
  129. package/src/hq/hq-store.ts +599 -0
  130. package/src/hq/kinds/ask.ts +147 -0
  131. package/src/hq/kinds/card-gone.ts +83 -0
  132. package/src/hq/kinds/card-msg.ts +66 -0
  133. package/src/hq/kinds/card.ts +99 -0
  134. package/src/hq/kinds/index.ts +21 -0
  135. package/src/hq/kinds/kind.ts +126 -0
  136. package/src/hq/kinds/media.ts +125 -0
  137. package/src/hq/kinds/prompt.ts +219 -0
  138. package/src/hq/kinds/reflection.ts +128 -0
  139. package/src/hq/kinds/report.ts +55 -0
  140. package/src/hq/kinds/time-day.ts +236 -0
  141. package/src/hq/ledger.ts +473 -0
  142. package/src/hq/machine-key.ts +44 -0
  143. package/src/hq/machine-notes.ts +131 -0
  144. package/src/hq/outbox.ts +372 -0
  145. package/src/hq/replica.ts +168 -0
  146. package/src/hq/repo-id.ts +4 -0
  147. package/src/hq/report-facts.ts +117 -0
  148. package/src/hq/report.ts +274 -0
  149. package/src/hq/switch.ts +151 -0
  150. package/src/hq/vault-grant.ts +92 -0
  151. package/src/identities/identities.ts +15 -3
  152. package/src/identities/steps.ts +31 -0
  153. package/src/ledger/db.ts +73 -26
  154. package/src/ledger/gate-checks.ts +6 -2
  155. package/src/ledger/run-log.ts +11 -3
  156. package/src/ledger/store.ts +26 -4
  157. package/src/media-store/backup/daemon.ts +25 -17
  158. package/src/media-store/backup/kept.ts +241 -0
  159. package/src/media-store/backup/restore.ts +14 -4
  160. package/src/media-store/backup/run.ts +11 -11
  161. package/src/media-store/backup/secret.ts +6 -4
  162. package/src/media-store/backup/snapshot.ts +4 -2
  163. package/src/media-store/backup/sources.ts +67 -16
  164. package/src/media-store/copy/config.ts +77 -0
  165. package/src/media-store/copy/copy.ts +194 -0
  166. package/src/media-store/copy/lifecycle.ts +43 -0
  167. package/src/media-store/copy/night.ts +90 -0
  168. package/src/media-store/copy/proof.ts +151 -0
  169. package/src/media-store/copy/snapshot.ts +152 -0
  170. package/src/media-store/copy/store.ts +62 -0
  171. package/src/media-store/copy/stream.ts +176 -0
  172. package/src/media-store/daemon.ts +66 -16
  173. package/src/media-store/db.ts +22 -11
  174. package/src/media-store/forget.ts +23 -3
  175. package/src/media-store/hand.ts +4 -3
  176. package/src/media-store/hq-find.ts +75 -0
  177. package/src/media-store/hq-send.ts +277 -0
  178. package/src/media-store/kind.ts +2 -0
  179. package/src/media-store/purge.ts +18 -15
  180. package/src/media-store/put.ts +24 -8
  181. package/src/media-store/remote.ts +16 -7
  182. package/src/media-store/space-listing.ts +240 -0
  183. package/src/media-store/space.ts +40 -21
  184. package/src/media-store/sync.ts +5 -5
  185. package/src/media-store/tidy.ts +98 -0
  186. package/src/media-store/upload.ts +3 -3
  187. package/src/media-store/webp.ts +66 -0
  188. package/src/messages/model.ts +16 -7
  189. package/src/messages/routes.ts +14 -4
  190. package/src/messages/score.ts +2 -2
  191. package/src/messages/suggest.ts +96 -0
  192. package/src/pages/frame-client.ts +10 -0
  193. package/src/plan/planner.ts +28 -17
  194. package/src/recordings/media-kind.ts +1 -0
  195. package/src/recordings/model.ts +1 -1
  196. package/src/recordings/recorder-app/Capture.swift +9 -7
  197. package/src/reflect/hq-corpus.ts +56 -0
  198. package/src/reflect/prompt-corpus.ts +3 -1
  199. package/src/reflect/transcript.ts +129 -37
  200. package/src/release/machine-words.ts +67 -0
  201. package/src/release/public-clean.ts +8 -3
  202. package/src/releases/from-card.ts +1 -1
  203. package/src/releases/routes.ts +10 -5
  204. package/src/releases/store.ts +10 -1
  205. package/src/repo-config.ts +32 -2
  206. package/src/review/anim.ts +2 -2
  207. package/src/review/auto.ts +2 -2
  208. package/src/review/card-db.ts +244 -0
  209. package/src/review/card-rows.ts +266 -0
  210. package/src/review/cells.ts +76 -5
  211. package/src/review/draft-card.ts +41 -0
  212. package/src/review/draft-model.ts +78 -0
  213. package/src/review/format.ts +29 -10
  214. package/src/review/gone.ts +98 -0
  215. package/src/review/inbox-hook.ts +4 -4
  216. package/src/review/marks.ts +1 -1
  217. package/src/review/media-kind.ts +7 -5
  218. package/src/review/media-read.ts +9 -7
  219. package/src/review/media.ts +32 -5
  220. package/src/review/model.ts +202 -39
  221. package/src/review/move.ts +491 -0
  222. package/src/review/notes.ts +12 -20
  223. package/src/review/previews.ts +15 -19
  224. package/src/review/project.ts +1 -1
  225. package/src/review/rev.ts +8 -0
  226. package/src/review/role.ts +1 -1
  227. package/src/review/routes.ts +64 -13
  228. package/src/review/stage-card.ts +8 -4
  229. package/src/review/stage-routes.ts +1 -1
  230. package/src/review/store.ts +529 -83
  231. package/src/review/thread-fold.ts +51 -0
  232. package/src/review/threads.ts +147 -9
  233. package/src/review/trailer-auto-mock.ts +63 -0
  234. package/src/review/trailer-card.ts +4 -4
  235. package/src/review/trailer-desk.ts +41 -7
  236. package/src/review/trailer-media.ts +1 -0
  237. package/src/review/trailer-model.ts +8 -0
  238. package/src/review/trailer-notes.ts +1 -1
  239. package/src/review/trailer-routes.ts +9 -1
  240. package/src/review/unit.ts +6 -6
  241. package/src/review/watchers.ts +1 -1
  242. package/src/rules/untrack-generated.ts +92 -8
  243. package/src/secrets/held.ts +16 -0
  244. package/src/secrets/keychain.ts +113 -0
  245. package/src/secrets/list.ts +16 -6
  246. package/src/secrets/manager.ts +24 -10
  247. package/src/secrets/read.ts +257 -0
  248. package/src/secrets/who-reads.ts +49 -0
  249. package/src/serve/door-forward.ts +268 -0
  250. package/src/serve/door-names.ts +47 -0
  251. package/src/serve/embed.ts +1 -1
  252. package/src/serve/hub-app/activity-view.tsx +56 -32
  253. package/src/serve/hub-app/activity.css +7 -1
  254. package/src/serve/hub-app/asks-page.tsx +48 -0
  255. package/src/serve/hub-app/asks-st.ts +25 -0
  256. package/src/serve/hub-app/clock-svc.ts +1 -2
  257. package/src/serve/hub-app/col-card.tsx +64 -13
  258. package/src/serve/hub-app/col-list-page.tsx +122 -0
  259. package/src/serve/hub-app/col-list-st.ts +103 -0
  260. package/src/serve/hub-app/col-tables-view.tsx +10 -41
  261. package/src/serve/hub-app/col-tables.ts +76 -8
  262. package/src/serve/hub-app/cols-svc.ts +70 -16
  263. package/src/serve/hub-app/database-st.ts +260 -0
  264. package/src/serve/hub-app/database-view.tsx +289 -0
  265. package/src/serve/hub-app/database.css +32 -0
  266. package/src/serve/hub-app/entry-bar.css +14 -0
  267. package/src/serve/hub-app/entry-bar.tsx +33 -0
  268. package/src/serve/hub-app/entry-pick.ts +31 -0
  269. package/src/serve/hub-app/floating.tsx +1 -0
  270. package/src/serve/hub-app/hash-route.ts +11 -1
  271. package/src/serve/hub-app/header-bar.tsx +14 -18
  272. package/src/serve/hub-app/home-st.ts +89 -9
  273. package/src/serve/hub-app/home-strip.css +5 -19
  274. package/src/serve/hub-app/home-strip.tsx +58 -92
  275. package/src/serve/hub-app/home.html +7 -0
  276. package/src/serve/hub-app/hub-app.tsx +31 -142
  277. package/src/serve/hub-app/hub-types.ts +3 -1
  278. package/src/serve/hub-app/hub.css +109 -23
  279. package/src/serve/hub-app/icons.tsx +18 -1
  280. package/src/serve/hub-app/identities-st.ts +56 -6
  281. package/src/serve/hub-app/identities-view.tsx +100 -58
  282. package/src/serve/hub-app/identities.css +17 -15
  283. package/src/serve/hub-app/identity-address.ts +5 -0
  284. package/src/serve/hub-app/inbox-st.ts +41 -24
  285. package/src/serve/hub-app/inbox-view.tsx +37 -41
  286. package/src/serve/hub-app/inbox.css +2 -5
  287. package/src/serve/hub-app/index.html +7 -0
  288. package/src/serve/hub-app/kept-cols.tsx +7 -0
  289. package/src/serve/hub-app/keys.ts +28 -15
  290. package/src/serve/hub-app/later.tsx +26 -0
  291. package/src/serve/hub-app/list-filter.tsx +14 -0
  292. package/src/serve/hub-app/list-walk.ts +72 -3
  293. package/src/serve/hub-app/machines-st.ts +251 -0
  294. package/src/serve/hub-app/machines-view.tsx +224 -0
  295. package/src/serve/hub-app/machines.css +76 -0
  296. package/src/serve/hub-app/md-copy.tsx +79 -0
  297. package/src/serve/hub-app/media-view.tsx +2 -0
  298. package/src/serve/hub-app/messages/messages-page.tsx +79 -7
  299. package/src/serve/hub-app/messages/messages-st.ts +99 -3
  300. package/src/serve/hub-app/messages.css +14 -0
  301. package/src/serve/hub-app/page-keys.ts +175 -0
  302. package/src/serve/hub-app/pages-frames.tsx +11 -3
  303. package/src/serve/hub-app/palette-st.ts +58 -11
  304. package/src/serve/hub-app/palette-view.tsx +3 -1
  305. package/src/serve/hub-app/project-list.css +54 -8
  306. package/src/serve/hub-app/project-list.tsx +128 -59
  307. package/src/serve/hub-app/projects-svc.ts +78 -7
  308. package/src/serve/hub-app/reader-chips.tsx +13 -0
  309. package/src/serve/hub-app/readme-view.tsx +2 -3
  310. package/src/serve/hub-app/readme.css +27 -5
  311. package/src/serve/hub-app/reflections-page.tsx +42 -0
  312. package/src/serve/hub-app/reflections-st.ts +17 -0
  313. package/src/serve/hub-app/releases/releases-page.tsx +25 -2
  314. package/src/serve/hub-app/releases/releases-st.ts +1 -1
  315. package/src/serve/hub-app/repo-sections.ts +9 -5
  316. package/src/serve/hub-app/repo-st.ts +35 -8
  317. package/src/serve/hub-app/review/draft-card.tsx +163 -0
  318. package/src/serve/hub-app/review/kit.tsx +50 -7
  319. package/src/serve/hub-app/review/note-place.ts +1 -1
  320. package/src/serve/hub-app/review/review-board.tsx +2 -2
  321. package/src/serve/hub-app/review/review-cells.tsx +145 -65
  322. package/src/serve/hub-app/review/review-kit.ts +27 -1
  323. package/src/serve/hub-app/review/review-list.tsx +68 -30
  324. package/src/serve/hub-app/review/review-page.tsx +7 -8
  325. package/src/serve/hub-app/review/review-st.ts +111 -24
  326. package/src/serve/hub-app/review/review-thread.tsx +49 -19
  327. package/src/serve/hub-app/review/review-views.tsx +475 -144
  328. package/src/serve/hub-app/review/thread-control-st.ts +115 -0
  329. package/src/serve/hub-app/review/thread-control.tsx +74 -0
  330. package/src/serve/hub-app/review/thread-st.ts +73 -26
  331. package/src/serve/hub-app/review/trailer-card.tsx +1 -1
  332. package/src/serve/hub-app/review/trailer-page.tsx +37 -16
  333. package/src/serve/hub-app/review/trailer-st.ts +41 -7
  334. package/src/serve/hub-app/review.css +267 -61
  335. package/src/serve/hub-app/side-lists.ts +72 -0
  336. package/src/serve/hub-app/sidebar.tsx +6 -3
  337. package/src/serve/hub-app/site/site-part.tsx +2 -8
  338. package/src/serve/hub-app/site/site-st.ts +4 -4
  339. package/src/serve/hub-app/social/comms-page.tsx +20 -5
  340. package/src/serve/hub-app/social/kit.tsx +30 -4
  341. package/src/serve/hub-app/social/post-card.tsx +139 -49
  342. package/src/serve/hub-app/social/serial-writes.ts +13 -0
  343. package/src/serve/hub-app/social/social-model.ts +11 -0
  344. package/src/serve/hub-app/social/social-page.tsx +94 -35
  345. package/src/serve/hub-app/social/social-st.ts +120 -36
  346. package/src/serve/hub-app/social/stage-popup.tsx +1 -1
  347. package/src/serve/hub-app/social/stage-st.ts +1 -1
  348. package/src/serve/hub-app/social/step-layout.ts +1 -1
  349. package/src/serve/hub-app/social.css +3 -0
  350. package/src/serve/hub-app/space-st.ts +209 -0
  351. package/src/serve/hub-app/space-view.tsx +196 -0
  352. package/src/serve/hub-app/space.css +27 -0
  353. package/src/serve/hub-app/stores/stores-page.tsx +91 -23
  354. package/src/serve/hub-app/stores/stores-st.ts +44 -19
  355. package/src/serve/hub-app/stores.css +6 -1
  356. package/src/serve/hub-app/theme-st.ts +22 -9
  357. package/src/serve/hub-app/time-charts.tsx +291 -0
  358. package/src/serve/hub-app/time-pages.tsx +749 -0
  359. package/src/serve/hub-app/time-st.ts +162 -0
  360. package/src/serve/hub-app/time-view.tsx +76 -0
  361. package/src/serve/hub-app/time.css +138 -0
  362. package/src/serve/hub-app/tree-build.ts +52 -42
  363. package/src/serve/hub-app/tree-row.tsx +4 -4
  364. package/src/serve/hub-app/tree-svc.ts +18 -9
  365. package/src/serve/hub-app/urls-svc.ts +154 -0
  366. package/src/serve/hub-app/urls-view.tsx +117 -0
  367. package/src/serve/hub-app/urls.css +30 -0
  368. package/src/serve/hub-app/vault-st.ts +127 -0
  369. package/src/serve/hub-app/vault-view.tsx +154 -0
  370. package/src/serve/hub-app/vault.css +38 -0
  371. package/src/serve/hub-app/veille/veille-st.ts +12 -10
  372. package/src/serve/hub-app/waiting-svc.ts +29 -0
  373. package/src/serve/hub-app/wikis-view.tsx +2 -2
  374. package/src/serve/hub-runtime.ts +15 -2
  375. package/src/serve/project-gutter-route.ts +27 -14
  376. package/src/serve/project-gutter.ts +25 -12
  377. package/src/serve/same-origin.ts +10 -0
  378. package/src/serve/serve-hub.ts +13 -4
  379. package/src/shipkit-files.ts +16 -2
  380. package/src/shipkit.ts +1 -1
  381. package/src/shot/shooter.ts +616 -420
  382. package/src/shot/shot-ask.ts +246 -155
  383. package/src/site/desk.ts +2 -2
  384. package/src/smoke/run-smoke.ts +3 -2
  385. package/src/social/cover.ts +202 -0
  386. package/src/social/discord-layout.ts +37 -13
  387. package/src/social/drafts.ts +3 -0
  388. package/src/social/load.ts +23 -2
  389. package/src/social/media-kind.ts +2 -1
  390. package/src/social/publish/discord.ts +5 -2
  391. package/src/social/publish/secret.ts +2 -2
  392. package/src/social/release-stage.ts +28 -13
  393. package/src/social/routes.ts +26 -1
  394. package/src/social/stage.ts +1 -1
  395. package/src/social/stats.ts +12 -9
  396. package/src/social/strip.ts +4 -1
  397. package/src/social/thumbnail.ts +255 -0
  398. package/src/stores/collection.ts +15 -11
  399. package/src/stores/desk.ts +236 -42
  400. package/src/stores/model.ts +72 -6
  401. package/src/stores/routes.ts +37 -12
  402. package/src/stores/unit.ts +14 -8
  403. package/src/suite/judge-suites.ts +41 -11
  404. package/src/suite/select.ts +45 -3
  405. package/src/suite/suite-cli.ts +16 -10
  406. package/src/trailer/bed.ts +1 -1
  407. package/src/trailer/build.ts +134 -21
  408. package/src/trailer/ffmpeg.ts +7 -0
  409. package/src/trailer/fonts.ts +3 -2
  410. package/src/trailer/grammar.ts +201 -2
  411. package/src/trailer/graph.ts +42 -5
  412. package/src/trailer/look.ts +21 -0
  413. package/src/trailer/mock.ts +154 -0
  414. package/src/trailer/passage.ts +65 -26
  415. package/src/trailer/score/heard.ts +89 -0
  416. package/src/trailer/score/sound.ts +14 -8
  417. package/src/trailer/sound/run.ts +16 -6
  418. package/src/trailer/stitch.ts +26 -5
  419. package/src/trailer/titles.ts +82 -19
  420. package/src/trailer/versions.ts +1 -3
  421. package/src/trailer/vertical.ts +3 -1
  422. package/src/urls/frame.ts +195 -0
  423. package/src/urls/routes.ts +43 -0
  424. package/src/urls/rows.ts +171 -0
  425. package/src/urls/unit.ts +73 -0
  426. package/src/vault/house-keys.ts +42 -0
  427. package/src/vault/layout.ts +50 -0
  428. package/src/vault/policy.ts +165 -0
  429. package/src/vault/vault-audit.ts +276 -0
  430. package/src/vault/vault-client.ts +40 -0
  431. package/src/vault/vault-config.ts +159 -0
  432. package/src/vault/vault-destroy.ts +78 -0
  433. package/src/vault/vault-handover.ts +305 -0
  434. package/src/vault/vault-http.ts +352 -0
  435. package/src/vault/vault-import.ts +208 -0
  436. package/src/vault/vault-init.ts +328 -0
  437. package/src/vault/vault-minter.ts +271 -0
  438. package/src/vault/vault-restore.ts +333 -0
  439. package/src/vault/vault-serve.ts +342 -0
  440. package/src/vault/vault-snapshot.ts +281 -0
  441. package/src/veille/asks.ts +1 -1
  442. package/src/veille/desk.ts +2 -2
@@ -15,10 +15,11 @@ export class TimeCommand extends Command {
15
15
  category: 'Health',
16
16
  description: 'where agent time went in a repo, every account: waits, slow and failing commands, feedback',
17
17
  details: [
18
- 'Reads every Claude Code transcript under every config root (~/.claude, ~/.claude-<name>), sub-agent runs included, through an index at ~/.shipkit/agent-time.sqlite.',
18
+ 'Reads every Claude Code transcript under every config root (~/.claude, ~/.claude-<name>), sub-agent runs included, through an index, the time_ tables of the machine db (sk db).',
19
19
  'The first run builds the index (niced, resumable, progress on stderr); later runs read only what changed. The index keeps sessions Claude Code has pruned.',
20
- 'Views: summary (default), commands, tools, slow, fails, feedback, sessions, turns, hooks. A Bash command is grouped by its shape (`git commit`, `bun test <file>`, `sk ci --only lint`).',
21
- 'Hooks: each hook command with its event, the runs the harness timed (median, p90, worst, total) and the calls its matcher applies to. The harness records a hook run only when the hook printed something, so a silent hook is missing.',
20
+ 'A report is kept 5 minutes per set of repos and window, so asking again answers at once and says the time it was made; --fresh reads again, and any change of the tool drops every kept report.',
21
+ 'Views: summary (default), days, commands, tools, families, refused, limits, slow, fails, feedback, sessions, turns, hooks. A Bash command is grouped by its shape (`git commit`, `bun test <file>`, `sk ci --only lint`).',
22
+ 'Hooks: each hook command with its event, the runs the harness timed (median, p90, worst, total) and the calls its matcher applies to. The harness times every hook of a turn end (Stop). It times a hook on a tool call or a prompt only when the hook prints something, so a silent one is missing there.',
22
23
  'Turns: every call costs a model turn before it, so the summary gives the model time before each call, the share of single read calls and the share sent in parallel, for the main sessions and the sub-agents; `turns` lists the runs and the read shapes by the model time they cost.',
23
24
  'Wall time is cut once per moment, and the buckets add up to the wall: tools in flight, a sub-agent in flight, waiting on you (an idle gap past 30 minutes is left out), stopped until a task notification woke it (background wait), stopped with nothing recorded that woke it (unknown), else the agent was in its turn (model).',
24
25
  'A background command (run_in_background, or moved there at its timeout) is timed from its start to its task notification, its row marked (bg); a run with no notification is counted as having no end, never as zero.',
@@ -32,7 +33,11 @@ export class TimeCommand extends Command {
32
33
  ['what the hooks cost, 30 days', 'sk time hooks --since 30d'],
33
34
  ['two repos, every recorded session', 'sk time ~/dev/game ~/dev/site --since all'],
34
35
  ['every repo on the machine', 'sk time --all'],
36
+ ['the calls a hook, the classifier or a rule refused, and why', 'sk time refused'],
37
+ ['the wall of each day', 'sk time days --since 30d'],
38
+ ['the commands that reached their time limit', 'sk time limits'],
35
39
  ['for a script', 'sk time --json'],
40
+ ['the figures of this second, not a kept answer', 'sk time --fresh'],
36
41
  ],
37
42
  })
38
43
 
@@ -41,6 +46,7 @@ export class TimeCommand extends Command {
41
46
  since = Option.String('--since', '7d', { description: '30m, 2h, 7d, a date, or all' })
42
47
  top = Option.String('--top', '20', { description: 'rows per list in a sub view' })
43
48
  json = Option.Boolean('--json', false, { description: 'the whole report as json' })
49
+ fresh = Option.Boolean('--fresh', false, { description: 'read the index again now: an answer is kept 5 minutes' })
44
50
 
45
51
  async execute(): Promise<number> {
46
52
  const { VIEWS, render } = await import('../agent-time/render.ts')
@@ -67,7 +73,7 @@ export class TimeCommand extends Command {
67
73
  return 2
68
74
  }
69
75
 
70
- const { indexTranscripts, listTranscripts, loadWindow, markGone, openIndex, repoOfProject, agentTimeDbPath } = await import('../agent-time/store.ts')
76
+ const { indexTranscripts, listTranscripts, loadWindow, markGone, openIndex, repoOfProject, agentTimeDbPath, timeReportsDir } = await import('../agent-time/store.ts')
71
77
  const { discoverConfigRoots, projectSlug } = await import('../reflect/prompt-corpus.ts')
72
78
  const { buildReport } = await import('../agent-time/report.ts')
73
79
  const { loadMasker } = await import('../agent-time/mask.ts')
@@ -78,8 +84,27 @@ export class TimeCommand extends Command {
78
84
  const repos = repoArgs.length > 0 ? repoArgs.map((r) => resolve(r)) : [here == null ? process.cwd() : dirname(here.commonDir)]
79
85
  const slugs = repos.map(projectSlug)
80
86
  const keep = this.all ? () => true : (p: string) => slugs.some((s) => p === s || p.startsWith(`${s}--claude-worktrees-`))
87
+ // an answer made by this same code in the last minutes is the answer: the query and the sums take a second or more
88
+ const { readKept, reportKey, writeKept } = await import('../agent-time/report-cache.ts')
89
+ const cacheDir = timeReportsDir()
90
+ const key = reportKey({ all: this.all, repos, since: this.since })
91
+ const kept = this.fresh ? null : readKept(cacheDir, key, now)
92
+ if (kept != null) {
93
+ if (this.json) this.context.stdout.write(`${JSON.stringify(kept.report)}\n`)
94
+ else this.context.stdout.write(`${render(kept.report, view, top)}\nas of ${new Date(kept.at).toTimeString().slice(0, 5)}: an answer is kept 5 minutes, --fresh reads again\n`)
95
+ return 0
96
+ }
81
97
  const roots = discoverConfigRoots()
82
- const db = openIndex()
98
+ let db: ReturnType<typeof openIndex>
99
+ try {
100
+ db = openIndex()
101
+ } catch (e) {
102
+ // 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
+ const { StoreRefused, WAIT_EXIT } = await import('../core/machine-db.ts')
104
+ if (!(e instanceof StoreRefused)) throw e
105
+ this.context.stderr.write(`FAIL: ${e.message}\n`)
106
+ return e.wait ? WAIT_EXIT : 1
107
+ }
83
108
  try {
84
109
  const files = listTranscripts(roots, keep)
85
110
  const pending = files.length
@@ -115,6 +140,7 @@ export class TimeCommand extends Command {
115
140
  // the matcher each hook declares today: the calls it applies to
116
141
  const hookMatchers = new Map([...userHooks(), ...repos.flatMap((r) => repoHooks(r).hooks)].map((h) => [hookMatcherKey(h.event, h.command), h.matcher]))
117
142
  const report = buildReport(loaded, { repos: labels, from, to: now, repoOf: (p) => repoOfProject(p), hookMatchers }, loadMasker(repos[0] ?? null))
143
+ writeKept(cacheDir, key, report, now)
118
144
  if (this.json) this.context.stdout.write(`${JSON.stringify(report)}\n`)
119
145
  else this.context.stdout.write(render(report, view, top))
120
146
  if (!tty) err.write(indexed)
@@ -124,3 +150,48 @@ export class TimeCommand extends Command {
124
150
  }
125
151
  }
126
152
  }
153
+
154
+ export class TimeDietCommand extends Command {
155
+ static override paths = [['time', 'diet']]
156
+
157
+ static override usage = Command.Usage({
158
+ category: 'Health',
159
+ description: "the agent time index's diet on this machine: on, off, or where it stands with what it would drop",
160
+ details: "Its switch `time-diet` (off by default, never set from afar). On, the agent time job drops the command text of an ordinary call older than 7 days, in steps, and keeps every text `sk time` shows (a failed, refused, slow, open or script call). A dropped text never comes back: Claude Code prunes the transcripts.",
161
+ examples: [['what it would drop', 'sk time diet'], ['turn it on', 'sk time diet on']],
162
+ })
163
+
164
+ state = Option.String({ required: false })
165
+
166
+ async execute(): Promise<number> {
167
+ const out = (l: string): void => void this.context.stdout.write(`${l}\n`)
168
+ const v = this.state
169
+ if (v !== undefined && v !== 'on' && v !== 'off') {
170
+ this.context.stderr.write(`FAIL: on or off, not ${v}\n`)
171
+ return 1
172
+ }
173
+ const { dietCalls, dietOn, setDietOn } = await import('../agent-time/diet.ts')
174
+ if (v !== undefined) {
175
+ if (!setDietOn(v === 'on')) {
176
+ this.context.stderr.write('FAIL: the machine db does not open: the switch is not set\n')
177
+ return 1
178
+ }
179
+ out(v === 'on' ? 'ok: the switch time-diet is on: the next agent time job drops the old texts, in steps' : 'ok: the switch time-diet is off: no text is dropped')
180
+ return 0
181
+ }
182
+ out(`the switch time-diet is ${dietOn() ? 'on' : 'off'}`)
183
+ const { openIndex } = await import('../agent-time/store.ts')
184
+ try {
185
+ const db = openIndex()
186
+ try {
187
+ const d = dietCalls(db, { now: Date.now(), dry: true })
188
+ out(`older than 7 days and ordinary: ${d.calls} calls, ${(d.bytes / 1e6).toFixed(1)} MB of text${dietOn() ? '' : ' (sk time diet on drops them)'}`)
189
+ } finally {
190
+ db.close()
191
+ }
192
+ } catch (e) {
193
+ out(`the agent time index does not open: ${(e as Error).message}`)
194
+ }
195
+ return 0
196
+ }
197
+ }
@@ -2,7 +2,7 @@
2
2
  // now, and the daemon's switch. Every module loads inside execute: the cli registers this file on every `sk` call
3
3
  import { Command, Option } from 'clipanion'
4
4
 
5
- const DETAILS = `agents and test runs write into three temp roots nothing else trims: claude code's session scratch (/tmp/claude-<uid>/<project>/<session>/), the user's temp dir and /tmp. One pass deletes each unit nothing wrote for 24 h that no live process holds open, has as its working folder or names on its command line or in its environment, and that holds no git work a remote lacks; while the disk is under 40 GB free, units idle 6 h go too, the largest first, until it is back over. A unit is a child of a root, and inside a claude session each piece of its scratchpad, so a session that runs for days loses its old pieces too. Nothing is deleted before the owner turns the switch on (--auto on); then the daemon runs the pass hourly, one process at a time on the machine. What a pass measured is kept, so this command answers at once, where a du over a temp root walks every file again. Page: wiki tools/shipkit/machine-temp.md`
5
+ const DETAILS = `agents and test runs write into temp roots nothing else trims: claude code's session scratch (/tmp/claude-<uid>/<project>/<session>/), the user's temp dir, /tmp, and each house repo's .shipkit/tmp. One pass deletes each unit nothing wrote for 24 h that no live process holds open, has as its working folder or names on its command line or in its environment, and that holds no git work a remote lacks; while the disk is under 40 GB free, units idle 6 h go too, the largest first, until it is back over. A unit is a child of a root, and inside a claude session each piece of its scratchpad, so a session that runs for days loses its old pieces too. In a repo's .shipkit/tmp a link, the gate's and the jobs' own folders, a folder the repo's annex config declares, an annex record's folder and a file the media store indexes are never taken, the day holds whatever the free space, and a unit of 100 MB or more moves to the annex when one has room (a link left in its place, sk annex back undoes it); the repo roots only count what would go until their start date (--repos-from). Nothing is deleted before the owner turns the switch on (--auto on); then the daemon runs the pass hourly, one process at a time on the machine. What a pass measured is kept, so this command answers at once, where a du over a temp root walks every file again. Page: wiki tools/shipkit/machine-temp.md`
6
6
 
7
7
  type Ctx = { stdout: NodeJS.WritableStream; stderr: NodeJS.WritableStream }
8
8
  const io = (c: Ctx): { out: (l: string) => void; err: (l: string) => void } => ({ out: (l) => void c.stdout.write(`${l}\n`), err: (l) => void c.stderr.write(`${l}\n`) })
@@ -16,10 +16,12 @@ export class TmpCommand extends Command {
16
16
  examples: [
17
17
  ['where the temp folders stand', 'sk tmp'],
18
18
  ['the daemon sweeps them hourly from now on', 'sk tmp --auto on'],
19
+ ['the repos\' .shipkit/tmp are deleted from this day, only counted before', 'sk tmp --repos-from 2026-11-25'],
19
20
  ],
20
21
  })
21
22
  auto = Option.String('--auto', { description: 'on: the daemon\'s hourly retention sweep and sk tmp sweep delete idle temp units; off: nothing deletes (off until the owner turns it on)' })
22
23
  top = Option.String('--top', '12', { description: 'how many of the largest kept units to name' })
24
+ reposFrom = Option.String('--repos-from', { description: 'YYYY-MM-DD, 3 days ahead at least: the day the repos\' .shipkit/tmp start to be swept' })
23
25
 
24
26
  async execute(): Promise<number> {
25
27
  const { out, err } = io(this.context)
@@ -28,18 +30,31 @@ export class TmpCommand extends Command {
28
30
  if (this.auto !== 'on' && this.auto !== 'off') { err(`FAIL: --auto takes on or off, not ${this.auto}`); return 1 }
29
31
  if (!t.setTempAuto(this.auto === 'on')) { err('FAIL: the machine db does not open: the switch is not set'); return 1 }
30
32
  }
33
+ if (this.reposFrom !== undefined) {
34
+ const why = t.setReposFrom(this.reposFrom === 'off' ? null : this.reposFrom)
35
+ if (why != null) { err(`FAIL: --repos-from: ${why}`); return 1 }
36
+ }
31
37
  const { statfsSync } = await import('node:fs')
32
38
  const { tmpdir } = await import('node:os')
33
39
  const s = statfsSync(tmpdir())
34
40
  const free = s.bavail * s.bsize
35
41
  const hours = (ms: number): number => ms / 3_600_000
36
- out(`disk ${t.gb(free)} free${free < t.TEMP_FLOOR_BYTES ? ` (under the ${t.TEMP_FLOOR_BYTES / 1e9} GB floor: units idle ${hours(t.TEMP_GUARD_LOW_MS)} h go too, the largest first, until it is back over)` : ` (a unit idle ${hours(t.TEMP_GUARD_MS)} h goes)`}`)
42
+ out(`disk ${t.gb(free)} free${free < t.TEMP_FLOOR_BYTES ? ` (under the ${t.TEMP_FLOOR_BYTES / 1e9} GB floor: units of the temp folders idle ${hours(t.TEMP_GUARD_LOW_MS)} h go too, the largest first, until it is back over; a repo's .shipkit/tmp keeps its ${hours(t.TEMP_GUARD_MS)} h)` : ` (a unit idle ${hours(t.TEMP_GUARD_MS)} h goes)`}`)
37
43
  out(`the daemon's temp sweep ${t.tempAuto() ? 'on, hourly' : 'off (sk tmp --auto on turns it on)'}`)
44
+ const from = t.reposFrom()
45
+ out(`the repos' .shipkit/tmp ${t.reposDelete(Date.now()) ? `deleted since ${t.dayOf(from!)}` : `only counted, nothing deleted: start date ${t.fromWords(from)}`}`)
38
46
  const use = t.tempUse()
39
47
  if (use == null) { out(t.tempAuto() ? 'not measured yet: the daemon\'s next hourly sweep measures' : 'not measured yet: a pass measures once the switch is on'); return 0 }
40
48
  const mins = Math.round((Date.now() - use.at) / 60_000)
41
49
  out(`last pass ${new Date(use.at).toISOString().slice(0, 16)}Z, ${mins} min ago, took ${(use.tookMs / 1000).toFixed(1)} s`)
42
- for (const p of use.passes) out(`${p.id} ${p.root} kept ${t.gb(p.keptBytes)} in ${p.kept} units freed ${t.gb(p.freed)} in ${p.dropped}${p.failed > 0 ? ` ${p.failed} not deleted` : ''}`)
50
+ for (const p of use.passes) {
51
+ if (p.notice === true) {
52
+ out(`${p.id} ${p.root} kept ${t.gb(p.keptBytes)} in ${p.kept} units would go ${t.fromWords(from)}: ${t.gb(p.freed)} in ${p.dropped}`)
53
+ for (const u of (p.going ?? []).slice(0, 3)) out(` would go ${t.gb(u.bytes)} ${u.path}`)
54
+ } else out(`${p.id} ${p.root} kept ${t.gb(p.keptBytes)} in ${p.kept} units freed ${t.gb(p.freed)} in ${p.dropped}${p.moved ? ` (${p.moved} moved to the annex, ${t.gb(p.movedBytes ?? 0)})` : ''}${p.failed > 0 ? ` ${p.failed} not deleted` : ''}`)
55
+ if (p.live) out(` stays for a database or a lock: ${p.live.units} units, ${t.gb(p.live.bytes)}, the oldest idle ${Math.floor((Date.now() - p.live.oldest) / 86_400_000)} d`)
56
+ for (const u of p.waiting ?? []) out(` waits for the annex ${t.gb(u.bytes)} ${u.path} (deleted from ${t.dayOf(u.at + t.BIG_WAIT_MS)} unless an annex takes it)`)
57
+ }
43
58
  const top = use.passes.flatMap((p) => p.top).sort((a, b) => b.bytes - a.bytes).slice(0, Math.max(0, Number(this.top) || 0))
44
59
  if (top.length > 0) out('the largest kept:')
45
60
  for (const u of top) out(` ${u.floor === true ? 'at least ' : ''}${t.gb(u.bytes)} ${u.why} ${u.path}`)
@@ -58,20 +73,29 @@ export class TmpSweepCommand extends Command {
58
73
  ['what a pass would delete, nothing deleted', 'sk tmp sweep --dry'],
59
74
  ['a pass now', 'sk tmp sweep'],
60
75
  ['one pass the owner asked for, the switch still off', 'sk tmp sweep --once'],
76
+ ['every unit the house repos\' .shipkit/tmp would lose, by name, nothing deleted', 'sk tmp sweep --dry --repos --list'],
61
77
  ],
62
78
  })
63
79
  dry = Option.Boolean('--dry', false, { description: 'name each unit the pass would delete (idle age, size) and the totals, delete nothing' })
64
80
  once = Option.Boolean('--once', false, { description: 'one pass by hand though the switch is off: only when the owner asked for this run' })
81
+ repos = Option.Boolean('--repos', false, { description: 'the house repos\' .shipkit/tmp only, not the machine\'s temp folders: seconds, not minutes' })
82
+ list = Option.Boolean('--list', false, { description: 'with --dry, name every unit: what would go and what stays, with why' })
65
83
 
66
84
  async execute(): Promise<number> {
67
85
  const { out, err } = io(this.context)
68
86
  const { sweepTemp, tempAuto } = await import('../home/machine-temp.ts')
87
+ const { houseRoot } = await import('../home/home-start.ts')
88
+ const { houseRepos } = await import('../serve/project-gutter.ts')
89
+ const { homedir } = await import('node:os')
69
90
  if (!this.dry && !this.once && !tempAuto()) {
70
91
  err('FAIL: the owner\'s switch is off, so nothing is deleted: `sk tmp --auto on` is the owner\'s to turn on, `sk tmp sweep --dry` names what a pass would delete, and `--once` runs one pass when the owner asked for it')
71
92
  return 1
72
93
  }
73
94
  try {
74
- return sweepTemp({ dry: this.dry, print: out, printErr: err }) == null ? 1 : 0
95
+ const house = houseRoot(process.cwd())
96
+ const repos = house == null ? [] : houseRepos(house, homedir()).repos.map((r) => r.path)
97
+ if (house == null) err('WARN: no house found from here: the repos\' .shipkit/tmp are not swept')
98
+ return (await sweepTemp({ dry: this.dry, repos, ...(this.repos ? { roots: [] } : {}), list: this.list, print: out, printErr: err })) == null ? 1 : 0
75
99
  } catch (e) {
76
100
  err(`FAIL: tmp sweep: ${e instanceof Error ? e.message : String(e)}`)
77
101
  return 1
@@ -37,6 +37,7 @@ export class TrailerCommand extends Command {
37
37
  ['encoded by x264 for a release', 'sk trailer --final'],
38
38
  ['the music variant b on the same picture', 'sk trailer --variant b'],
39
39
  ['a quick draft to judge the beats', 'sk trailer --draft'],
40
+ ['the cut before its shots exist, to judge the story and the words', 'sk trailer --mock'],
40
41
  ['where the build spends its time', 'sk trailer --profile'],
41
42
  ],
42
43
  })
@@ -47,6 +48,7 @@ export class TrailerCommand extends Command {
47
48
  variant = Option.String('--variant', { description: 'a music variant the cut names (music … variant <name>): out/<name>-<variant>.mp4' })
48
49
  draft = Option.Boolean('--draft', false, { description: 'a quick draft at half the size: out/<name>-draft.mp4, the cut\'s takes read as they are, a missing one filmed small, no strip' })
49
50
  strip = Option.Boolean('--strip', false, { description: 'with --draft: its strip too' })
51
+ mock = Option.Boolean('--mock', false, { description: 'the whole cut before its shots exist: a take it has is read, a missing one is a drawn placeholder (the shot, its film row, its voice lines), nothing is filmed and no sound is made; a cut with no thumbnail word yet builds, warned, where every other build refuses it' })
50
52
  profile = Option.Boolean('--profile', false, { description: 'print every phase of the build with its start, seconds and share' })
51
53
 
52
54
  async execute(): Promise<number> {
@@ -54,11 +56,11 @@ export class TrailerCommand extends Command {
54
56
  const { span, timed, profileLines } = await import('../trailer/profile.ts')
55
57
  span('start: bun, sk, the cli', 0, performance.now())
56
58
  const b = await timed('load: build modules', () => import('../trailer/build.ts'))
57
- const l = await timed('load: parse and check', () => b.load(b.trailerFile(this.file, root, cwd), root, this.variant !== undefined ? { variant: this.variant } : {}))
59
+ const l = await timed('load: parse and check', () => b.load(b.trailerFile(this.file, root, cwd), root, { ...(this.variant !== undefined ? { variant: this.variant } : {}), ...(this.mock ? { missing: 'warn' as const } : {}) }))
58
60
  if (!b.sayErrors(l, say, cwd)) return 1
59
61
  try {
60
62
  const draft = this.draft ? { draft: (await import('../trailer/draft.ts')).DRAFT, strip: this.strip } : {}
61
- await b.build(l, { refilm: refilmOf(this.refilm), final: this.final, say, cwd, ...draft })
63
+ await b.build(l, { refilm: refilmOf(this.refilm), final: this.final, say, cwd, ...draft, ...(this.mock ? { mock: true } : {}) })
62
64
  } finally {
63
65
  if (this.profile) for (const line of profileLines()) say(line)
64
66
  }
@@ -147,7 +149,7 @@ export class TrailerPlanCommand extends Command {
147
149
  const known = new Set([...l.t.shots, ...l.t.footage].map((s) => s.name))
148
150
  const unknown = shots.filter((s) => !known.has(s))
149
151
  if (unknown.length > 0) throw new b.Refused(`${basename(file)} has no shot ${unknown.join(', ')}; its shots: ${[...known].join(', ')}`)
150
- if (this.waiting !== undefined && !ID_RE.test(this.waiting)) throw new b.Refused(`--waiting takes a review card's id (YYYYMMDD-HHMMSS-slug, as sk review add prints it), got ${this.waiting}`)
152
+ if (this.waiting !== undefined && !ID_RE.test(this.waiting)) throw new b.Refused(`--waiting takes a review card's id (YYYYMMDD-HHMMSS-slug, as sk thread add prints it), got ${this.waiting}`)
151
153
  const by = this.by ?? process.env.SK_AGENT
152
154
  if (marks[0] !== 'clear' && !by) throw new b.Refused('--by <lane>: the owner reads who plans each shot (or set SK_AGENT)')
153
155
  const { trailer, cut } = cutIdOf(file)
@@ -181,7 +183,7 @@ export class TrailerScoreCommand extends Command {
181
183
  async execute(): Promise<number> {
182
184
  return run(this.context, async (say, root, cwd) => {
183
185
  const b = await import('../trailer/build.ts')
184
- const l = await b.load(b.trailerFile(this.file, root, cwd), root)
186
+ const l = await b.load(b.trailerFile(this.file, root, cwd), root, { missing: 'skip' })
185
187
  if (!b.sayErrors(l, say, cwd)) return 1
186
188
  await b.auditionScore(l, { refilm: null, final: false, say, cwd })
187
189
  return 0
@@ -209,7 +211,7 @@ export class TrailerShotCommand extends Command {
209
211
  async execute(): Promise<number> {
210
212
  return run(this.context, async (say, root, cwd) => {
211
213
  const b = await import('../trailer/build.ts')
212
- const l = await b.load(b.trailerFile(this.file, root, cwd), root)
214
+ const l = await b.load(b.trailerFile(this.file, root, cwd), root, { missing: 'warn' })
213
215
  if (!b.sayErrors(l, say, cwd)) return 1
214
216
  await b.previewShot(l, this.name, { refilm: refilmOf(this.refilm), final: false, say, cwd })
215
217
  return 0
@@ -217,10 +219,11 @@ export class TrailerShotCommand extends Command {
217
219
  }
218
220
  }
219
221
 
220
- /** a cut loaded and checked, its errors said; null when it has one */
221
- async function loaded(file: string | undefined, say: (l: string) => void, root: string, cwd: string) {
222
+ /** a cut loaded and checked, its errors said; null when it has one. `preview`: it never ships, so a cut with no start
223
+ * or end image yet previews, warned, and its frames can make them */
224
+ async function loaded(file: string | undefined, say: (l: string) => void, root: string, cwd: string, preview = false) {
222
225
  const b = await import('../trailer/build.ts')
223
- const l = await b.load(b.trailerFile(file, root, cwd), root)
226
+ const l = await b.load(b.trailerFile(file, root, cwd), root, preview ? { missing: 'warn' } : {})
224
227
  return b.sayErrors(l, say, cwd) ? l : null
225
228
  }
226
229
 
@@ -240,7 +243,7 @@ export class TrailerSectionCommand extends Command {
240
243
 
241
244
  async execute(): Promise<number> {
242
245
  return run(this.context, async (say, root, cwd) => {
243
- const l = await loaded(this.file, say, root, cwd)
246
+ const l = await loaded(this.file, say, root, cwd, true)
244
247
  if (!l) return 1
245
248
  await (await import('../trailer/build.ts')).previewSection(l, this.name, { refilm: null, final: this.final, say, cwd })
246
249
  return 0
@@ -331,7 +334,8 @@ export class TrailerKeepCommand extends Command {
331
334
  const { join } = await import('node:path')
332
335
  const lost = await (await import('../review/trailer-shots.ts')).shotsBack(l.root, join(l.dir, 'out', `${l.t.name}-shots`))
333
336
  if (lost.length > 0) say(`WARN ${lost.length} shots not fetched back, kept by their facts only: ${lost.join(', ')}`)
334
- ;(await import('../trailer/passage.ts')).keep(l, this.version, say, cwd)
337
+ const p = await import('../trailer/passage.ts')
338
+ await p.thumbnailKept(l, p.keep(l, this.version, say, cwd), say, cwd)
335
339
  return 0
336
340
  })
337
341
  }
@@ -0,0 +1,56 @@
1
+ // sk urls: every url of the repo you stand in, dev and prod, with the hub address that frames each one and the
2
+ // logins it carries (wiki tools/shipkit/urls.md). It never prints a value: the hub's chips copy one
3
+ import { existsSync } from 'fs'
4
+ import { basename, join } from 'path'
5
+ import { Command, Option } from 'clipanion'
6
+ import { gitRoot } from '../core/git-root.ts'
7
+ import { homeUrl, hubBase } from '../home/home-paths.ts'
8
+ import { loadRepoConfig } from '../repo-config.ts'
9
+ import { loadUrls, urlRow, type UrlRow } from '../urls/rows.ts'
10
+
11
+ /** the hub address that frames one url of a repo */
12
+ export const urlHubAddress = (repo: string, id: string): string => `${homeUrl()}${hubBase(repo)}/#page:urls:${id}`
13
+
14
+ /** one line a url: env, label, url, its logins, then where the hub frames it */
15
+ export function urlLines(repo: string, rows: UrlRow[]): string[] {
16
+ if (rows.length === 0) return [`${repo} lists no url: a global process with a url, a urls([...]) unit or smoke.base adds one`]
17
+ const pad = (k: 'label' | 'url'): number => Math.max(...rows.map((r) => r[k].length))
18
+ return rows.map((r) => {
19
+ const logins = r.logins.length === 0 ? 'no login' : r.logins.map((l) => (l.account == null ? l.label : `${l.label} (${l.account})`)).join(', ')
20
+ return `${r.env.padEnd(4)} ${r.label.padEnd(pad('label'))} ${r.url.padEnd(pad('url'))} ${logins} ${urlHubAddress(repo, r.id)}`
21
+ })
22
+ }
23
+
24
+ export class UrlsCommand extends Command {
25
+ static override paths = [['urls']]
26
+
27
+ static override usage = Command.Usage({
28
+ category: 'Serve',
29
+ description: 'every url of this repo, dev and prod, its logins and the hub address that frames it',
30
+ details: 'the lines come from what the repo declares: a global process with a url (dev), a urls([...]) unit in a <name>.shipkit.ts file, and smoke.base with smoke.login (prod). A report that sends the owner to a url he logs into gives the hub address of its line. No value is ever printed.',
31
+ examples: [
32
+ ['the urls of this repo', 'sk urls'],
33
+ ['machine readable', 'sk urls --json'],
34
+ ],
35
+ })
36
+
37
+ json = Option.Boolean('--json', false, { description: 'the rows as json, each with its hub address' })
38
+
39
+ async execute(): Promise<number> {
40
+ const root = gitRoot(process.cwd())?.top ?? process.cwd()
41
+ if (!existsSync(join(root, 'repo.config.ts'))) {
42
+ this.context.stderr.write(`FAIL ${root} is no repo with a repo.config.ts: run sk urls from inside a house repo\n`)
43
+ return 1
44
+ }
45
+ const repo = (await loadRepoConfig(root)).name ?? basename(root)
46
+ let rows: UrlRow[]
47
+ try {
48
+ rows = (await loadUrls(root)).map(urlRow)
49
+ } catch (e) {
50
+ this.context.stderr.write(`FAIL ${(e as Error).message}\n`)
51
+ return 1
52
+ }
53
+ this.context.stdout.write(this.json ? `${JSON.stringify(rows.map((r) => ({ ...r, hub: urlHubAddress(repo, r.id) })))}\n` : `${urlLines(repo, rows).join('\n')}\n`)
54
+ return 0
55
+ }
56
+ }