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.
- package/CHANGELOG.md +20 -1
- package/package.json +2 -1
- package/src/advisors/app-graph.ts +1 -1
- package/src/advisors/expose.ts +5 -1
- package/src/advisors/r2.ts +7 -9
- package/src/advisors/routes.ts +29 -2
- package/src/advisors/scan.ts +11 -0
- package/src/agent-time/accounts-usage.ts +8 -0
- package/src/agent-time/claude-sessions.ts +32 -0
- package/src/agent-time/hooks.ts +1 -1
- package/src/agent-time/live.ts +5 -2
- package/src/agent-time/registry.ts +186 -89
- package/src/agent-time/store.ts +6 -4
- package/src/asks/ask-doc.ts +2 -2
- package/src/asks/ask-store.ts +22 -7
- package/src/check.ts +9 -1
- package/src/checks/SK001-package-json-shape.check.ts +1 -0
- package/src/checks/SK003-claude-md-shape.check.ts +1 -0
- package/src/checks/SK004-gitignore-policy.check.ts +12 -6
- package/src/checks/SK008-reviewer-agent.check.ts +4 -7
- package/src/checks/SK013-one-way-in-policy.check.ts +1 -0
- package/src/checks/SK017-vscode-hub-task.check.ts +1 -0
- package/src/checks/SK024-identity-colors.check.ts +1 -1
- package/src/checks/SK027-agent-wiki-links.check.ts +2 -1
- package/src/checks/SK033-global-contribution.check.ts +1 -0
- package/src/checks/SK034-commit-gates-armed.check.ts +1 -0
- package/src/checks/SK039-vscode-watch-generated.check.ts +1 -0
- package/src/checks/SK049-thread-answers-hook.check.ts +9 -5
- package/src/checks/SK050-retired-commands.check.ts +1 -0
- package/src/checks/SK051-no-formatter.check.ts +1 -0
- package/src/cli/channel-run.ts +17 -0
- package/src/cli/cmd_Advisors.ts +28 -7
- package/src/cli/cmd_Asks.ts +2 -2
- package/src/cli/cmd_Backup.ts +5 -1
- package/src/cli/cmd_CacheAudit.ts +1 -1
- package/src/cli/cmd_Channel.ts +43 -0
- package/src/cli/cmd_GlobalProcesses.ts +1 -0
- package/src/cli/cmd_Home.ts +12 -5
- package/src/cli/cmd_Hooks.ts +1 -1
- package/src/cli/cmd_Hq.ts +43 -0
- package/src/cli/cmd_Lanes.ts +15 -3
- package/src/cli/cmd_Media.ts +8 -3
- package/src/cli/cmd_Orchestrator.ts +253 -84
- package/src/cli/cmd_OrchestratorRole.ts +163 -0
- package/src/cli/cmd_Review.ts +142 -165
- package/src/cli/cmd_Secret.ts +44 -14
- package/src/cli/cmd_Shot.ts +2 -4
- package/src/cli/cmd_Sound.ts +1 -0
- package/src/cli/cmd_Urls.ts +3 -3
- package/src/cli/inbox-hook-run.ts +109 -0
- package/src/cli/registry.ts +6 -2
- package/src/cli/review-here.ts +136 -0
- package/src/cli.ts +45 -14
- package/src/collections/actions.ts +5 -4
- package/src/collections/checks.ts +5 -0
- package/src/collections/collection-types.ts +4 -3
- package/src/collections/pings.ts +4 -1
- package/src/collections/providers.ts +6 -4
- package/src/collections/tests.ts +7 -4
- package/src/core/app-icon-frame.ts +62 -0
- package/src/core/app-icon.ts +179 -17
- package/src/core/archived.ts +10 -7
- package/src/core/check-ctx.ts +38 -4
- package/src/core/check-pass.ts +7 -0
- package/src/core/foreign.ts +87 -0
- package/src/core/gui-color.ts +75 -0
- package/src/core/hub-theme.ts +1 -3
- package/src/core/layout.ts +3 -0
- package/src/core/machine-commit.ts +9 -1
- package/src/core/one-lib.ts +2 -1
- package/src/core/one-way-in-policy.ts +17 -12
- package/src/core/owner-word-policy.ts +123 -0
- package/src/core/panel-shades.ts +140 -0
- package/src/core/repo-gui-color.ts +16 -0
- package/src/core/role-policy.ts +17 -0
- package/src/core/scope.ts +6 -3
- package/src/core/tmux-policy.ts +264 -0
- package/src/core/unit-icon.ts +43 -0
- package/src/fleet/push-fleet.ts +2 -0
- package/src/fleet/scan-fleet.ts +3 -0
- package/src/gate/cache-audit.ts +7 -1
- package/src/gate/gate-checks.ts +14 -9
- package/src/gate/run-fix.ts +30 -5
- package/src/gate/run-fixers.ts +8 -3
- package/src/home/activity-shape.ts +2 -0
- package/src/home/activity.ts +2 -1
- package/src/home/daemon-guard.ts +20 -2
- package/src/home/daemon-jobs.ts +26 -18
- package/src/home/gui-app/ShipkitGui.swift +2012 -144
- package/src/home/gui-app/icon.svg +8 -0
- package/src/home/gui-app.ts +94 -30
- package/src/home/home-routes.ts +53 -9
- package/src/home/home-start.ts +27 -3
- package/src/home/inbox-shape.ts +7 -3
- package/src/home/log-follow.ts +117 -0
- package/src/home/machine-fold.ts +1 -1
- package/src/home/open-app.ts +9 -3
- package/src/home/page-build.ts +5 -1
- package/src/home/page-held.ts +1 -1
- package/src/home/pm-config.ts +0 -8
- package/src/home/pm.ts +62 -5
- package/src/home/process-apps.ts +70 -23
- package/src/home/process-rows.ts +16 -1
- package/src/home/push-sources.ts +18 -13
- package/src/home/resources.ts +16 -7
- package/src/home/run-daemon.ts +4 -1
- package/src/home/run-pm.ts +1 -1
- package/src/home/serve-daemon.ts +13 -4
- package/src/home/serve-web.ts +141 -17
- package/src/home/space-page.ts +3 -3
- package/src/home/space-route.ts +2 -2
- package/src/home/supervise.ts +2 -1
- package/src/home/vault-page.ts +2 -1
- package/src/home/web-places.ts +239 -0
- package/src/home/widgets.ts +16 -2
- package/src/hooks/commit-message.ts +11 -9
- package/src/hooks/one-way-in-guard.ts +145 -68
- package/src/hooks/run-hooks.ts +15 -5
- package/src/hooks/shared-file.ts +273 -83
- package/src/hooks/shell-writes.ts +620 -0
- package/src/hooks/write-log.ts +149 -0
- package/src/hq/door-route.ts +63 -7
- package/src/hq/door.ts +45 -12
- package/src/hq/history-send.ts +3 -1
- package/src/hq/hq-db.ts +10 -3
- package/src/hq/hq-local.ts +24 -5
- package/src/hq/hq-routes.ts +3 -1
- package/src/hq/hq-store.ts +9 -3
- package/src/hq/kinds/index.ts +2 -1
- package/src/hq/kinds/kind.ts +9 -4
- package/src/hq/kinds/presence-rule.ts +56 -0
- package/src/hq/kinds/presence.ts +210 -0
- package/src/hq/kinds/report.ts +8 -5
- package/src/hq/lead-order.ts +68 -0
- package/src/hq/outbox.ts +7 -0
- package/src/hq/replica.ts +5 -7
- package/src/hq/report-facts.ts +14 -7
- package/src/hq/report.ts +47 -2
- package/src/hq/switch.ts +1 -0
- package/src/hq/terminal-hop.ts +64 -0
- package/src/hq/thread-sync.ts +13 -6
- package/src/http/door-forward.ts +10 -12
- package/src/http/door-names.ts +9 -0
- package/src/http/hop-caller.ts +23 -0
- package/src/http/hop-names.ts +14 -0
- package/src/http/loopback-serve.ts +28 -6
- package/src/http/owner-word.ts +128 -0
- package/src/http/same-origin.ts +12 -0
- package/src/{serve → http}/secret-gate.ts +3 -3
- package/src/ledger/run-log.ts +25 -1
- package/src/media-store/backup/sources.ts +53 -6
- package/src/media-store/backup/thread-copy.ts +9 -5
- package/src/media-store/copy/config.ts +10 -9
- package/src/media-store/daemon.ts +5 -2
- package/src/media-store/put.ts +3 -0
- package/src/media-store/space.ts +14 -16
- package/src/media-store/upload.ts +4 -0
- package/src/messages/collection.ts +2 -2
- package/src/messages/model.ts +6 -1
- package/src/messages/routes.ts +3 -0
- package/src/orchestrator/brief.md +8 -6
- package/src/orchestrator/channel-declare.ts +58 -0
- package/src/orchestrator/channel.ts +226 -0
- package/src/orchestrator/guards.ts +12 -3
- package/src/orchestrator/host.ts +35 -0
- package/src/orchestrator/lead-shape.ts +86 -0
- package/src/orchestrator/now.ts +88 -0
- package/src/orchestrator/phone.ts +4 -1
- package/src/orchestrator/places-file.ts +38 -0
- package/src/orchestrator/places-look.ts +180 -0
- package/src/orchestrator/places-shape.ts +151 -0
- package/src/orchestrator/places.ts +50 -0
- package/src/orchestrator/presence-shape.ts +13 -2
- package/src/orchestrator/presence.ts +26 -15
- package/src/orchestrator/push.ts +5 -10
- package/src/orchestrator/role-shape.ts +270 -0
- package/src/orchestrator/role.ts +242 -0
- package/src/orchestrator/routes.ts +136 -31
- package/src/orchestrator/sessions-shape.ts +78 -0
- package/src/orchestrator/sessions.ts +86 -0
- package/src/orchestrator/share.ts +71 -0
- package/src/orchestrator/start-notice.ts +61 -0
- package/src/orchestrator/start.ts +137 -0
- package/src/orchestrator/started.ts +55 -0
- package/src/orchestrator/stuck.ts +196 -0
- package/src/orchestrator/unheard.ts +18 -7
- package/src/pages/frame-client.ts +44 -6
- package/src/problems/failure-words.ts +80 -0
- package/src/release/run-bump.ts +26 -5
- package/src/release/run-release.ts +34 -14
- package/src/repo-config.ts +37 -9
- package/src/review/aside-at.ts +19 -0
- package/src/review/band.ts +3 -3
- package/src/review/doc-save.ts +1 -1
- package/src/review/inbox-hook.ts +12 -4
- package/src/review/inbox-read.ts +20 -7
- package/src/review/instruction-guards.ts +137 -0
- package/src/review/instructions.ts +14 -2
- package/src/review/item-db.ts +52 -2
- package/src/review/mentions.ts +6 -4
- package/src/review/model.ts +3 -2
- package/src/review/parties.ts +88 -19
- package/src/review/push.ts +32 -15
- package/src/review/routes.ts +12 -4
- package/src/review/secret-route.ts +5 -5
- package/src/review/snooze.ts +1 -16
- package/src/review/store-parties.ts +4 -2
- package/src/review/take-back.ts +2 -1
- package/src/review/threads.ts +13 -2
- package/src/review/unit.ts +3 -2
- package/src/review/view-layout.ts +8 -1
- package/src/review/watchers.ts +25 -4
- package/src/secrets/key-pair.ts +14 -0
- package/src/secrets/lapse.ts +3 -3
- package/src/secrets/manager.ts +5 -1
- package/src/secrets/name-template.ts +83 -0
- package/src/secrets/name.ts +3 -0
- package/src/secrets/read.ts +10 -6
- package/src/secrets/secrets-view.ts +299 -0
- package/src/secrets/who-reads.ts +2 -1
- package/src/serve/frame-part.ts +49 -0
- package/src/serve/hub-app/accounts-line.tsx +33 -45
- package/src/serve/hub-app/activity-st.ts +6 -5
- package/src/serve/hub-app/activity-view.tsx +10 -9
- package/src/serve/hub-app/advice-box.tsx +6 -5
- package/src/serve/hub-app/advisor-app.tsx +2 -0
- package/src/serve/hub-app/advisor-face.tsx +3 -2
- package/src/serve/hub-app/advisor.html +1 -0
- package/src/serve/hub-app/advisors-view.tsx +52 -10
- package/src/serve/hub-app/advisors.css +4 -0
- package/src/serve/hub-app/app-bridge.ts +31 -5
- package/src/serve/hub-app/asked-page.ts +24 -0
- package/src/serve/hub-app/asks-page.tsx +10 -6
- package/src/serve/hub-app/auto-text.tsx +7 -5
- package/src/serve/hub-app/card-head.tsx +3 -2
- package/src/serve/hub-app/check-view.tsx +10 -9
- package/src/serve/hub-app/checks-svc.ts +96 -32
- package/src/serve/hub-app/clock-svc.ts +24 -8
- package/src/serve/hub-app/code-copy.ts +1 -1
- package/src/serve/hub-app/col-card.tsx +2 -1
- package/src/serve/hub-app/col-list-page.tsx +12 -6
- package/src/serve/hub-app/col-list-st.ts +12 -2
- package/src/serve/hub-app/col-tables-view.tsx +8 -44
- package/src/serve/hub-app/col-tables.ts +0 -14
- package/src/serve/hub-app/cols-svc.ts +6 -12
- package/src/serve/hub-app/columns.ts +94 -0
- package/src/serve/hub-app/comfy-view.tsx +8 -7
- package/src/serve/hub-app/commands/commands-page.tsx +4 -3
- package/src/serve/hub-app/commands/commands-st.ts +2 -2
- package/src/serve/hub-app/controls.css +69 -23
- package/src/serve/hub-app/cycle-button.tsx +2 -1
- package/src/serve/hub-app/database-st.ts +1 -1
- package/src/serve/hub-app/database-view.tsx +4 -2
- package/src/serve/hub-app/deaf.tsx +27 -0
- package/src/serve/hub-app/dock-st.ts +21 -16
- package/src/serve/hub-app/dock-view.tsx +19 -12
- package/src/serve/hub-app/empty-section.tsx +30 -0
- package/src/serve/hub-app/entry-bar.css +1 -1
- package/src/serve/hub-app/entry-bar.tsx +11 -6
- package/src/serve/hub-app/entry-list.css +32 -0
- package/src/serve/hub-app/entry-list.tsx +123 -0
- package/src/serve/hub-app/entry-pick.ts +1 -1
- package/src/serve/hub-app/entry-sections.ts +140 -0
- package/src/serve/hub-app/event-stream-reader.ts +56 -0
- package/src/serve/hub-app/floating.tsx +68 -14
- package/src/serve/hub-app/geometry-view.tsx +3 -2
- package/src/serve/hub-app/git-view.tsx +3 -2
- package/src/serve/hub-app/hash-route.ts +14 -2
- package/src/serve/hub-app/header-bar.tsx +53 -36
- package/src/serve/hub-app/home-st.ts +131 -14
- package/src/serve/hub-app/home-strip.css +24 -13
- package/src/serve/hub-app/home-strip.tsx +131 -66
- package/src/serve/hub-app/home.html +5 -0
- package/src/serve/hub-app/hub-app.tsx +94 -102
- package/src/serve/hub-app/hub.css +61 -94
- package/src/serve/hub-app/icons.tsx +16 -0
- package/src/serve/hub-app/identities-st.ts +19 -54
- package/src/serve/hub-app/identities-view.tsx +25 -24
- package/src/serve/hub-app/identity-address.ts +2 -2
- package/src/serve/hub-app/in-sight.ts +10 -0
- package/src/serve/hub-app/inbox-st.ts +20 -2
- package/src/serve/hub-app/inbox-view.tsx +16 -9
- package/src/serve/hub-app/inbox.css +1 -0
- package/src/serve/hub-app/index.html +5 -0
- package/src/serve/hub-app/insights-view.tsx +6 -5
- package/src/serve/hub-app/instructions.css +4 -1
- package/src/serve/hub-app/kept-cols.tsx +83 -20
- package/src/serve/hub-app/kept-width.tsx +76 -0
- package/src/serve/hub-app/keys.ts +116 -38
- package/src/serve/hub-app/layout-st.ts +109 -99
- package/src/serve/hub-app/lightbox-zoom.css +36 -0
- package/src/serve/hub-app/list-filter.tsx +15 -6
- package/src/serve/hub-app/list-head.tsx +29 -0
- package/src/serve/hub-app/list-row.ts +8 -0
- package/src/serve/hub-app/list-walk.ts +26 -105
- package/src/serve/hub-app/live-socket.ts +274 -0
- package/src/serve/hub-app/live-sources.ts +189 -0
- package/src/serve/hub-app/live-svc.ts +2 -2
- package/src/serve/hub-app/machine-st.ts +75 -14
- package/src/serve/hub-app/main-panel.css +211 -0
- package/src/serve/hub-app/main-panel.tsx +259 -0
- package/src/serve/hub-app/md.ts +4 -4
- package/src/serve/hub-app/media-svc.ts +5 -5
- package/src/serve/hub-app/media-view.tsx +13 -12
- package/src/serve/hub-app/messages/messages-page.tsx +8 -7
- package/src/serve/hub-app/messages/messages-st.ts +5 -2
- package/src/serve/hub-app/new-thread-st.ts +170 -0
- package/src/serve/hub-app/new-thread.tsx +133 -107
- package/src/serve/hub-app/orchestrator-line.tsx +115 -45
- package/src/serve/hub-app/orchestrator-places.tsx +86 -0
- package/src/serve/hub-app/orchestrator.css +57 -5
- package/src/serve/hub-app/page-keys.ts +107 -68
- package/src/serve/hub-app/page-reload.ts +46 -6
- package/src/serve/hub-app/pages-frames.tsx +40 -3
- package/src/serve/hub-app/pages-svc.ts +3 -1
- package/src/serve/hub-app/palette-st.ts +198 -43
- package/src/serve/hub-app/palette-view.tsx +32 -8
- package/src/serve/hub-app/panel-head-action.tsx +39 -0
- package/src/serve/hub-app/panel-head.tsx +70 -0
- package/src/serve/hub-app/panel-repo.ts +42 -0
- package/src/serve/hub-app/panel-source.ts +195 -0
- package/src/serve/hub-app/panel-tint.css +6 -0
- package/src/serve/hub-app/panel-tint.ts +23 -0
- package/src/serve/hub-app/panel-walk.ts +107 -0
- package/src/serve/hub-app/pill-row.tsx +2 -1
- package/src/serve/hub-app/place-path.ts +4 -0
- package/src/serve/hub-app/places-svc.ts +75 -0
- package/src/serve/hub-app/plan-view.tsx +3 -2
- package/src/serve/hub-app/polled.ts +11 -1
- package/src/serve/hub-app/presence-st.ts +66 -32
- package/src/serve/hub-app/processes-view.tsx +2 -2
- package/src/serve/hub-app/project-bar.tsx +116 -0
- package/src/serve/hub-app/project-list.css +20 -173
- package/src/serve/hub-app/project-list.tsx +30 -298
- package/src/serve/hub-app/projects-svc.ts +59 -32
- package/src/serve/hub-app/push-sign.tsx +2 -1
- package/src/serve/hub-app/push-svc.ts +86 -69
- package/src/serve/hub-app/quiet-st.ts +5 -3
- package/src/serve/hub-app/rail-groups.ts +144 -0
- package/src/serve/hub-app/reader-chips.tsx +2 -1
- package/src/serve/hub-app/recordings-st.ts +2 -1
- package/src/serve/hub-app/recordings-view.tsx +19 -47
- package/src/serve/hub-app/recordings.css +0 -2
- package/src/serve/hub-app/reflections-page.tsx +10 -6
- package/src/serve/hub-app/releases/releases-page.tsx +6 -5
- package/src/serve/hub-app/repo-sections.ts +127 -38
- package/src/serve/hub-app/repo-st.ts +57 -36
- package/src/serve/hub-app/review/advisor-bar.tsx +3 -2
- package/src/serve/hub-app/review/ask-proof.tsx +79 -0
- package/src/serve/hub-app/review/attach-view.tsx +11 -10
- package/src/serve/hub-app/review/box-view.ts +479 -0
- package/src/serve/hub-app/review/box-zoom.tsx +70 -0
- package/src/serve/hub-app/review/diff-view.tsx +3 -2
- package/src/serve/hub-app/review/doc-body.tsx +2 -1
- package/src/serve/hub-app/review/dock.tsx +3 -2
- package/src/serve/hub-app/review/draft-body.tsx +4 -3
- package/src/serve/hub-app/review/faces.tsx +0 -8
- package/src/serve/hub-app/review/group-block.tsx +8 -7
- package/src/serve/hub-app/review/heard-line.tsx +4 -3
- package/src/serve/hub-app/review/instructions-view.tsx +3 -2
- package/src/serve/hub-app/review/item-verdict.tsx +40 -40
- package/src/serve/hub-app/review/kind-states.tsx +5 -4
- package/src/serve/hub-app/review/kit.tsx +24 -4
- package/src/serve/hub-app/review/lane-bar.tsx +30 -28
- package/src/serve/hub-app/review/lightbox.tsx +6 -4
- package/src/serve/hub-app/review/live-bar.tsx +7 -6
- package/src/serve/hub-app/review/live-view.tsx +6 -5
- package/src/serve/hub-app/review/object-card.tsx +2 -1
- package/src/serve/hub-app/review/object-panel.tsx +11 -10
- package/src/serve/hub-app/review/pano-view.tsx +3 -2
- package/src/serve/hub-app/review/question-views.tsx +6 -5
- package/src/serve/hub-app/review/review-cells.tsx +21 -20
- package/src/serve/hub-app/review/review-host.ts +3 -0
- package/src/serve/hub-app/review/review-kit.ts +7 -5
- package/src/serve/hub-app/review/review-list.tsx +98 -52
- package/src/serve/hub-app/review/review-page.tsx +3 -3
- package/src/serve/hub-app/review/review-st.ts +70 -14
- package/src/serve/hub-app/review/review-thread.tsx +234 -138
- package/src/serve/hub-app/review/review-views.tsx +166 -191
- package/src/serve/hub-app/review/space3d.tsx +17 -9
- package/src/serve/hub-app/review/thread-close.tsx +24 -32
- package/src/serve/hub-app/review/thread-st.ts +39 -25
- package/src/serve/hub-app/review/trailer-body.tsx +5 -4
- package/src/serve/hub-app/review/trailer-page.tsx +18 -16
- package/src/serve/hub-app/review/trailer-st.ts +3 -2
- package/src/serve/hub-app/review/trailer-timeline.tsx +10 -9
- package/src/serve/hub-app/review/trailer-voices.tsx +29 -28
- package/src/serve/hub-app/review.css +159 -42
- package/src/serve/hub-app/row-acts.tsx +126 -0
- package/src/serve/hub-app/row-face.tsx +29 -0
- package/src/serve/hub-app/running-rows.tsx +142 -0
- package/src/serve/hub-app/running-st.ts +110 -0
- package/src/serve/hub-app/search-view.tsx +3 -2
- package/src/serve/hub-app/secrets-page.tsx +290 -0
- package/src/serve/hub-app/secrets-st.ts +181 -0
- package/src/serve/hub-app/secrets.css +65 -0
- package/src/serve/hub-app/section-head.tsx +3 -2
- package/src/serve/hub-app/session-chips.tsx +55 -0
- package/src/serve/hub-app/shell.ts +56 -0
- package/src/serve/hub-app/site/site-part.tsx +6 -5
- package/src/serve/hub-app/site/site-st.ts +0 -6
- package/src/serve/hub-app/site.css +0 -1
- package/src/serve/hub-app/social/calendar.tsx +7 -6
- package/src/serve/hub-app/social/comms-page.tsx +29 -26
- package/src/serve/hub-app/social/group-editor.tsx +2 -1
- package/src/serve/hub-app/social/kit.tsx +12 -11
- package/src/serve/hub-app/social/next-release.tsx +3 -2
- package/src/serve/hub-app/social/post-card.tsx +21 -20
- package/src/serve/hub-app/social/post-page.tsx +2 -1
- package/src/serve/hub-app/social/problems.tsx +3 -2
- package/src/serve/hub-app/social/social-page.tsx +29 -27
- package/src/serve/hub-app/social/social-st.ts +4 -2
- package/src/serve/hub-app/social/stage-popup.tsx +11 -10
- package/src/serve/hub-app/social.css +7 -5
- package/src/serve/hub-app/source-acts.ts +79 -0
- package/src/serve/hub-app/source-page.tsx +17 -0
- package/src/serve/hub-app/space-view.tsx +5 -4
- package/src/serve/hub-app/stores/stores-page.tsx +21 -19
- package/src/serve/hub-app/stores/stores-st.ts +1 -1
- package/src/serve/hub-app/stores.css +1 -1
- package/src/serve/hub-app/terminal-history-st.ts +112 -0
- package/src/serve/hub-app/terminal-keys.ts +79 -0
- package/src/serve/hub-app/terminal-lib.ts +110 -0
- package/src/serve/hub-app/terminal-links.ts +55 -0
- package/src/serve/hub-app/terminal-list-st.ts +304 -0
- package/src/serve/hub-app/terminal-log-st.ts +242 -0
- package/src/serve/hub-app/terminal-out.ts +135 -0
- package/src/serve/hub-app/terminal-pages.tsx +115 -0
- package/src/serve/hub-app/terminal-panel.tsx +60 -9
- package/src/serve/hub-app/terminal-sources.tsx +335 -0
- package/src/serve/hub-app/terminal-st.ts +447 -167
- package/src/serve/hub-app/terminal-stream.ts +233 -0
- package/src/serve/hub-app/terminal-tab.tsx +64 -0
- package/src/serve/hub-app/terminal-widths.ts +30 -0
- package/src/serve/hub-app/terminal.css +50 -4
- package/src/serve/hub-app/test-view.tsx +5 -3
- package/src/serve/hub-app/tests-view.tsx +16 -15
- package/src/serve/hub-app/theme-st.ts +5 -0
- package/src/serve/hub-app/thread-row.tsx +39 -31
- package/src/serve/hub-app/time-ago.tsx +3 -2
- package/src/serve/hub-app/time-view.tsx +2 -1
- package/src/serve/hub-app/time.css +1 -1
- package/src/serve/hub-app/timeline-chart.tsx +5 -4
- package/src/serve/hub-app/timeline-view.tsx +10 -9
- package/src/serve/hub-app/tips.ts +247 -0
- package/src/serve/hub-app/tree-build.ts +40 -8
- package/src/serve/hub-app/tree-svc.ts +167 -134
- package/src/serve/hub-app/unit-icons.ts +26 -0
- package/src/serve/hub-app/url-address.ts +154 -0
- package/src/serve/hub-app/url-faces.ts +88 -0
- package/src/serve/hub-app/url-forms.tsx +183 -0
- package/src/serve/hub-app/urls-svc.ts +167 -5
- package/src/serve/hub-app/urls-view.tsx +56 -20
- package/src/serve/hub-app/urls.css +26 -0
- package/src/serve/hub-app/vault-view.tsx +5 -4
- package/src/serve/hub-app/veille/veille-page.tsx +34 -33
- package/src/serve/hub-app/veille/veille-st.ts +6 -3
- package/src/serve/hub-app/view-layout.css +3 -3
- package/src/serve/hub-app/when-view.tsx +5 -4
- package/src/serve/hub-app/wikis-view.tsx +6 -5
- package/src/serve/hub-app/words.tsx +9 -2
- package/src/serve/hub-runtime.ts +3 -2
- package/src/serve/orchestrator-host.ts +58 -0
- package/src/serve/page-live.ts +147 -0
- package/src/serve/project-gutter-route.ts +63 -2
- package/src/serve/read-worker.ts +7 -2
- package/src/serve/runs-stamp.ts +33 -0
- package/src/serve/secrets-read.ts +156 -0
- package/src/serve/serve-hub.ts +71 -22
- package/src/serve/terminal-claudes.ts +185 -0
- package/src/serve/terminal-guard.ts +10 -5
- package/src/serve/terminal-host.ts +517 -0
- package/src/serve/terminal-record.ts +104 -0
- package/src/serve/terminal-route.ts +466 -103
- package/src/serve/terminal-shells.ts +3 -0
- package/src/serve/terminal-watch.ts +102 -0
- package/src/shipkit-files.ts +9 -4
- package/src/shot/client.ts +4 -9
- package/src/shot/shooter.ts +2 -4
- package/src/shot/shot-ask.ts +2 -7
- package/src/shot/shot-theme.ts +6 -17
- package/src/social/routes.ts +2 -2
- package/src/social/writes.ts +3 -0
- package/src/suite/test-units.ts +6 -2
- package/src/trailer/sound/eleven.ts +1 -0
- package/src/urls/added.ts +111 -0
- package/src/urls/icons.ts +294 -0
- package/src/urls/places.ts +139 -0
- package/src/urls/routes.ts +17 -7
- package/src/urls/rows.ts +48 -15
- package/src/urls/unit.ts +57 -3
- package/src/urls/write-routes.ts +207 -0
- package/src/vault/vault-destroy.ts +2 -1
- package/src/vault/vault-import.ts +4 -11
- package/src/vault/vault-restore.ts +3 -2
- package/src/veille/chrome.ts +18 -3
- package/src/veille/identity.ts +6 -0
- package/src/view3d/cam.ts +30 -46
- package/src/view3d/lib.ts +20 -2
- package/src/view3d/viewer.ts +62 -88
- package/src/wiki/agent-paths.ts +2 -1
- package/src/orchestrator/deliver.ts +0 -81
- package/src/orchestrator/drill.ts +0 -129
- package/src/orchestrator/keeper.ts +0 -332
- package/src/orchestrator/pm.ts +0 -20
- package/src/orchestrator/state.ts +0 -92
- package/src/orchestrator/switch.ts +0 -86
- package/src/orchestrator/tmux.ts +0 -82
- package/src/serve/hub-app/rail-fly.tsx +0 -95
- package/src/serve/hub-app/side-lists.ts +0 -72
- package/src/serve/hub-app/sidebar.tsx +0 -62
- package/src/serve/hub-app/tree-row.tsx +0 -125
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## 2.30.0
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
- **One project on several machines.** Each machine tells the hq who hears its threads, so a word on a thread nobody holds is answered by one session only. The owner picks the default session by a click on its chip, and where a project runs (`sk place <repo> on <machine…>`); pm starts a project's login processes only where it is placed.
|
|
6
|
+
- **Another machine's terminals and urls in the local hub.** A machine's terminals open and type from the hq's Mac through its door, only while that machine's own switch is on (`sk hq terminals on`), never from the phone. Its declared urls (never a login) list under their env and open through the door, which reaches only a url that machine declares now.
|
|
7
|
+
- **Urls and their logins from the hub.** A « + » adds a url, a « ⋯ » opens it in a native tab, in the identity's Chrome profile as a popup, or as a preview. A login typed in the hub goes to the vault under `rv/<repo>/url/<url>/<login>`, one template row of the registry. A native tab wears the url's login chips; a copy is marked concealed and cleared after 90 s. Urls group under dev, prod and ext.
|
|
8
|
+
- **`foreign: true`** keeps a repo that is not the owner's to publish on this machine: no push, no release, nothing to the Space or the hq, no git hook armed, no repair writing a file the team tracks, no team suite on a save.
|
|
9
|
+
- **Sessions, and one default per project.** The orchestrator is gone: every top level session hears its own threads, and one session per project is the default that also hears the threads nobody holds (`sk session`, `sk session default`; `sk orchestrator …` still runs and names its new form). The threads head shows one chip per live session, the new thread popup picks the session a thread goes to, and + in CLAUDE starts a session on the account picked. Every agent hears with `sk thread watch --mine --house --once` in the background, run again after each burst.
|
|
10
|
+
- **The main panel opens with the project's header** (its icon, name and colour), and every long list panel gets a head with a tally, sections that fold and a search.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **A failed hub request says its reason** instead of pointing to a log, and a repo's config loads in every process without the lib in its node_modules.
|
|
15
|
+
- **A click on a verdict face opens a note box**; Enter sends the verdict with its note.
|
|
16
|
+
- **Starting a session starts the hub's terminal server when none runs**, says why when it starts nothing, and offers only free accounts.
|
|
17
|
+
- **App icons** wear a plate lit from its centre and a rim in a deeper shade of their own colour; the home app has its own mark.
|
|
18
|
+
- **One thread store is one store** across a repo's worktrees, so a word prints once.
|
|
19
|
+
|
|
1
20
|
## 2.29.0
|
|
2
21
|
|
|
3
22
|
### Added
|
|
@@ -1241,7 +1260,7 @@
|
|
|
1241
1260
|
- **A declared slow suite sits at its file, says where it runs, and has a page.** Its row was filed under an invented `health/release-unit/<dir>/` folder, so a suite with a real file on disk appeared in a directory that does not exist; it sits at that file now, with `file` set and `virtual` gone, and the only virtual case left is a declaration naming a file nobody wrote. Its note read `slow`, the config keyword rather than an answer, and reads `release only`. And its page said "this row is not a gate unit" and stopped, which made every suite row a dead end: a suite has its own page now, with what it is and where it was declared, `catches` and `why not fast` as the two answers `defineRepo` demands, and release only with the button back to the quick tier, offered for a ROOT declaration only, since the managed block owns the root `tests` key and a release unit's own entry must be edited where it lives. Honest gap: no per suite timing is persisted anywhere, so the page states the quick tier BUDGET it broke rather than inventing a duration.
|
|
1242
1261
|
- **`shipkit config-keys`: the repo config surface documents itself.** Every `repo.config.ts` key and every key nested under one, rendered from the JSDoc above the field into markdown, json, or a marked block inside a docs page (`--out`, `--check`, the shape `shipkit commands` already uses). `--undocumented` names the keys that carry no doc comment and exits non zero, because a key nobody documented is a key nobody uses. `src/core/config-keys.ts` is the scanner: it follows an import to the type a field names and expands an inline object, and it follows only a bare identifier, since a scanner guessing its way into a type documents the wrong shape. Every field of `RepoConfig` and of the types under it now carries a doc comment, the ones that never had one included: `logDir`, `untrackGenerated`, `contracts.extra`, `creds`, and a task's `env`, `cwd` and `group`.
|
|
1243
1262
|
|
|
1244
|
-
- **A secret and a graph say what they are, in colour.** Both kinds carried a glyph and a hue already and no state at all, so a present secret and a clean graph read the same plain white as a row nobody measured. A SECRET is green when it is present AND the last run carries a wire line naming it as resolved, orange when present with that probe failed or absent, red when a page requires it and it is not there. Only the failed probe carries a `severity`: "nobody probed this" is a colour on the tree, never an item asking for hands, and a feed full of silent yellows is the progress spam the feed exists to avoid. The row says which case it is in words, so the colour is not the only clue. The probe result is CARRIED now, off the `STATUS.md` wire lines that name the secret as a WHOLE token, so a line about `rv/
|
|
1263
|
+
- **A secret and a graph say what they are, in colour.** Both kinds carried a glyph and a hue already and no state at all, so a present secret and a clean graph read the same plain white as a row nobody measured. A SECRET is green when it is present AND the last run carries a wire line naming it as resolved, orange when present with that probe failed or absent, red when a page requires it and it is not there. Only the failed probe carries a `severity`: "nobody probed this" is a colour on the tree, never an item asking for hands, and a feed full of silent yellows is the progress spam the feed exists to avoid. The row says which case it is in words, so the colour is not the only clue. The probe result is CARRIED now, off the `STATUS.md` wire lines that name the secret as a WHOLE token, so a line about `rv/demo/token` says nothing about `rv/demo/token-2`. A GRAPH is green when its lint is clean, orange with its orphan and dangling counts, and plain when it carries no lint, which is a base wiki another repo owns and must never be double judged here. The five colour rules live in one file, `src/collections/state-rules.ts`, one pure function each, with the asset rule moved in beside them.
|
|
1245
1264
|
- **A repo's pending reflections are a resource kind.** The `.shipkit/reflections/` queue was readable only from the repo that OWNS the wiki, whose harvest check scans every repo beside it, so the repo that logged the friction had no surface showing what it was still owed. Every pending `*.md` is a `reflection` row now, at its own file path, named by its first heading, with `request` or `note` in the note slot and its own glyph and hue in the one kind mapping. The feed line names the file and the shape, and a change request missing sections lists them the way the harvest check does. Always YELLOW: the file waits on a human process and nothing is broken, so it reaches `shipkit needs`, reads orange on the tree, and never reaches the pings, which fire on red only. `README.md` is the scaffold's own seed and never a row, so a repo with only the seed shows nothing. The six section headings that tell a change request from a plain note live here now (`src/reflections/reflections-queue.ts`) rather than in one consumer, and the resource KIND list is ONE array (`RESOURCE_TYPES`) that the wire types re-export, since a kind known on one side of the wire only is how a new row arrives with a hole where its glyph should be.
|
|
1246
1265
|
- **The hub design pass, round two: the glyph on the right, one duration unit, a check page of widgets.** The state glyph sat between the run action and the duration, so the widest column on the row pushed the one character that says what a row IS. The slots read name, run, duration, note, then the glyph on the right edge, and a guard reads the page source as data and fails an order whose last slot is not the glyph. Every row also carries its KIND in its own slot after the caret, one glyph and one hue per kind, where the hue is the kind's identity and never a state, with a `(?)` legend in the tree header naming each glyph. The fold marker is an 11px chevron drawn inline, turning rather than swapping glyph, with the whole first column as its hit target. **ONE duration unit**: milliseconds everywhere, grouped by a thin space, so `6 600ms`, `129ms` and `80ms` compare by eye, coloured by one table (green under 500ms, plain under 2000ms, orange under 10000ms, red above it or past half the check's kill time) that the tree row and the check page both read. **The check page is widgets**: a header with the name, the kind and a run button, then WHAT, RUNS IN, TIMINGS, CACHE and LAST OUTPUT, each answering one question, with no back link since the tree is the navigation. TIMINGS draws the last sixteen outcomes as a bar row coloured by verdict, reds and replays included, which an average hides. CACHE speaks the key instead of quoting it, so `cache content keyed on .` reads `keyed on the whole repo tree, so any change re-runs it`. **A reusable `(?)`**, one component and one css block, instant on hover and on focus, carries every term nobody was born knowing. **Clicking run moves nothing**: the live strip floats over the stage instead of mounting into the flow, the run button holds its width and wears a spinner, and the output widget streams the wire lines as they arrive and scrolls itself. **What each colour may mean is one rule set**: a folded folder wears the worst state under it with ok outranking idle (a folder of passing checks read white), an open ask is orange with its severity untouched so it still reaches needs and still pings once, and an asset is green once it has a pick. **One clock**: a second tick on the root store, read only by a small TimeAgo component, so an age moves without repainting the page.
|
|
1247
1266
|
- **The third `when` value is `health`, not `check`.** `check` was the name of a command rather than a meaning, so the switch offered a word nobody could read. `health` is the health pass (`shipkit check`), never a gate and never a commit gate, which is what that value always did. There is no alias: the key landed the same day, so `defineRepo` refuses a config still saying `check` with a message naming `health`. The switch also stops narrating itself: the current value is the pressed button, a chip beside it names the declaration that put it there, and each of the four words carries its own `(?)`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rvlib-shipkit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.0",
|
|
4
4
|
"funding": "https://github.com/sponsors/rvion",
|
|
5
5
|
"description": "All-in-one repo companion: ci gate (task DAG), auto-discovered health checks, release-contract fulfillness, asks queue, md-wiki tools, asset atelier, live tui",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"@napi-rs/canvas": "^1.1.0",
|
|
47
47
|
"@sparkjsdev/spark": "2.4.0",
|
|
48
48
|
"@xterm/addon-fit": "0.11.0",
|
|
49
|
+
"@xterm/addon-unicode-graphemes": "0.4.0",
|
|
49
50
|
"@xterm/xterm": "6.0.0",
|
|
50
51
|
"clipanion": "^4.0.0-rc.4",
|
|
51
52
|
"ink": "^7.1.1",
|
|
@@ -21,7 +21,7 @@ const FOLDERS = ['serve/hub-app/', 'review/']
|
|
|
21
21
|
const LEAVES = new Set([
|
|
22
22
|
'core/outcome-words.ts',
|
|
23
23
|
'core/wire.ts',
|
|
24
|
-
// the hub's
|
|
24
|
+
// the hub's themes and theme key, no import: the page's theme store reads them
|
|
25
25
|
'core/hub-theme.ts',
|
|
26
26
|
// pure words, no import: the slug of an id, an age and a size as the thread page shows them
|
|
27
27
|
'core/slug.ts',
|
package/src/advisors/expose.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
export const WORKER_NAME = 'rv-advisors'
|
|
9
9
|
export const BUCKET = 'rv-advisors'
|
|
10
|
+
// sk-disable-next-line RV045 -- the advisors door reads the house's own setup token by this name
|
|
10
11
|
export const SETUP_SECRET = 'rv/cloudflare/advisors-setup'
|
|
11
12
|
export const SESSION = '24h'
|
|
12
13
|
const API = 'https://api.cloudflare.com/client/v4'
|
|
@@ -86,7 +87,10 @@ export async function expose(o: ExposeInput): Promise<Exposed> {
|
|
|
86
87
|
allowed_idps: [otp.id],
|
|
87
88
|
auto_redirect_to_identity: true,
|
|
88
89
|
app_launcher_visible: false,
|
|
89
|
-
|
|
90
|
+
// lax: the sign in comes back from the team's cloudflareaccess.com, a cross site redirect chain that never
|
|
91
|
+
// carries a strict cookie, so Access loops between its login and the door; a POST is still held by the
|
|
92
|
+
// Worker's own origin and csrf checks
|
|
93
|
+
same_site_cookie_attribute: 'lax',
|
|
90
94
|
http_only_cookie_attribute: true,
|
|
91
95
|
enable_binding_cookie: true,
|
|
92
96
|
}
|
package/src/advisors/r2.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
// the advisors' bucket as the Mac reaches it: R2 through its S3 endpoint, with a key for that one bucket (Object Read
|
|
2
2
|
// and Write) kept in the vault. Absent until the owner opened the door (wiki tools/shipkit/advisors.md, The door)
|
|
3
3
|
import { S3Client } from 'bun'
|
|
4
|
+
import { readKeyPair, type KeyPairNames } from '../secrets/key-pair.ts'
|
|
4
5
|
import { readSecretValue } from '../secrets/read.ts'
|
|
5
6
|
import type { Bucket, Bytes } from './edge/bucket.ts'
|
|
6
7
|
|
|
7
8
|
export const BUCKET_NAME = 'rv-advisors'
|
|
8
|
-
/**
|
|
9
|
-
|
|
9
|
+
/** the two halves of the bucket's R2 token, and the account's S3 endpoint */
|
|
10
|
+
// sk-disable-next-line RV045 -- the advisors door reads the house's own bucket key by these names
|
|
11
|
+
export const R2_KEY: KeyPairNames = { accessKeyId: 'rv/advisors/r2-access-key-id', secretAccessKey: 'rv/advisors/r2-secret-access-key' }
|
|
12
|
+
// sk-disable-next-line RV045 -- the advisors door reads the house's own endpoint by this name
|
|
10
13
|
export const R2_ENDPOINT_SECRET = 'rv/advisors/r2-endpoint'
|
|
11
14
|
|
|
12
15
|
export function s3Bucket(c: { key: string; secret: string; endpoint: string; bucket?: string }): Bucket {
|
|
@@ -34,15 +37,10 @@ export function s3Bucket(c: { key: string; secret: string; endpoint: string; buc
|
|
|
34
37
|
|
|
35
38
|
/** the bucket of this machine, null while its key is not in the vault (the door is not open) */
|
|
36
39
|
export async function machineBucket(cwd: string): Promise<Bucket | null> {
|
|
37
|
-
let pair: string
|
|
38
|
-
let endpoint: string
|
|
39
40
|
try {
|
|
40
|
-
pair = await readSecretValue(
|
|
41
|
-
endpoint
|
|
41
|
+
const pair = await readKeyPair(R2_KEY, (name) => readSecretValue(name, 'get', cwd))
|
|
42
|
+
return s3Bucket({ key: pair.accessKeyId, secret: pair.secretAccessKey, endpoint: await readSecretValue(R2_ENDPOINT_SECRET, 'get', cwd) })
|
|
42
43
|
} catch {
|
|
43
44
|
return null
|
|
44
45
|
}
|
|
45
|
-
const i = pair.indexOf(':')
|
|
46
|
-
if (i <= 0) throw new Error(`${R2_SECRET}: KEY:SECRET, the two halves of the bucket's R2 token`)
|
|
47
|
-
return s3Bucket({ key: pair.slice(0, i), secret: pair.slice(i + 1), endpoint })
|
|
48
46
|
}
|
package/src/advisors/routes.ts
CHANGED
|
@@ -213,6 +213,32 @@ export function advisorsRoutes(d: AdvisorsDeps) {
|
|
|
213
213
|
const st = readState(dir())
|
|
214
214
|
return shareRow(st, st.shares.find((y) => y.id === id)!, now())
|
|
215
215
|
}
|
|
216
|
+
/** his confirm of a share an agent asked for: live, then scanned at once, so its held entries and waiting images
|
|
217
|
+
* show before the pass; the one path of « confirm the share » and of « confirm the N shares » */
|
|
218
|
+
const confirmOne = async (id: string, n: Date): Promise<ShareRow> => {
|
|
219
|
+
confirmPending(dir(), id, 'owner', n)
|
|
220
|
+
return refreshOne(id)
|
|
221
|
+
}
|
|
222
|
+
/** « confirm the N shares asked for <name> »: the ids his page drew, never every pending share of now, so a share
|
|
223
|
+
* an agent asks after the page drew waits for its own confirm */
|
|
224
|
+
const confirmAll = async (b: Record<string, unknown>, n: Date): Promise<{ confirmed: ShareRow[]; failed: string[] }> => {
|
|
225
|
+
const seen = Array.isArray(b['ids']) ? (b['ids'] as unknown[]).filter((v): v is string => typeof v === 'string') : []
|
|
226
|
+
if (seen.length === 0) throw new Error('ids: the shares his page showed, one at least')
|
|
227
|
+
const s = readState(dir())
|
|
228
|
+
const a = s.advisors.find((y) => y.id === str(b, 'advisor'))
|
|
229
|
+
if (a === undefined) throw new Error(`no advisor ${str(b, 'advisor')}`)
|
|
230
|
+
const confirmed: ShareRow[] = []
|
|
231
|
+
const failed: string[] = []
|
|
232
|
+
for (const id of new Set(seen))
|
|
233
|
+
try {
|
|
234
|
+
if (s.shares.find((y) => y.id === id)?.advisor !== a.id) throw new Error(`not a share of ${a.name}`)
|
|
235
|
+
confirmed.push(await confirmOne(id, n))
|
|
236
|
+
} catch (e) {
|
|
237
|
+
failed.push(`${id}: ${(e as Error).message}`)
|
|
238
|
+
}
|
|
239
|
+
if (confirmed.length === 0) throw new Error(failed.join('; '))
|
|
240
|
+
return { confirmed, failed }
|
|
241
|
+
}
|
|
216
242
|
/** his preview: the advisors' app itself, framed with no origin of its own, over the copy of one share as it would
|
|
217
243
|
* leave, every picture drawn raw for his eyes; it takes no answer. Each copy is kept a few seconds: the app reads
|
|
218
244
|
* several routes at its start */
|
|
@@ -436,9 +462,10 @@ export function advisorsRoutes(d: AdvisorsDeps) {
|
|
|
436
462
|
const row = await refreshOne(x.id)
|
|
437
463
|
const host = readState(dir()).host
|
|
438
464
|
out = { share: row, preview: row.held.length > 0 || row.waiting > 0, url: host === null ? null : `https://${host}/` }
|
|
439
|
-
} else if (
|
|
465
|
+
} else if (rest === '/share/confirm-all') out = await confirmAll(b, n)
|
|
466
|
+
else if (act !== null) {
|
|
440
467
|
const id = act[1]!
|
|
441
|
-
if (act[2] === 'confirm') out =
|
|
468
|
+
if (act[2] === 'confirm') out = await confirmOne(id, n)
|
|
442
469
|
else if (act[2] === 'unshare') out = unshare(dir(), id, n)
|
|
443
470
|
else if (act[2] === 'renew') out = renew(dir(), id, 'owner', n)
|
|
444
471
|
else if (act[2] === 'preview') {
|
package/src/advisors/scan.ts
CHANGED
|
@@ -192,3 +192,14 @@ export function privateWordsOf(md: string): string[] {
|
|
|
192
192
|
}
|
|
193
193
|
return out
|
|
194
194
|
}
|
|
195
|
+
|
|
196
|
+
/** words of a thread's address that name a place of secrets or of the house's own settings: « confirm the N shares »
|
|
197
|
+
* marks such an address before his click, a mark for his eyes, never a refusal */
|
|
198
|
+
const SENSITIVE_PARTS = new Set(['secret', 'secrets', 'setting', 'settings', 'vault', 'token', 'tokens', 'key', 'keys', 'apikey', 'apikeys', 'password', 'passwords', 'credential', 'credentials', 'cred', 'creds', 'env', 'auth', 'login', 'logins', 'keychain', 'billing', 'payment', 'payments', 'admin', 'private', 'account', 'accounts'])
|
|
199
|
+
|
|
200
|
+
/** the part of an address that looks sensitive, null when none: a word matched whole between marks that are no letter
|
|
201
|
+
* or digit (`screen:keyart` is no key, `screen:api-keys` is) */
|
|
202
|
+
export function sensitivePart(address: string): string | null {
|
|
203
|
+
for (const p of address.toLowerCase().split(/[^a-z0-9]+/)) if (SENSITIVE_PARTS.has(p)) return p
|
|
204
|
+
return null
|
|
205
|
+
}
|
|
@@ -73,6 +73,14 @@ export function bindingWindow(a: AccountUsage, now: number): UsageWindow | null
|
|
|
73
73
|
return ws.length === 0 ? null : ws.reduce((x, y) => (y.used > x.used ? y : x))
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/** the account is at its limit at `now`: one of its windows is all used. `until`: when the last such window resets
|
|
77
|
+
* (ms), null when its file does not say */
|
|
78
|
+
export function limitOf(a: AccountUsage, now: number): { until: number | null } | null {
|
|
79
|
+
const full = [windowAt(a.session, now), windowAt(a.week, now)].filter((w): w is UsageWindow => w != null && w.used >= 100)
|
|
80
|
+
if (full.length === 0) return null
|
|
81
|
+
return { until: full.some((w) => w.resetsAt == null) ? null : Math.max(...full.map((w) => w.resetsAt ?? 0)) }
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
/** the share that binds first, null when neither window is known */
|
|
77
85
|
export const bindingUse = (a: AccountUsage, now: number): number | null => bindingWindow(a, now)?.used ?? null
|
|
78
86
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// the Claude Code processes of this Mac as Claude Code itself says them: one small file a process,
|
|
2
|
+
// `<config folder>/sessions/<pid>.json` (its pid, its session, its folder, busy or idle, its name). The one source of
|
|
3
|
+
// « which process runs a session »: the hub's list of sessions (serve/terminal-claudes.ts) and the registry of parties
|
|
4
|
+
// (registry.ts) both read it.
|
|
5
|
+
// The one constraint a reader breaks first: a file outlives its process, so its pid is always probed by its reader
|
|
6
|
+
import { readdirSync, readFileSync } from 'node:fs'
|
|
7
|
+
import { join } from 'node:path'
|
|
8
|
+
|
|
9
|
+
/** one session file as Claude Code writes it */
|
|
10
|
+
export type ClaudeRecord = { pid: number; sessionId: string; cwd: string; startedAt: number; status: string; name: string; kind: string; /** `derived`: Claude Code made the name up from the folder */ nameSource?: string }
|
|
11
|
+
|
|
12
|
+
const str = (v: unknown): string => (typeof v === 'string' ? v : '')
|
|
13
|
+
|
|
14
|
+
/** a session file's fields, null when it is not one */
|
|
15
|
+
export function parseRecord(text: string): ClaudeRecord | null {
|
|
16
|
+
try {
|
|
17
|
+
const o = JSON.parse(text) as Record<string, unknown>
|
|
18
|
+
if (!Number.isInteger(o.pid) || typeof o.sessionId !== 'string' || typeof o.cwd !== 'string') return null
|
|
19
|
+
return { pid: o.pid as number, sessionId: o.sessionId, cwd: o.cwd, startedAt: typeof o.startedAt === 'number' ? o.startedAt : 0, status: str(o.status), name: str(o.name), kind: str(o.kind), ...(typeof o.nameSource === 'string' ? { nameSource: o.nameSource } : {}) }
|
|
20
|
+
} catch {
|
|
21
|
+
return null
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** every session file of one Claude Code config folder, a process each; none when the folder has no `sessions` */
|
|
26
|
+
export function sessionRecords(configDir: string): ClaudeRecord[] {
|
|
27
|
+
let names: string[]
|
|
28
|
+
try { names = readdirSync(join(configDir, 'sessions')) } catch { return [] }
|
|
29
|
+
return names.filter((n) => n.endsWith('.json')).flatMap((n) => {
|
|
30
|
+
try { return parseRecord(readFileSync(join(configDir, 'sessions', n), 'utf8')) ?? [] } catch { return [] }
|
|
31
|
+
})
|
|
32
|
+
}
|
package/src/agent-time/hooks.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { dirname, isAbsolute, join, relative, resolve } from 'path'
|
|
|
14
14
|
import { wallAllowance } from '../core/budget.ts'
|
|
15
15
|
import { gitBin } from '../core/git-bin.ts'
|
|
16
16
|
import { machineWords, type MachineLoad } from '../core/machine-busy.ts'
|
|
17
|
-
import { HOOK_PROBE_SESSION } from '../hooks/
|
|
17
|
+
import { HOOK_PROBE_SESSION } from '../hooks/write-log.ts'
|
|
18
18
|
import { houseOfIndex } from '../home/home-paths.ts'
|
|
19
19
|
import { discoverConfigRoots } from '../reflect/prompt-corpus.ts'
|
|
20
20
|
import { homeRepo, houseIndex } from '../house/project-gutter.ts'
|
package/src/agent-time/live.ts
CHANGED
|
@@ -41,7 +41,10 @@ export type LiveRow = {
|
|
|
41
41
|
calls: number | null
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
type Entry = { type?: string; timestamp?: string; message?: { content?: unknown } }
|
|
44
|
+
type Entry = { type?: string; timestamp?: string; message?: { content?: unknown }; isMeta?: boolean; rowSource?: string }
|
|
45
|
+
|
|
46
|
+
/** a row of a command Claude Code ran by itself (/theme, its caveat, its output): it never reaches the model */
|
|
47
|
+
const localRow = (e: Entry): boolean => e.type === 'user' && (e.isMeta === true || e.rowSource === 'local')
|
|
45
48
|
type Part = { type?: string; name?: string; input?: Record<string, unknown> }
|
|
46
49
|
|
|
47
50
|
const parts = (e: Entry): Part[] => (Array.isArray(e.message?.content) ? (e.message.content as Part[]) : [])
|
|
@@ -63,7 +66,7 @@ export function stateOf(lines: readonly string[]): { state: LiveState; at: numbe
|
|
|
63
66
|
let e: Entry
|
|
64
67
|
try { e = JSON.parse(lines[n]!) as Entry } catch { continue }
|
|
65
68
|
const at = e.timestamp == null ? NaN : Date.parse(e.timestamp)
|
|
66
|
-
if (!Number.isFinite(at)) continue
|
|
69
|
+
if (!Number.isFinite(at) || localRow(e)) continue
|
|
67
70
|
if (e.type === 'api-request' || e.type === 'user') { waiting ??= at; continue }
|
|
68
71
|
if (e.type !== 'assistant') continue
|
|
69
72
|
const calls = parts(e).filter((p) => p.type === 'tool_use')
|