@event4u/agent-config 9.11.0 → 9.13.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-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +80 -204
- package/README.md +8 -1
- package/dist/agent-src/commands/fix/ci.md +29 -0
- package/dist/agent-src/commands/pr/create.md +60 -0
- package/dist/agent-src/contexts/authority/kernel-rule-edits.md +18 -2
- package/dist/agent-src/rules/active-remediation.md +0 -2
- package/dist/agent-src/rules/architecture.md +0 -1
- package/dist/agent-src/rules/artifact-drafting-protocol.md +0 -4
- package/dist/agent-src/rules/autonomous-execution.md +1 -2
- package/dist/agent-src/rules/broken-access-control.md +0 -2
- package/dist/agent-src/rules/code-comment-discipline.md +0 -3
- package/dist/agent-src/rules/code-provenance.md +0 -3
- package/dist/agent-src/rules/communication-through-line.md +2 -3
- package/dist/agent-src/rules/content-quoting-floor.md +0 -2
- package/dist/agent-src/rules/context-hygiene.md +1 -3
- package/dist/agent-src/rules/decision-revisit-gate.md +0 -2
- package/dist/agent-src/rules/design-fidelity.md +30 -1
- package/dist/agent-src/rules/domain-adoption-policy.md +0 -3
- package/dist/agent-src/rules/downstream-changes.md +10 -1
- package/dist/agent-src/rules/external-reference-deep-dive.md +0 -7
- package/dist/agent-src/rules/fast-path-marker-visibility.md +0 -1
- package/dist/agent-src/rules/git-history-discipline.md +0 -7
- package/dist/agent-src/rules/guidelines.md +0 -2
- package/dist/agent-src/rules/improve-before-implement.md +4 -2
- package/dist/agent-src/rules/invite-challenge.md +0 -4
- package/dist/agent-src/rules/linked-projects-onboarding-gate.md +0 -2
- package/dist/agent-src/rules/markdown-safe-codeblocks.md +0 -1
- package/dist/agent-src/rules/minimal-safe-diff.md +2 -2
- package/dist/agent-src/rules/missing-tool-handling.md +0 -1
- package/dist/agent-src/rules/no-attribution-footers.md +0 -3
- package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +8 -5
- package/dist/agent-src/rules/no-pr-progress-comments.md +1 -3
- package/dist/agent-src/rules/no-roadmap-references.md +0 -2
- package/dist/agent-src/rules/output-discipline.md +0 -1
- package/dist/agent-src/rules/prefer-enums-over-literals.md +0 -2
- package/dist/agent-src/rules/preservation-guard.md +0 -3
- package/dist/agent-src/rules/role-mode-adherence.md +0 -1
- package/dist/agent-src/rules/secret-vcs-guard.md +0 -2
- package/dist/agent-src/rules/senior-engineering-discipline.md +0 -2
- package/dist/agent-src/rules/session-canary.md +0 -2
- package/dist/agent-src/rules/size-enforcement.md +0 -5
- package/dist/agent-src/rules/source-confidentiality.md +0 -3
- package/dist/agent-src/rules/source-discovery-gate.md +0 -2
- package/dist/agent-src/rules/think-before-action.md +3 -3
- package/dist/agent-src/rules/token-budget-discipline.md +0 -1
- package/dist/agent-src/rules/token-efficiency.md +1 -2
- package/dist/agent-src/rules/tool-safety.md +0 -1
- package/dist/agent-src/rules/user-interaction.md +0 -3
- package/dist/agent-src/rules/user-interrupt-priority.md +0 -1
- package/dist/agent-src/skills/agent-docs-writing/SKILL.md +8 -0
- package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +1 -0
- package/dist/agent-src/skills/analysis-skill-router/SKILL.md +55 -86
- package/dist/agent-src/skills/character-consistency/SKILL.md +7 -4
- package/dist/agent-src/skills/decision-record/SKILL.md +8 -0
- package/dist/agent-src/skills/design-intelligence/SKILL.md +27 -1
- package/dist/agent-src/skills/design-intelligence/data/font-pairings-reference.csv +74 -74
- package/dist/agent-src/skills/design-intelligence/data/manifest.json +2 -0
- package/dist/agent-src/skills/design-review/SKILL.md +11 -0
- package/dist/agent-src/skills/design-system-capture/reference/design-system-json.md +8 -0
- package/dist/agent-src/skills/design-tokens/scripts/tokens.ts +0 -7
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +34 -3
- package/dist/agent-src/skills/fe-design/SKILL.md +10 -0
- package/dist/agent-src/skills/motion-choreographer/SKILL.md +7 -4
- package/dist/agent-src/skills/overbuild-review-lens/SKILL.md +201 -0
- package/dist/agent-src/skills/performance/SKILL.md +14 -0
- package/dist/agent-src/skills/pixar-storyteller/SKILL.md +8 -5
- package/dist/agent-src/skills/scene-expander/SKILL.md +9 -6
- package/dist/agent-src/skills/supply-chain-intake/SKILL.md +10 -0
- package/dist/agent-src/skills/typography-system/SKILL.md +55 -11
- package/dist/agent-src/skills/ui-apply-generic/SKILL.md +180 -0
- package/dist/agent-src/skills/universal-project-analysis/SKILL.md +14 -37
- package/dist/agent-src/skills/video-director/SKILL.md +9 -6
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +162 -17
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/design.ts +118 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +49 -6
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +9 -5
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +182 -29
- package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +311 -24
- package/dist/agent-src/templates/scripts/work_engine/state.ts +55 -0
- package/dist/cli-delegate/chunk-523HCFYO.js +90 -0
- package/dist/cli-delegate/{chunk-IR7P7JWA.js → chunk-A3HJ6NTI.js} +271 -59
- package/dist/cli-delegate/chunk-EJYIGZ3T.js +125 -0
- package/dist/cli-delegate/{chunk-RDGRHAAB.js → chunk-HYWSRNUX.js} +6 -86
- package/dist/cli-delegate/{chunk-YMFO6FDN.js → chunk-QFKQLQ7X.js} +313 -81
- package/dist/cli-delegate/{chunk-4SV3XGFA.js → chunk-TEGJU2JX.js} +7 -9
- package/dist/cli-delegate/chunk-TJIAM5FW.js +133 -0
- package/dist/cli-delegate/cmd_conformance.js +4 -7
- package/dist/cli-delegate/cmd_doctor.js +3 -5
- package/dist/cli-delegate/cmd_explain.js +153 -85
- package/dist/cli-delegate/cmd_export.js +5 -3
- package/dist/cli-delegate/cmd_fleet.js +2 -1
- package/dist/cli-delegate/cmd_preflight.js +6 -123
- package/dist/cli-delegate/cmd_prune.js +5 -3
- package/dist/cli-delegate/cmd_settings_migrate.js +5 -3
- package/dist/cli-delegate/cmd_sync.js +5 -3
- package/dist/cli-delegate/cmd_uninstall.js +6 -5
- package/dist/cli-delegate/cmd_validate.js +5 -3
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +116 -72
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +3 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +7 -5
- package/dist/discovery/trust-report.md +2 -2
- package/dist/discovery/workspaces.json +6 -4
- package/dist/hooks/dispatch.js +174 -13
- package/dist/install/install.mjs +605 -412
- package/dist/install/ruleInScope.js +123 -0
- package/dist/install/ruleInScope.js.map +1 -0
- package/dist/install/rule_scope.js +2 -2
- package/dist/install/rule_scope.js.map +1 -1
- package/dist/install/wizard-plan.js +10 -1
- package/dist/install/wizard-plan.js.map +1 -1
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +710 -2491
- package/dist/router.json +1 -1
- package/dist/scripts/condense.js +8 -24
- package/dist/scripts/condense.js.map +1 -1
- package/docs/MIGRATION.md +1 -1
- package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +71 -0
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +24 -1
- package/docs/guidelines/code-clarity.md +9 -2
- package/docs/guidelines/design-fidelity-mechanics.md +58 -0
- package/llms.txt +63 -27
- package/package.json +4 -4
- package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +162 -17
- package/src/agent-src/templates/scripts/work_engine/directives/ui/design.ts +118 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +49 -6
- package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +9 -5
- package/src/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +182 -29
- package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +311 -24
- package/src/agent-src/templates/scripts/work_engine/state.ts +55 -0
- package/src/config/agent-settings.template.yml +8 -0
- package/src/install/ruleInScope.ts +133 -0
- package/src/install/rule_scope.ts +2 -2
- package/src/install/wizard-plan.ts +11 -1
- package/src/scripts/_lib/counted_probe.ts +142 -0
- package/src/scripts/_lib/global_deploy_inventory.ts +38 -2
- package/src/scripts/_lib/overbuild_lens_contract.ts +196 -0
- package/src/scripts/_lib/release_scope.ts +207 -0
- package/src/scripts/ai_council/stance_tally.ts +37 -2
- package/src/scripts/audit_auto_rules.ts +9 -9
- package/src/scripts/audit_likelihood.ts +3 -3
- package/src/scripts/audit_overlap.ts +2 -2
- package/src/scripts/audit_skill_overlap.ts +233 -95
- package/src/scripts/audit_skill_overlap_allowlist.json +4 -0
- package/src/scripts/build_proof.ts +15 -1
- package/src/scripts/check_dependency_floors.ts +16 -6
- package/src/scripts/check_gate_coverage.ts +6 -6
- package/src/scripts/check_installer_import_purity.ts +295 -0
- package/src/scripts/check_kernel_rule_bundle.ts +5 -4
- package/src/scripts/check_token_quality_golden.ts +0 -18
- package/src/scripts/code_graph/loader.ts +35 -6
- package/src/scripts/compile_router.ts +3 -8
- package/src/scripts/condense.ts +9 -30
- package/src/scripts/explain_run.ts +0 -1
- package/src/scripts/generate_pack_manifests.ts +3 -20
- package/src/scripts/hooks/block_kernel_rule_writes.ts +145 -10
- package/src/scripts/hooks/block_no_verify.ts +101 -0
- package/src/scripts/install-hooks.sh +36 -4
- package/src/scripts/install.ts +210 -5
- package/src/scripts/lint_agent_security.ts +5 -4
- package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
- package/src/scripts/lint_regression.ts +92 -1
- package/src/scripts/lint_skill_descriptions.ts +93 -5
- package/src/scripts/lint_ui_stack_bundles.ts +31 -0
- package/src/scripts/project_thin_rules.ts +2 -2
- package/src/scripts/release.ts +107 -3
- package/src/scripts/resolve_lint_scope.ts +53 -0
- package/src/scripts/router_telemetry.ts +0 -5
- package/src/scripts/runtime_dispatcher.ts +40 -0
- package/src/scripts/schemas/pack.schema.json +1 -5
- package/src/scripts/schemas/rule.schema.json +1 -2
- package/src/scripts/self_review_gate.ts +15 -73
- package/src/scripts/skill_linter.ts +93 -11
- package/src/scripts/sweep_dead_scan_roots.ts +550 -0
- package/src/scripts/trigger_coverage.ts +11 -37
- package/dist/cli-delegate/chunk-7DSAMZFU.js +0 -356
- package/dist/cli-delegate/chunk-BJGXZNPM.js +0 -266
- package/dist/cli-delegate/chunk-TFG57JJM.js +0 -1969
|
@@ -4,9 +4,6 @@ import {
|
|
|
4
4
|
StateLoadError,
|
|
5
5
|
load_state
|
|
6
6
|
} from "./chunk-GME3Q44L.js";
|
|
7
|
-
import {
|
|
8
|
-
artefact_roots
|
|
9
|
-
} from "./chunk-BJGXZNPM.js";
|
|
10
7
|
import {
|
|
11
8
|
DEFAULT_PROJECT_FILE,
|
|
12
9
|
ProjectRootError,
|
|
@@ -20,15 +17,86 @@ import {
|
|
|
20
17
|
} from "./chunk-J55WI3RR.js";
|
|
21
18
|
|
|
22
19
|
// src/scripts/_cli/cmd_explain.ts
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
20
|
+
import * as fs9 from "node:fs";
|
|
21
|
+
import * as path8 from "node:path";
|
|
25
22
|
import process2 from "node:process";
|
|
26
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
23
|
+
import { fileURLToPath as fileURLToPath2, pathToFileURL } from "node:url";
|
|
27
24
|
|
|
28
25
|
// src/scripts/config/presets.ts
|
|
29
|
-
import * as
|
|
26
|
+
import * as fs2 from "node:fs";
|
|
30
27
|
import { createRequire } from "node:module";
|
|
28
|
+
import * as path2 from "node:path";
|
|
29
|
+
|
|
30
|
+
// src/scripts/_lib/agent_src.ts
|
|
31
|
+
import * as fs from "node:fs";
|
|
31
32
|
import * as path from "node:path";
|
|
33
|
+
import { fileURLToPath } from "node:url";
|
|
34
|
+
var _HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
35
|
+
var _DEFAULT_ROOT = path.resolve(_HERE, "..", "..", "..");
|
|
36
|
+
function _deriveRoots(root) {
|
|
37
|
+
const packages = path.join(root, "packages");
|
|
38
|
+
const src = path.join(root, "src");
|
|
39
|
+
return {
|
|
40
|
+
ROOT: root,
|
|
41
|
+
LEGACY_SRC: path.join(root, ".agent-src.uncondensed"),
|
|
42
|
+
PACKAGES: packages,
|
|
43
|
+
PACKAGE_CORE: path.join(packages, "core"),
|
|
44
|
+
SRC: src,
|
|
45
|
+
SRC_SKILLS: path.join(src, "skills"),
|
|
46
|
+
SRC_RULES: path.join(src, "rules"),
|
|
47
|
+
SRC_AGENT: path.join(src, "agent-src"),
|
|
48
|
+
SRC_DOMAINS: path.join(src, "domains")
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
var _roots = _deriveRoots(_DEFAULT_ROOT);
|
|
52
|
+
function _isDir(p) {
|
|
53
|
+
try {
|
|
54
|
+
return fs.statSync(p).isDirectory();
|
|
55
|
+
} catch {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function _exists(p) {
|
|
60
|
+
try {
|
|
61
|
+
fs.statSync(p);
|
|
62
|
+
return true;
|
|
63
|
+
} catch {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function _iterdirSorted(p) {
|
|
68
|
+
let names;
|
|
69
|
+
try {
|
|
70
|
+
names = fs.readdirSync(p);
|
|
71
|
+
} catch {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
names.sort();
|
|
75
|
+
return names.map((name) => path.join(p, name));
|
|
76
|
+
}
|
|
77
|
+
function artefact_roots() {
|
|
78
|
+
const roots = [];
|
|
79
|
+
if (_exists(_roots.LEGACY_SRC)) {
|
|
80
|
+
roots.push(_roots.LEGACY_SRC);
|
|
81
|
+
}
|
|
82
|
+
if (_exists(_roots.PACKAGES)) {
|
|
83
|
+
for (const pkg of _iterdirSorted(_roots.PACKAGES)) {
|
|
84
|
+
const sub = path.join(pkg, ".agent-src.uncondensed");
|
|
85
|
+
if (_isDir(sub)) {
|
|
86
|
+
roots.push(sub);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (_isDir(_roots.SRC_AGENT)) {
|
|
91
|
+
roots.push(_roots.SRC_AGENT);
|
|
92
|
+
}
|
|
93
|
+
if (_isDir(_roots.SRC_SKILLS) || _isDir(_roots.SRC_RULES)) {
|
|
94
|
+
roots.push(_roots.SRC);
|
|
95
|
+
}
|
|
96
|
+
return roots;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// src/scripts/config/presets.ts
|
|
32
100
|
var _require = createRequire(import.meta.url);
|
|
33
101
|
var PRESET_ID_ENV = "AGENT_CONFIG_PRESET_ID";
|
|
34
102
|
var DEFAULT_PRESET_ID = "balanced";
|
|
@@ -79,7 +147,7 @@ function _load_yaml(p) {
|
|
|
79
147
|
}
|
|
80
148
|
let text;
|
|
81
149
|
try {
|
|
82
|
-
text =
|
|
150
|
+
text = fs2.readFileSync(p, "utf-8");
|
|
83
151
|
} catch (exc) {
|
|
84
152
|
logger.warning("preset read failed for %s: %s", p, String(exc));
|
|
85
153
|
return {};
|
|
@@ -97,8 +165,8 @@ function _load_yaml(p) {
|
|
|
97
165
|
return _isPlainDict(data) ? data : {};
|
|
98
166
|
}
|
|
99
167
|
function _preset_file(project_root, preset_id) {
|
|
100
|
-
const legacy =
|
|
101
|
-
if (
|
|
168
|
+
const legacy = path2.join(project_root, PRESETS_DIRNAME, `${preset_id}.yml`);
|
|
169
|
+
if (_exists2(legacy)) {
|
|
102
170
|
return legacy;
|
|
103
171
|
}
|
|
104
172
|
let roots;
|
|
@@ -108,8 +176,8 @@ function _preset_file(project_root, preset_id) {
|
|
|
108
176
|
return legacy;
|
|
109
177
|
}
|
|
110
178
|
for (const root of roots) {
|
|
111
|
-
const candidate =
|
|
112
|
-
if (
|
|
179
|
+
const candidate = path2.join(root, "presets", `${preset_id}.yml`);
|
|
180
|
+
if (_exists2(candidate)) {
|
|
113
181
|
return candidate;
|
|
114
182
|
}
|
|
115
183
|
}
|
|
@@ -180,7 +248,7 @@ function resolve_preset(params) {
|
|
|
180
248
|
source = SOURCE_DEFAULT;
|
|
181
249
|
}
|
|
182
250
|
const yaml_path = _preset_file(params.project_root, preset_id);
|
|
183
|
-
if (!
|
|
251
|
+
if (!_exists2(yaml_path)) {
|
|
184
252
|
throw new PresetError(
|
|
185
253
|
`preset.id=${_repr(preset_id)} (${source}) but ${yaml_path} not found`
|
|
186
254
|
);
|
|
@@ -242,9 +310,9 @@ function resolve_preset(params) {
|
|
|
242
310
|
overrides
|
|
243
311
|
});
|
|
244
312
|
}
|
|
245
|
-
function
|
|
313
|
+
function _exists2(p) {
|
|
246
314
|
try {
|
|
247
|
-
|
|
315
|
+
fs2.statSync(p);
|
|
248
316
|
return true;
|
|
249
317
|
} catch {
|
|
250
318
|
return false;
|
|
@@ -297,9 +365,9 @@ function _repr(s) {
|
|
|
297
365
|
}
|
|
298
366
|
|
|
299
367
|
// src/scripts/config/profiles.ts
|
|
300
|
-
import * as
|
|
368
|
+
import * as fs3 from "node:fs";
|
|
301
369
|
import { createRequire as createRequire2 } from "node:module";
|
|
302
|
-
import * as
|
|
370
|
+
import * as path3 from "node:path";
|
|
303
371
|
var _require2 = createRequire2(import.meta.url);
|
|
304
372
|
var PROFILE_ID_ENV = "AGENT_CONFIG_PROFILE_ID";
|
|
305
373
|
var DEFAULT_PROFILE_ID = "developer";
|
|
@@ -350,7 +418,7 @@ function _load_yaml2(p) {
|
|
|
350
418
|
}
|
|
351
419
|
let text;
|
|
352
420
|
try {
|
|
353
|
-
text =
|
|
421
|
+
text = fs3.readFileSync(p, "utf-8");
|
|
354
422
|
} catch (exc) {
|
|
355
423
|
logger.warning("profile read failed for %s: %s", p, String(exc));
|
|
356
424
|
return {};
|
|
@@ -368,8 +436,8 @@ function _load_yaml2(p) {
|
|
|
368
436
|
return _isPlainDict2(data) ? data : {};
|
|
369
437
|
}
|
|
370
438
|
function _profile_file(project_root, profile_id) {
|
|
371
|
-
const legacy =
|
|
372
|
-
if (
|
|
439
|
+
const legacy = path3.join(project_root, PROFILES_DIRNAME, `${profile_id}.yml`);
|
|
440
|
+
if (_exists3(legacy)) {
|
|
373
441
|
return legacy;
|
|
374
442
|
}
|
|
375
443
|
let roots;
|
|
@@ -379,8 +447,8 @@ function _profile_file(project_root, profile_id) {
|
|
|
379
447
|
return legacy;
|
|
380
448
|
}
|
|
381
449
|
for (const root of roots) {
|
|
382
|
-
const candidate =
|
|
383
|
-
if (
|
|
450
|
+
const candidate = path3.join(root, "profiles", `${profile_id}.yml`);
|
|
451
|
+
if (_exists3(candidate)) {
|
|
384
452
|
return candidate;
|
|
385
453
|
}
|
|
386
454
|
}
|
|
@@ -432,14 +500,14 @@ function _pick_id2(pack_profile_id, user_settings, runtime_id) {
|
|
|
432
500
|
}
|
|
433
501
|
function resolve_profile(params) {
|
|
434
502
|
const settings = params.user_settings ?? {};
|
|
435
|
-
const settings_file =
|
|
503
|
+
const settings_file = path3.join(params.project_root, DEFAULT_PROJECT_FILE);
|
|
436
504
|
const [profile_id, source] = _pick_id2(
|
|
437
505
|
params.pack_profile_id ?? null,
|
|
438
506
|
settings,
|
|
439
507
|
params.runtime_id ?? null
|
|
440
508
|
);
|
|
441
509
|
if (profile_id === null) {
|
|
442
|
-
if (
|
|
510
|
+
if (_exists3(settings_file)) {
|
|
443
511
|
return new ResolvedProfile({
|
|
444
512
|
id: DEFAULT_PROFILE_ID,
|
|
445
513
|
source: SOURCE_MISSING,
|
|
@@ -453,16 +521,16 @@ function resolve_profile(params) {
|
|
|
453
521
|
);
|
|
454
522
|
}
|
|
455
523
|
const yaml_path = _profile_file(params.project_root, profile_id);
|
|
456
|
-
if (!
|
|
524
|
+
if (!_exists3(yaml_path)) {
|
|
457
525
|
throw new ProfileError(
|
|
458
526
|
`profile.id=${_repr2(profile_id)} (${source}) but ${yaml_path} not found`
|
|
459
527
|
);
|
|
460
528
|
}
|
|
461
529
|
return _build_resolved(profile_id, _load_yaml2(yaml_path), { source });
|
|
462
530
|
}
|
|
463
|
-
function
|
|
531
|
+
function _exists3(p) {
|
|
464
532
|
try {
|
|
465
|
-
|
|
533
|
+
fs3.statSync(p);
|
|
466
534
|
return true;
|
|
467
535
|
} catch {
|
|
468
536
|
return false;
|
|
@@ -482,7 +550,7 @@ function _repr2(s) {
|
|
|
482
550
|
}
|
|
483
551
|
|
|
484
552
|
// src/scripts/_cli/explain_last/index.ts
|
|
485
|
-
import * as
|
|
553
|
+
import * as fs8 from "node:fs";
|
|
486
554
|
|
|
487
555
|
// src/scripts/_cli/explain_last/scrubber.ts
|
|
488
556
|
var LONG_STRING_THRESHOLD = 200;
|
|
@@ -638,8 +706,8 @@ function build(state) {
|
|
|
638
706
|
}
|
|
639
707
|
|
|
640
708
|
// src/scripts/_cli/explain_last/council.ts
|
|
641
|
-
import * as
|
|
642
|
-
import * as
|
|
709
|
+
import * as fs4 from "node:fs";
|
|
710
|
+
import * as path4 from "node:path";
|
|
643
711
|
var RUN_WINDOW_SECONDS = 3600;
|
|
644
712
|
function _pySlice200(s) {
|
|
645
713
|
const cps = Array.from(s);
|
|
@@ -650,26 +718,26 @@ function _firstLine(s) {
|
|
|
650
718
|
return m.length > 0 ? m[0] : void 0;
|
|
651
719
|
}
|
|
652
720
|
function _candidate_files(project_root) {
|
|
653
|
-
const sessions_root =
|
|
721
|
+
const sessions_root = path4.join(
|
|
654
722
|
project_root,
|
|
655
723
|
"agents",
|
|
656
724
|
"runtime",
|
|
657
725
|
"council",
|
|
658
726
|
"sessions"
|
|
659
727
|
);
|
|
660
|
-
const tmp_root =
|
|
728
|
+
const tmp_root = path4.join(project_root, "tmp");
|
|
661
729
|
const candidates = [];
|
|
662
|
-
if (
|
|
730
|
+
if (_isDir2(sessions_root)) {
|
|
663
731
|
for (const sub of _iterdir(sessions_root)) {
|
|
664
|
-
if (
|
|
665
|
-
const candidate =
|
|
666
|
-
if (
|
|
732
|
+
if (_isDir2(sub)) {
|
|
733
|
+
const candidate = path4.join(sub, "council-responses.json");
|
|
734
|
+
if (fs4.existsSync(candidate)) {
|
|
667
735
|
candidates.push(candidate);
|
|
668
736
|
}
|
|
669
737
|
}
|
|
670
738
|
}
|
|
671
739
|
}
|
|
672
|
-
if (
|
|
740
|
+
if (fs4.existsSync(tmp_root)) {
|
|
673
741
|
candidates.push(..._glob(tmp_root, "council-", ".json").sort());
|
|
674
742
|
}
|
|
675
743
|
return candidates;
|
|
@@ -679,7 +747,7 @@ function _pick_recent(candidates, anchor_mtime) {
|
|
|
679
747
|
for (const p of candidates) {
|
|
680
748
|
let mtime;
|
|
681
749
|
try {
|
|
682
|
-
mtime =
|
|
750
|
+
mtime = fs4.statSync(p).mtimeMs / 1e3;
|
|
683
751
|
} catch {
|
|
684
752
|
continue;
|
|
685
753
|
}
|
|
@@ -718,7 +786,7 @@ function _extract_member(entry) {
|
|
|
718
786
|
function build2(project_root, state_file) {
|
|
719
787
|
let anchor;
|
|
720
788
|
try {
|
|
721
|
-
anchor =
|
|
789
|
+
anchor = fs4.statSync(state_file).mtimeMs / 1e3;
|
|
722
790
|
} catch {
|
|
723
791
|
return null;
|
|
724
792
|
}
|
|
@@ -732,7 +800,7 @@ function build2(project_root, state_file) {
|
|
|
732
800
|
}
|
|
733
801
|
let raw;
|
|
734
802
|
try {
|
|
735
|
-
raw = JSON.parse(
|
|
803
|
+
raw = JSON.parse(fs4.readFileSync(picked, "utf-8"));
|
|
736
804
|
} catch {
|
|
737
805
|
return null;
|
|
738
806
|
}
|
|
@@ -751,9 +819,9 @@ function build2(project_root, state_file) {
|
|
|
751
819
|
}
|
|
752
820
|
return members.length > 0 ? members : null;
|
|
753
821
|
}
|
|
754
|
-
function
|
|
822
|
+
function _isDir2(p) {
|
|
755
823
|
try {
|
|
756
|
-
return
|
|
824
|
+
return fs4.statSync(p).isDirectory();
|
|
757
825
|
} catch {
|
|
758
826
|
return false;
|
|
759
827
|
}
|
|
@@ -761,20 +829,20 @@ function _isDir(p) {
|
|
|
761
829
|
function _iterdir(p) {
|
|
762
830
|
let names;
|
|
763
831
|
try {
|
|
764
|
-
names =
|
|
832
|
+
names = fs4.readdirSync(p);
|
|
765
833
|
} catch {
|
|
766
834
|
return [];
|
|
767
835
|
}
|
|
768
|
-
return names.map((n) =>
|
|
836
|
+
return names.map((n) => path4.join(p, n));
|
|
769
837
|
}
|
|
770
838
|
function _glob(dir, prefix, suffix) {
|
|
771
839
|
let names;
|
|
772
840
|
try {
|
|
773
|
-
names =
|
|
841
|
+
names = fs4.readdirSync(dir);
|
|
774
842
|
} catch {
|
|
775
843
|
return [];
|
|
776
844
|
}
|
|
777
|
-
return names.filter((n) => n.startsWith(prefix) && n.endsWith(suffix)).map((n) =>
|
|
845
|
+
return names.filter((n) => n.startsWith(prefix) && n.endsWith(suffix)).map((n) => path4.join(dir, n));
|
|
778
846
|
}
|
|
779
847
|
function _pyTruthy2(value) {
|
|
780
848
|
if (value === null || value === void 0) {
|
|
@@ -853,8 +921,8 @@ function build3(state) {
|
|
|
853
921
|
|
|
854
922
|
// src/scripts/_cli/explain_last/inputs.ts
|
|
855
923
|
import { createRequire as createRequire3 } from "node:module";
|
|
856
|
-
import * as
|
|
857
|
-
import * as
|
|
924
|
+
import * as fs5 from "node:fs";
|
|
925
|
+
import * as path5 from "node:path";
|
|
858
926
|
var _require3 = createRequire3(import.meta.url);
|
|
859
927
|
var _DEFAULT_RULE_LOADING_TIER = "balanced";
|
|
860
928
|
var _SILENCED_LOGGERS = [
|
|
@@ -867,8 +935,8 @@ function _silence_resolver_warnings(body) {
|
|
|
867
935
|
return body();
|
|
868
936
|
}
|
|
869
937
|
function _load_settings(project_root) {
|
|
870
|
-
const p =
|
|
871
|
-
if (!
|
|
938
|
+
const p = path5.join(project_root, DEFAULT_PROJECT_FILE);
|
|
939
|
+
if (!fs5.existsSync(p)) {
|
|
872
940
|
return {};
|
|
873
941
|
}
|
|
874
942
|
return load_agent_settings({ project_path: p }) ?? {};
|
|
@@ -947,10 +1015,10 @@ function build4(project_root) {
|
|
|
947
1015
|
}
|
|
948
1016
|
function _pack_marker(project_root) {
|
|
949
1017
|
for (const candidate of [
|
|
950
|
-
|
|
951
|
-
|
|
1018
|
+
path5.join(project_root, ".agent-pack.yml"),
|
|
1019
|
+
path5.join(project_root, ".agent-src.uncondensed", ".agent-pack.yml")
|
|
952
1020
|
]) {
|
|
953
|
-
if (
|
|
1021
|
+
if (fs5.existsSync(candidate)) {
|
|
954
1022
|
return candidate;
|
|
955
1023
|
}
|
|
956
1024
|
}
|
|
@@ -969,7 +1037,7 @@ function build_pack(project_root) {
|
|
|
969
1037
|
}
|
|
970
1038
|
let raw;
|
|
971
1039
|
try {
|
|
972
|
-
const text =
|
|
1040
|
+
const text = fs5.readFileSync(marker, "utf-8");
|
|
973
1041
|
raw = YAML.parse(text, { version: "1.1" });
|
|
974
1042
|
if (raw === null || raw === void 0) {
|
|
975
1043
|
raw = {};
|
|
@@ -985,7 +1053,7 @@ function build_pack(project_root) {
|
|
|
985
1053
|
if (typeof pack_id !== "string" || pack_id.trim() === "") {
|
|
986
1054
|
return null;
|
|
987
1055
|
}
|
|
988
|
-
const reasonRaw = _pyTruthy4(rawDict.reason) ? rawDict.reason : `declared in ${
|
|
1056
|
+
const reasonRaw = _pyTruthy4(rawDict.reason) ? rawDict.reason : `declared in ${path5.basename(marker)}`;
|
|
989
1057
|
return {
|
|
990
1058
|
id: scrub_string(pack_id.trim()),
|
|
991
1059
|
reason: scrub_string(String(reasonRaw))
|
|
@@ -996,15 +1064,15 @@ function _isOsError(exc) {
|
|
|
996
1064
|
}
|
|
997
1065
|
|
|
998
1066
|
// src/scripts/_cli/explain_last/memory.ts
|
|
999
|
-
import * as
|
|
1000
|
-
import * as
|
|
1067
|
+
import * as fs6 from "node:fs";
|
|
1068
|
+
import * as path6 from "node:path";
|
|
1001
1069
|
var PyFloat = class {
|
|
1002
1070
|
constructor(value) {
|
|
1003
1071
|
this.value = value;
|
|
1004
1072
|
}
|
|
1005
1073
|
value;
|
|
1006
1074
|
};
|
|
1007
|
-
var MEMORY_SIDECAR =
|
|
1075
|
+
var MEMORY_SIDECAR = path6.join(".agent-memory", "hits.jsonl");
|
|
1008
1076
|
function _pyTruthy5(value) {
|
|
1009
1077
|
if (value === null || value === void 0) {
|
|
1010
1078
|
return false;
|
|
@@ -1126,14 +1194,14 @@ function _splitlines(s) {
|
|
|
1126
1194
|
return out;
|
|
1127
1195
|
}
|
|
1128
1196
|
function _from_sidecar(project_root, run_id) {
|
|
1129
|
-
const p =
|
|
1130
|
-
if (!
|
|
1197
|
+
const p = path6.join(project_root, MEMORY_SIDECAR);
|
|
1198
|
+
if (!fs6.existsSync(p)) {
|
|
1131
1199
|
return [];
|
|
1132
1200
|
}
|
|
1133
1201
|
const entries = [];
|
|
1134
1202
|
let content;
|
|
1135
1203
|
try {
|
|
1136
|
-
content =
|
|
1204
|
+
content = fs6.readFileSync(p, "utf-8");
|
|
1137
1205
|
} catch {
|
|
1138
1206
|
return [];
|
|
1139
1207
|
}
|
|
@@ -1241,17 +1309,17 @@ function build6(state) {
|
|
|
1241
1309
|
}
|
|
1242
1310
|
|
|
1243
1311
|
// src/scripts/_cli/explain_last/route.ts
|
|
1244
|
-
import * as
|
|
1245
|
-
import * as
|
|
1312
|
+
import * as fs7 from "node:fs";
|
|
1313
|
+
import * as path7 from "node:path";
|
|
1246
1314
|
var ROUTER_FILENAME = "router.json";
|
|
1247
|
-
var ROUTER_RELATIVE =
|
|
1315
|
+
var ROUTER_RELATIVE = path7.join("dist", ROUTER_FILENAME);
|
|
1248
1316
|
function _load_router(project_root) {
|
|
1249
|
-
const p =
|
|
1250
|
-
if (!
|
|
1317
|
+
const p = path7.join(project_root, ROUTER_RELATIVE);
|
|
1318
|
+
if (!fs7.existsSync(p)) {
|
|
1251
1319
|
return null;
|
|
1252
1320
|
}
|
|
1253
1321
|
try {
|
|
1254
|
-
const parsed = JSON.parse(
|
|
1322
|
+
const parsed = JSON.parse(fs7.readFileSync(p, "utf-8"));
|
|
1255
1323
|
return parsed;
|
|
1256
1324
|
} catch {
|
|
1257
1325
|
return null;
|
|
@@ -1354,7 +1422,7 @@ function _derive_run_id(state, state_file) {
|
|
|
1354
1422
|
}
|
|
1355
1423
|
let mtime = 0;
|
|
1356
1424
|
try {
|
|
1357
|
-
mtime =
|
|
1425
|
+
mtime = fs8.statSync(state_file).mtimeMs / 1e3;
|
|
1358
1426
|
} catch {
|
|
1359
1427
|
mtime = 0;
|
|
1360
1428
|
}
|
|
@@ -1901,8 +1969,8 @@ ${TIP_FOOTER}`;
|
|
|
1901
1969
|
|
|
1902
1970
|
// src/scripts/_cli/cmd_explain.ts
|
|
1903
1971
|
var ROUTER_FILENAME2 = "router.json";
|
|
1904
|
-
var ROUTER_RELATIVE2 =
|
|
1905
|
-
var
|
|
1972
|
+
var ROUTER_RELATIVE2 = path8.join("dist", ROUTER_FILENAME2);
|
|
1973
|
+
var _HERE2 = fileURLToPath2(import.meta.url);
|
|
1906
1974
|
var ArgparseExit = class extends Error {
|
|
1907
1975
|
constructor(code) {
|
|
1908
1976
|
super(`argparse-exit-${code}`);
|
|
@@ -2011,9 +2079,9 @@ function _dumpJson(payload) {
|
|
|
2011
2079
|
process2.stdout.write(_jsonDumpsIndentSortedAscii(payload));
|
|
2012
2080
|
process2.stdout.write("\n");
|
|
2013
2081
|
}
|
|
2014
|
-
function
|
|
2082
|
+
function _exists4(p) {
|
|
2015
2083
|
try {
|
|
2016
|
-
|
|
2084
|
+
fs9.statSync(p);
|
|
2017
2085
|
return true;
|
|
2018
2086
|
} catch {
|
|
2019
2087
|
return false;
|
|
@@ -2038,19 +2106,19 @@ function _resolve_root(arg) {
|
|
|
2038
2106
|
}
|
|
2039
2107
|
}
|
|
2040
2108
|
function _load_user_settings(project_root) {
|
|
2041
|
-
const p =
|
|
2042
|
-
if (!
|
|
2109
|
+
const p = path8.join(project_root, DEFAULT_PROJECT_FILE);
|
|
2110
|
+
if (!_exists4(p)) {
|
|
2043
2111
|
return {};
|
|
2044
2112
|
}
|
|
2045
2113
|
return load_agent_settings({ project_path: p }) || {};
|
|
2046
2114
|
}
|
|
2047
2115
|
function _load_router2(project_root) {
|
|
2048
|
-
const p =
|
|
2049
|
-
if (!
|
|
2116
|
+
const p = path8.join(project_root, ROUTER_RELATIVE2);
|
|
2117
|
+
if (!_exists4(p)) {
|
|
2050
2118
|
return {};
|
|
2051
2119
|
}
|
|
2052
2120
|
try {
|
|
2053
|
-
return JSON.parse(
|
|
2121
|
+
return JSON.parse(fs9.readFileSync(p, { encoding: "utf-8" }));
|
|
2054
2122
|
} catch (exc) {
|
|
2055
2123
|
eprint(`\u274C explain: cannot read ${p}: ${osErrorStr(exc)}`);
|
|
2056
2124
|
throw new SystemExitError(2);
|
|
@@ -2269,7 +2337,7 @@ function _explain_last(project_root, state_file, as_json, quiet) {
|
|
|
2269
2337
|
print("explain last disabled by settings (explain.enable_last)");
|
|
2270
2338
|
return 0;
|
|
2271
2339
|
}
|
|
2272
|
-
const target_state = state_file ||
|
|
2340
|
+
const target_state = state_file || path8.join(project_root, ".work-state.json");
|
|
2273
2341
|
let trace;
|
|
2274
2342
|
try {
|
|
2275
2343
|
trace = build_trace(project_root, target_state);
|
|
@@ -2280,7 +2348,7 @@ function _explain_last(project_root, state_file, as_json, quiet) {
|
|
|
2280
2348
|
if (relativeTo !== null) {
|
|
2281
2349
|
rel = relativeTo;
|
|
2282
2350
|
} else {
|
|
2283
|
-
rel =
|
|
2351
|
+
rel = path8.basename(target_state);
|
|
2284
2352
|
}
|
|
2285
2353
|
const msg = exc.message.split(target_state).join(rel);
|
|
2286
2354
|
eprint(`\u274C explain last: ${msg}`);
|
|
@@ -2296,9 +2364,9 @@ function _explain_last(project_root, state_file, as_json, quiet) {
|
|
|
2296
2364
|
return 0;
|
|
2297
2365
|
}
|
|
2298
2366
|
function relativeToOrNull(p, base) {
|
|
2299
|
-
const rel =
|
|
2367
|
+
const rel = path8.relative(base, p);
|
|
2300
2368
|
if (rel === "") return rel;
|
|
2301
|
-
if (rel.startsWith("..") ||
|
|
2369
|
+
if (rel.startsWith("..") || path8.isAbsolute(rel)) {
|
|
2302
2370
|
return null;
|
|
2303
2371
|
}
|
|
2304
2372
|
return rel;
|
|
@@ -2465,19 +2533,19 @@ function _isCliEntry() {
|
|
|
2465
2533
|
if (process2.argv[1] === void 0) {
|
|
2466
2534
|
return false;
|
|
2467
2535
|
}
|
|
2468
|
-
const argvUrl = pathToFileURL(
|
|
2536
|
+
const argvUrl = pathToFileURL(path8.resolve(process2.argv[1])).href;
|
|
2469
2537
|
if (import.meta.url === argvUrl) {
|
|
2470
2538
|
return true;
|
|
2471
2539
|
}
|
|
2472
2540
|
try {
|
|
2473
|
-
const here =
|
|
2474
|
-
const argv =
|
|
2541
|
+
const here = fs9.realpathSync(fileURLToPath2(import.meta.url));
|
|
2542
|
+
const argv = fs9.realpathSync(path8.resolve(process2.argv[1]));
|
|
2475
2543
|
return here === argv;
|
|
2476
2544
|
} catch {
|
|
2477
2545
|
return false;
|
|
2478
2546
|
}
|
|
2479
2547
|
}
|
|
2480
|
-
if (_isCliEntry() || process2.argv[1] ===
|
|
2548
|
+
if (_isCliEntry() || process2.argv[1] === _HERE2) {
|
|
2481
2549
|
try {
|
|
2482
2550
|
process2.exitCode = main(process2.argv.slice(2));
|
|
2483
2551
|
} catch (e) {
|
|
@@ -9,13 +9,15 @@ import {
|
|
|
9
9
|
KIRO_MARKER,
|
|
10
10
|
ROOCODE_MARKER,
|
|
11
11
|
ZED_MARKER
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QFKQLQ7X.js";
|
|
13
13
|
import "./chunk-XX6TOPD7.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-EJYIGZ3T.js";
|
|
15
|
+
import "./chunk-A3HJ6NTI.js";
|
|
15
16
|
import "./chunk-GRRPEPRN.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-TJIAM5FW.js";
|
|
17
18
|
import "./chunk-HJ6DAJHR.js";
|
|
18
19
|
import "./chunk-NDJLNC6Q.js";
|
|
20
|
+
import "./chunk-523HCFYO.js";
|
|
19
21
|
import {
|
|
20
22
|
resolvePackageRoot
|
|
21
23
|
} from "./chunk-MCJYCQPF.js";
|
|
@@ -2,8 +2,9 @@ import { createRequire as __acCreateRequire } from 'node:module'; const require
|
|
|
2
2
|
import {
|
|
3
3
|
hasBlockingFinding,
|
|
4
4
|
runPreflight
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HYWSRNUX.js";
|
|
6
6
|
import "./chunk-OMIVVCG2.js";
|
|
7
|
+
import "./chunk-523HCFYO.js";
|
|
7
8
|
import {
|
|
8
9
|
resolvePackageRoot
|
|
9
10
|
} from "./chunk-MCJYCQPF.js";
|