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
package/src/cli/cmd_Home.ts
CHANGED
|
@@ -4,8 +4,7 @@ import { LIB_VERSION } from '../core/lib-version.ts'
|
|
|
4
4
|
import { stampConsole, stampedIo } from '../core/log-stamp.ts'
|
|
5
5
|
import { fileURLToPath } from 'url'
|
|
6
6
|
import { markAutostart } from '../home/autostart.ts'
|
|
7
|
-
import {
|
|
8
|
-
import { homeMove, whoRuns } from '../home/home-move.ts'
|
|
7
|
+
import { installHome, uninstallHome } from '../home/home-launchd.ts'
|
|
9
8
|
import { homeInstalled, houseCli, houseRoot, houseRootOf, openProjectApp, openWindow, startHome } from '../home/home-start.ts'
|
|
10
9
|
import { ROLES } from '../home/pm.ts'
|
|
11
10
|
import { pmSwitchDeps, switchProcess } from '../home/pm-switch.ts'
|
|
@@ -102,9 +101,9 @@ export class DaemonJobCommand extends Command {
|
|
|
102
101
|
|
|
103
102
|
id = Option.String({ required: true, name: 'id' })
|
|
104
103
|
async execute(): Promise<number> {
|
|
105
|
-
const {
|
|
106
|
-
const id =
|
|
107
|
-
if (id
|
|
104
|
+
const { isJobId, DAEMON_JOBS, runJobBody } = await import('../home/daemon-jobs.ts')
|
|
105
|
+
const id = this.id
|
|
106
|
+
if (!isJobId(id)) {
|
|
108
107
|
this.context.stderr.write(`FAIL: no daemon job ${JSON.stringify(this.id)}: ${DAEMON_JOBS.map((j) => j.id).join(', ')}\n`)
|
|
109
108
|
return 1
|
|
110
109
|
}
|
|
@@ -214,33 +213,6 @@ export class PmUninstallCommand extends Command {
|
|
|
214
213
|
}
|
|
215
214
|
}
|
|
216
215
|
|
|
217
|
-
export class HomeMoveCommand extends Command {
|
|
218
|
-
static override paths = [['home', 'move']]
|
|
219
|
-
|
|
220
|
-
static override usage = Command.Usage({
|
|
221
|
-
category: 'Serve',
|
|
222
|
-
description: "move the machine's state from ~/.config/shipkit to its one root ~/.shipkit (dry unless --go)",
|
|
223
|
-
details: "The machine's state (its db, the rail order, the home dir with the hq, the daemon's db, the media index and the vault) moves from ~/.config/shipkit to ~/.shipkit by rename on the same volume: never a copy, never over a file. A dry run prints each thing it would move with its size, each file that names the old path, and why it would refuse. --go refuses while any other shipkit process of this home runs (by the real process list and the files held open: pm, the daemon, the web, the vault, the replica, a session's review watch, any sk command) or pm's LaunchAgent is loaded, and names how to stop each; while the move runs, every process answers from its record and none makes a store under either root; then each step checks its own state, so a move stopped anywhere finishes when run again. It refuses too while an initialised vault's marker does not record the audit path it was initialised with: bao keeps that path in its own storage and would never turn active from the new place. It rewrites shipkit's own files that name the old path (the pm agent, Litestream's config; never the vault's, which keep the path bao keeps and still resolve through the link), sets aside and names what a process left at the old place, and leaves ~/.config/shipkit an absolute link to ~/.shipkit, so a tool that names the old path still reads. --back undoes it from the record ~/.shipkit/home-move.json, dry too unless --go. Until the move, every command reads the old place: nothing else changes",
|
|
224
|
-
examples: [
|
|
225
|
-
['what it would do', 'sk home move'],
|
|
226
|
-
['do it, once pm, the vault and the replica are stopped', 'sk home move --go'],
|
|
227
|
-
['undo it', 'sk home move --back --go'],
|
|
228
|
-
],
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
go = Option.Boolean('--go', false, { description: 'do it (else a dry run)' })
|
|
232
|
-
back = Option.Boolean('--back', false, { description: 'move the state back to ~/.config/shipkit, from the record of the move' })
|
|
233
|
-
|
|
234
|
-
async execute(): Promise<number> {
|
|
235
|
-
const home = homedir()
|
|
236
|
-
if (process.env.SHIPKIT_HOME_DIR || process.env.SHIPKIT_MACHINE_DB) io(this).print(`note: SHIPKIT_HOME_DIR or SHIPKIT_MACHINE_DB is set: this process reads that place, the move moves ${home}'s roots`)
|
|
237
|
-
const root = houseRoot(process.cwd(), { home })
|
|
238
|
-
const repos = root == null ? [] : [root, ...houseRepos(root, home).repos.map((r) => r.path)]
|
|
239
|
-
const keychains = (): string[] => Bun.spawnSync(['security', 'list-keychains', '-d', 'user'], { stdout: 'pipe', stderr: 'ignore' }).stdout.toString().split('\n').map((l) => l.trim().replace(/^"|"$/g, '')).filter((l) => l !== '')
|
|
240
|
-
return homeMove({ home, go: this.go, back: this.back, print: io(this).print, agents: agentsDir(home), running: () => whoRuns(home, agentsDir(home)), repos: [...new Set(repos)], keychains })
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
216
|
export class GuiCommand extends Command {
|
|
245
217
|
static override paths = [['gui']]
|
|
246
218
|
|
package/src/cli/cmd_Hq.ts
CHANGED
|
@@ -414,16 +414,6 @@ export class HqThreadsCommand extends Command {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
export class HqCardsAliasCommand extends HqThreadsCommand {
|
|
418
|
-
static override paths = [['hq', 'cards']]
|
|
419
|
-
static override usage = undefined
|
|
420
|
-
|
|
421
|
-
override async execute(): Promise<number> {
|
|
422
|
-
this.context.stderr.write('WARN sk hq cards is now sk hq threads, the old name goes at the next release\n')
|
|
423
|
-
return await super.execute()
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
|
|
427
417
|
/** on or off from the console, null with no word; a word of another kind is said and refused */
|
|
428
418
|
const onOff = (v: string | undefined, err: (l: string) => void): boolean | null | undefined => {
|
|
429
419
|
if (v === undefined) return null
|
|
@@ -504,13 +494,6 @@ export class HqUrlsCommand extends Command {
|
|
|
504
494
|
}
|
|
505
495
|
}
|
|
506
496
|
|
|
507
|
-
/** `sk hq urls` under the name it had before: agents and scripts still call it, so it runs as is and says nothing more.
|
|
508
|
-
* No usage: in no help and no list */
|
|
509
|
-
export class HqDoorCommand extends HqUrlsCommand {
|
|
510
|
-
static override paths = [['hq', 'door']]
|
|
511
|
-
static override usage = undefined
|
|
512
|
-
}
|
|
513
|
-
|
|
514
497
|
export class HqTerminalsCommand extends Command {
|
|
515
498
|
static override paths = [['hq', 'terminals']]
|
|
516
499
|
|
package/src/cli/cmd_Releases.ts
CHANGED
|
@@ -60,8 +60,6 @@ export class ReleasesAddCommand extends Command {
|
|
|
60
60
|
category = Option.String({ required: false })
|
|
61
61
|
title = Option.String({ required: false })
|
|
62
62
|
thread = Option.String('--thread', { description: 'the thread it comes from: its changelog line and media' })
|
|
63
|
-
/** its name before, read for one release */
|
|
64
|
-
card = Option.String('--card', { hidden: true })
|
|
65
63
|
// the flags that wrote next.md by hand, hidden for one release: each says to edit the file
|
|
66
64
|
text = Option.String('--text', { hidden: true })
|
|
67
65
|
bullet = Option.Array('--bullet', { hidden: true })
|
|
@@ -74,8 +72,7 @@ export class ReleasesAddCommand extends Command {
|
|
|
74
72
|
weight = Option.String('--weight', { hidden: true })
|
|
75
73
|
|
|
76
74
|
async execute(): Promise<number> {
|
|
77
|
-
|
|
78
|
-
const thread = this.thread ?? this.card
|
|
75
|
+
const thread = this.thread
|
|
79
76
|
const given: [string, unknown][] = [['--text', this.text], ['--bullet', this.bullet], ['--image', this.image], ['--before', this.before], ['--rating', this.rating], ['--commit', this.commit], ['--kind', this.kind], ['--release-title', this.heading], ['--weight', this.weight]]
|
|
80
77
|
const flag = given.find(([, v]) => v !== undefined)?.[0]
|
|
81
78
|
if (flag !== undefined || thread === undefined) {
|
|
@@ -100,6 +97,62 @@ export class ReleasesAddCommand extends Command {
|
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
99
|
|
|
100
|
+
export class ReleasesCheckCommand extends Command {
|
|
101
|
+
static override paths = [['releases', 'check']]
|
|
102
|
+
static essential = {}
|
|
103
|
+
|
|
104
|
+
static override usage = Command.Usage({
|
|
105
|
+
category: 'Gate',
|
|
106
|
+
description: 'every problem of releases/next.md at once, each its line and the line it wants, as sk bump reads it',
|
|
107
|
+
details:
|
|
108
|
+
"reads next.md as `sk bump` does before anything else, and names every problem in one run: the file missing (a template printed), not committed, a line out of its shape (the heading, a note of the front matter, a weight word, a picture), no kind said by the heading or given, no change, a word left of the template. Each problem says its line, what it read and the exact line it wants. The disk and one git status, no network. Exits 1 on any problem. --write-template writes the template when there is no next.md, for a hand to fill and commit",
|
|
109
|
+
examples: [
|
|
110
|
+
['what a patch bump would refuse in next.md', 'sk releases check patch'],
|
|
111
|
+
['the kind its heading says', 'sk releases check'],
|
|
112
|
+
['no next.md yet: the template to fill', 'sk releases check patch --write-template'],
|
|
113
|
+
],
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
kind = Option.String({ required: false, name: 'major|minor|patch' })
|
|
117
|
+
writeTemplate = Option.Boolean('--write-template', false, { description: 'write the template as next.md when there is none' })
|
|
118
|
+
|
|
119
|
+
async execute(): Promise<number> {
|
|
120
|
+
const root = process.cwd()
|
|
121
|
+
const out = (l: string): void => void this.context.stdout.write(`${l}\n`)
|
|
122
|
+
try {
|
|
123
|
+
if (this.kind !== undefined && !['major', 'minor', 'patch'].includes(this.kind)) throw new Error(`${this.kind}: a kind is major, minor or patch`)
|
|
124
|
+
const kind = (this.kind ?? null) as 'major' | 'minor' | 'patch' | null
|
|
125
|
+
const { undeclaredReleases } = await import('../releases/store.ts')
|
|
126
|
+
const why = await undeclaredReleases(root)
|
|
127
|
+
if (why) throw new Error(why)
|
|
128
|
+
const { NEXT_REL, nextTemplate, problemLines, validateNext } = await import('../releases/validate.ts')
|
|
129
|
+
if (this.writeTemplate) {
|
|
130
|
+
const { existsSync, mkdirSync, writeFileSync } = await import('node:fs')
|
|
131
|
+
const { dirname, join } = await import('node:path')
|
|
132
|
+
const file = join(root, NEXT_REL)
|
|
133
|
+
if (existsSync(file)) throw new Error(`${NEXT_REL} exists already: edit it, the template goes only where there is none`)
|
|
134
|
+
mkdirSync(dirname(file), { recursive: true })
|
|
135
|
+
writeFileSync(file, nextTemplate(kind))
|
|
136
|
+
out(`ok: ${NEXT_REL} written from the template: replace each <…> with the release's own words, then commit it`)
|
|
137
|
+
}
|
|
138
|
+
const problems = validateNext(root, kind)
|
|
139
|
+
if (problems.length === 0) {
|
|
140
|
+
const { readRelease } = await import('../releases/store.ts')
|
|
141
|
+
const { changesOf, NEXT } = await import('../releases/model.ts')
|
|
142
|
+
const r = readRelease(root, NEXT)!
|
|
143
|
+
out(`ok: ${NEXT_REL} reads: ${changesOf(r).length} change${changesOf(r).length === 1 ? '' : 's'}, a ${kind ?? r.kind} release`)
|
|
144
|
+
return 0
|
|
145
|
+
}
|
|
146
|
+
for (const l of problemLines(problems)) out(l)
|
|
147
|
+
out(` ${problems.length === 1 ? 'one problem' : `${problems.length} problems`}: edit ${NEXT_REL} at each line named, then sk releases check${kind ? ` ${kind}` : ''} again`)
|
|
148
|
+
return 1
|
|
149
|
+
} catch (e) {
|
|
150
|
+
this.context.stderr.write(`FAIL: ${e instanceof Error ? e.message : String(e)}\n`)
|
|
151
|
+
return 1
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
103
156
|
export class ReleasesRemoveCommand extends Command {
|
|
104
157
|
static override paths = [['releases', 'remove']]
|
|
105
158
|
|