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
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
// the one picker of the page
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// kind
|
|
9
|
-
//
|
|
1
|
+
// the one picker of the page, a node of the root, in two scopes (keys.ts): ⌘P this project alone, ⌘⇧P and ⌘/ every
|
|
2
|
+
// project. ⇥ swaps the scope and keeps the words typed.
|
|
3
|
+
// This project is the window's in a project's app, else the repo shown: its sections with their keys, its own pages,
|
|
4
|
+
// its rows (checks, asks, tests, wikis, assets), its threads by title, its commands, its urls, its processes and
|
|
5
|
+
// what waits for the owner in it. On a page of the home it is the house: the home's places, the identities and
|
|
6
|
+
// their accounts. A section another module gives the main panel (panel-source.ts: terminals, Claude sessions,
|
|
7
|
+
// processes, urls, commands) is listed row for row as the panel lists it, in place of the picker's own rows of that
|
|
8
|
+
// kind.
|
|
9
|
+
// Every project is the house's pages first, then this project's targets, then every other house repo as a place to
|
|
10
|
+
// go; a query also reaches every url and process of every repo, the pages any repo opens and what waits for the
|
|
11
|
+
// owner in any repo (an ask by its number too), each row with its repo's name and icon.
|
|
12
|
+
// A query's words are matched one by one over the label, the kind and the repo (« ver url »).
|
|
13
|
+
// A row of another repo opens there: in the main app the project below switches, in a project's app that repo's own
|
|
14
|
+
// app comes forward on the page (HomeSt.show, asked-page.ts).
|
|
10
15
|
import { makeAutoObservable } from 'mobx'
|
|
11
16
|
import type { HomeSt } from './home-st.ts'
|
|
12
17
|
import { sectionLabel, type SectionId } from './keys.ts'
|
|
13
|
-
import type
|
|
18
|
+
import { sourceKey, sourceOf, type SourceSection } from './panel-source.ts'
|
|
19
|
+
import type { Jump, RepoSt } from './repo-st.ts'
|
|
14
20
|
|
|
15
21
|
/** the pages every repo opens, whatever it holds */
|
|
16
22
|
const ANY_REPO_PAGES: SectionId[] = ['readme', 'review', 'trailer', 'comms', 'shipkit', 'when', 'runs', 'plan', 'processes', 'urls', 'git']
|
|
@@ -20,8 +26,30 @@ const words = (s: string): string[] => s.toLowerCase().split(/[^a-z0-9]+/).filte
|
|
|
20
26
|
/** how many rows the picker shows */
|
|
21
27
|
export const PAL_ROWS = 12
|
|
22
28
|
|
|
29
|
+
/** `project`: this project alone; `all`: every project and the pages of the home */
|
|
30
|
+
export type PaletteScope = 'project' | 'all'
|
|
31
|
+
/** the key that opens the picker on each scope (keys.ts pageKey), as its head prints it */
|
|
32
|
+
export const SCOPE_KEY: Record<PaletteScope, string> = { project: '⌘P', all: '⌘⇧P' }
|
|
33
|
+
/** the key that swaps the scope while the picker is open */
|
|
34
|
+
export const SWAP_KEY = '⇥'
|
|
35
|
+
|
|
36
|
+
/** every section a module may give the main panel (panel-source.ts). A section of the panel's project stands in for
|
|
37
|
+
* the picker's own rows of that kind, told by the start of their id; null: a section that is no repo's */
|
|
38
|
+
const SOURCE_KIND: Record<SourceSection, string | null> = { terminals: null, claude: null, processes: 'process:', urls: 'url:' }
|
|
39
|
+
const SOURCE_SECTIONS = Object.keys(SOURCE_KIND) as SourceSection[]
|
|
40
|
+
const ofProject = (sec: SourceSection): boolean => SOURCE_KIND[sec] != null
|
|
41
|
+
const ofNoRepo = (sec: SourceSection): boolean => SOURCE_KIND[sec] == null
|
|
42
|
+
|
|
43
|
+
/** once the frame of the key that opened the picker is drawn: the rows known come first, what is read comes after.
|
|
44
|
+
* Where nothing paints (a test) it runs at once */
|
|
45
|
+
const afterPaint = (f: () => void): void => (typeof requestAnimationFrame === 'function' ? void requestAnimationFrame(() => setTimeout(f, 0)) : f())
|
|
46
|
+
|
|
47
|
+
/** a target as a query reads it: its label in lower case, its words, and everything a word may match */
|
|
48
|
+
type Entry = { j: Jump; l: string; ws: string[]; hay: string }
|
|
49
|
+
|
|
23
50
|
export class PaletteSt {
|
|
24
51
|
open = false
|
|
52
|
+
scope: PaletteScope = 'all'
|
|
25
53
|
query = ''
|
|
26
54
|
idx = 0
|
|
27
55
|
|
|
@@ -29,6 +57,23 @@ export class PaletteSt {
|
|
|
29
57
|
makeAutoObservable<this, 'st'>(this, { st: false })
|
|
30
58
|
}
|
|
31
59
|
|
|
60
|
+
/** the project the picker's own scope is about: the window's in a project's app, else the repo shown; null on a
|
|
61
|
+
* page of the home, where it is the house */
|
|
62
|
+
get project(): RepoSt | null {
|
|
63
|
+
const st = this.st
|
|
64
|
+
return st.shell != null ? st.shellRepo : st.shown
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** this project's name, as the head says it */
|
|
68
|
+
get projectName(): string {
|
|
69
|
+
return this.project?.name ?? 'the house'
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** a hub of its own holds one repo: one scope, no other to reach */
|
|
73
|
+
get scoped(): boolean {
|
|
74
|
+
return this.st.machine != null
|
|
75
|
+
}
|
|
76
|
+
|
|
32
77
|
/** the home's places, first in the list: a hub of its own has none */
|
|
33
78
|
get places(): Jump[] {
|
|
34
79
|
const st = this.st
|
|
@@ -36,6 +81,7 @@ export class PaletteSt {
|
|
|
36
81
|
return [
|
|
37
82
|
{ id: 'place:inbox', label: 'inbox', section: 'place', face: { place: 'inbox' }, run: () => st.navigate('/inbox') },
|
|
38
83
|
{ id: 'place:home', label: 'home', section: 'place', face: { place: 'home' }, run: () => st.navigate('/') },
|
|
84
|
+
{ id: 'place:running', label: 'running', section: 'place', face: { place: 'running' }, run: () => st.navigate('/running') },
|
|
39
85
|
{ id: 'place:machines', label: 'machines', section: 'place', face: { place: 'machines' }, run: () => st.navigate('/machines') },
|
|
40
86
|
{ id: 'place:database', label: 'database', section: 'place', face: { place: 'database' }, run: () => st.navigate('/database') },
|
|
41
87
|
{ id: 'place:vault', label: 'vault', section: 'place', face: { place: 'vault' }, run: () => st.navigate('/vault') },
|
|
@@ -62,31 +108,38 @@ export class PaletteSt {
|
|
|
62
108
|
])
|
|
63
109
|
}
|
|
64
110
|
|
|
65
|
-
/** every house repo but
|
|
66
|
-
* global page that is every repo */
|
|
111
|
+
/** every house repo but this project, as a place to go: on a page of the home that is every repo */
|
|
67
112
|
get others(): Jump[] {
|
|
68
113
|
const st = this.st
|
|
69
114
|
if (st.machine == null) return []
|
|
70
|
-
const on =
|
|
115
|
+
const on = this.project?.key
|
|
71
116
|
return st.projects.list.filter((p) => p.name !== on).map((p) => ({ id: `repo:${p.name}`, label: p.name, section: 'repo', face: { repo: p.name }, run: () => st.select(p.name) }))
|
|
72
117
|
}
|
|
73
118
|
|
|
74
|
-
/** every url of every house repo,
|
|
119
|
+
/** every url of every house repo, this project's too: framed on its repo's urls page. They come once the home answers */
|
|
75
120
|
get urls(): Jump[] {
|
|
76
121
|
const st = this.st
|
|
77
122
|
if (st.machine == null) return []
|
|
78
123
|
return st.urls.repos.flatMap((r) => r.urls.map((u) => ({ id: `url:${r.repo}/${u.id}`, label: u.label, section: `url ${u.env}`, repo: r.repo, face: { repo: r.repo }, run: () => st.openUrl(r.repo, u.id) })))
|
|
79
124
|
}
|
|
80
125
|
|
|
81
|
-
/**
|
|
126
|
+
/** every global process a house repo declares: shown on that repo's processes page */
|
|
127
|
+
get processes(): Jump[] {
|
|
128
|
+
const st = this.st
|
|
129
|
+
const groups = st.machine?.processGroups
|
|
130
|
+
if (groups == null) return []
|
|
131
|
+
return groups.flatMap((g) => (g.core === true ? [] : g.rows.map((r) => ({ id: `process:${r.repo}/${r.id}`, label: r.label, section: 'process', repo: r.repo, face: { repo: r.repo }, run: () => st.openProcess(r.repo, r.id) }))))
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** the pages of every repo but this project, whose own are its targets */
|
|
82
135
|
get pages(): Jump[] {
|
|
83
136
|
const st = this.st
|
|
84
137
|
if (st.machine == null) return []
|
|
85
|
-
const on =
|
|
138
|
+
const on = this.project?.key
|
|
86
139
|
return st.projects.list.filter((p) => p.name !== on).flatMap((p) => ANY_REPO_PAGES.map((id) => ({ id: `page:${p.name}/${id}`, label: sectionLabel(id), section: 'page', repo: p.name, face: { repo: p.name }, run: () => st.openPage(p.name, id) })))
|
|
87
140
|
}
|
|
88
141
|
|
|
89
|
-
/** every thread that waits for the owner in every repo,
|
|
142
|
+
/** every thread that waits for the owner in every repo, this project's too, under its title (an ask with no thread
|
|
90
143
|
* yet under its number too) and what it waits on, opened on the inbox. They come once the inbox answers */
|
|
91
144
|
get waiting(): Jump[] {
|
|
92
145
|
const st = this.st
|
|
@@ -97,52 +150,154 @@ export class PaletteSt {
|
|
|
97
150
|
})
|
|
98
151
|
}
|
|
99
152
|
|
|
153
|
+
/** this project's own targets (RepoSt.jumps); in a project's app they bring the repo back on screen from a page
|
|
154
|
+
* of the home */
|
|
155
|
+
get own(): Jump[] {
|
|
156
|
+
const st = this.st
|
|
157
|
+
const r = this.project
|
|
158
|
+
if (r == null) return []
|
|
159
|
+
if (st.shown === r) return r.jumps
|
|
160
|
+
return r.jumps.map((j) => ({ ...j, run: () => { j.run(); st.bring(r) } }))
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** the rows of the sections a module gives the main panel, as the panel lists them: a row opens as its click does */
|
|
164
|
+
private sourceRows(pick: (sec: SourceSection) => boolean): Jump[] {
|
|
165
|
+
const st = this.st
|
|
166
|
+
return SOURCE_SECTIONS.filter(pick).flatMap((sec) => {
|
|
167
|
+
const src = sourceOf(st, sec)
|
|
168
|
+
return src == null ? [] : src.rows.map((row): Jump => ({ id: sourceKey(sec, row), label: row.label, section: src.name, ...(row.key == null ? {} : { key: row.key }), run: () => src.open(row) }))
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** a row of the picker's own that a panel section lists already: this project's of a kind a module provides */
|
|
173
|
+
private provided(j: Jump): boolean {
|
|
174
|
+
const r = this.project
|
|
175
|
+
if (r == null || (j.repo != null && j.repo !== r.key)) return false
|
|
176
|
+
return SOURCE_SECTIONS.some((sec) => SOURCE_KIND[sec] != null && j.id.startsWith(SOURCE_KIND[sec]) && sourceOf(this.st, sec) != null)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** everything of this project and nothing of another: its own targets, then its urls, its processes and what waits
|
|
180
|
+
* for the owner in it; the house's are the home's places, the identities and their accounts. Then the panel's
|
|
181
|
+
* provided sections */
|
|
182
|
+
get mine(): Jump[] {
|
|
183
|
+
const r = this.project
|
|
184
|
+
// the house: the panel's project sections are the repo's shown last, never the house's
|
|
185
|
+
if (r == null) return [...this.places, ...this.identities, ...this.sourceRows(ofNoRepo)]
|
|
186
|
+
const here = (j: Jump): boolean => j.repo === r.key
|
|
187
|
+
return [...[...this.own, ...this.urls.filter(here), ...this.processes.filter(here), ...this.waiting.filter(here)].filter((j) => !this.provided(j)), ...this.sourceRows(() => true)]
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** this project's own targets among every project's, a provided section in place of the rows it stands in for:
|
|
191
|
+
* each names its repo and wears its icon, as every other row of a repo does. A hub of its own has one repo and
|
|
192
|
+
* names none. Then the provided sections that are no repo's (terminals, Claude sessions), under their own name */
|
|
193
|
+
private get ownNamed(): Jump[] {
|
|
194
|
+
const r = this.project
|
|
195
|
+
const own = r == null ? [] : [...this.own.filter((j) => !this.provided(j)), ...this.sourceRows(ofProject)]
|
|
196
|
+
const named = r == null || this.st.machine == null ? own : own.map((j) => ({ ...j, repo: r.key, face: { repo: r.key } }))
|
|
197
|
+
return [...named, ...this.sourceRows(ofNoRepo)]
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** every project and the pages of the home */
|
|
100
201
|
get jumps(): Jump[] {
|
|
101
|
-
|
|
202
|
+
const rest = [...this.urls, ...this.processes].filter((j) => !this.provided(j))
|
|
203
|
+
return [...this.places, ...this.identities, ...this.ownNamed, ...this.others, ...rest, ...this.waiting, ...this.pages]
|
|
102
204
|
}
|
|
103
205
|
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
|
|
206
|
+
/** the scope's targets as a query reads them, built once while the picker is open and nothing moved */
|
|
207
|
+
get index(): Entry[] {
|
|
208
|
+
return (this.scope === 'project' ? this.mine : this.jumps).map((j) => {
|
|
209
|
+
const l = j.label.toLowerCase()
|
|
210
|
+
return { j, l, ws: words(l), hay: `${l} ${j.section} ${j.repo ?? ''}`.toLowerCase() }
|
|
211
|
+
})
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** with no query, this project: its sections and its own pages first, as its panel lists them, then its other
|
|
215
|
+
* targets; the house: its places, then the identities */
|
|
216
|
+
private get firstMine(): Jump[] {
|
|
217
|
+
const all = this.mine
|
|
218
|
+
const entries = all.filter((j) => j.section === 'section' || j.section === 'page')
|
|
219
|
+
return [...entries, ...all.filter((j) => !entries.includes(j))].slice(0, Math.max(PAL_ROWS * 2, entries.length))
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** with no query, every project: the places, the identities, this project's first targets, then every other repo,
|
|
107
223
|
* so a jump elsewhere is always in reach */
|
|
224
|
+
private get firstAll(): Jump[] {
|
|
225
|
+
const own = this.ownNamed
|
|
226
|
+
const places = this.places
|
|
227
|
+
const ids = this.identities.filter((j) => j.section === 'identity')
|
|
228
|
+
const others = this.others
|
|
229
|
+
return [...places, ...ids, ...own.slice(0, Math.max(4, PAL_ROWS - places.length - ids.length - others.length)), ...others]
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** every word of the query is in the label, the kind or the repo. Ranked on the first word: the label starts
|
|
233
|
+
* with it, a word of the label does, the label holds it, then the rest. The last row under any query searches the
|
|
234
|
+
* words in the threads: this project's, or every repo's */
|
|
108
235
|
get results(): Jump[] {
|
|
109
236
|
const q = this.query.trim().toLowerCase()
|
|
110
|
-
if (q === '')
|
|
111
|
-
const own = this.st.shown?.jumps ?? []
|
|
112
|
-
const places = this.places
|
|
113
|
-
const ids = this.identities.filter((j) => j.section === 'identity')
|
|
114
|
-
const others = this.others
|
|
115
|
-
return [...places, ...ids, ...own.slice(0, Math.max(4, PAL_ROWS - places.length - ids.length - others.length)), ...others]
|
|
116
|
-
}
|
|
237
|
+
if (q === '') return this.scope === 'project' ? this.firstMine : this.firstAll
|
|
117
238
|
const asked = q.split(/\s+/)
|
|
118
239
|
const first = asked[0]!
|
|
119
240
|
const ranks: Jump[][] = [[], [], [], []]
|
|
120
|
-
for (const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if (!asked.every((w) => hay.includes(w))) continue
|
|
124
|
-
ranks[l.startsWith(first) ? 0 : words(l).some((w) => w.startsWith(first)) ? 1 : l.includes(first) ? 2 : 3]!.push(j)
|
|
241
|
+
for (const e of this.index) {
|
|
242
|
+
if (!asked.every((w) => e.hay.includes(w))) continue
|
|
243
|
+
ranks[e.l.startsWith(first) ? 0 : e.ws.some((w) => w.startsWith(first)) ? 1 : e.l.includes(first) ? 2 : 3]!.push(e.j)
|
|
125
244
|
}
|
|
126
|
-
|
|
245
|
+
return [...ranks.flat().slice(0, PAL_ROWS * 2), ...this.search(this.query.trim())]
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** the words in the threads, the last row under any query: this project's review page on them, or the inbox's
|
|
249
|
+
* search over every repo (search-st.ts) */
|
|
250
|
+
private search(typed: string): Jump[] {
|
|
251
|
+
const st = this.st
|
|
252
|
+
const r = this.project
|
|
253
|
+
if (this.scope === 'project' && r != null) {
|
|
254
|
+
return [{ id: 'search:threads', label: `« ${typed} » in the threads of ${r.name}`, section: 'search', run: () => { r.showReview(null, new URLSearchParams({ q: typed }).toString()); st.bring(r) } }]
|
|
255
|
+
}
|
|
256
|
+
return st.machine == null ? [] : [{ id: 'search:threads', label: `« ${typed} » in every thread`, section: 'search', face: { place: 'inbox' }, run: () => st.inbox.find.go(typed) }]
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/** what the scope lists is read once: the urls and what waits, every identity's accounts; this project's threads
|
|
260
|
+
* and commands where its pages did not read them yet */
|
|
261
|
+
private warm(): void {
|
|
262
|
+
afterPaint(() => this.read())
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
private read(): void {
|
|
127
266
|
const st = this.st
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
267
|
+
st.identities.ensure()
|
|
268
|
+
void st.urls.load()
|
|
269
|
+
void st.waiting.load()
|
|
270
|
+
// every row of a repo wears its icon from the list of the projects: a window that did not read it yet reads it
|
|
271
|
+
if (st.machine != null && st.projects.list.length === 0) void st.projects.load()
|
|
272
|
+
const r = this.scope === 'project' ? this.project : null
|
|
273
|
+
if (r == null) return
|
|
274
|
+
if (r.review.page == null) void r.review.refresh()
|
|
275
|
+
if (r.hasCli && r.commands.view == null) void r.commands.load()
|
|
131
276
|
}
|
|
132
277
|
|
|
133
|
-
|
|
278
|
+
/** the scope's key: it opens the picker there, closes it when it shows that scope, and from the other scope swaps
|
|
279
|
+
* to it with the words kept */
|
|
280
|
+
toggle(scope: PaletteScope = 'all'): void {
|
|
281
|
+
if (this.open && this.scope !== scope) return this.setScope(scope)
|
|
134
282
|
this.open = !this.open
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
void this.st.urls.load()
|
|
138
|
-
void this.st.waiting.load()
|
|
139
|
-
}
|
|
283
|
+
this.scope = scope
|
|
284
|
+
if (this.open) this.warm()
|
|
140
285
|
this.query = ''
|
|
141
286
|
this.idx = 0
|
|
142
287
|
}
|
|
143
288
|
close(): void {
|
|
144
289
|
this.open = false
|
|
145
290
|
}
|
|
291
|
+
/** the other scope, the words kept (⇥) */
|
|
292
|
+
swap(): void {
|
|
293
|
+
this.setScope(this.scope === 'project' ? 'all' : 'project')
|
|
294
|
+
}
|
|
295
|
+
setScope(scope: PaletteScope): void {
|
|
296
|
+
if (!this.scoped || scope === this.scope) return
|
|
297
|
+
this.scope = scope
|
|
298
|
+
this.idx = 0
|
|
299
|
+
this.warm()
|
|
300
|
+
}
|
|
146
301
|
setQuery(v: string): void {
|
|
147
302
|
this.query = v
|
|
148
303
|
this.idx = 0
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
// the one picker
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// platform's logo.
|
|
1
|
+
// the one picker (palette-st.ts) in its two scopes: ⌘P this project alone, ⌘⇧P every project. Its head says which
|
|
2
|
+
// one it lists and the keys that reach the other; ⇥ swaps, the words kept. A place wears its button's icon, a repo
|
|
3
|
+
// its own icon, as the project list shows them, an identity its avatar, an account its platform's logo. Among every
|
|
4
|
+
// project each row of a repo names it; in this project's scope the head names it once.
|
|
6
5
|
import { observer } from 'mobx-react-lite'
|
|
7
6
|
import type { HomeSt } from './home-st.ts'
|
|
8
7
|
import { Icon, ICON } from './icons.tsx'
|
|
8
|
+
import { SCOPE_KEY, SWAP_KEY } from './palette-st.ts'
|
|
9
9
|
import { Face } from './project-list.tsx'
|
|
10
10
|
import { Logo } from './social/kit.tsx'
|
|
11
11
|
import type { JumpFace } from './repo-st.ts'
|
|
12
|
+
import { tip } from './tips.ts'
|
|
12
13
|
|
|
13
14
|
/** the icon a picker entry wears; an empty slot keeps the labels aligned */
|
|
14
15
|
const PalFace = observer(({ app, face }: { app: HomeSt; face: JumpFace | undefined }) => {
|
|
@@ -22,19 +23,42 @@ const PalFace = observer(({ app, face }: { app: HomeSt; face: JumpFace | undefin
|
|
|
22
23
|
return <span className="pface">{p == null ? null : <Face p={p} px={16} />}</span>
|
|
23
24
|
})
|
|
24
25
|
|
|
26
|
+
/** which scope the picker lists, and the keys that reach the other; a click swaps as ⇥ does */
|
|
27
|
+
const PalHead = observer(({ app }: { app: HomeSt }) => {
|
|
28
|
+
const p = app.palette
|
|
29
|
+
const mine = p.scope === 'project'
|
|
30
|
+
const r = p.project
|
|
31
|
+
const other = mine ? 'every project' : `${p.projectName} alone`
|
|
32
|
+
return (
|
|
33
|
+
<div className="palhead">
|
|
34
|
+
<span className="palwho">
|
|
35
|
+
{mine ? (r == null ? <PalFace app={app} face={{ place: 'home' }} /> : <PalFace app={app} face={{ repo: r.key }} />) : null}
|
|
36
|
+
<b>{mine ? p.projectName : 'every project'}</b>
|
|
37
|
+
</span>
|
|
38
|
+
{/* the mouse never takes the focus off the input */}
|
|
39
|
+
<button type="button" className="palswap" {...tip(`list ${other}`, `${SWAP_KEY} or ${SCOPE_KEY[mine ? 'all' : 'project']}`)} onMouseDown={(e) => e.preventDefault()} onClick={() => p.swap()}>
|
|
40
|
+
<kbd className="pjkey">{SWAP_KEY}</kbd> or <kbd className="pjkey">{SCOPE_KEY[mine ? 'all' : 'project']}</kbd>: {other}
|
|
41
|
+
</button>
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
})
|
|
45
|
+
|
|
25
46
|
export const Palette = observer(({ app }: { app: HomeSt }) => {
|
|
26
47
|
const p = app.palette
|
|
27
48
|
if (!p.open) return null
|
|
49
|
+
const mine = p.scope === 'project'
|
|
28
50
|
return (
|
|
29
51
|
<div className="palov" onClick={() => p.close()}>
|
|
30
|
-
<div className="pal" onClick={(e) => e.stopPropagation()}>
|
|
31
|
-
|
|
52
|
+
<div className="pal" data-scope={p.scope} onClick={(e) => e.stopPropagation()}>
|
|
53
|
+
{p.scoped ? <PalHead app={app} /> : null}
|
|
54
|
+
<input autoFocus placeholder={!p.scoped ? 'jump to…' : mine ? `jump to… in ${p.projectName}` : 'jump to… in every project'} value={p.query}
|
|
32
55
|
onChange={(e) => p.setQuery(e.target.value)}
|
|
33
56
|
onKeyDown={(e) => {
|
|
34
57
|
if (e.key === 'ArrowDown') { e.preventDefault(); p.move(1) }
|
|
35
58
|
else if (e.key === 'ArrowUp') { e.preventDefault(); p.move(-1) }
|
|
36
59
|
else if (e.key === 'Enter') p.run()
|
|
37
60
|
else if (e.key === 'Escape') p.close()
|
|
61
|
+
else if (e.key === 'Tab' && !e.shiftKey && !e.metaKey && !e.ctrlKey && !e.altKey) { e.preventDefault(); p.swap() }
|
|
38
62
|
}} />
|
|
39
63
|
<div className="prows">
|
|
40
64
|
{p.results.map((jp, n) => (
|
|
@@ -43,7 +67,7 @@ export const Palette = observer(({ app }: { app: HomeSt }) => {
|
|
|
43
67
|
onClick={() => p.run(jp)}>
|
|
44
68
|
<PalFace app={app} face={jp.face} />
|
|
45
69
|
<span className="plabel">{jp.label}</span>
|
|
46
|
-
{jp.repo == null ? null : <span className="prepo">{jp.repo}</span>}
|
|
70
|
+
{jp.repo == null || mine ? null : <span className="prepo">{jp.repo}</span>}
|
|
47
71
|
<span className="pchip">{jp.section}</span>
|
|
48
72
|
{jp.key == null ? null : <kbd className="pjkey">{jp.key}</kbd>}
|
|
49
73
|
</div>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// a small button on a section head of the main panel (main-panel.tsx, a source's SourceAction): its act at a click,
|
|
2
|
+
// its choices in a menu under it when it has some, or the form of words he types first (a url to add). A form takes
|
|
3
|
+
// the focus and closes on Escape or its own buttons alone: a press outside never loses what he typed
|
|
4
|
+
import { observer } from 'mobx-react-lite'
|
|
5
|
+
import { useState } from 'react'
|
|
6
|
+
import { Popover } from './floating.tsx'
|
|
7
|
+
import { Icon } from './icons.tsx'
|
|
8
|
+
import type { SourceAction } from './panel-source.ts'
|
|
9
|
+
import { tip } from './tips.ts'
|
|
10
|
+
|
|
11
|
+
export const HeadAction = observer(({ a }: { a: SourceAction }) => {
|
|
12
|
+
const [at, setAt] = useState<HTMLElement | null>(null)
|
|
13
|
+
const close = (): void => setAt(null)
|
|
14
|
+
const form = a.form != null
|
|
15
|
+
const menu = at == null ? null : form ? a.form!(close) : a.menu?.(close)
|
|
16
|
+
const press = (el: HTMLElement): void => {
|
|
17
|
+
if (at != null) return close()
|
|
18
|
+
if (!form && a.menu?.(close) == null) a.run?.()
|
|
19
|
+
else setAt(el)
|
|
20
|
+
}
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<span role="button" tabIndex={0} className="mpact" data-act={a.id} {...tip(a.title ?? a.label)} aria-label={a.label} aria-haspopup={form ? 'dialog' : a.menu == null ? undefined : 'menu'} aria-expanded={a.menu == null && !form ? undefined : at != null}
|
|
24
|
+
onClick={(e) => { e.stopPropagation(); press(e.currentTarget) }}
|
|
25
|
+
onKeyDown={(e) => {
|
|
26
|
+
if (e.key !== 'Enter' && e.key !== ' ') return
|
|
27
|
+
e.preventDefault()
|
|
28
|
+
e.stopPropagation()
|
|
29
|
+
press(e.currentTarget)
|
|
30
|
+
}}><Icon d={a.icon} /></span>
|
|
31
|
+
{/* a click in the menu is the menu's: through React it would reach the head and fold the section */}
|
|
32
|
+
{menu == null ? null : (
|
|
33
|
+
<Popover open anchor={at} onClose={close} role={form ? 'dialog' : 'menu'} outside={!form} label={a.label} className={form ? 'fpop mpform' : 'mpmenu'} placement="bottom-start" gap={2}>
|
|
34
|
+
<div onClick={(e) => e.stopPropagation()}>{menu}</div>
|
|
35
|
+
</Popover>
|
|
36
|
+
)}
|
|
37
|
+
</>
|
|
38
|
+
)
|
|
39
|
+
})
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// THE MAIN PANEL'S HEAD, fixed over its sections so a window says its project at a glance: a band in the repo's window
|
|
2
|
+
// colour (core/repo-gui-color.ts guiColorOf, the colour its app's title bar wears) with its mark (project-list.tsx
|
|
3
|
+
// RepoMark: its app icon, else its letter on a hashed hue), its name and its one line; under it, smaller, the identity
|
|
4
|
+
// it speaks as. On a page of the home the house's own band. A repo the projects answer has not named yet still gets
|
|
5
|
+
// its band: its name's colour and its letter, never an empty head
|
|
6
|
+
import { observer } from 'mobx-react-lite'
|
|
7
|
+
import type { CSSProperties, ReactNode } from 'react'
|
|
8
|
+
import { guiColorOfName } from '../../core/gui-color.ts'
|
|
9
|
+
import type { HomeSt } from './home-st.ts'
|
|
10
|
+
import { Icon, ICON } from './icons.tsx'
|
|
11
|
+
import { panelProfile, panelRepo } from './panel-repo.ts'
|
|
12
|
+
import { tintOf } from './panel-tint.ts'
|
|
13
|
+
import { PROFILE_KEY } from './panel-walk.ts'
|
|
14
|
+
import { RepoMark } from './project-list.tsx'
|
|
15
|
+
import { tip } from './tips.ts'
|
|
16
|
+
|
|
17
|
+
/** the mark's size in px */
|
|
18
|
+
const MARK = 30
|
|
19
|
+
|
|
20
|
+
/** the identity the panel's repo speaks as, its avatar and its name; a click its view */
|
|
21
|
+
const Profile = observer(({ home, repo }: { home: HomeSt; repo: string }) => {
|
|
22
|
+
const s = home.projects
|
|
23
|
+
const i = panelProfile(home)
|
|
24
|
+
if (i == null) return null
|
|
25
|
+
return (
|
|
26
|
+
<button type="button" data-key={PROFILE_KEY} className={`mpline mpprofile${s.identityLit() === i.id ? ' cur' : ''}`} aria-current={s.identityLit() === i.id ? 'page' : undefined} style={i.colour == null ? undefined : ({ '--idc': i.colour } as CSSProperties)}
|
|
27
|
+
{...tip(`${repo} speaks as ${i.name}: its profile, its company, every account`)} onClick={() => s.onIdentity?.(i.id)}>
|
|
28
|
+
{i.mark != null ? <img className="pjav" src={i.mark} alt="" width={16} height={16} draggable={false} /> : <span className="pjav pjavi">{i.name.charAt(0).toUpperCase()}</span>}
|
|
29
|
+
<span className="mpname">{i.name}</span>
|
|
30
|
+
</button>
|
|
31
|
+
)
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
/** the band: a mark, a name, a dim line under it */
|
|
35
|
+
const Band = ({ colour, mark, name, sub, title }: { colour: string | null | undefined; mark: ReactNode; name: string; sub: string | null; title: string }) => (
|
|
36
|
+
<div className="mpband" style={tintOf(colour)} {...tip(title, null, 'right')}>
|
|
37
|
+
<span className="mpbmark">{mark}</span>
|
|
38
|
+
<span className="mpbtext">
|
|
39
|
+
<b className="mpbname">{name}</b>
|
|
40
|
+
{sub == null || sub === '' ? null : <span className="mpbsub">{sub}</span>}
|
|
41
|
+
</span>
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
export const PanelHead = observer(({ home }: { home: HomeSt }) => {
|
|
46
|
+
const s = home.projects
|
|
47
|
+
const r = panelRepo(home)
|
|
48
|
+
if (r == null) {
|
|
49
|
+
// the home's own head; a hub of its own before its repo shows draws none
|
|
50
|
+
if (s.onPlace == null) return null
|
|
51
|
+
const h = s.list.find((p) => p.name === s.house)
|
|
52
|
+
const n = s.list.length
|
|
53
|
+
return (
|
|
54
|
+
<header className="mphead" aria-label="the house">
|
|
55
|
+
<Band colour={h?.guiColor} name="the house" sub={n === 0 ? null : `${n} repo${n === 1 ? '' : 's'}`} title="the house: every repo's pages, the inbox, the overview, the machines"
|
|
56
|
+
mark={h?.appIcon != null ? <img src={h.appIcon} alt="" width={MARK} height={MARK} draggable={false} /> : <Icon d={ICON.home} />} />
|
|
57
|
+
</header>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
const p = s.list.find((x) => x.name === r.name)
|
|
61
|
+
const facts = [p?.branch, p?.version == null ? null : `v${p.version.replace(/^v/, '')}`].filter((x) => x != null && x !== '').join(' · ')
|
|
62
|
+
const title = `${r.name}${p?.description == null ? '' : `: ${p.description}`}${facts === '' ? '' : ` (${facts})`}`
|
|
63
|
+
return (
|
|
64
|
+
<header className="mphead" aria-label={`${r.name}, the project of this window`}>
|
|
65
|
+
<Band colour={p?.guiColor ?? guiColorOfName(r.name)} name={r.name} sub={p?.description ?? null} title={title}
|
|
66
|
+
mark={<RepoMark p={p ?? { name: r.name, icon: null, appIcon: null }} px={MARK} />} />
|
|
67
|
+
<Profile home={home} repo={r.name} />
|
|
68
|
+
</header>
|
|
69
|
+
)
|
|
70
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// the project the main panel is about, and the address of each of its entries: what a new tab opens (⌘ click, a middle
|
|
2
|
+
// click, the row's own button), the page alone with the main panel. A project's app keeps its shell in every address
|
|
3
|
+
import { appPost, type TabChips } from './app-bridge.ts'
|
|
4
|
+
import { hashFor, type HashSel } from './hash-route.ts'
|
|
5
|
+
import type { HomeSt } from './home-st.ts'
|
|
6
|
+
import { PLACE_PATH } from './place-path.ts'
|
|
7
|
+
import type { HouseEntry, ProjectsSvc } from './projects-svc.ts'
|
|
8
|
+
import type { RepoSt } from './repo-st.ts'
|
|
9
|
+
import { withShell } from './shell.ts'
|
|
10
|
+
|
|
11
|
+
/** the project the panel is about: the window's in a project's app, else the repo last shown, kept over a page of the
|
|
12
|
+
* home so a step into the global entries comes back; null before any repo is shown */
|
|
13
|
+
export const panelRepo = (home: HomeSt): RepoSt | null =>
|
|
14
|
+
home.shell?.kind === 'project' ? home.shellRepo : home.machine == null ? home.shown : home.selected == null ? null : (home.repos.get(home.selected) ?? null)
|
|
15
|
+
|
|
16
|
+
/** the identity the panel's repo speaks as (the panel's first row); null with no repo or none known */
|
|
17
|
+
export function panelProfile(home: HomeSt): ProjectsSvc['identities'][number] | null {
|
|
18
|
+
const s = home.projects
|
|
19
|
+
const r = panelRepo(home)
|
|
20
|
+
const p = r == null ? null : s.list.find((x) => x.name === r.name)
|
|
21
|
+
return p == null ? null : (s.identities.find((x) => s.speaksAs(p, x.id)) ?? null)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** a path of this hub, with the window's shell kept */
|
|
25
|
+
const kept = (home: HomeSt, path: string): string => (home.shell == null ? path : withShell(path, globalThis.location?.origin ?? 'http://hub', home.shell))
|
|
26
|
+
|
|
27
|
+
/** a page of a repo */
|
|
28
|
+
export const repoHref = (home: HomeSt, r: RepoSt, sel: HashSel): string => kept(home, `${r.base}/#${hashFor(sel) ?? ''}`)
|
|
29
|
+
|
|
30
|
+
/** a source row's own page (panel-source.ts PanelSource.page), in the panel's project */
|
|
31
|
+
export const sourceHref = (home: HomeSt, r: RepoSt, section: string, id: string): string => repoHref(home, r, { t: 'src', section, id })
|
|
32
|
+
|
|
33
|
+
/** a page of the home; the picker is a dialog, no page */
|
|
34
|
+
export const houseHref = (home: HomeSt, e: HouseEntry): string | null => (e === 'picker' ? null : kept(home, PLACE_PATH[e]))
|
|
35
|
+
|
|
36
|
+
/** an entry in a new tab: the app turns a new window into a tab of its own. `name`: the tab's title in the app, for a
|
|
37
|
+
* tab that is no page of the hub (a url's site), said to the app before the window is asked; `chips`: a url's
|
|
38
|
+
* logins, which that tab wears in its title bar */
|
|
39
|
+
export const openTab = (href: string, name?: string, chips?: TabChips): void => {
|
|
40
|
+
if (name != null) appPost()?.({ tabName: name, url: new URL(href, globalThis.location?.href).href, ...chips })
|
|
41
|
+
void globalThis.open?.(href, '_blank')
|
|
42
|
+
}
|