create-egregore 0.21.0-runtime-mvp.4 → 0.21.0-runtime-mvp.5

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // egregore-launcher-version: 0.21.0-runtime-mvp.4
2
+ // egregore-launcher-version: 0.21.0-runtime-mvp.5
3
3
  //
4
4
  // egregore — launch and browse Egregore instances from your terminal.
5
5
  // Installed by create-egregore. Reads ~/.egregore/instances.json.
@@ -35,7 +35,7 @@ const crypto = require("node:crypto");
35
35
  const { spawnSync, spawn } = require("node:child_process");
36
36
  const readline = require("node:readline");
37
37
 
38
- const VERSION = "0.21.0-runtime-mvp.4";
38
+ const VERSION = "0.21.0-runtime-mvp.5";
39
39
  const REGISTRY = path.join(os.homedir(), ".egregore", "instances.json");
40
40
  const DEFAULT_FILE = path.join(os.homedir(), ".egregore", "default");
41
41
  const UPDATE_CACHE_FILE = path.join(os.homedir(), ".egregore", "update-check.json");
@@ -2576,6 +2576,26 @@ const UPGRADE_STATUS_LABEL = {
2576
2576
  "rolled-back": "rolled back",
2577
2577
  };
2578
2578
 
2579
+ // Settings-row truth for the Runtime update line. The row must say outright
2580
+ // whether this egregore runs the new Runtime — "no update staged" is
2581
+ // transaction state, not the condition the user needs to see.
2582
+ function runtimeUpdateRowValue(st, candidate) {
2583
+ if (st === undefined) return `${DIM}checking…${RESET}`;
2584
+ if (st === null) return `${DIM}unavailable${RESET}`;
2585
+ if (st.status === "active") {
2586
+ const v = st.active_version || "?";
2587
+ if (candidate && candidate !== v) return `${v} active ${YELLOW}· update available ${candidate}${RESET}`;
2588
+ return `${GREEN}${v} active${RESET}${candidate ? `${DIM} · up to date${RESET}` : ""}`;
2589
+ }
2590
+ if (st.status === "ready-to-activate") return `${GREEN}${upgradeSummary(st)}${RESET}`;
2591
+ if (st.status === "failed" || st.status === "interrupted") return `${YELLOW}${upgradeSummary(st)}${RESET}`;
2592
+ if (st.status === "preparing" || st.status === "pending") return `${DIM}${upgradeSummary(st)}${RESET}`;
2593
+ // No activation record (or cancelled/rolled back): this egregore is not on
2594
+ // the new Runtime. Say so, and name the candidate when we know it.
2595
+ const base = `${YELLOW}not updated to the new Runtime${RESET}`;
2596
+ return candidate ? `${base}${DIM} · ${candidate} available${RESET}` : base;
2597
+ }
2598
+
2579
2599
  function upgradeSummary(st) {
2580
2600
  // "none" means no activation record — a first-time state, not freshness.
2581
2601
  if (!st || st.status === "none") return "no update staged";
@@ -3086,7 +3106,7 @@ function renderUpgradePanel({ inst, data, candidate, retrieval, mode, notice, wi
3086
3106
  return lines;
3087
3107
  }
3088
3108
 
3089
- function renderSettingsPanel({ inst, data, cursor, view, domain, items, listCursor, mode, input, notice, width, upgrade, retrieval }) {
3109
+ function renderSettingsPanel({ inst, data, cursor, view, domain, items, listCursor, mode, input, notice, width, upgrade, retrieval, candidate }) {
3090
3110
  const title = inst.slug || inst.name || path.basename(inst.path);
3091
3111
  const outerWidth = Math.min(Math.max(50, width - 2), 126);
3092
3112
  const innerWidth = Math.max(48, outerWidth - 2);
@@ -3231,15 +3251,7 @@ function renderSettingsPanel({ inst, data, cursor, view, domain, items, listCurs
3231
3251
  lines.push(boxLine(`${DIM}↑↓ nav · ${RESET}${BOLD}a${RESET}${DIM} add · ${RESET}${BOLD}d${RESET}${DIM} delete · ← back · q quit${RESET}`, innerWidth, margin));
3232
3252
  }
3233
3253
  } else {
3234
- const upgradeValue = upgrade === undefined
3235
- ? `${DIM}checking…${RESET}`
3236
- : upgrade === null
3237
- ? `${DIM}unavailable${RESET}`
3238
- : upgrade.status === "ready-to-activate"
3239
- ? `${GREEN}${upgradeSummary(upgrade)}${RESET}`
3240
- : upgrade.status === "failed" || upgrade.status === "interrupted"
3241
- ? `${YELLOW}${upgradeSummary(upgrade)}${RESET}`
3242
- : `${DIM}${upgradeSummary(upgrade)}${RESET}`;
3254
+ const upgradeValue = runtimeUpdateRowValue(upgrade, candidate);
3243
3255
  const rows = [
3244
3256
  {
3245
3257
  name: "Runtime update",
@@ -3427,6 +3439,7 @@ async function browser(args = {}) {
3427
3439
  width: w,
3428
3440
  upgrade: state.settingsUpgrade,
3429
3441
  retrieval: state.settingsRetrieval,
3442
+ candidate: state.upgradeCandidate,
3430
3443
  });
3431
3444
  for (const line of settingsLines) out.push(line + ANSI.clearLine + "\n");
3432
3445
  const remainingRows = Math.max(0, h - settingsLines.length - 1);
@@ -4256,6 +4269,12 @@ async function browser(args = {}) {
4256
4269
  state.settingsRetrieval = health;
4257
4270
  if (state.settingsInst === pick && !state.upgradeInst) render();
4258
4271
  });
4272
+ if (!state.upgradeCandidate) {
4273
+ fetchRuntimeMvpCandidate().then((v) => {
4274
+ state.upgradeCandidate = v || "";
4275
+ if (state.settingsInst === pick && !state.upgradeInst) render();
4276
+ });
4277
+ }
4259
4278
  state.settingsNotice = "";
4260
4279
  render();
4261
4280
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-egregore",
3
- "version": "0.21.0-runtime-mvp.4",
3
+ "version": "0.21.0-runtime-mvp.5",
4
4
  "description": "Set up Egregore for your team in one command — installs the egregore launcher and your choice of Claude Code, Codex, or Pi.",
5
5
  "license": "MIT",
6
6
  "bin": {