@event4u/agent-config 9.28.0 → 9.29.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 (147) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +6 -6
  3. package/CHANGELOG.md +66 -0
  4. package/README.md +1 -1
  5. package/agents/templates/.ai-council.yml.example +55 -24
  6. package/dist/agent-src/commands/cost/report.md +2 -2
  7. package/dist/agent-src/commands/team/adversarial.md +8 -7
  8. package/dist/agent-src/commands/team/delegate.md +13 -12
  9. package/dist/agent-src/commands/team/review.md +9 -8
  10. package/dist/agent-src/commands/team/status.md +9 -8
  11. package/dist/agent-src/commands/team.md +29 -19
  12. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +88 -2
  13. package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +29 -21
  14. package/dist/agent-src/contexts/execution/host-capability-manifest.md +26 -15
  15. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +18 -0
  16. package/dist/agent-src/contexts/execution/subagent-response-contract.md +54 -0
  17. package/dist/agent-src/contexts/execution/subagent-routing.md +13 -11
  18. package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +25 -0
  19. package/dist/agent-src/contexts/execution/subagent-steering.md +6 -3
  20. package/dist/agent-src/rules/delegation-policy.md +11 -7
  21. package/dist/agent-src/rules/settings-ask-protocol.md +8 -7
  22. package/dist/agent-src/rules/token-budget-discipline.md +1 -1
  23. package/dist/agent-src/skills/forensics-report/SKILL.md +114 -0
  24. package/dist/agent-src/skills/forensics-report/evals/triggers.json +17 -0
  25. package/dist/agent-src/skills/premortem/SKILL.md +30 -1
  26. package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +2 -1
  27. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +7 -5
  28. package/dist/agent-src/skills/subagent-orchestration/schemas/subagent-status.json +61 -3
  29. package/dist/agent-src/skills/test-case-discovery/SKILL.md +1 -1
  30. package/dist/agent-src/templates/AGENTS.md +4 -4
  31. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  32. package/dist/agent-src/templates/roadmaps.md +23 -0
  33. package/dist/cli-delegate/{chunk-22GCIJ2O.js → chunk-66OVWGB5.js} +1 -1
  34. package/dist/cli-delegate/{chunk-GB2FSUEE.js → chunk-LCFJIQ4J.js} +32 -0
  35. package/dist/cli-delegate/{chunk-VSYT7OHO.js → chunk-LVRYBKTI.js} +31 -2
  36. package/dist/cli-delegate/{chunk-DVRS2KVR.js → chunk-MMXA5GY7.js} +10 -17
  37. package/dist/cli-delegate/{chunk-JXARCGVN.js → chunk-MP3JT3IU.js} +1 -1
  38. package/dist/cli-delegate/{chunk-PQSAQKHW.js → chunk-NZ5N2XQL.js} +3 -3
  39. package/dist/cli-delegate/{chunk-7OMQCH4V.js → chunk-OJM3MBJM.js} +1 -1
  40. package/dist/cli-delegate/{chunk-2BE5I2MN.js → chunk-RCIA67XN.js} +111 -90
  41. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  42. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  43. package/dist/cli-delegate/cmd_conformance.js +6 -43
  44. package/dist/cli-delegate/cmd_doctor.js +9 -5
  45. package/dist/cli-delegate/cmd_explain.js +2 -2
  46. package/dist/cli-delegate/cmd_export.js +4 -4
  47. package/dist/cli-delegate/cmd_handoff.js +3 -3
  48. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  49. package/dist/cli-delegate/cmd_migrate.js +2 -2
  50. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  51. package/dist/cli-delegate/cmd_prune.js +4 -4
  52. package/dist/cli-delegate/cmd_route_audit.js +2 -2
  53. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  54. package/dist/cli-delegate/cmd_settings_get.js +1 -7
  55. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  56. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  57. package/dist/cli-delegate/cmd_sync.js +4 -4
  58. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  59. package/dist/cli-delegate/cmd_update.js +1 -1
  60. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  61. package/dist/cli-delegate/cmd_validate.js +4 -4
  62. package/dist/cli-delegate/cmd_versions.js +1 -1
  63. package/dist/discovery/deprecation-report.md +1 -1
  64. package/dist/discovery/discovery-manifest.json +69 -20
  65. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  66. package/dist/discovery/discovery-manifest.summary.md +3 -2
  67. package/dist/discovery/orphan-report.md +1 -1
  68. package/dist/discovery/packs.json +39 -2
  69. package/dist/discovery/trust-report.md +2 -2
  70. package/dist/discovery/workspaces.json +12 -4
  71. package/dist/hooks/dispatch.js +373 -35
  72. package/dist/install/install.mjs +42 -17
  73. package/dist/mcp/registry-manifest.json +2 -2
  74. package/dist/mcp/server.json +2 -2
  75. package/dist/mcp/server.mjs +651 -262
  76. package/dist/router.json +1 -1
  77. package/dist/scripts/_lib/agent_settings.js +54 -0
  78. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  79. package/dist/scripts/condense.js +147 -2
  80. package/dist/scripts/condense.js.map +1 -1
  81. package/dist/server/schemas/settings.js +6 -7
  82. package/dist/server/schemas/settings.js.map +1 -1
  83. package/dist/shared/settingsCarveOut.js +0 -9
  84. package/dist/shared/settingsCarveOut.js.map +1 -1
  85. package/dist/shared/settingsClasses.js +11 -9
  86. package/dist/shared/settingsClasses.js.map +1 -1
  87. package/dist/ui/assets/{index-DmR0mbk4.js → index-JDAF00bC.js} +2 -2
  88. package/dist/ui/assets/{index-DmR0mbk4.js.map → index-JDAF00bC.js.map} +1 -1
  89. package/dist/ui/index.html +1 -1
  90. package/docs/contracts/settings-classes.md +39 -9
  91. package/package.json +1 -1
  92. package/src/agent-src/templates/AGENTS.md +4 -4
  93. package/src/config/agent-settings.template.yml +52 -66
  94. package/src/config/discovery/packs.yml +11 -0
  95. package/src/config/discovery/workspaces.yml +1 -1
  96. package/src/config/gate-violation-baselines.json +3 -3
  97. package/src/scripts/_cli/cmd_conformance.ts +14 -42
  98. package/src/scripts/_cli/cmd_doctor.ts +65 -48
  99. package/src/scripts/_lib/agent_settings.ts +58 -0
  100. package/src/scripts/_lib/auto_dispatch.corpus.test.ts +1 -1
  101. package/src/scripts/_lib/auto_dispatch.ts +23 -18
  102. package/src/scripts/_lib/capsule_trigger.ts +124 -0
  103. package/src/scripts/_lib/host_capability.ts +63 -6
  104. package/src/scripts/_lib/judgment_ladder.ts +382 -0
  105. package/src/scripts/_lib/orchestration_gate.ts +8 -0
  106. package/src/scripts/_lib/orchestration_record.ts +37 -0
  107. package/src/scripts/_lib/orchestration_savings.ts +1 -1
  108. package/src/scripts/_lib/self_repair.ts +160 -13
  109. package/src/scripts/_lib/self_repair_store.ts +28 -0
  110. package/src/scripts/_lib/subagent_capsule.ts +182 -0
  111. package/src/scripts/_lib/subagent_response.ts +19 -0
  112. package/src/scripts/_lib/subagent_spawn.ts +13 -0
  113. package/src/scripts/_lib/subagent_steering.ts +9 -4
  114. package/src/scripts/_lib/tier_budget_routing.ts +6 -1
  115. package/src/scripts/_lib/worker_budget.ts +37 -2
  116. package/src/scripts/ai_council/clients.ts +76 -54
  117. package/src/scripts/ai_council/config.ts +94 -6
  118. package/src/scripts/ai_council/handoff.ts +113 -0
  119. package/src/scripts/ai_council/modes.ts +19 -4
  120. package/src/scripts/ai_council/orchestrator.ts +105 -0
  121. package/src/scripts/ai_council/quorum.ts +84 -0
  122. package/src/scripts/ai_council/session.ts +44 -0
  123. package/src/scripts/ai_council/transport_resolver.ts +127 -1
  124. package/src/scripts/ai_team/availability.ts +110 -0
  125. package/src/scripts/ai_team/config.ts +34 -14
  126. package/src/scripts/ai_team/team_dispatch.ts +71 -29
  127. package/src/scripts/bench_critic_protocol.ts +396 -0
  128. package/src/scripts/check_detector_corpus.ts +202 -0
  129. package/src/scripts/check_hook_bundle_freshness.ts +4 -1
  130. package/src/scripts/condense.ts +162 -2
  131. package/src/scripts/council_cli.ts +401 -25
  132. package/src/scripts/forensics_report.ts +333 -0
  133. package/src/scripts/hooks/delegation_nudge_hook.ts +69 -35
  134. package/src/scripts/lint_discovery_vocabulary.ts +2 -0
  135. package/src/scripts/lint_never_silent.ts +276 -0
  136. package/src/scripts/lint_no_activation_gates.ts +271 -0
  137. package/src/scripts/orchestration_record.ts +8 -0
  138. package/src/scripts/rebuild_hook_bundle.ts +177 -0
  139. package/src/scripts/release.ts +74 -2
  140. package/src/scripts/routing_doctor.ts +21 -36
  141. package/src/scripts/score_skill_selection.ts +19 -5
  142. package/src/scripts/self_repair_cli.ts +287 -57
  143. package/src/scripts/team_events_spike.ts +271 -0
  144. package/src/scripts/team_review_gate_hook.ts +31 -9
  145. package/src/server/schemas/settings.ts +10 -17
  146. package/src/shared/settingsCarveOut.ts +0 -10
  147. package/src/shared/settingsClasses.ts +11 -9
@@ -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
  load_agent_settings
4
- } from "./chunk-GB2FSUEE.js";
4
+ } from "./chunk-LCFJIQ4J.js";
5
5
 
6
6
  // src/scripts/chat_history.ts
7
7
  import { createHash } from "node:crypto";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  config_exports,
15
15
  hardenedSpawnEnv
16
- } from "./chunk-VSYT7OHO.js";
16
+ } from "./chunk-LVRYBKTI.js";
17
17
  import {
18
18
  DEFAULT_GITATTRIBUTES,
19
19
  SECTION_HEADER,
@@ -43,7 +43,7 @@ import {
43
43
  find_project_root_with_trace,
44
44
  project_settings_path,
45
45
  resolve_project_root
46
- } from "./chunk-GB2FSUEE.js";
46
+ } from "./chunk-LCFJIQ4J.js";
47
47
  import {
48
48
  event4u_root,
49
49
  resolve_with_fallback,
@@ -1091,8 +1091,19 @@ var CliClient = class extends ExternalAIClient {
1091
1091
  "429",
1092
1092
  "usage limit"
1093
1093
  ];
1094
- constructor(opts) {
1094
+ /**
1095
+ * `identity` carries the subclass constants (`name`, `default_binary`)
1096
+ * that construction validates against. They are passed explicitly rather
1097
+ * than read off `this.name` / `this.default_binary` because subclass
1098
+ * instance-field initializers (`override default_binary = 'claude'`,
1099
+ * declared in the subclass body) run only AFTER this `super()` call
1100
+ * returns — reading them here, before that happens, would always see the
1101
+ * base class's own field defaults (`''`), not the subclass override.
1102
+ */
1103
+ constructor(opts, identity) {
1095
1104
  super();
1105
+ this.name = identity.name;
1106
+ this.default_binary = identity.default_binary;
1096
1107
  this.model = opts.model;
1097
1108
  this.timeout_seconds = opts.timeout_seconds ?? DEFAULT_CLI_TIMEOUT_SECONDS;
1098
1109
  this.max_calls_per_day = opts.max_calls_per_day ?? null;
@@ -1297,18 +1308,19 @@ var CliClient = class extends ExternalAIClient {
1297
1308
  }
1298
1309
  };
1299
1310
  var AnthropicCliClient = class extends CliClient {
1300
- name = "anthropic";
1301
- default_binary = "claude";
1302
1311
  subscription_label = "claude-pro";
1303
1312
  constructor(opts = {}) {
1304
- super({
1305
- model: opts.model ?? DEFAULT_ANTHROPIC_CLI_MODEL,
1306
- binary: opts.binary,
1307
- timeout_seconds: opts.timeout_seconds,
1308
- max_calls_per_day: opts.max_calls_per_day,
1309
- warn_at: opts.warn_at,
1310
- cli_calls_path: opts.cli_calls_path
1311
- });
1313
+ super(
1314
+ {
1315
+ model: opts.model ?? DEFAULT_ANTHROPIC_CLI_MODEL,
1316
+ binary: opts.binary,
1317
+ timeout_seconds: opts.timeout_seconds,
1318
+ max_calls_per_day: opts.max_calls_per_day,
1319
+ warn_at: opts.warn_at,
1320
+ cli_calls_path: opts.cli_calls_path
1321
+ },
1322
+ { name: "anthropic", default_binary: "claude" }
1323
+ );
1312
1324
  }
1313
1325
  _build_command(system_prompt, user_prompt, max_tokens) {
1314
1326
  void user_prompt;
@@ -1368,8 +1380,6 @@ var AnthropicCliClient = class extends CliClient {
1368
1380
  }
1369
1381
  };
1370
1382
  var OpenAICliClient = class extends CliClient {
1371
- name = "openai";
1372
- default_binary = "codex";
1373
1383
  subscription_label = "chatgpt-plus";
1374
1384
  static _AUTH_FAILURE_PATTERNS = [
1375
1385
  ...CliClient._AUTH_FAILURE_PATTERNS,
@@ -1378,14 +1388,17 @@ var OpenAICliClient = class extends CliClient {
1378
1388
  "401"
1379
1389
  ];
1380
1390
  constructor(opts = {}) {
1381
- super({
1382
- model: opts.model ?? DEFAULT_OPENAI_CLI_MODEL,
1383
- binary: opts.binary,
1384
- timeout_seconds: opts.timeout_seconds,
1385
- max_calls_per_day: opts.max_calls_per_day,
1386
- warn_at: opts.warn_at,
1387
- cli_calls_path: opts.cli_calls_path
1388
- });
1391
+ super(
1392
+ {
1393
+ model: opts.model ?? DEFAULT_OPENAI_CLI_MODEL,
1394
+ binary: opts.binary,
1395
+ timeout_seconds: opts.timeout_seconds,
1396
+ max_calls_per_day: opts.max_calls_per_day,
1397
+ warn_at: opts.warn_at,
1398
+ cli_calls_path: opts.cli_calls_path
1399
+ },
1400
+ { name: "openai", default_binary: "codex" }
1401
+ );
1389
1402
  }
1390
1403
  _build_command(system_prompt, user_prompt, max_tokens) {
1391
1404
  void max_tokens;
@@ -1474,8 +1487,6 @@ var OpenAICliClient = class extends CliClient {
1474
1487
  }
1475
1488
  };
1476
1489
  var GeminiCliClient = class extends CliClient {
1477
- name = "gemini";
1478
- default_binary = "gemini";
1479
1490
  subscription_label = "gemini-pro";
1480
1491
  static _AUTH_FAILURE_PATTERNS = [
1481
1492
  ...CliClient._AUTH_FAILURE_PATTERNS,
@@ -1484,14 +1495,17 @@ var GeminiCliClient = class extends CliClient {
1484
1495
  "oauth"
1485
1496
  ];
1486
1497
  constructor(opts = {}) {
1487
- super({
1488
- model: opts.model ?? DEFAULT_GEMINI_CLI_MODEL,
1489
- binary: opts.binary,
1490
- timeout_seconds: opts.timeout_seconds,
1491
- max_calls_per_day: opts.max_calls_per_day,
1492
- warn_at: opts.warn_at,
1493
- cli_calls_path: opts.cli_calls_path
1494
- });
1498
+ super(
1499
+ {
1500
+ model: opts.model ?? DEFAULT_GEMINI_CLI_MODEL,
1501
+ binary: opts.binary,
1502
+ timeout_seconds: opts.timeout_seconds,
1503
+ max_calls_per_day: opts.max_calls_per_day,
1504
+ warn_at: opts.warn_at,
1505
+ cli_calls_path: opts.cli_calls_path
1506
+ },
1507
+ { name: "gemini", default_binary: "gemini" }
1508
+ );
1495
1509
  }
1496
1510
  _build_command(system_prompt, user_prompt, max_tokens) {
1497
1511
  void user_prompt;
@@ -1566,8 +1580,6 @@ var GeminiCliClient = class extends CliClient {
1566
1580
  }
1567
1581
  };
1568
1582
  var XAICliClient = class extends CliClient {
1569
- name = "xai";
1570
- default_binary = "grok";
1571
1583
  billable = true;
1572
1584
  // community CLI consumes an API key — billable applies
1573
1585
  static _AUTH_FAILURE_PATTERNS = [
@@ -1577,14 +1589,17 @@ var XAICliClient = class extends CliClient {
1577
1589
  "unauthorized"
1578
1590
  ];
1579
1591
  constructor(opts = {}) {
1580
- super({
1581
- model: opts.model ?? DEFAULT_XAI_MODEL,
1582
- binary: opts.binary,
1583
- timeout_seconds: opts.timeout_seconds,
1584
- max_calls_per_day: opts.max_calls_per_day,
1585
- warn_at: opts.warn_at,
1586
- cli_calls_path: opts.cli_calls_path
1587
- });
1592
+ super(
1593
+ {
1594
+ model: opts.model ?? DEFAULT_XAI_MODEL,
1595
+ binary: opts.binary,
1596
+ timeout_seconds: opts.timeout_seconds,
1597
+ max_calls_per_day: opts.max_calls_per_day,
1598
+ warn_at: opts.warn_at,
1599
+ cli_calls_path: opts.cli_calls_path
1600
+ },
1601
+ { name: "xai", default_binary: "grok" }
1602
+ );
1588
1603
  }
1589
1604
  _build_command(system_prompt, user_prompt, max_tokens) {
1590
1605
  void system_prompt;
@@ -1610,8 +1625,6 @@ var XAICliClient = class extends CliClient {
1610
1625
  }
1611
1626
  };
1612
1627
  var PerplexityCliClient = class extends CliClient {
1613
- name = "perplexity";
1614
- default_binary = "perplexity";
1615
1628
  billable = true;
1616
1629
  // community CLI consumes an API key — billable applies
1617
1630
  static _AUTH_FAILURE_PATTERNS = [
@@ -1621,14 +1634,17 @@ var PerplexityCliClient = class extends CliClient {
1621
1634
  "unauthorized"
1622
1635
  ];
1623
1636
  constructor(opts = {}) {
1624
- super({
1625
- model: opts.model ?? DEFAULT_PERPLEXITY_MODEL,
1626
- binary: opts.binary,
1627
- timeout_seconds: opts.timeout_seconds,
1628
- max_calls_per_day: opts.max_calls_per_day,
1629
- warn_at: opts.warn_at,
1630
- cli_calls_path: opts.cli_calls_path
1631
- });
1637
+ super(
1638
+ {
1639
+ model: opts.model ?? DEFAULT_PERPLEXITY_MODEL,
1640
+ binary: opts.binary,
1641
+ timeout_seconds: opts.timeout_seconds,
1642
+ max_calls_per_day: opts.max_calls_per_day,
1643
+ warn_at: opts.warn_at,
1644
+ cli_calls_path: opts.cli_calls_path
1645
+ },
1646
+ { name: "perplexity", default_binary: "perplexity" }
1647
+ );
1632
1648
  }
1633
1649
  _build_command(system_prompt, user_prompt, max_tokens) {
1634
1650
  void system_prompt;
@@ -2471,7 +2487,8 @@ function resolveTransport(opts) {
2471
2487
  billing,
2472
2488
  authSource,
2473
2489
  makesProviderCall: false,
2474
- reason: null
2490
+ reason: null,
2491
+ absentReason: null
2475
2492
  };
2476
2493
  }
2477
2494
  if (mode === "api" || mode === "cli") {
@@ -2481,7 +2498,8 @@ function resolveTransport(opts) {
2481
2498
  billing,
2482
2499
  authSource,
2483
2500
  makesProviderCall: true,
2484
- reason: null
2501
+ reason: null,
2502
+ absentReason: null
2485
2503
  };
2486
2504
  }
2487
2505
  if (mode !== "auto") {
@@ -2501,7 +2519,8 @@ function resolveTransport(opts) {
2501
2519
  billing,
2502
2520
  authSource,
2503
2521
  makesProviderCall: true,
2504
- reason: null
2522
+ reason: null,
2523
+ absentReason: null
2505
2524
  };
2506
2525
  }
2507
2526
  const keyPresent = opts.apiKeyPresent ?? hasSource(report, provider, KEY_AUTH_SOURCES);
@@ -2512,12 +2531,18 @@ function resolveTransport(opts) {
2512
2531
  billing,
2513
2532
  authSource,
2514
2533
  makesProviderCall: true,
2515
- reason: null
2534
+ reason: null,
2535
+ absentReason: null
2516
2536
  };
2517
2537
  }
2518
- return unavailable(provider, billing, autoUnavailableReason(provider, binary, cliAuthed));
2538
+ return unavailable(
2539
+ provider,
2540
+ billing,
2541
+ autoUnavailableReason(provider, binary, cliAuthed),
2542
+ classifyStaticAbsentReason(binary)
2543
+ );
2519
2544
  }
2520
- function unavailable(_provider, billing, reason) {
2545
+ function unavailable(_provider, billing, reason, absentReason = null) {
2521
2546
  return {
2522
2547
  available: false,
2523
2548
  transport: null,
@@ -2526,9 +2551,13 @@ function unavailable(_provider, billing, reason) {
2526
2551
  billing,
2527
2552
  authSource: null,
2528
2553
  makesProviderCall: false,
2529
- reason
2554
+ reason,
2555
+ absentReason
2530
2556
  };
2531
2557
  }
2558
+ function classifyStaticAbsentReason(binary) {
2559
+ return binary === null ? "no_binary" : "no_auth";
2560
+ }
2532
2561
  function autoUnavailableReason(provider, binary, cliAuthed) {
2533
2562
  const expected = PROVIDER_CLI_META[provider]?.[0] ?? provider;
2534
2563
  if (binary === null && !cliAuthed) {
@@ -2787,7 +2816,6 @@ var AI_TEAM_REVIEW_GATE_DEFAULTS = Object.freeze({
2787
2816
  max_consecutive_blocks: 3
2788
2817
  });
2789
2818
  var AI_TEAM_DEFAULTS = Object.freeze({
2790
- enabled: false,
2791
2819
  model: "auto",
2792
2820
  allow_delegate: false,
2793
2821
  max_calls_per_day: 50,
@@ -4382,6 +4410,13 @@ function osErrorStr(exc) {
4382
4410
  return String(exc);
4383
4411
  }
4384
4412
  var _CLI_PROVIDER_META = PROVIDER_CLI_META;
4413
+ function _effectiveMemberMode(member, cfg) {
4414
+ return member.mode ?? cfg.defaults.mode;
4415
+ }
4416
+ function _mayRunOverCli(member, cfg) {
4417
+ const mode = _effectiveMemberMode(member, cfg);
4418
+ return mode === "cli" || mode === "auto";
4419
+ }
4385
4420
  function _check_council_cli(project_root) {
4386
4421
  const { load_cli_call_counts: load_cli_call_counts2 } = clients_exports;
4387
4422
  const { load_council_config, resolve_config_path } = config_exports;
@@ -4407,7 +4442,7 @@ function _check_council_cli(project_root) {
4407
4442
  }
4408
4443
  const cli_members = [];
4409
4444
  for (const [name, m] of cfg.members.entries()) {
4410
- if (m.enabled && m.mode === "cli" && name in _CLI_PROVIDER_META) {
4445
+ if (m.enabled && _mayRunOverCli(m, cfg) && name in _CLI_PROVIDER_META) {
4411
4446
  cli_members.push([name, m]);
4412
4447
  }
4413
4448
  }
@@ -4506,18 +4541,11 @@ function _team_codex_binary_name(project_root) {
4506
4541
  return default_bin;
4507
4542
  }
4508
4543
  const member = cfg.members.get("openai");
4509
- if (member && member.enabled && member.mode === "cli" && member.binary) {
4544
+ if (member && member.enabled && _mayRunOverCli(member, cfg) && member.binary) {
4510
4545
  return member.binary;
4511
4546
  }
4512
4547
  return default_bin;
4513
4548
  }
4514
- function _settings_flag(val) {
4515
- if (typeof val === "boolean") return val;
4516
- if (typeof val === "string") {
4517
- return ["true", "yes", "on", "1"].includes(val.trim().toLowerCase());
4518
- }
4519
- return false;
4520
- }
4521
4549
  function _jwt_exp(token) {
4522
4550
  if (typeof token !== "string") return null;
4523
4551
  const parts = token.split(".");
@@ -4682,31 +4710,14 @@ function _check_detection(project_root) {
4682
4710
  }
4683
4711
  function _check_team(project_root) {
4684
4712
  const ai_team = _read_ai_team_block(project_root);
4685
- const enabled = _settings_flag(ai_team["enabled"]);
4686
4713
  const gateRaw = ai_team["review_gate"];
4687
4714
  const gate = typeof gateRaw === "object" && gateRaw !== null && !Array.isArray(gateRaw) ? gateRaw : {};
4688
- const gate_managed = _settings_flag(gate["managed"]);
4689
- if (!enabled) {
4690
- if (gate_managed) {
4691
- return {
4692
- id: "team",
4693
- status: "warn",
4694
- message: "half-configured: ai_team.review_gate.managed is on but ai_team.enabled is false \u2014 the gate never runs",
4695
- remedy: "set `ai_team.enabled: true` in .agent-settings.yml, or remove `ai_team.review_gate.managed`"
4696
- };
4697
- }
4698
- return {
4699
- id: "team",
4700
- status: "ok",
4701
- message: "team mode not configured (default-off)",
4702
- remedy: "opt in via `ai_team.enabled: true` in .agent-settings.yml, then re-run `agent-config doctor --check team`"
4703
- };
4704
- }
4705
4715
  const remedies = [];
4706
4716
  const binary_name = _team_codex_binary_name(project_root);
4707
4717
  const binary_resolved = shutilWhich(binary_name);
4708
4718
  const binary_glyph = binary_resolved !== null ? "\u2705" : "\u274C";
4709
- if (binary_resolved === null) {
4719
+ const binary_missing = binary_resolved === null;
4720
+ if (binary_missing) {
4710
4721
  remedies.push("install the codex CLI: `npm install -g @openai/codex`");
4711
4722
  }
4712
4723
  const auth_path = path8.join(_codex_home(), "auth.json");
@@ -4747,6 +4758,14 @@ function _check_team(project_root) {
4747
4758
  const gate_str = gate_signal.gate_str;
4748
4759
  remedies.push(...gate_signal.remedies);
4749
4760
  const detail = `codex binary ${binary_glyph} (${binary_name}) \xB7 ${auth_str} \xB7 ${plugin_str} \xB7 ${gate_str}`;
4761
+ if (binary_missing && !authed) {
4762
+ return {
4763
+ id: "team",
4764
+ status: "ok",
4765
+ message: `team unavailable (default) \u2014 codex CLI not installed \xB7 ${detail}`,
4766
+ remedy: remedies.join("; ")
4767
+ };
4768
+ }
4750
4769
  if (remedies.length > 0) {
4751
4770
  return {
4752
4771
  id: "team",
@@ -4758,7 +4777,7 @@ function _check_team(project_root) {
4758
4777
  return {
4759
4778
  id: "team",
4760
4779
  status: "ok",
4761
- message: `team mode enabled \xB7 ${detail}`,
4780
+ message: `team available \xB7 ${detail}`,
4762
4781
  remedy: ""
4763
4782
  };
4764
4783
  }
@@ -5525,6 +5544,7 @@ export {
5525
5544
  _check_git_identity,
5526
5545
  _check_manifest_integrity,
5527
5546
  _check_lockfile_freshness,
5547
+ shutilWhich,
5528
5548
  _check_global_binary,
5529
5549
  _check_claude_plugin,
5530
5550
  _check_claude_command_wrappers,
@@ -5539,6 +5559,7 @@ export {
5539
5559
  _check_mcp_beta_readiness,
5540
5560
  _check_tier_usage_readiness,
5541
5561
  _check_council_cli,
5562
+ _team_codex_binary_name,
5542
5563
  _read_council_facts,
5543
5564
  _detection_report,
5544
5565
  _reset_detection_memo,
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  ProjectRootError,
9
9
  resolve_project_root
10
- } from "./chunk-GB2FSUEE.js";
10
+ } from "./chunk-LCFJIQ4J.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-GB2FSUEE.js";
4
+ } from "./chunk-LCFJIQ4J.js";
5
5
  import "./chunk-NDJLNC6Q.js";
6
6
  import "./chunk-J55WI3RR.js";
7
7
 
@@ -11,9 +11,9 @@ import {
11
11
  _run_checks,
12
12
  _run_checks_no_manifest,
13
13
  _scan_foreign
14
- } from "./chunk-2BE5I2MN.js";
14
+ } from "./chunk-RCIA67XN.js";
15
15
  import "./chunk-FTAISGDQ.js";
16
- import "./chunk-VSYT7OHO.js";
16
+ import "./chunk-LVRYBKTI.js";
17
17
  import "./chunk-736JCWLM.js";
18
18
  import {
19
19
  atomicAppendLine,
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-63WSP6YZ.js";
23
23
  import "./chunk-GRRPEPRN.js";
24
24
  import "./chunk-NXFWFAYV.js";
25
- import "./chunk-GB2FSUEE.js";
25
+ import "./chunk-LCFJIQ4J.js";
26
26
  import "./chunk-NDJLNC6Q.js";
27
27
  import {
28
28
  detectToolPresence
@@ -388,13 +388,6 @@ function _check_lean_projection(projectRoot, packageRoot = PACKAGE_ROOT, project
388
388
  remedy: ""
389
389
  };
390
390
  }
391
- var HOST_MANIFEST_KEYS = /* @__PURE__ */ new Set([
392
- "schema_version",
393
- "subagent_spawn",
394
- "parallel_spawn",
395
- "status_polling",
396
- "separate_quota_pool"
397
- ]);
398
391
  function _check_host_manifest(projectRoot) {
399
392
  const detected = Object.entries(detectToolPresence(projectRoot)).filter(([, v]) => v === true).map(([k]) => k);
400
393
  const detectedNote = detected.length > 0 ? `detected surfaces: ${detected.join(", ")}` : "no surfaces detected";
@@ -403,7 +396,7 @@ function _check_host_manifest(projectRoot) {
403
396
  return {
404
397
  id: "host-manifest",
405
398
  status: "ok",
406
- message: `no .agent-settings.yml \u2014 safe-default manifest applies (${detectedNote})`,
399
+ message: `no .agent-settings.yml \u2014 host capability is always probe/registry-resolved (${detectedNote})`,
407
400
  remedy: ""
408
401
  };
409
402
  }
@@ -424,44 +417,14 @@ function _check_host_manifest(projectRoot) {
424
417
  return {
425
418
  id: "host-manifest",
426
419
  status: "ok",
427
- message: `no host_capabilities override \u2014 safe-default manifest applies (${detectedNote})`,
420
+ message: `no host_capabilities override \u2014 host capability is always probe/registry-resolved (${detectedNote})`,
428
421
  remedy: ""
429
422
  };
430
423
  }
431
- if (typeof manifest !== "object" || Array.isArray(manifest)) {
432
- return {
433
- id: "host-manifest",
434
- status: "fail",
435
- message: "subagents.host_capabilities is not a mapping",
436
- remedy: "use the four boolean fields from the host-capability manifest contract"
437
- };
438
- }
439
- const problems = [];
440
- for (const [key, value] of Object.entries(manifest)) {
441
- if (!HOST_MANIFEST_KEYS.has(key)) {
442
- problems.push(`unknown key '${key}'`);
443
- continue;
444
- }
445
- if (key === "schema_version") {
446
- if (value !== 1) problems.push(`schema_version must be 1 (got ${JSON.stringify(value)})`);
447
- continue;
448
- }
449
- if (typeof value !== "boolean") {
450
- problems.push(`'${key}' must be boolean (got ${JSON.stringify(value)})`);
451
- }
452
- }
453
- if (problems.length > 0) {
454
- return {
455
- id: "host-manifest",
456
- status: "fail",
457
- message: `host_capabilities malformed: ${problems.slice(0, 4).join("; ")}`,
458
- remedy: "only schema_version:1 + four boolean capability fields are valid"
459
- };
460
- }
461
424
  return {
462
425
  id: "host-manifest",
463
426
  status: "ok",
464
- message: `host_capabilities override parses strictly (${detectedNote})`,
427
+ message: `subagents.host_capabilities is deprecated and ignored \u2014 host capability is always probe/registry-resolved (${detectedNote})`,
465
428
  remedy: ""
466
429
  };
467
430
  }
@@ -62,16 +62,18 @@ import {
62
62
  _scan_foreign,
63
63
  _settings_layer_chain,
64
64
  _skipped_manifest_check,
65
+ _team_codex_binary_name,
65
66
  _wizard_state_path,
66
- main
67
- } from "./chunk-2BE5I2MN.js";
67
+ main,
68
+ shutilWhich
69
+ } from "./chunk-RCIA67XN.js";
68
70
  import "./chunk-FTAISGDQ.js";
69
- import "./chunk-VSYT7OHO.js";
71
+ import "./chunk-LVRYBKTI.js";
70
72
  import "./chunk-736JCWLM.js";
71
73
  import "./chunk-63WSP6YZ.js";
72
74
  import "./chunk-GRRPEPRN.js";
73
75
  import "./chunk-NXFWFAYV.js";
74
- import "./chunk-GB2FSUEE.js";
76
+ import "./chunk-LCFJIQ4J.js";
75
77
  import "./chunk-NDJLNC6Q.js";
76
78
  import "./chunk-OY53J6II.js";
77
79
  import "./chunk-MCJYCQPF.js";
@@ -138,6 +140,8 @@ export {
138
140
  _scan_foreign,
139
141
  _settings_layer_chain,
140
142
  _skipped_manifest_check,
143
+ _team_codex_binary_name,
141
144
  _wizard_state_path,
142
- main
145
+ main,
146
+ shutilWhich
143
147
  };
@@ -8,7 +8,7 @@ import {
8
8
  ProfileError,
9
9
  artefact_roots,
10
10
  resolve_profile
11
- } from "./chunk-22GCIJ2O.js";
11
+ } from "./chunk-66OVWGB5.js";
12
12
  import {
13
13
  StateLoadError,
14
14
  load_state
@@ -19,7 +19,7 @@ import {
19
19
  load_agent_settings,
20
20
  logger,
21
21
  resolve_project_root
22
- } from "./chunk-GB2FSUEE.js";
22
+ } from "./chunk-LCFJIQ4J.js";
23
23
  import "./chunk-NDJLNC6Q.js";
24
24
  import {
25
25
  __export
@@ -9,14 +9,14 @@ import {
9
9
  KIRO_MARKER,
10
10
  ROOCODE_MARKER,
11
11
  ZED_MARKER
12
- } from "./chunk-PQSAQKHW.js";
13
- import "./chunk-DVRS2KVR.js";
14
- import "./chunk-JXARCGVN.js";
12
+ } from "./chunk-NZ5N2XQL.js";
13
+ import "./chunk-MMXA5GY7.js";
14
+ import "./chunk-MP3JT3IU.js";
15
15
  import "./chunk-BKO2AZ7Z.js";
16
16
  import "./chunk-63WSP6YZ.js";
17
17
  import "./chunk-GRRPEPRN.js";
18
18
  import "./chunk-NXFWFAYV.js";
19
- import "./chunk-GB2FSUEE.js";
19
+ import "./chunk-LCFJIQ4J.js";
20
20
  import "./chunk-NDJLNC6Q.js";
21
21
  import "./chunk-523HCFYO.js";
22
22
  import "./chunk-OY53J6II.js";
@@ -5,13 +5,13 @@ import {
5
5
  list_sessions,
6
6
  readHookStdin,
7
7
  read_entries
8
- } from "./chunk-7OMQCH4V.js";
8
+ } from "./chunk-OJM3MBJM.js";
9
9
  import "./chunk-3EWYC3YK.js";
10
10
  import {
11
11
  _RAW_KEY_PREFIXES,
12
12
  hardenedSpawnEnv
13
- } from "./chunk-VSYT7OHO.js";
14
- import "./chunk-GB2FSUEE.js";
13
+ } from "./chunk-LVRYBKTI.js";
14
+ import "./chunk-LCFJIQ4J.js";
15
15
  import "./chunk-NDJLNC6Q.js";
16
16
  import "./chunk-OY53J6II.js";
17
17
  import "./chunk-J55WI3RR.js";
@@ -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-GB2FSUEE.js";
4
+ } from "./chunk-LCFJIQ4J.js";
5
5
  import "./chunk-NDJLNC6Q.js";
6
6
  import "./chunk-J55WI3RR.js";
7
7
 
@@ -1,8 +1,8 @@
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-JXARCGVN.js";
5
- import "./chunk-GB2FSUEE.js";
4
+ } from "./chunk-MP3JT3IU.js";
5
+ import "./chunk-LCFJIQ4J.js";
6
6
  import "./chunk-NDJLNC6Q.js";
7
7
  import "./chunk-MCJYCQPF.js";
8
8
  import "./chunk-J55WI3RR.js";
@@ -4,12 +4,12 @@ import {
4
4
  SOURCE_MISSING,
5
5
  profile_file,
6
6
  resolve_profile
7
- } from "./chunk-22GCIJ2O.js";
7
+ } from "./chunk-66OVWGB5.js";
8
8
  import {
9
9
  DEFAULT_PROJECT_FILE,
10
10
  load_agent_settings,
11
11
  resolve_project_root
12
- } from "./chunk-GB2FSUEE.js";
12
+ } from "./chunk-LCFJIQ4J.js";
13
13
  import "./chunk-NDJLNC6Q.js";
14
14
  import "./chunk-J55WI3RR.js";
15
15
 
@@ -1,9 +1,9 @@
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-PQSAQKHW.js";
5
- import "./chunk-DVRS2KVR.js";
6
- import "./chunk-JXARCGVN.js";
4
+ } from "./chunk-NZ5N2XQL.js";
5
+ import "./chunk-MMXA5GY7.js";
6
+ import "./chunk-MP3JT3IU.js";
7
7
  import "./chunk-BKO2AZ7Z.js";
8
8
  import {
9
9
  manifest_path,
@@ -13,7 +13,7 @@ import "./chunk-GRRPEPRN.js";
13
13
  import "./chunk-NXFWFAYV.js";
14
14
  import {
15
15
  resolve_project_root
16
- } from "./chunk-GB2FSUEE.js";
16
+ } from "./chunk-LCFJIQ4J.js";
17
17
  import "./chunk-NDJLNC6Q.js";
18
18
  import "./chunk-523HCFYO.js";
19
19
  import "./chunk-OY53J6II.js";
@@ -2,14 +2,14 @@
2
2
  import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
3
3
  import {
4
4
  read_entries
5
- } from "./chunk-7OMQCH4V.js";
5
+ } from "./chunk-OJM3MBJM.js";
6
6
  import "./chunk-3EWYC3YK.js";
7
7
  import {
8
8
  match_prompt
9
9
  } from "./chunk-LF2KKJ4Q.js";
10
10
  import {
11
11
  load_agent_settings
12
- } from "./chunk-GB2FSUEE.js";
12
+ } from "./chunk-LCFJIQ4J.js";
13
13
  import "./chunk-NDJLNC6Q.js";
14
14
  import "./chunk-OY53J6II.js";
15
15
  import {