rvlib-shipkit 2.13.0 → 2.15.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 +38 -13
- package/package.json +1 -1
- package/src/assets/run-assets.ts +2 -2
- package/src/assets/server/studio-server.ts +27 -23
- package/src/check.ts +3 -3
- package/src/checks/SK001-package-json-shape.check.ts +4 -4
- package/src/checks/SK002-contracts-fulfillness.check.ts +2 -2
- package/src/checks/SK003-claude-md-shape.check.ts +19 -12
- package/src/checks/SK004-gitignore-policy.check.ts +18 -4
- package/src/checks/SK005-rvlib-versions.check.ts +1 -1
- package/src/checks/SK006-npm-publish-safety.check.ts +3 -3
- package/src/checks/SK007-github-visibility.check.ts +2 -2
- package/src/checks/SK008-reviewer-agent.check.ts +1 -1
- package/src/checks/SK010-undeclared-unit.check.ts +2 -2
- package/src/checks/SK011-sibling-unit-ranges.check.ts +2 -2
- package/src/checks/SK012-config-barrel-import.check.ts +1 -1
- package/src/checks/SK013-one-way-in-policy.check.ts +2 -2
- package/src/checks/SK015-nested-repo.check.ts +2 -2
- package/src/checks/SK016-legacy-check-shapes.check.ts +2 -2
- package/src/checks/SK017-vscode-hub-task.check.ts +2 -2
- package/src/checks/SK018-test-files-run.check.ts +2 -2
- package/src/checks/SK019-tests-run-in-units.check.ts +2 -2
- package/src/checks/SK020-self-spawning-check.check.ts +2 -2
- package/src/checks/SK022-machine-runs-the-pin.check.ts +2 -2
- package/src/checks/SK024-identity-colors.check.ts +1 -1
- package/src/checks/SK025-release-drift.check.ts +2 -2
- package/src/checks/SK026-asks-autoclose.check.ts +2 -2
- package/src/checks/SK027-agent-wiki-links.check.ts +8 -2
- package/src/checks/SK028-readme.check.ts +2 -2
- package/src/checks/SK029-explicit-check-files.check.ts +3 -3
- package/src/checks/SK030-cache-audit.check.ts +7 -5
- package/src/checks/SK031-trace-audit.check.ts +7 -7
- package/src/checks/SK032-ignored-inputs.check.ts +3 -3
- package/src/checks/SK033-global-contribution.check.ts +11 -4
- package/src/checks/SK034-commit-gates-armed.check.ts +2 -2
- package/src/checks/SK035-public-clean.check.ts +4 -4
- package/src/checks/SK036-draft-media-size.check.ts +2 -2
- package/src/checks/SK037-keyword-additions.check.ts +43 -0
- package/src/cli/cmd_Backup.ts +2 -2
- package/src/cli/cmd_Commands.ts +4 -4
- package/src/cli/cmd_ConfigKeys.ts +2 -2
- package/src/cli/cmd_Drill.ts +30 -1
- package/src/cli/cmd_Home.ts +1 -1
- package/src/cli/cmd_Init.ts +1 -1
- package/src/cli/cmd_Media.ts +5 -5
- package/src/cli/cmd_Mv.ts +14 -7
- package/src/cli/cmd_Review.ts +2 -2
- package/src/cli/cmd_Smoke.ts +1 -1
- package/src/cli/cmd_Social.ts +3 -3
- package/src/cli/cmd_Sound.ts +1 -1
- package/src/cli/cmd_TraceAudit.ts +6 -6
- package/src/cli/cmd_Trailer.ts +2 -2
- package/src/cli/cmd_Veille.ts +2 -2
- package/src/cli/cmd_When.ts +2 -2
- package/src/cli/family-pages.ts +19 -19
- package/src/cli/registry.ts +2 -1
- package/src/collections/collection-types.ts +2 -2
- package/src/collections/review.ts +1 -1
- package/src/comfy/comfy-panel.ts +2 -2
- package/src/contracts/manifests/discord.contract.ts +1 -1
- package/src/contracts/manifests/identity.contract.ts +1 -1
- package/src/contracts/manifests/itch.contract.ts +1 -1
- package/src/contracts/manifests/steam.contract.ts +1 -1
- package/src/core/agent-dir-at.ts +12 -0
- package/src/core/agent-dir.ts +28 -0
- package/src/core/budget.ts +1 -1
- package/src/core/canonical-scripts.ts +2 -2
- package/src/core/discover-checks.ts +1 -1
- package/src/core/global-contribution.ts +4 -1
- package/src/core/ignored-block.ts +1 -1
- package/src/core/ignored-inputs.ts +3 -2
- package/src/core/layout.ts +3 -3
- package/src/core/loop-watch.ts +1 -1
- package/src/core/motherhome.ts +2 -2
- package/src/core/one-way-in-policy.ts +8 -8
- package/src/core/run-ci.ts +3 -3
- package/src/core/runs-matrix.ts +1 -1
- package/src/core/slots.ts +14 -5
- package/src/core/trace-audit.ts +50 -9
- package/src/core/tree-rev.ts +1 -1
- package/src/drill/clean.ts +54 -0
- package/src/drill/run.ts +1 -1
- package/src/home/daemon-jobs.ts +1 -1
- package/src/home/global-context.ts +11 -8
- package/src/home/gui-app/ShipkitGui.swift +91 -2
- package/src/home/inbox-shape.ts +1 -1
- package/src/home/inbox.ts +1 -1
- package/src/home/pm-config.ts +4 -1
- package/src/home/pm-inputs.ts +2 -0
- package/src/home/resources.ts +7 -2
- package/src/home/run-pm.ts +1 -1
- package/src/home/serve-web.ts +2 -2
- package/src/hooks/commit-message.ts +1 -1
- package/src/hooks/hook-gates.ts +1 -1
- package/src/hooks/leak-guard.ts +61 -8
- package/src/hooks/run-hooks.ts +18 -18
- package/src/identities/identities.ts +1 -1
- package/src/identities/machine-route.ts +1 -1
- package/src/identities/machine.ts +1 -1
- package/src/init-repo.ts +2 -2
- package/src/ledger/gate-checks.ts +1 -1
- package/src/ledger/record-kept.ts +1 -1
- package/src/media-kinds.ts +1 -1
- package/src/media-store/backup/daemon.ts +1 -1
- package/src/media-store/backup/keys.ts +1 -1
- package/src/media-store/backup/manifest.ts +1 -1
- package/src/media-store/backup/restore.ts +1 -1
- package/src/media-store/backup/run.ts +1 -1
- package/src/media-store/backup/secret.ts +1 -1
- package/src/media-store/backup/snapshot.ts +1 -1
- package/src/media-store/backup/sources.ts +1 -1
- package/src/media-store/content.ts +1 -1
- package/src/media-store/daemon.ts +1 -1
- package/src/media-store/db.ts +1 -1
- package/src/media-store/fact.ts +1 -1
- package/src/media-store/hand.ts +1 -1
- package/src/media-store/kind.ts +1 -1
- package/src/media-store/purge.ts +1 -1
- package/src/media-store/put.ts +1 -1
- package/src/media-store/remote.ts +1 -1
- package/src/media-store/space.ts +1 -1
- package/src/mv/mv-md.ts +63 -22
- package/src/pages/forward.ts +1 -1
- package/src/pages/frame-client.ts +1 -1
- package/src/pages/routes.ts +1 -1
- package/src/pages/unit.ts +1 -1
- package/src/plan/planner.ts +1 -1
- package/src/plan/repo-source.ts +1 -1
- package/src/release/public-clean.ts +25 -7
- package/src/release/run-bump.ts +1 -1
- package/src/release/run-release.ts +3 -3
- package/src/repo-config.ts +23 -16
- package/src/review/anim.ts +1 -1
- package/src/review/auto.ts +1 -1
- package/src/review/cells.ts +15 -1
- package/src/review/format.ts +2 -2
- package/src/review/marks.ts +1 -1
- package/src/review/media-kind.ts +1 -1
- package/src/review/media-read.ts +1 -1
- package/src/review/model.ts +14 -4
- package/src/review/notes.ts +52 -4
- package/src/review/previews.ts +1 -1
- package/src/review/project.ts +1 -1
- package/src/review/role.ts +1 -1
- package/src/review/routes.ts +14 -2
- package/src/review/store.ts +2 -2
- package/src/review/threads.ts +1 -1
- package/src/review/trailer-desk.ts +3 -3
- package/src/review/trailer-media.ts +1 -1
- package/src/review/trailer-model.ts +1 -1
- package/src/review/trailer-routes.ts +1 -1
- package/src/review/trailer-shots.ts +1 -1
- package/src/review/unit.ts +1 -1
- package/src/scaffold/files/tsconfig.json +1 -1
- package/src/scaffold/project-scaffold.ts +1 -1
- package/src/serve/embed.ts +1 -1
- package/src/serve/hub-app/check-words.ts +1 -1
- package/src/serve/hub-app/frames-st.ts +1 -1
- package/src/serve/hub-app/hash-route.ts +1 -1
- package/src/serve/hub-app/home-st.ts +1 -1
- package/src/serve/hub-app/home-strip.css +1 -1
- package/src/serve/hub-app/hub-app.tsx +2 -2
- package/src/serve/hub-app/identities-st.ts +1 -1
- package/src/serve/hub-app/identities-view.tsx +5 -4
- package/src/serve/hub-app/identity-address.ts +1 -1
- package/src/serve/hub-app/inbox-st.ts +1 -1
- package/src/serve/hub-app/inbox-view.tsx +1 -1
- package/src/serve/hub-app/kept-cols.tsx +30 -0
- package/src/serve/hub-app/keys.ts +1 -1
- package/src/serve/hub-app/media-svc.ts +1 -1
- package/src/serve/hub-app/pages-frames.tsx +1 -1
- package/src/serve/hub-app/pages-svc.ts +1 -1
- package/src/serve/hub-app/projects-svc.ts +1 -1
- package/src/serve/hub-app/repo-st.ts +1 -1
- package/src/serve/hub-app/review/review-board.tsx +1 -1
- package/src/serve/hub-app/review/review-cells.tsx +3 -2
- package/src/serve/hub-app/review/review-page.tsx +5 -4
- package/src/serve/hub-app/review/review-st.ts +15 -7
- package/src/serve/hub-app/review/review-thread.tsx +52 -5
- package/src/serve/hub-app/review/review-views.tsx +50 -33
- package/src/serve/hub-app/review/thread-st.ts +79 -27
- package/src/serve/hub-app/review/trailer-page.tsx +5 -4
- package/src/serve/hub-app/review/trailer-st.ts +1 -1
- package/src/serve/hub-app/review.css +9 -1
- package/src/serve/hub-app/site/site-part.tsx +1 -1
- package/src/serve/hub-app/site/site-st.ts +1 -1
- package/src/serve/hub-app/social/calendar.tsx +1 -1
- package/src/serve/hub-app/social/comms-page.tsx +29 -5
- package/src/serve/hub-app/social/kit.tsx +1 -1
- package/src/serve/hub-app/social/post-card.tsx +1 -1
- package/src/serve/hub-app/social/social-model.ts +1 -1
- package/src/serve/hub-app/social/social-page.tsx +12 -5
- package/src/serve/hub-app/social/social-st.ts +31 -3
- package/src/serve/hub-app/social.css +1 -1
- package/src/serve/hub-app/stores/stores-page.tsx +5 -4
- 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/tree-row.tsx +1 -1
- package/src/serve/hub-app/veille/veille-page.tsx +5 -4
- package/src/serve/hub-app/veille/veille-st.ts +1 -1
- package/src/serve/hub-app/veille.css +1 -1
- package/src/serve/hub-runtime.ts +6 -2
- package/src/serve/project-gutter-route.ts +1 -1
- package/src/shot/box.ts +5 -7
- package/src/shot/browser-slot.ts +18 -6
- package/src/shot/client.ts +1 -2
- package/src/shot/clip-encoder.ts +16 -13
- package/src/shot/film-box.ts +132 -28
- package/src/shot/shooter.ts +21 -2
- package/src/shot/stepped-clip.ts +1 -1
- package/src/site/desk.ts +2 -2
- package/src/site/routes.ts +1 -1
- package/src/site/unit.ts +1 -1
- package/src/social/card-drafts.ts +24 -0
- package/src/social/compose.ts +2 -2
- package/src/social/desk-index.ts +1 -1
- package/src/social/desk-wire.ts +1 -1
- package/src/social/drafts.ts +3 -3
- package/src/social/load.ts +14 -1
- package/src/social/media-facts.ts +1 -1
- package/src/social/media-kind.ts +1 -1
- package/src/social/media-limit.ts +1 -1
- package/src/social/media-of.ts +1 -1
- package/src/social/migrate.ts +1 -1
- package/src/social/post-url.ts +1 -1
- package/src/social/presence.ts +2 -2
- package/src/social/public-read.ts +1 -1
- package/src/social/publish/bluesky.ts +1 -1
- package/src/social/publish/discord.ts +1 -1
- package/src/social/push.ts +10 -4
- package/src/social/richtext.ts +1 -1
- package/src/social/routes.ts +10 -4
- package/src/social/stats.ts +1 -1
- package/src/social/text.ts +1 -1
- package/src/social/tracker-route.ts +1 -1
- package/src/social/tracker.ts +1 -1
- package/src/social/unit.ts +1 -1
- package/src/social/writes.ts +1 -1
- package/src/stores/collection.ts +1 -1
- package/src/stores/desk.ts +1 -1
- package/src/stores/model.ts +1 -1
- package/src/stores/routes.ts +1 -1
- package/src/stores/unit.ts +1 -1
- package/src/suite/judge-suites.ts +1 -1
- package/src/trace/tracer.ts +12 -5
- package/src/trailer/adapter.ts +1 -1
- package/src/trailer/build.ts +6 -4
- package/src/trailer/holes.ts +1 -1
- package/src/trailer/passage.ts +1 -1
- package/src/trailer/prune.ts +1 -1
- package/src/trailer/states.ts +1 -1
- package/src/trailer/versions.ts +1 -1
- package/src/trailer/words.ts +1 -1
- package/src/tui/run-tui.ts +1 -1
- package/src/tui/tui-store.ts +1 -1
- package/src/veille/asks.ts +1 -1
- package/src/veille/auto.ts +1 -1
- package/src/veille/batch.ts +1 -1
- package/src/veille/chrome.ts +1 -1
- package/src/veille/collection.ts +1 -1
- package/src/veille/desk.ts +1 -1
- package/src/veille/identity.ts +1 -1
- package/src/veille/import.ts +1 -1
- package/src/veille/log.ts +1 -1
- package/src/veille/platforms.ts +1 -1
- package/src/veille/reads.ts +1 -1
- package/src/veille/replied.ts +1 -1
- package/src/veille/routes.ts +2 -2
- package/src/veille/watch.ts +1 -1
- package/src/veille/worth.ts +2 -2
package/src/cli/cmd_Media.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// sk media: the machine's one media store (media-store/, wiki
|
|
1
|
+
// sk media: the machine's one media store (media-store/, wiki tools/shipkit/media-store.md): what each kind of each repo
|
|
2
2
|
// holds on the disk and in the private Space, every waiting file sent up now, the disk freed of what the Space holds.
|
|
3
3
|
// Every module loads inside execute: the cli registers this file on every `sk` call
|
|
4
4
|
import { Command, Option } from 'clipanion'
|
|
5
5
|
|
|
6
|
-
const DETAILS = `the machine's one media store: every media file a kind names (review: a card's files; trailer: each render's video and strip, a kept version's own) is known by its sha256, goes up to the owner's private Space as <kind>/<sha256>.<ext>, and leaves the disk once the Space holds it and its kind no longer pins it; it comes back on demand. One sqlite index for the machine. Page: wiki
|
|
6
|
+
const DETAILS = `the machine's one media store: every media file a kind names (review: a card's files; trailer: each render's video and strip, a kept version's own) is known by its sha256, goes up to the owner's private Space as <kind>/<sha256>.<ext>, and leaves the disk once the Space holds it and its kind no longer pins it; it comes back on demand. One sqlite index for the machine. Page: wiki tools/shipkit/media-store.md`
|
|
7
7
|
|
|
8
8
|
type Ctx = { stdout: NodeJS.WritableStream; stderr: NodeJS.WritableStream }
|
|
9
9
|
type Kind = import('../media-store/kind.ts').MediaKind
|
|
@@ -162,7 +162,7 @@ export class MediaPurgeCommand extends Command {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
const PUT_DETAILS = `The one way an agent of any repo keeps a file in the owner's private Space: never call the Space client directly. Each file is kept by its content as <label>/<sha256>.<ext>, private: its index row (its repo, its place, its original name) first, then the upload, checked by a HEAD of its size; a content the Space already holds is only marked. The object never expires and nothing deletes it from the Space; the file stays on the disk, purgeable by the usual rules (sk media purge). A link is signed on the CDN edge and downloads under the file's name; it lasts at most 7d, the SigV4 limit of a signed URL, and sk media link makes a new one at any time. Page: wiki
|
|
165
|
+
const PUT_DETAILS = `The one way an agent of any repo keeps a file in the owner's private Space: never call the Space client directly. Each file is kept by its content as <label>/<sha256>.<ext>, private: its index row (its repo, its place, its original name) first, then the upload, checked by a HEAD of its size; a content the Space already holds is only marked. The object never expires and nothing deletes it from the Space; the file stays on the disk, purgeable by the usual rules (sk media purge). A link is signed on the CDN edge and downloads under the file's name; it lasts at most 7d, the SigV4 limit of a signed URL, and sk media link makes a new one at any time. Page: wiki tools/shipkit/media-store.md, Put a file from any repo`
|
|
166
166
|
|
|
167
167
|
export class MediaPutCommand extends Command {
|
|
168
168
|
static override paths = [['media', 'put']]
|
|
@@ -206,7 +206,7 @@ export class MediaLinkCommand extends Command {
|
|
|
206
206
|
details: `${PUT_DETAILS}\n\nThe reference is a key (<label>/<sha256>.<ext>), a sha (12 hex of it are enough), or a file the store holds. The link downloads under the name the index keeps for it, or --name. --for defaults to 24h, at most 7d. --json prints { key, sha, size, name, url, expires }.`,
|
|
207
207
|
examples: [
|
|
208
208
|
['a link for a day', 'sk media link private-build/<sha>.zip'],
|
|
209
|
-
['a week, under a name, as json', 'sk media link private-build/<sha>.zip --for 7d --name
|
|
209
|
+
['a week, under a name, as json', 'sk media link private-build/<sha>.zip --for 7d --name my-app-1.2.0-mac-arm64.zip --json'],
|
|
210
210
|
],
|
|
211
211
|
})
|
|
212
212
|
for = Option.String('--for', { description: 'how long the link lasts: 30m, 2h, 7d (24h, at most 7d)' })
|
|
@@ -229,7 +229,7 @@ export class MediaVersioningCommand extends Command {
|
|
|
229
229
|
static override usage = Command.Usage({
|
|
230
230
|
category: 'Media',
|
|
231
231
|
description: "turn on the Space's versioning: a delete from outside can be undone; --check reads it",
|
|
232
|
-
details: `PutBucketVersioning, then GetBucketVersioning to confirm: an object deleted or overwritten from the DigitalOcean dashboard or by a stray key keeps its older version. DigitalOcean offers it through the S3 API only. Once on, it can only be suspended, never turned off. The house key is limited to the bucket's objects and cannot change it: --key names a full access key pair kept once in the keychain for this call. Page: wiki
|
|
232
|
+
details: `PutBucketVersioning, then GetBucketVersioning to confirm: an object deleted or overwritten from the DigitalOcean dashboard or by a stray key keeps its older version. DigitalOcean offers it through the S3 API only. Once on, it can only be suspended, never turned off. The house key is limited to the bucket's objects and cannot change it: --key names a full access key pair kept once in the keychain for this call. Page: wiki tools/shipkit/media-store.md, Versioning`,
|
|
233
233
|
examples: [
|
|
234
234
|
['turn it on', 'sk media versioning'],
|
|
235
235
|
['turn it on with a one time full access key', 'sk media versioning --key rv/shipkit/spaces-admin'],
|
package/src/cli/cmd_Mv.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
// reference in the code. Renaming used to mean knowing WHICH tool applied,
|
|
5
5
|
// and knowing that is exactly the kind of doubt the toolkit exists to remove.
|
|
6
6
|
import { Command, Option } from 'clipanion'
|
|
7
|
-
import {
|
|
7
|
+
import { readFileSync } from 'fs'
|
|
8
|
+
import { movePage, movePages, parseMoveMap } from '../mv/mv-md.ts'
|
|
8
9
|
import { renameCli } from '../ts/rename.ts'
|
|
9
10
|
|
|
10
11
|
export class MvCommand extends Command {
|
|
@@ -20,17 +21,26 @@ export class MvCommand extends Command {
|
|
|
20
21
|
['apply + one conventional commit', 'sk mv docs/old-name.md docs/new-name.md --commit'],
|
|
21
22
|
['a code file, every import rewritten', 'sk mv src/old-mod.ts src/new-mod.ts --write'],
|
|
22
23
|
['a whole folder', 'sk mv src/old-dir src/new-dir --write'],
|
|
24
|
+
['md pages from a move map, one `<old> <new>` per line', 'sk mv --map moves.txt --write'],
|
|
25
|
+
['a page becomes a topic folder: its asset dir is the folder, the page its index.md', 'sk mv wiki/build/ts.md wiki/patterns/ts/index.md --write'],
|
|
23
26
|
],
|
|
24
27
|
})
|
|
25
28
|
|
|
26
|
-
oldPath = Option.String()
|
|
27
|
-
newPath = Option.String()
|
|
29
|
+
oldPath = Option.String({ required: false })
|
|
30
|
+
newPath = Option.String({ required: false })
|
|
31
|
+
map = Option.String('--map', { description: 'md pages from a file, one `<old> <new>` per line, mv:after once at the end' })
|
|
28
32
|
write = Option.Boolean('--write', false, { description: 'apply (default is a dry run)' })
|
|
29
33
|
commit = Option.Boolean('--commit', false, { description: 'apply + git commit, md pages only (the pre-commit gate still runs)' })
|
|
30
34
|
|
|
31
35
|
async execute(): Promise<number> {
|
|
32
36
|
const write = this.write || this.commit
|
|
37
|
+
const io = { print: (l: string) => this.context.stdout.write(`${l}\n`), printErr: (l: string) => this.context.stderr.write(`${l}\n`) }
|
|
33
38
|
try {
|
|
39
|
+
if (this.map != null) {
|
|
40
|
+
if (this.oldPath != null) { io.printErr('FAIL: --map takes no paths'); return 1 }
|
|
41
|
+
return movePages(process.cwd(), parseMoveMap(readFileSync(this.map, 'utf8')), io, { write: this.write, commit: this.commit })
|
|
42
|
+
}
|
|
43
|
+
if (this.oldPath == null || this.newPath == null) { io.printErr('FAIL: give <oldPath> <newPath>, or --map <file>'); return 1 }
|
|
34
44
|
const isMd = this.oldPath.endsWith('.md') || this.newPath.endsWith('.md')
|
|
35
45
|
if (!isMd) {
|
|
36
46
|
if (this.commit) {
|
|
@@ -43,10 +53,7 @@ export class MvCommand extends Command {
|
|
|
43
53
|
if (!write && code === 0) this.context.stdout.write('note: dry run — pass --write to apply\n')
|
|
44
54
|
return code
|
|
45
55
|
}
|
|
46
|
-
return movePage(process.cwd(), this.oldPath, this.newPath, {
|
|
47
|
-
print: (l) => this.context.stdout.write(`${l}\n`),
|
|
48
|
-
printErr: (l) => this.context.stderr.write(`${l}\n`),
|
|
49
|
-
}, { write: this.write, commit: this.commit })
|
|
56
|
+
return movePage(process.cwd(), this.oldPath, this.newPath, io, { write: this.write, commit: this.commit })
|
|
50
57
|
} catch (e) {
|
|
51
58
|
this.context.stderr.write(`FAIL: ${e instanceof Error ? e.message : String(e)}\n`)
|
|
52
59
|
return 1
|
package/src/cli/cmd_Review.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// sk review: an agent shows the owner something as one card of the one store and reads his answer; a dispatcher routes
|
|
2
|
-
// what he, a player or a rule raised, a worker claims and closes it (review/store.ts, wiki
|
|
2
|
+
// what he, a player or a rule raised, a worker claims and closes it (review/store.ts, wiki tools/shipkit/review.md).
|
|
3
3
|
// Every module loads inside execute: the cli registers this file on every `sk` call
|
|
4
4
|
import { Command, Option } from 'clipanion'
|
|
5
5
|
|
|
6
|
-
const DETAILS = `the one feedback store, .shipkit/review/<id>/: one subject is one card (other angles are views of it, a follow up --supersedes it), he answers it in the hub's review entry (approved, ok with a fix, rejected, archived, rectangles, reactions per view), you read his answer with inbox or watch. What he, a player or a rule raises is an item of the same store: a dispatcher routes it to a topic, a worker claims it and closes it. The repo's review unit names its kinds, topics, sources and rules. SK_AGENT names your lane. Page: wiki
|
|
6
|
+
const DETAILS = `the one feedback store, .shipkit/review/<id>/: one subject is one card (other angles are views of it, a follow up --supersedes it), he answers it in the hub's review entry (approved, ok with a fix, rejected, archived, rectangles, reactions per view), you read his answer with inbox or watch. What he, a player or a rule raises is an item of the same store: a dispatcher routes it to a topic, a worker claims it and closes it. The repo's review unit names its kinds, topics, sources and rules. SK_AGENT names your lane. Page: wiki tools/shipkit/review.md`
|
|
7
7
|
|
|
8
8
|
type Ctx = { stdout: NodeJS.WritableStream; stderr: NodeJS.WritableStream }
|
|
9
9
|
type Unit = import('../review/unit.ts').ReviewUnit
|
package/src/cli/cmd_Smoke.ts
CHANGED
|
@@ -28,7 +28,7 @@ export class SmokeCommand extends Command {
|
|
|
28
28
|
const config = await loadRepoConfig(root)
|
|
29
29
|
const w = (l: string) => this.context.stdout.write(`${l}\n`)
|
|
30
30
|
if (config.smoke == null) {
|
|
31
|
-
w(`FAIL this repo declares no smoke config — add \`smoke: { base, routes, login? }\` to repo.config.ts (
|
|
31
|
+
w(`FAIL this repo declares no smoke config — add \`smoke: { base, routes, login? }\` to repo.config.ts (tools/shipkit/index.md)`)
|
|
32
32
|
return 1
|
|
33
33
|
}
|
|
34
34
|
try {
|
package/src/cli/cmd_Social.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// sk social and sk identities: who speaks, and where a repo stands in public (wiki
|
|
1
|
+
// sk social and sk identities: who speaks, and where a repo stands in public (wiki tools/shipkit/social.md, `sk
|
|
2
2
|
// social`). Every module loads inside execute: the cli registers this file on every `sk` call
|
|
3
3
|
import { Command, Option } from 'clipanion'
|
|
4
4
|
|
|
@@ -34,7 +34,7 @@ class SocialCommand extends Command {
|
|
|
34
34
|
category: 'Social',
|
|
35
35
|
description: 'where the repo stands in public: posts per account, the rhythm, kinds, topics, hashtags, what waits',
|
|
36
36
|
details:
|
|
37
|
-
'Every posted line of .shipkit/social/drafts as one post, dated from its id, else from the commit that recorded it. The public numbers come from the free reads (Bluesky, Mastodon, a Discord invite), cached 30 minutes; every other account says unknown. --offline skips them. Page: wiki
|
|
37
|
+
'Every posted line of .shipkit/social/drafts as one post, dated from its id, else from the commit that recorded it. The public numbers come from the free reads (Bluesky, Mastodon, a Discord invite), cached 30 minutes; every other account says unknown. --offline skips them. Page: wiki tools/shipkit/social.md',
|
|
38
38
|
examples: [
|
|
39
39
|
['the overview', 'sk social'],
|
|
40
40
|
['with no network', 'sk social --offline'],
|
|
@@ -192,7 +192,7 @@ class IdentitiesCommand extends Command {
|
|
|
192
192
|
static override usage = Command.Usage({
|
|
193
193
|
category: 'Social',
|
|
194
194
|
description: 'every identity of the machine: its accounts online over its accounts, and the repos speaking as it',
|
|
195
|
-
details: "One folder an identity in the house repo's .shipkit/identities/. A repo names its own with speaksAs in repo.config.ts; the default identity speaks for a repo that names none. Page: wiki
|
|
195
|
+
details: "One folder an identity in the house repo's .shipkit/identities/. A repo names its own with speaksAs in repo.config.ts; the default identity speaks for a repo that names none. Page: wiki tools/shipkit/social.md",
|
|
196
196
|
examples: [['every identity', 'sk identities'], ['as json', 'sk identities --json']],
|
|
197
197
|
})
|
|
198
198
|
json = Option.Boolean('--json', false, { description: 'one json object' })
|
package/src/cli/cmd_Sound.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// module loads inside execute: the cli registers this file on every `sk` call
|
|
4
4
|
import { Command, Option } from 'clipanion'
|
|
5
5
|
|
|
6
|
-
const PAGE = 'Page: wiki
|
|
6
|
+
const PAGE = 'Page: wiki tools/trailer/index.md, Sound'
|
|
7
7
|
|
|
8
8
|
async function run(context: { stdout: NodeJS.WritableStream; stderr: NodeJS.WritableStream }, body: (say: (l: string) => void, root: string, cwd: string) => Promise<void>): Promise<number> {
|
|
9
9
|
const say = (l: string): void => void context.stdout.write(`${l}\n`)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// sk trace-audit — which
|
|
2
|
-
//
|
|
1
|
+
// sk trace-audit — which paths each gate task reads that its key cannot
|
|
2
|
+
// see (gitignored, or tracked outside a declared list), found by running the task once under the tracer, and with
|
|
3
3
|
// --fix written into repo.config.ts (core/trace-audit.ts).
|
|
4
4
|
import { Command, Option } from 'clipanion'
|
|
5
5
|
import { loadRepoConfig } from '../repo-config.ts'
|
|
@@ -12,8 +12,8 @@ export class TraceAuditCommand extends Command {
|
|
|
12
12
|
|
|
13
13
|
static override usage = Command.Usage({
|
|
14
14
|
category: 'Health',
|
|
15
|
-
description: '
|
|
16
|
-
details: 'Runs each gate task once under the tracer (on by default: --disable for this machine, or SHIPKIT_TRACE=0 for one run) and lists the
|
|
15
|
+
description: 'paths a gate task reads that its key misses, found by tracing it once',
|
|
16
|
+
details: 'Runs each gate task once under the tracer (on by default: --disable for this machine, or SHIPKIT_TRACE=0 for one run) and lists the paths it read that its key misses: a gitignored one that repo.config ignoredInputs does not name, and for a task with a declared inputs list (the test and typecheck of a unit), a tracked file outside that list. The answer is kept for about a day under the git common dir, where every worktree reads it, and each finding joins the key of the task that read it at once. --fix writes the findings into the managed block of repo.config.ts, per task, without tracing again. Exit 1 when a key misses something.',
|
|
17
17
|
examples: [
|
|
18
18
|
['audit, reusing a recent answer', 'sk trace-audit'],
|
|
19
19
|
['trace again now', 'sk trace-audit --fresh'],
|
|
@@ -53,8 +53,8 @@ export class TraceAuditCommand extends Command {
|
|
|
53
53
|
if (r.skipped != null) { out(`skip: nothing traced: ${r.skipped}`); return 0 }
|
|
54
54
|
for (const t of r.tasks) {
|
|
55
55
|
if (t.status === 'unaudited') out(`WARN ${t.id} could not be audited: ${t.why}`)
|
|
56
|
-
else if (t.uncovered.length > 0) out(`FAIL: ${t.id} reads ${t.uncovered.length}
|
|
57
|
-
else out(`ok: ${t.id}: its key covers every
|
|
56
|
+
else if (t.uncovered.length > 0) out(`FAIL: ${t.id} reads ${t.uncovered.length} path(s) its key misses: ${t.uncovered.slice(0, 5).join(', ')}${t.uncovered.length > 5 ? ', …' : ''}`)
|
|
57
|
+
else out(`ok: ${t.id}: its key covers every path it read`)
|
|
58
58
|
}
|
|
59
59
|
if (missing.length > 0) out(` fix: sk trace-audit --fix adds ${describeByTask(Object.fromEntries(missing.map((t) => [t.id, t.propose])))} to repo.config.ts ignoredInputs`)
|
|
60
60
|
return missing.length > 0 ? 1 : 0
|
package/src/cli/cmd_Trailer.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { Command, Option } from 'clipanion'
|
|
4
4
|
import { pageAt } from './family-pages.ts'
|
|
5
5
|
|
|
6
|
-
const PAGE = pageAt('
|
|
7
|
-
const DETAILS = `the trailer language: shots with a film line each (clip <file>, image <file>, card, run "<cmd {out}>", url <route> through the shot service, grid and split of other takes, or a film row of the project CLI), footage blocks, titles in the brand's look, cuts, sections in bars, music, sfx and voice; a \`vertical\` header finishes a short with the brand's lockup, watermark and end card. A repo plugs in one trailer({...}) unit: sounds by id, the world's paths, content checks, a line's own take. Outputs land in trailer/<trailer>/out/. Read first: ${PAGE}, then its folder
|
|
6
|
+
const PAGE = pageAt('tools/trailer/index.md')
|
|
7
|
+
const DETAILS = `the trailer language: shots with a film line each (clip <file>, image <file>, card, run "<cmd {out}>", url <route> through the shot service, grid and split of other takes, or a film row of the project CLI), footage blocks, titles in the brand's look, cuts, sections in bars, music, sfx and voice; a \`vertical\` header finishes a short with the brand's lockup, watermark and end card. A repo plugs in one trailer({...}) unit: sounds by id, the world's paths, content checks, a line's own take. Outputs land in trailer/<trailer>/out/. Read first: ${PAGE}, then its folder tools/trailer/ (the score, the craft, a book of ideas, extending the language)`
|
|
8
8
|
|
|
9
9
|
/** --refilm alone: every stale take; --refilm a,b: those shots */
|
|
10
10
|
const refilmOf = (v: string | boolean | undefined): 'stale' | ReadonlySet<string> | null => (v === undefined || v === false ? null : v === true ? 'stale' : new Set(v.split(',')))
|
package/src/cli/cmd_Veille.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// sk veille: an identity's Veille for agents (veille/, wiki
|
|
1
|
+
// sk veille: an identity's Veille for agents (veille/, wiki tools/shipkit/veille.md, For agents: never the raw log): the
|
|
2
2
|
// feed as compact lines, one reply's brief or its draft, a pass with its reason, an older log brought in. Every module
|
|
3
3
|
// loads inside execute: the cli registers this file on every `sk` call
|
|
4
4
|
import { Command, Option } from 'clipanion'
|
|
@@ -48,7 +48,7 @@ export class VeilleFeedCommand extends Command {
|
|
|
48
48
|
category: 'Veille',
|
|
49
49
|
description: 'the posts an identity scrolled past, ranked by the worth of a reply: one compact line each',
|
|
50
50
|
details:
|
|
51
|
-
"From the identity's log in shipkit's home: platform, author, their followers, age, likes, reposts, replies, views, the worth of a reply (w0 to w100), the subreddit, about 100 characters of text, its key. Only the active posts (worth at or over the rule maybe, not handled) unless --all; a platform switched off is left out unless --platform names it. Page: wiki
|
|
51
|
+
"From the identity's log in shipkit's home: platform, author, their followers, age, likes, reposts, replies, views, the worth of a reply (w0 to w100), the subreddit, about 100 characters of text, its key. Only the active posts (worth at or over the rule maybe, not handled) unless --all; a platform switched off is left out unless --platform names it. Page: wiki tools/shipkit/veille.md",
|
|
52
52
|
examples: [
|
|
53
53
|
['the best twenty of the last day', 'sk veille feed'],
|
|
54
54
|
['X only, the last three days', 'sk veille feed --platform x --since 3d'],
|
package/src/cli/cmd_When.ts
CHANGED
|
@@ -23,8 +23,8 @@ export class WhenCommand extends Command {
|
|
|
23
23
|
['only what the quick gate runs', 'sk when --only onCi'],
|
|
24
24
|
['the matrix without the legend', 'sk when --no-legend'],
|
|
25
25
|
['machine-readable', 'sk when --json'],
|
|
26
|
-
['write the legend into a docs page between its markers', 'sk when --out wiki/
|
|
27
|
-
['fail if that page is stale (lint mode)', 'sk when --out wiki/
|
|
26
|
+
['write the legend into a docs page between its markers', 'sk when --out wiki/tools/shipkit/runs.md'],
|
|
27
|
+
['fail if that page is stale (lint mode)', 'sk when --out wiki/tools/shipkit/runs.md --check'],
|
|
28
28
|
],
|
|
29
29
|
})
|
|
30
30
|
|
package/src/cli/family-pages.ts
CHANGED
|
@@ -5,29 +5,29 @@ import { homedir } from 'os'
|
|
|
5
5
|
import { join } from 'path'
|
|
6
6
|
|
|
7
7
|
export const FAMILY_PAGES: Readonly<Record<string, string>> = {
|
|
8
|
-
Asks: '
|
|
9
|
-
Assets: '
|
|
10
|
-
Drill: '
|
|
11
|
-
Gate: '
|
|
12
|
-
Health: '
|
|
13
|
-
Home: '
|
|
14
|
-
Media: '
|
|
15
|
-
Refactor: '
|
|
16
|
-
Review: '
|
|
17
|
-
Scaffold: '
|
|
18
|
-
Serve: '
|
|
19
|
-
Setup: '
|
|
20
|
-
Social: '
|
|
21
|
-
Sound: '
|
|
22
|
-
Trailer: '
|
|
23
|
-
Veille: '
|
|
24
|
-
Wiki: '
|
|
8
|
+
Asks: 'preferences/human-loop/index.md',
|
|
9
|
+
Assets: 'tools/generate-assets/index.md',
|
|
10
|
+
Drill: 'meta/speed-up-agents/index.md',
|
|
11
|
+
Gate: 'tools/shipkit/index.md',
|
|
12
|
+
Health: 'tools/shipkit/index.md',
|
|
13
|
+
Home: 'tools/shipkit/home.md',
|
|
14
|
+
Media: 'tools/shipkit/media-store.md',
|
|
15
|
+
Refactor: 'patterns/typescript/index.md',
|
|
16
|
+
Review: 'tools/shipkit/review.md',
|
|
17
|
+
Scaffold: 'patterns/pocketbase/index.md',
|
|
18
|
+
Serve: 'tools/shipkit/home.md',
|
|
19
|
+
Setup: 'patterns/rv-conventions/index.md',
|
|
20
|
+
Social: 'tools/shipkit/social.md',
|
|
21
|
+
Sound: 'tools/trailer/index.md',
|
|
22
|
+
Trailer: 'tools/trailer/index.md',
|
|
23
|
+
Veille: 'tools/shipkit/veille.md',
|
|
24
|
+
Wiki: 'tools/mdwiki/index.md',
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/** a page as a path any repo can read, when the lib runs from
|
|
27
|
+
/** a page as a path any repo can read, when the lib runs from the house repo beside its wiki (`<house>/packages/rvlib-shipkit`);
|
|
28
28
|
* from an install, the page's wiki path */
|
|
29
29
|
export function pageAt(rel: string): string {
|
|
30
|
-
const abs = join(import.meta.dir, '
|
|
30
|
+
const abs = join(import.meta.dir, '../../../../wiki', rel)
|
|
31
31
|
if (!existsSync(abs)) return `wiki ${rel}`
|
|
32
32
|
const home = homedir()
|
|
33
33
|
return abs.startsWith(`${home}/`) ? `~${abs.slice(home.length)}` : abs
|
package/src/cli/registry.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { AssetsAddCommand, AssetsCheckCommand, AssetsFillCommand, AssetsGenComma
|
|
|
9
9
|
import { BumpCommand } from './cmd_Bump.ts'
|
|
10
10
|
import { CallsCommand } from './cmd_Calls.ts'
|
|
11
11
|
import { TimeCommand } from './cmd_Time.ts'
|
|
12
|
-
import { DrillCompareCommand, DrillReportCommand, DrillVerdictCommand } from './cmd_Drill.ts'
|
|
12
|
+
import { DrillCleanCommand, DrillCompareCommand, DrillReportCommand, DrillVerdictCommand } from './cmd_Drill.ts'
|
|
13
13
|
import { CheckCommand } from './cmd_Check.ts'
|
|
14
14
|
import { CommandsCommand } from './cmd_Commands.ts'
|
|
15
15
|
import { withFamilyPage } from './family-pages.ts'
|
|
@@ -144,6 +144,7 @@ export function buildCli(): Cli {
|
|
|
144
144
|
cli.register(DrillReportCommand)
|
|
145
145
|
cli.register(DrillVerdictCommand)
|
|
146
146
|
cli.register(DrillCompareCommand)
|
|
147
|
+
cli.register(DrillCleanCommand)
|
|
147
148
|
cli.register(ConfigKeysCommand)
|
|
148
149
|
|
|
149
150
|
return cli
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// feed, the studio browse, and `shipkit needs`. Truth files never move to
|
|
4
4
|
// fit the UI — a Collection only READS its source. Severity: yellow = a
|
|
5
5
|
// default is in use, taste pending; red = missing with no inventable
|
|
6
|
-
// default, or a paste-from-elsewhere. Doctrine page:
|
|
6
|
+
// default, or a paste-from-elsewhere. Doctrine page: tools/shipkit/collections in
|
|
7
7
|
// the docs wiki this lib ships beside.
|
|
8
8
|
|
|
9
9
|
import { yieldLoop } from '../core/loop-watch.ts'
|
|
@@ -333,7 +333,7 @@ export type OnCollector = (collection: string, error: string | null) => void
|
|
|
333
333
|
|
|
334
334
|
/** every resource of every collection, failure-isolated per collection: a
|
|
335
335
|
* broken source reports itself as ONE red row, never blanks the tree. The
|
|
336
|
-
* loop is given back between two collections (wiki
|
|
336
|
+
* loop is given back between two collections (wiki tools/shipkit/home.md,
|
|
337
337
|
* Nothing heavy on the daemon's loop) */
|
|
338
338
|
export async function projectResources(collections: Collection[], onCollector?: OnCollector): Promise<Resource[]> {
|
|
339
339
|
const out: Resource[] = []
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// the review store and the trailer cuts as tree rows (wiki
|
|
1
|
+
// the review store and the trailer cuts as tree rows (wiki tools/shipkit/review.md). Under the review section, one row a
|
|
2
2
|
// card that waits on HIM (the owner's verdict, his answer to a question): yellow, so `sk needs` lists it too. Under the trailer
|
|
3
3
|
// section, one row a cut, its open frame notes in the slot: they wait on agents, never on him, so a cut is never yellow.
|
|
4
4
|
// Each collection exists only where the repo has its folder, so a repo with none draws the section greyed
|
package/src/comfy/comfy-panel.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// the comfy section's backend: the repo's .shipkit/comfy/ workflow modules, the
|
|
2
2
|
// comfy-ts serve panel the hub embeds to tune and test one, and the box those
|
|
3
|
-
// modules generate on. The contract this reads is owned by
|
|
3
|
+
// modules generate on. The contract this reads is owned by tools/comfyui/index.md.
|
|
4
4
|
//
|
|
5
5
|
// The panel is a CHILD PROCESS rather than a route: comfy-ts owns that ui, and
|
|
6
6
|
// a second implementation of a var form inside the hub is the redundant
|
|
@@ -15,7 +15,7 @@ export type ComfyPanelUp = { url: string; port: number }
|
|
|
15
15
|
export type ComfyBox = { url: string; err: string | null }
|
|
16
16
|
|
|
17
17
|
const SUFFIX = '.cflow.ts'
|
|
18
|
-
/** the wm facts (
|
|
18
|
+
/** the wm facts (tools/comfyui/index.md) — an absent key defaults to them */
|
|
19
19
|
const DEFAULT_BOX_PORT = 8085
|
|
20
20
|
|
|
21
21
|
export const comfyWorkflowsDir = (root: string): string => join(root, '.shipkit/comfy', 'workflows')
|
|
@@ -5,7 +5,7 @@ import { defineContract, dirExists, md, png } from 'rvlib-shipkit/src/contracts/
|
|
|
5
5
|
export default defineContract({
|
|
6
6
|
venue: 'discord',
|
|
7
7
|
dir: '.shipkit/discord',
|
|
8
|
-
owner: '
|
|
8
|
+
owner: 'guides/post-publicly/index.md',
|
|
9
9
|
appliesTo: 'declared',
|
|
10
10
|
detect: [dirExists('.shipkit/discord')],
|
|
11
11
|
artifacts: [
|
|
@@ -7,7 +7,7 @@ import { defineContract, file, glob, png } from 'rvlib-shipkit/src/contracts/con
|
|
|
7
7
|
export default defineContract({
|
|
8
8
|
venue: 'identity',
|
|
9
9
|
dir: '.shipkit/identity',
|
|
10
|
-
owner: '
|
|
10
|
+
owner: 'tools/generate-assets/index.md',
|
|
11
11
|
appliesTo: 'always',
|
|
12
12
|
gate: 'public-surface',
|
|
13
13
|
detect: [],
|
|
@@ -4,7 +4,7 @@ import { custom, defineContract, dirExists, fileContains, glob, md, png, script
|
|
|
4
4
|
export default defineContract({
|
|
5
5
|
venue: 'itch',
|
|
6
6
|
dir: '.shipkit/itch',
|
|
7
|
-
owner: '
|
|
7
|
+
owner: 'guides/itch/index.md',
|
|
8
8
|
appliesTo: 'declared',
|
|
9
9
|
detect: [script('^(up|push):itch$'), fileContains('deploy.sh', 'butler push'), dirExists('.shipkit/itch')],
|
|
10
10
|
artifacts: [
|
|
@@ -5,7 +5,7 @@ import { custom, defineContract, dirExists, file, fileContains, glob, md, png, s
|
|
|
5
5
|
export default defineContract({
|
|
6
6
|
venue: 'steam',
|
|
7
7
|
dir: '.shipkit/steam',
|
|
8
|
-
owner: '
|
|
8
|
+
owner: 'guides/steam/index.md',
|
|
9
9
|
appliesTo: 'declared',
|
|
10
10
|
detect: [script('^(up|push):steam$'), fileContains('deploy.sh', 'run_app_build'), dirExists('.shipkit/steam')],
|
|
11
11
|
artifacts: [
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// the agent folder of a repo on disk (core/agent-dir.ts owns the rule)
|
|
2
|
+
import { readFileSync } from 'fs'
|
|
3
|
+
import { join } from 'path'
|
|
4
|
+
import { DEFAULT_AGENT_DIR, agentDirOf } from './agent-dir.ts'
|
|
5
|
+
|
|
6
|
+
/** the agent folder of the repo at `root` */
|
|
7
|
+
export function agentDirAt(root: string): string {
|
|
8
|
+
try { return agentDirOf(readFileSync(join(root, 'CLAUDE.md'), 'utf8')) } catch { return DEFAULT_AGENT_DIR }
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** the repo's own global contribution file, in the agent folder its CLAUDE.md names */
|
|
12
|
+
export const contributionFileAt = (root: string): string => `${agentDirAt(root)}/global-contribution.md`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// a repo's agent folder: the folder CLAUDE.md's LAST include names
|
|
2
|
+
// (`@./<dir>/index.md`). `agent` by default; a repo that hosts a base wiki may
|
|
3
|
+
// name a folder of it. CLAUDE.md is the one place it is declared. Pure: the
|
|
4
|
+
// disk side is agent-dir-at.ts, so a cached check importing this reads nothing.
|
|
5
|
+
|
|
6
|
+
export const DEFAULT_AGENT_DIR = 'agent'
|
|
7
|
+
|
|
8
|
+
/** a segment that leaves the repo or lands in what a tool owns: checks write into the agent folder */
|
|
9
|
+
const UNSAFE_SEGMENT = /^(?:\.\.?|node_modules|\.git)$/
|
|
10
|
+
|
|
11
|
+
/** the include lines of a CLAUDE.md, a code fence's lines left out (they are examples, not includes) */
|
|
12
|
+
const includeLines = (claude: string): string[] => {
|
|
13
|
+
let fenced = false
|
|
14
|
+
return claude.split('\n').map((l) => l.trim()).filter((l) => {
|
|
15
|
+
if (/^(```|~~~)/.test(l)) fenced = !fenced
|
|
16
|
+
return !fenced && l.startsWith('@')
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** the agent folder a CLAUDE.md text names, DEFAULT_AGENT_DIR when it names none or an unsafe one */
|
|
21
|
+
export function agentDirOf(claude: string | null): string {
|
|
22
|
+
const last = includeLines(claude ?? '').at(-1)
|
|
23
|
+
const dir = (last == null ? null : /^@\.\/((?:[\w.-]+\/)*[\w.-]+)\/index\.md$/.exec(last))?.[1]
|
|
24
|
+
return dir == null || dir.split('/').some((seg) => UNSAFE_SEGMENT.test(seg)) ? DEFAULT_AGENT_DIR : dir
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** a folder of another wiki (`docs/wiki/agent`), whose own lint and graph cover it */
|
|
28
|
+
export const nestedAgentDir = (dir: string): boolean => dir.includes('/')
|
package/src/core/budget.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { availableParallelism, loadavg } from 'os'
|
|
|
7
7
|
import type { MachineLoad } from '../suite/judge-suites.ts'
|
|
8
8
|
|
|
9
9
|
/** an in process body, a rule or a page check: the house bar is under 1 s
|
|
10
|
-
* (
|
|
10
|
+
* (preferences/how-we-work/index.md, Velocity). The median rule answers in under 50ms */
|
|
11
11
|
export const IN_PROCESS_BUDGET_MS = 1_000
|
|
12
12
|
|
|
13
13
|
/** a subprocess (a build step, a test suite, a `cmd` check) or a world probe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The canonical package.json script bodies for a shipkit repo — vocabulary
|
|
2
|
-
// owned by
|
|
2
|
+
// owned by patterns/rv-conventions/package-json.md. ONE source: `shipkit init`
|
|
3
3
|
// scaffolds from it and rule SK001's autofix repairs from it.
|
|
4
4
|
//
|
|
5
5
|
// a script that only forwards to a shipkit verb is NOT canon: the verb is the
|
|
@@ -30,7 +30,7 @@ export function conditionalBodies(_opts: ScriptStyle = {}): Record<string, strin
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
// ONE WAY IN (
|
|
33
|
+
// ONE WAY IN (tools/shipkit/one-way-in.md): the verification verbs an agent types from
|
|
34
34
|
// muscle memory ROUTE to shipkit, so `bun run test` gets the cache and the
|
|
35
35
|
// job attachment without anyone having to remember a rule. The tool body they
|
|
36
36
|
// used to hold moves to `<name>:raw`, which is what shipkit itself runs and
|
|
@@ -206,7 +206,7 @@ function brokenBuiltin(path: string, message: string): CheckDef {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
const BUILTIN_OWNER = '
|
|
209
|
+
const BUILTIN_OWNER = 'tools/shipkit/built-in-checks.md'
|
|
210
210
|
|
|
211
211
|
/** every check this repo can run: its own files, plus the toolkit's. Throws
|
|
212
212
|
* on a registration nobody can act on (a duplicate id, a repo check squatting
|
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
// everywhere: CONTRIBUTION_MAX_LINES and CONTRIBUTION_MAX_BYTES bound it.
|
|
6
6
|
|
|
7
7
|
import { readFileSync } from 'fs'
|
|
8
|
+
import { DEFAULT_AGENT_DIR } from './agent-dir.ts'
|
|
9
|
+
|
|
10
|
+
/** where a repo with the default agent folder keeps it */
|
|
11
|
+
export const CONTRIBUTION_FILE = `${DEFAULT_AGENT_DIR}/global-contribution.md`
|
|
8
12
|
|
|
9
|
-
export const CONTRIBUTION_FILE = 'agent/global-contribution.md'
|
|
10
13
|
/** the line a house index carries to load the generated context */
|
|
11
14
|
export const CONTEXT_INCLUDE = '@generated/global-context.md'
|
|
12
15
|
export const CONTRIBUTION_MAX_LINES = 40
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// THE IGNORED INPUTS BLOCK in `repo.config.ts`: the one place the traced
|
|
2
|
-
// audit (core/trace-audit.ts) writes the
|
|
2
|
+
// audit (core/trace-audit.ts) writes the paths each task reads outside its key.
|
|
3
3
|
//
|
|
4
4
|
// Its own markers, apart from the gate block (core/when-block.ts), so a repo
|
|
5
5
|
// that writes `off` or `tests` by hand, with its comments, keeps them exactly
|
|
@@ -7,7 +7,8 @@ export type AuditTask = {
|
|
|
7
7
|
/** `audited` when its trace had no hole, else why it could not be */
|
|
8
8
|
status: 'audited' | 'unaudited'
|
|
9
9
|
why?: string
|
|
10
|
-
/**
|
|
10
|
+
/** paths it read that its key does not cover: gitignored ones, and
|
|
11
|
+
* tracked files outside a declared list */
|
|
11
12
|
uncovered: string[]
|
|
12
13
|
/** the fewest `ignoredInputs` entries that cover them */
|
|
13
14
|
propose: string[]
|
|
@@ -37,7 +38,7 @@ export function pendingByTask(r: AuditReport | null, have: IgnoredInputs): Ignor
|
|
|
37
38
|
return out
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
/** `ignoredInputs`: task id →
|
|
41
|
+
/** `ignoredInputs`: task id → paths it reads outside its key, `'*'` for every task */
|
|
41
42
|
export type IgnoredInputs = Record<string, string[]>
|
|
42
43
|
|
|
43
44
|
/** the entries that join one task's key */
|
package/src/core/layout.ts
CHANGED
|
@@ -26,16 +26,16 @@ export const LAYOUT = {
|
|
|
26
26
|
// from. Tracked in a private repo only, since a board quotes the owner
|
|
27
27
|
plans: sk('plans'),
|
|
28
28
|
// the house repo's identities, who speaks: one folder each, its accounts; the house repo tracks it with its own
|
|
29
|
-
// gitignore line (wiki
|
|
29
|
+
// gitignore line (wiki tools/shipkit/social.md)
|
|
30
30
|
identities: sk('identities'),
|
|
31
31
|
// local: drafts, private notes, venue listings until they go live
|
|
32
32
|
private: sk('private'),
|
|
33
33
|
reflections: sk('reflections'),
|
|
34
34
|
// the social folder (contract v3): one folder a draft, the week's rhythm. The SK004 block re-includes it in a
|
|
35
|
-
// private repo only, like plans (wiki
|
|
35
|
+
// private repo only, like plans (wiki tools/shipkit/social.md)
|
|
36
36
|
social: sk('social'),
|
|
37
37
|
// local: the facts (sha, size, type) of every draft media, so a file the disk let go keeps its key in the media
|
|
38
|
-
// store (wiki
|
|
38
|
+
// store (wiki tools/shipkit/social.md, Media)
|
|
39
39
|
socialMedia: sk('social-media.json'),
|
|
40
40
|
journal: sk('journal'),
|
|
41
41
|
domain: sk('domain'),
|
package/src/core/loop-watch.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// already ended when the late beat fires, so the finished spans are kept too
|
|
5
5
|
export type Span = { what: string; at: number; end: number | null }
|
|
6
6
|
|
|
7
|
-
/** a stall shorter than this is the machine's ordinary jitter: the bar of wiki
|
|
7
|
+
/** a stall shorter than this is the machine's ordinary jitter: the bar of wiki tools/shipkit/home.md (Nothing heavy on the daemon's loop) */
|
|
8
8
|
export const STALL_MS = 200
|
|
9
9
|
const BEAT_MS = 250
|
|
10
10
|
const KEEP = 300
|
package/src/core/motherhome.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Report to the motherhome: a repo's row in the docsBase wiki's
|
|
2
|
-
// `
|
|
2
|
+
// `tools/shipkit/local-projects.md`, in two halves.
|
|
3
3
|
//
|
|
4
4
|
// - `reportToMotherhome` (every ci/check/init) files the row in the MACHINE
|
|
5
5
|
// DB and nothing else. A gate answers about its own repo, so it never
|
|
@@ -68,7 +68,7 @@ export function reportToMotherhome(root: string, config: RepoConfig, today: stri
|
|
|
68
68
|
// absolute local paths only: a relative docsBase would resolve
|
|
69
69
|
// against CWD, a URL is a display prefix
|
|
70
70
|
if (!base.startsWith('/')) return { wrote: false }
|
|
71
|
-
const page = join(base, '
|
|
71
|
+
const page = join(base, 'tools/shipkit/local-projects.md')
|
|
72
72
|
if (!existsSync(page)) return { wrote: false }
|
|
73
73
|
// a linked worktree is a temporary side checkout: its runs are
|
|
74
74
|
// covered when its branch merges
|