@joshuafolkken/kit 1.887.0 → 1.929.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/workflow-commands/backlogrun-progress.md +13 -12
- package/.claude/skills/workflow-commands/backlogrun-steps.md +2 -1
- package/.claude/skills/workflow-commands/fullrun-steps.md +4 -2
- package/.claude/skills/workflow-commands/halfrun.md +3 -1
- package/.claude/skills/workflow-commands/kickoff.md +5 -3
- package/.claude/skills/workflow-commands/observation-filing.md +3 -1
- package/.claude/skills/workflow-commands/prerequisite.md +3 -1
- package/.claude/skills/workflow-commands/target-repository.md +1 -1
- package/.github/pull_request_template.md +12 -0
- package/.github/release.yml +3 -0
- package/.github/workflows/ci.yml +8 -0
- package/.github/workflows/production.yml +10 -1
- package/.github/workflows/publish.yml +72 -2
- package/CLAUDE.md +2 -0
- package/README.md +2 -1
- package/dist/CLAUDE.md +2 -0
- package/dist/CLAUDE.static.md +8 -0
- package/dist/hooks/batch-guard.js +6 -6
- package/dist/hooks/{chunk-264QY6KS.js → chunk-2PGRQ62K.js} +25 -10
- package/dist/hooks/chunk-3V37IID6.js +82 -0
- package/dist/hooks/{chunk-36UE53LS.js → chunk-7XQ6TK3R.js} +2 -2
- package/dist/hooks/{chunk-PRDCNGA6.js → chunk-BNFG2IFK.js} +4 -4
- package/dist/hooks/{chunk-VGYSA2NT.js → chunk-GQ3EVWHY.js} +22 -3
- package/dist/hooks/{chunk-Y5OYCU2F.js → chunk-I3JP3D4A.js} +3 -3
- package/dist/hooks/{chunk-6MQCXEEA.js → chunk-LCJZE42I.js} +25 -88
- package/dist/hooks/{chunk-ZBK4XRAS.js → chunk-NJZSO7BK.js} +3 -3
- package/dist/hooks/{chunk-SSX23SJ2.js → chunk-RKUAD3I6.js} +1 -0
- package/dist/hooks/{chunk-FRJKVSK3.js → chunk-ROULPSQC.js} +2 -2
- package/dist/hooks/{chunk-FNFOLFFV.js → chunk-SXPTRFPG.js} +2 -2
- package/dist/hooks/{chunk-FXAKJKTB.js → chunk-WPALEIRX.js} +1 -1
- package/dist/hooks/{chunk-4OXFU3MK.js → chunk-YO43HEPY.js} +634 -156
- package/dist/hooks/codex-hook-adapter.js +13 -12
- package/dist/hooks/duplicate-read-guard.js +7 -7
- package/dist/hooks/format-edited.js +4 -3
- package/dist/hooks/investigation-guard.js +7 -7
- package/dist/hooks/pretool-guard.js +12 -11
- package/dist/hooks/session-lang.js +2 -2
- package/dist/hooks/stop-guard.js +5 -5
- package/dist/josh.js +156 -20
- package/eslint/base.js +4 -1
- package/package.json +72 -18
- package/playwright.config.ts +9 -17
- package/ports/index.d.ts +1 -0
- package/ports/index.js +1 -0
- package/ports/web-server.d.ts +5 -0
- package/ports/web-server.js +73 -0
- package/prettier/index.js +3 -8
- package/prettier/static.d.ts +3 -0
- package/prettier/static.js +10 -0
- package/prompts/collaboration-workflow/issue-template.md +11 -4
- package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
- package/prompts/collaboration-workflow/wip-cap.md +2 -2
- package/prompts/review.md +2 -2
- package/prompts/testing-guide.md +1 -0
- package/scripts/agent/agent-role-profile.ts +11 -0
- package/scripts/build/build-claude-md.ts +6 -1
- package/scripts/ci/pr-classification.ts +114 -0
- package/scripts/document/document-byte-budget.ts +3 -2
- package/scripts/gate/gate-report.ts +2 -0
- package/scripts/gate/gate-steps.ts +50 -0
- package/scripts/gate/project-checks.ts +145 -0
- package/scripts/gate/verification-gate.ts +14 -43
- package/scripts/git/git-common-directory.ts +9 -1
- package/scripts/git/git-gh-pr-rollup.ts +29 -1
- package/scripts/git/git-gh-pr.ts +61 -1
- package/scripts/git/git-pr.ts +62 -13
- package/scripts/git/issue-labels.ts +9 -0
- package/scripts/init/distributed-paths.ts +9 -5
- package/scripts/init/hook-command-bootstrap.ts +40 -8
- package/scripts/init/hook-command-rewrite.ts +7 -3
- package/scripts/init/init-actions.ts +94 -7
- package/scripts/init/init-ai-copy.ts +107 -19
- package/scripts/init/init-logic-workspace.ts +38 -5
- package/scripts/init/init-logic.ts +1 -0
- package/scripts/init/init-static.ts +55 -0
- package/scripts/init/init.ts +97 -30
- package/scripts/init/project-profile-cli.ts +14 -0
- package/scripts/init/project-profile.ts +158 -0
- package/scripts/init/start.ts +30 -0
- package/scripts/issue/issue-bug-label.ts +13 -0
- package/scripts/issue/issue-classification.ts +74 -0
- package/scripts/issue/issue-lint-cli.ts +10 -3
- package/scripts/issue/markdown-section.ts +38 -4
- package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +27 -1
- package/scripts/josh/josh-command-map.ts +3 -0
- package/scripts/josh/josh-commands-development.ts +8 -15
- package/scripts/josh/josh-commands-project.ts +14 -1
- package/scripts/josh/josh-logic.ts +13 -0
- package/scripts/josh/run-github-prerequisite.ts +32 -0
- package/scripts/lane/lane-await.ts +8 -1
- package/scripts/lane/openai-lane-ship.ts +30 -0
- package/scripts/lane/openai-lane-supervisor.ts +35 -8
- package/scripts/lane/openai-review-broker.ts +260 -0
- package/scripts/lint/cspell-cached.ts +21 -0
- package/scripts/lint/format.ts +68 -0
- package/scripts/lint/lint-parallel.ts +30 -1
- package/scripts/observations/observations-flush.ts +1 -1
- package/scripts/package/production-dependency-graph.ts +68 -0
- package/scripts/package/verify-optional-eslint-install.ts +62 -0
- package/scripts/release/github-release-cli.ts +11 -0
- package/scripts/release/github-release.ts +220 -0
- package/scripts/release/publish-tag-cli.ts +8 -0
- package/scripts/release/publish-tag.ts +11 -0
- package/scripts/release/release-publish.ts +7 -2
- package/scripts/rules/delivered-rules.ts +2 -0
- package/scripts/rules/issue-bug-label.ts +85 -0
- package/scripts/rules/issue-filing-args.ts +50 -0
- package/scripts/run/run-merge-cli.ts +19 -0
- package/scripts/run/run-merge.ts +9 -1
- package/scripts/run/run-ship-cli.ts +20 -0
- package/scripts/run/run-ship-detach.ts +180 -14
- package/scripts/run/run-ship-review-steps.ts +45 -25
- package/scripts/run/run-step-cli.ts +11 -1
- package/scripts/run/run-step.ts +36 -8
- package/scripts/run/run-wake-session.ts +3 -1
- package/scripts/test/pilot-files.ts +0 -2
- package/scripts/test/skip-marker.ts +3 -0
- package/scripts/test/test-declared-changed.ts +2 -1
- package/scripts/test/test-declared-logic.ts +15 -10
- package/scripts/test/test-declared.ts +20 -8
- package/scripts/test/test-red-logic.ts +3 -3
- package/scripts/test/test-unit-guard.ts +24 -12
- package/templates/CLAUDE.static.md +8 -0
- package/templates/cursorrules.static +1 -0
- package/templates/pnpm-workspace.static.yaml +4 -0
- package/templates/prettierignore.static +12 -0
- package/templates/workflows/ci.yml +5 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3JP3D4A.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7XQ6TK3R.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SXPTRFPG.js";
|
|
10
10
|
import {
|
|
11
11
|
json_value,
|
|
12
12
|
time_spans
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2PGRQ62K.js";
|
|
14
14
|
|
|
15
15
|
// scripts/delegation/duplicate-read-guard.ts
|
|
16
16
|
import { statSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lane_child_marker,
|
|
3
3
|
run_issue_number
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SXPTRFPG.js";
|
|
5
5
|
import {
|
|
6
6
|
PLATFORM_TEMP_ROOT,
|
|
7
7
|
cost_blocks,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
time_density_hook,
|
|
12
12
|
time_shell,
|
|
13
13
|
time_transcript_line
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2PGRQ62K.js";
|
|
15
15
|
import {
|
|
16
16
|
ENV_FILE_NAME,
|
|
17
17
|
LANE_SEAT_KEY,
|
|
18
18
|
PORT_SEED_KEY,
|
|
19
19
|
ports
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RKUAD3I6.js";
|
|
21
21
|
|
|
22
22
|
// scripts/rules/bash-triggers.ts
|
|
23
23
|
function on_bash_command(is_match) {
|
|
@@ -852,6 +852,10 @@ function detected_provider(environment) {
|
|
|
852
852
|
function resolve_provider(environment = process.env) {
|
|
853
853
|
return detected_provider(environment) ?? handed_provider(environment);
|
|
854
854
|
}
|
|
855
|
+
function has_completion_callback(environment = process.env) {
|
|
856
|
+
const selected = resolve_provider(environment);
|
|
857
|
+
return selected.kind !== "provider" || selected.provider !== OPENAI_PROVIDER;
|
|
858
|
+
}
|
|
855
859
|
function handoff_environment(environment = process.env) {
|
|
856
860
|
const selected = resolve_provider(environment);
|
|
857
861
|
return selected.kind === "provider" ? { [HANDED_PROVIDER_KEY]: selected.provider } : {};
|
|
@@ -916,6 +920,7 @@ var agent_role_profile = {
|
|
|
916
920
|
WORKER,
|
|
917
921
|
describe,
|
|
918
922
|
handoff_environment,
|
|
923
|
+
has_completion_callback,
|
|
919
924
|
is_safe_value,
|
|
920
925
|
parse,
|
|
921
926
|
phase_effort,
|
|
@@ -1512,6 +1517,9 @@ var run_cut = {
|
|
|
1512
1517
|
};
|
|
1513
1518
|
|
|
1514
1519
|
// scripts/git/issue-labels.ts
|
|
1520
|
+
var BUG_LABEL = "bug";
|
|
1521
|
+
var ENHANCEMENT_LABEL = "enhancement";
|
|
1522
|
+
var BREAKING_CHANGE_LABEL = "breaking-change";
|
|
1515
1523
|
var IN_PROGRESS_LABEL = "in-progress";
|
|
1516
1524
|
var NEEDS_DECISION_LABEL = "needs-decision";
|
|
1517
1525
|
var NEEDS_HUMAN_REVIEW_LABEL = "needs-human-review";
|
|
@@ -1519,6 +1527,13 @@ var ALREADY_DONE_LABEL = "already-done";
|
|
|
1519
1527
|
function has_any_label(labels, wanted) {
|
|
1520
1528
|
return (labels ?? []).some((label) => wanted.has(label.name.toLowerCase()));
|
|
1521
1529
|
}
|
|
1530
|
+
function label_name_of(labels, wanted) {
|
|
1531
|
+
const target = wanted.toLowerCase();
|
|
1532
|
+
return labels.find((label) => label.toLowerCase() === target);
|
|
1533
|
+
}
|
|
1534
|
+
function has_label_name(labels, wanted) {
|
|
1535
|
+
return label_name_of(labels, wanted) !== void 0;
|
|
1536
|
+
}
|
|
1522
1537
|
|
|
1523
1538
|
// scripts/rules/shell-segments.ts
|
|
1524
1539
|
var SEGMENT_SEPARATOR = /&&|\|\||;|\n/u;
|
|
@@ -3276,11 +3291,15 @@ export {
|
|
|
3276
3291
|
lane_child_invocation,
|
|
3277
3292
|
run_hold,
|
|
3278
3293
|
run_cut,
|
|
3294
|
+
BUG_LABEL,
|
|
3295
|
+
ENHANCEMENT_LABEL,
|
|
3296
|
+
BREAKING_CHANGE_LABEL,
|
|
3279
3297
|
IN_PROGRESS_LABEL,
|
|
3280
3298
|
NEEDS_DECISION_LABEL,
|
|
3281
3299
|
NEEDS_HUMAN_REVIEW_LABEL,
|
|
3282
3300
|
ALREADY_DONE_LABEL,
|
|
3283
3301
|
has_any_label,
|
|
3302
|
+
has_label_name,
|
|
3284
3303
|
lane_park,
|
|
3285
3304
|
repo_party,
|
|
3286
3305
|
FULL_PAGE_QUERY,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
time_batch_guard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7XQ6TK3R.js";
|
|
4
4
|
import {
|
|
5
5
|
hook_decision
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SXPTRFPG.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-2PGRQ62K.js";
|
|
14
14
|
|
|
15
15
|
// scripts/delegation/investigation-reads.ts
|
|
16
16
|
import path from "node:path";
|
|
@@ -1,86 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolve_local_bin,
|
|
3
|
+
resolve_package_bin
|
|
4
|
+
} from "./chunk-3V37IID6.js";
|
|
1
5
|
import {
|
|
2
6
|
ESLINT_EDIT_CACHE_FLAGS,
|
|
3
7
|
time_density_hook
|
|
4
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2PGRQ62K.js";
|
|
5
9
|
|
|
6
10
|
// scripts/hooks/format-edited-file.ts
|
|
7
|
-
import { existsSync as
|
|
8
|
-
import
|
|
11
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
12
|
+
import path2 from "node:path";
|
|
9
13
|
import { text } from "node:stream/consumers";
|
|
10
14
|
import { fileURLToPath } from "node:url";
|
|
11
|
-
|
|
12
|
-
// scripts/build/local-bin.ts
|
|
13
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
14
|
-
import { createRequire } from "node:module";
|
|
15
|
-
import path from "node:path";
|
|
16
|
-
|
|
17
|
-
// scripts/lib/schemas.ts
|
|
18
|
-
import { z } from "zod";
|
|
19
|
-
var overrides_snapshot_schema = z.record(z.string(), z.string());
|
|
20
|
-
var package_version_schema = z.object({ version: z.string() });
|
|
21
|
-
var package_named_version_schema = z.looseObject({ name: z.string(), version: z.string() });
|
|
22
|
-
var package_with_version_schema = z.looseObject({ version: z.string() });
|
|
23
|
-
var ls_global_dependency_schema = z.looseObject({ version: z.string() });
|
|
24
|
-
var ls_global_dependencies_schema = z.record(z.string(), ls_global_dependency_schema).optional();
|
|
25
|
-
var pnpm_ls_global_schema = z.array(
|
|
26
|
-
z.looseObject({
|
|
27
|
-
dependencies: ls_global_dependencies_schema
|
|
28
|
-
})
|
|
29
|
-
);
|
|
30
|
-
var vscode_settings_schema = z.record(z.string(), z.unknown());
|
|
31
|
-
var with_scripts_schema = z.looseObject({
|
|
32
|
-
scripts: z.record(z.string(), z.string()).optional()
|
|
33
|
-
});
|
|
34
|
-
var with_development_deps_schema = z.looseObject({
|
|
35
|
-
devDependencies: z.record(z.string(), z.string()).optional()
|
|
36
|
-
});
|
|
37
|
-
var with_package_manager_schema = z.looseObject({
|
|
38
|
-
packageManager: z.string().optional()
|
|
39
|
-
});
|
|
40
|
-
var with_development_engine_schema = z.looseObject({
|
|
41
|
-
devEngines: z.record(z.string(), z.unknown()).optional()
|
|
42
|
-
});
|
|
43
|
-
var bin_entry_schema = z.union([z.string(), z.record(z.string(), z.string())]).optional();
|
|
44
|
-
var package_bin_schema = z.looseObject({ bin: bin_entry_schema });
|
|
45
|
-
var json_object_schema = z.record(z.string(), z.unknown());
|
|
46
|
-
var string_array_schema = z.array(z.string());
|
|
47
|
-
var string_record_schema = z.record(z.string(), z.string());
|
|
48
|
-
|
|
49
|
-
// scripts/build/local-bin.ts
|
|
50
|
-
var NODE_MODULES = "node_modules";
|
|
51
|
-
var BIN_DIR = ".bin";
|
|
52
|
-
var WINDOWS_PLATFORM = "win32";
|
|
53
|
-
var WINDOWS_SHIM_SUFFIX = ".cmd";
|
|
54
|
-
var PACKAGE_JSON = "package.json";
|
|
55
|
-
function resolve_local_bin(project_root, bin_name) {
|
|
56
|
-
const shim = process.platform === WINDOWS_PLATFORM ? `${bin_name}${WINDOWS_SHIM_SUFFIX}` : bin_name;
|
|
57
|
-
return path.join(project_root, NODE_MODULES, BIN_DIR, shim);
|
|
58
|
-
}
|
|
59
|
-
function read_bin_entry(manifest_path, package_name, bin_name) {
|
|
60
|
-
const { bin } = package_bin_schema.parse(JSON.parse(readFileSync(manifest_path, "utf8")));
|
|
61
|
-
if (typeof bin === "string") return bin_name === path.basename(package_name) ? bin : void 0;
|
|
62
|
-
return bin?.[bin_name];
|
|
63
|
-
}
|
|
64
|
-
function resolve_package_bin(base_directory, package_name, bin_name) {
|
|
65
|
-
try {
|
|
66
|
-
const resolve_from = createRequire(path.join(base_directory, PACKAGE_JSON));
|
|
67
|
-
const manifest_path = resolve_from.resolve(`${package_name}/${PACKAGE_JSON}`);
|
|
68
|
-
const bin_entry = read_bin_entry(manifest_path, package_name, bin_name);
|
|
69
|
-
if (bin_entry === void 0) return void 0;
|
|
70
|
-
const cli_entry = path.join(path.dirname(manifest_path), bin_entry);
|
|
71
|
-
return existsSync(cli_entry) ? cli_entry : void 0;
|
|
72
|
-
} catch {
|
|
73
|
-
return void 0;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// scripts/hooks/format-edited-file.ts
|
|
78
15
|
import { execa as execa2 } from "execa";
|
|
79
|
-
import { z
|
|
16
|
+
import { z } from "zod";
|
|
80
17
|
|
|
81
18
|
// scripts/hooks/edited-cspell.ts
|
|
82
|
-
import { existsSync
|
|
83
|
-
import
|
|
19
|
+
import { existsSync } from "node:fs";
|
|
20
|
+
import path from "node:path";
|
|
84
21
|
import { execa } from "execa";
|
|
85
22
|
var CSPELL_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
86
23
|
".ts",
|
|
@@ -115,11 +52,11 @@ var HEADER = "The edit hook found words cspell does not know; fix them or add th
|
|
|
115
52
|
var MAX_DIAGNOSTIC_CHARS = 4e3;
|
|
116
53
|
var TRUNCATION_NOTICE = "\n\u2026(unknown words truncated)";
|
|
117
54
|
function is_checkable(file_path, project_root) {
|
|
118
|
-
if (!
|
|
55
|
+
if (!existsSync(file_path) || !CSPELL_EXTENSIONS.has(path.extname(file_path).toLowerCase())) {
|
|
119
56
|
return false;
|
|
120
57
|
}
|
|
121
|
-
const relative =
|
|
122
|
-
return relative !== "" && !relative.startsWith("..") && !
|
|
58
|
+
const relative = path.relative(path.resolve(project_root), path.resolve(file_path));
|
|
59
|
+
return relative !== "" && !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
123
60
|
}
|
|
124
61
|
async function run_cspell(file_path, project_root) {
|
|
125
62
|
const result = await execa(PNPM, [...CSPELL_ARGS, file_path], {
|
|
@@ -150,7 +87,7 @@ async function spelling_diagnostics(file_path, project_root, runner = run_cspell
|
|
|
150
87
|
var edited_cspell = { format_unknown_words, is_checkable, spelling_diagnostics };
|
|
151
88
|
|
|
152
89
|
// scripts/hooks/format-rewrite-notice.ts
|
|
153
|
-
import { readFileSync
|
|
90
|
+
import { readFileSync } from "node:fs";
|
|
154
91
|
var MAX_REWRITE_CHARS = 1200;
|
|
155
92
|
var REWRITE_TRUNCATION_NOTICE = "\n\u2026(rewrite preview truncated)";
|
|
156
93
|
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.";
|
|
@@ -195,7 +132,7 @@ ${cap_body(range.body)}`;
|
|
|
195
132
|
function read_text(file_path) {
|
|
196
133
|
if (file_path === void 0) return "";
|
|
197
134
|
try {
|
|
198
|
-
return
|
|
135
|
+
return readFileSync(file_path, "utf8");
|
|
199
136
|
} catch {
|
|
200
137
|
return "";
|
|
201
138
|
}
|
|
@@ -203,8 +140,8 @@ function read_text(file_path) {
|
|
|
203
140
|
var rewrite_notice = { build, read_text };
|
|
204
141
|
|
|
205
142
|
// scripts/hooks/format-edited-file.ts
|
|
206
|
-
var hook_payload_schema =
|
|
207
|
-
tool_input:
|
|
143
|
+
var hook_payload_schema = z.object({
|
|
144
|
+
tool_input: z.object({ file_path: z.string().min(1) }).optional()
|
|
208
145
|
});
|
|
209
146
|
var PRETTIER_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
210
147
|
".ts",
|
|
@@ -244,7 +181,7 @@ var DIAGNOSTIC_HEADER = "The edit hook could not auto-fix these lint problems; a
|
|
|
244
181
|
var MAX_DIAGNOSTIC_CHARS2 = 4e3;
|
|
245
182
|
var DIAGNOSTIC_TRUNCATION_NOTICE = "\n\u2026(diagnostics truncated)";
|
|
246
183
|
var SECTION_SEPARATOR = "\n\n";
|
|
247
|
-
var MODULE_DIRECTORY =
|
|
184
|
+
var MODULE_DIRECTORY = path2.dirname(fileURLToPath(import.meta.url));
|
|
248
185
|
function parse_edited_path(raw_payload) {
|
|
249
186
|
try {
|
|
250
187
|
const result = hook_payload_schema.safeParse(JSON.parse(raw_payload));
|
|
@@ -254,21 +191,21 @@ function parse_edited_path(raw_payload) {
|
|
|
254
191
|
}
|
|
255
192
|
}
|
|
256
193
|
function is_excluded(relative_path) {
|
|
257
|
-
const segments = relative_path.split(
|
|
194
|
+
const segments = relative_path.split(path2.sep);
|
|
258
195
|
return segments.some((segment) => EXCLUDED_ANYWHERE.has(segment)) || EXCLUDED_AT_ROOT.has(segments[0] ?? "");
|
|
259
196
|
}
|
|
260
197
|
function relative_to_root(project_root, file_path) {
|
|
261
|
-
const relative =
|
|
262
|
-
const is_inside_root = relative !== "" && relative.split(
|
|
198
|
+
const relative = path2.relative(path2.resolve(project_root), path2.resolve(file_path));
|
|
199
|
+
const is_inside_root = relative !== "" && relative.split(path2.sep)[0] !== PARENT_SEGMENT && !path2.isAbsolute(relative);
|
|
263
200
|
return is_inside_root ? relative : void 0;
|
|
264
201
|
}
|
|
265
202
|
function is_formattable(file_path, project_root) {
|
|
266
203
|
const relative = relative_to_root(project_root, file_path);
|
|
267
|
-
return relative !== void 0 && !is_excluded(relative) &&
|
|
204
|
+
return relative !== void 0 && !is_excluded(relative) && existsSync2(file_path);
|
|
268
205
|
}
|
|
269
206
|
function plan_commands(file_path, project_root) {
|
|
270
207
|
if (!is_formattable(file_path, project_root)) return [];
|
|
271
|
-
const extension =
|
|
208
|
+
const extension = path2.extname(file_path).toLowerCase();
|
|
272
209
|
const commands = [];
|
|
273
210
|
if (ESLINT_EXTENSIONS.has(extension)) {
|
|
274
211
|
commands.push({ bin: ESLINT_BIN, command_arguments: [...ESLINT_ARGUMENTS, file_path] });
|
|
@@ -296,7 +233,7 @@ function resolve_daemon_cli(bin, project_root) {
|
|
|
296
233
|
return resolve_package_bin(MODULE_DIRECTORY, ESLINT_DAEMON, ESLINT_DAEMON) ?? resolve_package_bin(project_root, ESLINT_DAEMON, ESLINT_DAEMON);
|
|
297
234
|
}
|
|
298
235
|
function is_eslint_config_input(relative_path) {
|
|
299
|
-
return relative_path.split(
|
|
236
|
+
return relative_path.split(path2.sep)[0] === ESLINT_CONFIG_DIR || ESLINT_CONFIG_ENTRY.test(relative_path);
|
|
300
237
|
}
|
|
301
238
|
function plan_daemon_restart(file_path, project_root) {
|
|
302
239
|
const relative = relative_to_root(project_root, file_path);
|
|
@@ -308,7 +245,7 @@ function resolve_invocations(command, project_root) {
|
|
|
308
245
|
const shim = resolve_local_bin(project_root, command.bin);
|
|
309
246
|
const routes = {
|
|
310
247
|
daemon_cli: resolve_daemon_cli(command.bin, project_root),
|
|
311
|
-
shim:
|
|
248
|
+
shim: existsSync2(shim) ? shim : void 0
|
|
312
249
|
};
|
|
313
250
|
const without_daemon = select_invocation(command, { ...routes, daemon_cli: void 0 });
|
|
314
251
|
if (routes.daemon_cli === void 0) return [without_daemon];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
investigation_reads
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3JP3D4A.js";
|
|
4
4
|
import {
|
|
5
5
|
lane_guard_policy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7XQ6TK3R.js";
|
|
7
7
|
import {
|
|
8
8
|
hook_decision
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SXPTRFPG.js";
|
|
10
10
|
|
|
11
11
|
// scripts/delegation/investigation-guard.ts
|
|
12
12
|
import { text } from "node:stream/consumers";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lane_guard_policy,
|
|
3
3
|
time_batch_guard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7XQ6TK3R.js";
|
|
5
5
|
import {
|
|
6
6
|
hook_decision
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SXPTRFPG.js";
|
|
8
8
|
|
|
9
9
|
// scripts/hooks/batch-guard.ts
|
|
10
10
|
import { text } from "node:stream/consumers";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
stamp_file,
|
|
4
4
|
time_density_hook,
|
|
5
5
|
time_hook_transcript
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2PGRQ62K.js";
|
|
7
7
|
import {
|
|
8
8
|
josh_environment_file
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WPALEIRX.js";
|
|
10
10
|
|
|
11
11
|
// scripts/josh/hook-decision.ts
|
|
12
12
|
import { z } from "zod";
|