@event4u/agent-config 9.29.0 → 9.31.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 +32 -214
- package/README.md +1 -0
- package/dist/agent-src/commands/analyze/inbox.md +22 -1
- package/dist/agent-src/commands/explain-run.md +31 -1
- package/dist/agent-src/commands/team/delegate.md +1 -0
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +4 -1
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +17 -0
- package/dist/agent-src/contexts/execution/subagent-response-contract.md +11 -1
- package/dist/agent-src/rules/preservation-guard.md +9 -0
- package/dist/agent-src/scripts/roadmap_gates.ts +312 -0
- package/dist/agent-src/scripts/update_roadmap_progress.ts +72 -4
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +10 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/cli/registry.js +2 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/{chunk-RCIA67XN.js → chunk-2WCLVDWC.js} +45 -2
- package/dist/cli-delegate/{chunk-66OVWGB5.js → chunk-AG47LAGQ.js} +1 -1
- package/dist/cli-delegate/{chunk-MP3JT3IU.js → chunk-DS6BLDMG.js} +1 -1
- package/dist/cli-delegate/chunk-EJITJBJX.js +172 -0
- package/dist/cli-delegate/{chunk-NZ5N2XQL.js → chunk-ITIQSGOQ.js} +3 -3
- package/dist/cli-delegate/{chunk-LCFJIQ4J.js → chunk-JEJABGKB.js} +110 -6
- package/dist/cli-delegate/chunk-MMJL4TIX.js +18 -0
- package/dist/cli-delegate/{chunk-REKCMYOU.js → chunk-PFBV6XRT.js} +36 -20
- package/dist/cli-delegate/{chunk-OJM3MBJM.js → chunk-QEEB4LHO.js} +22 -35
- package/dist/cli-delegate/chunk-RVGBH4XK.js +142 -0
- package/dist/cli-delegate/{chunk-MMXA5GY7.js → chunk-UVKNIJH2.js} +14 -0
- package/dist/cli-delegate/cmd_analyze_session.js +1 -1
- package/dist/cli-delegate/cmd_brand_status.js +1 -1
- package/dist/cli-delegate/cmd_conformance.js +2861 -96
- package/dist/cli-delegate/cmd_doctor.js +3 -2
- package/dist/cli-delegate/cmd_explain.js +2 -2
- package/dist/cli-delegate/cmd_export.js +4 -4
- package/dist/cli-delegate/cmd_handoff.js +87 -7
- package/dist/cli-delegate/cmd_mcp_available.js +1 -1
- package/dist/cli-delegate/cmd_migrate.js +2 -2
- package/dist/cli-delegate/cmd_packs_active.js +2 -2
- package/dist/cli-delegate/cmd_prune.js +4 -4
- package/dist/cli-delegate/cmd_route_audit.js +3 -2
- package/dist/cli-delegate/cmd_route_explain.js +1 -1
- package/dist/cli-delegate/cmd_session_recycle.js +177 -0
- package/dist/cli-delegate/cmd_settings_get.js +3 -56
- package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
- package/dist/cli-delegate/cmd_settings_set.js +2 -2
- package/dist/cli-delegate/cmd_sync.js +4 -4
- package/dist/cli-delegate/cmd_uninstall.js +4 -4
- package/dist/cli-delegate/cmd_update.js +1 -1
- package/dist/cli-delegate/cmd_upgrade.js +1 -1
- package/dist/cli-delegate/cmd_validate.js +4 -4
- package/dist/cli-delegate/cmd_versions.js +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +7 -7
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.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 +2143 -641
- package/dist/install/install.mjs +133 -14
- package/dist/mcp/registry-manifest.json +2 -2
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +3967 -761
- package/dist/scripts/_lib/agent_settings.js +111 -2
- package/dist/scripts/_lib/agent_settings.js.map +1 -1
- package/dist/server/schemas/settings.js +6 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/ui/assets/index-B5qGYOJo.js +26 -0
- package/dist/ui/assets/index-B5qGYOJo.js.map +1 -0
- package/dist/ui/index.html +1 -1
- package/docs/contracts/settings-classes.md +21 -5
- package/package.json +1 -1
- package/src/agent-src/scripts/roadmap_gates.ts +312 -0
- package/src/agent-src/scripts/update_roadmap_progress.ts +72 -4
- package/src/config/agent-settings.template.yml +36 -0
- package/src/config/dispatch-economy-metrics.json +61 -0
- package/src/config/evaluator-budgets.json +4 -4
- package/src/config/hook-token-budget.json +91 -0
- package/src/config/pack-size-budget.json +3 -2
- package/src/config/recycle-threshold-budget.json +12 -0
- package/src/config/rule-enforcement-baseline.json +86 -0
- package/src/scripts/_cli/cmd_conformance.ts +17 -2
- package/src/scripts/_cli/cmd_session_recycle.ts +226 -0
- package/src/scripts/_cli/explain_last/inputs.ts +13 -0
- package/src/scripts/_dispatch.bash +23 -0
- package/src/scripts/_lib/agent_settings.ts +119 -2
- package/src/scripts/_lib/carrier_divergence.ts +47 -0
- package/src/scripts/_lib/judgment_ladder.ts +254 -2
- package/src/scripts/_lib/orchestration_record.ts +41 -10
- package/src/scripts/_lib/recycle_envelope_paths.ts +35 -0
- package/src/scripts/_lib/self_repair.ts +194 -0
- package/src/scripts/_lib/session_eol.ts +230 -0
- package/src/scripts/_lib/session_role.ts +42 -0
- package/src/scripts/_lib/subagent_capsule.ts +159 -0
- package/src/scripts/_lib/subagent_response.ts +75 -0
- package/src/scripts/ai_council/clients.ts +50 -1
- package/src/scripts/ask_transport.ts +221 -0
- package/src/scripts/bench_hook_injection.ts +234 -0
- package/src/scripts/check_adr_frontmatter.ts +84 -40
- package/src/scripts/check_branch_freshness.ts +1 -0
- package/src/scripts/check_corpus_staleness.ts +18 -4
- package/src/scripts/check_detector_corpus.ts +17 -0
- package/src/scripts/check_gitignore_freshness.ts +42 -8
- package/src/scripts/check_hook_bundle_freshness.ts +20 -0
- package/src/scripts/check_kernel_prefix_stability.ts +1 -0
- package/src/scripts/check_standing_rule_delivery.ts +73 -32
- package/src/scripts/check_static_layer_stability.ts +154 -0
- package/src/scripts/check_suppression_hygiene.ts +48 -0
- package/src/scripts/dispatch_economy_report.ts +448 -0
- package/src/scripts/dispatch_r2_reviewer.ts +15 -2
- package/src/scripts/explain_run.ts +206 -4
- package/src/scripts/generate_settings_reference.ts +1 -0
- package/src/scripts/handoff_context_hook.ts +112 -4
- package/src/scripts/hook_manifest.yaml +117 -10
- package/src/scripts/hooks/concern_registry.ts +8 -0
- package/src/scripts/hooks/delegation_nudge_hook.ts +40 -3
- package/src/scripts/hooks/dispatch_hook.ts +39 -2
- package/src/scripts/hooks/edit_shape_hook.ts +303 -0
- package/src/scripts/hooks/orchestration_record_hook.ts +19 -1
- package/src/scripts/hooks/reread_guard_hook.ts +314 -0
- package/src/scripts/hooks/rtk_wrap_hook.ts +133 -14
- package/src/scripts/hooks/session_eol_hook.ts +268 -0
- package/src/scripts/hooks/turn_end_gate_hook.ts +715 -0
- package/src/scripts/install-hooks.sh +1 -1
- package/src/scripts/language_mirror_hook.ts +143 -1
- package/src/scripts/lint_decision_impact.ts +14 -1
- package/src/scripts/lint_hook_manifest.ts +82 -0
- package/src/scripts/lint_readme_serial_comma.ts +1 -0
- package/src/scripts/lint_rule_enforcement_declaration.ts +347 -0
- package/src/scripts/measure_turn_end_gate.ts +272 -0
- package/src/scripts/orchestration_record.ts +4 -1
- package/src/scripts/rebuild_hook_bundle.ts +1 -0
- package/src/scripts/report_carrier_divergence.ts +72 -24
- package/src/scripts/report_conformance_funnel.ts +291 -0
- package/src/scripts/report_imperative_density.ts +1 -0
- package/src/scripts/routing_doctor.ts +97 -0
- package/src/scripts/self_repair_cli.ts +51 -3
- package/src/scripts/session_eol_report.ts +261 -0
- package/src/server/schemas/settings.ts +14 -0
- package/src/templates/compact-instructions.md +40 -0
- package/dist/ui/assets/index-JDAF00bC.js +0 -26
- package/dist/ui/assets/index-JDAF00bC.js.map +0 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/scripts/_lib/recycle_envelope_paths.ts
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
var RECYCLE_ENVELOPE_REL = path.join("agents", "runtime", "state", "recycle-envelope.json");
|
|
6
|
+
var RECYCLE_CONSUMED_REL = path.join(
|
|
7
|
+
"agents",
|
|
8
|
+
"runtime",
|
|
9
|
+
"state",
|
|
10
|
+
"recycle-envelope.consumed.json"
|
|
11
|
+
);
|
|
12
|
+
var RECYCLE_MAX_AGE_HOURS = 48;
|
|
13
|
+
var RECYCLE_ENVELOPE_MAX_BYTES = 6144;
|
|
14
|
+
|
|
15
|
+
// src/scripts/_lib/subagent_capsule.ts
|
|
16
|
+
var EPISTEMIC_STATES = ["verified", "assumed", "gap"];
|
|
17
|
+
var EPISTEMIC = new Set(EPISTEMIC_STATES);
|
|
18
|
+
var MAX_REF_CHARS = 200;
|
|
19
|
+
var MAX_LINE_CHARS = 240;
|
|
20
|
+
var MAX_ENTRIES = 40;
|
|
21
|
+
var CAPSULE_SCHEMA_VERSION = 2;
|
|
22
|
+
function isShortLine(value, max) {
|
|
23
|
+
return typeof value === "string" && value.length > 0 && value.length <= max && !value.includes("\n");
|
|
24
|
+
}
|
|
25
|
+
function checkList(errors, field, value, max, required) {
|
|
26
|
+
if (value === void 0) {
|
|
27
|
+
if (required) errors.push(`${field} is required`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (!Array.isArray(value)) {
|
|
31
|
+
errors.push(`${field} must be an array`);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (value.length > MAX_ENTRIES) {
|
|
35
|
+
errors.push(`${field} carries ${value.length} entries (max ${MAX_ENTRIES}) \u2014 a capsule is a handoff, not a transcript`);
|
|
36
|
+
}
|
|
37
|
+
const bad = value.filter((x) => !isShortLine(x, max));
|
|
38
|
+
if (bad.length > 0) {
|
|
39
|
+
errors.push(
|
|
40
|
+
`${field} carries ${bad.length} entr${bad.length === 1 ? "y" : "ies"} that are not single lines of \u2264 ${max} chars (refs and short lines only, never bodies)`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var RECYCLE_ENVELOPE_KEYS = /* @__PURE__ */ new Set([
|
|
45
|
+
"capsule_version",
|
|
46
|
+
"variant",
|
|
47
|
+
"summary",
|
|
48
|
+
"task",
|
|
49
|
+
"workspace",
|
|
50
|
+
"written_at",
|
|
51
|
+
"acceptance_criteria",
|
|
52
|
+
"remaining",
|
|
53
|
+
"not_carried_forward",
|
|
54
|
+
"decisions",
|
|
55
|
+
"constraints",
|
|
56
|
+
"open_worker_envelopes",
|
|
57
|
+
"artifact_paths",
|
|
58
|
+
"assumptions"
|
|
59
|
+
]);
|
|
60
|
+
function validateRecycleEnvelope(input) {
|
|
61
|
+
const errors = [];
|
|
62
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) {
|
|
63
|
+
return ["not an object"];
|
|
64
|
+
}
|
|
65
|
+
const e = input;
|
|
66
|
+
for (const key of Object.keys(e)) {
|
|
67
|
+
if (!RECYCLE_ENVELOPE_KEYS.has(key)) {
|
|
68
|
+
errors.push(
|
|
69
|
+
`unknown field "${key}" \u2014 a recycle envelope carries selection and pointers only; free-form additions (prose summaries included) are schema-invalid by construction`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (e["capsule_version"] !== CAPSULE_SCHEMA_VERSION) {
|
|
74
|
+
errors.push(`capsule_version must be ${CAPSULE_SCHEMA_VERSION}`);
|
|
75
|
+
}
|
|
76
|
+
if (e["variant"] !== "main_session") {
|
|
77
|
+
errors.push("variant must be 'main_session'");
|
|
78
|
+
}
|
|
79
|
+
if (!isShortLine(e["summary"], MAX_LINE_CHARS)) {
|
|
80
|
+
errors.push(`summary must be a single line of 1\u2013${MAX_LINE_CHARS} chars`);
|
|
81
|
+
}
|
|
82
|
+
if (!isShortLine(e["task"], MAX_LINE_CHARS)) {
|
|
83
|
+
errors.push(`task must be a single line of 1\u2013${MAX_LINE_CHARS} chars`);
|
|
84
|
+
}
|
|
85
|
+
if (!isShortLine(e["workspace"], MAX_REF_CHARS)) {
|
|
86
|
+
errors.push(`workspace must be a path ref of \u2264 ${MAX_REF_CHARS} chars`);
|
|
87
|
+
}
|
|
88
|
+
const writtenAt = e["written_at"];
|
|
89
|
+
if (typeof writtenAt !== "string" || Number.isNaN(Date.parse(writtenAt))) {
|
|
90
|
+
errors.push("written_at must be a parseable ISO-8601 timestamp");
|
|
91
|
+
}
|
|
92
|
+
checkList(errors, "acceptance_criteria", e["acceptance_criteria"], MAX_LINE_CHARS, true);
|
|
93
|
+
if (Array.isArray(e["acceptance_criteria"]) && e["acceptance_criteria"].length === 0) {
|
|
94
|
+
errors.push('acceptance_criteria must carry at least one entry \u2014 the successor cannot know "done" without it');
|
|
95
|
+
}
|
|
96
|
+
checkList(errors, "remaining", e["remaining"], MAX_LINE_CHARS, true);
|
|
97
|
+
checkList(errors, "not_carried_forward", e["not_carried_forward"], MAX_LINE_CHARS, true);
|
|
98
|
+
checkList(errors, "decisions", e["decisions"], MAX_LINE_CHARS, false);
|
|
99
|
+
checkList(errors, "constraints", e["constraints"], MAX_LINE_CHARS, false);
|
|
100
|
+
checkList(errors, "open_worker_envelopes", e["open_worker_envelopes"], MAX_REF_CHARS, false);
|
|
101
|
+
checkList(errors, "artifact_paths", e["artifact_paths"], MAX_REF_CHARS, false);
|
|
102
|
+
const assumptions = e["assumptions"];
|
|
103
|
+
if (assumptions !== void 0) {
|
|
104
|
+
if (!Array.isArray(assumptions)) {
|
|
105
|
+
errors.push("assumptions must be an array");
|
|
106
|
+
} else {
|
|
107
|
+
if (assumptions.length > MAX_ENTRIES) {
|
|
108
|
+
errors.push(`assumptions carries ${assumptions.length} entries (max ${MAX_ENTRIES})`);
|
|
109
|
+
}
|
|
110
|
+
for (const [i, raw] of assumptions.entries()) {
|
|
111
|
+
errors.push(...validateAssumption(raw, `assumptions[${i}]`));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return errors;
|
|
116
|
+
}
|
|
117
|
+
function validateAssumption(input, label = "assumption") {
|
|
118
|
+
const errors = [];
|
|
119
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) {
|
|
120
|
+
return [`${label} is not an object`];
|
|
121
|
+
}
|
|
122
|
+
const a = input;
|
|
123
|
+
if (!isShortLine(a["statement"], MAX_LINE_CHARS)) {
|
|
124
|
+
errors.push(`${label}.statement must be a single line of 1\u2013${MAX_LINE_CHARS} chars`);
|
|
125
|
+
}
|
|
126
|
+
if (!isShortLine(a["basis"], MAX_REF_CHARS)) {
|
|
127
|
+
errors.push(`${label}.basis must be a ref token (file:line, id, path, command) of \u2264 ${MAX_REF_CHARS} chars`);
|
|
128
|
+
}
|
|
129
|
+
if (typeof a["epistemic_state"] !== "string" || !EPISTEMIC.has(a["epistemic_state"])) {
|
|
130
|
+
errors.push(`${label}.epistemic_state must be one of ${EPISTEMIC_STATES.join(" | ")}`);
|
|
131
|
+
}
|
|
132
|
+
return errors;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export {
|
|
136
|
+
RECYCLE_ENVELOPE_REL,
|
|
137
|
+
RECYCLE_CONSUMED_REL,
|
|
138
|
+
RECYCLE_MAX_AGE_HOURS,
|
|
139
|
+
RECYCLE_ENVELOPE_MAX_BYTES,
|
|
140
|
+
CAPSULE_SCHEMA_VERSION,
|
|
141
|
+
validateRecycleEnvelope
|
|
142
|
+
};
|
|
@@ -4374,6 +4374,9 @@ var settingsSchema = external_exports.object({
|
|
|
4374
4374
|
judge_model: external_exports.string().default("").describe(
|
|
4375
4375
|
"Override the model used for review / judge subagents that critique implementer output. Empty (default) = one tier above the implementer model \u2014 picks up nuance the implementer missed."
|
|
4376
4376
|
),
|
|
4377
|
+
model_ceiling: external_exports.string().default("").describe(
|
|
4378
|
+
"Session-wide model CEILING for subagents (spend cap). Empty (default) = no ceiling. When set, suite-owned CLI spawn wrappers export CLAUDE_CODE_SUBAGENT_MODEL to the sessions they launch. Class C: a human sets it; the agent never writes or infers one."
|
|
4379
|
+
),
|
|
4377
4380
|
max_parallel: external_exports.number().int().min(1).default(3).describe(
|
|
4378
4381
|
"Hard cap on subagents running in parallel during /do-in-parallel, /do-competitively, and /judge runs. Raise for faster fan-out, lower if you hit rate limits or want lower token spend."
|
|
4379
4382
|
),
|
|
@@ -4540,6 +4543,17 @@ var settingsSchema = external_exports.object({
|
|
|
4540
4543
|
enabled: external_exports.boolean().default(false).describe(
|
|
4541
4544
|
"PreToolUse code-graph nudge (ADR-124 Phase 4). Default off. When on AND a native code-graph cache or a consumer-shipped graph.json/SCIP index is present, warns once per session (never blocks) as the agent is about to Grep/Glob or Read a source file \u2014 query the graph first for who-calls/where-used/impact questions (or rebuild if stale, build if absent). Source G\u2019s strict block-first-read mode is deliberately un-ported."
|
|
4542
4545
|
)
|
|
4546
|
+
}).default({}),
|
|
4547
|
+
turn_end_gate: external_exports.object({
|
|
4548
|
+
enabled: external_exports.boolean().default(false).describe(
|
|
4549
|
+
"Stop-slot turn-end gate (road-to-conformance-round5 Phase 3). Default off, and it is the only concern that can REFUSE a turn-end rather than a tool call \u2014 so it soaks behind an explicit opt-in before it binds. Round 5 measured the reason: both blocking carriers reached zero violations, neither advisory carrier did, and 19 wrong-language replies survived a pin that had fired 26-35 seconds earlier. A refused turn continues in the SAME turn and is never refused twice."
|
|
4550
|
+
),
|
|
4551
|
+
promissory: external_exports.boolean().default(true).describe(
|
|
4552
|
+
"Detector A of the turn-end gate: refuse a turn whose closing paragraph promises work not yet performed while asking the user nothing (20 measured occurrences). No fire rate is quoted here on purpose: the measured rate moved twice while the instrument itself was being corrected, so a number in a shipped description would be a moving target. Re-derive it with `measure-turn-end-gate --store <transcript dir>` against your own corpus before arming the gate. Inert while hooks.turn_end_gate.enabled is false."
|
|
4553
|
+
),
|
|
4554
|
+
language: external_exports.boolean().default(true).describe(
|
|
4555
|
+
"Detector B of the turn-end gate: refuse a turn whose reply is not in the pinned language (19 measured occurrences). Fenced code, inline code, quoted tool output, tables, URLs and paths are stripped first, and the remainder is then scored LEAD-FIRST by the same classifier that sets the pin \u2014 so the verdict usually comes from the reply opening, not from all of it. Sharing that classifier is deliberate: it stops the pin and the detector disagreeing about a turn. Accepted opt-in spellings for the switches below include YAML true/false and yes/no/on/off. Inert while hooks.turn_end_gate.enabled is false."
|
|
4556
|
+
)
|
|
4543
4557
|
}).default({})
|
|
4544
4558
|
}),
|
|
4545
4559
|
decision_engine: external_exports.object({
|
|
@@ -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
|
resolve_project_root
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JEJABGKB.js";
|
|
5
5
|
import "./chunk-NDJLNC6Q.js";
|
|
6
6
|
import "./chunk-J55WI3RR.js";
|
|
7
7
|
|