@event4u/agent-config 9.27.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +13 -12
- package/CHANGELOG.md +165 -0
- package/README.md +1 -1
- package/agents/templates/.ai-council.yml.example +55 -24
- package/dist/agent-src/commands/analyze/conformance.md +24 -0
- package/dist/agent-src/commands/cost/report.md +2 -2
- package/dist/agent-src/commands/team/adversarial.md +8 -7
- package/dist/agent-src/commands/team/delegate.md +13 -12
- package/dist/agent-src/commands/team/review.md +9 -8
- package/dist/agent-src/commands/team/status.md +9 -8
- package/dist/agent-src/commands/team.md +29 -19
- package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +88 -2
- package/dist/agent-src/contexts/execution/auto-orchestration-activation.md +29 -21
- package/dist/agent-src/contexts/execution/host-capability-manifest.md +26 -15
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +28 -3
- package/dist/agent-src/contexts/execution/subagent-response-contract.md +54 -0
- package/dist/agent-src/contexts/execution/subagent-routing.md +13 -11
- package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +25 -0
- package/dist/agent-src/contexts/execution/subagent-steering.md +6 -3
- package/dist/agent-src/rules/artifact-engagement-recording.md +4 -1
- package/dist/agent-src/rules/autonomous-execution.md +1 -1
- package/dist/agent-src/rules/brand-source-of-truth.md +33 -6
- package/dist/agent-src/rules/context-hygiene.md +3 -1
- package/dist/agent-src/rules/council-availability.md +93 -0
- package/dist/agent-src/rules/cross-source-consistency.md +3 -0
- package/dist/agent-src/rules/delegation-policy.md +38 -10
- package/dist/agent-src/rules/design-fidelity.md +3 -0
- package/dist/agent-src/rules/evaluator-independence.md +2 -1
- package/dist/agent-src/rules/external-code-graph-interop.md +2 -1
- package/dist/agent-src/rules/finance-safety-floor.md +1 -1
- package/dist/agent-src/rules/git-history-discipline.md +1 -1
- package/dist/agent-src/rules/history-discipline.md +3 -1
- package/dist/agent-src/rules/legal-safety-floor.md +1 -1
- package/dist/agent-src/rules/no-pr-progress-comments.md +3 -1
- package/dist/agent-src/rules/onboarding-gate.md +3 -1
- package/dist/agent-src/rules/roadmap-ci-steps-policy.md +4 -1
- package/dist/agent-src/rules/role-mode-adherence.md +1 -1
- package/dist/agent-src/rules/scale-discipline.md +3 -1
- package/dist/agent-src/rules/self-repair-loop.md +103 -0
- package/dist/agent-src/rules/session-canary.md +2 -1
- package/dist/agent-src/rules/settings-ask-protocol.md +8 -7
- package/dist/agent-src/rules/strategy-safety-floor.md +1 -1
- package/dist/agent-src/rules/token-budget-discipline.md +4 -2
- package/dist/agent-src/rules/tool-safety.md +5 -1
- package/dist/agent-src/skills/adversarial-review/SKILL.md +1 -1
- package/dist/agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
- package/dist/agent-src/skills/forensics-report/SKILL.md +114 -0
- package/dist/agent-src/skills/forensics-report/evals/triggers.json +17 -0
- package/dist/agent-src/skills/performance-analysis/SKILL.md +1 -1
- package/dist/agent-src/skills/persona-improvement/SKILL.md +1 -1
- package/dist/agent-src/skills/premortem/SKILL.md +30 -1
- package/dist/agent-src/skills/project-analyzer/SKILL.md +1 -1
- package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +2 -1
- package/dist/agent-src/skills/security-audit/SKILL.md +1 -1
- package/dist/agent-src/skills/sequential-thinking/SKILL.md +1 -1
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -1
- package/dist/agent-src/skills/subagent-orchestration/SKILL.md +7 -5
- package/dist/agent-src/skills/subagent-orchestration/schemas/subagent-status.json +61 -3
- package/dist/agent-src/skills/test-case-discovery/SKILL.md +1 -1
- package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
- package/dist/agent-src/templates/AGENTS.md +8 -12
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/roadmaps.md +23 -0
- package/dist/cli/registry.js +7 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/chunk-66OVWGB5.js +270 -0
- package/dist/cli-delegate/{chunk-HJ6DAJHR.js → chunk-LCFJIQ4J.js} +89 -7
- package/dist/cli-delegate/{chunk-VSYT7OHO.js → chunk-LVRYBKTI.js} +31 -2
- package/dist/cli-delegate/{chunk-DVRS2KVR.js → chunk-MMXA5GY7.js} +10 -17
- package/dist/cli-delegate/{chunk-WR6GTRHJ.js → chunk-MP3JT3IU.js} +3 -3
- package/dist/cli-delegate/{chunk-3KJIMFTB.js → chunk-NZ5N2XQL.js} +467 -305
- package/dist/cli-delegate/{chunk-AIIUU73N.js → chunk-OJM3MBJM.js} +1 -1
- package/dist/cli-delegate/{chunk-BCPIOAGV.js → chunk-RCIA67XN.js} +117 -96
- package/dist/cli-delegate/chunk-REKCMYOU.js +2991 -0
- package/dist/cli-delegate/cmd_analyze_session.js +1 -1
- package/dist/cli-delegate/cmd_brand_status.js +134 -0
- package/dist/cli-delegate/cmd_conformance.js +10 -47
- package/dist/cli-delegate/cmd_converge.js +3 -3
- package/dist/cli-delegate/cmd_doctor.js +10 -6
- package/dist/cli-delegate/cmd_explain.js +80 -330
- package/dist/cli-delegate/cmd_export.js +6 -6
- package/dist/cli-delegate/cmd_fleet.js +3 -3
- package/dist/cli-delegate/cmd_handoff.js +3 -3
- package/dist/cli-delegate/cmd_mcp_available.js +433 -0
- package/dist/cli-delegate/cmd_migrate.js +3 -3
- package/dist/cli-delegate/cmd_packs_active.js +153 -0
- package/dist/cli-delegate/cmd_preflight.js +1 -1
- package/dist/cli-delegate/cmd_prune.js +6 -6
- package/dist/cli-delegate/cmd_route_audit.js +8 -8
- package/dist/cli-delegate/cmd_route_explain.js +4 -4
- package/dist/cli-delegate/cmd_settings_get.js +266 -0
- package/dist/cli-delegate/cmd_settings_migrate.js +6 -6
- package/dist/cli-delegate/cmd_settings_set.js +8 -2968
- package/dist/cli-delegate/cmd_sync.js +6 -6
- package/dist/cli-delegate/cmd_uninstall.js +6 -6
- package/dist/cli-delegate/cmd_update.js +4 -4
- package/dist/cli-delegate/cmd_upgrade.js +4 -4
- package/dist/cli-delegate/cmd_validate.js +6 -6
- package/dist/cli-delegate/cmd_versions.js +4 -4
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +164 -55
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +44 -5
- package/dist/discovery/trust-report.md +11 -11
- package/dist/discovery/workspaces.json +16 -6
- package/dist/hooks/dispatch.js +9341 -6131
- package/dist/install/install.mjs +739 -524
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +777 -281
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/agent_settings.js +134 -15
- package/dist/scripts/_lib/agent_settings.js.map +1 -1
- package/dist/scripts/condense.js +147 -2
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/schemas/settings.js +6 -7
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/shared/settingsCarveOut.js +0 -9
- package/dist/shared/settingsCarveOut.js.map +1 -1
- package/dist/shared/settingsClasses.js +11 -9
- package/dist/shared/settingsClasses.js.map +1 -1
- package/dist/ui/assets/{index-DmR0mbk4.js → index-JDAF00bC.js} +2 -2
- package/dist/ui/assets/{index-DmR0mbk4.js.map → index-JDAF00bC.js.map} +1 -1
- package/dist/ui/index.html +1 -1
- package/docs/contracts/settings-classes.md +68 -17
- package/docs/guidelines/agent-infra/memory-access.md +14 -3
- package/package.json +1 -1
- package/src/agent-src/templates/AGENTS.md +8 -12
- package/src/config/agent-settings.template.yml +52 -66
- package/src/config/budgets.yml +29 -0
- package/src/config/discovery/packs.yml +11 -0
- package/src/config/discovery/workspaces.yml +1 -1
- package/src/config/evaluator-budgets.json +4 -4
- package/src/config/gate-coverage.yml +26 -0
- package/src/config/gate-violation-baselines.json +3 -3
- package/src/scripts/_cli/cmd_brand_status.ts +174 -0
- package/src/scripts/_cli/cmd_conformance.ts +14 -42
- package/src/scripts/_cli/cmd_doctor.ts +65 -48
- package/src/scripts/_cli/cmd_mcp_available.ts +266 -0
- package/src/scripts/_cli/cmd_packs_active.ts +225 -0
- package/src/scripts/_cli/cmd_settings_get.ts +324 -0
- package/src/scripts/_dispatch.bash +57 -0
- package/src/scripts/_lib/agent_settings.ts +140 -16
- package/src/scripts/_lib/auto_dispatch.corpus.test.ts +1 -1
- package/src/scripts/_lib/auto_dispatch.ts +23 -18
- package/src/scripts/_lib/capsule_trigger.ts +124 -0
- package/src/scripts/_lib/carrier_divergence.ts +135 -0
- package/src/scripts/_lib/host_capability.ts +144 -4
- package/src/scripts/_lib/judgment_ladder.ts +382 -0
- package/src/scripts/_lib/orchestration_gate.ts +8 -0
- package/src/scripts/_lib/orchestration_record.ts +37 -0
- package/src/scripts/_lib/orchestration_savings.ts +1 -1
- package/src/scripts/_lib/prompt_shape.ts +88 -0
- package/src/scripts/_lib/review_skipped_record.ts +102 -0
- package/src/scripts/_lib/rule_layer_overlap.ts +254 -0
- package/src/scripts/_lib/self_repair.ts +489 -0
- package/src/scripts/_lib/self_repair_store.ts +128 -0
- package/src/scripts/_lib/subagent_capsule.ts +182 -0
- package/src/scripts/_lib/subagent_response.ts +19 -0
- package/src/scripts/_lib/subagent_spawn.ts +13 -0
- package/src/scripts/_lib/subagent_steering.ts +9 -4
- package/src/scripts/_lib/tier_budget_routing.ts +6 -1
- package/src/scripts/_lib/transcript_entry.ts +80 -0
- package/src/scripts/_lib/worker_budget.ts +37 -2
- package/src/scripts/ai_council/clients.ts +76 -54
- package/src/scripts/ai_council/config.ts +94 -6
- package/src/scripts/ai_council/handoff.ts +113 -0
- package/src/scripts/ai_council/modes.ts +19 -4
- package/src/scripts/ai_council/orchestrator.ts +105 -0
- package/src/scripts/ai_council/quorum.ts +84 -0
- package/src/scripts/ai_council/session.ts +44 -0
- package/src/scripts/ai_council/transport_resolver.ts +127 -1
- package/src/scripts/ai_team/availability.ts +110 -0
- package/src/scripts/ai_team/config.ts +34 -14
- package/src/scripts/ai_team/team_dispatch.ts +71 -29
- package/src/scripts/bench_critic_protocol.ts +396 -0
- package/src/scripts/check_branch_freshness.ts +255 -0
- package/src/scripts/check_council_config_location.ts +125 -1
- package/src/scripts/check_detector_corpus.ts +202 -0
- package/src/scripts/check_hook_bundle_freshness.ts +4 -1
- package/src/scripts/check_standing_rule_delivery.ts +314 -0
- package/src/scripts/condense.ts +162 -2
- package/src/scripts/config/profiles.ts +13 -3
- package/src/scripts/conformance_scan.ts +272 -24
- package/src/scripts/council_availability_hook.ts +188 -0
- package/src/scripts/council_cli.ts +527 -32
- package/src/scripts/forensics_report.ts +333 -0
- package/src/scripts/hook_manifest.yaml +107 -26
- package/src/scripts/hooks/block_no_verify.ts +39 -2
- package/src/scripts/hooks/block_unauthorized_git.ts +156 -7
- package/src/scripts/hooks/concern_registry.ts +10 -0
- package/src/scripts/hooks/delegation_nudge_hook.ts +484 -0
- package/src/scripts/hooks/end_review_nudge_hook.ts +726 -0
- package/src/scripts/hooks/orchestration_record_hook.ts +342 -0
- package/src/scripts/install.ts +151 -0
- package/src/scripts/language_mirror_hook.ts +30 -37
- package/src/scripts/lint_discovery_vocabulary.ts +2 -0
- package/src/scripts/lint_never_silent.ts +276 -0
- package/src/scripts/lint_no_activation_gates.ts +271 -0
- package/src/scripts/measure_scope_dedup.ts +19 -13
- package/src/scripts/onboarding_gate_hook.ts +40 -1
- package/src/scripts/orchestration_record.ts +12 -1
- package/src/scripts/preamble_byte_census.ts +9 -20
- package/src/scripts/rebuild_hook_bundle.ts +177 -0
- package/src/scripts/release.ts +74 -2
- package/src/scripts/report_carrier_divergence.ts +364 -0
- package/src/scripts/report_skill_activation.ts +257 -0
- package/src/scripts/report_skill_obligation_violations.ts +579 -0
- package/src/scripts/routing_doctor.ts +95 -39
- package/src/scripts/score_skill_selection.ts +19 -5
- package/src/scripts/self_repair_cli.ts +470 -0
- package/src/scripts/self_repair_hook.ts +241 -0
- package/src/scripts/team_events_spike.ts +271 -0
- package/src/scripts/team_review_gate_hook.ts +31 -9
- package/src/server/schemas/settings.ts +10 -17
- package/src/shared/settingsCarveOut.ts +0 -10
- 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-
|
|
4
|
+
} from "./chunk-LCFJIQ4J.js";
|
|
5
5
|
|
|
6
6
|
// src/scripts/chat_history.ts
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -10,6 +10,10 @@ import {
|
|
|
10
10
|
claude_plugin_snapshot_version,
|
|
11
11
|
codex_plugin_identity
|
|
12
12
|
} from "./chunk-FTAISGDQ.js";
|
|
13
|
+
import {
|
|
14
|
+
config_exports,
|
|
15
|
+
hardenedSpawnEnv
|
|
16
|
+
} from "./chunk-LVRYBKTI.js";
|
|
13
17
|
import {
|
|
14
18
|
DEFAULT_GITATTRIBUTES,
|
|
15
19
|
SECTION_HEADER,
|
|
@@ -32,13 +36,6 @@ import {
|
|
|
32
36
|
excludedRuleBasenames,
|
|
33
37
|
ruleScopeFromSettings
|
|
34
38
|
} from "./chunk-NXFWFAYV.js";
|
|
35
|
-
import {
|
|
36
|
-
resolvePackageRoot
|
|
37
|
-
} from "./chunk-MCJYCQPF.js";
|
|
38
|
-
import {
|
|
39
|
-
config_exports,
|
|
40
|
-
hardenedSpawnEnv
|
|
41
|
-
} from "./chunk-VSYT7OHO.js";
|
|
42
39
|
import {
|
|
43
40
|
PROJECT_ROOT_ENV,
|
|
44
41
|
ProjectRootError,
|
|
@@ -46,7 +43,7 @@ import {
|
|
|
46
43
|
find_project_root_with_trace,
|
|
47
44
|
project_settings_path,
|
|
48
45
|
resolve_project_root
|
|
49
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-LCFJIQ4J.js";
|
|
50
47
|
import {
|
|
51
48
|
event4u_root,
|
|
52
49
|
resolve_with_fallback,
|
|
@@ -55,6 +52,9 @@ import {
|
|
|
55
52
|
import {
|
|
56
53
|
require_dist
|
|
57
54
|
} from "./chunk-OY53J6II.js";
|
|
55
|
+
import {
|
|
56
|
+
resolvePackageRoot
|
|
57
|
+
} from "./chunk-MCJYCQPF.js";
|
|
58
58
|
import {
|
|
59
59
|
__export,
|
|
60
60
|
__toESM
|
|
@@ -1091,8 +1091,19 @@ var CliClient = class extends ExternalAIClient {
|
|
|
1091
1091
|
"429",
|
|
1092
1092
|
"usage limit"
|
|
1093
1093
|
];
|
|
1094
|
-
|
|
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
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
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
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
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
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
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
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
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
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
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(
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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,
|