create-egregore 0.18.2 → 0.18.4
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.5.
|
|
2
|
+
// egregore-launcher-version: 0.5.18
|
|
3
3
|
//
|
|
4
4
|
// egregore — launch and browse Egregore instances from your terminal.
|
|
5
5
|
// Installed by create-egregore. Reads ~/.egregore/instances.json.
|
|
@@ -30,7 +30,7 @@ const https = require("node:https");
|
|
|
30
30
|
const { spawnSync, spawn } = require("node:child_process");
|
|
31
31
|
const readline = require("node:readline");
|
|
32
32
|
|
|
33
|
-
const VERSION = "0.5.
|
|
33
|
+
const VERSION = "0.5.18";
|
|
34
34
|
const REGISTRY = path.join(os.homedir(), ".egregore", "instances.json");
|
|
35
35
|
const DEFAULT_FILE = path.join(os.homedir(), ".egregore", "default");
|
|
36
36
|
const PUBLIC_NPX_PACKAGE = "create-egregore";
|
|
@@ -348,6 +348,10 @@ function runtimePickerLines(inst, runtimes, stored, cursor) {
|
|
|
348
348
|
const desc = runtimeChoiceDescription(runtime, inst, stored);
|
|
349
349
|
lines.push(` ${marker} ${BOLD}${label}${RESET} ${DIM}${desc}${RESET}`);
|
|
350
350
|
}
|
|
351
|
+
// Coming-soon harnesses — shown for visibility, not selectable yet.
|
|
352
|
+
for (const soon of ["Hermes", "Pi"]) {
|
|
353
|
+
lines.push(` ${DIM}· ${pad(soon, labelWidth)} coming soon${RESET}`);
|
|
354
|
+
}
|
|
351
355
|
lines.push("");
|
|
352
356
|
return lines;
|
|
353
357
|
}
|
|
@@ -1287,6 +1291,8 @@ function renderHeroPanel({ selected, pv, width, height, countSuffix, filter, fil
|
|
|
1287
1291
|
`${BOLD}Assistants${RESET}`,
|
|
1288
1292
|
`${DIM}claude-code${RESET}: ${commandExists("claude") ? "installed" : "not installed"}`,
|
|
1289
1293
|
`${DIM}codex${RESET}: ${commandExists("codex") ? "installed" : "not installed"}`,
|
|
1294
|
+
`${DIM}hermes${RESET}: ${DIM}coming soon${RESET}`,
|
|
1295
|
+
`${DIM}pi${RESET}: ${DIM}coming soon${RESET}`,
|
|
1290
1296
|
];
|
|
1291
1297
|
const rows = Math.max(EGREGORE_SIGIL.length + 2, right.length);
|
|
1292
1298
|
for (let i = 0; i < rows; i++) {
|
|
@@ -1298,7 +1304,7 @@ function renderHeroPanel({ selected, pv, width, height, countSuffix, filter, fil
|
|
|
1298
1304
|
lines.push(boxLine(`${BOLD}Available Skills${RESET}`, innerWidth, margin));
|
|
1299
1305
|
for (const group of skillGroups) lines.push(boxLine(group, innerWidth, margin));
|
|
1300
1306
|
lines.push(emptyBoxLine(innerWidth, margin));
|
|
1301
|
-
lines.push(boxLine(`${BOLD}Assistants${RESET} ${DIM}claude-code${RESET} ${commandExists("claude") ? "installed" : "missing"} · ${DIM}codex${RESET} ${commandExists("codex") ? "installed" : "missing"}`, innerWidth, margin));
|
|
1307
|
+
lines.push(boxLine(`${BOLD}Assistants${RESET} ${DIM}claude-code${RESET} ${commandExists("claude") ? "installed" : "missing"} · ${DIM}codex${RESET} ${commandExists("codex") ? "installed" : "missing"} · ${DIM}hermes/pi coming soon${RESET}`, innerWidth, margin));
|
|
1302
1308
|
}
|
|
1303
1309
|
|
|
1304
1310
|
lines.push(emptyBoxLine(innerWidth, margin));
|
|
@@ -1332,6 +1338,10 @@ function renderRuntimePanel({ inst, cursor, width, height }) {
|
|
|
1332
1338
|
const desc = runtimeChoiceDescription(runtime, inst, stored);
|
|
1333
1339
|
lines.push(boxLine(`${marker} ${pad(labelText, 16)} ${DIM}${desc}${RESET}`, innerWidth, margin));
|
|
1334
1340
|
}
|
|
1341
|
+
// Coming-soon harnesses — shown for visibility, not selectable yet.
|
|
1342
|
+
for (const soon of ["Hermes", "Pi"]) {
|
|
1343
|
+
lines.push(boxLine(`${DIM}· ${pad(soon, 16)} coming soon${RESET}`, innerWidth, margin));
|
|
1344
|
+
}
|
|
1335
1345
|
|
|
1336
1346
|
lines.push(emptyBoxLine(innerWidth, margin));
|
|
1337
1347
|
lines.push(boxLine(`${DIM}↑↓ navigate · enter select · 1-${runtimes.length} quick select · esc back · q quit${RESET}`, innerWidth, margin));
|
package/package.json
CHANGED
|
@@ -198,16 +198,24 @@ function main() {
|
|
|
198
198
|
const branch = currentBranch(projectDir);
|
|
199
199
|
if (!isProtectedBranch(branch)) return;
|
|
200
200
|
|
|
201
|
+
// Consent bypass: the user explicitly chose to work on this protected branch.
|
|
202
|
+
// Written only after they pick "Proceed on <branch>"; cleared on session start,
|
|
203
|
+
// so consent is asked once per session, not per write.
|
|
204
|
+
try {
|
|
205
|
+
const consent = fs.readFileSync(path.join(projectDir, ".egregore-branch-consent"), "utf-8").trim();
|
|
206
|
+
if (consent === branch) return;
|
|
207
|
+
} catch {}
|
|
208
|
+
|
|
201
209
|
const toolName = input.tool_name || "";
|
|
202
210
|
const toolInput = input.tool_input || {};
|
|
203
211
|
const memoryDir = realish(path.join(projectDir, "memory"));
|
|
204
212
|
const author = currentAuthor(projectDir);
|
|
205
213
|
const reason = [
|
|
206
|
-
`Protected branch (${branch}).`,
|
|
207
|
-
"
|
|
208
|
-
` bin/agent.sh branch --topic "<work topic>"`,
|
|
209
|
-
|
|
210
|
-
|
|
214
|
+
`Protected branch (${branch}). Ask the user how to proceed — do NOT auto-branch silently.`,
|
|
215
|
+
"Offer a choice (numbered or structured): Branch off (default) / Proceed on this branch / Cancel.",
|
|
216
|
+
` • Branch off: bin/agent.sh branch --topic "<work topic>" (prefix dev/${author}/...)`,
|
|
217
|
+
` • Proceed on ${branch}: echo '${branch}' > .egregore-branch-consent then retry`,
|
|
218
|
+
"Proceeding records consent for this branch for the rest of the session (cleared on next session start).",
|
|
211
219
|
].join("\n");
|
|
212
220
|
|
|
213
221
|
if (toolName === "apply_patch") {
|
|
@@ -154,6 +154,26 @@ wait $API_PID $GIT_PID $LOCAL_PID 2>/dev/null || true
|
|
|
154
154
|
# --- Read results ---
|
|
155
155
|
PRS=$(cat "$TMPDIR/prs.json" 2>/dev/null || echo "[]")
|
|
156
156
|
echo "$PRS" | jq . >/dev/null 2>&1 || PRS="[]"
|
|
157
|
+
|
|
158
|
+
# Resolve PR author GitHub logins -> egregore display names. `gh pr list` returns
|
|
159
|
+
# the raw github login (e.g. "fcdagdelen"); without this it leaks into activity
|
|
160
|
+
# instead of the person's display name ("cem"). Map via the graph when connected;
|
|
161
|
+
# fall back to the github profile name, then the login. Author becomes a string.
|
|
162
|
+
if [ -n "$PRS" ] && [ "$PRS" != "[]" ]; then
|
|
163
|
+
AUTHOR_MAP='{}'
|
|
164
|
+
if [ -n "$API_URL" ] && [ -n "$API_KEY" ]; then
|
|
165
|
+
MAP_RAW=$(bash "$SCRIPT_DIR/bin/graph.sh" query \
|
|
166
|
+
"MATCH (p:Person) WHERE p.github IS NOT NULL RETURN p.github AS gh, p.name AS name" 2>/dev/null)
|
|
167
|
+
AUTHOR_MAP=$(printf '%s' "$MAP_RAW" | jq -c \
|
|
168
|
+
'reduce (.values[]?) as $v ({}; .[($v[0]|ascii_downcase)] = $v[1])' 2>/dev/null || echo '{}')
|
|
169
|
+
fi
|
|
170
|
+
PRS=$(printf '%s' "$PRS" | jq -c --argjson map "$AUTHOR_MAP" '
|
|
171
|
+
map(
|
|
172
|
+
(if (.author|type)=="object" then .author else {login: (.author|tostring), name: null} end) as $a
|
|
173
|
+
| .author = ([$map[(($a.login // "") | ascii_downcase)], $a.name, $a.login]
|
|
174
|
+
| map(select(. != null and . != "")) | first // "unknown")
|
|
175
|
+
)' 2>/dev/null || printf '%s' "$PRS")
|
|
176
|
+
fi
|
|
157
177
|
DISK_HANDOFFS=$(cat "$TMPDIR/disk_handoffs.txt" 2>/dev/null || echo "")
|
|
158
178
|
DISK_DECISIONS=$(cat "$TMPDIR/disk_decisions.txt" 2>/dev/null || echo "")
|
|
159
179
|
LOCAL_SESSIONS=$(cat "$TMPDIR/local_sessions.json" 2>/dev/null || echo '{"my_sessions":[],"team_sessions":[]}')
|
|
@@ -18,6 +18,10 @@ if [ -f "$SCRIPT_DIR/.git" ]; then
|
|
|
18
18
|
MAIN_PROJECT_DIR=$(cd "$WT_GITDIR/../../.." 2>/dev/null && pwd)
|
|
19
19
|
fi
|
|
20
20
|
|
|
21
|
+
# Clear any branch-guard consent from a previous session — consent to write on
|
|
22
|
+
# a protected branch is asked fresh each session (see AGENTS.md branch-guard protocol).
|
|
23
|
+
rm -f "$SCRIPT_DIR/.egregore-branch-consent" "$MAIN_PROJECT_DIR/.egregore-branch-consent" 2>/dev/null
|
|
24
|
+
|
|
21
25
|
if [ -f "$SCRIPT_DIR/bin/lib/worktree-links.sh" ]; then
|
|
22
26
|
source "$SCRIPT_DIR/bin/lib/worktree-links.sh" >/dev/null 2>/dev/null || true
|
|
23
27
|
egregore_link_shared_state "$SCRIPT_DIR" "$MAIN_PROJECT_DIR" >/dev/null 2>/dev/null || true
|