harnessed 3.9.19 → 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
@@ -743,6 +743,19 @@ async function checkMattpocockSkills() {
743
743
  };
744
744
  } catch {
745
745
  }
746
+ const indicators = ["diagnose", "tdd", "zoom-out"];
747
+ for (const ind of indicators) {
748
+ const indPath = join(homedir(), ".claude", "skills", ind);
749
+ try {
750
+ await stat(indPath);
751
+ return {
752
+ name: "mattpocock-skills",
753
+ status: "pass",
754
+ message: `installed as individual skills (found ${ind}/)`
755
+ };
756
+ } catch {
757
+ }
758
+ }
746
759
  return {
747
760
  name: "mattpocock-skills",
748
761
  status: "warn",
@@ -1218,7 +1231,7 @@ var init_auto_install = __esm({
1218
1231
 
1219
1232
  // package.json
1220
1233
  var package_default = {
1221
- version: "3.9.19"};
1234
+ version: "3.9.21"};
1222
1235
 
1223
1236
  // src/manifest/errors.ts
1224
1237
  function instancePathToKeyPath(instancePath) {
@@ -6131,6 +6144,7 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
6131
6144
  quiet: runOpts.quiet === true
6132
6145
  };
6133
6146
  const start = Date.now();
6147
+ const componentTypes = {};
6134
6148
  const settled = await Promise.allSettled(
6135
6149
  manifestPaths.map(async (path) => {
6136
6150
  let yamlSrc;
@@ -6148,6 +6162,7 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
6148
6162
  };
6149
6163
  }
6150
6164
  const name = v.manifest.metadata.name;
6165
+ componentTypes[name] = v.manifest.spec.component_type;
6151
6166
  const r = await runInstall(v.manifest, opts);
6152
6167
  if ("aborted" in r) return { status: "skipped", name, reason: r.reason };
6153
6168
  if (r.ok && "alreadyInstalled" in r && r.alreadyInstalled)
@@ -6174,7 +6189,14 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
6174
6189
  } else
6175
6190
  failed.push(`${v.name}: ${v.reason}`);
6176
6191
  }
6177
- 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
+ };
6178
6200
  }
6179
6201
 
6180
6202
  // src/cli/setup.ts
@@ -6189,6 +6211,42 @@ async function listBaseManifests2(pkgRoot) {
6189
6211
  }
6190
6212
  return out;
6191
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
+ }
6192
6250
  function registerSetup(program2) {
6193
6251
  program2.command("setup").description(
6194
6252
  "One-shot onboarding: install workflow skills + base manifests to ~/.claude/ (immediate by default \u2014 use --dry-run for preview)"
@@ -6297,10 +6355,7 @@ function registerSetup(program2) {
6297
6355
  seconds: stepBMs
6298
6356
  })
6299
6357
  );
6300
- for (const n of b.installed) console.log(` [B] installed ${n}`);
6301
- for (const n of b.alreadyInstalled) console.log(` [B] already-installed ${n}`);
6302
- for (const s of b.skipped) console.log(` [B] skipped ${s.name} \u2014 ${s.reason}`);
6303
- for (const n of b.failed) console.error(` [B] failed ${n}`);
6358
+ printGrouped(b);
6304
6359
  if (!forceFirstPass && !dryRun && raw.nonInteractive !== true && b.alreadyInstalled.length > 0) {
6305
6360
  const isTty = process.stdin.isTTY === true && process.stdout.isTTY === true;
6306
6361
  if (isTty) {
@@ -6316,12 +6371,7 @@ function registerSetup(program2) {
6316
6371
  `
6317
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]`
6318
6373
  );
6319
- for (const n of b2.installed) console.log(` [B*] installed ${n}`);
6320
- for (const n of b2.alreadyInstalled)
6321
- console.log(` [B*] already-installed ${n} (MCP / no force-update)`);
6322
- for (const s of b2.skipped)
6323
- console.log(` [B*] skipped ${s.name} \u2014 ${s.reason}`);
6324
- for (const n of b2.failed) console.error(` [B*] failed ${n}`);
6374
+ printGrouped(b2, "[force-update] ");
6325
6375
  }
6326
6376
  }
6327
6377
  }