@event4u/agent-config 9.36.0 → 10.1.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 (89) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +117 -2
  3. package/agents/templates/.ai-council.yml.example +31 -51
  4. package/dist/agent-src/commands/analyze/conformance.md +15 -4
  5. package/dist/agent-src/rules/session-canary.md +28 -0
  6. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +17 -0
  7. package/dist/agent-src/skills/adr-create/SKILL.md +5 -0
  8. package/dist/agent-src/skills/check-refs/SKILL.md +5 -0
  9. package/dist/agent-src/skills/lint-skills/SKILL.md +5 -0
  10. package/dist/agent-src/skills/md-language-check/SKILL.md +5 -0
  11. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  12. package/dist/cli-delegate/{chunk-SFGARMAB.js → chunk-2H5SE7DU.js} +24 -4
  13. package/dist/cli-delegate/{chunk-U7CMAIOC.js → chunk-3JUTT26I.js} +1 -1
  14. package/dist/cli-delegate/{chunk-JP53LNVT.js → chunk-HJSKTMIF.js} +6 -14
  15. package/dist/cli-delegate/{chunk-QEEB4LHO.js → chunk-LRXJK6GN.js} +1 -1
  16. package/dist/cli-delegate/{chunk-NR7HSN3P.js → chunk-NX5AXSLD.js} +3 -3
  17. package/dist/cli-delegate/{chunk-AG47LAGQ.js → chunk-TVGXH7VA.js} +1 -1
  18. package/dist/cli-delegate/{chunk-55RI5UXK.js → chunk-XT2YTJCZ.js} +22 -18
  19. package/dist/cli-delegate/{chunk-JEJABGKB.js → chunk-XTC5ARB6.js} +16 -12
  20. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  21. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  22. package/dist/cli-delegate/cmd_conformance.js +1037 -196
  23. package/dist/cli-delegate/cmd_doctor.js +3 -3
  24. package/dist/cli-delegate/cmd_explain.js +2 -2
  25. package/dist/cli-delegate/cmd_export.js +4 -4
  26. package/dist/cli-delegate/cmd_handoff.js +3 -3
  27. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  28. package/dist/cli-delegate/cmd_migrate.js +2 -2
  29. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  30. package/dist/cli-delegate/cmd_prune.js +4 -4
  31. package/dist/cli-delegate/cmd_route_audit.js +2 -2
  32. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  33. package/dist/cli-delegate/cmd_session_recycle.js +1 -1
  34. package/dist/cli-delegate/cmd_settings_get.js +1 -1
  35. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  36. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  37. package/dist/cli-delegate/cmd_sync.js +4 -4
  38. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  39. package/dist/cli-delegate/cmd_update.js +1 -1
  40. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  41. package/dist/cli-delegate/cmd_validate.js +4 -4
  42. package/dist/cli-delegate/cmd_versions.js +1 -1
  43. package/dist/discovery/deprecation-report.md +1 -1
  44. package/dist/discovery/discovery-manifest.json +8 -8
  45. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  46. package/dist/discovery/discovery-manifest.summary.md +1 -1
  47. package/dist/discovery/dormancy-report.md +1 -1
  48. package/dist/discovery/orphan-report.md +1 -1
  49. package/dist/discovery/packs.json +2 -2
  50. package/dist/discovery/trust-report.md +1 -1
  51. package/dist/discovery/workspaces.json +2 -2
  52. package/dist/hooks/dispatch.js +125 -89
  53. package/dist/install/install.mjs +22 -26
  54. package/dist/mcp/registry-manifest.json +1 -1
  55. package/dist/mcp/server.json +2 -2
  56. package/dist/mcp/server.mjs +1579 -616
  57. package/dist/scripts/_lib/agent_settings.js +39 -25
  58. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  59. package/dist/scripts/condense.js +15 -2
  60. package/dist/scripts/condense.js.map +1 -1
  61. package/dist/server/routes/wizard.js +23 -3
  62. package/dist/server/routes/wizard.js.map +1 -1
  63. package/dist/server/schemas/settings.js +6 -6
  64. package/dist/server/schemas/settings.js.map +1 -1
  65. package/docs/contracts/settings-classes.md +14 -9
  66. package/package.json +1 -1
  67. package/src/agent-src/scripts/archive_completed_roadmaps.ts +17 -0
  68. package/src/config/agent-settings.template.yml +6 -36
  69. package/src/config/ci-local-parity.yml +44 -0
  70. package/src/scripts/_lib/agent_settings.ts +39 -25
  71. package/src/scripts/_lib/environment_detector.ts +52 -1
  72. package/src/scripts/_lib/untrusted_content.test.ts +175 -0
  73. package/src/scripts/_lib/untrusted_content.ts +184 -0
  74. package/src/scripts/ai_council/config.ts +62 -24
  75. package/src/scripts/before_complete_hook.ts +39 -0
  76. package/src/scripts/check_bridge_derivation.ts +89 -3
  77. package/src/scripts/check_ci_local_parity.ts +74 -0
  78. package/src/scripts/check_references.ts +15 -1
  79. package/src/scripts/condense.ts +16 -2
  80. package/src/scripts/conformance_scan.ts +200 -9
  81. package/src/scripts/council_cli.ts +95 -3
  82. package/src/scripts/hook_manifest.yaml +12 -6
  83. package/src/scripts/hooks/block_no_verify.ts +82 -9
  84. package/src/scripts/hooks/turn_end_gate_hook.ts +138 -105
  85. package/src/scripts/probe_promissory_closing.ts +180 -0
  86. package/src/scripts/probe_session_canary.ts +180 -0
  87. package/src/scripts/schemas/skill.schema.json +42 -0
  88. package/src/scripts/skill_linter.ts +57 -2
  89. package/src/server/schemas/settings.ts +6 -14
@@ -40,7 +40,6 @@ var _VALID_PROVIDERS = /* @__PURE__ */ new Set([
40
40
  "xai",
41
41
  "perplexity"
42
42
  ]);
43
- var _VALID_MODES = /* @__PURE__ */ new Set(["api", "manual", "cli", "auto"]);
44
43
  var _RAW_KEY_PREFIXES = [
45
44
  "sk-",
46
45
  "sk-ant-",
@@ -303,7 +302,11 @@ function _build_config(raw, source_path) {
303
302
  if (!_isBool(enabled)) {
304
303
  throw new CouncilConfigError("`enabled` must be a bool.");
305
304
  }
306
- const defaults = _build_defaults(_asDict(_getOr(raw, "defaults", {})));
305
+ const ignored_transport_keys = [];
306
+ const defaults = _build_defaults(
307
+ _asDict(_getOr(raw, "defaults", {})),
308
+ ignored_transport_keys
309
+ );
307
310
  const cost_budget = _build_cost_budget(
308
311
  _asDict(_getOr(raw, "cost_budget", {}))
309
312
  );
@@ -315,7 +318,12 @@ function _build_config(raw, source_path) {
315
318
  for (const [name, cfg] of Object.entries(members_raw)) {
316
319
  members.set(
317
320
  name,
318
- _build_member(name, _asDict(_orEmpty(cfg)), defaults.mode)
321
+ _build_member(
322
+ name,
323
+ _asDict(_orEmpty(cfg)),
324
+ defaults.mode,
325
+ ignored_transport_keys
326
+ )
319
327
  );
320
328
  }
321
329
  const advisors_raw = _getOr(raw, "advisors", {});
@@ -414,7 +422,8 @@ function _build_config(raw, source_path) {
414
422
  routing,
415
423
  low_impact,
416
424
  lens_overrides,
417
- source_path
425
+ source_path,
426
+ ignored_transport_keys
418
427
  };
419
428
  }
420
429
  function _orEmpty(value) {
@@ -892,16 +901,14 @@ function _build_consensus_scoring(d) {
892
901
  };
893
902
  }
894
903
  var _VALID_MEMBER_MODES = /* @__PURE__ */ new Set(["cli", "api"]);
895
- function _build_defaults(d) {
904
+ function _build_defaults(d, ignored = []) {
896
905
  if (!_isDict(d)) {
897
906
  throw new CouncilConfigError("`defaults` must be a mapping.");
898
907
  }
899
- const mode = _get(d, "mode", "auto");
900
- if (!(_isStr(mode) && _VALID_MODES.has(mode))) {
901
- throw new CouncilConfigError(
902
- `defaults.mode=${_pyRepr(mode)} not in ${_sortedListRepr(_VALID_MODES)}.`
903
- );
908
+ if (_get(d, "mode", null) !== null) {
909
+ ignored.push("defaults.mode");
904
910
  }
911
+ const mode = "auto";
905
912
  const member_mode = _get(d, "member_mode", "cli");
906
913
  if (!(_isStr(member_mode) && _VALID_MEMBER_MODES.has(member_mode))) {
907
914
  throw new CouncilConfigError(
@@ -1058,7 +1065,7 @@ function _build_cost_budget(d) {
1058
1065
  }
1059
1066
  return cb;
1060
1067
  }
1061
- function _build_member(name, cfg, default_mode = "auto") {
1068
+ function _build_member(name, cfg, default_mode = "auto", ignored = []) {
1062
1069
  if (!_VALID_PROVIDERS.has(name)) {
1063
1070
  throw new CouncilConfigError(
1064
1071
  `members.${name}: unknown provider; valid: ${_sortedListRepr(_VALID_PROVIDERS)}.`
@@ -1069,14 +1076,11 @@ function _build_member(name, cfg, default_mode = "auto") {
1069
1076
  const model = _pyTruthy(modelVal) ? modelVal : "";
1070
1077
  const api_key_ref_raw = _get(cfg, "api_key_ref", null);
1071
1078
  const api_key_ref = api_key_ref_raw === void 0 ? null : api_key_ref_raw;
1072
- const member_mode_raw = _get(cfg, "mode", null);
1073
- const member_mode = member_mode_raw === void 0 ? null : member_mode_raw;
1074
- if (member_mode !== null && !(_isStr(member_mode) && _VALID_MODES.has(member_mode))) {
1075
- throw new CouncilConfigError(
1076
- `members.${name}.mode=${_pyRepr(member_mode)} not in ${_sortedListRepr(_VALID_MODES)}.`
1077
- );
1079
+ if (_get(cfg, "mode", null) !== null) {
1080
+ ignored.push(`members.${name}.mode`);
1078
1081
  }
1079
- const effective_mode = member_mode !== null ? member_mode : default_mode;
1082
+ const member_mode = null;
1083
+ const effective_mode = default_mode;
1080
1084
  const binary_raw = _get(cfg, "binary", null);
1081
1085
  const binary = binary_raw === void 0 ? null : binary_raw;
1082
1086
  if (binary !== null) {
@@ -504,14 +504,18 @@ function load_agent_settings(options = {}) {
504
504
  _warn_removed_always_on_keys(merged);
505
505
  return merged;
506
506
  }
507
- var REMOVED_ALWAYS_ON_KEYS = [
508
- "subagents.enabled",
509
- "subagents.auto",
510
- "subagents.host_capabilities",
511
- "subagents.budget_routing",
512
- "ai_team.enabled"
513
- ];
514
- var _warnedRemovedAlwaysOnKeys = /* @__PURE__ */ new Set();
507
+ var REMOVED_KEYS = /* @__PURE__ */ new Map([
508
+ ["subagents.enabled", "always-on orchestration"],
509
+ ["subagents.auto", "always-on orchestration"],
510
+ ["subagents.host_capabilities", "always-on orchestration"],
511
+ ["subagents.budget_routing", "always-on orchestration"],
512
+ ["ai_team.enabled", "always-on orchestration"],
513
+ ["hooks.turn_end_gate.enabled", "the turn-end gate is always armed"],
514
+ ["hooks.turn_end_gate.promissory", "the turn-end gate is always armed"],
515
+ ["hooks.turn_end_gate.language", "the turn-end gate is always armed"],
516
+ ["hooks.turn_end_gate.verification", "the turn-end gate is always armed"]
517
+ ]);
518
+ var _warnedRemovedKeys = /* @__PURE__ */ new Set();
515
519
  function _readDottedSettingsPath(root, dotted) {
516
520
  let node = root;
517
521
  for (const part of dotted.split(".")) {
@@ -523,15 +527,15 @@ function _readDottedSettingsPath(root, dotted) {
523
527
  return node;
524
528
  }
525
529
  function _warn_removed_always_on_keys(merged) {
526
- for (const key of REMOVED_ALWAYS_ON_KEYS) {
527
- if (_warnedRemovedAlwaysOnKeys.has(key)) {
530
+ for (const [key, reason] of REMOVED_KEYS) {
531
+ if (_warnedRemovedKeys.has(key)) {
528
532
  continue;
529
533
  }
530
534
  if (_readDottedSettingsPath(merged, key) === void 0) {
531
535
  continue;
532
536
  }
533
- _warnedRemovedAlwaysOnKeys.add(key);
534
- process.stderr.write(`${key} was removed (always-on orchestration); ignored.
537
+ _warnedRemovedKeys.add(key);
538
+ process.stderr.write(`${key} was removed (${reason}); ignored.
535
539
  `);
536
540
  }
537
541
  }
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  ProjectRootError,
9
9
  resolve_project_root
10
- } from "./chunk-JEJABGKB.js";
10
+ } from "./chunk-XTC5ARB6.js";
11
11
  import "./chunk-NDJLNC6Q.js";
12
12
  import "./chunk-J55WI3RR.js";
13
13
 
@@ -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-JEJABGKB.js";
4
+ } from "./chunk-XTC5ARB6.js";
5
5
  import "./chunk-NDJLNC6Q.js";
6
6
  import "./chunk-J55WI3RR.js";
7
7