@m8t-stack/cli 0.2.124 → 0.2.126

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.124";
1457
+ var CLI_VERSION = "0.2.126";
1458
1458
 
1459
1459
  // src/lib/render-error.ts
1460
1460
  init_errors();
@@ -19536,11 +19536,11 @@ function fromBuild(raw, fallbackRef) {
19536
19536
  };
19537
19537
  }
19538
19538
  var DEV_TAG = "v0.0.0-dev";
19539
- var PINNED_INSTALLER = fromBuild('{"ref":"ghcr.io/m8t-labs/m8t-installer:v0.1.87","registry":"ghcr.io/m8t-labs","image":"m8t-installer","tag":"v0.1.87"}', "ghcr.io/m8t-labs/m8t-installer");
19539
+ var PINNED_INSTALLER = fromBuild('{"ref":"ghcr.io/m8t-labs/m8t-installer:v0.1.92","registry":"ghcr.io/m8t-labs","image":"m8t-installer","tag":"v0.1.92"}', "ghcr.io/m8t-labs/m8t-installer");
19540
19540
  var PINNED_CODING_AGENT = fromBuild('{"ref":"ghcr.io/m8t-labs/m8t-coding-agent:v0.1.5","registry":"ghcr.io/m8t-labs","image":"m8t-coding-agent","tag":"v0.1.5"}', "ghcr.io/m8t-labs/m8t-coding-agent");
19541
19541
  var PINNED_AZURE_EXECUTOR = fromBuild('{"ref":"ghcr.io/m8t-labs/m8t-azure-executor:v0.1.5","registry":"ghcr.io/m8t-labs","image":"m8t-azure-executor","tag":"v0.1.5"}', "ghcr.io/m8t-labs/m8t-azure-executor");
19542
19542
  var PINNED_PLATFORM_VERSION = (() => {
19543
- const raw = "0.7.8";
19543
+ const raw = "0.8.0";
19544
19544
  return /^\d+\.\d+\.\d+$/.test(raw) ? raw : "";
19545
19545
  })();
19546
19546
 
@@ -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 stamp = await readStamp({ credential: credential2, subscriptionId, resourceGroup });
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
- kind: "platform-status",
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("");