@event4u/agent-config 10.0.0 → 10.2.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.
Files changed (125) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +172 -5
  3. package/README.md +1 -1
  4. package/dist/agent-src/commands/roadmap/next.md +38 -0
  5. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +22 -1
  6. package/dist/agent-src/contexts/contracts/frugality-charter.md +1 -1
  7. package/dist/agent-src/rules/context-hygiene.md +39 -0
  8. package/dist/agent-src/rules/token-budget-discipline.md +3 -2
  9. package/dist/agent-src/rules/token-efficiency.md +22 -0
  10. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +17 -0
  11. package/dist/agent-src/skills/adr-create/SKILL.md +5 -0
  12. package/dist/agent-src/skills/ai-council/SKILL.md +28 -6
  13. package/dist/agent-src/skills/check-refs/SKILL.md +5 -0
  14. package/dist/agent-src/skills/condense-memory/SKILL.md +1 -1
  15. package/dist/agent-src/skills/lint-skills/SKILL.md +5 -0
  16. package/dist/agent-src/skills/md-language-check/SKILL.md +5 -0
  17. package/dist/agent-src/skills/roadmap-writing/SKILL.md +1 -1
  18. package/dist/agent-src/skills/token-optimizer/SKILL.md +5 -1
  19. package/dist/agent-src/templates/agent-settings.md +12 -28
  20. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +2 -2
  21. package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +0 -1
  22. package/dist/cli/registry.js +1 -1
  23. package/dist/cli/registry.js.map +1 -1
  24. package/dist/cli-delegate/{chunk-3JUTT26I.js → chunk-6ENSXSBW.js} +1 -1
  25. package/dist/cli-delegate/{chunk-TVGXH7VA.js → chunk-6LOPHJLD.js} +1 -1
  26. package/dist/cli-delegate/{chunk-XT2YTJCZ.js → chunk-AYKQGIBG.js} +4 -0
  27. package/dist/cli-delegate/{chunk-HJSKTMIF.js → chunk-BV3WR67D.js} +3 -19
  28. package/dist/cli-delegate/{chunk-HTIU3W56.js → chunk-BWMXLD4B.js} +6 -2
  29. package/dist/cli-delegate/{chunk-2H5SE7DU.js → chunk-E4RUZKXB.js} +165 -38
  30. package/dist/cli-delegate/{chunk-XTC5ARB6.js → chunk-IR3IVRVC.js} +7 -2
  31. package/dist/cli-delegate/{chunk-LRXJK6GN.js → chunk-JMQZ7MM5.js} +1 -1
  32. package/dist/cli-delegate/{chunk-NX5AXSLD.js → chunk-X3VOARZD.js} +3 -3
  33. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  34. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  35. package/dist/cli-delegate/cmd_conformance.js +881 -204
  36. package/dist/cli-delegate/cmd_doctor.js +3 -3
  37. package/dist/cli-delegate/cmd_explain.js +2 -2
  38. package/dist/cli-delegate/cmd_export.js +4 -4
  39. package/dist/cli-delegate/cmd_handoff.js +6 -5
  40. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  41. package/dist/cli-delegate/cmd_migrate.js +2 -2
  42. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  43. package/dist/cli-delegate/cmd_prune.js +4 -4
  44. package/dist/cli-delegate/cmd_route_audit.js +2 -2
  45. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  46. package/dist/cli-delegate/cmd_session_recycle.js +44 -9
  47. package/dist/cli-delegate/cmd_settings_get.js +2 -2
  48. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  49. package/dist/cli-delegate/cmd_settings_set.js +2 -2
  50. package/dist/cli-delegate/cmd_sync.js +4 -4
  51. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  52. package/dist/cli-delegate/cmd_update.js +1 -1
  53. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  54. package/dist/cli-delegate/cmd_validate.js +4 -4
  55. package/dist/cli-delegate/cmd_versions.js +1 -1
  56. package/dist/discovery/deprecation-report.md +1 -1
  57. package/dist/discovery/discovery-manifest.json +15 -15
  58. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  59. package/dist/discovery/discovery-manifest.summary.md +1 -1
  60. package/dist/discovery/dormancy-report.md +1 -1
  61. package/dist/discovery/orphan-report.md +1 -1
  62. package/dist/discovery/packs.json +2 -2
  63. package/dist/discovery/trust-report.md +1 -1
  64. package/dist/discovery/workspaces.json +2 -2
  65. package/dist/hooks/dispatch.js +88 -20
  66. package/dist/install/install.mjs +9 -21
  67. package/dist/mcp/registry-manifest.json +1 -1
  68. package/dist/mcp/server.json +2 -2
  69. package/dist/mcp/server.mjs +1359 -492
  70. package/dist/scripts/_lib/agent_settings.js +25 -2
  71. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  72. package/dist/scripts/_lib/compile_time_toggles.js +4 -3
  73. package/dist/scripts/_lib/compile_time_toggles.js.map +1 -1
  74. package/dist/server/io/yamlIO.js +0 -2
  75. package/dist/server/io/yamlIO.js.map +1 -1
  76. package/dist/server/schemas/settings.js +3 -9
  77. package/dist/server/schemas/settings.js.map +1 -1
  78. package/dist/shared/settingsClasses.js +64 -2
  79. package/dist/shared/settingsClasses.js.map +1 -1
  80. package/dist/ui/assets/{index-B5qGYOJo.js → index-5fXOHoVh.js} +2 -2
  81. package/dist/ui/assets/index-5fXOHoVh.js.map +1 -0
  82. package/dist/ui/index.html +1 -1
  83. package/docs/contracts/settings-classes.md +307 -145
  84. package/docs/guidelines/agent-infra/layered-settings.md +1 -2
  85. package/docs/guidelines/agent-infra/symptom-driven-harvest-loop.md +104 -0
  86. package/package.json +1 -1
  87. package/src/agent-src/scripts/archive_completed_roadmaps.ts +17 -0
  88. package/src/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +0 -1
  89. package/src/config/agent-settings.template.yml +12 -30
  90. package/src/config/gate-violation-baselines.json +9 -3
  91. package/src/config/profiles/balanced.ini +0 -2
  92. package/src/config/profiles/full.ini +1 -3
  93. package/src/config/profiles/minimal.ini +0 -2
  94. package/src/scripts/_cli/cmd_session_recycle.ts +66 -9
  95. package/src/scripts/_cli/handoff_sessions.ts +3 -2
  96. package/src/scripts/_lib/agent_settings.ts +25 -2
  97. package/src/scripts/_lib/bench_telegraph.ts +1 -1
  98. package/src/scripts/_lib/cc_transcript.ts +25 -0
  99. package/src/scripts/_lib/compile_time_toggles.ts +4 -3
  100. package/src/scripts/_lib/untrusted_content.test.ts +175 -0
  101. package/src/scripts/_lib/untrusted_content.ts +184 -0
  102. package/src/scripts/ai_council/clients.ts +228 -33
  103. package/src/scripts/cache_realization_report.ts +3 -2
  104. package/src/scripts/check_rule_projection_integrity.ts +3 -1
  105. package/src/scripts/conformance_scan.ts +282 -9
  106. package/src/scripts/cost/track.mjs +10 -4
  107. package/src/scripts/council_cli.ts +33 -3
  108. package/src/scripts/external_sources_denylist.json +3 -1
  109. package/src/scripts/hook_manifest.yaml +17 -6
  110. package/src/scripts/hooks/block_unauthorized_git.ts +54 -8
  111. package/src/scripts/hooks/delegation_nudge_hook.ts +33 -8
  112. package/src/scripts/hooks/evidence_independence.ts +61 -9
  113. package/src/scripts/hooks/session_eol_hook.ts +123 -3
  114. package/src/scripts/hooks/turn_end_gate_hook.ts +31 -0
  115. package/src/scripts/lint_settings_classes.ts +273 -11
  116. package/src/scripts/lint_symptom_intake.ts +241 -0
  117. package/src/scripts/report_consultation_rate.ts +2 -1
  118. package/src/scripts/report_skill_activation.ts +6 -4
  119. package/src/scripts/report_skill_obligation_violations.ts +2 -1
  120. package/src/scripts/schemas/skill.schema.json +42 -0
  121. package/src/scripts/skill_linter.ts +57 -2
  122. package/src/server/io/yamlIO.ts +0 -2
  123. package/src/server/schemas/settings.ts +3 -19
  124. package/src/shared/settingsClasses.ts +93 -2
  125. package/dist/ui/assets/index-B5qGYOJo.js.map +0 -1
@@ -11635,7 +11635,6 @@ var MERGEABLE_KEYS = [
11635
11635
  "personal.bot_icon",
11636
11636
  "personal.pr_comment_bot_icon",
11637
11637
  "personal.autonomy",
11638
- "telegraph.speak_scope",
11639
11638
  // Knowledge-card global cross-project sharing is a USER-GLOBAL setting
11640
11639
  // (ADR-100 / road-to-structure-grounding-v2). Whitelisted so the
11641
11640
  // ~/.event4u/agent-config/agent-settings.yml values are honoured.
@@ -11861,7 +11860,12 @@ var REMOVED_KEYS = /* @__PURE__ */ new Map([
11861
11860
  ["hooks.turn_end_gate.enabled", "the turn-end gate is always armed"],
11862
11861
  ["hooks.turn_end_gate.promissory", "the turn-end gate is always armed"],
11863
11862
  ["hooks.turn_end_gate.language", "the turn-end gate is always armed"],
11864
- ["hooks.turn_end_gate.verification", "the turn-end gate is always armed"]
11863
+ ["hooks.turn_end_gate.verification", "the turn-end gate is always armed"],
11864
+ ["telegraph.speak_scope", "the rule body states its own scope; compile_router gates on telegraph.speak alone"],
11865
+ ["chat_history.max_size_kb", "the rotate command takes --max-kb from argv; session-count pruning bounds the file"],
11866
+ ["chat_history.on_overflow", "the overflow mode comes from the rotate command --mode argv"],
11867
+ ["quality.wait_for_remote_ci", "whether to poll follows from the push plus a detectable remote pipeline"],
11868
+ ["legal_review_prep.consented_at", "the provenance sidecar settings:set writes and consentVerdict reads"]
11865
11869
  ]);
11866
11870
  var _warnedRemovedKeys = /* @__PURE__ */ new Set();
11867
11871
  function _readDottedSettingsPath(root, dotted) {
@@ -21297,21 +21301,37 @@ var WARN_OPS = /* @__PURE__ */ new Set([
21297
21301
  "branch"
21298
21302
  ]);
21299
21303
  var G = "(?:-[A-Za-z-]+(?:=\\S+)?(?:\\s+\\S+)?\\s+)*";
21304
+ var P = "^(?:\\S*\\/)?";
21305
+ function ghApiWrite(pathRe) {
21306
+ return new RegExp(
21307
+ `${P}gh\\s+api\\b(?=[^\\n]*${pathRe})(?=[^\\n]*(?:-X|--method)\\s+(?:POST|PATCH|PUT|DELETE)\\b)`,
21308
+ "i"
21309
+ );
21310
+ }
21300
21311
  var COMMAND_OPS = [
21301
- { op: "publish", re: new RegExp(`\\b(npm|pnpm|yarn)\\s+${G}publish\\b`, "i") },
21302
- { op: "release", re: /\bgh\s+release\s+create\b|\bgh\s+api\b[^\n]*\/releases\b/i },
21312
+ { op: "publish", re: new RegExp(`${P}(npm|pnpm|yarn)\\s+${G}publish\\b`, "i") },
21313
+ {
21314
+ op: "release",
21315
+ re: new RegExp(`${P}gh\\s+release\\s+create\\b|${ghApiWrite("\\/releases\\b").source}`, "i")
21316
+ },
21303
21317
  {
21304
21318
  op: "tag",
21319
+ re: new RegExp(`${P}git\\s+${G}push\\b[^\\n;|&]*(--tags|--follow-tags|refs\\/tags\\/)`, "i")
21320
+ },
21321
+ {
21322
+ op: "pr-merge",
21305
21323
  re: new RegExp(
21306
- `\\bgit\\s+${G}push\\b[^\\n;|&]*(--tags|--follow-tags|refs\\/tags\\/)`,
21324
+ `${P}gh\\s+pr\\s+merge\\b|${ghApiWrite("\\/pulls\\/\\d+\\/merge\\b").source}`,
21307
21325
  "i"
21308
21326
  )
21309
21327
  },
21310
- { op: "pr-merge", re: /\bgh\s+pr\s+merge\b|\bgh\s+api\b[^\n]*\/pulls\/\d+\/merge\b/i },
21311
- { op: "pr-create", re: /\bgh\s+pr\s+create\b|\bgh\s+api\b[^\n]*-X\s+POST[^\n]*\/pulls\b/i },
21312
- { op: "push", re: new RegExp(`\\bgit\\s+${G}push\\b`, "i") },
21313
- { op: "commit", re: new RegExp(`\\bgit\\s+${G}commit\\b`, "i") },
21314
- { op: "branch", re: new RegExp(`\\bgit\\s+${G}(checkout\\s+-b|switch\\s+-c)\\b`, "i") }
21328
+ {
21329
+ op: "pr-create",
21330
+ re: new RegExp(`${P}gh\\s+pr\\s+create\\b|${ghApiWrite("\\/pulls\\b").source}`, "i")
21331
+ },
21332
+ { op: "push", re: new RegExp(`${P}git\\s+${G}push\\b`, "i") },
21333
+ { op: "commit", re: new RegExp(`${P}git\\s+${G}commit\\b`, "i") },
21334
+ { op: "branch", re: new RegExp(`${P}git\\s+${G}(checkout\\s+-b|switch\\s+-c)\\b`, "i") }
21315
21335
  ];
21316
21336
  var COMMAND_TOOLS3 = /* @__PURE__ */ new Set([
21317
21337
  "launch-process",
@@ -21658,7 +21678,7 @@ function isDispatchTool(tool) {
21658
21678
  function isEvaluationPrompt(prompt) {
21659
21679
  return EVALUATION_RE.test(prompt);
21660
21680
  }
21661
- var SELF_SCOPE_RE = /\b(my (work|change|diff|implementation|code|fix|patch|branch|pr)|this (diff|change|branch|pr|delta|implementation|patch)|the delta|the change i|what i (wrote|built|changed|implemented)|i just (wrote|built|changed|implemented))\b/i;
21681
+ var SELF_SCOPE_RE = /\b(my (work|change|diff|implementation|code|fix|patch|branch|pr)|this (diff|change|pr|delta|implementation|patch)|the delta|the change i|what i (wrote|built|changed|implemented)|i just (wrote|built|changed|implemented))\b/i;
21662
21682
  function isSelfScoped(prompt) {
21663
21683
  return SELF_SCOPE_RE.test(prompt);
21664
21684
  }
@@ -21726,11 +21746,14 @@ function decide2(tool, prompt, priorEvaluations) {
21726
21746
  }
21727
21747
  if (priorEvaluations >= 1) {
21728
21748
  return {
21729
- exit: EXIT_BLOCK2,
21730
- stdout: "",
21731
- stderr: `Blocked: second evaluation dispatch of your own work in this turn (verdict shopping). One evaluation has already run; commissioning another with a different prompt or scope selects the answer instead of measuring it. Report what the first pass returned, then re-plan.
21749
+ exit: EXIT_ALLOW10,
21750
+ stdout: `${JSON.stringify({
21751
+ decision: "warn",
21752
+ reason: `Second evaluation dispatch of your own work in this turn. If both passes judge the SAME subject, that is verdict shopping \u2014 commissioning another with a different prompt or scope selects the answer instead of measuring it. Report what the first pass returned, then re-plan. If this is an implementation fan-out rather than a second review, carry on: this check reads prose and cannot tell the two apart with certainty.`
21753
+ })}
21732
21754
  `,
21733
- evaluations: priorEvaluations
21755
+ stderr: "",
21756
+ evaluations: priorEvaluations + 1
21734
21757
  };
21735
21758
  }
21736
21759
  return {
@@ -25066,10 +25089,13 @@ function _isObject13(v) {
25066
25089
  return typeof v === "object" && v !== null && !Array.isArray(v);
25067
25090
  }
25068
25091
  var FILE_TOKEN_RE = /`?\b[\w][\w.\-]{0,80}\.(ts|tsx|js|jsx|mjs|cjs|py|php|rb|go|rs|java|kt|swift|md|mdx|json|ya?ml|css|scss|less|html|vue|svelte|sql|sh|bash|c|cpp|h|hpp|cs|toml|xml)\b`?/gi;
25069
- function detectEnumeratedFiles(text) {
25092
+ var FILE_SIGNAL_FLOOR = 3;
25093
+ function enumeratedFileTokens(text) {
25070
25094
  const matches = text.match(FILE_TOKEN_RE) ?? [];
25071
- const unique = new Set(matches.map((m) => m.replace(/`/g, "").toLowerCase()));
25072
- return unique.size;
25095
+ return [...new Set(matches.map((m) => m.replace(/`/g, "").toLowerCase()))];
25096
+ }
25097
+ function detectEnumeratedFiles(text) {
25098
+ return enumeratedFileTokens(text).length;
25073
25099
  }
25074
25100
  var EXPLICIT_COUNT_RE = /\b(\d+)\s+(files?|modules?|components?|endpoints?|scripts?|skills?|rules?|tickets?|tests?|screens?|pages?|repos?|services?|classes?|functions?|methods?|slices?|tasks?|items?|targets?|routes?|controllers?|Dateien|Module|Tests|Komponenten|Skripte|Regeln|Tickets|Aufgaben|Klassen|Funktionen|Endpunkte)\b/i;
25075
25101
  function detectExplicitSliceCount(text) {
@@ -25121,7 +25147,7 @@ function extractTaskSignals(text) {
25121
25147
  const explicit = detectExplicitSliceCount(text) ?? 0;
25122
25148
  const conjunction = detectMultiDeliverableConjunction(text);
25123
25149
  const forEach = detectForEachShape(text);
25124
- const fileSignal = fileCount >= 3 ? fileCount : 0;
25150
+ const fileSignal = fileCount >= FILE_SIGNAL_FLOOR ? fileCount : 0;
25125
25151
  let slices = Math.max(fileSignal, explicit, conjunction);
25126
25152
  if (slices === 0 && forEach) {
25127
25153
  slices = 2;
@@ -25715,12 +25741,19 @@ function readCiSettled(workspaceRoot2) {
25715
25741
  return { seen: false, settled: false };
25716
25742
  }
25717
25743
  var _COMPLETION_RE = /(^|\n)\s*(?:\*\*)?(?:fertig\b|damit ist alles erledigt|aufgabe erledigt|alles erledigt\b|komplett(?:er)? (?:auftrag|abgearbeitet)|der komplette auftrag ist durch|done[.!]|all done\b|task complete)/i;
25744
+ var _NEGATED_CLAIM_RE = /\b(noch nicht|nicht fertig|nicht durch|wäre verfrüht|ist verfrüht|not yet|not done|isn'?t done|nein)\b/i;
25745
+ function _lineAround(prose, at) {
25746
+ const start = prose.lastIndexOf("\n", at) + 1;
25747
+ const end = prose.indexOf("\n", at);
25748
+ return prose.slice(start, end === -1 ? prose.length : end);
25749
+ }
25718
25750
  function detectCompletionClaim(reply, ci) {
25719
25751
  if (!ci.seen || ci.settled) return null;
25720
25752
  const prose = visibleProse(reply);
25721
25753
  const m = _COMPLETION_RE.exec(prose);
25722
25754
  if (!m) return null;
25723
25755
  const at = m.index;
25756
+ if (_NEGATED_CLAIM_RE.test(_lineAround(prose, at))) return null;
25724
25757
  return {
25725
25758
  detector: "completion",
25726
25759
  evidence: prose.slice(at, at + 120).trim(),
@@ -26492,6 +26525,7 @@ function readState3(file) {
26492
26525
  schema_version: 1,
26493
26526
  counters: parsed.counters,
26494
26527
  advisory_fired_at: typeof parsed.advisory_fired_at === "string" ? parsed.advisory_fired_at : null,
26528
+ missing_envelope_warned_at: typeof parsed.missing_envelope_warned_at === "string" ? parsed.missing_envelope_warned_at : null,
26495
26529
  updated_at: typeof parsed.updated_at === "string" ? parsed.updated_at : ""
26496
26530
  };
26497
26531
  }
@@ -26501,9 +26535,30 @@ function readState3(file) {
26501
26535
  schema_version: 1,
26502
26536
  counters: emptyCounters(),
26503
26537
  advisory_fired_at: null,
26538
+ missing_envelope_warned_at: null,
26504
26539
  updated_at: ""
26505
26540
  };
26506
26541
  }
26542
+ function envelopeExists(workspaceRoot2, since = null) {
26543
+ const target = path66.join(workspaceRoot2, RECYCLE_ENVELOPE_REL);
26544
+ let raw;
26545
+ try {
26546
+ raw = fs64.readFileSync(target, "utf-8");
26547
+ } catch (exc) {
26548
+ return exc?.code !== "ENOENT";
26549
+ }
26550
+ if (since === null) return true;
26551
+ try {
26552
+ const written = JSON.parse(raw).written_at;
26553
+ if (typeof written !== "string") return true;
26554
+ return Date.parse(written) >= Date.parse(since);
26555
+ } catch {
26556
+ return true;
26557
+ }
26558
+ }
26559
+ function buildMissingEnvelopeLine(workspaceRoot2) {
26560
+ return `recycle advised earlier, but no envelope exists at ${path66.join(workspaceRoot2, RECYCLE_ENVELOPE_REL)} \u2014 /clear now starts the successor from nothing. Re-run \`agent-config session:recycle\` and check that it prints the absolute path it wrote before clearing.`;
26561
+ }
26507
26562
  function readThresholdTokens() {
26508
26563
  const override = process11.env[THRESHOLD_OVERRIDE_ENV];
26509
26564
  if (override !== void 0) {
@@ -26514,7 +26569,7 @@ function readThresholdTokens() {
26514
26569
  return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : null;
26515
26570
  }
26516
26571
  function buildAdvisoryLine3(tokens, threshold) {
26517
- return `context past recycle threshold (${tokens.toLocaleString("en-US")} of ${threshold.toLocaleString("en-US")} tokens): run \`agent-config session:recycle\` to write the recycle envelope, then /clear \u2014 the successor session resumes from the envelope at session_start (road-to-token-economy-recycling)`;
26572
+ return `context past recycle threshold (${tokens.toLocaleString("en-US")} of ${threshold.toLocaleString("en-US")} tokens): run \`agent-config session:recycle\` to write the recycle envelope. It prints the absolute path it wrote \u2014 /clear only after you have seen that line. The successor session then resumes from the envelope at session_start (road-to-token-economy-recycling)`;
26518
26573
  }
26519
26574
  function writeContextFill(workspaceRoot2, tokens, threshold, ts) {
26520
26575
  try {
@@ -26563,10 +26618,12 @@ function main45() {
26563
26618
  const threshold = readThresholdTokens();
26564
26619
  const tokens = counters.final_context_tokens;
26565
26620
  const shouldAdvise = threshold !== null && tokens !== null && tokens >= threshold && state.advisory_fired_at === null;
26621
+ const shouldWarnMissing = threshold !== null && state.advisory_fired_at !== null && (state.missing_envelope_warned_at ?? null) === null && !envelopeExists(workspaceRoot2, state.advisory_fired_at);
26566
26622
  const nextState2 = {
26567
26623
  schema_version: 1,
26568
26624
  counters,
26569
26625
  advisory_fired_at: shouldAdvise ? now : state.advisory_fired_at,
26626
+ missing_envelope_warned_at: shouldWarnMissing ? now : state.missing_envelope_warned_at ?? null,
26570
26627
  updated_at: now
26571
26628
  };
26572
26629
  try {
@@ -26581,6 +26638,17 @@ function main45() {
26581
26638
  reason: `session-eol: context ${tokens} >= recycle threshold ${threshold}`,
26582
26639
  additional_context: buildAdvisoryLine3(tokens, threshold)
26583
26640
  })}
26641
+ `
26642
+ );
26643
+ return EXIT_WARN13;
26644
+ }
26645
+ if (shouldWarnMissing) {
26646
+ process11.stdout.write(
26647
+ `${JSON.stringify({
26648
+ decision: "warn",
26649
+ reason: "session-eol: recycle advised, no envelope written",
26650
+ additional_context: buildMissingEnvelopeLine(workspaceRoot2)
26651
+ })}
26584
26652
  `
26585
26653
  );
26586
26654
  return EXIT_WARN13;
@@ -9936,7 +9936,6 @@ var MERGEABLE_KEYS = [
9936
9936
  "personal.bot_icon",
9937
9937
  "personal.pr_comment_bot_icon",
9938
9938
  "personal.autonomy",
9939
- "telegraph.speak_scope",
9940
9939
  // Knowledge-card global cross-project sharing is a USER-GLOBAL setting
9941
9940
  // (ADR-100 / road-to-structure-grounding-v2). Whitelisted so the
9942
9941
  // ~/.event4u/agent-config/agent-settings.yml values are honoured.
@@ -10219,7 +10218,12 @@ var REMOVED_KEYS = /* @__PURE__ */ new Map([
10219
10218
  ["hooks.turn_end_gate.enabled", "the turn-end gate is always armed"],
10220
10219
  ["hooks.turn_end_gate.promissory", "the turn-end gate is always armed"],
10221
10220
  ["hooks.turn_end_gate.language", "the turn-end gate is always armed"],
10222
- ["hooks.turn_end_gate.verification", "the turn-end gate is always armed"]
10221
+ ["hooks.turn_end_gate.verification", "the turn-end gate is always armed"],
10222
+ ["telegraph.speak_scope", "the rule body states its own scope; compile_router gates on telegraph.speak alone"],
10223
+ ["chat_history.max_size_kb", "the rotate command takes --max-kb from argv; session-count pruning bounds the file"],
10224
+ ["chat_history.on_overflow", "the overflow mode comes from the rotate command --mode argv"],
10225
+ ["quality.wait_for_remote_ci", "whether to poll follows from the push plus a detectable remote pipeline"],
10226
+ ["legal_review_prep.consented_at", "the provenance sidecar settings:set writes and consentVerdict reads"]
10223
10227
  ]);
10224
10228
  var _warnedRemovedKeys = /* @__PURE__ */ new Set();
10225
10229
  function _readDottedSettingsPath(root, dotted) {
@@ -14580,7 +14584,6 @@ var userType = external_exports.enum(["", "consultant", "creator", "developer",
14580
14584
  var profileId = external_exports.enum(["developer", "content_creator", "founder", "agency", "finance", "ops"]);
14581
14585
  var accessStyle = external_exports.enum(["getters_setters", "get_attribute", "magic_properties"]);
14582
14586
  var chatFreq = external_exports.enum(["per_turn", "per_phase", "per_tool"]);
14583
- var chatOverflow = external_exports.enum(["rotate", "condense"]);
14584
14587
  var qualityCadence = external_exports.enum(["end_of_roadmap", "per_phase", "per_step"]);
14585
14588
  var regenCadence = external_exports.enum(["per_step", "every_5_steps", "phase_boundary"]);
14586
14589
  var worktreeMode = external_exports.enum(["off", "on", "ask"]);
@@ -14727,12 +14730,6 @@ var settingsSchema = external_exports.object({
14727
14730
  frequency: chatFreq.default("per_turn").describe(
14728
14731
  "How often the chat-history writer flushes to disk. per_turn = after every user / agent exchange (default, lowest data loss on crash). per_phase = at phase boundaries (cheaper I/O). per_tool = after every tool call (highest fidelity, noisiest log)."
14729
14732
  ),
14730
- max_size_kb: external_exports.number().int().min(0).default(2048).describe(
14731
- "Maximum size (KB) of the active chat-history file before chat_history.on_overflow kicks in. Set 0 to disable rotation / condensation entirely (file grows forever)."
14732
- ),
14733
- on_overflow: chatOverflow.default("rotate").describe(
14734
- "What happens when chat_history.max_size_kb is hit. rotate = move the current log aside and start fresh (default). condense = telegraph-condense the oldest entries in place to keep recent context."
14735
- ),
14736
14733
  text_limits: external_exports.object({
14737
14734
  user: external_exports.number().int().min(0).default(0).describe(
14738
14735
  "Per-message character cap for user inputs in the chat-history log. 0 = log verbatim (default). Raise above 0 only if your prompts contain large pasted artefacts you do not want stored."
@@ -14781,9 +14778,6 @@ var settingsSchema = external_exports.object({
14781
14778
  quality: external_exports.object({
14782
14779
  local_auto_run: external_exports.boolean().default(false).describe(
14783
14780
  "Run quality tools (linters, type-checks, formatters) and the local test suite autonomously after edits. Off by default \u2014 the agent never runs quality tools proactively and does not ask; the user runs them manually (e.g. /quality-fix) and remote CI is the authoritative gate. The agent only runs a quality tool on an explicit ask, a concrete CI failure, or the new-gate carve-out. Turn on to restore autonomous pipeline runs."
14784
- ),
14785
- wait_for_remote_ci: external_exports.boolean().default(false).describe(
14786
- "After pushing a branch, poll the remote CI provider (GitHub Actions, GitLab CI) and surface failures inline. Off by default \u2014 useful when local CI does not cover everything the remote pipeline runs."
14787
14781
  )
14788
14782
  }),
14789
14783
  design: external_exports.object({
@@ -14809,12 +14803,9 @@ var settingsSchema = external_exports.object({
14809
14803
  }).default({ identity_allowlist: [], forbid_terminal_capture: true, data_bearing_gate: "on" }),
14810
14804
  telegraph: external_exports.object({
14811
14805
  speak: external_exports.boolean().default(false).describe(
14812
- "Whether the telegraph-speak rule ships at all. false (default) = DORMANT: compile_router omits the rule from dist/router.json entirely, so its body never reaches a host. This \u2014 not speak_scope \u2014 is the lever that stops the cost. Set true only after an output-side bench clears the kill-criterion bar (docs/adrs/telegraph/0002)."
14813
- ),
14814
- speak_scope: external_exports.enum(["off", "reply", "all"]).default("off").describe(
14815
- "Where telegraph condensation applies WHEN speak is true. off (default) = agent reply prose is exempt. compile_router never reads this key: with speak false the rule does not ship, so this setting has no effect on its own. Quote the value in YAML \u2014 bare `off` parses as a boolean under YAML 1.1 and is rejected."
14806
+ "Whether the telegraph-speak rule ships at all. false (default) = DORMANT: compile_router omits the rule from dist/router.json entirely, so its body never reaches a host. This is the only lever that stops the cost. Set true only after an output-side bench clears the kill-criterion bar (docs/adrs/telegraph/0002)."
14816
14807
  )
14817
- }).default({ speak: false, speak_scope: "off" }),
14808
+ }).default({ speak: false }),
14818
14809
  tokens: external_exports.object({
14819
14810
  rich_skills: richSkillsMode.default("on").describe(
14820
14811
  "Whether skills marked token_budget_class: rich may load in full (exempt from telegraph-speak + thin-projector trimming), consumed by the token-budget-discipline rule. on = allowed (default); off = fall back to standard condensed behavior; ask = surface an estimated token delta (tokens, not dollars) and ask once per session before loading."
@@ -15124,13 +15115,10 @@ var settingsSchema = external_exports.object({
15124
15115
  acknowledged: external_exports.boolean().default(false).describe(
15125
15116
  "I understand the legal-review-prep pack provides templates and general information ONLY \u2014 it is NOT legal advice, creates no attorney-client relationship, and never replaces a licensed lawyer. Individual cases require an attorney. The pack stays inactive until this is checked."
15126
15117
  ),
15127
- consented_at: external_exports.string().default("").describe(
15128
- "ISO timestamp recorded when the legal-review-prep acknowledgment was given. Set automatically by the setup wizard; leave empty otherwise."
15129
- ),
15130
15118
  require_council: external_exports.boolean().default(true).describe(
15131
15119
  "Gate legal work-product behind a multi-model AI-council / deep-research pass (defense-in-depth: documented multi-stage review + audit trail; fail-closed when no council is configured). Leave on for the safest posture. Turning it off lets single-model legal output through \u2014 not recommended for a high-risk pack."
15132
15120
  )
15133
- }).default({ acknowledged: false, consented_at: "", require_council: true })
15121
+ }).default({ acknowledged: false, require_council: true })
15134
15122
  });
15135
15123
 
15136
15124
  // node_modules/zod-to-json-schema/dist/esm/Options.js
@@ -9,7 +9,7 @@
9
9
  "homepage": "https://event4u-app.github.io/agent-config",
10
10
  "name": "@event4u/agent-config",
11
11
  "repository": "https://github.com/event4u-app/agent-config",
12
- "version": "10.0.0"
12
+ "version": "10.2.0"
13
13
  },
14
14
  "registries": [
15
15
  {
@@ -9,12 +9,12 @@
9
9
  "transport": {
10
10
  "type": "stdio"
11
11
  },
12
- "version": "10.0.0"
12
+ "version": "10.2.0"
13
13
  }
14
14
  ],
15
15
  "repository": {
16
16
  "source": "github",
17
17
  "url": "https://github.com/event4u-app/agent-config"
18
18
  },
19
- "version": "10.0.0"
19
+ "version": "10.2.0"
20
20
  }