@m8t-stack/cli 0.2.123 → 0.2.125
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 +41 -20
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
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.
|
|
1457
|
+
var CLI_VERSION = "0.2.125";
|
|
1458
1458
|
|
|
1459
1459
|
// src/lib/render-error.ts
|
|
1460
1460
|
init_errors();
|
|
@@ -21256,6 +21256,30 @@ async function resolveReleaseContentWithAgents(manifest, opts = {}) {
|
|
|
21256
21256
|
return contentDir;
|
|
21257
21257
|
}
|
|
21258
21258
|
|
|
21259
|
+
// src/lib/platform-status-shape.ts
|
|
21260
|
+
function stampOf(outcome) {
|
|
21261
|
+
return outcome.source === "explicit" ? outcome.stamp : null;
|
|
21262
|
+
}
|
|
21263
|
+
function buildStatusJson(args) {
|
|
21264
|
+
const stamp = stampOf(args.outcome);
|
|
21265
|
+
return {
|
|
21266
|
+
kind: "platform-status",
|
|
21267
|
+
gateway: args.resourceGroup,
|
|
21268
|
+
targetVersion: args.targetVersion,
|
|
21269
|
+
// Emitted as null rather than omitted, always. A consumer can then tell "no
|
|
21270
|
+
// stamp" from "this CLI is too old to say", which an absent key cannot.
|
|
21271
|
+
installedVersion: stamp?.platformVersion ?? null,
|
|
21272
|
+
stampRead: args.outcome.source,
|
|
21273
|
+
managed: args.outcome.source === "explicit",
|
|
21274
|
+
rows: args.rows
|
|
21275
|
+
};
|
|
21276
|
+
}
|
|
21277
|
+
function statusVersionsLine(args) {
|
|
21278
|
+
const stamp = stampOf(args.outcome);
|
|
21279
|
+
const suffix = args.outcome.source === "absent" ? " (unmanaged \u2014 no stamp found)" : args.outcome.source === "unreadable" ? " (stamp UNREADABLE \u2014 not the same as unstamped; check the identity's data-plane access)" : "";
|
|
21280
|
+
return `installed: ${stamp?.platformVersion ?? "(none)"} target: ${args.targetVersion}${suffix}`;
|
|
21281
|
+
}
|
|
21282
|
+
|
|
21259
21283
|
// src/lib/platform-converge.ts
|
|
21260
21284
|
init_esm();
|
|
21261
21285
|
import * as fs26 from "fs";
|
|
@@ -22659,7 +22683,8 @@ var PlatformStatusCommand = class extends M8tCommand {
|
|
|
22659
22683
|
const subscriptionId = this.subscription ?? account.subscriptionId;
|
|
22660
22684
|
const source = manifestFile ? { file: manifestFile } : manifestUrl ? { url: manifestUrl } : { channel: true, version: to };
|
|
22661
22685
|
const manifest = await fetchManifest(source);
|
|
22662
|
-
const
|
|
22686
|
+
const outcome = await readStampOutcome({ credential: credential2, subscriptionId, resourceGroup });
|
|
22687
|
+
const stamp = stampOf(outcome);
|
|
22663
22688
|
const tree = contentDirFlag ? { treeShaOf: () => void 0 } : await fetchRepoTree(manifest.platform.commit);
|
|
22664
22689
|
const rows = statusRows(manifest, stamp, tree);
|
|
22665
22690
|
let verify;
|
|
@@ -22674,26 +22699,13 @@ var PlatformStatusCommand = class extends M8tCommand {
|
|
|
22674
22699
|
if (mode === "json") {
|
|
22675
22700
|
this.context.stdout.write(
|
|
22676
22701
|
renderJson({
|
|
22677
|
-
|
|
22678
|
-
gateway: resourceGroup,
|
|
22679
|
-
targetVersion: manifest.platform.tag,
|
|
22680
|
-
// What the install RECORDS it is running, as opposed to what the channel
|
|
22681
|
-
// currently offers (targetVersion). `managed` already says whether a stamp
|
|
22682
|
-
// exists; this says what it holds — the row the updater diffs against and
|
|
22683
|
-
// fleet telemetry aggregates, which was previously unreadable from this
|
|
22684
|
-
// command at all. null when unstamped, never absent, so a consumer can
|
|
22685
|
-
// tell "no stamp" from "field not emitted by an older CLI".
|
|
22686
|
-
installedVersion: stamp?.platformVersion ?? null,
|
|
22687
|
-
managed: stamp !== null,
|
|
22688
|
-
rows,
|
|
22702
|
+
...buildStatusJson({ resourceGroup, targetVersion: manifest.platform.tag, outcome, rows }),
|
|
22689
22703
|
...verify ? { verify } : {}
|
|
22690
22704
|
}) + "\n"
|
|
22691
22705
|
);
|
|
22692
22706
|
return 0;
|
|
22693
22707
|
}
|
|
22694
|
-
log(colors.field(
|
|
22695
|
-
`installed: ${stamp?.platformVersion ?? "(none)"} target: ${manifest.platform.tag}` + (stamp === null ? " (unmanaged \u2014 no stamp found)" : "")
|
|
22696
|
-
));
|
|
22708
|
+
log(colors.field(statusVersionsLine({ targetVersion: manifest.platform.tag, outcome })));
|
|
22697
22709
|
this.context.stdout.write(this.renderRows(rows) + "\n");
|
|
22698
22710
|
if (verify) {
|
|
22699
22711
|
log("");
|
|
@@ -23692,6 +23704,7 @@ var PlatformUpdateCommand = class extends M8tCommand {
|
|
|
23692
23704
|
};
|
|
23693
23705
|
|
|
23694
23706
|
// src/commands/platform/converge.ts
|
|
23707
|
+
import { writeFileSync as writeFileSync8 } from "fs";
|
|
23695
23708
|
import { Command as Command36 } from "clipanion";
|
|
23696
23709
|
|
|
23697
23710
|
// src/lib/platform-converge-mi.ts
|
|
@@ -24099,6 +24112,14 @@ var PlatformConvergeCommand = class extends M8tCommand {
|
|
|
24099
24112
|
return 0;
|
|
24100
24113
|
}
|
|
24101
24114
|
log(`claimed apply-request \u2192 target ${claimed.target} (execution ${executionId}).`);
|
|
24115
|
+
const targetFile = process.env.M8T_CONVERGE_TARGET_FILE;
|
|
24116
|
+
if (targetFile) {
|
|
24117
|
+
try {
|
|
24118
|
+
writeFileSync8(targetFile, claimed.target, "utf8");
|
|
24119
|
+
} catch (e) {
|
|
24120
|
+
log(`note: could not record the claimed target for the engine (${e.message}); the converge continues.`);
|
|
24121
|
+
}
|
|
24122
|
+
}
|
|
24102
24123
|
const stamp = await readStamp({
|
|
24103
24124
|
credential: ctx.credential,
|
|
24104
24125
|
subscriptionId: ctx.subscriptionId,
|
|
@@ -26418,7 +26439,7 @@ var EvalSkillCommand = class extends M8tCommand {
|
|
|
26418
26439
|
|
|
26419
26440
|
// src/commands/eval/exam.ts
|
|
26420
26441
|
import { spawnSync as spawnSync5 } from "child_process";
|
|
26421
|
-
import { writeFileSync as
|
|
26442
|
+
import { writeFileSync as writeFileSync9, mkdirSync as mkdirSync6, readFileSync as readFileSync22, existsSync as existsSync20, readdirSync as readdirSync3 } from "fs";
|
|
26422
26443
|
import { join as join30 } from "path";
|
|
26423
26444
|
import { Command as Command48, Option as Option45 } from "clipanion";
|
|
26424
26445
|
init_errors();
|
|
@@ -26744,9 +26765,9 @@ var EvalExamCommand = class extends M8tCommand {
|
|
|
26744
26765
|
if (out !== void 0) {
|
|
26745
26766
|
const sealedTaskIds = taskSetVersion ? readSealedTaskIds(taskSetVersion, out) : /* @__PURE__ */ new Set();
|
|
26746
26767
|
mkdirSync6(out, { recursive: true });
|
|
26747
|
-
|
|
26768
|
+
writeFileSync9(join30(out, "verdict.json"), JSON.stringify(verdict, null, 2));
|
|
26748
26769
|
const feed = redactForFeed(verdict, sealedTaskIds);
|
|
26749
|
-
|
|
26770
|
+
writeFileSync9(join30(out, "feed.json"), JSON.stringify(feed, null, 2));
|
|
26750
26771
|
}
|
|
26751
26772
|
if (mode === "json") {
|
|
26752
26773
|
this.context.stdout.write(renderJson(verdict) + "\n");
|