harnessed 3.9.16 → 3.9.17

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
@@ -287,25 +287,25 @@ var init_schemaVersion = __esm({
287
287
  routeDecisionLog: "harnessed.route-decision-log.v1",
288
288
  checkpoint: "harnessed.checkpoint.v1",
289
289
  currentWorkflow: "harnessed.current-workflow.v1",
290
- // ← Phase 3.1 W1 T1.1 ADD 8th surface (D-02 KARPATHY 3-state)
290
+ // ← Phase 3.1 W1 T1.1 ADD (D-02 KARPATHY 3-state)
291
291
  config: "harnessed.config.v1",
292
- // ← Phase 3.2 W1 T1.1 ADD 9th surface (D-01 PROBE gstack_prefix store)
292
+ // ← Phase 3.2 W1 T1.1 ADD (D-01 PROBE gstack_prefix store)
293
293
  governance: "harnessed.governance.v1",
294
- // ← Phase 3.2 W1 T1.1 ADD 10th surface (D-04 PUSH veto status)
294
+ // ← Phase 3.2 W1 T1.1 ADD (D-04 PUSH veto status)
295
295
  aliases: "harnessed.aliases.v1",
296
- // ← Phase 3.3 W1 T1.1 ADD 12th surface (D-01 RICH)
296
+ // ← Phase 3.3 W1 T1.1 ADD (D-01 RICH)
297
297
  knownGood: "harnessed.known-good.v1",
298
- // ← Phase 3.3 W1 T1.1 ADD 13th surface (D-03 YAML manifest)
298
+ // ← Phase 3.3 W1 T1.1 ADD (D-03 YAML manifest)
299
299
  capabilities: "harnessed.capabilities.v1",
300
- // ← Phase v2.0-2.3 W0 ADD 14th surface (R20.2 flat yaml capabilities manifest validate)
300
+ // ← Phase v2.0-2.3 W0 ADD (R20.2 flat yaml capabilities manifest validate)
301
301
  judgment: "harnessed.judgment.v1",
302
- // ← Phase v2.0-2.3 W0 ADD 15th surface (R20.4 multi-file judgments validate)
302
+ // ← Phase v2.0-2.3 W0 ADD (R20.4 multi-file judgments validate)
303
303
  workflow: "harnessed.workflow.v2",
304
- // ← Phase v2.0-2.4 W0 T2.4.W0.1 ADD 16th surface (R20.1+R20.2+R20.9 workflow.yaml v2)
304
+ // ← Phase v2.0-2.4 W0 T2.4.W0.1 ADD (R20.1+R20.2+R20.9 workflow.yaml v2)
305
305
  workflow_v3: "harnessed.workflow.v3",
306
- // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD 17th surface (D-09 disciplines_applied + D-05 tools_available + master delegates_to per Pattern A B.1 LOCK)
306
+ // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD (D-09 disciplines_applied + D-05 tools_available + master delegates_to per Pattern A B.1 LOCK)
307
307
  discipline: "harnessed.discipline.v1"
308
- // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD 18th surface (D-09 L0 Discipline Substrate, sister judgment.v1 multi-file pattern)
308
+ // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD (D-09 L0 Discipline Substrate, sister judgment.v1 multi-file pattern)
309
309
  };
310
310
  Type.Union([
311
311
  Type.Literal(SCHEMA_VERSIONS.routingSnapshot),
@@ -316,25 +316,25 @@ var init_schemaVersion = __esm({
316
316
  Type.Literal(SCHEMA_VERSIONS.routeDecisionLog),
317
317
  Type.Literal(SCHEMA_VERSIONS.checkpoint),
318
318
  Type.Literal(SCHEMA_VERSIONS.currentWorkflow),
319
- // ← Phase 3.1 W1 T1.1 ADD 8th surface
319
+ // ← Phase 3.1 W1 T1.1 ADD
320
320
  Type.Literal(SCHEMA_VERSIONS.config),
321
- // ← Phase 3.2 W1 T1.1 ADD 9th surface
321
+ // ← Phase 3.2 W1 T1.1 ADD
322
322
  Type.Literal(SCHEMA_VERSIONS.governance),
323
- // ← Phase 3.2 W1 T1.1 ADD 10th surface
323
+ // ← Phase 3.2 W1 T1.1 ADD
324
324
  Type.Literal(SCHEMA_VERSIONS.aliases),
325
- // ← Phase 3.3 W1 T1.1 ADD 12th surface
325
+ // ← Phase 3.3 W1 T1.1 ADD
326
326
  Type.Literal(SCHEMA_VERSIONS.knownGood),
327
- // ← Phase 3.3 W1 T1.1 ADD 13th surface
327
+ // ← Phase 3.3 W1 T1.1 ADD
328
328
  Type.Literal(SCHEMA_VERSIONS.capabilities),
329
- // ← Phase v2.0-2.3 W0 ADD 14th surface
329
+ // ← Phase v2.0-2.3 W0 ADD
330
330
  Type.Literal(SCHEMA_VERSIONS.judgment),
331
- // ← Phase v2.0-2.3 W0 ADD 15th surface
331
+ // ← Phase v2.0-2.3 W0 ADD
332
332
  Type.Literal(SCHEMA_VERSIONS.workflow),
333
- // ← Phase v2.0-2.4 W0 T2.4.W0.1 ADD 16th surface (first .v2 in union)
333
+ // ← Phase v2.0-2.4 W0 T2.4.W0.1 ADD (first .v2 in union)
334
334
  Type.Literal(SCHEMA_VERSIONS.workflow_v3),
335
- // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD 17th surface (first .v3 in union)
335
+ // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD (first .v3 in union)
336
336
  Type.Literal(SCHEMA_VERSIONS.discipline)
337
- // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD 18th surface
337
+ // ← Phase v3.0-3.3 W0 T3.3.W0.11 ADD
338
338
  ]);
339
339
  }
340
340
  });
@@ -1218,7 +1218,7 @@ var init_auto_install = __esm({
1218
1218
 
1219
1219
  // package.json
1220
1220
  var package_default = {
1221
- version: "3.9.16"};
1221
+ version: "3.9.17"};
1222
1222
 
1223
1223
  // src/manifest/errors.ts
1224
1224
  function instancePathToKeyPath(instancePath) {
@@ -3608,13 +3608,6 @@ var installNpmCli = async (ctx) => {
3608
3608
  await updateInstalled(ctx.cwd, ctx.manifest.metadata.name, install.npm_version, "");
3609
3609
  return { ok: true, backupId: bk.backupId, appliedFiles: [] };
3610
3610
  };
3611
- function extractSkillName2(cmd, fallback) {
3612
- const m = cmd.match(/\bskills(?:@\S+)?\s+add\s+(\S+)/i);
3613
- if (!m || m[1] === void 0) return fallback;
3614
- const ref = m[1];
3615
- const seg = ref.split("/");
3616
- return seg[seg.length - 1] ?? fallback;
3617
- }
3618
3611
  var installNpxSkillInstaller = async (ctx) => {
3619
3612
  const install = ctx.manifest.spec.install;
3620
3613
  if (install.method !== "npx-skill-installer") {
@@ -3655,7 +3648,7 @@ var installNpxSkillInstaller = async (ctx) => {
3655
3648
  };
3656
3649
  }
3657
3650
  const name = ctx.manifest.metadata.name;
3658
- const skillSegment = extractSkillName2(install.cmd, name);
3651
+ const skillSegment = extractSkillName(install.cmd, name);
3659
3652
  const skillDir = join(homedir(), ".claude", "skills", skillSegment);
3660
3653
  const skillMdPath = join(skillDir, "SKILL.md");
3661
3654
  const plan = {
@@ -5455,8 +5448,10 @@ function registerRun(program2) {
5455
5448
  `\u2139 user-override detected: ${matchedTriggers.length} trigger(s) forced fires=true via keyword match (${matchedTriggers.join(", ")})`
5456
5449
  );
5457
5450
  }
5451
+ const stage = name.includes("-") ? name.split("-")[0] ?? "" : name;
5458
5452
  const gateContext = {
5459
5453
  task,
5454
+ phase: { stage, is_critical_module: true },
5460
5455
  ...raw.model ? { modelOverride: raw.model } : {},
5461
5456
  ...raw.maxIterations ? { maxIterations: raw.maxIterations } : {},
5462
5457
  ...raw.staged ? { staged: true } : {},
@@ -6036,11 +6031,7 @@ async function renderAllSkills(skillNames, skillsBase, workflowsDir, homedirOver
6036
6031
  return { results, aggregatedWarnings: [...warningSet] };
6037
6032
  }
6038
6033
  init_checkAgentTeams();
6039
- var FLAT_LEGACY_KEEP = /* @__PURE__ */ new Set([
6040
- "research",
6041
- "retro",
6042
- "auto"
6043
- ]);
6034
+ var FLAT_LEGACY_KEEP = /* @__PURE__ */ new Set(["research", "retro", "auto"]);
6044
6035
  var FLAT_TOP_LEVEL_MASTERS = /* @__PURE__ */ new Set(["auto"]);
6045
6036
  var NON_WORKFLOW_DIRS = /* @__PURE__ */ new Set(["disciplines", "judgments"]);
6046
6037
  async function scanWorkflowsNested(workflowsDir, entries) {
@@ -6271,15 +6262,16 @@ function registerSetup(program2) {
6271
6262
  const writtenCount = cmdResult.results.filter((r) => r.written).length;
6272
6263
  const skippedCount = cmdResult.results.filter((r) => !r.written && r.warning).length;
6273
6264
  if (writtenCount > 0 || skippedCount > 0) {
6274
- console.log(
6275
- ` generated ${writtenCount} commands/<x>.md file(s) (${skippedCount} skipped)`
6276
- );
6265
+ console.log(` generated ${writtenCount} commands/<x>.md file(s) (${skippedCount} skipped)`);
6277
6266
  }
6278
6267
  await enableAgentTeamsInSettings();
6279
6268
  await enableUserLangInSettings(raw.userLang);
6280
6269
  const manifestPaths = await listBaseManifests2(pkgRoot);
6281
6270
  const forceFirstPass = raw.updateInstalled === true;
6282
- const b = await runStepBInstall(manifestPaths, { updateInstalled: forceFirstPass, quiet: true });
6271
+ const b = await runStepBInstall(manifestPaths, {
6272
+ updateInstalled: forceFirstPass,
6273
+ quiet: true
6274
+ });
6283
6275
  const stepBMs = (b.elapsedMs / 1e3).toFixed(1);
6284
6276
  console.log(
6285
6277
  t("setup.step_b_complete", {
@@ -6291,8 +6283,7 @@ function registerSetup(program2) {
6291
6283
  })
6292
6284
  );
6293
6285
  for (const n of b.installed) console.log(` [B] installed ${n}`);
6294
- for (const n of b.alreadyInstalled)
6295
- console.log(` [B] already-installed ${n}`);
6286
+ for (const n of b.alreadyInstalled) console.log(` [B] already-installed ${n}`);
6296
6287
  for (const s of b.skipped) console.log(` [B] skipped ${s.name} \u2014 ${s.reason}`);
6297
6288
  for (const n of b.failed) console.error(` [B] failed ${n}`);
6298
6289
  if (!forceFirstPass && !dryRun && raw.nonInteractive !== true && b.alreadyInstalled.length > 0) {
@@ -6595,13 +6586,6 @@ var uninstallNpmCli = async (ctx) => {
6595
6586
  }
6596
6587
  return { ok: true, removedPaths: [pkg] };
6597
6588
  };
6598
- function extractSkillName3(cmd, fallback) {
6599
- const m = cmd.match(/\bskills(?:@\S+)?\s+add\s+(\S+)/i);
6600
- if (!m || m[1] === void 0) return fallback;
6601
- const ref = m[1];
6602
- const seg = ref.split("/");
6603
- return seg[seg.length - 1] ?? fallback;
6604
- }
6605
6589
  var uninstallNpxSkillInstaller = async (ctx) => {
6606
6590
  const install = ctx.manifest.spec.install;
6607
6591
  if (install.method !== "npx-skill-installer") {
@@ -6610,7 +6594,7 @@ var uninstallNpxSkillInstaller = async (ctx) => {
6610
6594
  const abort = dryRunGate(ctx);
6611
6595
  if (abort) return abort;
6612
6596
  const name = ctx.manifest.metadata.name;
6613
- const skillName = extractSkillName3(install.cmd, name);
6597
+ const skillName = extractSkillName(install.cmd, name);
6614
6598
  const skillDir = join(homedir(), ".claude", "skills", skillName);
6615
6599
  await rm(skillDir, { recursive: true, force: true, maxRetries: 3 });
6616
6600
  return { ok: true, removedPaths: [skillDir] };