@m8t-stack/cli 0.2.122 → 0.2.124

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.js CHANGED
@@ -1454,7 +1454,7 @@ function installFoundryDnsShim() {
1454
1454
  }
1455
1455
 
1456
1456
  // src/lib/package-version.ts
1457
- var CLI_VERSION = "0.2.122";
1457
+ var CLI_VERSION = "0.2.124";
1458
1458
 
1459
1459
  // src/lib/render-error.ts
1460
1460
  init_errors();
@@ -23692,6 +23692,7 @@ var PlatformUpdateCommand = class extends M8tCommand {
23692
23692
  };
23693
23693
 
23694
23694
  // src/commands/platform/converge.ts
23695
+ import { writeFileSync as writeFileSync8 } from "fs";
23695
23696
  import { Command as Command36 } from "clipanion";
23696
23697
 
23697
23698
  // src/lib/platform-converge-mi.ts
@@ -24099,6 +24100,14 @@ var PlatformConvergeCommand = class extends M8tCommand {
24099
24100
  return 0;
24100
24101
  }
24101
24102
  log(`claimed apply-request \u2192 target ${claimed.target} (execution ${executionId}).`);
24103
+ const targetFile = process.env.M8T_CONVERGE_TARGET_FILE;
24104
+ if (targetFile) {
24105
+ try {
24106
+ writeFileSync8(targetFile, claimed.target, "utf8");
24107
+ } catch (e) {
24108
+ log(`note: could not record the claimed target for the engine (${e.message}); the converge continues.`);
24109
+ }
24110
+ }
24102
24111
  const stamp = await readStamp({
24103
24112
  credential: ctx.credential,
24104
24113
  subscriptionId: ctx.subscriptionId,
@@ -24697,14 +24706,27 @@ function crossCheckContent(manifest, content) {
24697
24706
  if (content.infra !== manifestInfra) {
24698
24707
  problems.push({ field: "infra", baked: content.infra, manifest: manifestInfra });
24699
24708
  }
24700
- const manifestSeeds = seedSetRev(manifest);
24701
- if (content.brainSeedsRev !== manifestSeeds) {
24702
- problems.push({ field: "brainSeeds", baked: content.brainSeedsRev, manifest: manifestSeeds });
24703
- }
24704
24709
  for (const [name, item] of Object.entries(manifest.components.personas.items)) {
24705
- const baked = Object.hasOwn(content.personas, name) ? content.personas[name] : "";
24706
- if (baked !== item.treeSha) {
24707
- problems.push({ field: `personas.${name}`, baked: baked || "<absent from this image>", manifest: item.treeSha });
24710
+ if (!Object.hasOwn(content.personas, name)) continue;
24711
+ if (content.personas[name] !== item.treeSha) {
24712
+ problems.push({ field: `personas.${name}`, baked: content.personas[name], manifest: item.treeSha });
24713
+ }
24714
+ }
24715
+ const manifestSeeds = manifest.components.brainSeeds.items;
24716
+ for (const entry of content.brainSeedsRev.split("|")) {
24717
+ if (!entry) continue;
24718
+ const first = entry.indexOf(":");
24719
+ const second = entry.indexOf(":", first + 1);
24720
+ if (first < 0 || second < 0) continue;
24721
+ const name = entry.slice(0, first);
24722
+ const sub = entry.slice(first + 1, second);
24723
+ const baked = entry.slice(second + 1);
24724
+ if (!Object.hasOwn(manifestSeeds, name)) continue;
24725
+ const subtrees = manifestSeeds[name].subtrees;
24726
+ if (!Object.hasOwn(subtrees, sub)) continue;
24727
+ const want = subtrees[sub] ?? "-";
24728
+ if (baked !== want) {
24729
+ problems.push({ field: `brainSeeds.${name}.${sub}`, baked, manifest: want });
24708
24730
  }
24709
24731
  }
24710
24732
  return problems;
@@ -26405,7 +26427,7 @@ var EvalSkillCommand = class extends M8tCommand {
26405
26427
 
26406
26428
  // src/commands/eval/exam.ts
26407
26429
  import { spawnSync as spawnSync5 } from "child_process";
26408
- import { writeFileSync as writeFileSync8, mkdirSync as mkdirSync6, readFileSync as readFileSync22, existsSync as existsSync20, readdirSync as readdirSync3 } from "fs";
26430
+ import { writeFileSync as writeFileSync9, mkdirSync as mkdirSync6, readFileSync as readFileSync22, existsSync as existsSync20, readdirSync as readdirSync3 } from "fs";
26409
26431
  import { join as join30 } from "path";
26410
26432
  import { Command as Command48, Option as Option45 } from "clipanion";
26411
26433
  init_errors();
@@ -26731,9 +26753,9 @@ var EvalExamCommand = class extends M8tCommand {
26731
26753
  if (out !== void 0) {
26732
26754
  const sealedTaskIds = taskSetVersion ? readSealedTaskIds(taskSetVersion, out) : /* @__PURE__ */ new Set();
26733
26755
  mkdirSync6(out, { recursive: true });
26734
- writeFileSync8(join30(out, "verdict.json"), JSON.stringify(verdict, null, 2));
26756
+ writeFileSync9(join30(out, "verdict.json"), JSON.stringify(verdict, null, 2));
26735
26757
  const feed = redactForFeed(verdict, sealedTaskIds);
26736
- writeFileSync8(join30(out, "feed.json"), JSON.stringify(feed, null, 2));
26758
+ writeFileSync9(join30(out, "feed.json"), JSON.stringify(feed, null, 2));
26737
26759
  }
26738
26760
  if (mode === "json") {
26739
26761
  this.context.stdout.write(renderJson(verdict) + "\n");