@event4u/agent-config 14.21.0 → 14.22.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/.augment-plugin/marketplace.json +3 -3
- package/.augment-plugin/plugin.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +198 -0
- package/CREDITS.md +37 -0
- package/dist/agent-src/commands/analyze/inbox.md +380 -5
- package/dist/agent-src/commands/analyze/repo.md +4 -2
- package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +69 -0
- package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +5 -5
- package/dist/agent-src/rules/external-code-graph-interop.md +19 -14
- package/dist/agent-src/rules/token-efficiency.md +26 -3
- package/dist/agent-src/scripts/_cli_entry.ts +51 -0
- package/dist/agent-src/scripts/archive_completed_roadmaps.ts +14 -23
- package/dist/agent-src/scripts/roadmap_gates.ts +4 -20
- package/dist/agent-src/scripts/roadmap_set_step.ts +5 -2
- package/dist/agent-src/scripts/stubs_due.ts +4 -18
- package/dist/agent-src/scripts/update_roadmap_progress.ts +7 -24
- package/dist/agent-src/skills/code-intelligence/SKILL.md +25 -0
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +17 -0
- package/dist/agent-src/templates/agent-settings.md +0 -1
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/cli-delegate/_cli_entry.js +8 -0
- package/dist/cli-delegate/_lib/pin_resolver.js +170 -0
- package/dist/cli-delegate/archival_sweep.js +8 -0
- package/dist/cli-delegate/archive_completed_roadmaps.js +494 -0
- package/dist/cli-delegate/check_update_banner.js +923 -0
- package/dist/cli-delegate/chunk-5EK5WQN6.js +28 -0
- package/dist/cli-delegate/chunk-7XGD2OEU.js +96 -0
- package/dist/cli-delegate/{chunk-643Z7FIC.js → chunk-BIXEDQPZ.js} +6 -0
- package/dist/cli-delegate/chunk-DBH4AHDK.js +155 -0
- package/dist/cli-delegate/chunk-JO25G5H7.js +20 -0
- package/dist/cli-delegate/chunk-LTYVIY76.js +7961 -0
- package/dist/cli-delegate/chunk-QAJS5YWY.js +999 -0
- package/dist/cli-delegate/{chunk-ZVBOHSVF.js → chunk-TGIPZBCW.js} +1 -1
- package/dist/cli-delegate/{chunk-YS6XTLEK.js → chunk-TYSY33MD.js} +56 -6
- package/dist/cli-delegate/chunk-ULET4BYS.js +328 -0
- package/dist/cli-delegate/chunk-YDQSHTD7.js +187 -0
- package/dist/cli-delegate/chunk-YWVXLR44.js +48 -0
- package/dist/cli-delegate/chunk-ZZQBUHFK.js +273 -0
- package/dist/cli-delegate/cmd_conformance.js +2 -2
- package/dist/cli-delegate/cmd_export.js +1 -1
- package/dist/cli-delegate/cmd_handoff.js +26 -2
- package/dist/cli-delegate/cmd_prune.js +1 -1
- package/dist/cli-delegate/cmd_session_recycle.js +2 -2
- package/dist/cli-delegate/cmd_settings_migrate.js +1 -1
- package/dist/cli-delegate/cmd_sync.js +1 -1
- package/dist/cli-delegate/cmd_uninstall.js +1 -1
- package/dist/cli-delegate/cmd_validate.js +1 -1
- package/dist/cli-delegate/dashboard_mode.js +16 -0
- package/dist/cli-delegate/gate_budget.js +24 -0
- package/dist/cli-delegate/gate_execute.js +25 -0
- package/dist/cli-delegate/guarded_baseline.js +18 -0
- package/dist/cli-delegate/resume_probe.js +22 -0
- package/dist/cli-delegate/roadmap_gates.js +638 -0
- package/dist/cli-delegate/roadmap_set_step.js +173 -0
- package/dist/cli-delegate/stub_queue.js +47 -0
- package/dist/cli-delegate/stubs_due.js +38 -0
- package/dist/cli-delegate/ticket_bundles.js +59 -0
- package/dist/cli-delegate/update_roadmap_progress.js +60 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +8 -8
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +2 -2
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +2 -2
- package/dist/hooks/dispatch.js +1193 -917
- package/dist/install/claudeLayerCarriage.js +237 -0
- package/dist/install/claudePathsPlan.js +79 -0
- package/dist/install/hostLayerFingerprint.js +1 -1
- package/dist/install/install.mjs +6 -0
- package/dist/install/partitionEligibility.js +231 -117
- package/dist/install/ruleLayerPartition.js +10 -7
- package/dist/mcp/registry-manifest.json +2 -2
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +39219 -38995
- package/dist/scripts/condense.js +32 -25
- package/docs/MIGRATION.md +49 -1
- package/docs/contracts/settings-classes.md +1 -1
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +73 -0
- package/package.json +7 -4
- package/src/agent-src/scripts/_cli_entry.ts +51 -0
- package/src/agent-src/scripts/archive_completed_roadmaps.ts +14 -23
- package/src/agent-src/scripts/roadmap_gates.ts +4 -20
- package/src/agent-src/scripts/roadmap_set_step.ts +5 -2
- package/src/agent-src/scripts/stubs_due.ts +4 -18
- package/src/agent-src/scripts/update_roadmap_progress.ts +7 -24
- package/src/config/continuity-surface.json +509 -0
- package/src/config/estate-count-budget.json +1 -1
- package/src/config/gate-coverage.yml +29 -8
- package/src/config/gate-violation-baselines.json +8 -8
- package/src/config/gitignore-block.txt +19 -0
- package/src/config/host-injection-effect.json +73 -0
- package/src/config/packed-binary-manifest.json +33 -0
- package/src/config/preamble-payload-budget.json +112 -105
- package/src/config/publish-surface.json +4 -2
- package/src/install/claudeLayerCarriage.ts +273 -0
- package/src/install/claudePathsPlan.ts +76 -0
- package/src/install/hostLayerFingerprint.ts +1 -1
- package/src/install/partitionEligibility.ts +261 -127
- package/src/install/ruleLayerPartition.ts +19 -23
- package/src/scripts/_dispatch.bash +77 -27
- package/src/scripts/_lib/auto_dispatch.ts +2 -2
- package/src/scripts/_lib/catalogue_layer_parity.ts +146 -0
- package/src/scripts/_lib/continuity_surface.ts +296 -0
- package/src/scripts/_lib/corpus_manifest.ts +26 -9
- package/src/scripts/_lib/hook_settings.ts +1 -1
- package/src/scripts/_lib/injection_effect.ts +151 -0
- package/src/scripts/_lib/layer_overlap_notice.ts +50 -6
- package/src/scripts/_lib/packed_binary_predicate.ts +225 -0
- package/src/scripts/_lib/pin_resolver.ts +13 -0
- package/src/scripts/_lib/regression_neighbourhood.ts +1 -1
- package/src/scripts/_lib/retired_status.ts +74 -0
- package/src/scripts/_lib/skill_catalogue.ts +156 -21
- package/src/scripts/_lib/subagent_capsule.ts +117 -8
- package/src/scripts/ai_council/api_transport.ts +5 -0
- package/src/scripts/ai_council/deliberation_metrics.ts +353 -0
- package/src/scripts/ai_council/prompts.ts +9 -0
- package/src/scripts/ai_council/synthesis_disagreement.ts +206 -0
- package/src/scripts/capture_skill_catalogue.ts +24 -11
- package/src/scripts/check_candidate_lines.ts +499 -0
- package/src/scripts/check_continuity_surface.ts +475 -0
- package/src/scripts/check_dependency_floors.ts +13 -6
- package/src/scripts/check_estate_count.ts +40 -79
- package/src/scripts/check_pack_size.ts +262 -23
- package/src/scripts/check_roadmap_trackable.ts +19 -16
- package/src/scripts/check_rule_layer_partition.ts +54 -34
- package/src/scripts/check_single_delivery.ts +97 -31
- package/src/scripts/check_update_banner.ts +13 -0
- package/src/scripts/code_graph/build.ts +138 -15
- package/src/scripts/code_graph/cli.ts +76 -8
- package/src/scripts/code_graph/extract.ts +11 -0
- package/src/scripts/code_graph/grammar_probe.ts +43 -0
- package/src/scripts/code_graph/loader.ts +88 -14
- package/src/scripts/code_graph/query.ts +121 -11
- package/src/scripts/code_graph/resolution_tiers.ts +238 -0
- package/src/scripts/code_graph/sqlite_store.ts +247 -6
- package/src/scripts/code_graph/types.ts +66 -1
- package/src/scripts/code_graph/validate.ts +23 -0
- package/src/scripts/condense.ts +34 -22
- package/src/scripts/corpus_manifest.ts +5 -5
- package/src/scripts/council_cli.ts +11 -12
- package/src/scripts/count_intent_disagreement.ts +426 -0
- package/src/scripts/handoff_context_hook.ts +79 -0
- package/src/scripts/hook_effect_doctor.ts +82 -1
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +64 -12
- package/src/scripts/hooks/chain_nudge_hook.ts +282 -0
- package/src/scripts/hooks/code_graph_context_hook.ts +212 -0
- package/src/scripts/hooks/concern_registry.ts +4 -2
- package/src/scripts/hooks/host_semantics.ts +1 -1
- package/src/scripts/hooks/orchestration_record_hook.ts +2 -2
- package/src/scripts/hooks/rule_inject_hook.ts +1 -1
- package/src/scripts/hooks/skill_route_hook.ts +11 -4
- package/src/scripts/inbox_source_census.ts +322 -0
- package/src/scripts/install-hooks.sh +82 -0
- package/src/scripts/{lint_carrier_integrity.ts → lint_deferral_integrity.ts} +60 -214
- package/src/scripts/lint_plan_risk_register.ts +13 -17
- package/src/scripts/mcp_server/suggest_skill.ts +72 -0
- package/src/scripts/mcp_server/tools.ts +2 -56
- package/src/scripts/media/lib/adapter-contract.md +7 -2
- package/src/scripts/media/lib/fixtures/flux/asset-0001.png +0 -0
- package/src/scripts/media/lib/fixtures/gemini-image/asset-0001.png +0 -0
- package/src/scripts/media/lib/fixtures/ideogram/asset-0001.png +0 -0
- package/src/scripts/rdp_candidates_delta.ts +276 -0
- package/src/scripts/rdp_quality_eval.ts +217 -19
- package/src/scripts/release_mix_taxonomy.json +3 -2
- package/src/scripts/report_host_injection_effect.ts +189 -0
- package/src/scripts/report_layer_overlap.ts +41 -0
- package/src/scripts/report_skill_menu_census.ts +341 -0
- package/src/scripts/skill_tools/score_skill_relevance.ts +70 -6
- package/src/scripts/skill_tools/suggest_skill_for_task.ts +37 -3
- package/src/vendor/grammars/README.md +61 -0
- package/src/vendor/grammars/tree-sitter-javascript.wasm +0 -0
- package/src/vendor/grammars/tree-sitter-php.wasm +0 -0
- package/src/vendor/grammars/tree-sitter-typescript.wasm +0 -0
- package/src/scripts/_lib/carrier_status.ts +0 -118
- package/src/scripts/_lib/estate_carrier_cases.ts +0 -72
- package/src/scripts/hooks/code_graph_nudge_hook.ts +0 -191
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/agent-src/scripts/resume_probe.ts
|
|
4
|
+
import * as fs from "node:fs";
|
|
5
|
+
import * as path from "node:path";
|
|
6
|
+
var RESUME_LINE_RE = /\b(blocked until|resume when|blocked-until|resume-when)\b/i;
|
|
7
|
+
var COMPOUND_RE = /\bboth\b|\band\b|\([1-9]\)|\([a-e]\)|`[ \t]*\+|\+[ \t]*`/i;
|
|
8
|
+
var FIELD_LABEL_RE = /\*\*[^*]+:\*\*/;
|
|
9
|
+
var ROADMAP_REF_RE = /\broad-to-[a-z0-9][a-z0-9-]*\b/g;
|
|
10
|
+
var REPO_PATH_RE = /`((?:agents|docs|src|tests|internal|scripts|evals|\.github)\/[A-Za-z0-9._\-/]*[A-Za-z0-9_\-]\.[A-Za-z0-9]{2,5})`/g;
|
|
11
|
+
var STEP_REF_RE = /\b(?:P|Phase[ \t]+)?(\d+\.\d+)\b/;
|
|
12
|
+
function _read(p) {
|
|
13
|
+
try {
|
|
14
|
+
return fs.readFileSync(p, "utf-8");
|
|
15
|
+
} catch {
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function _exists(p) {
|
|
20
|
+
try {
|
|
21
|
+
return fs.statSync(p).isFile();
|
|
22
|
+
} catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function roadmapDisposition(roadmapRoot, slug) {
|
|
27
|
+
const name = `${slug}.md`;
|
|
28
|
+
if (_exists(path.join(roadmapRoot, name))) {
|
|
29
|
+
return "active";
|
|
30
|
+
}
|
|
31
|
+
for (const dir of ["archive", "later", "skipped"]) {
|
|
32
|
+
if (_exists(path.join(roadmapRoot, dir, name))) {
|
|
33
|
+
return dir;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return "missing";
|
|
37
|
+
}
|
|
38
|
+
function extractCondition(text) {
|
|
39
|
+
const lines = _blankFencedCode(text).split(/\r?\n/);
|
|
40
|
+
const start = lines.findIndex(
|
|
41
|
+
(l) => _strip(l).startsWith(">") && RESUME_LINE_RE.test(l)
|
|
42
|
+
);
|
|
43
|
+
if (start === -1) {
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
const parts = [_strip(lines[start])];
|
|
47
|
+
for (let i = start + 1; i < lines.length; i++) {
|
|
48
|
+
const l = _strip(lines[i]);
|
|
49
|
+
if (!l.startsWith(">")) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
const body = _strip(l.replace(/^>[ \t]?/, ""));
|
|
53
|
+
if (body === "") {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
parts.push(body);
|
|
57
|
+
}
|
|
58
|
+
const joined = parts.map((p) => _strip(p.replace(/^>[ \t]?/, ""))).join(" ").trim();
|
|
59
|
+
return _truncateAtNextField(joined);
|
|
60
|
+
}
|
|
61
|
+
function _truncateAtNextField(condition) {
|
|
62
|
+
let cut = condition.length;
|
|
63
|
+
const re = new RegExp(FIELD_LABEL_RE.source, "g");
|
|
64
|
+
let m;
|
|
65
|
+
while ((m = re.exec(condition)) !== null) {
|
|
66
|
+
const label = m[0];
|
|
67
|
+
if (RESUME_LINE_RE.test(label)) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (m.index === 0) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
cut = m.index;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
return _strip(condition.slice(0, cut));
|
|
77
|
+
}
|
|
78
|
+
function _strip(s) {
|
|
79
|
+
return s.replace(/^[ \t\f\v]+|[ \t\f\v\r]+$/g, "");
|
|
80
|
+
}
|
|
81
|
+
function _blankFencedCode(text) {
|
|
82
|
+
return text.replace(
|
|
83
|
+
/^[ \t]*```[^\n]*\n[\s\S]*?^[ \t]*```[ \t]*$/gm,
|
|
84
|
+
(m) => "\n".repeat((m.match(/\n/g) ?? []).length)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
function _sentenceHead(s) {
|
|
88
|
+
const balanced = (s.match(/`/g) ?? []).length % 2 === 0;
|
|
89
|
+
let inCode = false;
|
|
90
|
+
for (let i = 0; i < s.length; i++) {
|
|
91
|
+
const ch = s[i];
|
|
92
|
+
if (ch === "`" && balanced) {
|
|
93
|
+
inCode = !inCode;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (!inCode && (ch === "." || ch === "\u2014" || ch === "\u2013")) {
|
|
97
|
+
return s.slice(0, i);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return s;
|
|
101
|
+
}
|
|
102
|
+
function conditionClause(condition) {
|
|
103
|
+
const re = /\*\*([^*]+)\*\*/g;
|
|
104
|
+
let m;
|
|
105
|
+
while ((m = re.exec(condition)) !== null) {
|
|
106
|
+
const span = m[1];
|
|
107
|
+
if (RESUME_LINE_RE.test(span)) {
|
|
108
|
+
const after = condition.slice(m.index + m[0].length);
|
|
109
|
+
return `${span}${_sentenceHead(after)}`;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return condition;
|
|
113
|
+
}
|
|
114
|
+
var EXISTENCE_PREDICATE_RE = /`(?:agents|docs|src|tests|internal|scripts|evals|\.github)\/[A-Za-z0-9._\-/]+`[ \t]*(?:currently[ \t]+)?exists\b/i;
|
|
115
|
+
function referencedPath(condition) {
|
|
116
|
+
if (!EXISTENCE_PREDICATE_RE.test(condition)) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
const paths = _pathsIn(condition);
|
|
120
|
+
return paths.length === 1 ? paths[0] : null;
|
|
121
|
+
}
|
|
122
|
+
function _pathsIn(condition) {
|
|
123
|
+
REPO_PATH_RE.lastIndex = 0;
|
|
124
|
+
const found = /* @__PURE__ */ new Set();
|
|
125
|
+
let m;
|
|
126
|
+
while ((m = REPO_PATH_RE.exec(condition)) !== null) {
|
|
127
|
+
found.add(m[1]);
|
|
128
|
+
}
|
|
129
|
+
return [...found].sort();
|
|
130
|
+
}
|
|
131
|
+
function referencedRoadmaps(condition, ownSlug) {
|
|
132
|
+
const out = /* @__PURE__ */ new Set();
|
|
133
|
+
ROADMAP_REF_RE.lastIndex = 0;
|
|
134
|
+
let m;
|
|
135
|
+
while ((m = ROADMAP_REF_RE.exec(condition)) !== null) {
|
|
136
|
+
const slug = m[0].replace(/\.md$/, "");
|
|
137
|
+
if (slug !== ownSlug) {
|
|
138
|
+
out.add(slug);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return [...out].sort();
|
|
142
|
+
}
|
|
143
|
+
function stepIsDone(text, stepId) {
|
|
144
|
+
const escaped = stepId.replace(/\./g, "\\.");
|
|
145
|
+
const re = new RegExp(
|
|
146
|
+
`^[ \\t]*-[ \\t]*\\[([ xX~-])\\][ \\t]*\\*{0,2}(?:P|Phase[ \\t]+)?${escaped}\\b`,
|
|
147
|
+
"m"
|
|
148
|
+
);
|
|
149
|
+
const m = re.exec(text);
|
|
150
|
+
if (!m) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
return m[1].toLowerCase() === "x";
|
|
154
|
+
}
|
|
155
|
+
function probeLater(roadmapRoot, repoRootArg) {
|
|
156
|
+
const repoRoot = repoRootArg ?? path.resolve(roadmapRoot, "..", "..");
|
|
157
|
+
const laterDir = path.join(roadmapRoot, "later");
|
|
158
|
+
let entries;
|
|
159
|
+
try {
|
|
160
|
+
entries = fs.readdirSync(laterDir, { withFileTypes: true }).filter((e) => e.isFile() && e.name.endsWith(".md") && e.name !== "README.md").map((e) => e.name).sort();
|
|
161
|
+
} catch {
|
|
162
|
+
return [];
|
|
163
|
+
}
|
|
164
|
+
const findings = [];
|
|
165
|
+
for (const name of entries) {
|
|
166
|
+
const text = _read(path.join(laterDir, name));
|
|
167
|
+
const ownSlug = name.replace(/\.md$/, "");
|
|
168
|
+
const condition = extractCondition(text);
|
|
169
|
+
if (condition === "") {
|
|
170
|
+
findings.push({
|
|
171
|
+
file: `later/${name}`,
|
|
172
|
+
condition: "",
|
|
173
|
+
refs: [],
|
|
174
|
+
verdict: "undecidable",
|
|
175
|
+
why: "no resume-condition line \u2014 lint_roadmap_later_disposition owns that gap"
|
|
176
|
+
});
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
const clause = conditionClause(condition);
|
|
180
|
+
if (COMPOUND_RE.test(clause)) {
|
|
181
|
+
findings.push({
|
|
182
|
+
file: `later/${name}`,
|
|
183
|
+
condition,
|
|
184
|
+
refs: referencedRoadmaps(clause, ownSlug),
|
|
185
|
+
verdict: "undecidable",
|
|
186
|
+
why: "compound condition \u2014 the probe reads the roadmap references and not the rest"
|
|
187
|
+
});
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
const refs = referencedRoadmaps(clause, ownSlug);
|
|
191
|
+
if (refs.length > 0 && _pathsIn(clause).length > 0) {
|
|
192
|
+
findings.push({
|
|
193
|
+
file: `later/${name}`,
|
|
194
|
+
condition,
|
|
195
|
+
refs,
|
|
196
|
+
verdict: "undecidable",
|
|
197
|
+
why: "names a roadmap and a repo path \u2014 a conjunction the probe can only half-weigh"
|
|
198
|
+
});
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
if (refs.length === 0) {
|
|
202
|
+
const rel = referencedPath(clause);
|
|
203
|
+
if (rel !== null) {
|
|
204
|
+
const there = _exists(path.join(repoRoot, rel));
|
|
205
|
+
findings.push({
|
|
206
|
+
file: `later/${name}`,
|
|
207
|
+
condition,
|
|
208
|
+
refs,
|
|
209
|
+
verdict: there ? "fired" : "unmet",
|
|
210
|
+
why: there ? `${rel} exists` : `${rel} does not exist`
|
|
211
|
+
});
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
findings.push({
|
|
215
|
+
file: `later/${name}`,
|
|
216
|
+
condition,
|
|
217
|
+
refs,
|
|
218
|
+
verdict: "undecidable",
|
|
219
|
+
why: "the condition names no roadmap or repo path this tree can resolve"
|
|
220
|
+
});
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
const stepMatch = STEP_REF_RE.exec(clause);
|
|
224
|
+
const stepId = stepMatch ? stepMatch[1] : null;
|
|
225
|
+
const reasons = [];
|
|
226
|
+
let unmet = false;
|
|
227
|
+
let unresolvable = false;
|
|
228
|
+
for (const slug of refs) {
|
|
229
|
+
const where = roadmapDisposition(roadmapRoot, slug);
|
|
230
|
+
if (where === "archive") {
|
|
231
|
+
reasons.push(`${slug} archived`);
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (where === "missing") {
|
|
235
|
+
unresolvable = true;
|
|
236
|
+
reasons.push(`${slug} resolves nowhere`);
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (where === "active" && stepId !== null) {
|
|
240
|
+
const done = stepIsDone(_read(path.join(roadmapRoot, `${slug}.md`)), stepId);
|
|
241
|
+
if (done === true) {
|
|
242
|
+
reasons.push(`${slug} step ${stepId} is ticked`);
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
reasons.push(done === null ? `${slug} has no step ${stepId}` : `${slug} step ${stepId} still open`);
|
|
246
|
+
unmet = true;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
reasons.push(`${slug} still in ${where}`);
|
|
250
|
+
unmet = true;
|
|
251
|
+
}
|
|
252
|
+
const verdict = unmet ? "unmet" : unresolvable ? "undecidable" : "fired";
|
|
253
|
+
findings.push({
|
|
254
|
+
file: `later/${name}`,
|
|
255
|
+
condition,
|
|
256
|
+
refs,
|
|
257
|
+
verdict,
|
|
258
|
+
why: reasons.join("; ")
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
return findings;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export {
|
|
265
|
+
RESUME_LINE_RE,
|
|
266
|
+
roadmapDisposition,
|
|
267
|
+
extractCondition,
|
|
268
|
+
conditionClause,
|
|
269
|
+
referencedPath,
|
|
270
|
+
referencedRoadmaps,
|
|
271
|
+
stepIsDone,
|
|
272
|
+
probeLater
|
|
273
|
+
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
sessionRefusalFile,
|
|
11
11
|
statePathFor,
|
|
12
12
|
validateAssumption
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TYSY33MD.js";
|
|
14
14
|
import {
|
|
15
15
|
readHookStdin
|
|
16
16
|
} from "./chunk-F7DQWYR5.js";
|
|
@@ -3521,7 +3521,7 @@ function classifyLookup(taskText, opts = {}) {
|
|
|
3521
3521
|
lookup_class: p.cls,
|
|
3522
3522
|
route: "primitive",
|
|
3523
3523
|
primitive,
|
|
3524
|
-
reason: primitive === p.primitive ? `lookup-class ${p.cls} \u2014 deterministic primitive, no spawn` : `lookup-class ${p.cls} \u2014 capped grep; the code-graph accelerant
|
|
3524
|
+
reason: primitive === p.primitive ? `lookup-class ${p.cls} \u2014 deterministic primitive, no spawn` : `lookup-class ${p.cls} \u2014 capped grep; the code-graph accelerant needs a usable graph and the caller passed none`
|
|
3525
3525
|
};
|
|
3526
3526
|
}
|
|
3527
3527
|
}
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
predecessorTracePresent,
|
|
14
14
|
recycle_consumed_rel,
|
|
15
15
|
resolveContinuityRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TGIPZBCW.js";
|
|
17
17
|
import "./chunk-I6RHFQEG.js";
|
|
18
18
|
import {
|
|
19
19
|
hasBoundaryMarker,
|
|
20
20
|
scanEnvelopeDirectives,
|
|
21
21
|
validateRecycleEnvelope,
|
|
22
22
|
wrapAsPriorSessionData
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TYSY33MD.js";
|
|
24
24
|
import {
|
|
25
25
|
readHookStdin
|
|
26
26
|
} from "./chunk-F7DQWYR5.js";
|
|
@@ -359,6 +359,23 @@ function consume_recycle_envelope(root, now = /* @__PURE__ */ new Date(), sessio
|
|
|
359
359
|
warnings.length > 0 ? `recycle envelope consumed (${warnings.length} directive warning(s) surfaced)` : "recycle envelope consumed"
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
|
+
var INJECTING_SOURCES = /* @__PURE__ */ new Set(["", "startup", "clear", "compact"]);
|
|
363
|
+
function sourceGate(source) {
|
|
364
|
+
const s = source.trim();
|
|
365
|
+
if (INJECTING_SOURCES.has(s)) {
|
|
366
|
+
return { inject: true, reason: `source=${s === "" ? "absent" : s}` };
|
|
367
|
+
}
|
|
368
|
+
if (s === "resume" || s === "fork") {
|
|
369
|
+
return {
|
|
370
|
+
inject: false,
|
|
371
|
+
reason: `source=${s} \u2014 the host already restored this conversation; injecting would ` + (s === "fork" ? "consume a record belonging to a session that is still running" : "duplicate context the host just replayed")
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
return {
|
|
375
|
+
inject: false,
|
|
376
|
+
reason: `source=${s} is not a source this reader knows \u2014 injecting nothing rather than guessing`
|
|
377
|
+
};
|
|
378
|
+
}
|
|
362
379
|
function main() {
|
|
363
380
|
let envelope = {};
|
|
364
381
|
try {
|
|
@@ -378,6 +395,13 @@ function main() {
|
|
|
378
395
|
return 0;
|
|
379
396
|
}
|
|
380
397
|
if (event === "session_start") {
|
|
398
|
+
const payload = envelope.payload && typeof envelope.payload === "object" && !Array.isArray(envelope.payload) ? envelope.payload : {};
|
|
399
|
+
const gate = sourceGate(String(payload["source"] ?? envelope["source"] ?? ""));
|
|
400
|
+
if (!gate.inject) {
|
|
401
|
+
process2.stderr.write(`handoff-context-hook: no injection (${gate.reason})
|
|
402
|
+
`);
|
|
403
|
+
return 0;
|
|
404
|
+
}
|
|
381
405
|
const handoff = consume_handoff_context(root);
|
|
382
406
|
const recycle = consume_recycle_envelope(
|
|
383
407
|
root,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
PROJECT_BRIDGE_MARKERS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BIXEDQPZ.js";
|
|
5
5
|
import "./chunk-4FS4WRXP.js";
|
|
6
6
|
import "./chunk-6RJA2F5A.js";
|
|
7
7
|
import "./chunk-WOKWX5PL.js";
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
env_session_id,
|
|
6
6
|
recycle_consumed_rel,
|
|
7
7
|
recycle_envelope_rel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TGIPZBCW.js";
|
|
9
9
|
import {
|
|
10
10
|
CAPSULE_SCHEMA_VERSION,
|
|
11
11
|
validateRecycleEnvelope
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TYSY33MD.js";
|
|
13
13
|
import "./chunk-F7DQWYR5.js";
|
|
14
14
|
import {
|
|
15
15
|
atomic_write_json
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
main
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BIXEDQPZ.js";
|
|
5
5
|
import "./chunk-4FS4WRXP.js";
|
|
6
6
|
import "./chunk-6RJA2F5A.js";
|
|
7
7
|
import "./chunk-WOKWX5PL.js";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __acCreateRequire } from 'node:module'; const require
|
|
|
3
3
|
import {
|
|
4
4
|
PROJECT_BRIDGE_MARKERS,
|
|
5
5
|
USER_SCOPE_PATHS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BIXEDQPZ.js";
|
|
7
7
|
import "./chunk-4FS4WRXP.js";
|
|
8
8
|
import "./chunk-6RJA2F5A.js";
|
|
9
9
|
import "./chunk-WOKWX5PL.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
evaluateDashboardOnDisk,
|
|
4
|
+
evaluateDashboardState,
|
|
5
|
+
isTrackedInGit,
|
|
6
|
+
parseModeToken,
|
|
7
|
+
reportCheckVerdict
|
|
8
|
+
} from "./chunk-7XGD2OEU.js";
|
|
9
|
+
import "./chunk-JO25G5H7.js";
|
|
10
|
+
export {
|
|
11
|
+
evaluateDashboardOnDisk,
|
|
12
|
+
evaluateDashboardState,
|
|
13
|
+
isTrackedInGit,
|
|
14
|
+
parseModeToken,
|
|
15
|
+
reportCheckVerdict
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
GATE_BUDGET_LEDGER_REL,
|
|
4
|
+
ROLLING_WINDOW_DAYS,
|
|
5
|
+
appendGateBudgetReceipt,
|
|
6
|
+
evaluateGateBudget,
|
|
7
|
+
gateBudgetLedgerPath,
|
|
8
|
+
parseBudgetUsd,
|
|
9
|
+
readGateBudgetCaps,
|
|
10
|
+
readGateBudgetLedger,
|
|
11
|
+
rollingSpendUsd
|
|
12
|
+
} from "./chunk-DBH4AHDK.js";
|
|
13
|
+
import "./chunk-JO25G5H7.js";
|
|
14
|
+
export {
|
|
15
|
+
GATE_BUDGET_LEDGER_REL,
|
|
16
|
+
ROLLING_WINDOW_DAYS,
|
|
17
|
+
appendGateBudgetReceipt,
|
|
18
|
+
evaluateGateBudget,
|
|
19
|
+
gateBudgetLedgerPath,
|
|
20
|
+
parseBudgetUsd,
|
|
21
|
+
readGateBudgetCaps,
|
|
22
|
+
readGateBudgetLedger,
|
|
23
|
+
rollingSpendUsd
|
|
24
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
LEDGER_REL,
|
|
4
|
+
appendEvidence,
|
|
5
|
+
commandOf,
|
|
6
|
+
consentLine,
|
|
7
|
+
execute,
|
|
8
|
+
locate
|
|
9
|
+
} from "./chunk-LTYVIY76.js";
|
|
10
|
+
import "./chunk-QAJS5YWY.js";
|
|
11
|
+
import "./chunk-ULET4BYS.js";
|
|
12
|
+
import "./chunk-5EK5WQN6.js";
|
|
13
|
+
import "./chunk-YWVXLR44.js";
|
|
14
|
+
import "./chunk-7XGD2OEU.js";
|
|
15
|
+
import "./chunk-DBH4AHDK.js";
|
|
16
|
+
import "./chunk-YDQSHTD7.js";
|
|
17
|
+
import "./chunk-JO25G5H7.js";
|
|
18
|
+
export {
|
|
19
|
+
LEDGER_REL,
|
|
20
|
+
appendEvidence,
|
|
21
|
+
commandOf,
|
|
22
|
+
consentLine,
|
|
23
|
+
execute,
|
|
24
|
+
locate
|
|
25
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
GUARDED_BASELINE_RE,
|
|
4
|
+
GUARDED_CATEGORIES,
|
|
5
|
+
guardedBaselineProblems,
|
|
6
|
+
guardedBaselineStaleness,
|
|
7
|
+
parseGuardedBaselines,
|
|
8
|
+
reportGuardedBaselines
|
|
9
|
+
} from "./chunk-YDQSHTD7.js";
|
|
10
|
+
import "./chunk-JO25G5H7.js";
|
|
11
|
+
export {
|
|
12
|
+
GUARDED_BASELINE_RE,
|
|
13
|
+
GUARDED_CATEGORIES,
|
|
14
|
+
guardedBaselineProblems,
|
|
15
|
+
guardedBaselineStaleness,
|
|
16
|
+
parseGuardedBaselines,
|
|
17
|
+
reportGuardedBaselines
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
RESUME_LINE_RE,
|
|
4
|
+
conditionClause,
|
|
5
|
+
extractCondition,
|
|
6
|
+
probeLater,
|
|
7
|
+
referencedPath,
|
|
8
|
+
referencedRoadmaps,
|
|
9
|
+
roadmapDisposition,
|
|
10
|
+
stepIsDone
|
|
11
|
+
} from "./chunk-ZZQBUHFK.js";
|
|
12
|
+
import "./chunk-JO25G5H7.js";
|
|
13
|
+
export {
|
|
14
|
+
RESUME_LINE_RE,
|
|
15
|
+
conditionClause,
|
|
16
|
+
extractCondition,
|
|
17
|
+
probeLater,
|
|
18
|
+
referencedPath,
|
|
19
|
+
referencedRoadmaps,
|
|
20
|
+
roadmapDisposition,
|
|
21
|
+
stepIsDone
|
|
22
|
+
};
|