harnessed 3.9.20 → 3.9.21

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/dist/cli.mjs CHANGED
@@ -1231,7 +1231,7 @@ var init_auto_install = __esm({
1231
1231
 
1232
1232
  // package.json
1233
1233
  var package_default = {
1234
- version: "3.9.20"};
1234
+ version: "3.9.21"};
1235
1235
 
1236
1236
  // src/manifest/errors.ts
1237
1237
  function instancePathToKeyPath(instancePath) {
@@ -6144,6 +6144,7 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
6144
6144
  quiet: runOpts.quiet === true
6145
6145
  };
6146
6146
  const start = Date.now();
6147
+ const componentTypes = {};
6147
6148
  const settled = await Promise.allSettled(
6148
6149
  manifestPaths.map(async (path) => {
6149
6150
  let yamlSrc;
@@ -6161,6 +6162,7 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
6161
6162
  };
6162
6163
  }
6163
6164
  const name = v.manifest.metadata.name;
6165
+ componentTypes[name] = v.manifest.spec.component_type;
6164
6166
  const r = await runInstall(v.manifest, opts);
6165
6167
  if ("aborted" in r) return { status: "skipped", name, reason: r.reason };
6166
6168
  if (r.ok && "alreadyInstalled" in r && r.alreadyInstalled)
@@ -6187,7 +6189,14 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
6187
6189
  } else
6188
6190
  failed.push(`${v.name}: ${v.reason}`);
6189
6191
  }
6190
- return { installed, alreadyInstalled, skipped, failed, elapsedMs: Date.now() - start };
6192
+ return {
6193
+ installed,
6194
+ alreadyInstalled,
6195
+ skipped,
6196
+ failed,
6197
+ elapsedMs: Date.now() - start,
6198
+ componentTypes
6199
+ };
6191
6200
  }
6192
6201
 
6193
6202
  // src/cli/setup.ts
@@ -6202,6 +6211,42 @@ async function listBaseManifests2(pkgRoot) {
6202
6211
  }
6203
6212
  return out;
6204
6213
  }
6214
+ function printGrouped(b, prefix = "") {
6215
+ const GROUP_LABELS = {
6216
+ "mcp-tool": "MCP servers",
6217
+ command: "Commands & Skills",
6218
+ "cli-binary": "CLI tools",
6219
+ other: "Other"
6220
+ };
6221
+ const GROUP_ORDER = ["mcp-tool", "command", "cli-binary", "other"];
6222
+ const groupOf = (n) => b.componentTypes[n] ?? "other";
6223
+ const buckets = {};
6224
+ for (const n of b.failed) {
6225
+ const m = n.match(/^([^:]+):/);
6226
+ const baseName = m?.[1] ?? n;
6227
+ (buckets[groupOf(baseName)] ??= []).push({ status: "failed", name: n });
6228
+ }
6229
+ for (const n of b.installed) (buckets[groupOf(n)] ??= []).push({ status: "installed", name: n });
6230
+ for (const s of b.skipped)
6231
+ (buckets[groupOf(s.name)] ??= []).push({
6232
+ status: "skipped",
6233
+ name: s.name,
6234
+ suffix: ` \u2014 ${s.reason}`
6235
+ });
6236
+ for (const n of b.alreadyInstalled)
6237
+ (buckets[groupOf(n)] ??= []).push({ status: "already-installed", name: n });
6238
+ for (const g of GROUP_ORDER) {
6239
+ const entries = buckets[g];
6240
+ if (!entries || entries.length === 0) continue;
6241
+ console.log(`
6242
+ ${prefix}${GROUP_LABELS[g] ?? g} (${entries.length})`);
6243
+ for (const e of entries) {
6244
+ const line = ` ${e.status.padEnd(18)} ${e.name}${e.suffix ?? ""}`;
6245
+ if (e.status === "failed") console.error(line);
6246
+ else console.log(line);
6247
+ }
6248
+ }
6249
+ }
6205
6250
  function registerSetup(program2) {
6206
6251
  program2.command("setup").description(
6207
6252
  "One-shot onboarding: install workflow skills + base manifests to ~/.claude/ (immediate by default \u2014 use --dry-run for preview)"
@@ -6310,10 +6355,7 @@ function registerSetup(program2) {
6310
6355
  seconds: stepBMs
6311
6356
  })
6312
6357
  );
6313
- for (const n of b.installed) console.log(` [B] installed ${n}`);
6314
- for (const n of b.alreadyInstalled) console.log(` [B] already-installed ${n}`);
6315
- for (const s of b.skipped) console.log(` [B] skipped ${s.name} \u2014 ${s.reason}`);
6316
- for (const n of b.failed) console.error(` [B] failed ${n}`);
6358
+ printGrouped(b);
6317
6359
  if (!forceFirstPass && !dryRun && raw.nonInteractive !== true && b.alreadyInstalled.length > 0) {
6318
6360
  const isTty = process.stdin.isTTY === true && process.stdout.isTTY === true;
6319
6361
  if (isTty) {
@@ -6329,12 +6371,7 @@ function registerSetup(program2) {
6329
6371
  `
6330
6372
  Force-update pass complete: ${b2.installed.length} installed / ${b2.alreadyInstalled.length} still-already-installed (MCP) / ${b2.skipped.length} skipped / ${b2.failed.length} failed [parallel ${stepB2Ms}s]`
6331
6373
  );
6332
- for (const n of b2.installed) console.log(` [B*] installed ${n}`);
6333
- for (const n of b2.alreadyInstalled)
6334
- console.log(` [B*] already-installed ${n} (MCP / no force-update)`);
6335
- for (const s of b2.skipped)
6336
- console.log(` [B*] skipped ${s.name} \u2014 ${s.reason}`);
6337
- for (const n of b2.failed) console.error(` [B*] failed ${n}`);
6374
+ printGrouped(b2, "[force-update] ");
6338
6375
  }
6339
6376
  }
6340
6377
  }