@joshuafolkken/kit 1.1010.0 → 1.1050.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/settings.json +1 -5
- package/.claude/skills/dependency-update/SKILL.md +6 -3
- package/.claude/skills/epic-commands/SKILL.md +46 -17
- package/.claude/skills/verify-ui/SKILL.md +1 -1
- package/.claude/skills/workflow-commands/SKILL.md +10 -25
- package/.claude/skills/workflow-commands/background-commands.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-child.md +6 -4
- package/.claude/skills/workflow-commands/backlogrun-lanes.md +1 -1
- package/.claude/skills/workflow-commands/backlogrun-park.md +6 -0
- package/.claude/skills/workflow-commands/backlogrun-progress.md +30 -36
- package/.claude/skills/workflow-commands/backlogrun-steps.md +16 -16
- package/.claude/skills/workflow-commands/backlogrun.md +3 -12
- package/.claude/skills/workflow-commands/chain-rule.md +2 -2
- package/.claude/skills/workflow-commands/followup-reference.md +2 -2
- package/.claude/skills/workflow-commands/fullrun-steps.md +4 -3
- package/.claude/skills/workflow-commands/fullrun.md +1 -1
- package/.claude/skills/workflow-commands/halfrun.md +2 -1
- package/.claude/skills/workflow-commands/into-target.md +1 -1
- package/.claude/skills/workflow-commands/issue-comments.md +1 -1
- package/.claude/skills/workflow-commands/observation-filing.md +80 -126
- package/.claude/skills/workflow-commands/pre-gate-cut.md +33 -36
- package/.claude/skills/workflow-commands/prerequisite.md +1 -1
- package/.claude/skills/workflow-commands/working-tree-hold.md +2 -2
- package/.codex/hooks.json +1 -5
- package/.github/workflows/auto-tag.yml +21 -0
- package/.github/workflows/publish.yml +9 -10
- package/.github/workflows/sonar-qube.yml +1 -1
- package/AGENTS.md +4 -25
- package/CLAUDE.md +24 -38
- package/GEMINI.md +4 -24
- package/README.md +22 -56
- package/dist/CLAUDE.md +24 -38
- package/dist/hooks/batch-guard.js +4 -4
- package/dist/hooks/{chunk-6PSTVOLH.js → chunk-5BK3K7V4.js} +114 -90
- package/dist/hooks/{chunk-PAXMLGSS.js → chunk-7VPDUBRN.js} +93 -175
- package/dist/hooks/{chunk-KPZN42RT.js → chunk-DMQN45FN.js} +3 -3
- package/dist/hooks/{chunk-WMIR5SNX.js → chunk-EJDX2TOB.js} +13 -3
- package/dist/hooks/{chunk-A2H5I2VD.js → chunk-GQ7KP45M.js} +2 -2
- package/dist/hooks/{chunk-4GDR2YTV.js → chunk-HJIISEAC.js} +4 -4
- package/dist/hooks/{chunk-AWTFKKFW.js → chunk-NAS4C7GP.js} +6 -33
- package/dist/hooks/{chunk-56LGMJJV.js → chunk-NJQOBE6L.js} +2 -2
- package/dist/hooks/{chunk-EZLHXKJ6.js → chunk-RLDX5SOC.js} +1222 -941
- package/dist/hooks/{chunk-GBJUERYK.js → chunk-WQ4OSBSS.js} +10 -3
- package/dist/hooks/codex-hook-adapter.js +10 -10
- package/dist/hooks/duplicate-read-guard.js +5 -5
- package/dist/hooks/format-edited.js +15 -34
- package/dist/hooks/investigation-guard.js +5 -5
- package/dist/hooks/pretool-guard.js +23 -16
- package/dist/hooks/stop-guard.js +21 -200
- package/dist/josh.js +42 -125
- package/dist/version/index.js +466 -42
- package/eslint/base.js +2 -11
- package/package.json +36 -10
- package/prompts/coding-standards.md +15 -290
- package/prompts/collaboration-workflow/cross-repo-epic.md +2 -51
- package/prompts/collaboration-workflow/epic-audit.md +2 -53
- package/prompts/collaboration-workflow/epic-bundle.md +2 -106
- package/prompts/collaboration-workflow/file-edits.md +6 -53
- package/prompts/collaboration-workflow/issue-template.md +4 -4
- package/prompts/collaboration-workflow/operating-rules.md +18 -75
- package/prompts/collaboration-workflow/principles.md +74 -0
- package/prompts/collaboration-workflow/residency.md +55 -15
- package/prompts/collaboration-workflow/rule-delivery.md +5 -46
- package/prompts/collaboration-workflow/shell-body.md +7 -9
- package/prompts/collaboration-workflow/turn-batching.md +21 -37
- package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
- package/prompts/collaboration-workflow/wip-cap.md +15 -18
- package/prompts/collaboration-workflow.md +22 -28
- package/prompts/sonar-hotspot-handling.md +1 -1
- package/scripts/adopt/adopt-logic.ts +2 -2
- package/scripts/adopt/adopt-toolkits.ts +3 -1
- package/scripts/adopt/adopt.ts +2 -2
- package/scripts/agent/agent-event.ts +2 -9
- package/scripts/agent/agent-exit-record.ts +2 -9
- package/scripts/auto-ok/auto-ok-cli.ts +9 -9
- package/scripts/backlog/backlog-budget-cli.ts +2 -6
- package/scripts/backlog/backlog-drive-cli.ts +20 -10
- package/scripts/backlog/backlog-drive.ts +50 -16
- package/scripts/backlog/backlog-next.ts +24 -8
- package/scripts/backlog/backlog-offer-cli.ts +6 -5
- package/scripts/backlog/backlog-plan-cli.ts +5 -1
- package/scripts/backlog/backlog-plan.ts +1 -1
- package/scripts/backlog/backlog-pool.ts +31 -11
- package/scripts/backlog/backlog-rank.ts +106 -0
- package/scripts/backlog/backlog-waves.ts +42 -29
- package/scripts/build/build-bin.ts +2 -1
- package/scripts/build/build-config-merge.ts +2 -1
- package/scripts/build/build-hooks.ts +31 -6
- package/scripts/build/build-managed-marker.ts +2 -1
- package/scripts/build/build-self-sync-guard.ts +2 -1
- package/scripts/build/build-version.ts +2 -1
- package/scripts/cases/cases-logic.ts +2 -6
- package/scripts/ci/pr-classification.ts +13 -11
- package/scripts/cost-runtime/cost-transcript.ts +4 -11
- package/scripts/delegation/delegation-policy.ts +11 -0
- package/scripts/doctor/doctor-consumer.ts +5 -12
- package/scripts/doctor/doctor-ports.ts +2 -2
- package/scripts/document/document-byte-budget.ts +13 -21
- package/scripts/document/document-section.ts +2 -6
- package/scripts/document/entry-read-budget.ts +6 -5
- package/scripts/{git/git-epic-add-body.ts → epic/epic-add-body.ts} +23 -23
- package/scripts/{git/git-epic-add-plan.ts → epic/epic-add-plan.ts} +23 -26
- package/scripts/{git/git-epic-add.ts → epic/epic-add.ts} +17 -17
- package/scripts/epic/epic-audit-cli.ts +4 -4
- package/scripts/epic/epic-audit-orphans.ts +2 -2
- package/scripts/epic/epic-audit-rationale.ts +1 -1
- package/scripts/epic/epic-audit.ts +1 -1
- package/scripts/{git/git-epic-body.ts → epic/epic-body.ts} +6 -6
- package/scripts/epic/epic-bundle-cli.ts +1 -1
- package/scripts/epic/epic-bundle.ts +2 -2
- package/scripts/epic/epic-candidate-confirm.ts +2 -1
- package/scripts/{git/git-epic-chains.ts → epic/epic-chains.ts} +4 -4
- package/{scripts-ai → scripts/epic}/epic-check.ts +5 -4
- package/{scripts-ai → scripts/epic}/epic-cli.ts +4 -4
- package/scripts/{git/git-epic-close-comment.ts → epic/epic-close-comment.ts} +9 -9
- package/scripts/{git/git-epic-close.ts → epic/epic-close.ts} +23 -19
- package/scripts/epic/epic-cross-repo.ts +21 -38
- package/scripts/{git/git-epic-decision.ts → epic/epic-decision.ts} +12 -14
- package/scripts/epic/epic-fetch.ts +3 -3
- package/scripts/epic/epic-graph.ts +3 -3
- package/scripts/epic/epic-index.ts +2 -2
- package/scripts/epic/epic-issue.ts +1 -1
- package/scripts/epic/epic-lane-offer.ts +11 -22
- package/scripts/epic/epic-next.ts +3 -3
- package/scripts/{git/git-epic-parse.ts → epic/epic-parse.ts} +3 -3
- package/scripts/{git/git-epic-promote.ts → epic/epic-promote.ts} +10 -10
- package/scripts/epic/epic-rank.ts +37 -0
- package/scripts/{git/git-epic-read.ts → epic/epic-read.ts} +9 -9
- package/scripts/{git/git-epic-reconcile.ts → epic/epic-reconcile.ts} +18 -20
- package/scripts/{git/git-epic-reference.ts → epic/epic-reference.ts} +4 -23
- package/scripts/epic/epic-relation-recheck.ts +4 -3
- package/scripts/{git/git-epic-relations.ts → epic/epic-relations.ts} +5 -5
- package/scripts/{git/git-epic-remove-plan.ts → epic/epic-remove-plan.ts} +17 -19
- package/scripts/{git/git-epic-remove.ts → epic/epic-remove.ts} +13 -13
- package/scripts/{git/git-epic-run.ts → epic/epic-run.ts} +27 -27
- package/scripts/{git/git-epic-sections.ts → epic/epic-sections.ts} +6 -6
- package/scripts/{git/git-epic-shape.ts → epic/epic-shape.ts} +7 -7
- package/scripts/epic/epic-solo.ts +29 -28
- package/scripts/{git/git-epic-validate.ts → epic/epic-validate.ts} +13 -13
- package/{scripts-ai → scripts/epic}/epic.ts +17 -16
- package/scripts/gh/fix-gh-packages.ts +2 -1
- package/scripts/gh/gh-spawn.ts +12 -10
- package/scripts/git/constants.ts +1 -1
- package/scripts/git/git-branch.ts +10 -1
- package/scripts/git/git-command.ts +2 -2
- package/scripts/git/git-error.ts +2 -5
- package/scripts/git/git-execa-error.ts +6 -1
- package/{scripts-ai → scripts/git}/git-followup-finish.ts +7 -7
- package/scripts/git/git-followup-flush.ts +74 -48
- package/scripts/git/git-followup-issue-close.ts +2 -2
- package/scripts/git/git-followup-label.ts +1 -1
- package/scripts/git/git-followup-pending.ts +1 -1
- package/{scripts-ai → scripts/git}/git-followup-workflow.ts +23 -11
- package/scripts/git/git-gh-exec.ts +85 -26
- package/scripts/git/git-gh-issue-read.ts +2 -2
- package/scripts/git/git-gh-issue-rest.ts +2 -2
- package/scripts/git/git-gh-issue-write.ts +6 -6
- package/scripts/git/git-gh-pr-read.ts +0 -21
- package/scripts/git/git-gh-pr.ts +2 -23
- package/scripts/git/git-next-issues.ts +34 -5
- package/scripts/git/git-pr-followup-wrapup.ts +2 -6
- package/scripts/git/git-preflight.ts +25 -10
- package/scripts/git/git-push-transport.ts +12 -69
- package/scripts/git/git-spawn.ts +79 -3
- package/scripts/git/git-ssh-keepalive.ts +74 -0
- package/scripts/git/git-staging.ts +21 -9
- package/{scripts-ai → scripts/git}/git-workflow.ts +11 -11
- package/scripts/git/github-issue-url.ts +1 -1
- package/scripts/git/gone-branch.ts +3 -2
- package/scripts/git/issue-labels.ts +13 -1
- package/scripts/git/issue-rank.ts +89 -0
- package/scripts/git/issue-reference.ts +19 -0
- package/scripts/git/main-merge.ts +2 -1
- package/scripts/git/main-sync.ts +3 -2
- package/scripts/git/schemas.ts +1 -1
- package/scripts/git/stash-pop-args.ts +7 -13
- package/scripts/git/stash-pop-cli.ts +2 -1
- package/{scripts-ai → scripts/git}/telegram-test-logic.ts +2 -2
- package/{scripts-ai → scripts/git}/telegram-test.ts +7 -7
- package/scripts/hooks/format-edited-cli.ts +15 -0
- package/scripts/hooks/format-edited-file.ts +2 -9
- package/scripts/hooks/format-rewrite-notice.ts +2 -8
- package/scripts/hooks/pretool-guard-cli.ts +21 -0
- package/scripts/hooks/pretool-guard.ts +14 -15
- package/scripts/init/init-ai-copy.ts +2 -5
- package/scripts/init/init.ts +8 -4
- package/scripts/init/start-exec.ts +7 -1
- package/scripts/init/start-plan.ts +18 -5
- package/scripts/init/start-setup-pr.ts +46 -19
- package/scripts/init/start-steps.ts +43 -10
- package/scripts/init/start.ts +42 -11
- package/scripts/issue/issue-cite.ts +19 -1
- package/scripts/issue/issue-comment-cli.ts +2 -1
- package/scripts/issue/issue-file-cli.ts +2 -1
- package/scripts/issue/issue-fold-cli.ts +9 -16
- package/scripts/issue/issue-scout-cli.ts +8 -13
- package/scripts/issue/measure-rerun-cli.ts +7 -6
- package/scripts/josh/josh-command-map.ts +0 -102
- package/scripts/josh/josh-commands-ai.ts +2 -2
- package/scripts/josh/josh-commands-backlog.ts +1 -1
- package/scripts/josh/josh-commands-development.ts +3 -3
- package/scripts/josh/josh-commands-project.ts +1 -1
- package/scripts/josh/josh-commands-workflow.ts +4 -4
- package/scripts/lane/lane-child-marker.ts +16 -2
- package/scripts/lane/lane-cli.ts +34 -15
- package/scripts/lane/lane-open.ts +3 -2
- package/scripts/lane/lane-registry.ts +3 -6
- package/scripts/lane/lane-report.ts +10 -4
- package/scripts/lib/cli-flags.ts +20 -2
- package/scripts/lib/error-message.ts +9 -0
- package/scripts/lib/read-file.ts +26 -2
- package/scripts/observations/observation-ledger-home.ts +98 -26
- package/scripts/observations/observation-ledger-migrate.ts +26 -21
- package/scripts/observations/observation-ledger-prepare.ts +10 -20
- package/scripts/observations/observation-ledger.ts +58 -25
- package/scripts/observations/observations-flush-cli.ts +6 -23
- package/scripts/observations/observations-flush-landing.ts +2 -1
- package/scripts/observations/observations-flush.ts +29 -20
- package/scripts/package/package-scout-cli.ts +8 -16
- package/scripts/ports/port-command.ts +2 -1
- package/scripts/propagate/propagate-plan.ts +185 -0
- package/scripts/propagate/propagate-publish.ts +6 -7
- package/scripts/propagate/propagate-run.ts +5 -1
- package/scripts/propagate/propagate-steps.ts +18 -2
- package/scripts/propagate/propagate-targets.ts +13 -2
- package/scripts/propagate/propagate.ts +63 -44
- package/scripts/refactor/import-graph.ts +2 -6
- package/scripts/registry-migration/migrate-logic.ts +1 -0
- package/scripts/registry-migration/migrate.ts +3 -2
- package/scripts/registry-migration/user-npmrc.ts +2 -2
- package/scripts/release/github-release.ts +1 -1
- package/scripts/release/release-cli.ts +2 -1
- package/scripts/repo/repo-setting.ts +10 -8
- package/scripts/review/review-attest.ts +44 -0
- package/scripts/review/review-brief-cli.ts +49 -2
- package/scripts/review/review-brief.ts +46 -1
- package/scripts/review/review-finding-ledger.ts +3 -3
- package/scripts/review/review-findings-cli.ts +4 -11
- package/scripts/review/review-record-cli.ts +14 -11
- package/scripts/review/review-record.ts +6 -16
- package/scripts/review/review-stamps.ts +7 -0
- package/scripts/rules/decision-oracle.ts +2 -2
- package/scripts/rules/implementation-cut.ts +1 -1
- package/scripts/rules/issue-fold.ts +1 -2
- package/scripts/rules/lane-carry-conflict.ts +1 -2
- package/scripts/rules/lane-park.ts +1 -2
- package/scripts/rules/pre-gate-cut.ts +2 -2
- package/scripts/rules/rule-body-guard.ts +2 -2
- package/scripts/rules/rule-value-cache.ts +99 -0
- package/scripts/rules/rule-value-cli.ts +10 -9
- package/scripts/rules/rule-value.ts +1 -1
- package/scripts/run/run-carry-args.ts +2 -6
- package/scripts/run/run-carry-cli.ts +5 -7
- package/scripts/run/run-cut-args.ts +7 -13
- package/scripts/run/run-ending-cli.ts +4 -7
- package/scripts/run/run-event-stream.ts +2 -5
- package/scripts/run/run-headless.ts +22 -6
- package/scripts/run/run-liveness-cli.ts +4 -7
- package/scripts/run/run-parent-cut-hook.ts +144 -0
- package/scripts/run/run-progress-args.ts +2 -6
- package/scripts/run/run-progress-cli.ts +2 -1
- package/scripts/run/run-progress-read.ts +2 -1
- package/scripts/run/run-progress.ts +21 -8
- package/scripts/run/run-ship-cli.ts +6 -74
- package/scripts/run/run-ship-preflight.ts +87 -0
- package/scripts/run/run-ship-review-steps.ts +5 -26
- package/scripts/run/run-ship-review.ts +9 -0
- package/scripts/run/run-ship-scoped.ts +44 -0
- package/scripts/run/run-ship-stage.ts +5 -1
- package/scripts/run/run-ship-steps.ts +105 -0
- package/scripts/run/run-ship.ts +2 -0
- package/scripts/run/run-tail-cli.ts +3 -3
- package/scripts/run/run-tidy-stashes.ts +7 -14
- package/scripts/run/run-wake-cli.ts +4 -8
- package/scripts/run/run-wake-describe.ts +19 -1
- package/scripts/run/run-wake-driver.ts +15 -2
- package/scripts/run/run-wake-session.ts +14 -4
- package/scripts/run/run-watcher-hook.ts +1 -1
- package/scripts/safe-chain/project-config.ts +3 -6
- package/scripts/security/security-audit-provision.ts +6 -7
- package/scripts/sonar/sonar-hotspots-cli.ts +2 -1
- package/scripts/sync/directory-copy-guard.ts +2 -1
- package/scripts/sync/sync-ai-files.ts +3 -3
- package/scripts/sync/template-source-logic.ts +3 -4
- package/scripts/test/e2e-retry-check.ts +3 -6
- package/scripts/time-runtime/time-bundle-call.ts +2 -2
- package/scripts/ui/ui-routes-cli.ts +3 -6
- package/scripts/version/bump-version.ts +2 -1
- package/scripts/version/npm-registry.ts +97 -0
- package/scripts/version/version-commands.ts +5 -4
- package/scripts/version/version-remote.ts +38 -33
- package/scripts/version/version-targets.ts +3 -3
- package/.claude/skills/workflow-commands/rule-residency.md +0 -267
- package/evals/scenarios/consult-not-execute.json +0 -20
- package/evals/scenarios/no-implicit-workflow.json +0 -26
- package/evals/scenarios/overrides-both-locations.json +0 -29
- package/evals/scenarios/upstream-interrupt.json +0 -23
- package/evals/scenarios/workflow-skill-loaded.json +0 -16
- package/prompts/agent-lint-protocol.json +0 -79
- package/prompts/agent-rules.md +0 -63
- package/prompts/collaboration-workflow/consultation-vs-execution.md +0 -8
- package/prompts/collaboration-workflow/distributed-docs.md +0 -7
- package/prompts/collaboration-workflow/durable-rules.md +0 -24
- package/prompts/collaboration-workflow/latest-first.md +0 -14
- package/prompts/collaboration-workflow/no-clones.md +0 -11
- package/prompts/collaboration-workflow/simplicity-first.md +0 -9
- package/prompts/collaboration-workflow/single-source-rules.md +0 -13
- package/scripts/build/shim-shell.ts +0 -25
- package/scripts/claude/skill-meta.ts +0 -37
- package/scripts/document/document-scan.ts +0 -108
- package/scripts/document/generate-catalog.ts +0 -69
- package/scripts/document/retired-phrases.ts +0 -143
- package/scripts/document/review-agent-type.ts +0 -46
- package/scripts/document/single-source.ts +0 -73
- package/scripts/git/git-fixture-workspace.ts +0 -88
- package/scripts/hooks/format-edited-file-fixtures.ts +0 -109
- package/scripts/hooks/prompt-hooks.ts +0 -38
- package/scripts/init/hook-command-bootstrap.ts +0 -83
- package/scripts/issue/issue-logic.ts +0 -50
- package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +0 -1227
- package/scripts/josh/josh-script-reader.ts +0 -11
- package/scripts/package/production-dependency-graph.ts +0 -68
- package/scripts/retrospective/retrospective-cli.ts +0 -97
- package/scripts/retrospective/retrospective.ts +0 -127
- package/scripts/rules/delivered-rules-harness.ts +0 -72
- package/scripts/rules/top-level-scripts-guard.ts +0 -47
- package/scripts/run/run-carry-flush.ts +0 -58
- package/scripts/run/run-transcript.golden.txt +0 -57
- package/scripts/run/run-wake-work.ts +0 -108
- package/scripts/sync/dependabot-pin-logic.ts +0 -135
- package/scripts/test/classify-isolation.ts +0 -149
- package/scripts/test/http-fault-injection.ts +0 -79
- package/scripts/test/josh-harness-environment.ts +0 -260
- package/scripts/test/josh-harness.ts +0 -96
- package/scripts/test/pilot-files.ts +0 -452
- package/scripts/test/pilot-measure.ts +0 -78
- package/scripts/test/test-network-guard.ts +0 -453
- package/scripts/test/test-repository-guard.ts +0 -317
- package/scripts/test/test-state-guard.ts +0 -85
- package/scripts/test/test-stdout-guard.ts +0 -54
- package/scripts/test/test-telegram-guard.ts +0 -90
- package/scripts/test/unit-guard-environment.ts +0 -12
- package/scripts/test/unit-projects.ts +0 -139
- package/scripts/test/vitest-include-globs.ts +0 -12
- package/scripts/time-runtime/time-batch-guard-fixtures.ts +0 -66
- package/scripts-ai/completion-gate.ts +0 -13
- package/scripts-ai/environment-loader.ts +0 -9
- /package/{scripts-ai → scripts/epic}/epic-cli-argv.ts +0 -0
- /package/{scripts-ai → scripts/epic}/epic-cli-remove.ts +0 -0
- /package/{scripts-ai → scripts/git}/followup-issue-number.ts +0 -0
|
@@ -15,48 +15,6 @@ function is_record(value) {
|
|
|
15
15
|
}
|
|
16
16
|
var json_value = { parse_or_undefined, is_record };
|
|
17
17
|
|
|
18
|
-
// scripts/josh/josh-command-types.ts
|
|
19
|
-
var OPTIONAL_ENV_FILE_FLAGS = [`--env-file-if-exists=${ENV_FILE_NAME}`];
|
|
20
|
-
var GATE_COMMAND = "gate";
|
|
21
|
-
var ESLINT_CACHE_FILE = ".eslintcache";
|
|
22
|
-
var TS_BUILD_INFO_FILE = ".tsbuildinfo";
|
|
23
|
-
var CSPELL_CACHE_FILE = ".cspellcache";
|
|
24
|
-
var ESLINT_EDIT_CACHE_FILE = ".eslintcache.edit";
|
|
25
|
-
var ESLINT_RELATED_CACHE_FILE = ".eslintcache.related";
|
|
26
|
-
var ROOTED_JSON_PORTABILITY = "rooted-json";
|
|
27
|
-
var ESLINT_CACHE_SPEC = {
|
|
28
|
-
cache_file: ESLINT_CACHE_FILE,
|
|
29
|
-
portability: ROOTED_JSON_PORTABILITY
|
|
30
|
-
};
|
|
31
|
-
var TS_CACHE_SPEC = {
|
|
32
|
-
cache_file: TS_BUILD_INFO_FILE,
|
|
33
|
-
portability: "raw"
|
|
34
|
-
};
|
|
35
|
-
var CSPELL_CACHE_SPEC = {
|
|
36
|
-
cache_file: CSPELL_CACHE_FILE,
|
|
37
|
-
portability: "raw"
|
|
38
|
-
};
|
|
39
|
-
var GATE_CACHE_SPECS = [
|
|
40
|
-
ESLINT_CACHE_SPEC,
|
|
41
|
-
TS_CACHE_SPEC,
|
|
42
|
-
CSPELL_CACHE_SPEC
|
|
43
|
-
];
|
|
44
|
-
var GATE_CACHE_FILES = GATE_CACHE_SPECS.map((spec) => spec.cache_file);
|
|
45
|
-
var IGNORED_CACHE_FILES = [
|
|
46
|
-
...GATE_CACHE_FILES,
|
|
47
|
-
ESLINT_EDIT_CACHE_FILE,
|
|
48
|
-
ESLINT_RELATED_CACHE_FILE
|
|
49
|
-
];
|
|
50
|
-
var CONTENT_CACHE_FLAGS = ["--cache", "--cache-strategy", "content"];
|
|
51
|
-
var CACHE_LOCATION_FLAG = "--cache-location";
|
|
52
|
-
function content_cache_flags(cache_file) {
|
|
53
|
-
return [...CONTENT_CACHE_FLAGS, CACHE_LOCATION_FLAG, cache_file];
|
|
54
|
-
}
|
|
55
|
-
var ESLINT_CACHE_FLAGS = content_cache_flags(ESLINT_CACHE_FILE);
|
|
56
|
-
var ESLINT_EDIT_CACHE_FLAGS = content_cache_flags(ESLINT_EDIT_CACHE_FILE);
|
|
57
|
-
var ESLINT_RELATED_CACHE_FLAGS = content_cache_flags(ESLINT_RELATED_CACHE_FILE);
|
|
58
|
-
var CSPELL_CACHE_FLAGS = content_cache_flags(CSPELL_CACHE_FILE);
|
|
59
|
-
|
|
60
18
|
// scripts/cost-runtime/cost-blocks.ts
|
|
61
19
|
import { z } from "zod";
|
|
62
20
|
var CONTENT_ITEM_SCHEMA = z.object({ text: z.string().nullish() });
|
|
@@ -136,14 +94,56 @@ var cost_blocks = {
|
|
|
136
94
|
var GATE_PHASE = "gate";
|
|
137
95
|
var PR_PHASE = "pr";
|
|
138
96
|
var MERGE_PHASE = "merge";
|
|
139
|
-
var
|
|
97
|
+
var GATE_COMMAND = "josh gate";
|
|
140
98
|
var COMMAND_PHASES = /* @__PURE__ */ new Map([
|
|
141
|
-
[
|
|
99
|
+
[GATE_COMMAND, GATE_PHASE],
|
|
142
100
|
["josh git", PR_PHASE],
|
|
143
101
|
["josh pr", PR_PHASE],
|
|
144
102
|
["josh followup", MERGE_PHASE]
|
|
145
103
|
]);
|
|
146
104
|
|
|
105
|
+
// scripts/josh/josh-command-types.ts
|
|
106
|
+
var OPTIONAL_ENV_FILE_FLAGS = [`--env-file-if-exists=${ENV_FILE_NAME}`];
|
|
107
|
+
var GATE_COMMAND2 = "gate";
|
|
108
|
+
var ESLINT_CACHE_FILE = ".eslintcache";
|
|
109
|
+
var TS_BUILD_INFO_FILE = ".tsbuildinfo";
|
|
110
|
+
var CSPELL_CACHE_FILE = ".cspellcache";
|
|
111
|
+
var ESLINT_EDIT_CACHE_FILE = ".eslintcache.edit";
|
|
112
|
+
var ESLINT_RELATED_CACHE_FILE = ".eslintcache.related";
|
|
113
|
+
var ROOTED_JSON_PORTABILITY = "rooted-json";
|
|
114
|
+
var ESLINT_CACHE_SPEC = {
|
|
115
|
+
cache_file: ESLINT_CACHE_FILE,
|
|
116
|
+
portability: ROOTED_JSON_PORTABILITY
|
|
117
|
+
};
|
|
118
|
+
var TS_CACHE_SPEC = {
|
|
119
|
+
cache_file: TS_BUILD_INFO_FILE,
|
|
120
|
+
portability: "raw"
|
|
121
|
+
};
|
|
122
|
+
var CSPELL_CACHE_SPEC = {
|
|
123
|
+
cache_file: CSPELL_CACHE_FILE,
|
|
124
|
+
portability: "raw"
|
|
125
|
+
};
|
|
126
|
+
var GATE_CACHE_SPECS = [
|
|
127
|
+
ESLINT_CACHE_SPEC,
|
|
128
|
+
TS_CACHE_SPEC,
|
|
129
|
+
CSPELL_CACHE_SPEC
|
|
130
|
+
];
|
|
131
|
+
var GATE_CACHE_FILES = GATE_CACHE_SPECS.map((spec) => spec.cache_file);
|
|
132
|
+
var IGNORED_CACHE_FILES = [
|
|
133
|
+
...GATE_CACHE_FILES,
|
|
134
|
+
ESLINT_EDIT_CACHE_FILE,
|
|
135
|
+
ESLINT_RELATED_CACHE_FILE
|
|
136
|
+
];
|
|
137
|
+
var CONTENT_CACHE_FLAGS = ["--cache", "--cache-strategy", "content"];
|
|
138
|
+
var CACHE_LOCATION_FLAG = "--cache-location";
|
|
139
|
+
function content_cache_flags(cache_file) {
|
|
140
|
+
return [...CONTENT_CACHE_FLAGS, CACHE_LOCATION_FLAG, cache_file];
|
|
141
|
+
}
|
|
142
|
+
var ESLINT_CACHE_FLAGS = content_cache_flags(ESLINT_CACHE_FILE);
|
|
143
|
+
var ESLINT_EDIT_CACHE_FLAGS = content_cache_flags(ESLINT_EDIT_CACHE_FILE);
|
|
144
|
+
var ESLINT_RELATED_CACHE_FLAGS = content_cache_flags(ESLINT_RELATED_CACHE_FILE);
|
|
145
|
+
var CSPELL_CACHE_FLAGS = content_cache_flags(CSPELL_CACHE_FILE);
|
|
146
|
+
|
|
147
147
|
// scripts/josh/josh-commands-backlog.ts
|
|
148
148
|
var BACKLOG_COMMANDS = {
|
|
149
149
|
"backlog:next": {
|
|
@@ -156,7 +156,7 @@ var BACKLOG_COMMANDS = {
|
|
|
156
156
|
script: "scripts/backlog/backlog-offer-cli.ts",
|
|
157
157
|
description: "Collapse a backlogrun loop-head event into one call: read backlog:next, ask backlog:budget, return the verdict and any issues to start",
|
|
158
158
|
category: "AI tools",
|
|
159
|
-
reference: ["[options]", "automation", ["network"]]
|
|
159
|
+
reference: ["[options]", "automation", ["files", "network", "processes"]]
|
|
160
160
|
},
|
|
161
161
|
"backlog:drive": {
|
|
162
162
|
script: "scripts/backlog/backlog-drive-cli.ts",
|
|
@@ -393,7 +393,7 @@ var AI_COMMANDS = {
|
|
|
393
393
|
reference: ["<message>", "automation", ["git"]]
|
|
394
394
|
},
|
|
395
395
|
epic: {
|
|
396
|
-
script: "scripts
|
|
396
|
+
script: "scripts/epic/epic.ts",
|
|
397
397
|
description: "Create an epic issue from its child issue numbers",
|
|
398
398
|
category: "AI tools",
|
|
399
399
|
reference: ["<title> <issue...> [--ordered]", "automation", ["network"]]
|
|
@@ -417,7 +417,7 @@ var AI_COMMANDS = {
|
|
|
417
417
|
reference: ["<epic>", "automation", ["network"]]
|
|
418
418
|
},
|
|
419
419
|
"epic:check": {
|
|
420
|
-
script: "scripts
|
|
420
|
+
script: "scripts/epic/epic-check.ts",
|
|
421
421
|
description: "Check an epic issue against the tracking requirements",
|
|
422
422
|
category: "AI tools",
|
|
423
423
|
reference: ["<epic>", "automation", ["network"]]
|
|
@@ -704,7 +704,7 @@ var DEV_COMMANDS = {
|
|
|
704
704
|
category: "Development",
|
|
705
705
|
reference: ["", "automation", ["none"]]
|
|
706
706
|
},
|
|
707
|
-
[
|
|
707
|
+
[GATE_COMMAND2]: {
|
|
708
708
|
script: "scripts/gate/verification-gate.ts",
|
|
709
709
|
description: "Run lint, type check, spell check and unit tests concurrently",
|
|
710
710
|
category: "Development",
|
|
@@ -744,7 +744,7 @@ var DEV_COMMANDS = {
|
|
|
744
744
|
script: "scripts/rules/rule-value-cli.ts",
|
|
745
745
|
description: "Print each delivered rule's unaided compliance \u2014 runs reached, kept rate, refusals",
|
|
746
746
|
category: "AI tools",
|
|
747
|
-
reference: ["", "developer", ["
|
|
747
|
+
reference: ["[--refresh]", "developer", ["files"]]
|
|
748
748
|
},
|
|
749
749
|
format: {
|
|
750
750
|
script: "scripts/lint/format.ts",
|
|
@@ -753,7 +753,7 @@ var DEV_COMMANDS = {
|
|
|
753
753
|
reference: ["", "developer", ["files", "processes"]]
|
|
754
754
|
},
|
|
755
755
|
"format:edited": {
|
|
756
|
-
script: "scripts/hooks/format-edited-
|
|
756
|
+
script: "scripts/hooks/format-edited-cli.ts",
|
|
757
757
|
description: "Claude Code hook: format the file just edited (reads the tool call on stdin)",
|
|
758
758
|
category: "Development",
|
|
759
759
|
reference: ["", "automation", ["files", "processes"]]
|
|
@@ -771,7 +771,7 @@ var DEV_COMMANDS = {
|
|
|
771
771
|
// node's own `--env-file` parser with node's own precedence.
|
|
772
772
|
},
|
|
773
773
|
"pretool:guard": {
|
|
774
|
-
script: "scripts/hooks/pretool-guard.ts",
|
|
774
|
+
script: "scripts/hooks/pretool-guard-cli.ts",
|
|
775
775
|
description: "Claude Code hook: the batch, investigation and rule guards in one process (reads the tool call on stdin)",
|
|
776
776
|
category: "Development",
|
|
777
777
|
reference: ["", "automation", ["none"]]
|
|
@@ -1029,7 +1029,7 @@ var PROJECT_COMMANDS = {
|
|
|
1029
1029
|
description: "Set a project up for the GitHub Issue workflow, from git init to the setup PR",
|
|
1030
1030
|
category: "Project",
|
|
1031
1031
|
reference: [
|
|
1032
|
-
`${PROFILE_ARGUMENTS} [--yes] [--github] [--public]`,
|
|
1032
|
+
`${PROFILE_ARGUMENTS} [--yes] [--github] [--public] [--init-command <command>]`,
|
|
1033
1033
|
"developer",
|
|
1034
1034
|
["files", "git", "network", "processes"]
|
|
1035
1035
|
]
|
|
@@ -1137,7 +1137,7 @@ var VERSIONING_COMMANDS = {
|
|
|
1137
1137
|
};
|
|
1138
1138
|
|
|
1139
1139
|
// scripts/josh/josh-commands-workflow.ts
|
|
1140
|
-
var GIT_WORKFLOW_SCRIPT = "scripts
|
|
1140
|
+
var GIT_WORKFLOW_SCRIPT = "scripts/git/git-workflow.ts";
|
|
1141
1141
|
var GIT_MESSAGE_ARGUMENTS = "[-y] <message>";
|
|
1142
1142
|
var WORKFLOW_COMMANDS = {
|
|
1143
1143
|
git: {
|
|
@@ -1162,7 +1162,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
1162
1162
|
// session, and `followup` with them the merge step of every `fullrun` there. `doctor` was moved to
|
|
1163
1163
|
// this form for the same reason in joshuafolkken/kit#869.
|
|
1164
1164
|
//
|
|
1165
|
-
// Nothing is lost by relaxing it: both scripts already
|
|
1165
|
+
// Nothing is lost by relaxing it: both scripts already load `.env` through `josh_environment_file`
|
|
1166
1166
|
// themselves, so the file is read either way and node's precedence — an existing environment
|
|
1167
1167
|
// variable wins over the file — is node's own in both spellings.
|
|
1168
1168
|
//
|
|
@@ -1170,7 +1170,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
1170
1170
|
// than dropped: `telegram_notify.send` now throws on missing credentials and on a failed send, so
|
|
1171
1171
|
// `josh notify` exits non-zero instead of warning and answering 0.
|
|
1172
1172
|
followup: {
|
|
1173
|
-
script: "scripts
|
|
1173
|
+
script: "scripts/git/git-followup-workflow.ts",
|
|
1174
1174
|
description: "Follow-up git workflow",
|
|
1175
1175
|
category: "Workflow",
|
|
1176
1176
|
reference: [
|
|
@@ -1181,7 +1181,7 @@ var WORKFLOW_COMMANDS = {
|
|
|
1181
1181
|
tsx_arguments: OPTIONAL_ENV_FILE_FLAGS
|
|
1182
1182
|
},
|
|
1183
1183
|
notify: {
|
|
1184
|
-
script: "scripts
|
|
1184
|
+
script: "scripts/git/telegram-test.ts",
|
|
1185
1185
|
description: "Send Telegram notification",
|
|
1186
1186
|
category: "Workflow",
|
|
1187
1187
|
reference: ["--task-type <type> --body <text>", "automation", ["notifications"]],
|
|
@@ -1265,8 +1265,6 @@ var ALIASES = {
|
|
|
1265
1265
|
ln: "lines",
|
|
1266
1266
|
by: "bytes",
|
|
1267
1267
|
f: "format",
|
|
1268
|
-
fd: "format:edited",
|
|
1269
|
-
bg: "batch:guard",
|
|
1270
1268
|
sd: "cspell:dot",
|
|
1271
1269
|
bh: "behavior",
|
|
1272
1270
|
t: "test",
|
|
@@ -1275,8 +1273,6 @@ var ALIASES = {
|
|
|
1275
1273
|
td: "test:declared",
|
|
1276
1274
|
trd: "test:red",
|
|
1277
1275
|
te: "test:e2e",
|
|
1278
|
-
er: "e2e:retry-check",
|
|
1279
|
-
sl: "session:lang",
|
|
1280
1276
|
c: "check",
|
|
1281
1277
|
pt: "port",
|
|
1282
1278
|
i: "init",
|
|
@@ -1284,19 +1280,12 @@ var ALIASES = {
|
|
|
1284
1280
|
st: "start",
|
|
1285
1281
|
sy: "sync",
|
|
1286
1282
|
rmi: "registry:migrate",
|
|
1287
|
-
sys: "sync:scope",
|
|
1288
1283
|
g: "git",
|
|
1289
1284
|
gp: "pr",
|
|
1290
|
-
prc: "pr:classification",
|
|
1291
|
-
fu: "followup",
|
|
1292
|
-
nf: "notify",
|
|
1293
|
-
obf: "observations:flush",
|
|
1294
|
-
mrr: "measure:rerun",
|
|
1295
1285
|
ms: "main:sync",
|
|
1296
1286
|
mm: "main:merge",
|
|
1297
1287
|
bp: "bump",
|
|
1298
1288
|
re: "release",
|
|
1299
|
-
res: "release:scope",
|
|
1300
1289
|
v: "version",
|
|
1301
1290
|
r: "ranges",
|
|
1302
1291
|
dr: "doctor",
|
|
@@ -1304,107 +1293,16 @@ var ALIASES = {
|
|
|
1304
1293
|
ad: "adopt",
|
|
1305
1294
|
ov: "overrides",
|
|
1306
1295
|
a: "audit",
|
|
1307
|
-
ap: "audit:provision",
|
|
1308
1296
|
rt: "reconcile-templates",
|
|
1309
1297
|
u: "latest",
|
|
1310
|
-
lg: "latest:guard",
|
|
1311
1298
|
lc: "latest:corepack",
|
|
1312
1299
|
lu: "latest:update",
|
|
1313
|
-
ls: "latest:scope",
|
|
1314
|
-
pm: "prevent-main-commit",
|
|
1315
|
-
cm: "check-commit-message",
|
|
1316
|
-
ss: "secretlint-scan",
|
|
1317
|
-
ppu: "pre-push-unit",
|
|
1318
|
-
rer: "reserved-run",
|
|
1319
|
-
ptc: "pre-commit-type-check",
|
|
1320
|
-
ird: "issue:read",
|
|
1321
|
-
ist: "issue:state",
|
|
1322
|
-
isc: "issue:scout",
|
|
1323
|
-
ifl: "issue:file",
|
|
1324
|
-
isf: "issue:fold",
|
|
1325
|
-
isfe: "issue:fold-existing",
|
|
1326
|
-
dfr: "defect:rate",
|
|
1327
|
-
ici: "issue:cite",
|
|
1328
|
-
icm: "issue:comment",
|
|
1329
|
-
pks: "pkg:scout",
|
|
1330
|
-
iln: "issue:lint",
|
|
1331
|
-
ibl: "issue:backlinks",
|
|
1332
|
-
rl: "report:lint",
|
|
1333
|
-
ep: "epic",
|
|
1334
|
-
ec: "epic:check",
|
|
1335
|
-
en: "epic:next",
|
|
1336
|
-
ea: "epic:audit",
|
|
1337
|
-
eb: "epic:bundle",
|
|
1338
|
-
ao: "auto-ok:next",
|
|
1339
|
-
bl: "backlog:next",
|
|
1340
|
-
blo: "backlog:offer",
|
|
1341
|
-
bld: "backlog:drive",
|
|
1342
|
-
blp: "backlog:plan",
|
|
1343
|
-
bls: "backlog:stalled",
|
|
1344
|
-
bb: "backlog:budget",
|
|
1345
|
-
co: "cost",
|
|
1346
|
-
ds: "doc:section",
|
|
1347
|
-
rs: "read:set",
|
|
1348
|
-
dcr: "doc:read",
|
|
1349
|
-
rf: "read:files",
|
|
1350
|
-
ef: "edit:files",
|
|
1351
|
-
rfs: "refactor:scan",
|
|
1352
1300
|
tm: "time",
|
|
1353
1301
|
tmd: "time:density",
|
|
1354
1302
|
rtr: "retrospective",
|
|
1355
|
-
rb: "review:brief",
|
|
1356
|
-
r2: "review:round2",
|
|
1357
|
-
ra: "review:attest",
|
|
1358
|
-
rvr: "review:record",
|
|
1359
1303
|
rvf: "review:findings",
|
|
1360
|
-
dp: "disposition",
|
|
1361
|
-
dg: "delegate",
|
|
1362
|
-
fo: "fanout",
|
|
1363
|
-
rh: "run:hold",
|
|
1364
|
-
rr: "run:release",
|
|
1365
|
-
rc: "run:carry",
|
|
1366
|
-
rtd: "run:tidy",
|
|
1367
|
-
rw: "run:wake",
|
|
1368
|
-
rct: "run:cut",
|
|
1369
|
-
rv: "run:liveness",
|
|
1370
|
-
red: "run:ending",
|
|
1371
|
-
rg: "run:progress",
|
|
1372
|
-
rp: "run:prep",
|
|
1373
|
-
ren: "run:entry",
|
|
1374
|
-
rtl: "run:tail",
|
|
1375
|
-
shp: "ship",
|
|
1376
|
-
rst: "run:status",
|
|
1377
|
-
rn: "run:next",
|
|
1378
|
-
rsp: "run:step",
|
|
1379
|
-
rpy: "repo:party",
|
|
1380
|
-
rmg: "run:merge",
|
|
1381
|
-
rrp: "run:report",
|
|
1382
|
-
rrv: "run:review",
|
|
1383
|
-
rev: "run:event",
|
|
1384
|
-
sp: "stash:pop",
|
|
1385
|
-
lno: "lane:open",
|
|
1386
|
-
lnc: "lane:close",
|
|
1387
|
-
lnl: "lane:list",
|
|
1388
|
-
lnp: "lane:prune",
|
|
1389
|
-
lnv: "lane:output",
|
|
1390
|
-
lnd: "lane:dispatch",
|
|
1391
|
-
lna: "lane:await",
|
|
1392
|
-
lnla: "lane:launch",
|
|
1393
|
-
rwg: "run:watcher:guard",
|
|
1394
|
-
rsd: "run:stranded",
|
|
1395
|
-
ig: "investigation:guard",
|
|
1396
|
-
drg: "duplicate-read:guard",
|
|
1397
|
-
rug: "rule:guard",
|
|
1398
1304
|
ruv: "rule:value",
|
|
1399
|
-
|
|
1400
|
-
sg: "stop:guard",
|
|
1401
|
-
ev: "eval",
|
|
1402
|
-
ol: "oracle:list",
|
|
1403
|
-
sa: "split:assess",
|
|
1404
|
-
shs: "sonar:hotspots",
|
|
1405
|
-
uir: "ui:routes",
|
|
1406
|
-
cs: "clone:scan",
|
|
1407
|
-
ca: "cases"
|
|
1305
|
+
ev: "eval"
|
|
1408
1306
|
};
|
|
1409
1307
|
function canonical_command(name) {
|
|
1410
1308
|
if (!Object.hasOwn(ALIASES, name)) return name;
|
|
@@ -2726,7 +2624,7 @@ var time_spans = {
|
|
|
2726
2624
|
import path3 from "node:path";
|
|
2727
2625
|
|
|
2728
2626
|
// scripts/cost-runtime/cost-transcript.ts
|
|
2729
|
-
import { readdirSync, readFileSync, statSync } from "node:fs";
|
|
2627
|
+
import { readdirSync, readFileSync as readFileSync2, statSync } from "node:fs";
|
|
2730
2628
|
import { homedir } from "node:os";
|
|
2731
2629
|
import path2 from "node:path";
|
|
2732
2630
|
|
|
@@ -2772,6 +2670,32 @@ var lane_paths = {
|
|
|
2772
2670
|
lane_root
|
|
2773
2671
|
};
|
|
2774
2672
|
|
|
2673
|
+
// scripts/lib/read-file.ts
|
|
2674
|
+
import { readFileSync } from "node:fs";
|
|
2675
|
+
var ABSENT_CODE = "ENOENT";
|
|
2676
|
+
function is_absent(error) {
|
|
2677
|
+
return error instanceof Error && "code" in error && error.code === ABSENT_CODE;
|
|
2678
|
+
}
|
|
2679
|
+
function read_optional(path6) {
|
|
2680
|
+
try {
|
|
2681
|
+
return readFileSync(path6, "utf8");
|
|
2682
|
+
} catch (error) {
|
|
2683
|
+
if (is_absent(error)) return void 0;
|
|
2684
|
+
throw error;
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
function read_file_or_empty(path6) {
|
|
2688
|
+
return read_optional(path6) ?? "";
|
|
2689
|
+
}
|
|
2690
|
+
function read_if_readable(path6) {
|
|
2691
|
+
try {
|
|
2692
|
+
return readFileSync(path6, "utf8");
|
|
2693
|
+
} catch {
|
|
2694
|
+
return void 0;
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
var file_reader = { read_optional, read_file_or_empty, read_if_readable };
|
|
2698
|
+
|
|
2775
2699
|
// scripts/cost-runtime/cost-usage.ts
|
|
2776
2700
|
import { z as z4 } from "zod";
|
|
2777
2701
|
var CACHE_CREATION_SCHEMA = z4.object({
|
|
@@ -2927,7 +2851,7 @@ var WORKTREE_SEGMENT = `/${GIT_ENTRY}/worktrees/`;
|
|
|
2927
2851
|
var NOT_FOUND = -1;
|
|
2928
2852
|
function linked_worktree_gitdir(cwd) {
|
|
2929
2853
|
try {
|
|
2930
|
-
const contents =
|
|
2854
|
+
const contents = readFileSync2(path2.join(cwd, GIT_ENTRY), "utf8").trim();
|
|
2931
2855
|
return contents.startsWith(GITDIR_PREFIX) ? contents.slice(GITDIR_PREFIX.length).trim() : "";
|
|
2932
2856
|
} catch {
|
|
2933
2857
|
return "";
|
|
@@ -3064,23 +2988,16 @@ function tally(content) {
|
|
|
3064
2988
|
baseline_tokens: first === void 0 ? 0 : cost_usage.billed_input(first.totals)
|
|
3065
2989
|
};
|
|
3066
2990
|
}
|
|
3067
|
-
function read_text(file_path) {
|
|
3068
|
-
try {
|
|
3069
|
-
return readFileSync(file_path, "utf8");
|
|
3070
|
-
} catch {
|
|
3071
|
-
return void 0;
|
|
3072
|
-
}
|
|
3073
|
-
}
|
|
3074
2991
|
function read_session(file) {
|
|
3075
|
-
const content =
|
|
2992
|
+
const content = file_reader.read_if_readable(file.path);
|
|
3076
2993
|
if (content === void 0) return { session_id: file.session_id, ...empty_session() };
|
|
3077
2994
|
return { session_id: file.session_id, ...tally(content) };
|
|
3078
2995
|
}
|
|
3079
2996
|
function read_raw(file) {
|
|
3080
|
-
return
|
|
2997
|
+
return file_reader.read_if_readable(file.path) ?? "";
|
|
3081
2998
|
}
|
|
3082
|
-
function
|
|
3083
|
-
return
|
|
2999
|
+
function read_optional2(file) {
|
|
3000
|
+
return file_reader.read_if_readable(file.path);
|
|
3084
3001
|
}
|
|
3085
3002
|
function directory_exists(directory) {
|
|
3086
3003
|
try {
|
|
@@ -3126,7 +3043,7 @@ var cost_transcript = {
|
|
|
3126
3043
|
tally,
|
|
3127
3044
|
read_session,
|
|
3128
3045
|
read_raw,
|
|
3129
|
-
read_optional,
|
|
3046
|
+
read_optional: read_optional2,
|
|
3130
3047
|
missing_message,
|
|
3131
3048
|
home_directory
|
|
3132
3049
|
};
|
|
@@ -3159,7 +3076,7 @@ import { closeSync, fstatSync, openSync, readSync } from "node:fs";
|
|
|
3159
3076
|
|
|
3160
3077
|
// scripts/josh/stamp-file.ts
|
|
3161
3078
|
import { createHash, randomUUID } from "node:crypto";
|
|
3162
|
-
import { lstatSync, readFileSync as
|
|
3079
|
+
import { lstatSync, readFileSync as readFileSync3, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
3163
3080
|
import path5 from "node:path";
|
|
3164
3081
|
|
|
3165
3082
|
// scripts/init/init-paths.ts
|
|
@@ -3258,7 +3175,7 @@ function is_own_regular_file(source) {
|
|
|
3258
3175
|
function read_stamp_text(source) {
|
|
3259
3176
|
try {
|
|
3260
3177
|
if (!is_own_regular_file(source)) return void 0;
|
|
3261
|
-
return
|
|
3178
|
+
return readFileSync3(source, "utf8");
|
|
3262
3179
|
} catch {
|
|
3263
3180
|
return void 0;
|
|
3264
3181
|
}
|
|
@@ -3528,6 +3445,7 @@ export {
|
|
|
3528
3445
|
time_spans,
|
|
3529
3446
|
time_round_trips,
|
|
3530
3447
|
lane_paths,
|
|
3448
|
+
file_reader,
|
|
3531
3449
|
cost_usage,
|
|
3532
3450
|
cost_transcript,
|
|
3533
3451
|
time_hook_transcript,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EJDX2TOB.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NJQOBE6L.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WQ4OSBSS.js";
|
|
10
10
|
|
|
11
11
|
// scripts/delegation/investigation-guard.ts
|
|
12
12
|
import { text } from "node:stream/consumers";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
time_batch_guard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NJQOBE6L.js";
|
|
4
4
|
import {
|
|
5
5
|
hook_decision
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WQ4OSBSS.js";
|
|
7
7
|
import {
|
|
8
8
|
cost_blocks,
|
|
9
9
|
cost_transcript,
|
|
10
10
|
time_bundle_call,
|
|
11
11
|
time_shell,
|
|
12
12
|
time_spans
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7VPDUBRN.js";
|
|
14
14
|
|
|
15
15
|
// scripts/delegation/investigation-reads.ts
|
|
16
16
|
import path from "node:path";
|
|
@@ -70,6 +70,16 @@ var DELEGATABLE_STEPS = [
|
|
|
70
70
|
// for the numeral, so the count is phrased as a plain "N or more".
|
|
71
71
|
does: `read the Issue's subject to find out how it currently works \u2014 once ${String(INVESTIGATION_FILE_THRESHOLD)} or more files the run will not edit have to be read \u2014 and return the conclusion plus the \`file:line\` citations that support it, never the file text, which would put the cost back where it was. A throwaway probe script is written, run and deleted inside the unit, which returns its output alone`,
|
|
72
72
|
verifier: "the parent opens the cited lines; a conclusion those lines do not support fails there, and reading a handful of cited regions costs far less than redoing the reading. The unit reports what the code does and never what to change \u2014 deciding that is `diagnosis`, which stays kept, so a unit returning a root cause would be delegating the rejected row under this name"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "lane-failure-investigation",
|
|
76
|
+
// The `backlogrun` parent's counterpart of `investigation` (joshuafolkken/kit#2947). The parent
|
|
77
|
+
// orchestrates and never implements, yet it read a failed lane's logs, records and sources in its
|
|
78
|
+
// own context — about 150 grep / cat / sed calls on 2026-10-02 — and every later request of the
|
|
79
|
+
// batch re-read them. The verifier is `investigation`'s, and so is the boundary: the unit reports
|
|
80
|
+
// what happened, and what the parent does about it (park, re-dispatch, file) stays its own call.
|
|
81
|
+
does: "find out why a lane's child stopped, failed or conflicted \u2014 its output log, run records, PR checks and the files they name \u2014 and return the conclusion plus the `file:line` or log-line citations that support it, never the text read, so the batch parent's context stays the size its orchestration needs",
|
|
82
|
+
verifier: "the parent opens the cited lines and re-reads the child with `pnpm josh issue:state`; a conclusion those do not support fails there. The unit reports what happened and never what to do \u2014 parking, re-dispatching or filing stays with the parent, so a wrong account is caught before it is acted on"
|
|
73
83
|
}
|
|
74
84
|
];
|
|
75
85
|
var REJECTED_STEPS = [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lane_guard_policy,
|
|
3
3
|
time_batch_guard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NJQOBE6L.js";
|
|
5
5
|
import {
|
|
6
6
|
hook_decision
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WQ4OSBSS.js";
|
|
8
8
|
|
|
9
9
|
// scripts/hooks/batch-guard.ts
|
|
10
10
|
import { text } from "node:stream/consumers";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EJDX2TOB.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NJQOBE6L.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WQ4OSBSS.js";
|
|
10
10
|
import {
|
|
11
11
|
json_value,
|
|
12
12
|
time_spans
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7VPDUBRN.js";
|
|
14
14
|
|
|
15
15
|
// scripts/delegation/duplicate-read-guard.ts
|
|
16
16
|
import { statSync } from "node:fs";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-3V37IID6.js";
|
|
5
5
|
import {
|
|
6
6
|
ESLINT_EDIT_CACHE_FLAGS,
|
|
7
|
+
file_reader,
|
|
7
8
|
time_density_hook
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7VPDUBRN.js";
|
|
9
10
|
|
|
10
11
|
// scripts/hooks/format-edited-file.ts
|
|
11
12
|
import { existsSync as existsSync2 } from "node:fs";
|
|
12
13
|
import path2 from "node:path";
|
|
13
|
-
import { text } from "node:stream/consumers";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
import { execa as execa2 } from "execa";
|
|
16
16
|
import { z } from "zod";
|
|
@@ -87,7 +87,6 @@ async function spelling_diagnostics(file_path, project_root, runner = run_cspell
|
|
|
87
87
|
var edited_cspell = { format_unknown_words, is_checkable, spelling_diagnostics };
|
|
88
88
|
|
|
89
89
|
// scripts/hooks/format-rewrite-notice.ts
|
|
90
|
-
import { readFileSync } from "node:fs";
|
|
91
90
|
var MAX_REWRITE_CHARS = 1200;
|
|
92
91
|
var REWRITE_TRUNCATION_NOTICE = "\n\u2026(rewrite preview truncated)";
|
|
93
92
|
var REWRITE_HEADER = "The format hook rewrote this file after your edit, so your in-memory copy is now stale \u2014 re-read it before the next Edit or the match will miss.";
|
|
@@ -130,12 +129,7 @@ ${location}
|
|
|
130
129
|
${cap_body(range.body)}`;
|
|
131
130
|
}
|
|
132
131
|
function read_text(file_path) {
|
|
133
|
-
|
|
134
|
-
try {
|
|
135
|
-
return readFileSync(file_path, "utf8");
|
|
136
|
-
} catch {
|
|
137
|
-
return "";
|
|
138
|
-
}
|
|
132
|
+
return file_path === void 0 ? "" : file_reader.read_if_readable(file_path) ?? "";
|
|
139
133
|
}
|
|
140
134
|
var rewrite_notice = { build, read_text };
|
|
141
135
|
|
|
@@ -315,10 +309,6 @@ function build_envelope(additional_context) {
|
|
|
315
309
|
hookSpecificOutput: { hookEventName: HOOK_EVENT_NAME, additionalContext: additional_context }
|
|
316
310
|
});
|
|
317
311
|
}
|
|
318
|
-
function density_envelope(raw_payload) {
|
|
319
|
-
const notice = time_density_hook.density_notice(raw_payload);
|
|
320
|
-
return notice === void 0 ? void 0 : build_envelope(notice);
|
|
321
|
-
}
|
|
322
312
|
function compose_context(notice, diagnostics) {
|
|
323
313
|
const sections = [notice, diagnostics].filter(
|
|
324
314
|
(section) => section !== void 0
|
|
@@ -342,28 +332,11 @@ async function run_hook(payload) {
|
|
|
342
332
|
if (context !== void 0) process.stdout.write(`${build_envelope(context)}
|
|
343
333
|
`);
|
|
344
334
|
}
|
|
345
|
-
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
346
|
-
if (process.stdin.isTTY) {
|
|
347
|
-
report_no_payload();
|
|
348
|
-
} else {
|
|
349
|
-
await run_hook(await text(process.stdin));
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
335
|
|
|
353
336
|
export {
|
|
354
|
-
ESLINT_DAEMON,
|
|
355
|
-
PROCESS_TIMEOUT_MS2 as PROCESS_TIMEOUT_MS,
|
|
356
|
-
MAX_DIAGNOSTIC_CHARS2 as MAX_DIAGNOSTIC_CHARS,
|
|
357
|
-
parse_edited_path,
|
|
358
|
-
relative_to_root,
|
|
359
|
-
plan_commands,
|
|
360
|
-
select_invocation,
|
|
361
|
-
plan_daemon_restart,
|
|
362
|
-
resolve_invocations,
|
|
363
|
-
is_start_failure,
|
|
364
|
-
format_edited_file,
|
|
365
337
|
format_edited_payload,
|
|
366
338
|
build_envelope,
|
|
367
|
-
|
|
368
|
-
|
|
339
|
+
compose_context,
|
|
340
|
+
report_no_payload,
|
|
341
|
+
run_hook
|
|
369
342
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lane_child_marker
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WQ4OSBSS.js";
|
|
4
4
|
import {
|
|
5
5
|
time_bundle_call,
|
|
6
6
|
time_format,
|
|
7
7
|
time_round_trips,
|
|
8
8
|
time_spans,
|
|
9
9
|
time_transcript_line
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7VPDUBRN.js";
|
|
11
11
|
|
|
12
12
|
// scripts/lane/lane-guard-policy.ts
|
|
13
13
|
var DEFAULT_MODE = "refuse";
|