harnessed 3.9.11 → 3.9.13

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
@@ -1222,7 +1222,7 @@ var init_auto_install = __esm({
1222
1222
 
1223
1223
  // package.json
1224
1224
  var package_default = {
1225
- version: "3.9.11"};
1225
+ version: "3.9.13"};
1226
1226
 
1227
1227
  // src/manifest/errors.ts
1228
1228
  function instancePathToKeyPath(instancePath) {
@@ -4337,7 +4337,7 @@ var installCcHookAdd = async (ctx) => {
4337
4337
  const plan = {
4338
4338
  files: [{ target: settingsPath3, scope: "HOME", oldText: existing ?? "", newText }]
4339
4339
  };
4340
- process.stdout.write(renderDiff(plan, ctx));
4340
+ if (!ctx.opts.quiet) process.stdout.write(renderDiff(plan, ctx));
4341
4341
  const conf = await confirmAt("L3", { ...ctx});
4342
4342
  if (!conf.proceed) {
4343
4343
  const reason = conf.reason === "flag-missing" ? "level-flag-missing" : "user-cancel";
@@ -4516,12 +4516,12 @@ async function detectNative(ctx) {
4516
4516
  }
4517
4517
  if (method === "git-clone-with-setup") {
4518
4518
  const target = extractGitCloneTarget(cmd);
4519
- if (!target) return false;
4520
- try {
4521
- await access(target);
4522
- return true;
4523
- } catch {
4524
- return false;
4519
+ if (target) {
4520
+ try {
4521
+ await access(target);
4522
+ return true;
4523
+ } catch {
4524
+ }
4525
4525
  }
4526
4526
  }
4527
4527
  if (method === "npm-cli") {
@@ -4530,7 +4530,6 @@ async function detectNative(ctx) {
4530
4530
  await access(skillDir);
4531
4531
  return true;
4532
4532
  } catch {
4533
- return false;
4534
4533
  }
4535
4534
  }
4536
4535
  const pluginNames = [name];
@@ -4677,7 +4676,7 @@ ${newEntry}
4677
4676
  }
4678
4677
  ]
4679
4678
  };
4680
- process.stdout.write(renderDiff(plan, ctx));
4679
+ if (!ctx.opts.quiet) process.stdout.write(renderDiff(plan, ctx));
4681
4680
  const conf = await confirmAt("L3", { ...ctx});
4682
4681
  if (!conf.proceed) {
4683
4682
  const reason = conf.reason === "flag-missing" ? "level-flag-missing" : "user-cancel";
@@ -4839,7 +4838,7 @@ var installGitCloneWithSetup = async (ctx) => {
4839
4838
  }
4840
4839
  ]
4841
4840
  };
4842
- process.stdout.write(renderDiff(plan, ctx));
4841
+ if (!ctx.opts.quiet) process.stdout.write(renderDiff(plan, ctx));
4843
4842
  const conf = await confirmAt("L2", { ...ctx});
4844
4843
  if (!conf.proceed) {
4845
4844
  const reason = conf.reason === "flag-missing" ? "level-flag-missing" : "user-cancel";
@@ -5038,7 +5037,7 @@ ${newEntry}
5038
5037
  }
5039
5038
  ]
5040
5039
  };
5041
- process.stdout.write(renderDiff(plan, ctx));
5040
+ if (!ctx.opts.quiet) process.stdout.write(renderDiff(plan, ctx));
5042
5041
  const conf = await confirmAt("L3", { ...ctx});
5043
5042
  if (!conf.proceed) {
5044
5043
  const reason = conf.reason === "flag-missing" ? "level-flag-missing" : "user-cancel";
@@ -5158,7 +5157,7 @@ ${newEntry}
5158
5157
  }
5159
5158
  ]
5160
5159
  };
5161
- process.stdout.write(renderDiff(plan, ctx));
5160
+ if (!ctx.opts.quiet) process.stdout.write(renderDiff(plan, ctx));
5162
5161
  const conf = await confirmAt("L3", { ...ctx});
5163
5162
  if (!conf.proceed) {
5164
5163
  const reason = conf.reason === "flag-missing" ? "level-flag-missing" : "user-cancel";
@@ -5234,7 +5233,7 @@ var installNpmCli = async (ctx) => {
5234
5233
  let level = detectLevel(install.cmd);
5235
5234
  let cmd = install.cmd;
5236
5235
  const plan = { files: [] };
5237
- process.stdout.write(renderDiff(plan, ctx));
5236
+ if (!ctx.opts.quiet) process.stdout.write(renderDiff(plan, ctx));
5238
5237
  if (level === "L4")
5239
5238
  process.stdout.write(" (L4 system install \u2014 global PATH change; see cmd above)\n");
5240
5239
  const conf = await confirmAt(level, { ...ctx});
@@ -5359,7 +5358,7 @@ var installNpxSkillInstaller = async (ctx) => {
5359
5358
  }
5360
5359
  ]
5361
5360
  };
5362
- process.stdout.write(renderDiff(plan, ctx));
5361
+ if (!ctx.opts.quiet) process.stdout.write(renderDiff(plan, ctx));
5363
5362
  const conf = await confirmAt("L2", { ...ctx});
5364
5363
  if (!conf.proceed) {
5365
5364
  const reason = conf.reason === "flag-missing" ? "level-flag-missing" : "user-cancel";
@@ -6191,7 +6190,8 @@ async function runStepBInstall(manifestPaths, runOpts = {}) {
6191
6190
  nonInteractive: true,
6192
6191
  fullDiff: false,
6193
6192
  color: "auto",
6194
- updateInstalled: runOpts.updateInstalled === true
6193
+ updateInstalled: runOpts.updateInstalled === true,
6194
+ quiet: runOpts.quiet === true
6195
6195
  };
6196
6196
  const start = Date.now();
6197
6197
  const settled = await Promise.allSettled(
@@ -6294,8 +6294,6 @@ function registerSetup(program2) {
6294
6294
  const dst = join(skillsBase, wf.name);
6295
6295
  try {
6296
6296
  await cp(src, dst, { recursive: true, force: true });
6297
- const masterTag = wf.isMaster ? " (master)" : "";
6298
- console.log(` [A] installed ${wf.name} \u2192 ${dst}${masterTag}`);
6299
6297
  skillsInstalled++;
6300
6298
  } catch (e) {
6301
6299
  console.error(t("setup.copy_failed", { name: wf.name, message: e.message }));
@@ -6305,13 +6303,6 @@ function registerSetup(program2) {
6305
6303
  console.log(t("setup.step_a_complete", { count: skillsInstalled, path: skillsBase }));
6306
6304
  const skillNames = toInstall.map((wf) => wf.name);
6307
6305
  const rendered = await renderAllSkills(skillNames, skillsBase, workflowsDir);
6308
- const renderedCount = rendered.results.filter((r) => r.rendered).length;
6309
- console.log(
6310
- t("setup.step_a_render.complete", {
6311
- count: renderedCount,
6312
- total: skillsInstalled
6313
- })
6314
- );
6315
6306
  if (rendered.aggregatedWarnings.length > 0) {
6316
6307
  console.warn(t("setup.step_a_render.warnings_header"));
6317
6308
  for (const w of rendered.aggregatedWarnings) {
@@ -6348,50 +6339,16 @@ function registerSetup(program2) {
6348
6339
  );
6349
6340
  const writtenCount = cmdResult.results.filter((r) => r.written).length;
6350
6341
  const skippedCount = cmdResult.results.filter((r) => !r.written && r.warning).length;
6351
- console.log(
6352
- ` [A.6] generated ${writtenCount} commands/<x>.md file(s) (${skippedCount} skipped \u2014 existing user file or schema warn)`
6353
- );
6354
- for (const r of cmdResult.results) {
6355
- if (r.written) {
6356
- console.log(` [A.6] wrote /${r.name} \u2192 ${r.path}`);
6357
- } else if (r.warning) {
6358
- console.warn(` [A.6] skipped /${r.name}: ${r.warning}`);
6359
- }
6360
- }
6361
- const cResult = await enableAgentTeamsInSettings();
6362
- if (cResult.status === "created") {
6363
- console.log(t("setup.step_c.created", { path: cResult.path }));
6364
- } else if (cResult.status === "already-enabled") {
6365
- console.log(t("setup.step_c.already_enabled", { path: cResult.path }));
6366
- } else if (cResult.status === "enabled") {
6342
+ if (writtenCount > 0 || skippedCount > 0) {
6367
6343
  console.log(
6368
- t("setup.step_c.enabled_backup", {
6369
- path: cResult.path,
6370
- backupPath: cResult.backupPath
6371
- })
6344
+ ` generated ${writtenCount} commands/<x>.md file(s) (${skippedCount} skipped)`
6372
6345
  );
6373
- } else {
6374
- console.warn(t("setup.step_c.skipped", { message: cResult.message }));
6375
- }
6376
- const dResult = await enableUserLangInSettings(raw.userLang);
6377
- if (dResult.status === "created") {
6378
- console.log(t("setup.step_d.created", { path: dResult.path, lang: dResult.detected }));
6379
- } else if (dResult.status === "already-set") {
6380
- console.log(t("setup.step_d.already_set", { path: dResult.path, lang: dResult.existing }));
6381
- } else if (dResult.status === "enabled") {
6382
- console.log(
6383
- t("setup.step_d.enabled_backup", {
6384
- path: dResult.path,
6385
- lang: dResult.detected,
6386
- backupPath: dResult.backupPath
6387
- })
6388
- );
6389
- } else {
6390
- console.warn(t("setup.step_d.skipped", { message: dResult.message }));
6391
6346
  }
6347
+ await enableAgentTeamsInSettings();
6348
+ await enableUserLangInSettings(raw.userLang);
6392
6349
  const manifestPaths = await listBaseManifests2(pkgRoot);
6393
6350
  const forceFirstPass = raw.updateInstalled === true;
6394
- const b = await runStepBInstall(manifestPaths, { updateInstalled: forceFirstPass });
6351
+ const b = await runStepBInstall(manifestPaths, { updateInstalled: forceFirstPass, quiet: true });
6395
6352
  const stepBMs = (b.elapsedMs / 1e3).toFixed(1);
6396
6353
  console.log(
6397
6354
  t("setup.step_b_complete", {
@@ -6416,7 +6373,7 @@ function registerSetup(program2) {
6416
6373
  initialValue: false
6417
6374
  });
6418
6375
  if (!isCancel5(ans) && ans === true) {
6419
- const b2 = await runStepBInstall(manifestPaths, { updateInstalled: true });
6376
+ const b2 = await runStepBInstall(manifestPaths, { updateInstalled: true, quiet: true });
6420
6377
  const stepB2Ms = (b2.elapsedMs / 1e3).toFixed(1);
6421
6378
  console.log(
6422
6379
  `