harnessed 4.32.20 → 4.32.22

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/README.md CHANGED
@@ -51,7 +51,7 @@ harnessed's three-layer stack is a software-engineering implementation of the es
51
51
 
52
52
  The loops are **nested lenses, not phases** — the classic Cucumber BDD-outer + TDD-inner double-loop, extended with a GenAI-era SDD spec ring into a triple-loop. harnessed runs the default outer→inner traversal as its 5-stage cadence, plus the **back-edges it ships today**: Verify kicks failing work back to Task, a subagent that hits a gray area round-trips to clarification before continuing, and every shipped cycle feeds learnings back into the next Discuss. (Finer-grained structured back-edges — e.g. a contract contradiction routing straight to Spec, an ambiguous requirement to Behavior — are on the roadmap, not shipped. harnessed is the linear-cadence realization of the triple-loop; the full routed graph is its evolution path.)
53
53
 
54
- **The components overlap — that's the point.** **GSD** threads through all three loops as the orchestration backbone, **gstack** spans Behavior + Review, **superpowers** spans Behavior (brainstorm) + Implementation (TDD). harnessed wires them — and arbitrates the overlap — into one engine. Two **cross-cutting disciplines** run through every layer: **karpathy principles** (*how* to code — simplicity-first, surgical diffs) + **mattpocock moves** (on-demand tactical tools like `/diagnose`, `/zoom-out`).
54
+ **The components overlap — that's the point.** **GSD** threads through all three loops as the orchestration backbone, **gstack** spans Behavior + Review, **superpowers** spans Behavior (brainstorm) + Implementation (TDD). harnessed wires them — and arbitrates the overlap — into one engine. Two **cross-cutting disciplines** run through every layer: **karpathy principles** (*how* to code — simplicity-first, surgical diffs) + **mattpocock moves** (on-demand tactical tools like `/diagnosing-bugs`, `/grill-with-docs`).
55
55
 
56
56
  Mapped to the runtime loop above: **Discuss = Behavior (BDD) · Plan = Spec (SDD) · Build = Implementation (TDD)**, then **Verify + Ship** close it with evidence gates.
57
57
 
@@ -84,7 +84,7 @@ Native agents give you primitives; harnessed wires them into a methodology. Wher
84
84
  |---|---|---|---|
85
85
  | **Workflow / methodology** | Primitives only — you design the flow each time | Fewer primitives — freestyle per prompt | Codified **Discuss→Ship** 5-stage three-layer-stack engine — BDD + SDD + TDD loops + 2 cross-cutting (Review + Ship) |
86
86
  | **Instruction injection** | `CLAUDE.md` + skills + hooks exist, but static & wired by hand | `AGENTS.md` only — no skills/hooks | Per-turn breadcrumb hook + task-scoped routing + learnings injected each cycle |
87
- | **State / progress** | Chat context — lost on `/clear` / compaction | Chat context — no persistence layer | On-disk `.planning/` + `current-workflow.json` ledger + checkpoint evidence |
87
+ | **State / progress** | Chat context — lost on `/clear` / compaction | Chat context — no persistence layer | On-disk `.planning/` + `workflows.json` per-repo ledger + checkpoint evidence |
88
88
  | **Cross-session recovery** | Re-explain the context by hand | Re-explain the context by hand | `harnessed status --recover`: you-are-here + next step |
89
89
  | **Verification / "done"** | Agent self-reports "done" | Agent self-reports "done" | Independent review subagents + **fail-CLOSED evidence guard** (missing artifact = not done) |
90
90
  | **Subagent orchestration** | Subagents + Agent Teams available, but orchestrated by hand | No subagent/team primitive | `gates → prompt → spawn → checkpoint`; Agent Teams auto-enabled per task |
@@ -266,8 +266,8 @@ graph TD
266
266
  | `/plan-phase` | ② Plan | Sub | GSD `/gsd-plan-phase` + planning-with-files `/plan` | Plan layer — persists `task_plan.md` + `progress.md` |
267
267
  | `/task` | ③ Task | Master | masterOrchestrator | Serial invoke of 4 subs per subtask (clarify → code → test → deliver) |
268
268
  | `/task-clarify` | ③ Task | Sub | superpowers brainstorming + `/grill-with-docs` conditional | Subtask startup clarification gate |
269
- | `/task-code` | ③ Task | Sub | karpathy 4 principles + `/zoom-out` / `/improve-codebase-architecture` / `/diagnose` conditional | Subtask coding + cross-session progress.md sync |
270
- | `/task-test` | ③ Task | Sub | superpowers TDD red-green-refactor + `/diagnose` conditional | TDD mandatory for core logic (alias mattpocock `/tdd`) |
269
+ | `/task-code` | ③ Task | Sub | karpathy 4 principles + `/improve-codebase-architecture` / `/diagnosing-bugs` conditional | Subtask coding + cross-session progress.md sync |
270
+ | `/task-test` | ③ Task | Sub | superpowers TDD red-green-refactor + `/diagnosing-bugs` conditional | TDD mandatory for core logic (alias mattpocock `/tdd`) |
271
271
  | `/task-deliver` | ③ Task | Sub | `ralph-loop` SDK wrapper + Agent Teams conditional | Until verbatim `COMPLETE` + R20.10 max_iter fallback |
272
272
  | `/verify` | ④ Verify | Master | masterOrchestrator | 10 subs conditional dispatch by scenario |
273
273
  | `/verify-progress` | ④ Verify | Sub | GSD `/gsd-verify-work` + `/gsd-progress` | Mandatory serial starting point — UAT acceptance + state sync |
@@ -371,7 +371,7 @@ harnessed/
371
371
  │ └── protocols.yaml # cc-handoff design doc self-contained
372
372
  ├── routing/ # L4: routing engine SSOT (decision_rules.yaml)
373
373
  ├── schemas/ # L3: JSON Schema (IDE / CI consume)
374
- ├── src/ # L4: TS engine (workflow + routing + cli + installers + checkpoint + audit + state)
374
+ ├── src/ # L4: TS engine (platform + workflow + routing + cli + installers + checkpoint + audit + state)
375
375
  ├── tests/ # vitest unit + integration + dogfood (R8.1 dogfood-first)
376
376
  ├── scripts/ # CI gate (check-workflow-schema, transparency-verdict, state-archive)
377
377
  ├── .planning/ # project memory (STATE + ROADMAP + REQUIREMENTS + per-phase + milestones)
@@ -502,13 +502,13 @@ planning-with-files /plan (cross-cutting tool) → write artifacts to .planning/
502
502
  | `harnessed resume` | Resume from the most recent checkpoint after a session interruption |
503
503
  | `harnessed status` | Current phase + lock holder |
504
504
  | `harnessed doctor` | Health check (Node / MCP / jq / Win bash / routing / token budget / skill integrity / GateGuard conflict / update-available / stale hooks, etc.). The **stale hooks** check flags orphaned harnessed `Stop`/`UserPromptSubmit` entries in `~/.claude/settings.json` that point at a deleted `bin/*.mjs` — the cause of a `MODULE_NOT_FOUND` error on every prompt after a raw `npm uninstall -g harnessed`. Fix: run `harnessed uninstall` (it strips them) **before** removing the package. |
505
- | `harnessed update [--check\|--upstreams\|--migration-report]` | Self-update, channel-aware: binary installs replace themselves in place from GitHub releases (sha256-verified, previous version kept for rollback); npm installs run `npm i -g harnessed@latest`. `--check` reports the latest version; `--upstreams` re-runs the base manifests; `--migration-report` is a read-only stale-state inventory |
505
+ | `harnessed update [--check\|--rollback [version]\|--upstreams\|--migration-report]` | Self-update, channel-aware: binary installs replace themselves in place from GitHub releases (sha256 + ed25519-signature verified — releases ship `<asset>.sha256.sig`, signed-release contract since 4.32.19; the replaced version is banked for rollback); npm installs run `npm i -g harnessed@latest`. `--check` reports the latest version; `--rollback [version]` (binary installs only) atomically restores a banked previous binary — npm installs are pointed at `npm i -g harnessed@<version>`; `--upstreams` re-runs the base manifests; `--migration-report` is a read-only stale-state inventory |
506
506
  | `harnessed release-preflight` | Read-only release-readiness gate (CHANGELOG `[Unreleased]` / version / git-clean / tag-absent); exits 1 if not ready. The Ship-stage gate. |
507
507
  | `harnessed retro --done` | Reset the retro-reminder phase counter after running `/retro` (clears the per-turn RETRO-DUE nudge). |
508
508
  | `harnessed install <name>` | Install an upstream manifest |
509
- | `harnessed uninstall [name]` | Reverse uninstall |
509
+ | `harnessed uninstall [name]` | Reverse uninstall — runs the manifest's declared `spec.uninstall` teardown (cmd + `$HOME`-confined, idempotent `cleanup_paths`) for the skill-installing methods (`npm-cli` / `git-clone-with-setup` / `npx-skill-installer`); other methods keep their per-method reverse |
510
510
  | `harnessed backup` | Snapshot backup management |
511
- | `harnessed rollback <timestamp>` | One-line rollback (EOL preserve + sha1 verify) |
511
+ | `harnessed rollback <timestamp>` | One-line rollback of a **backup snapshot** (EOL preserve + sha1 verify) — distinct from `update --rollback`, which restores a previous **compiled binary** |
512
512
  | `harnessed gc` | Clean up expired backups |
513
513
  | `harnessed audit-log` | Routing transparency log query (supports `--filter` jq expression) |
514
514
 
@@ -522,6 +522,7 @@ planning-with-files /plan (cross-cutting tool) → write artifacts to .planning/
522
522
  | `--non-interactive` | CI / scripted scenarios |
523
523
  | `--system` | Allow L4 global install (otherwise downgrade to L1 npx ephemeral) |
524
524
  | `--yes` | Skip interactive confirm on uninstall |
525
+ | `--json` | Machine-readable stdout (zero-arg dashboard / `next` / `advance`, etc.); errors that escape to the process root also emit a single-line `{"error":{"message":…}}` envelope on stdout, so `JSON.parse(stdout).error` is a reliable failure probe |
525
526
  | `--full-diff` | Expand diffs folded above 200 lines |
526
527
  | `--no-color` | Force nocolor (even on TTY) |
527
528
  | `--task <text>` | `run` — task description (passed as workflow `gateContext.task`) |
package/dist/cli.mjs CHANGED
@@ -38,7 +38,7 @@ var init_package = __esm({
38
38
  "package.json"() {
39
39
  package_default = {
40
40
  name: "harnessed",
41
- version: "4.32.20",
41
+ version: "4.32.22",
42
42
  description: "AI coding harness package manager + composition orchestrator",
43
43
  type: "module",
44
44
  license: "Apache-2.0",
@@ -1829,6 +1829,9 @@ var init_en = __esm({
1829
1829
  "setup.complete": "setup complete \u2014 {{skills}} workflows + {{manifests}} base manifests configured",
1830
1830
  "setup.mcp_hint": "Run /mcp in Claude Code to verify MCP server connections.",
1831
1831
  "setup.mcp_hint_codex": "Run codex mcp list to verify MCP server connections.",
1832
+ "setup.search_key_hint.header": "\n\u26A0 Search MCP API keys missing \u2014 the server(s) below are installed but will fail at query time until the key is configured:",
1833
+ "setup.search_key_hint.line": ' {{server}}: set {{envVar}} \u2014 add it to the ~/.claude/settings.json "env" block (e.g. {"env": {"{{envVar}}": "<your-key>"}}) or export {{envVar}} in your shell',
1834
+ "setup.optional_offer.ecc_note": " ecc (bonus tier): installing it unlocks finer-grained scenario orchestration (per-language review/build expert routing etc.); the trade-off is ~20k+ tokens/session of static listing overhead \u2014 inherent to ECC's own scale (281 skills / 94 commands / 67 agents), not introduced by harnessed.",
1832
1835
  "setup.bundled_summary": "\nharnessed workflows bundled at <packageRoot>/workflows/ (share-only, read-only)",
1833
1836
  "setup.bundled_location": "",
1834
1837
  "setup.doctor_hint": "\nRun harnessed doctor to verify your environment.",
@@ -4200,6 +4203,72 @@ var init_check_mattpocock_skills = __esm({
4200
4203
  }
4201
4204
  });
4202
4205
 
4206
+ // src/cli/lib/search-mcp-keys.ts
4207
+ var search_mcp_keys_exports = {};
4208
+ __export(search_mcp_keys_exports, {
4209
+ SEARCH_MCP_KEY_VARS: () => SEARCH_MCP_KEY_VARS,
4210
+ missingSearchMcpKeys: () => missingSearchMcpKeys,
4211
+ probeSearchMcpKey: () => probeSearchMcpKey,
4212
+ searchMcpKeyHintLines: () => searchMcpKeyHintLines
4213
+ });
4214
+ function nonEmpty(v) {
4215
+ return typeof v === "string" && v.trim() !== "";
4216
+ }
4217
+ async function probeSearchMcpKey(server) {
4218
+ const envVar = SEARCH_MCP_KEY_VARS[server];
4219
+ if (!envVar) return { server, envVar: "", present: false };
4220
+ try {
4221
+ const cfg = await readUserClaudeJson();
4222
+ const entry = cfg.mcpServers?.[server];
4223
+ if (entry?.env && nonEmpty(entry.env[envVar])) {
4224
+ return { server, envVar, present: true, source: "mcp-env" };
4225
+ }
4226
+ } catch {
4227
+ }
4228
+ try {
4229
+ const raw = await readFile(getSettingsPath(), "utf8");
4230
+ const parsed = JSON.parse(raw);
4231
+ if (parsed?.env && nonEmpty(parsed.env[envVar])) {
4232
+ return { server, envVar, present: true, source: "settings-env" };
4233
+ }
4234
+ } catch {
4235
+ }
4236
+ if (nonEmpty(process.env[envVar])) {
4237
+ return { server, envVar, present: true, source: "process-env" };
4238
+ }
4239
+ return { server, envVar, present: false };
4240
+ }
4241
+ async function missingSearchMcpKeys() {
4242
+ const out = [];
4243
+ for (const server of Object.keys(SEARCH_MCP_KEY_VARS)) {
4244
+ if (!await isMcpServerRegistered(server)) continue;
4245
+ const probe = await probeSearchMcpKey(server);
4246
+ if (!probe.present) out.push(probe);
4247
+ }
4248
+ return out;
4249
+ }
4250
+ async function searchMcpKeyHintLines() {
4251
+ const missing = await missingSearchMcpKeys();
4252
+ if (missing.length === 0) return [];
4253
+ const lines = [t("setup.search_key_hint.header")];
4254
+ for (const m of missing) {
4255
+ lines.push(t("setup.search_key_hint.line", { server: m.server, envVar: m.envVar }));
4256
+ }
4257
+ return lines;
4258
+ }
4259
+ var SEARCH_MCP_KEY_VARS;
4260
+ var init_search_mcp_keys = __esm({
4261
+ "src/cli/lib/search-mcp-keys.ts"() {
4262
+ init_i18n();
4263
+ init_readClaudeConfig();
4264
+ init_platform();
4265
+ SEARCH_MCP_KEY_VARS = {
4266
+ "tavily-mcp": "TAVILY_API_KEY",
4267
+ "exa-mcp": "EXA_API_KEY"
4268
+ };
4269
+ }
4270
+ });
4271
+
4203
4272
  // src/cli/lib/check-mcp-availability.ts
4204
4273
  var check_mcp_availability_exports = {};
4205
4274
  __export(check_mcp_availability_exports, {
@@ -4209,40 +4278,51 @@ async function checkMcpAvailability() {
4209
4278
  const installed = [];
4210
4279
  const missing = [];
4211
4280
  for (const s of TARGET_SERVERS) {
4212
- const present = await isMcpServerRegistered(s);
4213
- if (present) {
4214
- installed.push(s);
4215
- } else {
4216
- missing.push(s);
4217
- }
4281
+ if (await isMcpServerRegistered(s)) installed.push(s);
4282
+ else missing.push(s);
4218
4283
  }
4219
- if (missing.length === 0) {
4284
+ const keyless = [];
4285
+ for (const s of installed) {
4286
+ const probe = await probeSearchMcpKey(s);
4287
+ if (!probe.present) keyless.push(probe);
4288
+ }
4289
+ if (missing.length === 0 && keyless.length === 0) {
4220
4290
  return {
4221
- name: "MCP servers (tavily/exa/chrome-devtools)",
4291
+ name: CHECK_NAME,
4222
4292
  status: "pass",
4223
- message: `all 3 installed: ${installed.join(", ")}`
4293
+ message: `installed: ${installed.join(", ")} (API keys configured)`
4224
4294
  };
4225
4295
  }
4226
- if (installed.length === 0) {
4227
- return {
4228
- name: "MCP servers (tavily/exa/chrome-devtools)",
4229
- status: "warn",
4230
- message: "none of 3 target MCP servers registered in ~/.claude.json",
4231
- fix: "run `harnessed setup` to install via Step B (manifests/tools/{tavily,exa,chrome-devtools}-mcp.yaml)"
4232
- };
4296
+ const parts = [];
4297
+ if (installed.length > 0) parts.push(`installed: ${installed.join(", ")}`);
4298
+ if (missing.length > 0) parts.push(`not registered: ${missing.join(", ")}`);
4299
+ if (keyless.length > 0) {
4300
+ parts.push(`API key missing: ${keyless.map((k) => `${k.server} \u2192 ${k.envVar}`).join(", ")}`);
4301
+ }
4302
+ const fixes = [];
4303
+ if (missing.length > 0) {
4304
+ fixes.push("run `harnessed setup` to install missing MCPs via Step B (manifests/tools/)");
4305
+ }
4306
+ if (keyless.length > 0) {
4307
+ const vars = keyless.map((k) => k.envVar).join(" / ");
4308
+ fixes.push(
4309
+ `set ${vars} in the ~/.claude/settings.json "env" block (e.g. {"env": {"${keyless[0]?.envVar}": "<your-key>"}}) or export it in your shell; a mcpServers.<name>.env entry in ~/.claude.json also works`
4310
+ );
4233
4311
  }
4234
4312
  return {
4235
- name: "MCP servers (tavily/exa/chrome-devtools)",
4313
+ name: CHECK_NAME,
4236
4314
  status: "warn",
4237
- message: `${installed.length}/3 installed: ${installed.join(", ")}; missing: ${missing.join(", ")}`,
4238
- fix: "run `harnessed setup` to install missing MCPs via Step B"
4315
+ message: parts.join("; "),
4316
+ fix: fixes.join("; ")
4239
4317
  };
4240
4318
  }
4241
- var TARGET_SERVERS;
4319
+ var TARGET_SERVERS, CHECK_NAME;
4242
4320
  var init_check_mcp_availability = __esm({
4243
4321
  "src/cli/lib/check-mcp-availability.ts"() {
4244
4322
  init_readClaudeConfig();
4245
- TARGET_SERVERS = ["tavily-mcp", "exa-mcp", "chrome-devtools-mcp"];
4323
+ init_search_mcp_keys();
4324
+ TARGET_SERVERS = Object.keys(SEARCH_MCP_KEY_VARS);
4325
+ CHECK_NAME = "MCP servers (tavily/exa)";
4246
4326
  }
4247
4327
  });
4248
4328
 
@@ -5098,6 +5178,67 @@ var init_check_stale_hooks = __esm({
5098
5178
  }
5099
5179
  });
5100
5180
 
5181
+ // src/cli/lib/check-ecc.ts
5182
+ var check_ecc_exports = {};
5183
+ __export(check_ecc_exports, {
5184
+ checkEcc: () => checkEcc
5185
+ });
5186
+ async function pathExists(p7) {
5187
+ try {
5188
+ await stat(p7);
5189
+ return true;
5190
+ } catch {
5191
+ return false;
5192
+ }
5193
+ }
5194
+ async function checkEcc() {
5195
+ const ccInstalled = await isPluginRegistered("ecc");
5196
+ const codexHome = join(homedir(), ".codex");
5197
+ const codexPresent = await pathExists(join(codexHome, "config.toml"));
5198
+ const codexInstalled = codexPresent && await pathExists(join(codexHome, ".cache", "ecc", ".git"));
5199
+ const ccPart = ccInstalled ? "CC: installed (plugin ecc@ecc)" : "CC: not installed";
5200
+ const codexPart = codexPresent ? codexInstalled ? "codex: installed (~/.codex/.cache/ecc sync clone)" : "codex: not installed" : "codex: not present (no ~/.codex/config.toml)";
5201
+ if (ccInstalled) {
5202
+ const leftovers = [];
5203
+ const fixes = [];
5204
+ if (await isPluginRegistered("chrome-devtools-mcp")) {
5205
+ leftovers.push("official chrome-devtools-mcp@claude-plugins-official plugin still enabled");
5206
+ fixes.push("`claude plugin uninstall chrome-devtools-mcp@claude-plugins-official`");
5207
+ }
5208
+ if (await isMcpServerRegistered("chrome-devtools-mcp")) {
5209
+ leftovers.push("chrome-devtools-mcp stdio entry still registered in mcpServers");
5210
+ fixes.push("`claude mcp remove chrome-devtools-mcp`");
5211
+ }
5212
+ if (leftovers.length > 0) {
5213
+ return {
5214
+ name: NAME2,
5215
+ status: "warn",
5216
+ message: `${ccPart}; ${codexPart}; chrome-devtools dual-install \u2014 ECC already bundles the chrome-devtools connector (its only default MCP), but: ${leftovers.join("; ")} (same-name dual-prefix tool-call ambiguity)`,
5217
+ fix: `remove the leftover, keep ecc: ${fixes.join(" and ")}`
5218
+ };
5219
+ }
5220
+ }
5221
+ if (!ccInstalled && !codexInstalled) {
5222
+ return {
5223
+ name: NAME2,
5224
+ status: "pass",
5225
+ message: `not installed (${ccPart}; ${codexPart}) \u2014 optional enhancement: \`harnessed install ecc\` unlocks finer-grained orchestration (per-language review/build expert routing etc.) at a ~20k+ tokens/session static-listing cost (ECC-side scale, not harnessed)`
5226
+ };
5227
+ }
5228
+ return {
5229
+ name: NAME2,
5230
+ status: "pass",
5231
+ message: `${ccPart}; ${codexPart} \u2014 chrome-devtools connector provided by ECC`
5232
+ };
5233
+ }
5234
+ var NAME2;
5235
+ var init_check_ecc = __esm({
5236
+ "src/cli/lib/check-ecc.ts"() {
5237
+ init_readClaudeConfig();
5238
+ NAME2 = "ecc";
5239
+ }
5240
+ });
5241
+
5101
5242
  // src/cli/lib/doctor-registry.ts
5102
5243
  var CHECKS;
5103
5244
  var init_doctor_registry = __esm({
@@ -5145,7 +5286,11 @@ var init_doctor_registry = __esm({
5145
5286
  // issue #8 — orphaned harnessed Stop/UserPromptSubmit hooks (warn-only): a hook
5146
5287
  // pointing at a deleted bin/*.mjs makes Claude Code error MODULE_NOT_FOUND every
5147
5288
  // prompt; `harnessed uninstall` now strips them.
5148
- async () => (await Promise.resolve().then(() => (init_check_stale_hooks(), check_stale_hooks_exports))).checkStaleHooks()
5289
+ async () => (await Promise.resolve().then(() => (init_check_stale_hooks(), check_stale_hooks_exports))).checkStaleHooks(),
5290
+ // 4.32.22 — ECC per-harness detect (optional; pass unless CC-side ecc overlaps
5291
+ // the official chrome-devtools-mcp plugin → warn). CC plugin registry + codex
5292
+ // sync-clone probed independently.
5293
+ async () => (await Promise.resolve().then(() => (init_check_ecc(), check_ecc_exports))).checkEcc()
5149
5294
  ];
5150
5295
  }
5151
5296
  });
@@ -8494,6 +8639,9 @@ ${names.length} optional component(s) available (opt-in, not part of base setup)
8494
8639
  `
8495
8640
  ${pending.length} optional component(s) available (opt-in \u2014 none selected by default):`
8496
8641
  );
8642
+ if (pending.some((m) => m.metadata.name === "ecc")) {
8643
+ console.log(t("setup.optional_offer.ecc_note"));
8644
+ }
8497
8645
  const ans = await p.multiselect({
8498
8646
  message: "Select optional components to install (space to toggle, enter to continue \u2014 empty = install nothing)",
8499
8647
  options: pending.map((m) => ({
@@ -8543,6 +8691,7 @@ ${pending.length} optional component(s) available (opt-in \u2014 none selected b
8543
8691
  var PROBE_OPTS;
8544
8692
  var init_optional_offer = __esm({
8545
8693
  "src/cli/lib/optional-offer.ts"() {
8694
+ init_i18n();
8546
8695
  init_installers();
8547
8696
  init_idempotent();
8548
8697
  init_validate();
@@ -9470,7 +9619,7 @@ init_i18n();
9470
9619
  init_doctor_registry();
9471
9620
  function registerDoctor(program2) {
9472
9621
  program2.command("doctor").description(
9473
- "Preflight checks (Node / MCP scope / jq / Win bash / origin URL / gstack prefix / deprecations / token budget / Agent Teams / planning-with-files / mattpocock-skills / MCP availability)"
9622
+ "Preflight checks (Node / MCP scope / jq / Win bash / origin URL / gstack prefix / deprecations / token budget / Agent Teams / planning-with-files / mattpocock-skills / MCP availability / ECC)"
9474
9623
  ).option("--json", "output JSON instead of human-readable").action(async (opts) => {
9475
9624
  const results = await Promise.all(CHECKS.map((c) => c()));
9476
9625
  const hasFail = results.some((r) => r.status === "fail");
@@ -12951,6 +13100,28 @@ async function scanWorkflowsWithSkill(workflowsDir, entries) {
12951
13100
  return scanWorkflowsNested(workflowsDir, entries);
12952
13101
  }
12953
13102
  var MCP_METHODS = /* @__PURE__ */ new Set(["mcp-stdio-add", "mcp-http-add"]);
13103
+ function effectiveInstallMethod(manifest) {
13104
+ if (detectPlatform().id === "codex") {
13105
+ const override = manifest.spec.harness_overrides?.codex;
13106
+ if (override) return override.install.method;
13107
+ }
13108
+ return manifest.spec.install.method;
13109
+ }
13110
+ function installGroupOf(manifest) {
13111
+ const method = effectiveInstallMethod(manifest);
13112
+ if (MCP_METHODS.has(method)) return "mcp-tool";
13113
+ switch (method) {
13114
+ case "cc-plugin-marketplace":
13115
+ case "git-clone-with-setup":
13116
+ case "npx-skill-installer":
13117
+ case "cc-hook-add":
13118
+ return "command";
13119
+ case "npm-cli":
13120
+ return "cli-binary";
13121
+ default:
13122
+ return "other";
13123
+ }
13124
+ }
12954
13125
  async function runStepBInstall(manifestPaths, runOpts = {}) {
12955
13126
  const opts = {
12956
13127
  apply: true,
@@ -12995,7 +13166,7 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
12995
13166
  );
12996
13167
  continue;
12997
13168
  }
12998
- componentTypes[v.manifest.metadata.name] = v.manifest.spec.component_type;
13169
+ componentTypes[v.manifest.metadata.name] = installGroupOf(v.manifest);
12999
13170
  valid.push({ manifest: v.manifest });
13000
13171
  }
13001
13172
  const runOne = async (manifest) => {
@@ -13300,8 +13471,10 @@ installing ${manifestPaths.length} upstream components (MCP serialized, rest par
13300
13471
  const isTty = process.stdin.isTTY === true && process.stdout.isTTY === true;
13301
13472
  if (isTty) {
13302
13473
  const { confirm: confirm5, isCancel: isCancel7 } = await import('@clack/prompts');
13474
+ const mcpExcluded = b.alreadyInstalled.filter((n) => b.componentTypes[n] === "mcp-tool");
13475
+ const exclusionNote = mcpExcluded.length > 0 ? ` (${mcpExcluded.length} MCP server(s) excluded \u2014 they ignore force-update: ${mcpExcluded.join(", ")})` : "";
13303
13476
  const ans = await confirm5({
13304
- message: `Update ${b.alreadyInstalled.length} already-installed plugin(s) listed above? (MCP servers excluded \u2014 they ignore force-update)`,
13477
+ message: `Update ${b.alreadyInstalled.length} already-installed plugin(s) listed above?${exclusionNote}`,
13305
13478
  initialValue: false
13306
13479
  });
13307
13480
  if (!isCancel7(ans) && ans === true) {
@@ -13465,6 +13638,11 @@ ${b.failed.length} component(s) failed \u2014 see the notes in the tables above;
13465
13638
  if (b.alreadyInstalled.length > 0 || b.installed.length > 0) {
13466
13639
  console.log(t(detectPlatform().id === "codex" ? "setup.mcp_hint_codex" : "setup.mcp_hint"));
13467
13640
  }
13641
+ try {
13642
+ const { searchMcpKeyHintLines: searchMcpKeyHintLines2 } = await Promise.resolve().then(() => (init_search_mcp_keys(), search_mcp_keys_exports));
13643
+ for (const line of await searchMcpKeyHintLines2()) console.warn(line);
13644
+ } catch {
13645
+ }
13468
13646
  console.log(t("setup.bundled_summary"));
13469
13647
  console.log(t("setup.bundled_location"));
13470
13648
  console.log(t("setup.doctor_hint"));