rvlib-shipkit 2.29.0 → 2.30.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 (512) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/package.json +2 -1
  3. package/src/advisors/app-graph.ts +1 -1
  4. package/src/advisors/expose.ts +5 -1
  5. package/src/advisors/r2.ts +7 -9
  6. package/src/advisors/routes.ts +29 -2
  7. package/src/advisors/scan.ts +11 -0
  8. package/src/agent-time/accounts-usage.ts +8 -0
  9. package/src/agent-time/claude-sessions.ts +32 -0
  10. package/src/agent-time/hooks.ts +1 -1
  11. package/src/agent-time/live.ts +5 -2
  12. package/src/agent-time/registry.ts +186 -89
  13. package/src/agent-time/store.ts +6 -4
  14. package/src/asks/ask-doc.ts +2 -2
  15. package/src/asks/ask-store.ts +22 -7
  16. package/src/check.ts +9 -1
  17. package/src/checks/SK001-package-json-shape.check.ts +1 -0
  18. package/src/checks/SK003-claude-md-shape.check.ts +1 -0
  19. package/src/checks/SK004-gitignore-policy.check.ts +12 -6
  20. package/src/checks/SK008-reviewer-agent.check.ts +4 -7
  21. package/src/checks/SK013-one-way-in-policy.check.ts +1 -0
  22. package/src/checks/SK017-vscode-hub-task.check.ts +1 -0
  23. package/src/checks/SK024-identity-colors.check.ts +1 -1
  24. package/src/checks/SK027-agent-wiki-links.check.ts +2 -1
  25. package/src/checks/SK033-global-contribution.check.ts +1 -0
  26. package/src/checks/SK034-commit-gates-armed.check.ts +1 -0
  27. package/src/checks/SK039-vscode-watch-generated.check.ts +1 -0
  28. package/src/checks/SK049-thread-answers-hook.check.ts +9 -5
  29. package/src/checks/SK050-retired-commands.check.ts +1 -0
  30. package/src/checks/SK051-no-formatter.check.ts +1 -0
  31. package/src/cli/channel-run.ts +17 -0
  32. package/src/cli/cmd_Advisors.ts +28 -7
  33. package/src/cli/cmd_Asks.ts +2 -2
  34. package/src/cli/cmd_Backup.ts +5 -1
  35. package/src/cli/cmd_CacheAudit.ts +1 -1
  36. package/src/cli/cmd_Channel.ts +43 -0
  37. package/src/cli/cmd_GlobalProcesses.ts +1 -0
  38. package/src/cli/cmd_Home.ts +12 -5
  39. package/src/cli/cmd_Hooks.ts +1 -1
  40. package/src/cli/cmd_Hq.ts +43 -0
  41. package/src/cli/cmd_Lanes.ts +15 -3
  42. package/src/cli/cmd_Media.ts +8 -3
  43. package/src/cli/cmd_Orchestrator.ts +253 -84
  44. package/src/cli/cmd_OrchestratorRole.ts +163 -0
  45. package/src/cli/cmd_Review.ts +142 -165
  46. package/src/cli/cmd_Secret.ts +44 -14
  47. package/src/cli/cmd_Shot.ts +2 -4
  48. package/src/cli/cmd_Sound.ts +1 -0
  49. package/src/cli/cmd_Urls.ts +3 -3
  50. package/src/cli/inbox-hook-run.ts +109 -0
  51. package/src/cli/registry.ts +6 -2
  52. package/src/cli/review-here.ts +136 -0
  53. package/src/cli.ts +45 -14
  54. package/src/collections/actions.ts +5 -4
  55. package/src/collections/checks.ts +5 -0
  56. package/src/collections/collection-types.ts +4 -3
  57. package/src/collections/pings.ts +4 -1
  58. package/src/collections/providers.ts +6 -4
  59. package/src/collections/tests.ts +7 -4
  60. package/src/core/app-icon-frame.ts +62 -0
  61. package/src/core/app-icon.ts +179 -17
  62. package/src/core/archived.ts +10 -7
  63. package/src/core/check-ctx.ts +38 -4
  64. package/src/core/check-pass.ts +7 -0
  65. package/src/core/foreign.ts +87 -0
  66. package/src/core/gui-color.ts +75 -0
  67. package/src/core/hub-theme.ts +1 -3
  68. package/src/core/layout.ts +3 -0
  69. package/src/core/machine-commit.ts +9 -1
  70. package/src/core/one-lib.ts +2 -1
  71. package/src/core/one-way-in-policy.ts +17 -12
  72. package/src/core/owner-word-policy.ts +123 -0
  73. package/src/core/panel-shades.ts +140 -0
  74. package/src/core/repo-gui-color.ts +16 -0
  75. package/src/core/role-policy.ts +17 -0
  76. package/src/core/scope.ts +6 -3
  77. package/src/core/tmux-policy.ts +264 -0
  78. package/src/core/unit-icon.ts +43 -0
  79. package/src/fleet/push-fleet.ts +2 -0
  80. package/src/fleet/scan-fleet.ts +3 -0
  81. package/src/gate/cache-audit.ts +7 -1
  82. package/src/gate/gate-checks.ts +14 -9
  83. package/src/gate/run-fix.ts +30 -5
  84. package/src/gate/run-fixers.ts +8 -3
  85. package/src/home/activity-shape.ts +2 -0
  86. package/src/home/activity.ts +2 -1
  87. package/src/home/daemon-guard.ts +20 -2
  88. package/src/home/daemon-jobs.ts +26 -18
  89. package/src/home/gui-app/ShipkitGui.swift +2012 -144
  90. package/src/home/gui-app/icon.svg +8 -0
  91. package/src/home/gui-app.ts +94 -30
  92. package/src/home/home-routes.ts +53 -9
  93. package/src/home/home-start.ts +27 -3
  94. package/src/home/inbox-shape.ts +7 -3
  95. package/src/home/log-follow.ts +117 -0
  96. package/src/home/machine-fold.ts +1 -1
  97. package/src/home/open-app.ts +9 -3
  98. package/src/home/page-build.ts +5 -1
  99. package/src/home/page-held.ts +1 -1
  100. package/src/home/pm-config.ts +0 -8
  101. package/src/home/pm.ts +62 -5
  102. package/src/home/process-apps.ts +70 -23
  103. package/src/home/process-rows.ts +16 -1
  104. package/src/home/push-sources.ts +18 -13
  105. package/src/home/resources.ts +16 -7
  106. package/src/home/run-daemon.ts +4 -1
  107. package/src/home/run-pm.ts +1 -1
  108. package/src/home/serve-daemon.ts +13 -4
  109. package/src/home/serve-web.ts +141 -17
  110. package/src/home/space-page.ts +3 -3
  111. package/src/home/space-route.ts +2 -2
  112. package/src/home/supervise.ts +2 -1
  113. package/src/home/vault-page.ts +2 -1
  114. package/src/home/web-places.ts +239 -0
  115. package/src/home/widgets.ts +16 -2
  116. package/src/hooks/commit-message.ts +11 -9
  117. package/src/hooks/one-way-in-guard.ts +145 -68
  118. package/src/hooks/run-hooks.ts +15 -5
  119. package/src/hooks/shared-file.ts +273 -83
  120. package/src/hooks/shell-writes.ts +620 -0
  121. package/src/hooks/write-log.ts +149 -0
  122. package/src/hq/door-route.ts +63 -7
  123. package/src/hq/door.ts +45 -12
  124. package/src/hq/history-send.ts +3 -1
  125. package/src/hq/hq-db.ts +10 -3
  126. package/src/hq/hq-local.ts +24 -5
  127. package/src/hq/hq-routes.ts +3 -1
  128. package/src/hq/hq-store.ts +9 -3
  129. package/src/hq/kinds/index.ts +2 -1
  130. package/src/hq/kinds/kind.ts +9 -4
  131. package/src/hq/kinds/presence-rule.ts +56 -0
  132. package/src/hq/kinds/presence.ts +210 -0
  133. package/src/hq/kinds/report.ts +8 -5
  134. package/src/hq/lead-order.ts +68 -0
  135. package/src/hq/outbox.ts +7 -0
  136. package/src/hq/replica.ts +5 -7
  137. package/src/hq/report-facts.ts +14 -7
  138. package/src/hq/report.ts +47 -2
  139. package/src/hq/switch.ts +1 -0
  140. package/src/hq/terminal-hop.ts +64 -0
  141. package/src/hq/thread-sync.ts +13 -6
  142. package/src/http/door-forward.ts +10 -12
  143. package/src/http/door-names.ts +9 -0
  144. package/src/http/hop-caller.ts +23 -0
  145. package/src/http/hop-names.ts +14 -0
  146. package/src/http/loopback-serve.ts +28 -6
  147. package/src/http/owner-word.ts +128 -0
  148. package/src/http/same-origin.ts +12 -0
  149. package/src/{serve → http}/secret-gate.ts +3 -3
  150. package/src/ledger/run-log.ts +25 -1
  151. package/src/media-store/backup/sources.ts +53 -6
  152. package/src/media-store/backup/thread-copy.ts +9 -5
  153. package/src/media-store/copy/config.ts +10 -9
  154. package/src/media-store/daemon.ts +5 -2
  155. package/src/media-store/put.ts +3 -0
  156. package/src/media-store/space.ts +14 -16
  157. package/src/media-store/upload.ts +4 -0
  158. package/src/messages/collection.ts +2 -2
  159. package/src/messages/model.ts +6 -1
  160. package/src/messages/routes.ts +3 -0
  161. package/src/orchestrator/brief.md +8 -6
  162. package/src/orchestrator/channel-declare.ts +58 -0
  163. package/src/orchestrator/channel.ts +226 -0
  164. package/src/orchestrator/guards.ts +12 -3
  165. package/src/orchestrator/host.ts +35 -0
  166. package/src/orchestrator/lead-shape.ts +86 -0
  167. package/src/orchestrator/now.ts +88 -0
  168. package/src/orchestrator/phone.ts +4 -1
  169. package/src/orchestrator/places-file.ts +38 -0
  170. package/src/orchestrator/places-look.ts +180 -0
  171. package/src/orchestrator/places-shape.ts +151 -0
  172. package/src/orchestrator/places.ts +50 -0
  173. package/src/orchestrator/presence-shape.ts +13 -2
  174. package/src/orchestrator/presence.ts +26 -15
  175. package/src/orchestrator/push.ts +5 -10
  176. package/src/orchestrator/role-shape.ts +270 -0
  177. package/src/orchestrator/role.ts +242 -0
  178. package/src/orchestrator/routes.ts +136 -31
  179. package/src/orchestrator/sessions-shape.ts +78 -0
  180. package/src/orchestrator/sessions.ts +86 -0
  181. package/src/orchestrator/share.ts +71 -0
  182. package/src/orchestrator/start-notice.ts +61 -0
  183. package/src/orchestrator/start.ts +137 -0
  184. package/src/orchestrator/started.ts +55 -0
  185. package/src/orchestrator/stuck.ts +196 -0
  186. package/src/orchestrator/unheard.ts +18 -7
  187. package/src/pages/frame-client.ts +44 -6
  188. package/src/problems/failure-words.ts +80 -0
  189. package/src/release/run-bump.ts +26 -5
  190. package/src/release/run-release.ts +34 -14
  191. package/src/repo-config.ts +37 -9
  192. package/src/review/aside-at.ts +19 -0
  193. package/src/review/band.ts +3 -3
  194. package/src/review/doc-save.ts +1 -1
  195. package/src/review/inbox-hook.ts +12 -4
  196. package/src/review/inbox-read.ts +20 -7
  197. package/src/review/instruction-guards.ts +137 -0
  198. package/src/review/instructions.ts +14 -2
  199. package/src/review/item-db.ts +52 -2
  200. package/src/review/mentions.ts +6 -4
  201. package/src/review/model.ts +3 -2
  202. package/src/review/parties.ts +88 -19
  203. package/src/review/push.ts +32 -15
  204. package/src/review/routes.ts +12 -4
  205. package/src/review/secret-route.ts +5 -5
  206. package/src/review/snooze.ts +1 -16
  207. package/src/review/store-parties.ts +4 -2
  208. package/src/review/take-back.ts +2 -1
  209. package/src/review/threads.ts +13 -2
  210. package/src/review/unit.ts +3 -2
  211. package/src/review/view-layout.ts +8 -1
  212. package/src/review/watchers.ts +25 -4
  213. package/src/secrets/key-pair.ts +14 -0
  214. package/src/secrets/lapse.ts +3 -3
  215. package/src/secrets/manager.ts +5 -1
  216. package/src/secrets/name-template.ts +83 -0
  217. package/src/secrets/name.ts +3 -0
  218. package/src/secrets/read.ts +10 -6
  219. package/src/secrets/secrets-view.ts +299 -0
  220. package/src/secrets/who-reads.ts +2 -1
  221. package/src/serve/frame-part.ts +49 -0
  222. package/src/serve/hub-app/accounts-line.tsx +33 -45
  223. package/src/serve/hub-app/activity-st.ts +6 -5
  224. package/src/serve/hub-app/activity-view.tsx +10 -9
  225. package/src/serve/hub-app/advice-box.tsx +6 -5
  226. package/src/serve/hub-app/advisor-app.tsx +2 -0
  227. package/src/serve/hub-app/advisor-face.tsx +3 -2
  228. package/src/serve/hub-app/advisor.html +1 -0
  229. package/src/serve/hub-app/advisors-view.tsx +52 -10
  230. package/src/serve/hub-app/advisors.css +4 -0
  231. package/src/serve/hub-app/app-bridge.ts +31 -5
  232. package/src/serve/hub-app/asked-page.ts +24 -0
  233. package/src/serve/hub-app/asks-page.tsx +10 -6
  234. package/src/serve/hub-app/auto-text.tsx +7 -5
  235. package/src/serve/hub-app/card-head.tsx +3 -2
  236. package/src/serve/hub-app/check-view.tsx +10 -9
  237. package/src/serve/hub-app/checks-svc.ts +96 -32
  238. package/src/serve/hub-app/clock-svc.ts +24 -8
  239. package/src/serve/hub-app/code-copy.ts +1 -1
  240. package/src/serve/hub-app/col-card.tsx +2 -1
  241. package/src/serve/hub-app/col-list-page.tsx +12 -6
  242. package/src/serve/hub-app/col-list-st.ts +12 -2
  243. package/src/serve/hub-app/col-tables-view.tsx +8 -44
  244. package/src/serve/hub-app/col-tables.ts +0 -14
  245. package/src/serve/hub-app/cols-svc.ts +6 -12
  246. package/src/serve/hub-app/columns.ts +94 -0
  247. package/src/serve/hub-app/comfy-view.tsx +8 -7
  248. package/src/serve/hub-app/commands/commands-page.tsx +4 -3
  249. package/src/serve/hub-app/commands/commands-st.ts +2 -2
  250. package/src/serve/hub-app/controls.css +69 -23
  251. package/src/serve/hub-app/cycle-button.tsx +2 -1
  252. package/src/serve/hub-app/database-st.ts +1 -1
  253. package/src/serve/hub-app/database-view.tsx +4 -2
  254. package/src/serve/hub-app/deaf.tsx +27 -0
  255. package/src/serve/hub-app/dock-st.ts +21 -16
  256. package/src/serve/hub-app/dock-view.tsx +19 -12
  257. package/src/serve/hub-app/empty-section.tsx +30 -0
  258. package/src/serve/hub-app/entry-bar.css +1 -1
  259. package/src/serve/hub-app/entry-bar.tsx +11 -6
  260. package/src/serve/hub-app/entry-list.css +32 -0
  261. package/src/serve/hub-app/entry-list.tsx +123 -0
  262. package/src/serve/hub-app/entry-pick.ts +1 -1
  263. package/src/serve/hub-app/entry-sections.ts +140 -0
  264. package/src/serve/hub-app/event-stream-reader.ts +56 -0
  265. package/src/serve/hub-app/floating.tsx +68 -14
  266. package/src/serve/hub-app/geometry-view.tsx +3 -2
  267. package/src/serve/hub-app/git-view.tsx +3 -2
  268. package/src/serve/hub-app/hash-route.ts +14 -2
  269. package/src/serve/hub-app/header-bar.tsx +53 -36
  270. package/src/serve/hub-app/home-st.ts +131 -14
  271. package/src/serve/hub-app/home-strip.css +24 -13
  272. package/src/serve/hub-app/home-strip.tsx +131 -66
  273. package/src/serve/hub-app/home.html +5 -0
  274. package/src/serve/hub-app/hub-app.tsx +94 -102
  275. package/src/serve/hub-app/hub.css +61 -94
  276. package/src/serve/hub-app/icons.tsx +16 -0
  277. package/src/serve/hub-app/identities-st.ts +19 -54
  278. package/src/serve/hub-app/identities-view.tsx +25 -24
  279. package/src/serve/hub-app/identity-address.ts +2 -2
  280. package/src/serve/hub-app/in-sight.ts +10 -0
  281. package/src/serve/hub-app/inbox-st.ts +20 -2
  282. package/src/serve/hub-app/inbox-view.tsx +16 -9
  283. package/src/serve/hub-app/inbox.css +1 -0
  284. package/src/serve/hub-app/index.html +5 -0
  285. package/src/serve/hub-app/insights-view.tsx +6 -5
  286. package/src/serve/hub-app/instructions.css +4 -1
  287. package/src/serve/hub-app/kept-cols.tsx +83 -20
  288. package/src/serve/hub-app/kept-width.tsx +76 -0
  289. package/src/serve/hub-app/keys.ts +116 -38
  290. package/src/serve/hub-app/layout-st.ts +109 -99
  291. package/src/serve/hub-app/lightbox-zoom.css +36 -0
  292. package/src/serve/hub-app/list-filter.tsx +15 -6
  293. package/src/serve/hub-app/list-head.tsx +29 -0
  294. package/src/serve/hub-app/list-row.ts +8 -0
  295. package/src/serve/hub-app/list-walk.ts +26 -105
  296. package/src/serve/hub-app/live-socket.ts +274 -0
  297. package/src/serve/hub-app/live-sources.ts +189 -0
  298. package/src/serve/hub-app/live-svc.ts +2 -2
  299. package/src/serve/hub-app/machine-st.ts +75 -14
  300. package/src/serve/hub-app/main-panel.css +211 -0
  301. package/src/serve/hub-app/main-panel.tsx +259 -0
  302. package/src/serve/hub-app/md.ts +4 -4
  303. package/src/serve/hub-app/media-svc.ts +5 -5
  304. package/src/serve/hub-app/media-view.tsx +13 -12
  305. package/src/serve/hub-app/messages/messages-page.tsx +8 -7
  306. package/src/serve/hub-app/messages/messages-st.ts +5 -2
  307. package/src/serve/hub-app/new-thread-st.ts +170 -0
  308. package/src/serve/hub-app/new-thread.tsx +133 -107
  309. package/src/serve/hub-app/orchestrator-line.tsx +115 -45
  310. package/src/serve/hub-app/orchestrator-places.tsx +86 -0
  311. package/src/serve/hub-app/orchestrator.css +57 -5
  312. package/src/serve/hub-app/page-keys.ts +107 -68
  313. package/src/serve/hub-app/page-reload.ts +46 -6
  314. package/src/serve/hub-app/pages-frames.tsx +40 -3
  315. package/src/serve/hub-app/pages-svc.ts +3 -1
  316. package/src/serve/hub-app/palette-st.ts +198 -43
  317. package/src/serve/hub-app/palette-view.tsx +32 -8
  318. package/src/serve/hub-app/panel-head-action.tsx +39 -0
  319. package/src/serve/hub-app/panel-head.tsx +70 -0
  320. package/src/serve/hub-app/panel-repo.ts +42 -0
  321. package/src/serve/hub-app/panel-source.ts +195 -0
  322. package/src/serve/hub-app/panel-tint.css +6 -0
  323. package/src/serve/hub-app/panel-tint.ts +23 -0
  324. package/src/serve/hub-app/panel-walk.ts +107 -0
  325. package/src/serve/hub-app/pill-row.tsx +2 -1
  326. package/src/serve/hub-app/place-path.ts +4 -0
  327. package/src/serve/hub-app/places-svc.ts +75 -0
  328. package/src/serve/hub-app/plan-view.tsx +3 -2
  329. package/src/serve/hub-app/polled.ts +11 -1
  330. package/src/serve/hub-app/presence-st.ts +66 -32
  331. package/src/serve/hub-app/processes-view.tsx +2 -2
  332. package/src/serve/hub-app/project-bar.tsx +116 -0
  333. package/src/serve/hub-app/project-list.css +20 -173
  334. package/src/serve/hub-app/project-list.tsx +30 -298
  335. package/src/serve/hub-app/projects-svc.ts +59 -32
  336. package/src/serve/hub-app/push-sign.tsx +2 -1
  337. package/src/serve/hub-app/push-svc.ts +86 -69
  338. package/src/serve/hub-app/quiet-st.ts +5 -3
  339. package/src/serve/hub-app/rail-groups.ts +144 -0
  340. package/src/serve/hub-app/reader-chips.tsx +2 -1
  341. package/src/serve/hub-app/recordings-st.ts +2 -1
  342. package/src/serve/hub-app/recordings-view.tsx +19 -47
  343. package/src/serve/hub-app/recordings.css +0 -2
  344. package/src/serve/hub-app/reflections-page.tsx +10 -6
  345. package/src/serve/hub-app/releases/releases-page.tsx +6 -5
  346. package/src/serve/hub-app/repo-sections.ts +127 -38
  347. package/src/serve/hub-app/repo-st.ts +57 -36
  348. package/src/serve/hub-app/review/advisor-bar.tsx +3 -2
  349. package/src/serve/hub-app/review/ask-proof.tsx +79 -0
  350. package/src/serve/hub-app/review/attach-view.tsx +11 -10
  351. package/src/serve/hub-app/review/box-view.ts +479 -0
  352. package/src/serve/hub-app/review/box-zoom.tsx +70 -0
  353. package/src/serve/hub-app/review/diff-view.tsx +3 -2
  354. package/src/serve/hub-app/review/doc-body.tsx +2 -1
  355. package/src/serve/hub-app/review/dock.tsx +3 -2
  356. package/src/serve/hub-app/review/draft-body.tsx +4 -3
  357. package/src/serve/hub-app/review/faces.tsx +0 -8
  358. package/src/serve/hub-app/review/group-block.tsx +8 -7
  359. package/src/serve/hub-app/review/heard-line.tsx +4 -3
  360. package/src/serve/hub-app/review/instructions-view.tsx +3 -2
  361. package/src/serve/hub-app/review/item-verdict.tsx +40 -40
  362. package/src/serve/hub-app/review/kind-states.tsx +5 -4
  363. package/src/serve/hub-app/review/kit.tsx +24 -4
  364. package/src/serve/hub-app/review/lane-bar.tsx +30 -28
  365. package/src/serve/hub-app/review/lightbox.tsx +6 -4
  366. package/src/serve/hub-app/review/live-bar.tsx +7 -6
  367. package/src/serve/hub-app/review/live-view.tsx +6 -5
  368. package/src/serve/hub-app/review/object-card.tsx +2 -1
  369. package/src/serve/hub-app/review/object-panel.tsx +11 -10
  370. package/src/serve/hub-app/review/pano-view.tsx +3 -2
  371. package/src/serve/hub-app/review/question-views.tsx +6 -5
  372. package/src/serve/hub-app/review/review-cells.tsx +21 -20
  373. package/src/serve/hub-app/review/review-host.ts +3 -0
  374. package/src/serve/hub-app/review/review-kit.ts +7 -5
  375. package/src/serve/hub-app/review/review-list.tsx +98 -52
  376. package/src/serve/hub-app/review/review-page.tsx +3 -3
  377. package/src/serve/hub-app/review/review-st.ts +70 -14
  378. package/src/serve/hub-app/review/review-thread.tsx +234 -138
  379. package/src/serve/hub-app/review/review-views.tsx +166 -191
  380. package/src/serve/hub-app/review/space3d.tsx +17 -9
  381. package/src/serve/hub-app/review/thread-close.tsx +24 -32
  382. package/src/serve/hub-app/review/thread-st.ts +39 -25
  383. package/src/serve/hub-app/review/trailer-body.tsx +5 -4
  384. package/src/serve/hub-app/review/trailer-page.tsx +18 -16
  385. package/src/serve/hub-app/review/trailer-st.ts +3 -2
  386. package/src/serve/hub-app/review/trailer-timeline.tsx +10 -9
  387. package/src/serve/hub-app/review/trailer-voices.tsx +29 -28
  388. package/src/serve/hub-app/review.css +159 -42
  389. package/src/serve/hub-app/row-acts.tsx +126 -0
  390. package/src/serve/hub-app/row-face.tsx +29 -0
  391. package/src/serve/hub-app/running-rows.tsx +142 -0
  392. package/src/serve/hub-app/running-st.ts +110 -0
  393. package/src/serve/hub-app/search-view.tsx +3 -2
  394. package/src/serve/hub-app/secrets-page.tsx +290 -0
  395. package/src/serve/hub-app/secrets-st.ts +181 -0
  396. package/src/serve/hub-app/secrets.css +65 -0
  397. package/src/serve/hub-app/section-head.tsx +3 -2
  398. package/src/serve/hub-app/session-chips.tsx +55 -0
  399. package/src/serve/hub-app/shell.ts +56 -0
  400. package/src/serve/hub-app/site/site-part.tsx +6 -5
  401. package/src/serve/hub-app/site/site-st.ts +0 -6
  402. package/src/serve/hub-app/site.css +0 -1
  403. package/src/serve/hub-app/social/calendar.tsx +7 -6
  404. package/src/serve/hub-app/social/comms-page.tsx +29 -26
  405. package/src/serve/hub-app/social/group-editor.tsx +2 -1
  406. package/src/serve/hub-app/social/kit.tsx +12 -11
  407. package/src/serve/hub-app/social/next-release.tsx +3 -2
  408. package/src/serve/hub-app/social/post-card.tsx +21 -20
  409. package/src/serve/hub-app/social/post-page.tsx +2 -1
  410. package/src/serve/hub-app/social/problems.tsx +3 -2
  411. package/src/serve/hub-app/social/social-page.tsx +29 -27
  412. package/src/serve/hub-app/social/social-st.ts +4 -2
  413. package/src/serve/hub-app/social/stage-popup.tsx +11 -10
  414. package/src/serve/hub-app/social.css +7 -5
  415. package/src/serve/hub-app/source-acts.ts +79 -0
  416. package/src/serve/hub-app/source-page.tsx +17 -0
  417. package/src/serve/hub-app/space-view.tsx +5 -4
  418. package/src/serve/hub-app/stores/stores-page.tsx +21 -19
  419. package/src/serve/hub-app/stores/stores-st.ts +1 -1
  420. package/src/serve/hub-app/stores.css +1 -1
  421. package/src/serve/hub-app/terminal-history-st.ts +112 -0
  422. package/src/serve/hub-app/terminal-keys.ts +79 -0
  423. package/src/serve/hub-app/terminal-lib.ts +110 -0
  424. package/src/serve/hub-app/terminal-links.ts +55 -0
  425. package/src/serve/hub-app/terminal-list-st.ts +304 -0
  426. package/src/serve/hub-app/terminal-log-st.ts +242 -0
  427. package/src/serve/hub-app/terminal-out.ts +135 -0
  428. package/src/serve/hub-app/terminal-pages.tsx +115 -0
  429. package/src/serve/hub-app/terminal-panel.tsx +60 -9
  430. package/src/serve/hub-app/terminal-sources.tsx +335 -0
  431. package/src/serve/hub-app/terminal-st.ts +447 -167
  432. package/src/serve/hub-app/terminal-stream.ts +233 -0
  433. package/src/serve/hub-app/terminal-tab.tsx +64 -0
  434. package/src/serve/hub-app/terminal-widths.ts +30 -0
  435. package/src/serve/hub-app/terminal.css +50 -4
  436. package/src/serve/hub-app/test-view.tsx +5 -3
  437. package/src/serve/hub-app/tests-view.tsx +16 -15
  438. package/src/serve/hub-app/theme-st.ts +5 -0
  439. package/src/serve/hub-app/thread-row.tsx +39 -31
  440. package/src/serve/hub-app/time-ago.tsx +3 -2
  441. package/src/serve/hub-app/time-view.tsx +2 -1
  442. package/src/serve/hub-app/time.css +1 -1
  443. package/src/serve/hub-app/timeline-chart.tsx +5 -4
  444. package/src/serve/hub-app/timeline-view.tsx +10 -9
  445. package/src/serve/hub-app/tips.ts +247 -0
  446. package/src/serve/hub-app/tree-build.ts +40 -8
  447. package/src/serve/hub-app/tree-svc.ts +167 -134
  448. package/src/serve/hub-app/unit-icons.ts +26 -0
  449. package/src/serve/hub-app/url-address.ts +154 -0
  450. package/src/serve/hub-app/url-faces.ts +88 -0
  451. package/src/serve/hub-app/url-forms.tsx +183 -0
  452. package/src/serve/hub-app/urls-svc.ts +167 -5
  453. package/src/serve/hub-app/urls-view.tsx +56 -20
  454. package/src/serve/hub-app/urls.css +26 -0
  455. package/src/serve/hub-app/vault-view.tsx +5 -4
  456. package/src/serve/hub-app/veille/veille-page.tsx +34 -33
  457. package/src/serve/hub-app/veille/veille-st.ts +6 -3
  458. package/src/serve/hub-app/view-layout.css +3 -3
  459. package/src/serve/hub-app/when-view.tsx +5 -4
  460. package/src/serve/hub-app/wikis-view.tsx +6 -5
  461. package/src/serve/hub-app/words.tsx +9 -2
  462. package/src/serve/hub-runtime.ts +3 -2
  463. package/src/serve/orchestrator-host.ts +58 -0
  464. package/src/serve/page-live.ts +147 -0
  465. package/src/serve/project-gutter-route.ts +63 -2
  466. package/src/serve/read-worker.ts +7 -2
  467. package/src/serve/runs-stamp.ts +33 -0
  468. package/src/serve/secrets-read.ts +156 -0
  469. package/src/serve/serve-hub.ts +71 -22
  470. package/src/serve/terminal-claudes.ts +185 -0
  471. package/src/serve/terminal-guard.ts +10 -5
  472. package/src/serve/terminal-host.ts +517 -0
  473. package/src/serve/terminal-record.ts +104 -0
  474. package/src/serve/terminal-route.ts +466 -103
  475. package/src/serve/terminal-shells.ts +3 -0
  476. package/src/serve/terminal-watch.ts +102 -0
  477. package/src/shipkit-files.ts +9 -4
  478. package/src/shot/client.ts +4 -9
  479. package/src/shot/shooter.ts +2 -4
  480. package/src/shot/shot-ask.ts +2 -7
  481. package/src/shot/shot-theme.ts +6 -17
  482. package/src/social/routes.ts +2 -2
  483. package/src/social/writes.ts +3 -0
  484. package/src/suite/test-units.ts +6 -2
  485. package/src/trailer/sound/eleven.ts +1 -0
  486. package/src/urls/added.ts +111 -0
  487. package/src/urls/icons.ts +294 -0
  488. package/src/urls/places.ts +139 -0
  489. package/src/urls/routes.ts +17 -7
  490. package/src/urls/rows.ts +48 -15
  491. package/src/urls/unit.ts +57 -3
  492. package/src/urls/write-routes.ts +207 -0
  493. package/src/vault/vault-destroy.ts +2 -1
  494. package/src/vault/vault-import.ts +4 -11
  495. package/src/vault/vault-restore.ts +3 -2
  496. package/src/veille/chrome.ts +18 -3
  497. package/src/veille/identity.ts +6 -0
  498. package/src/view3d/cam.ts +30 -46
  499. package/src/view3d/lib.ts +20 -2
  500. package/src/view3d/viewer.ts +62 -88
  501. package/src/wiki/agent-paths.ts +2 -1
  502. package/src/orchestrator/deliver.ts +0 -81
  503. package/src/orchestrator/drill.ts +0 -129
  504. package/src/orchestrator/keeper.ts +0 -332
  505. package/src/orchestrator/pm.ts +0 -20
  506. package/src/orchestrator/state.ts +0 -92
  507. package/src/orchestrator/switch.ts +0 -86
  508. package/src/orchestrator/tmux.ts +0 -82
  509. package/src/serve/hub-app/rail-fly.tsx +0 -95
  510. package/src/serve/hub-app/side-lists.ts +0 -72
  511. package/src/serve/hub-app/sidebar.tsx +0 -62
  512. package/src/serve/hub-app/tree-row.tsx +0 -125
@@ -0,0 +1,299 @@
1
+ // the secrets page's shape and its words (the hub's secrets entry): every name the house or the store knows, sorted
2
+ // into sections by who reads it, as the repo shown sees them. Pure and browser safe: the server makes the view
3
+ // (secrets-read.ts), the page draws it (serve/hub-app/secrets-page.tsx).
4
+ // The constraint a reader breaks first: nothing here holds or derives a value, only names, scopes, states and dates,
5
+ // and a secret in its normal state says nothing: `speakOf` answers only for what the owner acts on
6
+ import { envVarOf } from './name.ts'
7
+
8
+ export type SecretScope = { repos: string[]; identities: string[]; machines: string[] }
9
+
10
+ /** `unread`: the store was not read for it, so nothing says whether it is held */
11
+ export type SecretState = 'present' | 'missing' | 'archived' | 'unread'
12
+
13
+ /** what the check that proves a secret last said; `lapsed`: a token that expires by design did */
14
+ export type ProbeVerdict = 'pass' | 'fail' | 'warn' | 'stale' | 'unmeasured' | 'lapsed'
15
+
16
+ export type SecretRow = {
17
+ name: string
18
+ /** what it is for, as its registry row says; '' with none */
19
+ service: string
20
+ scope: SecretScope
21
+ /** a registry row names it: without one its scope is where the store files it, a guess */
22
+ registered: boolean
23
+ state: SecretState
24
+ level: 'core' | 'used' | 'minor' | null
25
+ /** where its value lives on this machine; null when missing or not read */
26
+ place: 'vault' | 'keychain' | null
27
+ /** when its current version was written, the vault's own record */
28
+ written: number | null
29
+ version: number | null
30
+ archived: { at: string; why: string } | null
31
+ /** the check that proves it works, and what its last run said; null when no check reads it */
32
+ probe: { check: string; verdict: ProbeVerdict; words: string } | null
33
+ /** the one command that refreshes a token that expires by design */
34
+ refresh: string | null
35
+ /** where a human mints it */
36
+ mintUrl: string | null
37
+ /** the open ask that waits for its value */
38
+ ask: { repo: string; id: string; title: string } | null
39
+ /** what the store says beside its state (filed apart from its row, not read and why) */
40
+ note: string | null
41
+ }
42
+
43
+ export type SecretsView = {
44
+ at: number
45
+ /** the repo shown */
46
+ repo: string
47
+ /** it hosts the registry: its page is the house's, one section per identity and per repo */
48
+ house: boolean
49
+ /** the identity the repo shown speaks as */
50
+ identity: string | null
51
+ machine: string | null
52
+ repos: { name: string; key?: string | null; speaksAs: string | null }[]
53
+ identities: { id: string; name: string }[]
54
+ rows: SecretRow[]
55
+ /** what the read could not say, in words, above the list */
56
+ notes: string[]
57
+ /** the command that stores a value, `{name}` in it */
58
+ setCommand: string
59
+ }
60
+
61
+ /** what one selected secret adds, read at the click: its tail as `sk secret tail` prints it, never the value */
62
+ export type SecretDetail = { name: string; tail: string | null; account: string | null; from: string | null; why: string | null }
63
+
64
+ export type Tone = 'red' | 'warn' | 'dim'
65
+ /** what a row says in words: `needs` when it waits on the owner */
66
+ export type Speak = { tone: Tone; word: string; why: string; needs: boolean; fix: string | null }
67
+
68
+ export const scopesAll = (s: SecretScope): boolean => s.repos.length + s.identities.length + s.machines.length === 0
69
+
70
+ const repoOf = (v: SecretsView, r: string) => v.repos.find((h) => (r.includes('/') ? h.key === r : h.name === r))
71
+ const idName = (v: SecretsView, id: string): string => v.identities.find((i) => i.id === id)?.name ?? id
72
+ /** the repos of this machine that speak as an identity */
73
+ export const speakers = (v: SecretsView, id: string): string[] => v.repos.filter((h) => h.speaksAs === id).map((h) => h.name).sort()
74
+
75
+ /** the scope in words for the owner: `every repo`, `shop`, `the repos that speak as Acme Studio (game, shop)` */
76
+ export function scopeLine(r: SecretRow, v: SecretsView): string {
77
+ if (scopesAll(r.scope)) return 'every repo'
78
+ return [
79
+ ...r.scope.repos.map((x) => (repoOf(v, x) == null ? `${x} (no repo of that name on this machine)` : `the repo ${repoOf(v, x)!.name}`)),
80
+ ...r.scope.identities.map((id) => `the repos that speak as ${idName(v, id)}${v.identities.some((i) => i.id === id) ? '' : ' (no such identity)'}`),
81
+ ...r.scope.machines.map((m) => `the repos on the machine ${m}`),
82
+ ].join(', ')
83
+ }
84
+
85
+ /** the repos of this machine that read a secret, by name */
86
+ export function readersOf(r: SecretRow, v: SecretsView): string[] {
87
+ if (scopesAll(r.scope)) return v.repos.map((h) => h.name).sort()
88
+ const out = new Set<string>()
89
+ for (const x of r.scope.repos) if (repoOf(v, x) != null) out.add(repoOf(v, x)!.name)
90
+ for (const id of r.scope.identities) for (const n of speakers(v, id)) out.add(n)
91
+ if (v.machine != null && r.scope.machines.includes(v.machine)) for (const h of v.repos) out.add(h.name)
92
+ return [...out].sort()
93
+ }
94
+
95
+ /** why a secret has no section of its own: its scope is a guess, or names nothing this machine knows. null when its
96
+ * scope is known */
97
+ export function unsortedWhy(r: SecretRow, v: SecretsView): string | null {
98
+ if (!r.registered)
99
+ return scopesAll(r.scope)
100
+ ? 'no row in the registry says who reads it, so every repo does: add its row'
101
+ : `no row in the registry: its scope is a guess from where the store files it (${scopeLine(r, v)})`
102
+ if (scopesAll(r.scope)) return null
103
+ const known = r.scope.repos.some((x) => repoOf(v, x) != null) || r.scope.identities.some((id) => v.identities.some((i) => i.id === id)) || r.scope.machines.length > 0
104
+ if (known) return null
105
+ const gone = [...r.scope.repos.map((x) => `the repo ${x}`), ...r.scope.identities.map((id) => `the identity ${id}`)]
106
+ return `its row names ${gone.join(' and ')}, which this machine does not have`
107
+ }
108
+
109
+ const setLine = (v: SecretsView, name: string): string => v.setCommand.replaceAll('{name}', name)
110
+
111
+ /** what a row says in words, null in its normal state: a present secret is its green mark alone */
112
+ export function speakOf(r: SecretRow, v: SecretsView): Speak | null {
113
+ if (r.state === 'archived') return { tone: 'dim', word: 'archived', why: r.archived == null ? 'archived: every read refuses it' : `archived on ${r.archived.at}: ${r.archived.why}`, needs: false, fix: `sk secret unarchive ${r.name}` }
114
+ if (r.state === 'missing') {
115
+ if (r.level === 'minor') return { tone: 'dim', word: 'not set', why: 'a minor secret nothing uses yet: no value is stored', needs: false, fix: setLine(v, r.name) }
116
+ return { tone: 'red', word: 'missing', why: r.ask == null ? 'no value is stored on this machine' : `no value is stored: the ask « ${r.ask.title} » of ${r.ask.repo} waits for it`, needs: true, fix: setLine(v, r.name) }
117
+ }
118
+ // a token that expires by design: nothing is broken until a project needs it, so amber, never red
119
+ if (r.probe?.verdict === 'lapsed') return { tone: 'warn', word: 'expired', why: `its check ${r.probe.check} found it expired: fine until a project needs it`, needs: true, fix: r.refresh }
120
+ if (r.probe?.verdict === 'fail') return { tone: 'red', word: 'failing', why: r.probe.words, needs: true, fix: r.refresh ?? setLine(v, r.name) }
121
+ if (r.probe?.verdict === 'warn') return { tone: 'warn', word: 'warns', why: r.probe.words, needs: true, fix: null }
122
+ const why = unsortedWhy(r, v)
123
+ if (why != null) return { tone: 'warn', word: 'scope ?', why, needs: true, fix: null }
124
+ if (!scopesAll(r.scope) && readersOf(r, v).length === 0) return { tone: 'warn', word: 'unused ?', why: `no repo of this machine reads it: ${scopeLine(r, v)}`, needs: true, fix: `sk secret archive ${r.name} --why "<why>"` }
125
+ return null
126
+ }
127
+
128
+ /** the mark of a row: its state as the hub's square, and the tick of a check that proved it */
129
+ export type Mark = { sq: 'ok' | 'red' | 'warn' | 'off'; verified: string | null; title: string }
130
+
131
+ export function markOf(r: SecretRow, v: SecretsView): Mark {
132
+ const s = speakOf(r, v)
133
+ const verified = r.probe?.verdict === 'pass' ? r.probe.words : null
134
+ if (s != null) return { sq: s.tone === 'dim' ? 'off' : s.tone, verified: null, title: `${s.word}: ${s.why}` }
135
+ if (r.state === 'unread') return { sq: 'off', verified, title: r.note ?? 'the store was not read for it' }
136
+ return { sq: 'ok', verified, title: verified ?? (r.probe == null ? 'present; no check proves it works' : `present; ${r.probe.words}`) }
137
+ }
138
+
139
+ // ── the sections ─────────────────────────────────────────────────────────
140
+
141
+ /** a group inside a section: the repo or the identity it is for, under a thin head */
142
+ export type SubSection = { key: string; label: string; strip: string[]; rows: SecretRow[] }
143
+
144
+ export type Section = {
145
+ /** stable: the fold of the section is kept by it */
146
+ key: string
147
+ label: string
148
+ /** what the section holds, on hover of its head */
149
+ title: string
150
+ /** the name parts the head already says, left out of a row's name */
151
+ strip: string[]
152
+ rows: SecretRow[]
153
+ /** the groups of « other repos », each its own head; null where the rows sit under the section itself */
154
+ subs: SubSection[] | null
155
+ foldedByDefault: boolean
156
+ /** always drawn, with « none » when empty; false: left out when empty */
157
+ keep: boolean
158
+ }
159
+
160
+ const RANK: Record<Tone, number> = { red: 0, warn: 1, dim: 3 }
161
+ /** what needs the owner first (red, then amber), then the rest by name, what is out of use last */
162
+ export function sortRows(rows: readonly SecretRow[], v: SecretsView): SecretRow[] {
163
+ const rank = (r: SecretRow): number => {
164
+ const s = speakOf(r, v)
165
+ return s == null ? 2 : RANK[s.tone]
166
+ }
167
+ return [...rows].sort((a, b) => rank(a) - rank(b) || a.name.localeCompare(b.name))
168
+ }
169
+
170
+ /** where one row sits for the house: its first identity, else its first repo, else its first machine */
171
+ const houseKey = (r: SecretRow): string => (r.scope.identities[0] != null ? `id:${r.scope.identities[0]}` : r.scope.repos[0] != null ? `repo:${r.scope.repos[0]}` : `machine:${r.scope.machines[0]}`)
172
+
173
+ const repoStrip = (v: SecretsView, r: string): string[] => [...new Set([r, repoOf(v, r)?.name ?? r, r.split('/').at(-1)!])]
174
+
175
+ /** the group of a row that is another repo's, identity's or machine's */
176
+ function groupOf(v: SecretsView, key: string): { label: string; strip: string[] } {
177
+ const [kind, ...rest] = key.split(':')
178
+ const id = rest.join(':')
179
+ if (kind === 'id') return { label: `as ${idName(v, id)}`, strip: [id] }
180
+ if (kind === 'machine') return { label: `on ${id}`, strip: [id] }
181
+ return { label: repoOf(v, id)?.name ?? id, strip: repoStrip(v, id) }
182
+ }
183
+
184
+ /** the sections of the list, in the order drawn. A project's page: this repo, this identity, every repo, the other
185
+ * repos (folded, grouped by repo); the house's: every repo, one section an identity, one a repo. A secret whose
186
+ * scope is a guess sits in the last one, unsorted */
187
+ export function sectionsOf(v: SecretsView): Section[] {
188
+ const unsorted: SecretRow[] = []
189
+ const all: SecretRow[] = []
190
+ const scoped: SecretRow[] = []
191
+ for (const r of v.rows) (unsortedWhy(r, v) != null ? unsorted : scopesAll(r.scope) ? all : scoped).push(r)
192
+ const sec = (s: Omit<Section, 'rows' | 'subs'> & { rows: SecretRow[]; subs?: SubSection[] }): Section => ({ ...s, rows: sortRows(s.rows, v), subs: s.subs ?? null })
193
+ const everyRepo = sec({ key: 'all', label: 'every repo', title: 'the secrets every repo of the house reads', strip: [], rows: all, foldedByDefault: false, keep: true })
194
+ const last = sec({ key: 'unsorted', label: 'unsorted', title: 'a secret whose scope is a guess or names nothing this machine has: each says why', strip: [], rows: unsorted, foldedByDefault: false, keep: false })
195
+ const grouped = (rows: SecretRow[]): Map<string, SecretRow[]> => {
196
+ const by = new Map<string, SecretRow[]>()
197
+ for (const r of rows) by.set(houseKey(r), [...(by.get(houseKey(r)) ?? []), r])
198
+ return by
199
+ }
200
+ if (v.house) {
201
+ const by = grouped(scoped)
202
+ const one = (key: string, label: string, title: string): Section => sec({ key, label, title, strip: groupOf(v, key).strip, rows: by.get(key) ?? [], foldedByDefault: false, keep: false })
203
+ const ids = v.identities.map((i) => one(`id:${i.id}`, i.name, `the secrets of the repos that speak as ${i.name}: ${speakers(v, i.id).join(', ') || 'none on this machine'}`))
204
+ const repos = [...by.keys()].filter((k) => k.startsWith('repo:')).sort().map((k) => one(k, groupOf(v, k).label, `the secrets of the repo ${groupOf(v, k).label} alone`))
205
+ const machines = [...by.keys()].filter((k) => k.startsWith('machine:')).sort().map((k) => one(k, groupOf(v, k).label, `the secrets of the repos ${groupOf(v, k).label}`))
206
+ return [everyRepo, ...ids.map((s) => ({ ...s, keep: true })), ...repos, ...machines, last]
207
+ }
208
+ const mine = (r: SecretRow): boolean => r.scope.repos.some((x) => repoOf(v, x)?.name === v.repo || x === v.repo)
209
+ const asMe = (r: SecretRow): boolean => v.identity != null && r.scope.identities.includes(v.identity)
210
+ const here = (r: SecretRow): boolean => v.machine != null && r.scope.machines.includes(v.machine)
211
+ const thisRepo = scoped.filter(mine)
212
+ const thisId = scoped.filter((r) => !mine(r) && asMe(r))
213
+ const thisMachine = scoped.filter((r) => !mine(r) && !asMe(r) && here(r))
214
+ const others = grouped(scoped.filter((r) => !mine(r) && !asMe(r) && !here(r)))
215
+ const subs = [...others.keys()].sort((a, b) => groupOf(v, a).label.localeCompare(groupOf(v, b).label)).map((key): SubSection => ({ key, ...groupOf(v, key), rows: sortRows(others.get(key)!, v) }))
216
+ const idLabel = v.identity == null ? 'this identity' : `this identity: ${idName(v, v.identity)}`
217
+ return [
218
+ sec({ key: 'repo', label: 'this repo', title: `the secrets of ${v.repo} alone`, strip: repoStrip(v, v.repo), rows: thisRepo, foldedByDefault: false, keep: true }),
219
+ sec({ key: 'identity', label: idLabel, title: v.identity == null ? `${v.repo} speaks as no identity` : `the secrets of the repos that speak as ${idName(v, v.identity)}: ${speakers(v, v.identity).join(', ')}`, strip: v.identity == null ? [] : [v.identity], rows: thisId, foldedByDefault: false, keep: true }),
220
+ sec({ key: 'machine', label: 'this machine', title: `the secrets of the repos on ${v.machine ?? 'this machine'}`, strip: v.machine == null ? [] : [v.machine], rows: thisMachine, foldedByDefault: false, keep: false }),
221
+ everyRepo,
222
+ sec({ key: 'others', label: 'other repos', title: `the secrets ${v.repo} does not read: another repo's, another identity's`, strip: [], rows: subs.flatMap((s) => s.rows), subs, foldedByDefault: true, keep: true }),
223
+ last,
224
+ ]
225
+ }
226
+
227
+ /** a row's name as its section draws it: without the parts up to the one the head already says (`basic-auth` under
228
+ * shop, for `rv/shop/basic-auth`); the whole name where the head says none of them */
229
+ export function shortName(name: string, strip: readonly string[]): string {
230
+ const parts = name.split('/')
231
+ const at = parts.findIndex((p) => strip.includes(p))
232
+ return at < 0 || at === parts.length - 1 ? name : parts.slice(at + 1).join('/')
233
+ }
234
+
235
+ /** the filter: every word of it in the name, what it is for, its scope or what it says */
236
+ export function matches(r: SecretRow, v: SecretsView, q: string): boolean {
237
+ const hay = `${r.name} ${r.service} ${scopeLine(r, v)} ${speakOf(r, v)?.word ?? ''}`.toLowerCase()
238
+ return q.toLowerCase().split(/\s+/).every((w) => w === '' || hay.includes(w))
239
+ }
240
+
241
+ /** the sections a filter keeps: each with its matching rows, one with none left out */
242
+ export function filtered(sections: readonly Section[], v: SecretsView, q: string): Section[] {
243
+ if (q.trim() === '') return [...sections]
244
+ const keep = (rows: readonly SecretRow[]): SecretRow[] => rows.filter((r) => matches(r, v, q))
245
+ return sections
246
+ .map((s) => ({ ...s, rows: keep(s.rows), subs: s.subs == null ? null : s.subs.map((g) => ({ ...g, rows: keep(g.rows) })).filter((g) => g.rows.length > 0) }))
247
+ .filter((s) => s.rows.length > 0)
248
+ }
249
+
250
+ /** what waits on the owner among some rows, counted by its word, the reds first: `1 missing`, `2 scope ?` */
251
+ export function needCounts(rows: readonly SecretRow[], v: SecretsView): { word: string; n: number; tone: Tone }[] {
252
+ const by = new Map<string, { word: string; n: number; tone: Tone }>()
253
+ for (const r of rows) {
254
+ const s = speakOf(r, v)
255
+ if (s == null || !s.needs) continue
256
+ const c = by.get(s.word) ?? { word: s.word, n: 0, tone: s.tone }
257
+ c.n++
258
+ by.set(s.word, c)
259
+ }
260
+ return [...by.values()].sort((a, b) => RANK[a.tone] - RANK[b.tone] || a.word.localeCompare(b.word))
261
+ }
262
+
263
+ /** the rows that say something, in the order the owner acts on them */
264
+ export const speaking = (rows: readonly SecretRow[], v: SecretsView): { r: SecretRow; s: Speak }[] =>
265
+ sortRows(rows, v).flatMap((r) => {
266
+ const s = speakOf(r, v)
267
+ return s == null ? [] : [{ r, s }]
268
+ })
269
+
270
+ /** the one dim line of the rows that do not wait on the owner: `all 12 present`, or the present ones and what stands
271
+ * beside them (`8 present, 1 archived, 1 not set`), '' when every row waits on him. What waits on him is counted
272
+ * apart, in its tone (needCounts) */
273
+ export function quietLine(rows: readonly SecretRow[], v: SecretsView): string {
274
+ if (rows.length === 0) return 'none'
275
+ const by = new Map<string, number>()
276
+ let present = 0
277
+ for (const r of rows) {
278
+ const s = speakOf(r, v)
279
+ if (s?.needs === true) continue
280
+ const word = s != null ? s.word : r.state === 'unread' ? 'not read' : null
281
+ if (word == null) present++
282
+ else by.set(word, (by.get(word) ?? 0) + 1)
283
+ }
284
+ if (present === rows.length) return `all ${rows.length} present`
285
+ return [...(present > 0 ? [`${present} present`] : []), ...[...by].sort(([a], [b]) => a.localeCompare(b)).map(([word, n]) => `${n} ${word}`)].join(', ')
286
+ }
287
+
288
+ /** the commands that use a secret, each copied at a click: the value never leaves the store through the page */
289
+ export function commandsOf(r: SecretRow, v: SecretsView): { label: string; line: string; hint?: string }[] {
290
+ if (r.state === 'archived') return [{ label: 'use it again', line: `sk secret unarchive ${r.name}` }]
291
+ return [
292
+ ...(r.state === 'missing' ? [{ label: 'store its value', line: setLine(v, r.name) }] : []),
293
+ { label: 'read it in a command', line: `K="$(sk secret get ${r.name})" && …` },
294
+ { label: 'export it to a shell', line: `eval "$(sk secret env ${r.name})"`, hint: `it exports ${envVarOf(r.name)}` },
295
+ { label: 'match it with a dashboard', line: `sk secret tail ${r.name}` },
296
+ ...(r.refresh != null ? [{ label: 'refresh it', line: r.refresh }] : []),
297
+ ...(r.state === 'present' ? [{ label: 'store a new value', line: setLine(v, r.name) }, { label: 'put it out of use', line: `sk secret archive ${r.name} --why "<why>"` }] : []),
298
+ ]
299
+ }
@@ -5,6 +5,7 @@ import { isRepoKey, scopeChips, scopesAll, scopeShort, scopeWords, type Scope, t
5
5
  import { houseRootOf } from '../home/home-start.ts'
6
6
  import { loadIdentities, speakerOf } from '../identities/identities.ts'
7
7
  import { loadRepoConfig, type RepoConfig } from '../repo-config.ts'
8
+ import { rowOfName } from './name-template.ts'
8
9
 
9
10
  /** `registered`: the house's registry has a row for the name; without one every repo reads it. `words`: the long
10
11
  * form, a sentence (a file, a hover); `short`: the console's cell; `chips`: what the hub draws */
@@ -14,7 +15,7 @@ type Row = Pick<NonNullable<RepoConfig['creds']>[number], 'name' | 'for'>
14
15
 
15
16
  /** one name against the registry's rows and the house */
16
17
  export function whoReadsIn(name: string, rows: readonly Row[] | undefined, house: ScopeHouse): WhoReads {
17
- const row = rows?.find((r) => r.name === name)
18
+ const row = rowOfName(rows, name)
18
19
  if (row == null) return { name, registered: false, scope: undefined, words: `no registry row yet, so ${scopeWords(undefined, house)}`, short: scopeShort(undefined, house), chips: scopeChips(undefined, house) }
19
20
  return { name, registered: true, scope: row.for, words: scopeWords(row.for, house), short: scopeShort(row.for, house), chips: scopeChips(row.for, house) }
20
21
  }
@@ -0,0 +1,49 @@
1
+ // the live channel of a repo's own page framed in the hub (wiki tools/shipkit/project-pages.md, Hot reload), as a part
2
+ // of the hub page's socket: the hub reads the channel from the page's process and says each piece on the socket, so
3
+ // the frame opens no connection of its own (a browser gives a host six for all its tabs, and each channel held one).
4
+ // POST /api/terminal/frame {page, key, id, path, build}: `id` the page, `path` its channel, a relative path of the
5
+ // page as its client names it, `build` what the client says it runs.
6
+ // The one constraint a reader breaks first: the path is the page's word. It reaches the page's own process under
7
+ // the page's own url and nothing else, so it is a plain relative path: no scheme, no host, no step up, no query
8
+ import { loadPages, type PageRow } from '../pages/unit.ts'
9
+ import { NO_STORE } from '../review/http.ts'
10
+ import { terminalRefusal } from './terminal-guard.ts'
11
+ import { type Follow, followPart, type PartAsk } from './terminal-route.ts'
12
+
13
+ /** a channel's path as a page names it (`live`, `events/live`), or null for anything that could leave the page */
14
+ export function channelPath(v: unknown): string | null {
15
+ if (typeof v !== 'string' || v.length > 200 || !/^[A-Za-z0-9._~-]+(\/[A-Za-z0-9._~-]+)*$/.test(v)) return null
16
+ return v.split('/').some((s) => /^\.+$/.test(s)) ? null : v
17
+ }
18
+
19
+ /** where the channel of a page is read: its process, under the page's own url */
20
+ export const channelUrl = (p: Pick<PageRow, 'url'>, path: string, build: string): string => `${p.url}${path}?build=${encodeURIComponent(build)}`
21
+
22
+ const no = (text: string, status: number): Response => new Response(text, { status, headers: NO_STORE })
23
+
24
+ /** the route. `pages`: the repo's pages (a test's own); `read`: how a channel's url is read. A fetch of this runtime
25
+ * cuts a stream that stays silent for 360 s, and a channel is silent between two edits: the read has no timeout */
26
+ export async function framePart(
27
+ root: string,
28
+ req: Request,
29
+ address: string | null,
30
+ o: { pages?: (root: string) => Promise<Pick<PageRow, 'id' | 'url'>[]>; read?: (url: string, signal: AbortSignal) => ReturnType<Follow> } = {},
31
+ ): Promise<Response> {
32
+ const why = terminalRefusal(req, address)
33
+ if (why != null) return no(why, 403)
34
+ const b = (await req.json().catch(() => null)) as (PartAsk & { id?: unknown; path?: unknown; build?: unknown }) | null
35
+ if (b == null || typeof b !== 'object') return no('the body is no json object', 400)
36
+ const path = channelPath(b.path)
37
+ if (typeof b.id !== 'string' || path == null) return no('a frame\'s channel is asked by its page and a relative path of that page', 400)
38
+ let page: Pick<PageRow, 'id' | 'url'> | undefined
39
+ try {
40
+ page = (await (o.pages ?? loadPages)(root)).find((x) => x.id === b.id)
41
+ } catch (e) {
42
+ return no((e as Error).message, 404)
43
+ }
44
+ if (page == null) return no(`no page ${b.id} in this repo`, 404)
45
+ // cut to its bound, then made well formed: a pair the cut halved would throw where the url is written
46
+ const url = channelUrl(page, path, typeof b.build === 'string' ? b.build.slice(0, 512).toWellFormed() : '')
47
+ const read = o.read ?? ((u, signal) => fetch(u, { signal, timeout: false, headers: { accept: 'text/event-stream' } }))
48
+ return followPart(b, (signal) => read(url, signal))
49
+ }
@@ -1,67 +1,55 @@
1
- // Each Claude Code account at the head of the project list, on every page of the home: its name, the share of its 5
2
- // hour window (s) and of its week (w) it has used, each with the time to its reset, in the status line's own letters,
3
- // so the account with room reads at a glance. The numbers are Claude Code's, as each account's last session saw them
4
- // (agent-time/accounts-usage.ts); the hover says how old they are. Folded to the rail (36 to 52 px), an account is one
5
- // short row: its tag, then two thin bars filling the rest, the 5 hour window over the week, each filled to its share in
6
- // its tone, and once the fuller one passes half, the time until it resets under them; an account with no number is dimmed.
1
+ // Each Claude Code account at the main panel's foot, in every hub window: its name, the share of its 5 hour window (s)
2
+ // and of its week (w) it has used, each with the time to its reset, in the status line's own letters, so the account
3
+ // with room reads at a glance. The numbers are Claude Code's, as each account's last session saw them
4
+ // (agent-time/accounts-usage.ts); the hover says how old they are
5
+ import { computed, untracked } from 'mobx'
7
6
  import { observer } from 'mobx-react-lite'
8
- import { bindingWindow, leftShort, leftWords, toneOf, usageWords, windowAt, type AccountUsage, type UsageWindow } from '../../agent-time/accounts-usage.ts'
7
+ import { useMemo } from 'react'
8
+ import { bindingWindow, leftWords, toneOf, usageWords, windowAt, type AccountUsage, type UsageWindow } from '../../agent-time/accounts-usage.ts'
9
9
  import { Tip } from './floating.tsx'
10
10
  import { minuteNow } from './time-ago.tsx'
11
11
 
12
12
  /** what the line reads: the daemon's last answer and the page's clock */
13
13
  export type UsageHost = { data: { accounts?: AccountUsage[] } | null; clock: { now: number; halfMinute?: number } }
14
14
 
15
- const Meter = ({ k, w, now }: { k: string; w: UsageWindow | null; now: number }) =>
16
- w == null ? <span className="pjm">{k}–</span> : (
17
- <span className={`pjm ${toneOf(w.used)}`}>
18
- {k}{w.used}{w.resetsAt == null ? null : <i>→{leftWords(w.resetsAt - now)}</i>}
19
- </span>
20
- )
21
-
22
- /** one window as a rail bar: an empty track when it is not reported */
23
- const Bar = ({ w }: { w: UsageWindow | null }) => (
24
- <span className={`pjbar${w == null ? '' : ` ${toneOf(w.used)}`}`}>{w == null ? null : <span style={{ width: `${Math.min(100, w.used)}%` }} />}</span>
25
- )
15
+ /** one window as its account shows it: the share used and the time to its reset in words, null when not reported */
16
+ type Face = { used: number; left: string | null } | null
17
+ const faceOf = (w: UsageWindow | null, now: number): Face => (w == null ? null : { used: w.used, left: w.resetsAt == null ? null : leftWords(w.resetsAt - now) })
26
18
 
27
- /** the rail's account, one row: its tag, its two bars beside it, and when its fuller window passed half, the time to
28
- * that window's reset under the bars */
29
- const Rail = ({ a, s, w, now }: { a: AccountUsage; s: UsageWindow | null; w: UsageWindow | null; now: number }) => {
30
- const b = bindingWindow(a, now)
31
- return (
32
- <span className="pjrail" aria-hidden="true">
33
- <span className="pjrtag">{a.tag}</span>
34
- <span className="pjrbars">
35
- <Bar w={s} />
36
- <Bar w={w} />
37
- </span>
38
- {b == null || b.used < 50 || b.resetsAt == null ? null : <span className="pjrleft">{leftShort(b.resetsAt - now)}</span>}
19
+ const Meter = ({ k, f }: { k: string; f: Face }) =>
20
+ f == null ? <span className="pjm">{k}–</span> : (
21
+ <span className={`pjm ${toneOf(f.used)}`}>
22
+ {k}{f.used}{f.left == null ? null : <i>→{f.left}</i>}
39
23
  </span>
40
24
  )
41
- }
42
25
 
43
- const Account = ({ a, now }: { a: AccountUsage; now: number }) => {
44
- const b = bindingWindow(a, now)
45
- const s = windowAt(a.session, now)
46
- const w = windowAt(a.week, now)
26
+ /** the hover's words, with their ages: read while the hover is open */
27
+ const UsageWords = observer(({ a, clock }: { a: AccountUsage; clock: UsageHost['clock'] }) => <>{usageWords(a, minuteNow(clock))}</>)
28
+
29
+ /** an account's numbers wait on the half minute and draw again only when one of their words moved */
30
+ const Account = observer(({ a, clock, compact = false }: { a: AccountUsage; clock: UsageHost['clock']; compact?: boolean }) => {
31
+ // as one string: the same words are the same value, whatever the step of the clock
32
+ const v = JSON.parse(useMemo(() => computed(() => {
33
+ const now = minuteNow(clock)
34
+ const b = bindingWindow(a, now)
35
+ return JSON.stringify({ tone: b == null ? 'none' : toneOf(b.used), s: faceOf(windowAt(a.session, now), now), w: faceOf(windowAt(a.week, now), now) })
36
+ }), [a, clock]).get()) as { tone: string; s: Face; w: Face }
47
37
  return (
48
- <Tip className={`pjacc ${b == null ? 'none' : toneOf(b.used)}`} placement="right-start" tabIndex={0} aria-label={usageWords(a, now)} content={usageWords(a, now)}>
38
+ <Tip className={`pjacc ${v.tone}`} placement="right-start" tabIndex={0} aria-label={usageWords(a, untracked(() => clock.now))} content={<UsageWords a={a} clock={clock} />}>
49
39
  <b>{a.name}</b>
50
- <Meter k="s" w={s} now={now} />
51
- <Meter k="w" w={w} now={now} />
52
- <Rail a={a} s={s} w={w} now={now} />
40
+ {compact ? null : <Meter k="w" f={v.w} />}
41
+ {compact ? null : <Meter k="s" f={v.s} />}
53
42
  </Tip>
54
43
  )
55
- }
44
+ })
56
45
 
57
- export const AccountsLine = observer(({ m }: { m: UsageHost }) => {
46
+ /** `compact`: a folded section's form, each account its name in the colour of its use, the numbers on hover */
47
+ export const AccountsLine = observer(({ m, compact = false }: { m: UsageHost; compact?: boolean }) => {
58
48
  const accounts = m.data?.accounts ?? []
59
49
  if (accounts.length === 0) return null
60
- // the windows' resets read in minutes and hours: the line redraws by the half minute
61
- const now = minuteNow(m.clock)
62
50
  return (
63
- <div className="pjuse" role="group" aria-label="Claude Code accounts: the 5 hour window (s) and the week (w) used, in percent, and the time to each reset">
64
- {accounts.map((a) => <Account key={a.tag} a={a} now={now} />)}
51
+ <div className={`pjuse${compact ? ' compact' : ''}`} role="group" aria-label="Claude Code accounts: the week (w) and the 5 hour window (s) used, in percent, and the time to each reset">
52
+ {accounts.map((a) => <Account key={a.tag} a={a} clock={m.clock} compact={compact} />)}
65
53
  </div>
66
54
  )
67
55
  })
@@ -9,13 +9,14 @@ import { clampCap, DEFAULT_CAP, DEFAULT_MINUTES, idleRow, WINDOW_MINUTES, type A
9
9
  // the words the page and `shipkit cross-repo-activity` share live beside the shapes
10
10
  export { ageShort, CAP_MAX, CAP_MIN, clampCap, DEFAULT_CAP, dirtWords, filesWords, upstreamWords, windowWords } from '../../home/activity-shape.ts'
11
11
  import type { HomeSt } from './home-st.ts'
12
- import { PolledResource } from './polled.ts'
12
+ import { hidden, PolledResource } from './polled.ts'
13
13
  import { ownTrouble, reach } from './reach.ts'
14
14
  import type { PushResult } from '../../fleet/push-fleet.ts'
15
15
 
16
- /** the repos holding commits no remote has: ahead of their upstream, or on a branch with none */
17
- export const unpushedCount = (rows: Pick<ActivityRow, 'ahead' | 'upstream' | 'branch'>[]): number =>
18
- rows.filter((r) => (r.ahead ?? 0) > 0 || (r.upstream == null && r.branch != null)).length
16
+ /** the repos holding commits no remote has: ahead of their upstream, or on a branch with none; never a foreign one,
17
+ * which the push skips */
18
+ export const unpushedCount = (rows: Pick<ActivityRow, 'ahead' | 'upstream' | 'branch' | 'foreign'>[]): number =>
19
+ rows.filter((r) => r.foreign !== true && ((r.ahead ?? 0) > 0 || (r.upstream == null && r.branch != null))).length
19
20
 
20
21
  export const ACTIVITY_POLL_MS = 60_000
21
22
  const MINUTES_KEY = 'home:activity:minutes'
@@ -184,7 +185,7 @@ export class ActivitySt {
184
185
  start(): void {
185
186
  if (this.timer != null) return
186
187
  this.res.run(true)
187
- this.timer = setInterval(() => runInAction(() => { this.now = Date.now() }), 1_000)
188
+ this.timer = setInterval(() => { if (!hidden()) runInAction(() => { this.now = Date.now() }) }, 1_000)
188
189
  }
189
190
 
190
191
  stop(): void {
@@ -14,6 +14,7 @@ import { Icon, ICON } from './icons.tsx'
14
14
  import type { HomeSt } from './home-st.ts'
15
15
  import { checkAddress, plainClick, repoPage } from './home-st.ts'
16
16
  import { stampWords } from './time-ago.tsx'
17
+ import { tip } from './tips.ts'
17
18
 
18
19
  /** the repo's icon and name; a plain click selects it in place */
19
20
  const RepoName = observer(({ app, name }: { app: HomeSt; name: string }) => {
@@ -44,7 +45,7 @@ const Next = observer(({ app }: { app: HomeSt }) => {
44
45
  const st = app.activity
45
46
  return (
46
47
  <button type="button" className="acnext acpill" disabled={st.loading} onClick={() => st.refresh()}
47
- title="read every repo now · the page reads them again every minute while it is shown">
48
+ {...tip('read every repo now · the page reads them again every minute while it is shown')}>
48
49
  <span className={`acring${st.loading ? ' on' : ''}`}>↻</span>
49
50
  {st.loading ? '' : ` ${st.countdown}s`}
50
51
  </button>
@@ -55,8 +56,8 @@ const Next = observer(({ app }: { app: HomeSt }) => {
55
56
  export const Commit = ({ c, now, old }: { c: ActivityCommit; now: number; old: boolean }) => (
56
57
  <>
57
58
  <td className="acsha">{c.sha}</td>
58
- <td className="acwhen" title={stampWords(c.at)}>{ageShort(c.at, now)}</td>
59
- <td className={`actitle ${c.pushed ? 'pushed' : 'unpushed'}${old ? ' old' : ''}`} title={`${old ? 'the last commit, before the window. ' : ''}${c.pushed ? 'pushed' : 'not pushed'}: ${c.title}`}>
59
+ <td className="acwhen" {...tip(stampWords(c.at))}>{ageShort(c.at, now)}</td>
60
+ <td className={`actitle ${c.pushed ? 'pushed' : 'unpushed'}${old ? ' old' : ''}`} {...tip(`${old ? 'the last commit, before the window. ' : ''}${c.pushed ? 'pushed' : 'not pushed'}: ${c.title}`)}>
60
61
  <span className="acmark">{c.pushed ? '✓' : '↑'}</span>
61
62
  {c.branch == null ? null : <span className="acside">{c.branch}</span>}
62
63
  {c.title}
@@ -97,7 +98,7 @@ export const CheckList = observer(({ app, r, which }: { app: HomeSt; r: Activity
97
98
  app.activity.openCheck(r.name, c.id)
98
99
  }}>{c.id}</a>
99
100
  {c.title !== c.id ? <span className="acchktitle">{c.title}</span> : null}
100
- {c.at == null ? null : <span className="acdim" title={stampWords(c.at)}>{ageShort(c.at, now)}</span>}
101
+ {c.at == null ? null : <span className="acdim" {...tip(stampWords(c.at))}>{ageShort(c.at, now)}</span>}
101
102
  </span>
102
103
  {(c.lines ?? (c.line === '' ? [] : [c.line])).map((l, i) => <span key={i} className="acchkline">{l}</span>)}
103
104
  </li>
@@ -169,15 +170,15 @@ const Group = observer(({ app, r, now }: { app: HomeSt; r: ActivityRow; now: num
169
170
  <>
170
171
  <td rowSpan={span} className="acname"><RepoName app={app} name={r.name} /></td>
171
172
  <Status app={app} r={r} span={span} />
172
- <td rowSpan={span} className={`acbranch ${isMainBranch(r.branch) ? 't-ok' : 't-warn'}`} title={`${branch}: ${upstreamWords(r)}`}>{branch}</td>
173
+ <td rowSpan={span} className={`acbranch ${isMainBranch(r.branch) ? 't-ok' : 't-warn'}`} {...tip(`${branch}: ${upstreamWords(r)}`)}>{branch}</td>
173
174
  {/* the lead in to the commit list, on its first line */}
174
175
  <td rowSpan={span} className="acforkcell">
175
- <button type="button" className="acfork" title="open in Fork" aria-label={`open ${r.name} in Fork`} onClick={() => void st.openFork(r.name)}><Icon d={ICON.fork} /></button>
176
+ <button type="button" className="acfork" {...tip('open in Fork')} aria-label={`open ${r.name} in Fork`} onClick={() => void st.openFork(r.name)}><Icon d={ICON.fork} /></button>
176
177
  </td>
177
178
  </>
178
179
  )
179
180
  const rows: ReactNode[] = []
180
- if (r.error != null) rows.push(<td key="e" colSpan={4} className="acerr" title={r.error}>git failed: {r.error}</td>)
181
+ if (r.error != null) rows.push(<td key="e" colSpan={4} className="acerr" {...tip(r.error)}>git failed: {r.error}</td>)
181
182
  else if (dirt !== '') rows.push(
182
183
  <td key="d" colSpan={4} className="acdirty">
183
184
  <Tip className="acdirt" tipClass="acfiles" placement="bottom-start" content={<pre>{filesWords(r)}</pre>}>{dirt}</Tip>
@@ -205,7 +206,7 @@ export const ActivityView = observer(({ app }: { app: HomeSt }) => {
205
206
  <div className="hall activity">
206
207
  <div className="actop">
207
208
  <Bar label="how far back" values={WINDOW_MINUTES} value={st.minutes} words={windowWords} set={(m) => st.setMinutes(m)} />
208
- <label className="accap" title={`the most commits a repo shows, ${CAP_MIN} to ${CAP_MAX}`}>
209
+ <label className="accap" {...tip(`the most commits a repo shows, ${CAP_MIN} to ${CAP_MAX}`)}>
209
210
  {/* uncontrolled while typed, so an emptied box can take a new number; it reads back the clamped cap on blur */}
210
211
  <input type="number" min={CAP_MIN} max={CAP_MAX} step={1} defaultValue={st.cap} aria-label="commits per repo"
211
212
  onChange={(e) => { if (e.currentTarget.value !== '') st.setCap(e.currentTarget.value) }}
@@ -215,7 +216,7 @@ export const ActivityView = observer(({ app }: { app: HomeSt }) => {
215
216
  <Next app={app} />
216
217
  {st.unpushed > 0 || st.pushing ? (
217
218
  <button type="button" className="acpill acpush" disabled={st.pushing} onClick={() => void st.pushAll()}
218
- title="git push in every house repo with unpushed commits; never a force, a repo that fell behind waits for a pull (sk fleet push does the same)">
219
+ {...tip('git push in every house repo with unpushed commits; never a force, a repo that fell behind waits for a pull (sk fleet push does the same)')}>
219
220
  {st.pushing ? 'pushing…' : `↑ push ${st.unpushed} unpushed`}
220
221
  </button>
221
222
  ) : null}
@@ -9,6 +9,7 @@ import type { AdvisorsSt } from './advisors-st.ts'
9
9
  import { Words } from './words.tsx'
10
10
  import { bytesWords } from '../../core/words.ts'
11
11
  import { AdvisorFace, facePhoto } from './advisor-face.tsx'
12
+ import { tip } from './tips.ts'
12
13
 
13
14
  export const day = (iso: string): string => new Date(iso).toLocaleString([], { weekday: 'short', day: 'numeric', month: 'short', hour: '2-digit', minute: '2-digit' })
14
15
 
@@ -21,7 +22,7 @@ export const PendingFiles = ({ of, id, files }: { of: 'advice' | 'proposal'; id:
21
22
  files.length === 0 ? null : (
22
23
  <div className="adv-row">
23
24
  {files.map((f) => (
24
- <a key={f.n} className="adv-chip adv-file" href={`/api/home/advisors/file/${of}/${id}/${f.n}`} target="_blank" rel="noopener noreferrer" title={`${f.type}: opens sandboxed, nothing of it reaches a thread before you accept`}>
25
+ <a key={f.n} className="adv-chip adv-file" href={`/api/home/advisors/file/${of}/${id}/${f.n}`} target="_blank" rel="noopener noreferrer" {...tip(`${f.type}: opens sandboxed, nothing of it reaches a thread before you accept`)}>
25
26
  {f.name} <span className="adv-dim">{bytesWords(f.size)}</span>
26
27
  </a>
27
28
  ))}
@@ -40,8 +41,8 @@ export const ProposalBox = observer(({ adv, p }: { adv: AdvisorsSt; p: ProposalR
40
41
  {p.text !== null ? <Words text={p.text} className="adv-advice-text" /> : null}
41
42
  <PendingFiles of="proposal" id={p.id} files={p.files} />
42
43
  <div className="adv-row">
43
- <button title={`a thread of ${p.repo}, your words naming ${p.name}, its files in your Space; an agent owes it from then`} onClick={() => void adv.post(`/proposal/${p.id}/accept`)}>accept</button>
44
- <button className="ghost" title="nothing reaches any thread; its files leave the advisors' bucket" onClick={() => void adv.post(`/proposal/${p.id}/decline`)}>decline</button>
44
+ <button {...tip(`a thread of ${p.repo}, your words naming ${p.name}, its files in your Space; an agent owes it from then`)} onClick={() => void adv.post(`/proposal/${p.id}/accept`)}>accept</button>
45
+ <button className="ghost" {...tip("nothing reaches any thread; its files leave the advisors' bucket")} onClick={() => void adv.post(`/proposal/${p.id}/decline`)}>decline</button>
45
46
  </div>
46
47
  </div>
47
48
  ))
@@ -59,8 +60,8 @@ export const AdviceBox = observer(({ adv, a, thread }: { adv: AdvisorsSt; a: Adv
59
60
  <PendingFiles of="advice" id={a.id} files={a.files ?? []} />
60
61
  {a.stale !== null ? <div className="adv-warn">{a.stale}: override it and answer yourself</div> : null}
61
62
  <div className="adv-row">
62
- <button disabled={a.stale !== null} title="your own act, exactly as if you did it, its words naming whose advice it was" onClick={() => void adv.post(`/advice/${a.id}/confirm`)}>confirm</button>
63
- <button className="ghost" title="set it aside: you answer as usual" onClick={() => void adv.post(`/advice/${a.id}/override`)}>override</button>
63
+ <button disabled={a.stale !== null} {...tip('your own act, exactly as if you did it, its words naming whose advice it was')} onClick={() => void adv.post(`/advice/${a.id}/confirm`)}>confirm</button>
64
+ <button className="ghost" {...tip('set it aside: you answer as usual')} onClick={() => void adv.post(`/advice/${a.id}/override`)}>override</button>
64
65
  </div>
65
66
  </div>
66
67
  ))