create-egregore 0.21.0-runtime-mvp.6 → 0.21.0-runtime-mvp.7

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.6
2
+ // egregore-launcher-version: 0.21.0-runtime-mvp.7
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.6";
38
+ const VERSION = "0.21.0-runtime-mvp.7";
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");
@@ -3169,6 +3169,40 @@ function renderSettingsPanel({ inst, data, cursor, view, domain, items, listCurs
3169
3169
  emptyBoxLine(innerWidth, margin),
3170
3170
  ];
3171
3171
 
3172
+ if (view === "workflow") {
3173
+ const current = (d.workflow === "simple" || d.workflow === "staged") ? d.workflow : "custom";
3174
+ lines.push(boxLine(`${BOLD}Git workflow${RESET}`, innerWidth, margin));
3175
+ lines.push(emptyBoxLine(innerWidth, margin));
3176
+ const options = [
3177
+ { key: "simple", name: "Simple", detail: "pull requests target main — one branch, no release staging" },
3178
+ { key: "staged", name: "Staged", detail: "pull requests target develop; releases promote to main" },
3179
+ ];
3180
+ options.forEach((option, i) => {
3181
+ const sel = i === listCursor;
3182
+ const marker = sel ? `${CYAN}❯${RESET}` : " ";
3183
+ const active = option.key === current ? ` ${GREEN}● current${RESET}` : "";
3184
+ lines.push(boxLine(`${marker} ${sel ? BOLD : ""}${option.name}${RESET}${active}`, innerWidth, margin));
3185
+ lines.push(boxLine(` ${DIM}${option.detail}${RESET}`, innerWidth, margin));
3186
+ });
3187
+ if (current === "custom") {
3188
+ lines.push(emptyBoxLine(innerWidth, margin));
3189
+ lines.push(boxLine(`${YELLOW}● current: CUSTOM${RESET} ${DIM}— pull requests target ${d.base_branch || "?"}${RESET}`, innerWidth, margin));
3190
+ lines.push(boxLine(` ${DIM}selecting an option above replaces this for the whole org${RESET}`, innerWidth, margin));
3191
+ }
3192
+ lines.push(emptyBoxLine(innerWidth, margin));
3193
+ if (mode === "confirm") {
3194
+ const target = listCursor === 0 ? "SIMPLE — pull requests target main" : "STAGED — pull requests target develop";
3195
+ lines.push(boxLine(`${YELLOW}Switch ${BOLD}${title}${RESET}${YELLOW} to ${target}?${RESET}`, innerWidth, margin));
3196
+ lines.push(boxLine(`${DIM}This edits the org's committed egregore.json for everyone.${RESET} ${DIM}y / N${RESET}`, innerWidth, margin));
3197
+ } else {
3198
+ if (notice) lines.push(boxLine(notice, innerWidth, margin));
3199
+ lines.push(boxLine(`${DIM}↑↓ nav · ${RESET}${BOLD}enter${RESET}${DIM} select · ← back · q quit${RESET}`, innerWidth, margin));
3200
+ }
3201
+ lines.push(emptyBoxLine(innerWidth, margin));
3202
+ lines.push(`${margin}${DIM}└${"─".repeat(innerWidth)}┘${RESET}`);
3203
+ return lines;
3204
+ }
3205
+
3172
3206
  if (view === "privacy" || view === "telemetry") {
3173
3207
  lines.push(boxLine(`${BOLD}${view === "privacy" ? "Privacy & access" : "Telemetry"}${RESET}`, innerWidth, margin));
3174
3208
  lines.push(emptyBoxLine(innerWidth, margin));
@@ -3330,7 +3364,7 @@ function renderSettingsPanel({ inst, data, cursor, view, domain, items, listCurs
3330
3364
  });
3331
3365
  lines.push(emptyBoxLine(innerWidth, margin));
3332
3366
  if (notice) lines.push(boxLine(notice, innerWidth, margin));
3333
- lines.push(boxLine(`${DIM}↑↓ nav · ${RESET}${BOLD}enter${RESET}${DIM} ${cursor === 3 || cursor === 4 ? "toggle" : "open"} · ← back · q quit${RESET}`, innerWidth, margin));
3367
+ lines.push(boxLine(`${DIM}↑↓ nav · ${RESET}${BOLD}enter${RESET}${DIM} ${cursor === 3 ? "toggle" : "open"} · ← back · q quit${RESET}`, innerWidth, margin));
3334
3368
  }
3335
3369
 
3336
3370
  lines.push(emptyBoxLine(innerWidth, margin));
@@ -3876,6 +3910,36 @@ async function browser(args = {}) {
3876
3910
  if (key.ctrl && key.name === "c") { cleanup(); process.exit(130); }
3877
3911
  if (key.name === "q") { cleanup(); resolve(); return; }
3878
3912
 
3913
+ if (S.settingsView === "workflow") {
3914
+ if (S.settingsMode === "confirm") {
3915
+ if (chunk === "y" || chunk === "Y") {
3916
+ settingsRunVerb(["workflow", S.settingsListCursor === 0 ? "simple" : "staged"]);
3917
+ S.settingsMode = "browse";
3918
+ S.settingsView = "menu";
3919
+ render(); return;
3920
+ }
3921
+ if (key.name === "escape" || chunk === "n" || chunk === "N" || key.name === "return") {
3922
+ S.settingsMode = "browse"; render(); return;
3923
+ }
3924
+ return;
3925
+ }
3926
+ if (key.name === "escape" || key.name === "left") {
3927
+ S.settingsView = "menu"; S.settingsNotice = ""; render(); return;
3928
+ }
3929
+ if (key.name === "up" || key.name === "k") { S.settingsListCursor = (S.settingsListCursor + 1) % 2; render(); return; }
3930
+ if (key.name === "down" || key.name === "j") { S.settingsListCursor = (S.settingsListCursor + 1) % 2; render(); return; }
3931
+ if (key.name === "return") {
3932
+ const chosen = S.settingsListCursor === 0 ? "simple" : "staged";
3933
+ const current = (S.settingsData && S.settingsData.workflow) || "custom";
3934
+ if (chosen === current) {
3935
+ S.settingsNotice = `${DIM}already on ${chosen.toUpperCase()}${RESET}`;
3936
+ render(); return;
3937
+ }
3938
+ S.settingsMode = "confirm"; render(); return;
3939
+ }
3940
+ return;
3941
+ }
3942
+
3879
3943
  if (S.settingsView === "privacy" || S.settingsView === "telemetry") {
3880
3944
  const backToMenu = () => {
3881
3945
  S.settingsView = "menu"; S.settingsMode = "browse"; S.settingsInput = ""; S.settingsNotice = ""; render();
@@ -4072,8 +4136,9 @@ async function browser(args = {}) {
4072
4136
  settingsRunVerb(["hosting", on ? "off" : "on"]);
4073
4137
  render();
4074
4138
  } else if (S.settingsCursor === 4) {
4075
- const simple = (S.settingsData && S.settingsData.workflow) === "simple";
4076
- settingsRunVerb(["workflow", simple ? "staged" : "simple"]);
4139
+ S.settingsView = "workflow"; S.settingsMode = "browse";
4140
+ S.settingsListCursor = (S.settingsData && S.settingsData.workflow) === "simple" ? 0 : 1;
4141
+ S.settingsNotice = "";
4077
4142
  render();
4078
4143
  } else {
4079
4144
  const domain = S.settingsCursor === 5 ? "repo" : S.settingsCursor === 6 ? "admin" : "people";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-egregore",
3
- "version": "0.21.0-runtime-mvp.6",
3
+ "version": "0.21.0-runtime-mvp.7",
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": {