@joshuafolkken/kit 1.1387.0 → 1.1435.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/.claude/skills/epic-commands/SKILL.md +1 -1
- package/.claude/skills/epic-commands/epic-bundle.md +5 -0
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +5 -3
- package/.claude/skills/workflow-commands/backlogrun-steps.md +4 -3
- package/.claude/skills/workflow-commands/backlogrun.md +1 -0
- package/.claude/skills/workflow-commands/chain-rule.md +4 -2
- package/.claude/skills/workflow-commands/issue-comments.md +6 -0
- package/.claude/skills/workflow-commands/observation-ledger.md +3 -2
- package/.claude/skills/workflow-commands/pre-gate-cut.md +5 -3
- package/README.md +25 -0
- package/dist/hooks/audit-provision.js +2 -2
- package/dist/hooks/batch-guard.js +7 -7
- package/dist/hooks/{chunk-IYVOLN6A.js → chunk-2G5F2YCD.js} +3 -3
- package/dist/hooks/{chunk-2YSW3CXH.js → chunk-3LE6VLSR.js} +17 -6
- package/dist/hooks/{chunk-J3KSS7II.js → chunk-4BHUPFKF.js} +1 -1
- package/dist/hooks/{chunk-EAQEGME7.js → chunk-5SJSSCJG.js} +1 -1
- package/dist/hooks/{chunk-FZ6FUSBM.js → chunk-723HKZO5.js} +1 -1
- package/dist/hooks/{chunk-LMWBRJIP.js → chunk-7KMN5QB5.js} +3 -3
- package/dist/hooks/{chunk-NEC4AT4Z.js → chunk-DGT54IH5.js} +4 -0
- package/dist/hooks/{chunk-STDSEPWU.js → chunk-EMB55BDF.js} +4 -4
- package/dist/hooks/{chunk-JBBMAPC4.js → chunk-IX6TTTI6.js} +4 -0
- package/dist/hooks/{chunk-GJ7JPIHN.js → chunk-JXQBK323.js} +2674 -187
- package/dist/hooks/{chunk-DCY2GWHC.js → chunk-MSYSUSY6.js} +5 -5
- package/dist/hooks/{chunk-EBSHN25W.js → chunk-MU4LJFIV.js} +4 -4
- package/dist/hooks/{chunk-WNFJLBXI.js → chunk-QL6QTPWN.js} +3 -3
- package/dist/hooks/{chunk-SL4GQ2XP.js → chunk-XER6SSIB.js} +91 -18
- package/dist/hooks/{chunk-U32VSRNG.js → chunk-YW452ZAX.js} +89 -34
- package/dist/hooks/{chunk-GNDJ7NJ7.js → chunk-YZXYOAZ3.js} +202 -55
- package/dist/hooks/codex-hook-adapter.js +15 -15
- package/dist/hooks/duplicate-read-guard.js +8 -8
- package/dist/hooks/format-edited.js +5 -5
- package/dist/hooks/inputs.json +288 -229
- package/dist/hooks/investigation-guard.js +8 -8
- package/dist/hooks/pretool-guard.js +14 -14
- package/dist/hooks/session-lang.js +69 -16
- package/dist/hooks/stop-guard.js +13 -38
- package/dist/josh.js +62 -9
- package/package.json +4 -3
- package/prompts/review.md +22 -0
- package/scripts/agent/claude-agent-argv.ts +13 -1
- package/scripts/auth/auth-setup-cli.ts +101 -0
- package/scripts/auth/claude-token-output.ts +78 -0
- package/scripts/auth/claude-token.ts +68 -0
- package/scripts/backlog/backlog-drive-epic.ts +24 -8
- package/scripts/backlog/backlog-drive-launch.ts +3 -0
- package/scripts/backlog/backlog-drive-named-offer.ts +7 -2
- package/scripts/backlog/backlog-drive-named.ts +4 -2
- package/scripts/backlog/backlog-drive-unread.ts +56 -0
- package/scripts/backlog/backlog-drive.ts +16 -8
- package/scripts/backlog/backlog-overlap.ts +22 -5
- package/scripts/backlog/backlog-ready.ts +1 -3
- package/scripts/backlog/backlogrun-args.ts +13 -2
- package/scripts/backlog/backlogrun-cli.ts +91 -19
- package/scripts/backlog/backlogrun-launch.ts +24 -0
- package/scripts/backlog/backlogrun-replace.ts +166 -0
- package/scripts/backlog/backlogrun-stop.ts +178 -0
- package/scripts/behavior/behavior-cli.ts +6 -1
- package/scripts/doctor/doctor-io.ts +60 -9
- package/scripts/doctor/doctor.ts +20 -1
- package/scripts/document/document-byte-budget.ts +3 -3
- package/scripts/epic/epic-bundle-cli.ts +8 -8
- package/scripts/epic/epic-bundle-referenced.ts +2 -5
- package/scripts/epic/epic-bundle.ts +39 -4
- package/scripts/exports/unused-members-cli.ts +2 -1
- package/scripts/followup/followup-checks-event.ts +82 -0
- package/scripts/followup/git-followup-finish.ts +16 -2
- package/scripts/followup/git-followup-workflow.ts +5 -2
- package/scripts/followup/git-pr-followup-checks.ts +18 -4
- package/scripts/followup/git-pr-followup-wrapup.ts +5 -0
- package/scripts/followup/git-pr-followup.ts +4 -1
- package/scripts/fresh-machine/fresh-machine-cli.ts +204 -0
- package/scripts/fresh-machine/fresh-machine-docker.ts +65 -0
- package/scripts/fresh-machine/fresh-machine-image.ts +62 -0
- package/scripts/fresh-machine/fresh-machine-log.ts +61 -0
- package/scripts/fresh-machine/fresh-machine-patterns.ts +130 -0
- package/scripts/fresh-machine/fresh-machine-run.ts +215 -0
- package/scripts/fresh-machine/fresh-machine-script.ts +45 -0
- package/scripts/fresh-machine/fresh-machine-spec.ts +57 -0
- package/scripts/fresh-machine/specs/kit-test-backlogrun-python.json +34 -0
- package/scripts/fresh-machine/specs/kit-test-backlogrun.json +31 -0
- package/scripts/gate/gate-report.ts +70 -15
- package/scripts/gate/project-checks.ts +13 -2
- package/scripts/gate/scoped-green.ts +2 -1
- package/scripts/gate/verification-gate.ts +4 -3
- package/scripts/gh/gh-author-association.ts +14 -0
- package/scripts/gh/git-gh-conditional.ts +66 -0
- package/scripts/gh/git-gh-exec.ts +1 -1
- package/scripts/gh/git-gh-issue-read.ts +6 -3
- package/scripts/gh/git-gh-issue-write.ts +5 -1
- package/scripts/gh/git-gh-issue.ts +4 -1
- package/scripts/gh/git-pr-checks-eval.ts +13 -0
- package/scripts/gh/git-pr-checks-parse.ts +8 -1
- package/scripts/gh/git-pr-checks-watch.ts +11 -4
- package/scripts/gh/git-pr-checks.ts +36 -2
- package/scripts/git/git-command.ts +16 -4
- package/scripts/git/git-schemas.ts +1 -0
- package/scripts/git/git-spawn-sync.ts +1 -1
- package/scripts/hooks/pretool-guard.ts +3 -1
- package/scripts/init/hook-command-rewrite.ts +31 -0
- package/scripts/init/init-actions.ts +4 -1
- package/scripts/init/init-ai-copy.ts +33 -10
- package/scripts/init/init-basic.ts +8 -3
- package/scripts/init/init-logic-toolchain.ts +76 -0
- package/scripts/init/init-logic.ts +2 -0
- package/scripts/init/init.ts +5 -23
- package/scripts/init/project-profile.ts +36 -7
- package/scripts/init/start-exec.ts +27 -1
- package/scripts/init/start-plan.ts +15 -0
- package/scripts/init/start-steps.ts +46 -0
- package/scripts/init/start.ts +1 -0
- package/scripts/init/workflow-mark.ts +35 -0
- package/scripts/issue/issue-ack-cli.ts +84 -0
- package/scripts/issue/issue-labels.ts +40 -8
- package/scripts/issue/issue-state-cli.ts +14 -4
- package/scripts/issue/issue-watch-diff.ts +152 -0
- package/scripts/issue/issue-watch-gate.ts +81 -0
- package/scripts/issue/issue-watch-hook.ts +54 -0
- package/scripts/issue/issue-watch.ts +240 -0
- package/scripts/issue/measure-rerun-cli.ts +3 -4
- package/scripts/josh/josh-command-map.ts +4 -0
- package/scripts/josh/josh-commands-backlog.ts +2 -2
- package/scripts/josh/josh-commands-development.ts +1 -1
- package/scripts/josh/josh-commands-issue.ts +7 -0
- package/scripts/josh/josh-commands-lane.ts +11 -2
- package/scripts/josh/josh-commands-project.ts +24 -0
- package/scripts/josh/josh-verdict.ts +33 -4
- package/scripts/lane/claude-lane-broker.ts +142 -0
- package/scripts/lane/lane-await.ts +6 -2
- package/scripts/lane/lane-cache.ts +37 -7
- package/scripts/lane/lane-capacity.ts +8 -6
- package/scripts/lane/lane-child-invocation.ts +1 -0
- package/scripts/lane/lane-cli.ts +15 -1
- package/scripts/lane/lane-close.ts +15 -6
- package/scripts/lane/lane-dispatch.ts +36 -10
- package/scripts/lane/lane-environment.ts +1 -1
- package/scripts/lane/lane-launch-cli.ts +13 -4
- package/scripts/lane/lane-ledger.ts +21 -3
- package/scripts/lane/lane-measure-cli.ts +10 -2
- package/scripts/lane/lane-open.ts +9 -1
- package/scripts/lane/lane-preserve.ts +49 -0
- package/scripts/lane/lane-reap.ts +20 -5
- package/scripts/lane/lane-registry.ts +6 -0
- package/scripts/lane/lane-restart-cli.ts +51 -0
- package/scripts/lane/lane-restart.ts +175 -0
- package/scripts/lane/{openai-review-broker.ts → lane-session-broker.ts} +106 -28
- package/scripts/lane/lane-spent.ts +195 -0
- package/scripts/lane/lane-stage-stats.ts +27 -3
- package/scripts/lane/lane-stop-stats.ts +96 -0
- package/scripts/lane/openai-lane-supervisor.ts +2 -2
- package/scripts/lane/process-tools.ts +31 -0
- package/scripts/lib/buffered-process.ts +36 -2
- package/scripts/lib/pnpm-reach.ts +27 -0
- package/scripts/lib/status-icons.ts +5 -1
- package/scripts/lint/lint-parallel.ts +19 -2
- package/scripts/observations/observation-ledger-home.ts +1 -0
- package/scripts/review/review-attest-cli.ts +21 -6
- package/scripts/review/review-brief-cli.ts +2 -2
- package/scripts/review/review-comment-round.ts +114 -0
- package/scripts/review/review-record-cli.ts +39 -17
- package/scripts/rules/implementation-cut.ts +3 -3
- package/scripts/rules/pre-gate-cut.ts +1 -1
- package/scripts/run/board/run-board-checks.ts +42 -0
- package/scripts/run/board/run-board-cli.ts +2 -0
- package/scripts/run/board/run-board-every.ts +3 -1
- package/scripts/run/board/run-board-fit.ts +16 -5
- package/scripts/run/board/run-board-fresh.ts +64 -0
- package/scripts/run/board/run-board-header.ts +129 -53
- package/scripts/run/board/run-board-labels.ts +47 -4
- package/scripts/run/board/run-board-lane-event.ts +66 -0
- package/scripts/run/board/run-board-layout.ts +57 -9
- package/scripts/run/board/run-board-now.ts +234 -0
- package/scripts/run/board/run-board-operation-read.ts +75 -0
- package/scripts/run/board/run-board-operation.ts +150 -0
- package/scripts/run/board/run-board-phase.ts +26 -1
- package/scripts/run/board/run-board-plan.ts +4 -6
- package/scripts/run/board/run-board-read.ts +49 -3
- package/scripts/run/board/run-board-reason.ts +124 -0
- package/scripts/run/board/run-board-render-checks.ts +55 -0
- package/scripts/run/board/run-board-render-legend.ts +12 -3
- package/scripts/run/board/run-board-render-slot.ts +2 -2
- package/scripts/run/board/run-board-render-tail.ts +128 -0
- package/scripts/run/board/run-board-render-thanks.ts +50 -0
- package/scripts/run/board/run-board-render-title.ts +58 -0
- package/scripts/run/board/run-board-render.ts +96 -80
- package/scripts/run/board/run-board-row-yield.ts +32 -0
- package/scripts/run/board/run-board-setup.ts +61 -13
- package/scripts/run/board/run-board-state.ts +10 -0
- package/scripts/run/board/run-board-status.ts +66 -7
- package/scripts/run/board/run-board-thanks-csv.ts +71 -0
- package/scripts/run/board/run-board-thanks-read.ts +112 -0
- package/scripts/run/board/run-board-thanks.ts +53 -0
- package/scripts/run/board/run-board-tick.ts +50 -21
- package/scripts/run/board/run-board-usual.ts +44 -0
- package/scripts/run/carry/run-carry-args.ts +9 -1
- package/scripts/run/carry/run-carry-cli.ts +2 -45
- package/scripts/run/carry/run-carry-end.ts +73 -0
- package/scripts/run/carry/run-carry.ts +8 -1
- package/scripts/run/entry/run-entry-cli.ts +5 -0
- package/scripts/run/event/run-event-checks.ts +54 -0
- package/scripts/run/event/run-event-render.ts +2 -0
- package/scripts/run/event/run-event-scope.ts +1 -0
- package/scripts/run/event/run-event-setup.ts +55 -11
- package/scripts/run/event/run-event-stream.ts +27 -11
- package/scripts/run/merge/run-merge-cli.ts +7 -4
- package/scripts/run/merge/run-merge-ship.ts +61 -0
- package/scripts/run/merge/run-merge-steps.ts +7 -14
- package/scripts/run/merge/run-merge-token.ts +16 -2
- package/scripts/run/run-headless.ts +1 -0
- package/scripts/run/run-step.ts +2 -0
- package/scripts/run/ship/run-ship-cli.ts +22 -2
- package/scripts/run/ship/run-ship-return.ts +31 -13
- package/scripts/run/ship/run-ship-review-steps.ts +17 -4
- package/scripts/run/ship/run-ship-stage.ts +1 -0
- package/scripts/run/wake/run-wake-await.ts +130 -0
- package/scripts/run/wake/run-wake-cli.ts +60 -71
- package/scripts/run/wake/run-wake-describe.ts +34 -2
- package/scripts/run/wake/run-wake-driver.ts +11 -4
- package/scripts/run/wake/run-wake-session.ts +20 -3
- package/scripts/run/wake/run-wake-stop.ts +37 -0
- package/scripts/run/wake/run-wake-supervise.ts +44 -0
- package/scripts/sync/claude-settings-merge.ts +144 -0
- package/scripts/sync/sync-ai-files.ts +28 -3
- package/scripts/sync/sync.ts +15 -0
- package/scripts/test/project-test-script.ts +73 -0
- package/scripts/test/skip-marker.ts +14 -1
- package/scripts/test/test-related.ts +3 -2
- package/scripts/test/test-unit-guard.ts +78 -14
- package/scripts/time-runtime/time-reported-failure.ts +11 -3
- package/scripts/uninstall/distributed-files.ts +92 -0
- package/scripts/uninstall/uninstall-plan.ts +119 -0
- package/scripts/uninstall/uninstall-report.ts +61 -0
- package/scripts/uninstall/uninstall.ts +206 -0
- package/templates/AGENTS.basic.md +4 -0
- package/templates/GEMINI.basic.md +6 -0
- package/dist/hooks/chunk-6V5OPIUU.js +0 -13
- package/scripts/run/board/run-board-track.ts +0 -22
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QL6QTPWN.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5SJSSCJG.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MU4LJFIV.js";
|
|
10
10
|
import {
|
|
11
11
|
time_spans
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XER6SSIB.js";
|
|
13
13
|
import {
|
|
14
14
|
json_value
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3LE6VLSR.js";
|
|
16
16
|
|
|
17
17
|
// scripts/delegation/duplicate-read-guard.ts
|
|
18
18
|
import { statSync } from "node:fs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
time_density_hook,
|
|
3
3
|
time_hook_transcript
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XER6SSIB.js";
|
|
5
5
|
import {
|
|
6
6
|
josh_environment_file
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4BHUPFKF.js";
|
|
8
8
|
import {
|
|
9
9
|
json_value
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3LE6VLSR.js";
|
|
11
11
|
import {
|
|
12
12
|
stamp_file
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DGT54IH5.js";
|
|
14
14
|
|
|
15
15
|
// scripts/josh/hook-decision.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hook_decision
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MU4LJFIV.js";
|
|
4
4
|
import {
|
|
5
5
|
cost_blocks,
|
|
6
6
|
time_batch_guard,
|
|
7
7
|
time_bundle_call,
|
|
8
8
|
time_shell,
|
|
9
9
|
time_spans
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XER6SSIB.js";
|
|
11
11
|
import {
|
|
12
12
|
cost_transcript
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3LE6VLSR.js";
|
|
14
14
|
|
|
15
15
|
// scripts/delegation/investigation-reads.ts
|
|
16
16
|
import path2 from "node:path";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
process_owner_schema,
|
|
7
7
|
run_carry,
|
|
8
8
|
time_instant
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3LE6VLSR.js";
|
|
10
10
|
import {
|
|
11
11
|
PLATFORM_TEMP_ROOT,
|
|
12
12
|
PROBE_TIMEOUT_MS,
|
|
13
13
|
stamp_file
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DGT54IH5.js";
|
|
15
15
|
|
|
16
16
|
// scripts/cost-runtime/cost-blocks.ts
|
|
17
17
|
import { z } from "zod";
|
|
@@ -147,10 +147,10 @@ var BACKLOG_COMMANDS = {
|
|
|
147
147
|
// Started from a terminal: the `backlogrun` keyword's launcher, and the board.
|
|
148
148
|
backlogrun: {
|
|
149
149
|
script: "scripts/backlog/backlogrun-cli.ts",
|
|
150
|
-
description: "Start a backlogrun in the background and show its board; with one already running, only show the board",
|
|
150
|
+
description: "Start a backlogrun in the background and show its board; with one already running, only show the board, or replace it when it is idle and the invocation differs; --stop stops it",
|
|
151
151
|
category: "AI tools",
|
|
152
152
|
reference: [
|
|
153
|
-
"[
|
|
153
|
+
"[<n>...] [--only] [--max <n>] [--idle <minutes>] [--agent claude|codex] | --stop",
|
|
154
154
|
"developer",
|
|
155
155
|
["files", "network", "processes"]
|
|
156
156
|
]
|
|
@@ -260,6 +260,12 @@ var GUARD_COMMANDS = {
|
|
|
260
260
|
// scripts/josh/josh-commands-issue.ts
|
|
261
261
|
var ISSUES_WITH_REPO = "<issue...> [--repo <owner/repo>]";
|
|
262
262
|
var ISSUE_COMMANDS = {
|
|
263
|
+
"issue:ack": {
|
|
264
|
+
script: "scripts/issue/issue-ack-cli.ts",
|
|
265
|
+
description: "Record that the run read a person's update to its issue, printing the update it acknowledges",
|
|
266
|
+
category: "AI tools",
|
|
267
|
+
reference: ["<issue>", "automation", ["network"]]
|
|
268
|
+
},
|
|
263
269
|
"issue:read": {
|
|
264
270
|
script: "scripts/issue/issue-read-cli.ts",
|
|
265
271
|
description: "Print each issue's title, body and every comment on it, in one call",
|
|
@@ -358,7 +364,7 @@ var LANE_COMMANDS = {
|
|
|
358
364
|
},
|
|
359
365
|
"lane:prune": {
|
|
360
366
|
...LANE_ARGUMENTS,
|
|
361
|
-
description: "Close every lane an interruption left without its work tree, then sweep unregistered leftovers under the lanes root",
|
|
367
|
+
description: "Close every lane an interruption left without its work tree and every spent lane, then sweep unregistered leftovers under the lanes root",
|
|
362
368
|
category: "AI tools",
|
|
363
369
|
reference: ["", "automation", ["files", "git"]],
|
|
364
370
|
default_script_arguments: ["prune"]
|
|
@@ -390,6 +396,14 @@ var LANE_COMMANDS = {
|
|
|
390
396
|
category: "AI tools",
|
|
391
397
|
reference: ["<issue> [--stash <message>]", "automation", ["files", "git", "processes"]]
|
|
392
398
|
},
|
|
399
|
+
// `.env` is read for `JOSH_LANE_ROOT`, as every lane command reads it, so the lane is found.
|
|
400
|
+
"lane:restart": {
|
|
401
|
+
script: "scripts/lane/lane-restart-cli.ts",
|
|
402
|
+
tsx_arguments: OPTIONAL_ENV_FILE_FLAGS,
|
|
403
|
+
description: "Stop a running lane child, stash its uncommitted work and re-dispatch its issue in a fresh session \u2014 not counted as an outage or a failure",
|
|
404
|
+
category: "AI tools",
|
|
405
|
+
reference: ["<issue>", "developer", ["files", "git", "processes", "network"]]
|
|
406
|
+
},
|
|
393
407
|
// A live run's lane limit: `.env` is read so the bare form reports the
|
|
394
408
|
// `JOSH_LANE_LIMIT` a person set there when no override stands.
|
|
395
409
|
"lane:limit": {
|
|
@@ -410,7 +424,7 @@ var LANE_COMMANDS = {
|
|
|
410
424
|
},
|
|
411
425
|
"lane:stats": {
|
|
412
426
|
...MEASURE_ARGUMENTS,
|
|
413
|
-
description: "Print one table row of lane throughput, gate duration and machine load over a period,
|
|
427
|
+
description: "Print one table row of lane throughput, gate duration and machine load over a period, the per-stage durations of a lane under it, and the wait after each ship stop reason under those",
|
|
414
428
|
category: "AI tools",
|
|
415
429
|
reference: ["--period <days> [--limit <lane-limit>]", "maintainer", ["none"]],
|
|
416
430
|
default_script_arguments: ["stats"]
|
|
@@ -1307,17 +1321,27 @@ import { availableParallelism as availableParallelism4 } from "node:os";
|
|
|
1307
1321
|
// scripts/lib/status-icons.ts
|
|
1308
1322
|
var FAIL_ICON = "\u2717";
|
|
1309
1323
|
var PASS_ICON = "\u2714";
|
|
1310
|
-
var
|
|
1324
|
+
var WARN_ICON = "\u26A0";
|
|
1325
|
+
var status_icons = { FAIL_ICON, PASS_ICON, WARN_ICON };
|
|
1311
1326
|
|
|
1312
1327
|
// scripts/josh/josh-verdict.ts
|
|
1313
|
-
var { FAIL_ICON: FAIL_ICON2, PASS_ICON: PASS_ICON2 } = status_icons;
|
|
1328
|
+
var { FAIL_ICON: FAIL_ICON2, PASS_ICON: PASS_ICON2, WARN_ICON: WARN_ICON2 } = status_icons;
|
|
1314
1329
|
var GATE_SUBJECT = "verification gate";
|
|
1315
1330
|
var GATE_PASSED_PREFIX = `${PASS_ICON2} ${GATE_SUBJECT} passed`;
|
|
1316
1331
|
var GATE_FAILED_PREFIX = `${FAIL_ICON2} ${GATE_SUBJECT} failed`;
|
|
1332
|
+
var GATE_UNVERIFIED_PREFIX = `${WARN_ICON2} ${GATE_SUBJECT} not verified`;
|
|
1317
1333
|
var PASSED_VERDICT = "passed";
|
|
1318
1334
|
var FAILED_VERDICT = "failed";
|
|
1319
|
-
|
|
1320
|
-
|
|
1335
|
+
var UNVERIFIED_VERDICT = "unverified";
|
|
1336
|
+
function format_counts(counts) {
|
|
1337
|
+
if (counts.skipped === 0) return `${String(counts.ran)} checks`;
|
|
1338
|
+
return `${String(counts.ran)} ran, ${String(counts.skipped)} skipped`;
|
|
1339
|
+
}
|
|
1340
|
+
function format_gate_passed(counts, total) {
|
|
1341
|
+
return `${GATE_PASSED_PREFIX} (${format_counts(counts)}) in ${total}.`;
|
|
1342
|
+
}
|
|
1343
|
+
function format_gate_unverified(skipped, total) {
|
|
1344
|
+
return `${GATE_UNVERIFIED_PREFIX} (0 ran, ${String(skipped)} skipped) in ${total}.`;
|
|
1321
1345
|
}
|
|
1322
1346
|
function format_gate_failed(failed_labels, total) {
|
|
1323
1347
|
return `${GATE_FAILED_PREFIX}: ${failed_labels} (${total})`;
|
|
@@ -1332,13 +1356,16 @@ function read_verdict(line) {
|
|
|
1332
1356
|
const trimmed = line.trimStart();
|
|
1333
1357
|
if (trimmed.startsWith(GATE_FAILED_PREFIX)) return FAILED_VERDICT;
|
|
1334
1358
|
if (trimmed.startsWith(GATE_PASSED_PREFIX)) return PASSED_VERDICT;
|
|
1359
|
+
if (trimmed.startsWith(GATE_UNVERIFIED_PREFIX)) return UNVERIFIED_VERDICT;
|
|
1335
1360
|
return void 0;
|
|
1336
1361
|
}
|
|
1337
1362
|
var josh_verdict = {
|
|
1338
1363
|
PASSED_VERDICT,
|
|
1339
1364
|
FAILED_VERDICT,
|
|
1365
|
+
UNVERIFIED_VERDICT,
|
|
1340
1366
|
format_gate_passed,
|
|
1341
1367
|
format_gate_failed,
|
|
1368
|
+
format_gate_unverified,
|
|
1342
1369
|
GATE_OPENING_MARK,
|
|
1343
1370
|
GATE_OPENING_PREFIX,
|
|
1344
1371
|
is_gate_opening,
|
|
@@ -1671,7 +1698,7 @@ var DEV_COMMANDS = {
|
|
|
1671
1698
|
},
|
|
1672
1699
|
"test:unit": {
|
|
1673
1700
|
script: "scripts/test/test-unit-guard.ts",
|
|
1674
|
-
description: "Run unit tests with Vitest (
|
|
1701
|
+
description: "Run unit tests with Vitest (without Vitest: a basic project runs its own test script, others skip; fails when Vitest has no tests)",
|
|
1675
1702
|
category: "Development",
|
|
1676
1703
|
reference: [FILTER_ARGUMENTS, "developer", ["processes"]],
|
|
1677
1704
|
core_weight: gate_plan.direct_unit_weight,
|
|
@@ -1915,6 +1942,22 @@ var PROJECT_COMMANDS = {
|
|
|
1915
1942
|
reference: ["<dir>", "automation", ["files", "git"]],
|
|
1916
1943
|
is_kit_only: true
|
|
1917
1944
|
},
|
|
1945
|
+
"fresh:run": {
|
|
1946
|
+
script: "scripts/fresh-machine/fresh-machine-cli.ts",
|
|
1947
|
+
description: "Run an install scenario in a Docker container of a machine with nothing installed, and keep the log",
|
|
1948
|
+
category: "Project",
|
|
1949
|
+
reference: [
|
|
1950
|
+
"<pattern> | --spec <file.json> [--package-version <version>] [--log-dir <dir>] [--rebuild] | --list",
|
|
1951
|
+
"maintainer",
|
|
1952
|
+
["files", "network", "processes"]
|
|
1953
|
+
]
|
|
1954
|
+
},
|
|
1955
|
+
"auth:setup": {
|
|
1956
|
+
script: "scripts/auth/auth-setup-cli.ts",
|
|
1957
|
+
description: "Save the long-lived Claude Code token `claude setup-token` prints in the macOS keychain, for josh fresh:run",
|
|
1958
|
+
category: "Project",
|
|
1959
|
+
reference: ["[--check]", "maintainer", ["network", "processes"]]
|
|
1960
|
+
},
|
|
1918
1961
|
init: {
|
|
1919
1962
|
script: "scripts/init/init.ts",
|
|
1920
1963
|
description: "Initialize config in a new project",
|
|
@@ -1931,6 +1974,12 @@ var PROJECT_COMMANDS = {
|
|
|
1931
1974
|
category: "Project",
|
|
1932
1975
|
reference: ["", "developer", ["files"]]
|
|
1933
1976
|
},
|
|
1977
|
+
uninstall: {
|
|
1978
|
+
script: "scripts/uninstall/uninstall.ts",
|
|
1979
|
+
description: "Remove what kit added to a project and list what is left to review by hand",
|
|
1980
|
+
category: "Project",
|
|
1981
|
+
reference: [`${PROFILE_ARGUMENTS} [--yes]`, "developer", ["files", "processes"]]
|
|
1982
|
+
},
|
|
1934
1983
|
"registry:migrate": {
|
|
1935
1984
|
script: "scripts/registry-migration/migrate.ts",
|
|
1936
1985
|
description: "Migrate a project from GitHub Packages to public npm",
|
|
@@ -2184,6 +2233,7 @@ var ALIASES = {
|
|
|
2184
2233
|
pf: "profile",
|
|
2185
2234
|
st: "start",
|
|
2186
2235
|
sy: "sync",
|
|
2236
|
+
un: "uninstall",
|
|
2187
2237
|
rmi: "registry:migrate",
|
|
2188
2238
|
g: "git",
|
|
2189
2239
|
gp: "pr",
|
|
@@ -2209,9 +2259,12 @@ var ALIASES = {
|
|
|
2209
2259
|
rvf: "review:findings",
|
|
2210
2260
|
ruv: "rule:value",
|
|
2211
2261
|
ev: "eval",
|
|
2262
|
+
fr: "fresh:run",
|
|
2263
|
+
as: "auth:setup",
|
|
2212
2264
|
lsm: "lane:sample",
|
|
2213
2265
|
lst: "lane:stats",
|
|
2214
2266
|
lli: "lane:limit",
|
|
2267
|
+
lrs: "lane:restart",
|
|
2215
2268
|
blr: "backlogrun"
|
|
2216
2269
|
};
|
|
2217
2270
|
function canonical_command(name) {
|
|
@@ -2444,7 +2497,8 @@ var rollup_item_schema = z3.looseObject({
|
|
|
2444
2497
|
status: z3.string().optional(),
|
|
2445
2498
|
conclusion: z3.string().optional(),
|
|
2446
2499
|
name: z3.string().optional(),
|
|
2447
|
-
context: z3.string().optional()
|
|
2500
|
+
context: z3.string().optional(),
|
|
2501
|
+
description: z3.string().nullish()
|
|
2448
2502
|
});
|
|
2449
2503
|
var pr_raw_schema = z3.object({
|
|
2450
2504
|
statusCheckRollup: z3.array(rollup_item_schema).optional(),
|
|
@@ -2517,6 +2571,7 @@ var KEY_STATUS = "status";
|
|
|
2517
2571
|
var KEY_CONCLUSION = "conclusion";
|
|
2518
2572
|
var KEY_NAME = "name";
|
|
2519
2573
|
var KEY_CONTEXT = "context";
|
|
2574
|
+
var KEY_DESCRIPTION = "description";
|
|
2520
2575
|
function read_string(value) {
|
|
2521
2576
|
if (typeof value !== "string") return void 0;
|
|
2522
2577
|
const trimmed = value.trim();
|
|
@@ -2552,7 +2607,9 @@ function read_rollup_array(parsed) {
|
|
|
2552
2607
|
function parse_rollup_item(item) {
|
|
2553
2608
|
const name = read_string(item[KEY_NAME]) ?? read_string(item[KEY_CONTEXT]);
|
|
2554
2609
|
if (name === void 0) return void 0;
|
|
2555
|
-
|
|
2610
|
+
const check = { name, status: parse_rollup_status(item) };
|
|
2611
|
+
const description = read_string(item[KEY_DESCRIPTION]);
|
|
2612
|
+
return description === void 0 ? check : { ...check, description };
|
|
2556
2613
|
}
|
|
2557
2614
|
function parse_rollup_checks(raw_json) {
|
|
2558
2615
|
const parsed = json_value.parse_or_undefined(raw_json);
|
|
@@ -2693,7 +2750,8 @@ var KIND = {
|
|
|
2693
2750
|
GATE: "gate",
|
|
2694
2751
|
LOAD: "load",
|
|
2695
2752
|
DISPATCH: "dispatch",
|
|
2696
|
-
STAGE: "stage"
|
|
2753
|
+
STAGE: "stage",
|
|
2754
|
+
STOP: "stop"
|
|
2697
2755
|
};
|
|
2698
2756
|
var merge_schema = z4.object({ kind: z4.literal(KIND.MERGE), at: z4.string(), issue: z4.number() });
|
|
2699
2757
|
var gate_schema = z4.object({
|
|
@@ -2728,12 +2786,19 @@ var stage_schema = z4.object({
|
|
|
2728
2786
|
elapsed_ms: z4.number(),
|
|
2729
2787
|
issue: z4.number().optional()
|
|
2730
2788
|
});
|
|
2789
|
+
var stop_schema = z4.object({
|
|
2790
|
+
kind: z4.literal(KIND.STOP),
|
|
2791
|
+
at: z4.string(),
|
|
2792
|
+
issue: z4.number(),
|
|
2793
|
+
reason: z4.string()
|
|
2794
|
+
});
|
|
2731
2795
|
var entry_schema = z4.discriminatedUnion("kind", [
|
|
2732
2796
|
merge_schema,
|
|
2733
2797
|
gate_schema,
|
|
2734
2798
|
load_schema,
|
|
2735
2799
|
dispatch_schema,
|
|
2736
|
-
stage_schema
|
|
2800
|
+
stage_schema,
|
|
2801
|
+
stop_schema
|
|
2737
2802
|
]);
|
|
2738
2803
|
function target_of(repository) {
|
|
2739
2804
|
return stamp_file.stamp_path(LEDGER_PREFIX, repository, LEDGER_SUFFIX);
|
|
@@ -2779,6 +2844,9 @@ async function record_dispatch(issue, path4) {
|
|
|
2779
2844
|
async function record_stage(stage, path4) {
|
|
2780
2845
|
await record({ kind: KIND.STAGE, at: now_iso(), ...stage }, path4);
|
|
2781
2846
|
}
|
|
2847
|
+
async function record_stop(stop, path4) {
|
|
2848
|
+
await record({ kind: KIND.STOP, at: now_iso(), ...stop }, path4);
|
|
2849
|
+
}
|
|
2782
2850
|
function parse_line2(line) {
|
|
2783
2851
|
return entry_schema.safeParse(json_value.parse_or_undefined(line)).data;
|
|
2784
2852
|
}
|
|
@@ -2800,6 +2868,7 @@ var lane_ledger = {
|
|
|
2800
2868
|
record_gate,
|
|
2801
2869
|
record_merge,
|
|
2802
2870
|
record_stage,
|
|
2871
|
+
record_stop,
|
|
2803
2872
|
target,
|
|
2804
2873
|
target_of
|
|
2805
2874
|
};
|
|
@@ -2984,8 +3053,12 @@ function is_failure_line(line) {
|
|
|
2984
3053
|
function is_failed_verdict(line) {
|
|
2985
3054
|
return josh_verdict.read_verdict(line) === josh_verdict.FAILED_VERDICT;
|
|
2986
3055
|
}
|
|
2987
|
-
|
|
2988
|
-
|
|
3056
|
+
var GREEN_VERDICTS = /* @__PURE__ */ new Set([
|
|
3057
|
+
josh_verdict.PASSED_VERDICT,
|
|
3058
|
+
josh_verdict.UNVERIFIED_VERDICT
|
|
3059
|
+
]);
|
|
3060
|
+
function is_green_verdict(line) {
|
|
3061
|
+
return GREEN_VERDICTS.has(josh_verdict.read_verdict(line));
|
|
2989
3062
|
}
|
|
2990
3063
|
function new_scan() {
|
|
2991
3064
|
return {
|
|
@@ -3009,7 +3082,7 @@ function note_failure(scan) {
|
|
|
3009
3082
|
scan.has_failure_before_region = true;
|
|
3010
3083
|
}
|
|
3011
3084
|
function scan_line(scan, line) {
|
|
3012
|
-
if (
|
|
3085
|
+
if (is_green_verdict(line)) {
|
|
3013
3086
|
close_region(scan);
|
|
3014
3087
|
return;
|
|
3015
3088
|
}
|