rvlib-shipkit 2.31.0 → 2.32.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 +31 -0
- package/package.json +1 -1
- package/src/advisors/acts.ts +16 -15
- package/src/advisors/advice.ts +56 -102
- package/src/advisors/advisor-view.ts +98 -73
- package/src/advisors/app-graph.ts +1 -1
- package/src/advisors/app.ts +3 -11
- package/src/advisors/cf-api.ts +1 -1
- package/src/advisors/dir-bucket.ts +4 -3
- package/src/advisors/edge/api.ts +26 -198
- package/src/advisors/edge/bucket.ts +2 -2
- package/src/advisors/edge/handler.ts +13 -155
- package/src/advisors/edge/here.ts +5 -5
- package/src/advisors/edge/pages.ts +12 -9
- package/src/advisors/edge/shell.ts +6 -5
- package/src/advisors/edge/sign-in.ts +101 -36
- package/src/advisors/edge/status.ts +19 -6
- package/src/advisors/edge/types.ts +36 -60
- package/src/advisors/expose.ts +29 -29
- package/src/advisors/here.ts +12 -12
- package/src/advisors/invite-send.ts +79 -35
- package/src/advisors/invite.ts +31 -8
- package/src/advisors/job.ts +24 -16
- package/src/advisors/login.ts +40 -15
- package/src/advisors/owner-store.ts +46 -22
- package/src/advisors/photos.ts +3 -3
- package/src/advisors/project.ts +25 -23
- package/src/advisors/reach.ts +89 -0
- package/src/advisors/rights.ts +1 -1
- package/src/advisors/routes.ts +55 -74
- package/src/advisors/scan.ts +0 -4
- package/src/advisors/setup-run.ts +14 -14
- package/src/advisors/share-trace.ts +3 -3
- package/src/advisors/{door-probe.ts → sign-in-probe.ts} +7 -6
- package/src/advisors/speaks.ts +29 -0
- package/src/advisors/sync.ts +92 -182
- package/src/advisors/tunnel.ts +6 -5
- package/src/advisors/users-listen.ts +92 -0
- package/src/advisors/users-router.ts +257 -85
- package/src/advisors/users-store.ts +81 -0
- package/src/agent-time/blocked-scan.ts +181 -0
- package/src/agent-time/registry.ts +12 -5
- package/src/agent-time/store.ts +9 -109
- package/src/asks/ask-bar-fold.ts +2 -1
- package/src/asks/ask-close.ts +2 -1
- package/src/asks/ask-doc.ts +2 -1
- package/src/asks/ask-migrate.ts +3 -2
- package/src/asks/ask-steps-fold.ts +2 -1
- package/src/asks/ask-store.ts +4 -3
- package/src/check.ts +3 -43
- package/src/checks/SK001-package-json-shape.check.ts +4 -55
- package/src/checks/SK004-gitignore-policy.check.ts +24 -69
- package/src/checks/SK013-one-way-in-policy.check.ts +3 -7
- package/src/checks/SK017-vscode-hub-task.check.ts +4 -4
- package/src/checks/SK019-tests-run-in-units.check.ts +3 -14
- package/src/checks/SK020-self-spawning-check.check.ts +5 -7
- package/src/checks/SK035-public-clean.check.ts +1 -1
- package/src/checks/SK039-vscode-watch-generated.check.ts +1 -1
- package/src/checks/SK042-post-kinds.check.ts +5 -14
- package/src/checks/SK054-agent-allow-list.check.ts +5 -74
- package/src/checks/SK055-retired-config-keys.check.ts +45 -0
- package/src/cli/cmd_Advisors.ts +11 -45
- package/src/cli/cmd_Asks.ts +3 -10
- package/src/cli/cmd_Backup.ts +25 -127
- package/src/cli/cmd_BackupTargets.ts +1 -1
- package/src/cli/cmd_Checks.ts +0 -14
- package/src/cli/cmd_Db.ts +3 -82
- package/src/cli/cmd_Home.ts +4 -32
- package/src/cli/cmd_Hq.ts +0 -17
- package/src/cli/cmd_Releases.ts +57 -4
- package/src/cli/cmd_Review.ts +333 -354
- package/src/cli/cmd_SocialDrafts.ts +6 -13
- package/src/cli/cmd_ThreadSyncNeeds.ts +6 -2
- package/src/cli/cmd_Time.ts +1 -1
- package/src/cli/cmd_Trailer.ts +1 -1
- package/src/cli/inbox-hook-run.ts +5 -23
- package/src/cli/registry-heads.ts +5 -55
- package/src/cli/registry.ts +1 -5
- package/src/cli/review-here.ts +1 -1
- package/src/cli.ts +2 -2
- package/src/collections/collection-types.ts +1 -1
- package/src/collections/review.ts +5 -4
- package/src/core/agent-allow-policy.ts +32 -2
- package/src/core/agent-env.ts +8 -0
- package/src/core/allow-rows.ts +74 -0
- package/src/core/check-file-names.ts +19 -106
- package/src/core/footprint.ts +17 -13
- package/src/core/identities-root.ts +1 -4
- package/src/core/layout.ts +1 -2
- package/src/core/machine-db.ts +33 -208
- package/src/core/machine-layout.ts +14 -127
- package/src/core/mask-source.ts +60 -0
- package/src/core/memory-watch.ts +17 -14
- package/src/core/motherhome.ts +8 -35
- package/src/core/one-way-in-policy.ts +0 -3
- package/src/core/repo-walk.ts +0 -9
- package/src/core/retention.ts +1 -9
- package/src/core/retired-checks.ts +2 -0
- package/src/core/tmux-policy.ts +1 -1
- package/src/core/tree-watch.ts +2 -2
- package/src/core/when.ts +7 -45
- package/src/gate/discover-checks.ts +42 -32
- package/src/gate/gate-checks.ts +21 -131
- package/src/gate/pre-commit-discovery.ts +16 -25
- package/src/gate/run-check.ts +0 -4
- package/src/gate/run-fix.ts +5 -17
- package/src/gate/run-fixers.ts +6 -42
- package/src/home/app-sign.ts +2 -2
- package/src/home/backup-status.ts +52 -92
- package/src/home/backup-verdict.ts +2 -2
- package/src/home/daemon-jobs.ts +51 -95
- package/src/home/database-words.ts +1 -2
- package/src/home/databases.ts +9 -25
- package/src/home/home-launchd.ts +0 -6
- package/src/home/home-paths.ts +8 -4
- package/src/home/home-routes.ts +3 -10
- package/src/home/home-state.ts +2 -14
- package/src/home/inbox-shape.ts +14 -15
- package/src/home/inbox.ts +1 -1
- package/src/home/machine-repair.ts +102 -103
- package/src/home/resume.ts +1 -15
- package/src/home/run-daemon.ts +4 -11
- package/src/home/space-page.ts +3 -2
- package/src/home/supervise.ts +3 -7
- package/src/hooks/hook-config.ts +6 -7
- package/src/hooks/leak-guard.ts +1 -1
- package/src/hooks/run-hooks.ts +0 -5
- package/src/hq/daemon-db.ts +8 -8
- package/src/hq/door.ts +3 -16
- package/src/hq/hq-db.ts +4 -3
- package/src/hq/hq-local.ts +1 -2
- package/src/hq/hq-store.ts +0 -15
- package/src/hq/item-direct.ts +8 -10
- package/src/hq/item-fill.ts +37 -0
- package/src/hq/kinds/item-gone.ts +7 -10
- package/src/hq/kinds/item-msg.ts +12 -18
- package/src/hq/kinds/item.ts +13 -19
- package/src/hq/kinds/report.ts +3 -4
- package/src/hq/owner-switch.ts +3 -3
- package/src/hq/report.ts +5 -9
- package/src/hq/switch.ts +2 -11
- package/src/hq/thread-sync.ts +5 -17
- package/src/hq/{shapes-words.ts → threads-words.ts} +2 -12
- package/src/http/owner-word.ts +1 -1
- package/src/identities/machine.ts +16 -0
- package/src/init-repo.ts +0 -1
- package/src/ledger/check-stats.ts +6 -5
- package/src/ledger/db.ts +2 -4
- package/src/ledger/record-kept.ts +117 -48
- package/src/ledger/run-log.ts +21 -2
- package/src/ledger/slow-tests.ts +96 -0
- package/src/ledger/store.ts +3 -86
- package/src/ledger/suite-log.ts +8 -2
- package/src/media-store/backup/facts.ts +3 -37
- package/src/media-store/backup/keys.ts +1 -8
- package/src/media-store/backup/manifest.ts +6 -67
- package/src/media-store/backup/restore.ts +4 -13
- package/src/media-store/backup/retention.ts +13 -1
- package/src/media-store/backup/run.ts +6 -267
- package/src/media-store/backup/snapshot.ts +2 -38
- package/src/media-store/backup/sources.ts +3 -113
- package/src/media-store/backup/target-send.ts +5 -29
- package/src/media-store/db.ts +8 -7
- package/src/media-store/forget-one.ts +1 -1
- package/src/media-store/forget.ts +1 -80
- package/src/orchestrator/guards.ts +0 -1
- package/src/orchestrator/presence.ts +2 -2
- package/src/orchestrator/routes.ts +1 -1
- package/src/orchestrator/started.ts +0 -9
- package/src/orchestrator/talk-key.ts +3 -4
- package/src/orchestrator/unheard.ts +1 -1
- package/src/recordings/edit.ts +3 -3
- package/src/recordings/marks-draw.ts +17 -6
- package/src/recordings/marks.ts +120 -9
- package/src/reflections/reflections-queue.ts +3 -10
- package/src/release/notes.ts +1 -1
- package/src/release/public-clean.ts +66 -6
- package/src/release/run-bump.ts +11 -0
- package/src/release/run-release.ts +4 -0
- package/src/releases/from-thread.ts +3 -3
- package/src/releases/model.ts +186 -36
- package/src/releases/store.ts +13 -3
- package/src/releases/validate.ts +83 -0
- package/src/repo-config.ts +29 -64
- package/src/review/answer-kinds.ts +61 -4
- package/src/review/blocked-guard.ts +11 -0
- package/src/review/blocked-object.ts +298 -0
- package/src/review/cells.ts +116 -229
- package/src/review/close.ts +39 -1
- package/src/review/doc-save.ts +3 -2
- package/src/review/draft-item.ts +1 -1
- package/src/review/events.ts +3 -7
- package/src/review/expect.ts +23 -39
- package/src/review/format.ts +79 -46
- package/src/review/glyphs.ts +1 -0
- package/src/review/hand-over.ts +3 -3
- package/src/review/heard.ts +1 -1
- package/src/review/holds-sync.ts +2 -1
- package/src/review/inbox-hook.ts +2 -2
- package/src/review/inbox-read.ts +39 -33
- package/src/review/instruction-guards.ts +12 -0
- package/src/review/instructions.ts +0 -1
- package/src/review/item-db.ts +13 -43
- package/src/review/item-hq.ts +2 -2
- package/src/review/item-rows.ts +3 -14
- package/src/review/kind-catalog.ts +3 -1
- package/src/review/kinds.ts +18 -8
- package/src/review/live-view.ts +3 -0
- package/src/review/media-kind.ts +1 -1
- package/src/review/mentions.ts +1 -2
- package/src/review/model.ts +158 -114
- package/src/review/move.ts +149 -0
- package/src/review/need-threads.ts +3 -2
- package/src/review/object-card.ts +11 -0
- package/src/review/object-read.ts +6 -1
- package/src/review/one-block.ts +1 -1
- package/src/review/owner-read.ts +1 -1
- package/src/review/phone-push.ts +10 -9
- package/src/review/previews.ts +32 -4
- package/src/review/push.ts +2 -2
- package/src/review/recap.ts +129 -0
- package/src/review/referring.ts +6 -3
- package/src/review/reflection-object.ts +4 -3
- package/src/review/routes.ts +49 -19
- package/src/review/secret-route.ts +3 -2
- package/src/review/settle.ts +0 -6
- package/src/review/snooze.ts +5 -3
- package/src/review/speaker.ts +68 -0
- package/src/review/start-title.ts +19 -0
- package/src/review/store.ts +86 -59
- package/src/review/{wakes.ts → thread-events.ts} +92 -7
- package/src/review/thread-md.ts +35 -14
- package/src/review/thread-state.ts +798 -0
- package/src/review/threads.ts +29 -347
- package/src/review/traces.ts +104 -7
- package/src/review/trailer-item.ts +1 -1
- package/src/review/unit.ts +7 -9
- package/src/review/verdict-items.ts +12 -10
- package/src/review/view-layout.ts +25 -1
- package/src/review/watch-feed.ts +1 -2
- package/src/review/working-guards.ts +2 -3
- package/src/rules/untrack-generated.ts +1 -15
- package/src/secrets/lapse.ts +2 -1
- package/src/serve/hub-app/advisor-app.tsx +4 -4
- package/src/serve/hub-app/advisor-face.tsx +9 -3
- package/src/serve/hub-app/advisor-host.ts +27 -27
- package/src/serve/hub-app/advisors-model.ts +17 -8
- package/src/serve/hub-app/advisors-rights.tsx +1 -1
- package/src/serve/hub-app/advisors-st.ts +15 -14
- package/src/serve/hub-app/advisors-view.tsx +13 -11
- package/src/serve/hub-app/app-bridge.ts +23 -3
- package/src/serve/hub-app/asks-page.tsx +1 -1
- package/src/serve/hub-app/auto-text.tsx +71 -16
- package/src/serve/hub-app/check-view.tsx +0 -8
- package/src/serve/hub-app/controls.css +14 -3
- package/src/serve/hub-app/database-view.tsx +1 -2
- package/src/serve/hub-app/git-view.tsx +3 -1
- package/src/serve/hub-app/hub.css +12 -5
- package/src/serve/hub-app/icons.tsx +1 -1
- package/src/serve/hub-app/inbox-view.tsx +1 -2
- package/src/serve/hub-app/live-sources.ts +2 -2
- package/src/serve/hub-app/main-panel.tsx +2 -1
- package/src/serve/hub-app/panel-repo.ts +0 -9
- package/src/serve/hub-app/pic.tsx +29 -12
- package/src/serve/hub-app/polled.ts +16 -2
- package/src/serve/hub-app/recordings-st.ts +23 -2
- package/src/serve/hub-app/recordings-view.tsx +68 -10
- package/src/serve/hub-app/ref-pill.ts +1 -1
- package/src/serve/hub-app/repo-st.ts +1 -2
- package/src/serve/hub-app/review/advisor-add.tsx +1 -1
- package/src/serve/hub-app/review/advisor-invite.tsx +1 -1
- package/src/serve/hub-app/review/draft-body.tsx +2 -2
- package/src/serve/hub-app/review/heard-line.tsx +1 -1
- package/src/serve/hub-app/review/instructions-view.tsx +1 -8
- package/src/serve/hub-app/review/kind-states.tsx +14 -9
- package/src/serve/hub-app/review/kit.tsx +4 -11
- package/src/serve/hub-app/review/lane-bar.tsx +3 -3
- package/src/serve/hub-app/review/lightbox.tsx +15 -11
- package/src/serve/hub-app/review/line-window.ts +4 -1
- package/src/serve/hub-app/review/live-bar-st.ts +2 -2
- package/src/serve/hub-app/review/live-view.tsx +57 -1
- package/src/serve/hub-app/review/object-panel.tsx +20 -8
- package/src/serve/hub-app/review/question-views.tsx +181 -54
- package/src/serve/hub-app/review/recap-bar.tsx +40 -0
- package/src/serve/hub-app/review/request-cell.tsx +48 -0
- package/src/serve/hub-app/review/review-cells.tsx +154 -96
- package/src/serve/hub-app/review/review-host.ts +2 -2
- package/src/serve/hub-app/review/review-kit.ts +17 -11
- package/src/serve/hub-app/review/review-list.tsx +23 -31
- package/src/serve/hub-app/review/review-st.ts +30 -40
- package/src/serve/hub-app/review/review-thread.tsx +139 -85
- package/src/serve/hub-app/review/review-views.tsx +124 -68
- package/src/serve/hub-app/review/share-lines.tsx +4 -4
- package/src/serve/hub-app/review/start-st.ts +2 -5
- package/src/serve/hub-app/review/superseded-runs.ts +4 -3
- package/src/serve/hub-app/review/thread-close.tsx +10 -7
- package/src/serve/hub-app/review/thread-st.ts +372 -201
- package/src/serve/hub-app/review/tone-bar.tsx +126 -0
- package/src/serve/hub-app/review/tones.ts +35 -0
- package/src/serve/hub-app/review/trailer-body.tsx +2 -2
- package/src/serve/hub-app/review/trailer-st.ts +3 -2
- package/src/serve/hub-app/review/trailer-voices-st.ts +3 -2
- package/src/serve/hub-app/review.css +180 -106
- package/src/serve/hub-app/search-view.tsx +1 -1
- package/src/serve/hub-app/social/social-model.ts +0 -4
- package/src/serve/hub-app/source-acts.ts +2 -1
- package/src/serve/hub-app/stores/stores-page.tsx +2 -2
- package/src/serve/hub-app/terminal-sources.tsx +2 -1
- package/src/serve/hub-app/thread-row.tsx +3 -4
- package/src/serve/hub-app/tree-build.ts +0 -4
- package/src/serve/hub-app/urls-view.tsx +2 -1
- package/src/serve/hub-app/view-layout.css +13 -3
- package/src/serve/hub-app/wikis-view.tsx +5 -2
- package/src/serve/hub-runtime.ts +7 -37
- package/src/serve/project-gutter-route.ts +6 -2
- package/src/serve/read-thread.ts +20 -2
- package/src/serve/read-worker.ts +9 -1
- package/src/serve/record-pages.ts +46 -0
- package/src/serve/serve-hub.ts +2 -2
- package/src/serve/terminal-host.ts +1 -1
- package/src/serve/terminal-route.ts +1 -3
- package/src/serve/tracked-watch.ts +1 -3
- package/src/setup-house.ts +2 -2
- package/src/shipkit-files.ts +1 -1
- package/src/shipkit.ts +1 -6
- package/src/shot/film-box.ts +0 -20
- package/src/social/drafts.ts +1 -1
- package/src/social/kinds.ts +6 -29
- package/src/social/load.ts +2 -2
- package/src/social/post-object.ts +3 -2
- package/src/social/release-stage.ts +1 -1
- package/src/social/stage.ts +2 -2
- package/src/stores/model.ts +4 -0
- package/src/stores/routes.ts +11 -3
- package/src/suite/judge-suites.ts +58 -0
- package/src/suite/red-alone.ts +54 -18
- package/src/suite/runner-shapes.ts +2 -2
- package/src/suite/suite-cli.ts +67 -14
- package/src/suite/test-units.ts +2 -1
- package/src/urls/fill.ts +1 -1
- package/src/urls/places.ts +1 -2
- package/src/vault/vault-config.ts +2 -2
- package/src/vault/vault-init.ts +1 -5
- package/src/wiki/graph-page.ts +14 -2
- package/src/advisors/copy-truth.ts +0 -49
- package/src/advisors/door-child.ts +0 -112
- package/src/advisors/door-serve.ts +0 -52
- package/src/advisors/door.ts +0 -118
- package/src/checks/SK016-legacy-check-shapes.check.ts +0 -189
- package/src/checks/SK029-explicit-check-files.check.ts +0 -112
- package/src/checks/SK048-one-local-file.check.ts +0 -36
- package/src/core/config-rewrite.ts +0 -111
- package/src/core/daemon-port.ts +0 -10
- package/src/core/legacy-shapes.ts +0 -263
- package/src/core/migrate-layout.ts +0 -638
- package/src/core/port-check-cli.ts +0 -52
- package/src/core/port-check-file.ts +0 -295
- package/src/core/port-check-files.ts +0 -31
- package/src/gate/discover-legacy-checks.ts +0 -26
- package/src/home/home-move.ts +0 -527
- package/src/home/machine-fold.ts +0 -810
- package/src/hq/item-shapes.ts +0 -54
- package/src/hq/kinds/items-read.ts +0 -4
- package/src/media-store/backup/daemon.ts +0 -220
- package/src/media-store/backup/kept.ts +0 -241
- package/src/media-store/backup/prune.ts +0 -359
- package/src/media-store/backup/secret.ts +0 -88
- package/src/media-store/backup/ssh-space.ts +0 -202
- package/src/media-store/backup/watch.ts +0 -117
- package/src/review/band.ts +0 -182
- package/src/review/folders.ts +0 -216
- package/src/review/hook-ask.ts +0 -58
- package/src/review/role.ts +0 -48
- package/src/review/thread-fold.ts +0 -64
- package/src/review/wait.ts +0 -91
- package/src/rules/rule.ts +0 -43
- package/src/serve/hook-thread.ts +0 -37
- package/src/serve/hook-work.ts +0 -92
- package/src/serve/hook-worker.ts +0 -57
- package/src/serve/hub-app/review/dock.tsx +0 -147
- package/src/serve/hub-app/review/faces.tsx +0 -18
- package/src/serve/hub-app/review/item-verdict.tsx +0 -112
- package/src/serve/hub-app/review/review-board.tsx +0 -48
- /package/src/{scaffold → core}/jsonc-spans.ts +0 -0
|
@@ -20,8 +20,16 @@
|
|
|
20
20
|
.rv-still.cover img{object-fit:cover}
|
|
21
21
|
.rv-stillopen{position:absolute;right:var(--s2);bottom:var(--s2);padding:2px var(--s2);border-radius:6px;font-size:12px;font-weight:600;color:var(--bg);background:color-mix(in srgb,var(--ink) 70%,transparent);pointer-events:none}
|
|
22
22
|
.rv-still:hover .rv-stillopen{background:var(--accent)}
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
/* a live page's tile (live-view.tsx LiveTile): its shot in a border of its own colour, IFRAME on it, its ways to open
|
|
24
|
+
it in a column down its right side */
|
|
25
|
+
.rv-livetile{position:relative;display:flex;aspect-ratio:16/10;border:2px solid var(--iframe);border-radius:8px;overflow:hidden;background:var(--panel2)}
|
|
26
|
+
.rv-view.s-tile .rv-viewmedia > .rv-livetile,.rv-view.s-thumb .rv-viewmedia > .rv-livetile{position:absolute;inset:0;aspect-ratio:auto}
|
|
27
|
+
.rv-livetile > .rv-still{flex:1;min-width:0;height:100%}
|
|
28
|
+
.rv-iframetag{position:absolute;left:var(--s2);top:var(--s2);padding:var(--s0) var(--s2);border-radius:4px;font:700 11px/16px ui-monospace,Menlo,monospace;letter-spacing:.08em;color:var(--bg);background:var(--iframe);pointer-events:none}
|
|
29
|
+
.rv-iframerail{flex:none;display:flex;flex-direction:column;gap:var(--s1);padding:var(--s1);overflow:hidden;border-left:2px solid var(--iframe);background:color-mix(in srgb,var(--iframe) 14%,var(--panel))}
|
|
30
|
+
.rv-iframerail > :is(a,button){display:grid;place-items:center;flex:none;width:28px;height:28px;padding:0;border:1px solid color-mix(in srgb,var(--iframe) 45%,transparent);border-radius:6px;color:var(--iframe);background:var(--panel);cursor:pointer}
|
|
31
|
+
.rv-iframerail > :is(a,button):hover,.rv-iframerail > :is(a,button):focus-visible{color:var(--bg);background:var(--iframe)}
|
|
32
|
+
.rv-view.f-live .rv-viewtools{right:44px}
|
|
25
33
|
.rv-stillplay{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;transform:translate(-50%,-50%);font-size:17px;color:var(--bg);background:color-mix(in srgb,var(--ink) 60%,transparent);pointer-events:none}
|
|
26
34
|
|
|
27
35
|
/* a pair: its after; the pointer on it cross fades to its before (PEEK_MS), a tap toggles it on touch */
|
|
@@ -64,8 +72,10 @@
|
|
|
64
72
|
/* a gallery: equal tiles filling the row, --gmin the least width (its size control) */
|
|
65
73
|
.rv-gtiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--gmin,208px)),1fr));gap:var(--s3) var(--s2)}
|
|
66
74
|
.rv-gallerywrap.large .rv-gtiles{gap:var(--s2) var(--s1)}
|
|
75
|
+
/* a tile's picture: its size is its width and its ratio alone, so each is its own layout root, and one out of view is
|
|
76
|
+
not laid out at all */
|
|
67
77
|
.rv-gtile{display:flex;flex-direction:column;gap:var(--s1);min-width:0;padding:0;border:0;background:none;color:inherit;text-align:left;cursor:zoom-in}
|
|
68
|
-
.rv-gtileimg{position:relative;display:block;aspect-ratio:16/10;border-radius:8px;overflow:hidden;background:repeating-conic-gradient(var(--chk1) 0 25%,var(--chk2) 0 50%) 0 0/12px 12px;box-shadow:0 0 0 1px var(--line);transition:box-shadow .12s}
|
|
78
|
+
.rv-gtileimg{position:relative;display:block;aspect-ratio:16/10;border-radius:8px;overflow:hidden;background:repeating-conic-gradient(var(--chk1) 0 25%,var(--chk2) 0 50%) 0 0/12px 12px;box-shadow:0 0 0 1px var(--line);transition:box-shadow .12s;contain:strict;content-visibility:auto}
|
|
69
79
|
.rv-gtileimg img{display:block;width:100%;height:100%;object-fit:contain}
|
|
70
80
|
.rv-gtile:hover .rv-gtileimg,.rv-gtile:focus-visible .rv-gtileimg{box-shadow:0 0 0 2px var(--accent)}
|
|
71
81
|
.rv-gtile[class*=' re-'] .rv-gtileimg{box-shadow:0 0 0 2px var(--tone)}
|
|
@@ -75,6 +75,7 @@ export const WikisView = observer(({ app, id, label }: { app: RepoSt; id: string
|
|
|
75
75
|
const WikiBody = observer(({ app, w, href, title }: { app: RepoSt; w: WikiSt; href: string; title: string }) => {
|
|
76
76
|
const el = useRef<HTMLDivElement | null>(null)
|
|
77
77
|
const frame = useRef<HTMLIFrameElement | null>(null)
|
|
78
|
+
const [loaded, setLoaded] = useState(false)
|
|
78
79
|
const theme = app.home.theme.scheme
|
|
79
80
|
// the theme the graph first paints in rides its url; a later change is a message, never a reload
|
|
80
81
|
const first = useRef(theme)
|
|
@@ -90,10 +91,12 @@ const WikiBody = observer(({ app, w, href, title }: { app: RepoSt; w: WikiSt; hr
|
|
|
90
91
|
const below = w.place === 'bottom'
|
|
91
92
|
const graph = (
|
|
92
93
|
<Panel key="graph" id="wiki-graph" minSize={below ? 160 : 280} style={PANEL}>
|
|
93
|
-
{/* the spinner sits under the frame
|
|
94
|
-
|
|
94
|
+
{/* the spinner sits under the frame until the graph page loaded, never longer: covered, it would still turn (a frame
|
|
95
|
+
of the compositor each refresh) for as long as the page stays open */}
|
|
96
|
+
<div className="gvframe">{loaded ? null : <span className="gvwait"><span className="spin" />reading the wiki…</span>}
|
|
95
97
|
<iframe ref={(f) => { frame.current = f; w.setFrame(f?.contentWindow ?? null) }} src={`${app.url(href)}${sep}theme=${first.current}`} title={title}
|
|
96
98
|
onLoad={() => {
|
|
99
|
+
setLoaded(true)
|
|
97
100
|
w.setFrame(frame.current?.contentWindow ?? null)
|
|
98
101
|
w.send({ type: 'wiki-graph:theme', theme: app.home.theme.scheme })
|
|
99
102
|
if (w.page != null) w.send({ type: 'wiki-graph:focus', id: w.page.id })
|
package/src/serve/hub-runtime.ts
CHANGED
|
@@ -26,10 +26,10 @@ import { pingTick } from '../collections/pings.ts'
|
|
|
26
26
|
import { baseWikiRoot, configStamp, graphMounts, hubCollections } from './hub-collections.ts'
|
|
27
27
|
import type { ReadThread } from './read-thread.ts'
|
|
28
28
|
import { loadRepoConfig, type RepoConfig } from '../repo-config.ts'
|
|
29
|
-
import { allTasks
|
|
29
|
+
import { allTasks } from '../gate/gate-checks.ts'
|
|
30
30
|
import { runCheck, type CheckEvent } from '../gate/run-check.ts'
|
|
31
31
|
import { runCi, type CiOpts } from '../gate/run-ci.ts'
|
|
32
|
-
import { readInvocations, readLive,
|
|
32
|
+
import { readInvocations, readLive, readRunsSince, runsPath, sweepLive } from '../ledger/run-log.ts'
|
|
33
33
|
import { LIVE_HISTORY_MS, shapeLive, type LiveView } from '../ledger/live-timeline.ts'
|
|
34
34
|
import { parallelCap } from '../core/parallel.ts'
|
|
35
35
|
import { autoGatePool, takeSlot } from '../core/slots.ts'
|
|
@@ -41,12 +41,8 @@ import { OtherRepos } from './other-repos.ts'
|
|
|
41
41
|
import { HouseRuns } from './house-runs.ts'
|
|
42
42
|
import { runsPushStamp } from './runs-stamp.ts'
|
|
43
43
|
import { recordStamp } from '../house/project-gutter.ts'
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import { shapeTestCheck, shapeTestsRoot } from '../collections/test-time.ts'
|
|
47
|
-
import type { NeedItem, TestFacts } from '../collections/collection-types.ts'
|
|
48
|
-
import { declaredSlowFiles } from '../suite/test-units.ts'
|
|
49
|
-
import { BUILD_TIMEOUT_MS, CHECK_TIMEOUT_MS } from '../collections/checks.ts'
|
|
44
|
+
import { recordTests, recordTimeline } from './record-pages.ts'
|
|
45
|
+
import type { NeedItem } from '../collections/collection-types.ts'
|
|
50
46
|
import { watchTracked } from './tracked-watch.ts'
|
|
51
47
|
import { repoSource } from '../plan/repo-source.ts'
|
|
52
48
|
import type { PlanSource, Planner } from '../plan/planner.ts'
|
|
@@ -323,35 +319,9 @@ export async function resolveHubDeps(root: string, boot: RepoConfig, io: ServeIo
|
|
|
323
319
|
// house repo, built on the first ask (a hub the daemon loads is never
|
|
324
320
|
// asked, the daemon answers for the house)
|
|
325
321
|
house: () => (house ??= houseOf(root, c.name)).view(),
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const inventory = await gateInventory(root, c)
|
|
330
|
-
for (const row of inventory) {
|
|
331
|
-
ceilings[row.decl.id] = row.timeoutMs ?? (row.build ? BUILD_TIMEOUT_MS : CHECK_TIMEOUT_MS)
|
|
332
|
-
budgets[row.decl.id] = row.budgetMs
|
|
333
|
-
}
|
|
334
|
-
await warmRuns(record)
|
|
335
|
-
await warmSuites(record)
|
|
336
|
-
return shapeTimeline({
|
|
337
|
-
runs: readRuns(record),
|
|
338
|
-
invocations: readInvocations(record),
|
|
339
|
-
suites: readSuites(record),
|
|
340
|
-
ceilings,
|
|
341
|
-
budgets,
|
|
342
|
-
inventory: inventory.map((row) => row.decl.id),
|
|
343
|
-
declaredSlow: declaredSlowFiles(c),
|
|
344
|
-
cap: parallelCap(),
|
|
345
|
-
})
|
|
346
|
-
},
|
|
347
|
-
tests: async (check) => {
|
|
348
|
-
// the SAME test files the tree lists, from the same provider
|
|
349
|
-
const col = allCollections().find((x) => x.id === 'tests')
|
|
350
|
-
const facts = col == null ? [] : (await col.list()).flatMap((i): TestFacts[] => (i.test == null ? [] : [i.test]))
|
|
351
|
-
await warmRuns(record)
|
|
352
|
-
const input = { facts, runs: readRuns(record), suiteRuns: readSuiteRuns(record) }
|
|
353
|
-
return check == null || check === '' ? shapeTestsRoot(input) : shapeTestCheck(check, input)
|
|
354
|
-
},
|
|
322
|
+
// the whole record read in the read thread, which holds it for the rows already (record-pages.ts)
|
|
323
|
+
timeline: () => (readThread == null ? recordTimeline(root, c, record) : readThread.timeline(root)),
|
|
324
|
+
tests: (check) => (readThread == null ? recordTests(allCollections(), record, check) : readThread.tests(root, check)),
|
|
355
325
|
needs: () => projectNeeds(allCollections(), hubProblems.collector),
|
|
356
326
|
hubProblems,
|
|
357
327
|
// a job outlives this image, so only an in process run holds a reload back
|
|
@@ -32,7 +32,7 @@ import { storeDir, warmStore } from '../review/store.ts'
|
|
|
32
32
|
import { writeArchived } from '../core/archived.ts'
|
|
33
33
|
import { machinePath } from '../core/machine-layout.ts'
|
|
34
34
|
import { identitiesDir, pictureVersion } from '../identities/identities.ts'
|
|
35
|
-
import { identityCache, markFile, railOf, speakerIdOf, type RailIdentity } from '../identities/machine.ts'
|
|
35
|
+
import { identityCache, markFile, markPng, railOf, speakerIdOf, type RailIdentity } from '../identities/machine.ts'
|
|
36
36
|
import { speaksAsOfText } from '../social/house.ts'
|
|
37
37
|
import { isStoreRefused } from '../core/machine-db.ts'
|
|
38
38
|
import { atomicWrite } from '../core/atomic-write.ts'
|
|
@@ -523,7 +523,11 @@ export function projectGutter(d: GutterDeps) {
|
|
|
523
523
|
if (file == null || !existsSync(file)) return new Response(`no mark for the identity ${JSON.stringify(id)}`, { status: 404 })
|
|
524
524
|
// the url names the file's version (markUrl): kept for good while it is the current one, else asked again
|
|
525
525
|
const v = new URL(req.url).searchParams.get('v')
|
|
526
|
-
|
|
526
|
+
const now = pictureVersion(file)
|
|
527
|
+
const cache = { 'cache-control': v != null && v !== '' && v === now ? 'public, max-age=31536000, immutable' : 'no-cache' }
|
|
528
|
+
// the mark at the size the hub draws it (markPng), the file itself only when it does not decode
|
|
529
|
+
const png = await markPng(file, now)
|
|
530
|
+
return png == null ? new Response(Bun.file(file), { headers: cache }) : new Response(png, { headers: { ...cache, 'content-type': 'image/png' } })
|
|
527
531
|
}
|
|
528
532
|
if (path.startsWith('/api/projects/app-icon/')) {
|
|
529
533
|
if (repos.length === 0) await answer()
|
package/src/serve/read-thread.ts
CHANGED
|
@@ -7,8 +7,16 @@
|
|
|
7
7
|
// new one; the warm cell and the parties' few seconds keep their last answer meanwhile
|
|
8
8
|
import type { StoreParties } from '../review/store-parties.ts'
|
|
9
9
|
import type { RowsAnswer } from './hub-collections.ts'
|
|
10
|
+
import type { Timeline } from '../ledger/run-timeline.ts'
|
|
11
|
+
import type { TestCheckView, TestsRootView } from '../collections/test-time.ts'
|
|
10
12
|
|
|
11
|
-
export type ReadAsk = { id: number } & (
|
|
13
|
+
export type ReadAsk = { id: number } & (
|
|
14
|
+
| { kind: 'rows'; root: string; reset: boolean }
|
|
15
|
+
| { kind: 'timeline'; root: string }
|
|
16
|
+
| { kind: 'tests'; root: string; check: string | null }
|
|
17
|
+
| { kind: 'parties'; dir: string }
|
|
18
|
+
| { kind: 'snapshot'; file: string }
|
|
19
|
+
)
|
|
12
20
|
export type ReadReply = { id: number; answer: unknown } | { id: number; error: string }
|
|
13
21
|
|
|
14
22
|
const ENTRY = new URL('./read-worker.ts', import.meta.url).href
|
|
@@ -17,7 +25,7 @@ const ENTRY = new URL('./read-worker.ts', import.meta.url).href
|
|
|
17
25
|
type Ask = ReadAsk extends infer A ? (A extends { id: number } ? Omit<A, 'id'> : never) : never
|
|
18
26
|
|
|
19
27
|
/** one worker thread that answers numbered asks (`{ id, answer }` or `{ id, error }`), started at the first ask and
|
|
20
|
-
* again at the next one once it died: the read thread here
|
|
28
|
+
* again at the next one once it died: the read thread here */
|
|
21
29
|
export class WorkerThread<A extends object> {
|
|
22
30
|
private w: Worker | null = null
|
|
23
31
|
private next = 0
|
|
@@ -82,6 +90,16 @@ export class ReadThread extends WorkerThread<Ask> {
|
|
|
82
90
|
return this.ask({ kind: 'rows', root, reset })
|
|
83
91
|
}
|
|
84
92
|
|
|
93
|
+
/** the timeline page of the repo at `root`, from its whole run record (record-pages.ts) */
|
|
94
|
+
timeline(root: string): Promise<Timeline> {
|
|
95
|
+
return this.ask({ kind: 'timeline', root })
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** the tests page of the repo at `root`, of one check or of them all */
|
|
99
|
+
tests(root: string, check: string | null): Promise<TestsRootView | TestCheckView> {
|
|
100
|
+
return this.ask({ kind: 'tests', root, check })
|
|
101
|
+
}
|
|
102
|
+
|
|
85
103
|
/** the parties of the store at `dir` */
|
|
86
104
|
parties(dir: string): Promise<StoreParties> {
|
|
87
105
|
return this.ask({ kind: 'parties', dir })
|
package/src/serve/read-worker.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
// the daemon's read thread (read-thread.ts): every repo's rows
|
|
1
|
+
// the daemon's read thread (read-thread.ts): every repo's rows, its two pages of the whole run record and every
|
|
2
|
+
// store's parties read here, off the loop every
|
|
2
3
|
// page waits on. Each repo keeps its config, kit and comfy mark between two computes of its rows, read again when its
|
|
3
4
|
// config file moves, and from scratch when its hub loads again (`reset`).
|
|
4
5
|
import { existsSync } from 'fs'
|
|
@@ -10,6 +11,8 @@ import { computeRows, configStamp, graphMounts, hubCollections } from './hub-col
|
|
|
10
11
|
import { hubParties } from '../orchestrator/places.ts'
|
|
11
12
|
import { installOneLib } from '../core/one-lib.ts'
|
|
12
13
|
import { keepTranscriptListing } from '../agent-time/store.ts'
|
|
14
|
+
import { recordTests, recordTimeline } from './record-pages.ts'
|
|
15
|
+
import { runsPath } from '../ledger/run-log.ts'
|
|
13
16
|
import type { ReadAsk, ReadReply } from './read-thread.ts'
|
|
14
17
|
|
|
15
18
|
declare const self: Worker
|
|
@@ -53,6 +56,11 @@ async function answer(a: ReadAsk): Promise<ReadReply> {
|
|
|
53
56
|
await Bun.write(a.file, Bun.generateHeapSnapshot('v8', 'arraybuffer'), { createPath: true })
|
|
54
57
|
return { id: a.id, answer: process.memoryUsage().heapUsed }
|
|
55
58
|
}
|
|
59
|
+
if (a.kind === 'timeline') return { id: a.id, answer: await recordTimeline(a.root, (await repoAt(a.root, false)).c, runsPath(a.root)) }
|
|
60
|
+
if (a.kind === 'tests') {
|
|
61
|
+
const t = await repoAt(a.root, false)
|
|
62
|
+
return { id: a.id, answer: await recordTests(hubCollections(a.root, t.c, t.kit, graphMounts(a.root, t.c), t.comfy), runsPath(a.root), a.check) }
|
|
63
|
+
}
|
|
56
64
|
const r = await repoAt(a.root, a.reset)
|
|
57
65
|
return { id: a.id, answer: await computeRows(hubCollections(a.root, r.c, r.kit, graphMounts(a.root, r.c), r.comfy)) }
|
|
58
66
|
} catch (e) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// the two pages shaped from a repo's run record: the timeline and the tests. Each reads the recent runs and suite rows
|
|
2
|
+
// of every check and test file, which record-kept.ts holds in memory for the thread that read them, bounded per key.
|
|
3
|
+
// The daemon asks both of its read thread (read-worker.ts), which holds that record for the rows already, so its loop's
|
|
4
|
+
// thread never holds a second copy; a hub serving alone computes them in process, through the same functions
|
|
5
|
+
import type { RepoConfig } from '../repo-config.ts'
|
|
6
|
+
import type { Collection, TestFacts } from '../collections/collection-types.ts'
|
|
7
|
+
import { gateInventory } from '../gate/gate-checks.ts'
|
|
8
|
+
import { readInvocations, readRuns, warmRuns } from '../ledger/run-log.ts'
|
|
9
|
+
import { readSuiteRuns, readSuites, warmSuites } from '../ledger/suite-log.ts'
|
|
10
|
+
import { shapeTimeline, type Timeline } from '../ledger/run-timeline.ts'
|
|
11
|
+
import { shapeTestCheck, shapeTestsRoot, type TestCheckView, type TestsRootView } from '../collections/test-time.ts'
|
|
12
|
+
import { declaredSlowFiles } from '../suite/test-units.ts'
|
|
13
|
+
import { parallelCap } from '../core/parallel.ts'
|
|
14
|
+
import { BUILD_TIMEOUT_MS, CHECK_TIMEOUT_MS } from '../collections/checks.ts'
|
|
15
|
+
|
|
16
|
+
/** every run on record, shaped for the timeline page */
|
|
17
|
+
export async function recordTimeline(root: string, c: RepoConfig, record: string): Promise<Timeline> {
|
|
18
|
+
const ceilings: Record<string, number> = {}
|
|
19
|
+
const budgets: Record<string, number> = {}
|
|
20
|
+
const inventory = await gateInventory(root, c)
|
|
21
|
+
for (const row of inventory) {
|
|
22
|
+
ceilings[row.decl.id] = row.timeoutMs ?? (row.build ? BUILD_TIMEOUT_MS : CHECK_TIMEOUT_MS)
|
|
23
|
+
budgets[row.decl.id] = row.budgetMs
|
|
24
|
+
}
|
|
25
|
+
await warmRuns(record)
|
|
26
|
+
await warmSuites(record)
|
|
27
|
+
return shapeTimeline({
|
|
28
|
+
runs: readRuns(record),
|
|
29
|
+
invocations: readInvocations(record),
|
|
30
|
+
suites: readSuites(record),
|
|
31
|
+
ceilings,
|
|
32
|
+
budgets,
|
|
33
|
+
inventory: inventory.map((row) => row.decl.id),
|
|
34
|
+
declaredSlow: declaredSlowFiles(c),
|
|
35
|
+
cap: parallelCap(),
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** the tests page, of one check or of them all: the SAME test files the tree lists, from the same provider */
|
|
40
|
+
export async function recordTests(collections: Collection[], record: string, check: string | null): Promise<TestsRootView | TestCheckView> {
|
|
41
|
+
const col = collections.find((x) => x.id === 'tests')
|
|
42
|
+
const facts = col == null ? [] : (await col.list()).flatMap((i): TestFacts[] => (i.test == null ? [] : [i.test]))
|
|
43
|
+
await warmRuns(record)
|
|
44
|
+
const input = { facts, runs: readRuns(record), suiteRuns: readSuiteRuns(record) }
|
|
45
|
+
return check == null || check === '' ? shapeTestsRoot(input) : shapeTestCheck(check, input)
|
|
46
|
+
}
|
package/src/serve/serve-hub.ts
CHANGED
|
@@ -380,12 +380,12 @@ export function hubHandler(d: HubDeps, o: { base?: string; projects?: Gutter } =
|
|
|
380
380
|
}
|
|
381
381
|
if (path.startsWith('/api/act/') && req.method === 'POST') {
|
|
382
382
|
// act-in-place verbs: an ask's act lands in its thread, an asset note in its file; errors surface as
|
|
383
|
-
// 400 text the card shows verbatim. An ask is named by its id (`ask`)
|
|
383
|
+
// 400 text the card shows verbatim. An ask is named by its id (`ask`).
|
|
384
384
|
// A secret value has no verb here: it goes to its thread's secret route alone (review/secret-route.ts)
|
|
385
385
|
// a parse error quotes the body, which can carry a pasted secret
|
|
386
386
|
const b = (await req.json().catch(() => null)) as Record<string, string> | null
|
|
387
387
|
if (b == null || typeof b !== 'object') return new Response('the body is not a json object', { status: 400 })
|
|
388
|
-
const ask = b.ask ??
|
|
388
|
+
const ask = b.ask ?? ''
|
|
389
389
|
try {
|
|
390
390
|
if (path === '/api/act/ask-done') askDone(d.root, ask)
|
|
391
391
|
else if (path === '/api/act/ask-decline') askDecline(d.root, ask, typeof b.why === 'string' ? b.why : undefined)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs'
|
|
13
13
|
import { dirname, join } from 'path'
|
|
14
14
|
import { homeDir } from '../home/home-paths.ts'
|
|
15
|
-
import { AGENT_ENV } from '../
|
|
15
|
+
import { AGENT_ENV } from '../core/agent-env.ts'
|
|
16
16
|
import { KEPT_ID, type KeptTerminal, type TerminalRecord } from './terminal-record.ts'
|
|
17
17
|
|
|
18
18
|
/** one terminal as tmux has it */
|
|
@@ -378,13 +378,11 @@ export function terminalRoutes(d: TerminalDeps) {
|
|
|
378
378
|
const why = hop ? terminalHopRefusal(req, d.hop) : terminalRefusal(req, srv.requestIP(req)?.address ?? null)
|
|
379
379
|
if (why != null) return new Response(why, { status: 403, headers: NO_STORE })
|
|
380
380
|
const scope = hop ? d.name : null
|
|
381
|
-
const b = (await req.json().catch(() => null)) as { page?: unknown; key?: unknown; id?: unknown; cols?: unknown; rows?: unknown; lines?: unknown;
|
|
381
|
+
const b = (await req.json().catch(() => null)) as { page?: unknown; key?: unknown; id?: unknown; cols?: unknown; rows?: unknown; lines?: unknown; act?: unknown; window?: unknown; name?: unknown; account?: unknown; type?: unknown; data?: unknown } | null
|
|
382
382
|
if (b == null || typeof b !== 'object') return new Response('the body is no json object', { status: 400, headers: NO_STORE })
|
|
383
383
|
if (path === '/api/terminal/close') return closePart(b, scope)
|
|
384
384
|
if (path === '/api/terminal/watch') return watch(b, scope)
|
|
385
385
|
if (path === '/api/terminal/open') {
|
|
386
|
-
// a session of another server is never attached by its name: every terminal the hub shows is the host's
|
|
387
|
-
if (b.attach != null) return new Response('a session is no longer shown by its name: the orchestrator is a terminal of the project, in the main panel', { status: 404, headers: NO_STORE })
|
|
388
386
|
return open(b, scope, size(b.cols, 2, 500, 80), size(b.rows, 2, 200, 24), typeof b.window === 'string' && /^@\d+$/.test(b.window) ? b.window : null)
|
|
389
387
|
}
|
|
390
388
|
// a part of a hop is acted on by that hop alone, a part of a page of this machine by such a page alone
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
// problems pane until the next save, never a green.
|
|
5
5
|
import { statSync } from 'fs'
|
|
6
6
|
import { join } from 'path'
|
|
7
|
-
import { GENERATED_IGNORE_LINES } from '../rules/untrack-generated.ts'
|
|
8
7
|
import { gitBin } from '../core/git-bin.ts'
|
|
9
8
|
import { LAYOUT } from '../core/layout.ts'
|
|
10
9
|
import { followTree, treeMoved } from '../core/tree-rev.ts'
|
|
@@ -12,11 +11,10 @@ import { yieldLoop } from '../core/loop-watch.ts'
|
|
|
12
11
|
import { watchTree } from '../core/tree-watch.ts'
|
|
13
12
|
|
|
14
13
|
/** every path a run of the gate or the hub itself writes, whatever the repo
|
|
15
|
-
* ignores: the
|
|
14
|
+
* ignores: the per run logs under the scratch dir, an atomic write's
|
|
16
15
|
* temp file, the comfy state the hub writes at boot. A save there is the
|
|
17
16
|
* machine's own, and triggering on it would schedule the next run forever */
|
|
18
17
|
export const GATE_WRITES: readonly string[] = [
|
|
19
|
-
...GENERATED_IGNORE_LINES.filter((l) => !l.startsWith('#')),
|
|
20
18
|
`${LAYOUT.tmp}/`,
|
|
21
19
|
'.*.tmp-*',
|
|
22
20
|
'.comfy-ts/',
|
package/src/setup-house.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { CONTEXT_FILE, CONTEXT_INCLUDE } from './context/context-view.ts'
|
|
|
13
13
|
import { LIB_VERSION } from './core/lib-version.ts'
|
|
14
14
|
import { consumerOf } from './core/machine-link.ts'
|
|
15
15
|
import { runner, type Run } from './git-bootstrap.ts'
|
|
16
|
-
import { installedHouseRoot,
|
|
16
|
+
import { installedHouseRoot, plistPath } from './home/home-launchd.ts'
|
|
17
17
|
import { daemonUp, homeUp, pmUp } from './home/home-paths.ts'
|
|
18
18
|
import { includeTargets } from './house/project-gutter.ts'
|
|
19
19
|
import { initRepo } from './init-repo.ts'
|
|
@@ -116,7 +116,7 @@ export async function refusals(o: { repo: string; house: string; home: string; s
|
|
|
116
116
|
const runs = installedHouseRoot(plistPath(o.home))
|
|
117
117
|
const ours = runs != null && real(runs) === real(o.house)
|
|
118
118
|
if (!ours) {
|
|
119
|
-
const marks = [plistPath(o.home),
|
|
119
|
+
const marks = [plistPath(o.home), join(o.home, '.shipkit', 'home', 'pm.log')]
|
|
120
120
|
for (const m of marks) if (existsSync(m)) out.push(`this machine already runs a shipkit house (${m} exists): sk setup makes the first one only. Wire a repo into the house you have with \`sk start <name>\` or \`sk init\``)
|
|
121
121
|
if (!o.scratch) for (const role of await o.portsUp()) out.push(`a shipkit ${role} answers on this machine: a house already runs here, so sk setup stops. To rehearse beside it, give the run a scratch home (--home) and its own ports (SHIPKIT_PM_PORT, SHIPKIT_DAEMON_PORT, SHIPKIT_HOME_PORT)`)
|
|
122
122
|
}
|
package/src/shipkit-files.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// trailer({...}) what `sk trailer` cannot read from a file: the
|
|
10
10
|
// sounds the repo resolves by id (trailer/adapter.ts)
|
|
11
11
|
// review({...}) the repo's parts of the review store: its subject
|
|
12
|
-
// kinds, topics, sources, auto rules,
|
|
12
|
+
// kinds, topics, sources, auto rules, its verbs
|
|
13
13
|
// (review/unit.ts)
|
|
14
14
|
// social({...}) the repo's parts of the social desks: its topics,
|
|
15
15
|
// its articles and their preview (social/unit.ts)
|
package/src/shipkit.ts
CHANGED
|
@@ -28,8 +28,6 @@ export { deriveRemote, dirtyPaths, remoteTags, strandedTags, tagExistsLocally }
|
|
|
28
28
|
export { collectReports, renderReports, attentionLines } from './release/run-releases.ts'
|
|
29
29
|
export { extractChangelogSection, promoteUnreleased, hasUnreleasedNotes, hasVersionSection } from './release/changelog.ts'
|
|
30
30
|
export type { UnitReport } from './release/run-releases.ts'
|
|
31
|
-
export { discoverLegacyChecks } from './gate/discover-legacy-checks.ts'
|
|
32
|
-
export type { LegacyCheck } from './gate/discover-legacy-checks.ts'
|
|
33
31
|
// THE runner: one DAG over every check, whatever declared it
|
|
34
32
|
export { runChecks, selectChecks } from './gate/check-runner.ts'
|
|
35
33
|
export type { RunnableCheck, CheckResult, CheckEvent, RunChecksOpts, RunChecksSummary } from './gate/check-runner.ts'
|
|
@@ -44,10 +42,7 @@ export { writeStatus } from './core/write-status.ts'
|
|
|
44
42
|
export type { StatusInput, StatusOutcome } from './core/write-status.ts'
|
|
45
43
|
export { formatLine, parseDuration, fmtStamp, parseWireOutput } from './core/wire.ts'
|
|
46
44
|
export type { Line } from './core/wire.ts'
|
|
47
|
-
|
|
48
|
-
// consumers (e.g. a wiki lint verifying mentioned ids exist) read RULES
|
|
49
|
-
export { tagRuleLines } from './rules/rule.ts'
|
|
50
|
-
export type { Rule, RuleEnv, FixResult } from './rules/rule.ts'
|
|
45
|
+
export type { FixResult } from './check.ts'
|
|
51
46
|
export { evaluateContracts, pngDims } from './contracts/contracts-engine.ts'
|
|
52
47
|
export type { ContractsConfig, ContractsResult, ContractOutcome } from './contracts/contracts-engine.ts'
|
|
53
48
|
export { defineContract, validateManifest, file, png, glob, md, dir, custom, script, fileContains, dirExists } from './contracts/contract-types.ts'
|
package/src/shot/film-box.ts
CHANGED
|
@@ -39,10 +39,6 @@ const DEAF_SWEEPS = 6
|
|
|
39
39
|
const DIR = join(homedir(), 'dev', 'shipkit-film')
|
|
40
40
|
const SLOTS = join(DIR, 'slots')
|
|
41
41
|
const LOG = join(DIR, 'film-box.log')
|
|
42
|
-
/** the one browser of older versions, ended once it drives no page */
|
|
43
|
-
const LEGACY_PID = join(DIR, 'browser.pid')
|
|
44
|
-
const LEGACY_USED = join(DIR, 'used')
|
|
45
|
-
const LEGACY_QUIET_MS = 2 * 60_000
|
|
46
42
|
const say = (s: string) => console.error(`box: ${s}`)
|
|
47
43
|
|
|
48
44
|
/** this script's version: a slot's browser another version started is replaced */
|
|
@@ -290,7 +286,6 @@ async function start(version: string, key: string, t: number): Promise<void> {
|
|
|
290
286
|
let b: SlotBrowser
|
|
291
287
|
let luid: string | null
|
|
292
288
|
try {
|
|
293
|
-
await endLegacy()
|
|
294
289
|
const exe = chromium(version)
|
|
295
290
|
luid = await discreteLuid(exe.full)
|
|
296
291
|
if (luid == null) say('no discrete GPU named in chrome://gpu: the browser draws on the default adapter')
|
|
@@ -313,21 +308,6 @@ async function start(version: string, key: string, t: number): Promise<void> {
|
|
|
313
308
|
console.log(`up started ${Math.round(performance.now() - t)} port ${b.port} pid ${b.pid}${luid ? ` luid ${luid}` : ''}`)
|
|
314
309
|
}
|
|
315
310
|
|
|
316
|
-
/** the one browser older versions shared between every film, ended once no film drives a page in it and none asked
|
|
317
|
-
* for it in LEGACY_QUIET_MS (a process still running older code connects between its up and its first page) */
|
|
318
|
-
async function endLegacy(): Promise<void> {
|
|
319
|
-
if (!existsSync(LEGACY_PID)) return
|
|
320
|
-
if (Date.now() - (statSync(LEGACY_USED, { throwIfNoEntry: false })?.mtimeMs ?? 0) < LEGACY_QUIET_MS) return
|
|
321
|
-
const [pid, , port] = readFileSync(LEGACY_PID, 'utf8').trim().split(' ')
|
|
322
|
-
const busy = await pages(Number(port) || CDP_PORT).then(
|
|
323
|
-
(p) => p.some((t) => t.attached),
|
|
324
|
-
() => false,
|
|
325
|
-
)
|
|
326
|
-
if (busy) return
|
|
327
|
-
await end(Number(pid), 'the shared browser of an older film-box version')
|
|
328
|
-
rmSync(LEGACY_PID, { force: true })
|
|
329
|
-
}
|
|
330
|
-
|
|
331
311
|
async function watch(key: string, pid: number, port: number): Promise<void> {
|
|
332
312
|
let orphans = new Set<string>()
|
|
333
313
|
let deaf = 0
|
package/src/social/drafts.ts
CHANGED
|
@@ -145,7 +145,7 @@ export function mediaNames(d: ParsedDraft): string[] {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
/** where a media name points: `/…` or `~/…` anywhere on the disk, else the draft's folder, else the repo's root; null
|
|
148
|
-
* when none holds it */
|
|
148
|
+
* when none holds it (a house repo's own scripts read it) */
|
|
149
149
|
export function resolveMedia(name: string, dir: string, repo: string): string | null {
|
|
150
150
|
if (name.startsWith('~/')) return existsSync(join(homedir(), name.slice(2))) ? join(homedir(), name.slice(2)) : null
|
|
151
151
|
if (isAbsolute(name)) return existsSync(name) ? name : null
|
package/src/social/kinds.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// what a post is for (wiki guides/post-kinds/index.md): the closed set of kinds a draft's `kind` takes, a project's
|
|
2
|
-
// own kinds from its social unit,
|
|
2
|
+
// own kinds from its social unit, and the one check the load and SK042 share. Pure:
|
|
3
3
|
// the unit module and the hub page import it
|
|
4
4
|
|
|
5
5
|
/** the shared kinds, in the order the desk lists them */
|
|
@@ -32,20 +32,6 @@ export interface OwnKind {
|
|
|
32
32
|
page: string
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/** the words in use before the set closed, each with the kind it maps to by default; null: a text that stays on a
|
|
36
|
-
* venue, a profile row of the identity and no post kind */
|
|
37
|
-
export const OLD_KINDS: Readonly<Record<string, PostKind | null>> = {
|
|
38
|
-
hello: 'announcement',
|
|
39
|
-
welcome: 'announcement',
|
|
40
|
-
devlog: 'iteration',
|
|
41
|
-
wip: 'iteration',
|
|
42
|
-
look: 'iteration',
|
|
43
|
-
roundup: 'iteration',
|
|
44
|
-
people: 'showcase',
|
|
45
|
-
puzzle: 'showcase',
|
|
46
|
-
page: null,
|
|
47
|
-
}
|
|
48
|
-
|
|
49
35
|
export const isPostKind = (k: string): k is PostKind => (POST_KINDS as readonly string[]).includes(k)
|
|
50
36
|
|
|
51
37
|
/** a front matter value as written, trimmed and out of one pair of quotes: `"feature"` is feature, `""` is empty */
|
|
@@ -54,25 +40,16 @@ const unquote = (v: string | undefined): string => (v ?? '').trim().replace(/^([
|
|
|
54
40
|
/** a draft's kind and its `kindWhy`, read the one way the load and SK042 read them */
|
|
55
41
|
export const kindOfMeta = (meta: Readonly<Record<string, string | undefined>>): { kind: string; why: string } => ({ kind: unquote(meta['kind']), why: unquote(meta['kindWhy']) })
|
|
56
42
|
|
|
57
|
-
/** why a draft's kind is wrong, or null; `old`: a word of the old words table, which a gate only warns on */
|
|
58
|
-
export type KindProblem = { text: string; old: boolean }
|
|
59
|
-
|
|
60
43
|
const INDEX = 'wiki guides/post-kinds/index.md'
|
|
61
44
|
|
|
62
|
-
/** the kind a draft names, with its `kindWhy`,
|
|
63
|
-
export function kindProblem(kind: string, why: string, own: readonly Pick<OwnKind, 'id'>[]):
|
|
45
|
+
/** why the kind a draft names, with its `kindWhy`, is none of the shared set and the project's own kinds, or null */
|
|
46
|
+
export function kindProblem(kind: string, why: string, own: readonly Pick<OwnKind, 'id'>[]): string | null {
|
|
64
47
|
const k = kind.trim()
|
|
65
48
|
const set = [...POST_KINDS, ...own.map((o) => o.id)].join(', ')
|
|
66
|
-
if (k === '') return
|
|
67
|
-
if (k === 'custom') return why.trim() === '' ?
|
|
49
|
+
if (k === '') return `no kind: a draft names what it is for, one of ${set} (${INDEX})`
|
|
50
|
+
if (k === 'custom') return why.trim() === '' ? `kind custom names no kindWhy: one line on why no kind fits (wiki ${kindPage('custom')})` : null
|
|
68
51
|
if (isPostKind(k) || own.some((o) => o.id === k)) return null
|
|
69
|
-
|
|
70
|
-
const to = OLD_KINDS[k]
|
|
71
|
-
return to == null
|
|
72
|
-
? { text: `kind "${k}" is an old word and no post kind: a text that stays on a venue is a profile row of the identity (wiki tools/shipkit/social-identities.md)`, old: true }
|
|
73
|
-
: { text: `kind "${k}" is an old word: ${to} by default, or the kind its intent reads as (wiki guides/post-kinds/old-words.md)`, old: true }
|
|
74
|
-
}
|
|
75
|
-
return { text: `kind "${k}" is not one of ${set}: a project's own kind is declared in its social unit's kinds (${INDEX})`, old: false }
|
|
52
|
+
return `kind "${k}" is not one of ${set}: a project's own kind is declared in its social unit's kinds (${INDEX})`
|
|
76
53
|
}
|
|
77
54
|
|
|
78
55
|
const WORD = /^[a-z][a-z0-9-]*$/
|
package/src/social/load.ts
CHANGED
|
@@ -345,8 +345,8 @@ export function deskOf(root: string, ids: Identities, sources: readonly DraftSou
|
|
|
345
345
|
}
|
|
346
346
|
const kp = kindProblem(draft.kind, draft.kindWhy, unit?.kinds ?? [])
|
|
347
347
|
if (kp != null) {
|
|
348
|
-
draft.kindProblem = kp
|
|
349
|
-
|
|
348
|
+
draft.kindProblem = kp
|
|
349
|
+
errors.push(`${file}: ${kp}`)
|
|
350
350
|
}
|
|
351
351
|
const landings = new Map<string, Landing[]>()
|
|
352
352
|
const placesFor = (a: DeskAccount): Landing[] => landings.get(a.id) ?? (landings.set(a.id, placesOf(a, errors)), landings.get(a.id)!)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// one post's page (wiki tools/shipkit/social.md, Posts and their groups): the post as the desk loads it, its group and
|
|
2
2
|
// siblings, its versions, and every thread that refers to it, the open ones first. Read only
|
|
3
3
|
import { readAllCached, specOf, storeDir } from '../review/store.ts'
|
|
4
|
-
import { membersOf, ownAddressesOf, threadsOf, threadTitle
|
|
4
|
+
import { membersOf, ownAddressesOf, threadsOf, threadTitle } from '../review/threads.ts'
|
|
5
5
|
import { accountOf, type Desk } from './load.ts'
|
|
6
6
|
import { groupNow } from './post-sources.ts'
|
|
7
7
|
import { postHistory, threadsReferring } from './posts.ts'
|
|
8
|
+
import { threadState } from '../review/thread-state.ts'
|
|
8
9
|
|
|
9
10
|
export interface ThreadRef {
|
|
10
11
|
/** what `sk thread show` and the threads page take: the thread's own address, else an item id of it */
|
|
@@ -31,7 +32,7 @@ export function refsOf(root: string, slug: string): ThreadRef[] {
|
|
|
31
32
|
const out: ThreadRef[] = []
|
|
32
33
|
for (const key of threadsReferring(root, slug)) {
|
|
33
34
|
const t = threads.find((x) => ownAddressesOf(x, specOf(dir)).includes(key) || membersOf(x).some((m) => m.item.id === key))
|
|
34
|
-
if (t != null) out.push({ key, id: t.head.item.id, title: threadTitle(t), open:
|
|
35
|
+
if (t != null) out.push({ key, id: t.head.item.id, title: threadTitle(t), open: threadState(t).active })
|
|
35
36
|
}
|
|
36
37
|
return out.sort((a, b) => Number(b.open) - Number(a.open))
|
|
37
38
|
}
|
|
@@ -251,7 +251,7 @@ export function releaseThreads(root: string, slug: string): { range: string; thr
|
|
|
251
251
|
const threads = threadsOf(items)
|
|
252
252
|
.filter(ships)
|
|
253
253
|
.map((t) => t.head)
|
|
254
|
-
.filter((x) => x.item.origin.by === 'agent' && isApproved(verdictOf(x)?.status ?? '
|
|
254
|
+
.filter((x) => x.item.origin.by === 'agent' && isApproved(verdictOf(x)?.status ?? 'rework'))
|
|
255
255
|
.sort((a, b) => b.item.created.localeCompare(a.item.created))
|
|
256
256
|
.map((x) => ({ id: x.item.id, title: x.item.title, media: stageablesOf(x.item, 1) }))
|
|
257
257
|
return { range, threads }
|
package/src/social/stage.ts
CHANGED
|
@@ -122,12 +122,12 @@ export function draftText(input: StageInput, media: string | null): string {
|
|
|
122
122
|
export const stageSlug = (title: string, now: Date): string => idOf(now, title)
|
|
123
123
|
|
|
124
124
|
/** the guard's problems with what the stage would write, and its kind's: run before any file is. A stage never writes
|
|
125
|
-
*
|
|
125
|
+
* a word off the set or a custom with no reason, so every kind problem refuses it */
|
|
126
126
|
export function guardStage(unit: SocialUnit | null, input: StageInput): string[] {
|
|
127
127
|
const kind = kindProblem(stagedKind(input), input.kindWhy ?? '', unit?.kinds ?? [])
|
|
128
128
|
return [
|
|
129
129
|
...guardWith(unit, { title: input.title, alt: input.alt ?? '', texts: [input.text, ...(input.tags?.trim() ? [input.tags] : [])], files: stageMedia(input).map((m) => m.file) }),
|
|
130
|
-
...(kind ? [kind
|
|
130
|
+
...(kind ? [kind] : []),
|
|
131
131
|
]
|
|
132
132
|
}
|
|
133
133
|
|
package/src/stores/model.ts
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
// its ask, the contract's lines. No fs, no fetch: desk.ts reads the files, the hub page imports this too
|
|
4
4
|
|
|
5
5
|
export const STORE_IDS = ['steam', 'itch', 'chrome-web-store'] as const
|
|
6
|
+
|
|
7
|
+
/** the width a picture tile of the stores page loads (its file's url with `w`), in px: a tile draws about 456 px
|
|
8
|
+
* wide, sharp at 2x. The real size view and the lightbox load the file itself */
|
|
9
|
+
export const TILE_W = 960
|
|
6
10
|
export type StoreId = (typeof STORE_IDS)[number]
|
|
7
11
|
export const isStore = (s: unknown): s is StoreId => (STORE_IDS as readonly unknown[]).includes(s)
|
|
8
12
|
|
package/src/stores/routes.ts
CHANGED
|
@@ -8,8 +8,9 @@ import { machineCommit } from '../core/machine-commit.ts'
|
|
|
8
8
|
import { bad, FRESH, NO_STORE, ranged } from '../review/http.ts'
|
|
9
9
|
import { noteOn } from '../review/notes.ts'
|
|
10
10
|
import { openReview } from '../review/project.ts'
|
|
11
|
+
import { sizedImage } from '../review/previews.ts'
|
|
11
12
|
import { FILE_ROUTE, loadStoresUnit, pasteHash, readPasted, shownFile, storesState, textFiles } from './desk.ts'
|
|
12
|
-
import { fieldAsset, isStore, PASTED_FILE, setSection, STORE_DIR, STORE_NAME, type StoreId } from './model.ts'
|
|
13
|
+
import { fieldAsset, isStore, PASTED_FILE, setSection, STORE_DIR, STORE_NAME, TILE_W, type StoreId } from './model.ts'
|
|
13
14
|
import { RENDER_FAMILIES, RENDER_TARGET, type RenderFamily } from './unit.ts'
|
|
14
15
|
|
|
15
16
|
/** one make again at a time, per repo */
|
|
@@ -134,8 +135,15 @@ export async function storesRoutes(root: string, req: Request, path: string): Pr
|
|
|
134
135
|
return Response.json(await storesState(root, dir), { headers: NO_STORE })
|
|
135
136
|
}
|
|
136
137
|
if (path.startsWith(FILE_ROUTE) && req.method === 'GET') {
|
|
137
|
-
const
|
|
138
|
-
|
|
138
|
+
const rel = decodeURIComponent(path.slice(FILE_ROUTE.length))
|
|
139
|
+
const abs = shownFile(root, rel)
|
|
140
|
+
if (!abs) return bad(`${path}?`, 404)
|
|
141
|
+
// a tile asks its picture at the width it draws (TILE_W): a copy made once, the file itself when it does not read
|
|
142
|
+
if (new URL(req.url).searchParams.get('w') === String(TILE_W)) {
|
|
143
|
+
const small = await sizedImage(abs, join(root, '.shipkit', 'cache', 'previews', 'stores'), rel, TILE_W)
|
|
144
|
+
if (small) return new Response(Bun.file(small), { headers: { 'content-type': 'image/webp', 'cache-control': 'private, max-age=31536000, immutable' } })
|
|
145
|
+
}
|
|
146
|
+
return ranged(req, abs, FRESH)
|
|
139
147
|
}
|
|
140
148
|
if (req.method !== 'POST') return bad(`stores: no route ${req.method} ${path}`, 404)
|
|
141
149
|
const body = (await req.json().catch(() => ({}))) as Record<string, unknown>
|