rvlib-shipkit 2.13.0 → 2.15.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 (270) hide show
  1. package/CHANGELOG.md +38 -13
  2. package/package.json +1 -1
  3. package/src/assets/run-assets.ts +2 -2
  4. package/src/assets/server/studio-server.ts +27 -23
  5. package/src/check.ts +3 -3
  6. package/src/checks/SK001-package-json-shape.check.ts +4 -4
  7. package/src/checks/SK002-contracts-fulfillness.check.ts +2 -2
  8. package/src/checks/SK003-claude-md-shape.check.ts +19 -12
  9. package/src/checks/SK004-gitignore-policy.check.ts +18 -4
  10. package/src/checks/SK005-rvlib-versions.check.ts +1 -1
  11. package/src/checks/SK006-npm-publish-safety.check.ts +3 -3
  12. package/src/checks/SK007-github-visibility.check.ts +2 -2
  13. package/src/checks/SK008-reviewer-agent.check.ts +1 -1
  14. package/src/checks/SK010-undeclared-unit.check.ts +2 -2
  15. package/src/checks/SK011-sibling-unit-ranges.check.ts +2 -2
  16. package/src/checks/SK012-config-barrel-import.check.ts +1 -1
  17. package/src/checks/SK013-one-way-in-policy.check.ts +2 -2
  18. package/src/checks/SK015-nested-repo.check.ts +2 -2
  19. package/src/checks/SK016-legacy-check-shapes.check.ts +2 -2
  20. package/src/checks/SK017-vscode-hub-task.check.ts +2 -2
  21. package/src/checks/SK018-test-files-run.check.ts +2 -2
  22. package/src/checks/SK019-tests-run-in-units.check.ts +2 -2
  23. package/src/checks/SK020-self-spawning-check.check.ts +2 -2
  24. package/src/checks/SK022-machine-runs-the-pin.check.ts +2 -2
  25. package/src/checks/SK024-identity-colors.check.ts +1 -1
  26. package/src/checks/SK025-release-drift.check.ts +2 -2
  27. package/src/checks/SK026-asks-autoclose.check.ts +2 -2
  28. package/src/checks/SK027-agent-wiki-links.check.ts +8 -2
  29. package/src/checks/SK028-readme.check.ts +2 -2
  30. package/src/checks/SK029-explicit-check-files.check.ts +3 -3
  31. package/src/checks/SK030-cache-audit.check.ts +7 -5
  32. package/src/checks/SK031-trace-audit.check.ts +7 -7
  33. package/src/checks/SK032-ignored-inputs.check.ts +3 -3
  34. package/src/checks/SK033-global-contribution.check.ts +11 -4
  35. package/src/checks/SK034-commit-gates-armed.check.ts +2 -2
  36. package/src/checks/SK035-public-clean.check.ts +4 -4
  37. package/src/checks/SK036-draft-media-size.check.ts +2 -2
  38. package/src/checks/SK037-keyword-additions.check.ts +43 -0
  39. package/src/cli/cmd_Backup.ts +2 -2
  40. package/src/cli/cmd_Commands.ts +4 -4
  41. package/src/cli/cmd_ConfigKeys.ts +2 -2
  42. package/src/cli/cmd_Drill.ts +30 -1
  43. package/src/cli/cmd_Home.ts +1 -1
  44. package/src/cli/cmd_Init.ts +1 -1
  45. package/src/cli/cmd_Media.ts +5 -5
  46. package/src/cli/cmd_Mv.ts +14 -7
  47. package/src/cli/cmd_Review.ts +2 -2
  48. package/src/cli/cmd_Smoke.ts +1 -1
  49. package/src/cli/cmd_Social.ts +3 -3
  50. package/src/cli/cmd_Sound.ts +1 -1
  51. package/src/cli/cmd_TraceAudit.ts +6 -6
  52. package/src/cli/cmd_Trailer.ts +2 -2
  53. package/src/cli/cmd_Veille.ts +2 -2
  54. package/src/cli/cmd_When.ts +2 -2
  55. package/src/cli/family-pages.ts +19 -19
  56. package/src/cli/registry.ts +2 -1
  57. package/src/collections/collection-types.ts +2 -2
  58. package/src/collections/review.ts +1 -1
  59. package/src/comfy/comfy-panel.ts +2 -2
  60. package/src/contracts/manifests/discord.contract.ts +1 -1
  61. package/src/contracts/manifests/identity.contract.ts +1 -1
  62. package/src/contracts/manifests/itch.contract.ts +1 -1
  63. package/src/contracts/manifests/steam.contract.ts +1 -1
  64. package/src/core/agent-dir-at.ts +12 -0
  65. package/src/core/agent-dir.ts +28 -0
  66. package/src/core/budget.ts +1 -1
  67. package/src/core/canonical-scripts.ts +2 -2
  68. package/src/core/discover-checks.ts +1 -1
  69. package/src/core/global-contribution.ts +4 -1
  70. package/src/core/ignored-block.ts +1 -1
  71. package/src/core/ignored-inputs.ts +3 -2
  72. package/src/core/layout.ts +3 -3
  73. package/src/core/loop-watch.ts +1 -1
  74. package/src/core/motherhome.ts +2 -2
  75. package/src/core/one-way-in-policy.ts +8 -8
  76. package/src/core/run-ci.ts +3 -3
  77. package/src/core/runs-matrix.ts +1 -1
  78. package/src/core/slots.ts +14 -5
  79. package/src/core/trace-audit.ts +50 -9
  80. package/src/core/tree-rev.ts +1 -1
  81. package/src/drill/clean.ts +54 -0
  82. package/src/drill/run.ts +1 -1
  83. package/src/home/daemon-jobs.ts +1 -1
  84. package/src/home/global-context.ts +11 -8
  85. package/src/home/gui-app/ShipkitGui.swift +91 -2
  86. package/src/home/inbox-shape.ts +1 -1
  87. package/src/home/inbox.ts +1 -1
  88. package/src/home/pm-config.ts +4 -1
  89. package/src/home/pm-inputs.ts +2 -0
  90. package/src/home/resources.ts +7 -2
  91. package/src/home/run-pm.ts +1 -1
  92. package/src/home/serve-web.ts +2 -2
  93. package/src/hooks/commit-message.ts +1 -1
  94. package/src/hooks/hook-gates.ts +1 -1
  95. package/src/hooks/leak-guard.ts +61 -8
  96. package/src/hooks/run-hooks.ts +18 -18
  97. package/src/identities/identities.ts +1 -1
  98. package/src/identities/machine-route.ts +1 -1
  99. package/src/identities/machine.ts +1 -1
  100. package/src/init-repo.ts +2 -2
  101. package/src/ledger/gate-checks.ts +1 -1
  102. package/src/ledger/record-kept.ts +1 -1
  103. package/src/media-kinds.ts +1 -1
  104. package/src/media-store/backup/daemon.ts +1 -1
  105. package/src/media-store/backup/keys.ts +1 -1
  106. package/src/media-store/backup/manifest.ts +1 -1
  107. package/src/media-store/backup/restore.ts +1 -1
  108. package/src/media-store/backup/run.ts +1 -1
  109. package/src/media-store/backup/secret.ts +1 -1
  110. package/src/media-store/backup/snapshot.ts +1 -1
  111. package/src/media-store/backup/sources.ts +1 -1
  112. package/src/media-store/content.ts +1 -1
  113. package/src/media-store/daemon.ts +1 -1
  114. package/src/media-store/db.ts +1 -1
  115. package/src/media-store/fact.ts +1 -1
  116. package/src/media-store/hand.ts +1 -1
  117. package/src/media-store/kind.ts +1 -1
  118. package/src/media-store/purge.ts +1 -1
  119. package/src/media-store/put.ts +1 -1
  120. package/src/media-store/remote.ts +1 -1
  121. package/src/media-store/space.ts +1 -1
  122. package/src/mv/mv-md.ts +63 -22
  123. package/src/pages/forward.ts +1 -1
  124. package/src/pages/frame-client.ts +1 -1
  125. package/src/pages/routes.ts +1 -1
  126. package/src/pages/unit.ts +1 -1
  127. package/src/plan/planner.ts +1 -1
  128. package/src/plan/repo-source.ts +1 -1
  129. package/src/release/public-clean.ts +25 -7
  130. package/src/release/run-bump.ts +1 -1
  131. package/src/release/run-release.ts +3 -3
  132. package/src/repo-config.ts +23 -16
  133. package/src/review/anim.ts +1 -1
  134. package/src/review/auto.ts +1 -1
  135. package/src/review/cells.ts +15 -1
  136. package/src/review/format.ts +2 -2
  137. package/src/review/marks.ts +1 -1
  138. package/src/review/media-kind.ts +1 -1
  139. package/src/review/media-read.ts +1 -1
  140. package/src/review/model.ts +14 -4
  141. package/src/review/notes.ts +52 -4
  142. package/src/review/previews.ts +1 -1
  143. package/src/review/project.ts +1 -1
  144. package/src/review/role.ts +1 -1
  145. package/src/review/routes.ts +14 -2
  146. package/src/review/store.ts +2 -2
  147. package/src/review/threads.ts +1 -1
  148. package/src/review/trailer-desk.ts +3 -3
  149. package/src/review/trailer-media.ts +1 -1
  150. package/src/review/trailer-model.ts +1 -1
  151. package/src/review/trailer-routes.ts +1 -1
  152. package/src/review/trailer-shots.ts +1 -1
  153. package/src/review/unit.ts +1 -1
  154. package/src/scaffold/files/tsconfig.json +1 -1
  155. package/src/scaffold/project-scaffold.ts +1 -1
  156. package/src/serve/embed.ts +1 -1
  157. package/src/serve/hub-app/check-words.ts +1 -1
  158. package/src/serve/hub-app/frames-st.ts +1 -1
  159. package/src/serve/hub-app/hash-route.ts +1 -1
  160. package/src/serve/hub-app/home-st.ts +1 -1
  161. package/src/serve/hub-app/home-strip.css +1 -1
  162. package/src/serve/hub-app/hub-app.tsx +2 -2
  163. package/src/serve/hub-app/identities-st.ts +1 -1
  164. package/src/serve/hub-app/identities-view.tsx +5 -4
  165. package/src/serve/hub-app/identity-address.ts +1 -1
  166. package/src/serve/hub-app/inbox-st.ts +1 -1
  167. package/src/serve/hub-app/inbox-view.tsx +1 -1
  168. package/src/serve/hub-app/kept-cols.tsx +30 -0
  169. package/src/serve/hub-app/keys.ts +1 -1
  170. package/src/serve/hub-app/media-svc.ts +1 -1
  171. package/src/serve/hub-app/pages-frames.tsx +1 -1
  172. package/src/serve/hub-app/pages-svc.ts +1 -1
  173. package/src/serve/hub-app/projects-svc.ts +1 -1
  174. package/src/serve/hub-app/repo-st.ts +1 -1
  175. package/src/serve/hub-app/review/review-board.tsx +1 -1
  176. package/src/serve/hub-app/review/review-cells.tsx +3 -2
  177. package/src/serve/hub-app/review/review-page.tsx +5 -4
  178. package/src/serve/hub-app/review/review-st.ts +15 -7
  179. package/src/serve/hub-app/review/review-thread.tsx +52 -5
  180. package/src/serve/hub-app/review/review-views.tsx +50 -33
  181. package/src/serve/hub-app/review/thread-st.ts +79 -27
  182. package/src/serve/hub-app/review/trailer-page.tsx +5 -4
  183. package/src/serve/hub-app/review/trailer-st.ts +1 -1
  184. package/src/serve/hub-app/review.css +9 -1
  185. package/src/serve/hub-app/site/site-part.tsx +1 -1
  186. package/src/serve/hub-app/site/site-st.ts +1 -1
  187. package/src/serve/hub-app/social/calendar.tsx +1 -1
  188. package/src/serve/hub-app/social/comms-page.tsx +29 -5
  189. package/src/serve/hub-app/social/kit.tsx +1 -1
  190. package/src/serve/hub-app/social/post-card.tsx +1 -1
  191. package/src/serve/hub-app/social/social-model.ts +1 -1
  192. package/src/serve/hub-app/social/social-page.tsx +12 -5
  193. package/src/serve/hub-app/social/social-st.ts +31 -3
  194. package/src/serve/hub-app/social.css +1 -1
  195. package/src/serve/hub-app/stores/stores-page.tsx +5 -4
  196. package/src/serve/hub-app/stores/stores-st.ts +1 -1
  197. package/src/serve/hub-app/stores.css +1 -1
  198. package/src/serve/hub-app/tree-row.tsx +1 -1
  199. package/src/serve/hub-app/veille/veille-page.tsx +5 -4
  200. package/src/serve/hub-app/veille/veille-st.ts +1 -1
  201. package/src/serve/hub-app/veille.css +1 -1
  202. package/src/serve/hub-runtime.ts +6 -2
  203. package/src/serve/project-gutter-route.ts +1 -1
  204. package/src/shot/box.ts +5 -7
  205. package/src/shot/browser-slot.ts +18 -6
  206. package/src/shot/client.ts +1 -2
  207. package/src/shot/clip-encoder.ts +16 -13
  208. package/src/shot/film-box.ts +132 -28
  209. package/src/shot/shooter.ts +21 -2
  210. package/src/shot/stepped-clip.ts +1 -1
  211. package/src/site/desk.ts +2 -2
  212. package/src/site/routes.ts +1 -1
  213. package/src/site/unit.ts +1 -1
  214. package/src/social/card-drafts.ts +24 -0
  215. package/src/social/compose.ts +2 -2
  216. package/src/social/desk-index.ts +1 -1
  217. package/src/social/desk-wire.ts +1 -1
  218. package/src/social/drafts.ts +3 -3
  219. package/src/social/load.ts +14 -1
  220. package/src/social/media-facts.ts +1 -1
  221. package/src/social/media-kind.ts +1 -1
  222. package/src/social/media-limit.ts +1 -1
  223. package/src/social/media-of.ts +1 -1
  224. package/src/social/migrate.ts +1 -1
  225. package/src/social/post-url.ts +1 -1
  226. package/src/social/presence.ts +2 -2
  227. package/src/social/public-read.ts +1 -1
  228. package/src/social/publish/bluesky.ts +1 -1
  229. package/src/social/publish/discord.ts +1 -1
  230. package/src/social/push.ts +10 -4
  231. package/src/social/richtext.ts +1 -1
  232. package/src/social/routes.ts +10 -4
  233. package/src/social/stats.ts +1 -1
  234. package/src/social/text.ts +1 -1
  235. package/src/social/tracker-route.ts +1 -1
  236. package/src/social/tracker.ts +1 -1
  237. package/src/social/unit.ts +1 -1
  238. package/src/social/writes.ts +1 -1
  239. package/src/stores/collection.ts +1 -1
  240. package/src/stores/desk.ts +1 -1
  241. package/src/stores/model.ts +1 -1
  242. package/src/stores/routes.ts +1 -1
  243. package/src/stores/unit.ts +1 -1
  244. package/src/suite/judge-suites.ts +1 -1
  245. package/src/trace/tracer.ts +12 -5
  246. package/src/trailer/adapter.ts +1 -1
  247. package/src/trailer/build.ts +6 -4
  248. package/src/trailer/holes.ts +1 -1
  249. package/src/trailer/passage.ts +1 -1
  250. package/src/trailer/prune.ts +1 -1
  251. package/src/trailer/states.ts +1 -1
  252. package/src/trailer/versions.ts +1 -1
  253. package/src/trailer/words.ts +1 -1
  254. package/src/tui/run-tui.ts +1 -1
  255. package/src/tui/tui-store.ts +1 -1
  256. package/src/veille/asks.ts +1 -1
  257. package/src/veille/auto.ts +1 -1
  258. package/src/veille/batch.ts +1 -1
  259. package/src/veille/chrome.ts +1 -1
  260. package/src/veille/collection.ts +1 -1
  261. package/src/veille/desk.ts +1 -1
  262. package/src/veille/identity.ts +1 -1
  263. package/src/veille/import.ts +1 -1
  264. package/src/veille/log.ts +1 -1
  265. package/src/veille/platforms.ts +1 -1
  266. package/src/veille/reads.ts +1 -1
  267. package/src/veille/replied.ts +1 -1
  268. package/src/veille/routes.ts +2 -2
  269. package/src/veille/watch.ts +1 -1
  270. package/src/veille/worth.ts +2 -2
@@ -1,4 +1,4 @@
1
- // a repo's own parts of the social desks (wiki build/shipkit/social.md, A project's parts), declared once in a
1
+ // a repo's own parts of the social desks (wiki tools/shipkit/social.md, A project's parts), declared once in a
2
2
  // `social({...})` unit of any `<name>.shipkit.ts`. Every unit file imports this module, so it stays light: the desk
3
3
  // finds, imports and calls the unit on the server, and the hub never bundles project code
4
4
  import { existsSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // the desks' writes (wiki build/shipkit/social.md, The desks in the hub): a heading's text, a post's URL, an account's
1
+ // the desks' writes (wiki tools/shipkit/social.md, The desks in the hub): a heading's text, a post's URL, an account's
2
2
  // profile URL, a setup step. Each lands as a commit of its own paths (`git commit -- <paths>`, so no other staged work
3
3
  // rides along), and the push goes in the background: a backup, never a wait, its failure an error line of the desk (push.ts). A path git ignores (a public repo's
4
4
  // drafts) is saved by its file alone. The post URL's message is the one presence.ts reads the moment of a post from
@@ -1,4 +1,4 @@
1
- // the store pages as tree rows (wiki build/shipkit/stores.md, The page): one row a store the repo has a venue folder
1
+ // the store pages as tree rows (wiki tools/shipkit/stores.md, The page): one row a store the repo has a venue folder
2
2
  // for, its page's state in the slot. Only the preamble and the itch front matter are read: the tree recomputes often
3
3
  import { existsSync, readFileSync } from 'node:fs'
4
4
  import { join } from 'node:path'
@@ -1,4 +1,4 @@
1
- // the stores desk on the server (wiki build/shipkit/stores.md): each store page read from its venue folder at every
1
+ // the stores desk on the server (wiki tools/shipkit/stores.md): each store page read from its venue folder at every
2
2
  // load, the repo's stores unit found and read, the seller named, the contract asked in process, his notes on every
3
3
  // thing read once. desk.ts reads; routes.ts writes
4
4
  import { closeSync, existsSync, openSync, readdirSync, readFileSync, readSync, statSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // the stores desk's pure model (wiki build/shipkit/stores.md): a store page's markdown cut into its `## ` sections, one
1
+ // the stores desk's pure model (wiki tools/shipkit/stores.md): a store page's markdown cut into its `## ` sections, one
2
2
  // section written back with every other byte kept, the value he pastes out of a section, the account's steps out of
3
3
  // its ask, the contract's lines. No fs, no fetch: desk.ts reads the files, the hub page imports this too
4
4
 
@@ -1,4 +1,4 @@
1
- // the stores desk's routes (wiki build/shipkit/stores.md, Routes): the desk read whole, a picture served, a section
1
+ // the stores desk's routes (wiki tools/shipkit/stores.md, Routes): the desk read whole, a picture served, a section
2
2
  // written back alone and committed on its own path, a family made again by the unit's command with its log streamed,
3
3
  // his note on one thing raised in the review store, a picture shown in the Finder
4
4
  import { readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // a repo's parts of the stores desk (wiki build/shipkit/stores.md, What a project adds): its extra texts and the
1
+ // a repo's parts of the stores desk (wiki tools/shipkit/stores.md, What a project adds): its extra texts and the
2
2
  // account's ask per store, the commands that make a picture family again, the review topic his notes raise on. Every
3
3
  // unit file imports this module, so it stays light: desk.ts finds and reads the unit
4
4
  import { STORE_IDS, type StoreId } from './model.ts'
@@ -1,6 +1,6 @@
1
1
  // the suite budget, as pure functions: which script is a plain `bun test`, how a
2
2
  // run splits into a parallel and a serial phase, and which suites broke the
3
- // budget. suite-cli.ts spawns, this module decides (meta/rv-conventions/test-speed.md).
3
+ // budget. suite-cli.ts spawns, this module decides (patterns/rv-conventions/test-speed.md).
4
4
  import { isAbsolute, posix } from 'path'
5
5
 
6
6
  export type SlowSuite = {
@@ -144,7 +144,10 @@ function signedCopy(bin: string, to: string): string | null {
144
144
 
145
145
  /** /usr/bin/git is a shim into Xcode's git, and both are blind. The copy
146
146
  * lives in a prefix whose other dirs link to Xcode's, so it finds its
147
- * exec-path, templates and system config exactly where the original does */
147
+ * exec-path, templates and system config exactly where the original does.
148
+ * The exec-path holds a `git` too, a link to the blind original, and
149
+ * shipkit spawns that one (core/git-bin.ts): it maps to the copy as well,
150
+ * under both the prefix's name and Xcode's */
148
151
  function gitRemap(rows: Remap[]): Remap[] {
149
152
  if (!existsSync('/usr/bin/git')) return rows
150
153
  const found = Bun.spawnSync(['/usr/bin/xcrun', '-f', 'git'], { stdout: 'pipe', stderr: 'pipe' })
@@ -159,17 +162,21 @@ function gitRemap(rows: Remap[]): Remap[] {
159
162
  for (const d of readdirSync(devUsr)) if (d !== 'bin' && !existsSync(join(prefix, 'usr', d))) symlinkSync(join(devUsr, d), join(prefix, 'usr', d))
160
163
  if (signedCopy(dev, copy) != null) return rows
161
164
  }
162
- return upsert(upsert(rows, '/usr/bin/git', copy), dev, copy)
165
+ const execGits = [join(prefix, 'usr', 'libexec', 'git-core', 'git'), join(dirname(dirname(dev)), 'libexec', 'git-core', 'git')].filter((p) => existsSync(p))
166
+ return [dev, ...execGits].reduce((rs, from) => upsert(rs, from, copy), upsert(rows, '/usr/bin/git', copy))
163
167
  }
164
168
 
165
169
  /** the remap file for this run, with every entry still describing its
166
170
  * original. Rebuilt when one went stale (a `bun install` replaced a copy) */
167
171
  export function remaps(): string {
168
- let rows = readRemaps()
172
+ const read = readRemaps()
173
+ let rows = read
174
+ // the shim's row alone is a stale copy: the developer dir's own rows went
175
+ // when its git changed (an Xcode update, another developer dir)
169
176
  const git = rows.find((r) => r.from === '/usr/bin/git')
170
- if (git == null || !fresh(git)) rows = gitRemap(rows)
177
+ if (git == null || !fresh(git) || !rows.some((r) => r.from !== git.from && r.to === git.to && fresh(r))) rows = gitRemap(rows)
171
178
  const kept = rows.filter(fresh)
172
- if (kept.length !== rows.length || !existsSync(remapFile())) writeRemaps(kept)
179
+ if (rows !== read || kept.length !== rows.length || !existsSync(remapFile())) writeRemaps(kept)
173
180
  return remapFile()
174
181
  }
175
182
 
@@ -1,4 +1,4 @@
1
- // what a repo adds to the trailer core, all optional (wiki build/trailer.md, The trailer unit). Filming is never here:
1
+ // what a repo adds to the trailer core, all optional (wiki tools/trailer/index.md, The trailer unit). Filming is never here:
2
2
  // a film line calls the project CLI's film rows (vocab.ts). A `trailer({...})` unit in any `<name>.shipkit.ts`
3
3
  // resolves the sounds that are not files, names the paths a take's world is, checks the content the language cannot
4
4
  // know, refines one film line's take, and turns on the guards that read the repo's own words. Discovered like every
@@ -53,7 +53,7 @@ export function trailerFile(arg: string | undefined, root: string, cwd: string):
53
53
  }
54
54
  const all = trailerFiles(root)
55
55
  if (all.length === 1) return all[0]!
56
- return refuse(all.length === 0 ? 'no .trailer under trailer/<trailer>/: write trailer/<name>/main.trailer (wiki build/trailer.md)' : `several cuts, name one: ${all.map((f) => relative(cwd, f)).join(', ')}`)
56
+ return refuse(all.length === 0 ? 'no .trailer under trailer/<trailer>/: write trailer/<name>/main.trailer (wiki tools/trailer/index.md)' : `several cuts, name one: ${all.map((f) => relative(cwd, f)).join(', ')}`)
57
57
  }
58
58
 
59
59
  /** a sound or a media word that names a file rather than an id */
@@ -467,10 +467,12 @@ function withCells(l: Loaded, names: Iterable<string>): Set<string> {
467
467
  return out
468
468
  }
469
469
 
470
- /** how many takes film at once: the repo's browser cap (repo.config.ts browsers.max) */
470
+ /** how many takes film at once: the repo's browser cap where it films (repo.config.ts browsers.max, or
471
+ * browsers.box.max when a Mac films on its box) */
471
472
  async function browserLanes(root: string): Promise<number> {
472
- const [{ browserCap }, { DEFAULT_BROWSERS }] = await Promise.all([import('../shot/browser-slot.ts'), import('../core/slots.ts')])
473
- return (await browserCap(root))?.cap ?? DEFAULT_BROWSERS
473
+ const [{ browserCap, filmingCap }, { DEFAULT_BROWSERS }] = await Promise.all([import('../shot/browser-slot.ts'), import('../core/slots.ts')])
474
+ const c = await browserCap(root)
475
+ return c == null ? DEFAULT_BROWSERS : filmingCap(c)
474
476
  }
475
477
 
476
478
  /** film the takes missing (and what --refilm names), as many at once as the repo's browser cap; every shot is tried,
@@ -1,4 +1,4 @@
1
- // the frames of a take where the picture dropped out (wiki build/trailer.md, A take and its world): most of the frame
1
+ // the frames of a take where the picture dropped out (wiki tools/trailer/index.md, A take and its world): most of the frame
2
2
  // one flat colour while the take's other frames are not. A take that shows it is filmed again once, then refused.
3
3
  // Turned on by the trailer unit's `holes`
4
4
  import { readFileSync, rmSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // the verbs over a built cut (wiki build/trailer.md, The verbs and Versions): each section's levels, a passage clipped
1
+ // the verbs over a built cut (wiki tools/trailer/index.md, The verbs and Versions): each section's levels, a passage clipped
2
2
  // with its sound (and the same passage of a kept version), a version kept, the take file of a shot
3
3
  import { constants, copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'
4
4
  import { basename, join, relative } from 'node:path'
@@ -1,4 +1,4 @@
1
- // the trailer's cache kept small (wiki build/trailer.md, The cache): what the cuts of every trailer folder still use
1
+ // the trailer's cache kept small (wiki tools/trailer/index.md, The cache): what the cuts of every trailer folder still use
2
2
  // stays, the rest goes. Runs after a stitch when what it reads moved, and by hand (`sk trailer prune [--dry]`). What a
3
3
  // cut uses is named by the build's own key functions; a file younger than an hour is never deleted: another build may
4
4
  // be writing or reading it
@@ -1,4 +1,4 @@
1
- // what each frame of a take holds that a cut must not land on (wiki build/trailer.md, Film lines): a film command may
1
+ // what each frame of a take holds that a cut must not land on (wiki tools/trailer/index.md, Film lines): a film command may
2
2
  // print `states <rle>`, each run of one state and its frames (`dialog*12,-*30`, `-` a plain frame, parts joined by `+`).
3
3
  // The stamp keeps it; the timeline names a shot whose edges cut into a change. Pure: no page, no file
4
4
 
@@ -1,4 +1,4 @@
1
- // the names of a cut's kept versions (wiki build/trailer.md, Versions): main.trailer keeps `v<n>`, any other cut of the
1
+ // the names of a cut's kept versions (wiki tools/trailer/index.md, Versions): main.trailer keeps `v<n>`, any other cut of the
2
2
  // folder `<stem>-v<n>`, so two cuts of one picture keep in one versions/ and never take each other's numbers
3
3
  import { basename } from 'node:path'
4
4
 
@@ -1,4 +1,4 @@
1
- // a film row's declared words (wiki build/trailer.md, A row's words): the row says which words it takes and their
1
+ // a film row's declared words (wiki tools/trailer/index.md, A row's words): the row says which words it takes and their
2
2
  // types, the core reads every word of a film line at its own line against that, refuses an unknown one with the row's
3
3
  // list, and hands the row its values made plain (argv stays the transport). Pure: times arrive as moments the grammar
4
4
  // resolves once the shots have landed
@@ -12,7 +12,7 @@ import { TuiStore } from './tui-store.ts'
12
12
 
13
13
  export async function runTui(root: string): Promise<number> {
14
14
  const c = await loadRepoConfig(root)
15
- // playbook (build/mobx-mechanics): enforceActions warns on stray mutations — the
15
+ // playbook (patterns/mobx-mechanics): enforceActions warns on stray mutations — the
16
16
  // only signal. Read-warning flags stay off: useInput handler reads are
17
17
  // legitimately untracked and would false-positive.
18
18
  configure({ enforceActions: 'always' })
@@ -1,4 +1,4 @@
1
- // TUI state — MobX per the house playbook (build/app-state-tree + build/mobx-mechanics):
1
+ // TUI state — MobX per the house playbook (patterns/app-state-tree + patterns/mobx-mechanics):
2
2
  // `makeAutoObservable` WITH exceptions (no decorators), runInAction around
3
3
  // every post-await mutation. Panels are
4
4
  // plain data providers (no mobx): they signal mutations through update(),
@@ -5,7 +5,7 @@ import { type Desk, reviewBrief } from './desk.ts'
5
5
  import { COLUMNS, type FeedRow, type Interaction, type Platform, PLATFORMS } from './platforms.ts'
6
6
 
7
7
  // the Veille's asks are items of the review store of the repo its watch list names in `asks:` (wiki
8
- // build/shipkit/veille.md, Asks): « Proposer » raises one post, « Revoir » one pass over every column, on the lane
8
+ // tools/shipkit/veille.md, Asks): « Proposer » raises one post, « Revoir » one pass over every column, on the lane
9
9
  // `interaction`, where he starts an agent by hand. Read back by their subject `social`, never by their lane, never a
10
10
  // second queue. The same review also opens by itself: the auto rule `veille-review`, shipkit's own
11
11
 
@@ -4,7 +4,7 @@ import { AUTO_ID, veilleAuto } from './asks.ts'
4
4
  import { hasVeille, identities } from './identity.ts'
5
5
  import { oursOf, veilleOf } from './service.ts'
6
6
 
7
- // the review that opens by itself (wiki build/shipkit/veille.md, A review): shipkit adds the rule `veille-review` to the
7
+ // the review that opens by itself (wiki tools/shipkit/veille.md, A review): shipkit adds the rule `veille-review` to the
8
8
  // rules of the repo a watch list names in `asks:`, beside the rules the repo's own review unit declares
9
9
 
10
10
  /** the Veille rules of the repo at `root`: one an identity whose watch list names it, the first under `veille-review` */
@@ -2,7 +2,7 @@ import { hasVeille, identityOfProfile } from './identity.ts'
2
2
  import { parseBatch } from './log.ts'
3
3
  import { takeBatch } from './service.ts'
4
4
 
5
- // the extension's one address (wiki build/shipkit/veille.md, The extension reads): the daemon's `/api/veille/batch`. Its
5
+ // the extension's one address (wiki tools/shipkit/veille.md, The extension reads): the daemon's `/api/veille/batch`. Its
6
6
  // header names the Chrome profile, the profile names the identity. Only the extension sends `x-post-tracker`: a page
7
7
  // elsewhere cannot without a preflight the daemon never answers, so this route runs before the same origin guard
8
8
 
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs'
2
2
  import { homedir } from 'node:os'
3
3
  import { join } from 'node:path'
4
4
 
5
- // an identity's pages opened in ITS Chrome profile (wiki build/shipkit/veille.md, Identities: one Chrome profile each),
5
+ // an identity's pages opened in ITS Chrome profile (wiki tools/shipkit/veille.md, Identities: one Chrome profile each),
6
6
  // the one signed in with the identity's email: one tab, or windows side by side across the top of the largest display
7
7
  // with a file shown in the Finder below them, so he drags it in. Chrome because its windows take bounds from
8
8
  // AppleScript. A file put on the clipboard the way Finder's « Copier » puts it, so a paste in a compose box attaches it
@@ -1,4 +1,4 @@
1
- // the Veille as a tree row (wiki build/shipkit/veille.md, The page): one row for the identity this repo shows the Veille
1
+ // the Veille as a tree row (wiki tools/shipkit/veille.md, The page): one row for the identity this repo shows the Veille
2
2
  // of, the posts to answer now in its slot. Only the log's index is read, which a batch keeps in memory
3
3
  import { VEILLE_COL, type Collection, type Instance } from '../collections/collection-types.ts'
4
4
  import { veilleAt } from './routes.ts'
@@ -6,7 +6,7 @@ import { type FeedRow, type Interaction, keyOf, type MediaPick, type Platform, P
6
6
  import { kept, matches, type Watch, watch } from './watch.ts'
7
7
  import { groupOf, parts, worthOf } from './worth.ts'
8
8
 
9
- // one identity's desk (wiki build/shipkit/veille.md): the log ranked, what he handled, the reply drafts and the asks for
9
+ // one identity's desk (wiki tools/shipkit/veille.md): the log ranked, what he handled, the reply drafts and the asks for
10
10
  // one. What `sk veille feed` prints and the hub's Veille page shows
11
11
  /** `all`: the « vus ou expirés » too; else only the active groups */
12
12
  type FeedQuery = { now?: number; platform?: Platform; sinceMs?: number; top?: number; all?: boolean; ours?: ReadonlySet<string>; watch?: Watch; asks?: Record<string, Interaction> }
@@ -6,7 +6,7 @@ import { homeDir } from '../home/home-paths.ts'
6
6
  import { type Identity, speakerOf } from '../identities/identities.ts'
7
7
  import { identityCache } from '../identities/machine.ts'
8
8
 
9
- // who scrolls (wiki build/shipkit/veille.md, Identities): what the Veille needs of an identity of the identity model
9
+ // who scrolls (wiki tools/shipkit/veille.md, Identities): what the Veille needs of an identity of the identity model
10
10
  // (identities/identities.ts), its Chrome profile's email, its own accounts' handles, its watch list beside its files
11
11
  // and its log in shipkit's home
12
12
 
@@ -3,7 +3,7 @@ import { join } from 'node:path'
3
3
  import { VeilleLog } from './log.ts'
4
4
  import type { Kept } from './platforms.ts'
5
5
 
6
- // an older log brought into an identity's (wiki build/shipkit/veille.md, The log): the day files merged line by line in
6
+ // an older log brought into an identity's (wiki tools/shipkit/veille.md, The log): the day files merged line by line in
7
7
  // the order they were seen, every mark kept, the target's own answer winning where both hold one. The posts are counted
8
8
  // before and after: a post of either side missing after is a failure, never a silence
9
9
 
package/src/veille/log.ts CHANGED
@@ -2,7 +2,7 @@ import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSyn
2
2
  import { join } from 'node:path'
3
3
  import { isPlatform, keyOf, type Kept, type Platform, type Read } from './platforms.ts'
4
4
 
5
- // the Veille's log (wiki build/shipkit/veille.md, The log): one identity's posts the extension read, on this machine
5
+ // the Veille's log (wiki tools/shipkit/veille.md, The log): one identity's posts the extension read, on this machine
6
6
  // only. One JSONL file a day (the day in Paris), each line a post's whole state, the last line of a post wins; capped in
7
7
  // bytes, the oldest days dropped first
8
8
 
@@ -1,4 +1,4 @@
1
- // the Veille's words the page and the server share (wiki build/shipkit/veille.md), pure: no node import, the page
1
+ // the Veille's words the page and the server share (wiki tools/shipkit/veille.md), pure: no node import, the page
2
2
  // bundles it. A reply opens prefilled where the platform has an intent, else he pastes it
3
3
 
4
4
  export const PLATFORMS = ['x', 'threads', 'bluesky', 'mastodon', 'instagram', 'tiktok', 'reddit'] as const
@@ -3,7 +3,7 @@ import { join } from 'node:path'
3
3
  import { dayOf } from './log.ts'
4
4
  import type { Platform, PlatformReads } from './platforms.ts'
5
5
 
6
- // what each platform's reader did today (wiki build/shipkit/veille.md, Every missing post is explained): the posts read, kept
6
+ // what each platform's reader did today (wiki tools/shipkit/veille.md, Every missing post is explained): the posts read, kept
7
7
  // and dropped by the watch list, each counted once a day, the last batch's page, the last dropped posts. On this machine
8
8
  // only, the identity's `reads.json`; a new day starts from zero
9
9
 
@@ -1,6 +1,6 @@
1
1
  import type { Kept, Platform, Read, Replied } from './platforms.ts'
2
2
 
3
- // his replies, detected (wiki build/shipkit/veille.md, His replies, detected): our own posts the readers saw, matched to the
3
+ // his replies, detected (wiki tools/shipkit/veille.md, His replies, detected): our own posts the readers saw, matched to the
4
4
  // post they answer by a draft's text, the page they sit under, or « Replying to @author »; and the public reads of our
5
5
  // Bluesky and Mastodon accounts. Read only: nothing here acts on a platform
6
6
 
@@ -12,7 +12,7 @@ import { veilleOfRepo, type VeilleIdentity } from './identity.ts'
12
12
  import { COLUMNS, type FeedRow, isPlatform, KEY, type MediaPick, type Platform, replyUrl, type VeilleFeed, type VeillePost } from './platforms.ts'
13
13
  import { deskStamp, oursOf, readPublicReplies, veilleOf } from './service.ts'
14
14
 
15
- // the hub's Veille routes (wiki build/shipkit/veille.md, The page), relative to a repo hub's base: the feed by
15
+ // the hub's Veille routes (wiki tools/shipkit/veille.md, The page), relative to a repo hub's base: the feed by
16
16
  // platform, a post with the media the project's drafts could lend, handled, the reply text, « Proposer », « Revoir »,
17
17
  // « Répondre », an explore page opened in the identity's Chrome profile. null: not a path of these
18
18
 
@@ -66,7 +66,7 @@ export async function veilleRoutes(root: string, req: Request, path: string): Pr
66
66
  } catch (e) {
67
67
  return bad(e, 500)
68
68
  }
69
- if (v == null) return bad(`${basename(root)} shows no Veille: it speaks as no identity with a watch list (wiki build/shipkit/veille.md)`, 404)
69
+ if (v == null) return bad(`${basename(root)} shows no Veille: it speaks as no identity with a watch list (wiki tools/shipkit/veille.md)`, 404)
70
70
  const { identity } = v
71
71
  const { desk, reads } = veilleOf(identity)
72
72
  const asksDir = storeDir(v.asks.root)
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs'
2
2
  import { homedir } from 'node:os'
3
3
  import type { Explore } from './platforms.ts'
4
4
 
5
- // the watch list (wiki build/shipkit/veille.md, What is kept): the identity's `veille.md`, the one file he edits. Its
5
+ // the watch list (wiki tools/shipkit/veille.md, What is kept): the identity's `veille.md`, the one file he edits. Its
6
6
  // tags, keywords and authors decide which posts the log keeps; its explore lines are the columns' buttons; its voice the
7
7
  // pages a reply reads; its rules the numbers of the worth; its front matter the repo whose review store takes the asks
8
8
 
@@ -1,7 +1,7 @@
1
1
  import type { Group, Parts } from './platforms.ts'
2
2
  import type { Rules } from './watch.ts'
3
3
 
4
- // worth replying (wiki build/shipkit/veille.md, Worth replying): five parts of 0 to 1 and one number of 0 to 100. Every
4
+ // worth replying (wiki tools/shipkit/veille.md, Worth replying): five parts of 0 to 1 and one number of 0 to 100. Every
5
5
  // constant is a rule of the identity's watch list
6
6
 
7
7
  export type Counts = { text: string; likes: number | null; reposts: number | null; replies: number | null; views: number | null; followers: number | null; at: number | null; first: number }
@@ -15,7 +15,7 @@ const CALL =
15
15
  /(?<![#\w])(?<!(?:my|your|our|the|to) )wish ?list(?!s\b|ed\b|\s*(?:count|goal|number|milestone|wednesday))|\bout now\b|\bdemo out\b|\bon sale\b|\bavailable now\b|\bplay the demo\b|\b(?:get|buy|grab) it now\b|\bbuy now\b/i
16
16
  const FIRST_PERSON = /\b(?:i|i'm|i've|i'd|i'll|me|my|we|we're|we've|our)\b/i
17
17
 
18
- /** an ad or a post to talk to (wiki build/shipkit/veille.md, Worth replying): 1 with no call; halfway for a dev's own work
18
+ /** an ad or a post to talk to (wiki tools/shipkit/veille.md, Worth replying): 1 with no call; halfway for a dev's own work
19
19
  * with a call, in `promoWords` words or more; `promo` for any other call */
20
20
  export function promoOf(text: string, r: Pick<Rules, 'promo' | 'promoWords'>): number {
21
21
  const t = text.replace(/[’‘]/g, "'")