@join-pantheon/cli 0.37.2 → 0.37.3
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/accounts.js +4 -0
- package/dist/cli.js +26 -2
- package/dist/doctor.js +7 -0
- package/dist/email-templates.js +2 -2
- package/dist/email.js +2 -2
- package/dist/finish-line.js +11 -0
- package/dist/flag-signin.js +6 -2
- package/dist/notice.js +21 -0
- package/dist/notifier.js +38 -1
- package/dist/onboard-copy.js +3 -2
- package/dist/recover-offer.js +16 -5
- package/dist/relay.js +9 -6
- package/dist/setup-guide.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/accounts.js
CHANGED
|
@@ -516,6 +516,10 @@ export class Accounts {
|
|
|
516
516
|
return null;
|
|
517
517
|
return { label: r.label ?? "a device", ip: r.ip ?? "", created_at: r.created_at, email: r.email };
|
|
518
518
|
}
|
|
519
|
+
linkGone(token) {
|
|
520
|
+
const r = this.db.prepare("SELECT voided, expires_at FROM link_confirms WHERE token_hash = ?").get(sha(token));
|
|
521
|
+
return r && r.voided && now() <= r.expires_at ? "closed" : "gone";
|
|
522
|
+
}
|
|
519
523
|
confirmLink(token, typed, ip) {
|
|
520
524
|
const r = this.db.prepare("SELECT * FROM link_confirms WHERE token_hash = ?").get(sha(token));
|
|
521
525
|
if (!r || r.voided || now() > r.expires_at || !this.linkStillLive(r))
|
package/dist/cli.js
CHANGED
|
@@ -48,7 +48,7 @@ import { agentProblem, PROBLEM_LEAD } from "./readiness-alert.js";
|
|
|
48
48
|
import { stripControls } from "./notice.js";
|
|
49
49
|
import { awaitingDecision, pickupEstimate } from "./pickup.js";
|
|
50
50
|
import { loadPolicy, requestReadinessRecheck, unsandboxedAllowed, savePolicy, MODE_LABELS, AUTOPILOT_PLAN_NOTE, effectiveMode, parseMode, describeMode } from "./worker-policy.js";
|
|
51
|
-
import { alreadyMemberLine, askedLine, configureLines, fetchSeats, inUseLine, offerSeats, seatsForTeam, seatsToMove, startGate, RECOVER_WAITING_EXIT } from "./recover-offer.js";
|
|
51
|
+
import { alreadyMemberLine, askedLine, configureLines, fetchSeats, inUseLine, offerSeats, recoverCommand, seatsForTeam, seatsToMove, startGate, RECOVER_WAITING_EXIT } from "./recover-offer.js";
|
|
52
52
|
import { hyphenateSpaces, shellArg, teamNameProblem } from "./team-name.js";
|
|
53
53
|
import { folderRefusalHere, isTemporaryRefusal, projectFolderAnswer } from "./folder-guard.js";
|
|
54
54
|
import { borrowedHome, installService, serviceInstalled, serviceLogFile, serviceState, servicesUnavailable, uninstallService } from "./service.js";
|
|
@@ -2036,6 +2036,20 @@ let workerHeldOnce = null;
|
|
|
2036
2036
|
function workerHeld() {
|
|
2037
2037
|
return (workerHeldOnce ??= workerHeldNow());
|
|
2038
2038
|
}
|
|
2039
|
+
let alertsHeldOnce = null;
|
|
2040
|
+
function alertsHeld() {
|
|
2041
|
+
return (alertsHeldOnce ??= (async () => {
|
|
2042
|
+
try {
|
|
2043
|
+
if (servicesUnavailable(process.platform) || borrowedHome())
|
|
2044
|
+
return null;
|
|
2045
|
+
const { workerRunning } = await import("./finish-line.js");
|
|
2046
|
+
return await workerRunning({ installed: () => serviceInstalled("notifier"), running: () => serviceState("notifier").running });
|
|
2047
|
+
}
|
|
2048
|
+
catch {
|
|
2049
|
+
return null;
|
|
2050
|
+
}
|
|
2051
|
+
})());
|
|
2052
|
+
}
|
|
2039
2053
|
async function workerHeldNow() {
|
|
2040
2054
|
try {
|
|
2041
2055
|
if (servicesUnavailable(process.platform))
|
|
@@ -2153,7 +2167,11 @@ async function finishLine(tools, o) {
|
|
|
2153
2167
|
}
|
|
2154
2168
|
const workerWanted = wakeOn && !argv.includes("--no-worker");
|
|
2155
2169
|
const workerRowFailed = tools.some((t) => t.tool === "worker" && /^(failed|could not)/i.test(t.status));
|
|
2156
|
-
|
|
2170
|
+
const alertsOn = tools.some((t) => t.tool === "notifications" && /^on\b/i.test(t.status));
|
|
2171
|
+
return [...(o.extra ?? []), ...finishItems({ tools, readiness: ready, team: cfg?.space ?? "<team>", workerWanted, served, windows, pending,
|
|
2172
|
+
worker: workerWanted && (served ?? 0) > 0 && !workerRowFailed ? await workerHeld() : null,
|
|
2173
|
+
alerts: alertsOn ? await alertsHeld() : null,
|
|
2174
|
+
agentShell: !process.stdin.isTTY })];
|
|
2157
2175
|
};
|
|
2158
2176
|
let items = await gather();
|
|
2159
2177
|
if (guideAsks(o.preset)) {
|
|
@@ -2706,6 +2724,12 @@ async function main() {
|
|
|
2706
2724
|
console.error("");
|
|
2707
2725
|
for (const l of gate.lines)
|
|
2708
2726
|
console.error(gate.code === 1 ? `\x1b[33m ${l}\x1b[0m` : ` ${l}`);
|
|
2727
|
+
const left = seatsToMove(seats).filter((x) => !res?.moved.includes(x.space) && !res?.asked.includes(x.space));
|
|
2728
|
+
if (JSON_OUT && gate.code === 1 && !named && left.length) {
|
|
2729
|
+
sayJson({ status: "needs_person", code: 1, reason: "pick_team", needs: "team", message: gate.lines.join(" "),
|
|
2730
|
+
teams: left.map((x) => ({ team: x.space, founder: x.founder, next: recoverCommand(x.space) })),
|
|
2731
|
+
new_team: "pantheon start --space <the name they give> --new-team" });
|
|
2732
|
+
}
|
|
2709
2733
|
process.exit(gate.code);
|
|
2710
2734
|
}
|
|
2711
2735
|
if (!named && !argv.includes("--new-team") && argv.includes("--yes") && seatsToMove(seats).some((x) => !res?.moved.includes(x.space) && !res?.asked.includes(x.space))) {
|
package/dist/doctor.js
CHANGED
|
@@ -632,6 +632,10 @@ export async function doctor(projectDir) {
|
|
|
632
632
|
}
|
|
633
633
|
catch (e) {
|
|
634
634
|
const msg = e.message;
|
|
635
|
+
if (sandboxOffline()) {
|
|
636
|
+
add("warn", "relay", "not checked: this shell is Codex's sandbox, which has no network, so nothing here says whether this computer reaches the relay", "coding agent: run pantheon doctor again with network access, asking your person to approve it", "not checked (an offline sandbox)");
|
|
637
|
+
return out;
|
|
638
|
+
}
|
|
635
639
|
const c = await certRow(false);
|
|
636
640
|
const nx = c?.publicCa === false && worthCertificateCheck(e) ? interceptionExplanation(c) : explainNetError(e, health);
|
|
637
641
|
if (nx) {
|
|
@@ -950,4 +954,7 @@ export function shareBlock(checks, now = new Date()) {
|
|
|
950
954
|
`send it to ${FEEDBACK_ADDRESS} with one line on what you expected to happen`,
|
|
951
955
|
].join("\n");
|
|
952
956
|
}
|
|
957
|
+
export function sandboxOffline(env = process.env) {
|
|
958
|
+
return env.CODEX_SANDBOX_NETWORK_DISABLED === "1";
|
|
959
|
+
}
|
|
953
960
|
//# sourceMappingURL=doctor.js.map
|
package/dist/email-templates.js
CHANGED
|
@@ -36,11 +36,11 @@ export function codeEmailHtml(code, purpose, link) {
|
|
|
36
36
|
<span style="font-family:'Space Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:38px;line-height:1.1;letter-spacing:.26em;font-weight:700;color:#f1e7d3">${code}</span>
|
|
37
37
|
</td>
|
|
38
38
|
</tr></table>
|
|
39
|
-
<p style="margin:22px 0 0;font-family:'Space Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:15px;line-height:1.65;color:#26221f">
|
|
39
|
+
<p style="margin:22px 0 0;font-family:'Space Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:15px;line-height:1.65;color:#26221f">Give it to your coding agent, or enter it where the terminal is waiting, to ${action}. Or run:</p>
|
|
40
40
|
</td></tr>
|
|
41
41
|
<tr><td class="px" style="padding:12px 40px 6px"><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td style="background:#1b1917;border-radius:8px;padding:13px 16px;font-family:'Space Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:14px;line-height:1.75;color:#f1e7d3;word-break:break-all"><span style="color:#e36f55">$</span> pantheon verify ${code}</td></tr></table></td></tr>
|
|
42
42
|
${link ? ` <tr><td class="px" style="padding:18px 40px 6px">
|
|
43
|
-
<p style="margin:0 0 12px;font-family:'Space Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:15px;line-height:1.65;color:#26221f">Or confirm in your browser. You will type the two words your
|
|
43
|
+
<p style="margin:0 0 12px;font-family:'Space Mono',Menlo,Consolas,'Liberation Mono',monospace;font-size:15px;line-height:1.65;color:#26221f">Or confirm in your browser. You will type the two words in capitals that your coding agent (or terminal) showed you when it sent this email.</p>
|
|
44
44
|
<a href="${esc(link)}" style="display:inline-block;background:#e36f55;color:#1b1917;border-radius:8px;padding:12px 20px;font-family:'Space Mono',Menlo,Consolas,monospace;font-size:15px;font-weight:700;text-decoration:none">Confirm it's you</a>
|
|
45
45
|
</td></tr>` : ""}
|
|
46
46
|
<tr><td class="px" style="padding:22px 40px 32px">
|
package/dist/email.js
CHANGED
|
@@ -8,10 +8,10 @@ function subjectAndBody(code, purpose, link) {
|
|
|
8
8
|
``,
|
|
9
9
|
`Your verification code is ${code}.`,
|
|
10
10
|
``,
|
|
11
|
-
`
|
|
11
|
+
`Give it to your coding agent, or enter it where the terminal is waiting, to ${action}. Or run:`,
|
|
12
12
|
` pantheon verify ${code}`,
|
|
13
13
|
``,
|
|
14
|
-
...(link ? [`Or confirm in your browser
|
|
14
|
+
...(link ? [`Or confirm in your browser. You will type the two words in capitals that your coding agent (or terminal) showed you when it sent this email:`, ` ${link}`, ``] : []),
|
|
15
15
|
`The code expires in 10 minutes and works once. If you did not ask for it,`,
|
|
16
16
|
`ignore this email: nothing happens without the code.`,
|
|
17
17
|
``,
|
package/dist/finish-line.js
CHANGED
|
@@ -40,6 +40,12 @@ export function finishItems(f) {
|
|
|
40
40
|
? { says: "Your worker is installed but not running, so teammates' requests wait for you while you're away.", fix: "pantheon service restart worker" }
|
|
41
41
|
: { says: "Your worker isn't installed, so teammates' requests wait for you while you're away.", fix: "pantheon service install worker" });
|
|
42
42
|
}
|
|
43
|
+
const alertsSaid = out.some((i) => /^The desktop alerts are installed but not running|^notifications was not set up/.test(i.says));
|
|
44
|
+
if (f.alerts && !(f.alerts.installed && f.alerts.loaded) && !alertsSaid) {
|
|
45
|
+
out.push(f.alerts.installed
|
|
46
|
+
? { says: "Desktop alerts are installed but not running, so you won't hear when a teammate needs you.", fix: "pantheon service restart notifier" }
|
|
47
|
+
: { says: "Desktop alerts aren't installed, so you won't hear when a teammate needs you.", fix: "pantheon service install notifier" });
|
|
48
|
+
}
|
|
43
49
|
if (f.workerWanted && f.served === 0) {
|
|
44
50
|
out.push({ says: `Nothing on this machine is bound to "${f.team}", so your worker has nothing to work in while you're away.`, fix: `from the folder you work in (a repo, or a folder of docs): pantheon use ${f.team} --here` });
|
|
45
51
|
}
|
|
@@ -55,6 +61,11 @@ export function finishItems(f) {
|
|
|
55
61
|
if (hook && /codex: run \/hooks/i.test(hook.status) && !rowFailed(hook.status) && !/^skipped/i.test(hook.status)) {
|
|
56
62
|
out.push({ says: "Codex skips Pantheon's wake-up hook until you approve it.", fix: "in Codex, run /hooks once and approve it" });
|
|
57
63
|
}
|
|
64
|
+
if (f.agentShell) {
|
|
65
|
+
for (const i of out)
|
|
66
|
+
if (/^pantheon service (restart|install) /.test(i.fix))
|
|
67
|
+
i.fix = `${i.fix} (coding agent: ask your person to approve running this outside your sandbox — a sandbox can't start background services)`;
|
|
68
|
+
}
|
|
58
69
|
if (f.pending > 0) {
|
|
59
70
|
out.push({ says: `${f.pending === 1 ? "A change" : `${f.pending} changes`} to your setup ${f.pending === 1 ? "waits" : "wait"} for you to confirm.`, fix: "pantheon changes" });
|
|
60
71
|
}
|
package/dist/flag-signin.js
CHANGED
|
@@ -194,15 +194,19 @@ function codeSent(cmd, deps, s) {
|
|
|
194
194
|
? `A code was sent to ${s.email} ${s.reused} min ago — use that one. ${SPAM}`
|
|
195
195
|
: `Sent a 6-digit code to ${s.email}. ${SPAM}${s.dev ? " (A dev relay: the code is in its log.)" : ""}`;
|
|
196
196
|
const who = s.account === "new" ? `This makes a new account, ${s.username}.` : `This signs this computer in to your account.`;
|
|
197
|
+
const tell = s.words
|
|
198
|
+
? `Check your email (and spam) for a message from Pantheon. Either tell me the 6-digit code in it, or open its link and type these two words there: ${s.words.toUpperCase()}`
|
|
199
|
+
: `Check your email (and spam) for a message from Pantheon, and tell me the 6-digit code in it.`;
|
|
197
200
|
return {
|
|
198
201
|
kind: "needs_person", needs: "code",
|
|
199
|
-
lines: [head, who, `When the person has the code, run: ${nxt}`,
|
|
200
|
-
...(s.words ? [`
|
|
202
|
+
lines: [head, who, `Say this to the person, word for word: "${tell}"`, `When the person has the code, run: ${nxt}`,
|
|
203
|
+
...(s.words ? [`If they typed the words in the link instead, run: ${cont}`] : []),
|
|
201
204
|
`Wrong address? Run the first command again with the right --email.`],
|
|
202
205
|
json: {
|
|
203
206
|
needs: "code", sent_to: s.email, account: s.account,
|
|
204
207
|
...(s.username ? { username: s.username } : {}),
|
|
205
208
|
...(s.reused ? { reused: true } : {}),
|
|
209
|
+
tell_person: tell,
|
|
206
210
|
next: nxt,
|
|
207
211
|
...(s.words ? { link: true, words: s.words, next_link: cont } : {}),
|
|
208
212
|
},
|
package/dist/notice.js
CHANGED
|
@@ -228,4 +228,25 @@ export function composeJoined(names, team) {
|
|
|
228
228
|
tag: `joined_${team.replace(/[^A-Za-z0-9_]/g, "_")}`.slice(0, 60),
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
|
+
function requestWords(line) {
|
|
232
|
+
return plain(line).replace(/^[a-z0-9._-]+\s+(?:proposed|objected|delivered)\s*:\s*/i, "").replace(/\s*—\s*ACCEPT or OBJECT$/, "").replace(/[.!?…:;,\s]+$/, "");
|
|
233
|
+
}
|
|
234
|
+
export function composeWaiting(items, team, ctx) {
|
|
235
|
+
const one = items.length === 1;
|
|
236
|
+
const who = [...new Set(items.map((i) => i.from))];
|
|
237
|
+
const prompt = "Teammates are waiting on me in Pantheon. Call pantheon_status, then handle what is waiting on me.";
|
|
238
|
+
return {
|
|
239
|
+
kind: "delivery",
|
|
240
|
+
who: team,
|
|
241
|
+
heading: fit(one ? `${items[0].from} is waiting on you` : `${items.length} requests are waiting on you`, BUDGET.heading),
|
|
242
|
+
context: "",
|
|
243
|
+
body: fit(one
|
|
244
|
+
? `${requestWords(items[0].what) || "A request"}. Your agent hasn't picked it up: open it to answer.`
|
|
245
|
+
: `From ${who.length === 1 ? who[0] : `${who.slice(0, -1).join(", ")} and ${who[who.length - 1]}`}. Your agent hasn't picked them up: open it to answer.`, BUDGET.body),
|
|
246
|
+
ttl: 30,
|
|
247
|
+
sound: false,
|
|
248
|
+
primary: primaryFor(ctx.tools, ctx.preferred, prompt),
|
|
249
|
+
tag: `waiting_${team.replace(/[^A-Za-z0-9_]/g, "_")}`.slice(0, 60),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
231
252
|
//# sourceMappingURL=notice.js.map
|
package/dist/notifier.js
CHANGED
|
@@ -9,8 +9,9 @@ import { dirname, join, resolve } from "node:path";
|
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
import { PantheonClient } from "./client.js";
|
|
11
11
|
import { CONFIG_DIR } from "./config.js";
|
|
12
|
+
import { awaitingDecision } from "./pickup.js";
|
|
12
13
|
import { loadProfile } from "./profile.js";
|
|
13
|
-
import { APP_TOOLS, CLAUDE_APP_CHOSEN, composeDecision, composeDelivery, composeJoined, composePassedOver, composeWakeAsk, neverAlerts, passedOverNotice, TOOL_LABELS } from "./notice.js";
|
|
14
|
+
import { APP_TOOLS, CLAUDE_APP_CHOSEN, composeDecision, composeDelivery, composeJoined, composePassedOver, composeWaiting, composeWakeAsk, neverAlerts, passedOverNotice, TOOL_LABELS } from "./notice.js";
|
|
14
15
|
import { loadPolicy } from "./worker-policy.js";
|
|
15
16
|
import { withoutAgentMarkers } from "./setup-changes.js";
|
|
16
17
|
import { wakeAlerted } from "./continued.js";
|
|
@@ -32,6 +33,22 @@ export function reminderGap(n, reminderMs) {
|
|
|
32
33
|
export function wakeAskWhat(body) {
|
|
33
34
|
return /answer while you are away:\s*(.+)$/m.exec(body)?.[1]?.trim() ?? body.split("\n")[0] ?? "";
|
|
34
35
|
}
|
|
36
|
+
export const WAITING_AFTER_MS = 5 * 60_000;
|
|
37
|
+
export const WAITING_EVERY_MS = 30 * 60_000;
|
|
38
|
+
export const WAITING_MAX_AGE_MS = 24 * 3_600_000;
|
|
39
|
+
export function requestFrom(body) {
|
|
40
|
+
return /^([a-z0-9._-]+)\s+(?:asked|proposed|objected|delivered|escalated)\s*:/i.exec(body)?.[1]
|
|
41
|
+
?? /^(?:ASK|PROPOSE|DELIVERED|CONTRACT|COMMIT|OBJECT)\s+from\s+([a-z0-9._-]+)/i.exec(body)?.[1];
|
|
42
|
+
}
|
|
43
|
+
let machineWaitingAt = 0;
|
|
44
|
+
export function resetWaitingClock() { machineWaitingAt = 0; }
|
|
45
|
+
export function waitingRequests(obligations, member, state, now, fromOf) {
|
|
46
|
+
return obligations.filter((o) => o.owner === member && o.kind !== "HUMAN" && o.kind !== "CONTINUE" && !o.claimed_by
|
|
47
|
+
&& now - o.created_at >= WAITING_AFTER_MS && now - o.created_at < WAITING_MAX_AGE_MS
|
|
48
|
+
&& state.notified_at[`act:wait:${o.ref}`] === undefined
|
|
49
|
+
&& !awaitingDecision(obligations, o)
|
|
50
|
+
&& (() => { const f = fromOf(o); return !!f && f !== member; })());
|
|
51
|
+
}
|
|
35
52
|
export function humanObligations(obligations, member) {
|
|
36
53
|
return obligations.filter((o) => o.kind === "HUMAN" && o.owner === `human:${member}`);
|
|
37
54
|
}
|
|
@@ -355,6 +372,26 @@ export class HumanNotifier {
|
|
|
355
372
|
this.opts.log(`! could not show a desktop notification for ${obligation.id}`);
|
|
356
373
|
}
|
|
357
374
|
}
|
|
375
|
+
if (prefs.decisions) {
|
|
376
|
+
const fromOf = (o) => client.seenAct(o.ref)?.from ?? requestFrom(o.body);
|
|
377
|
+
const relayNow = now() + (client.relayNow() - Date.now());
|
|
378
|
+
const me = client.roster.find((m) => m.id === this.cfg.member);
|
|
379
|
+
const workerBusy = me?.worker?.state === "running" && me.sessions.some((x) => x.role === "worker");
|
|
380
|
+
const waiting = workerBusy ? [] : waitingRequests(client.obligations, this.cfg.member, state, relayNow, fromOf);
|
|
381
|
+
const last = Math.max(state.notified_at["act:wait:last"] ?? 0, machineWaitingAt);
|
|
382
|
+
if (waiting.length && (last === 0 || now() - last >= WAITING_EVERY_MS)) {
|
|
383
|
+
const items = waiting.map((o) => ({ from: fromOf(o), what: client.seenAct(o.ref)?.summary ?? o.body }));
|
|
384
|
+
const ok = await send(withLabel(composeWaiting(items, this.cfg.space, { tools, preferred: preferredTool(profile, tools), now: now() })));
|
|
385
|
+
if (ok) {
|
|
386
|
+
for (const o of waiting)
|
|
387
|
+
state.notified_at[`act:wait:${o.ref}`] = now();
|
|
388
|
+
state.notified_at["act:wait:last"] = now();
|
|
389
|
+
machineWaitingAt = now();
|
|
390
|
+
dirty = true;
|
|
391
|
+
this.opts.log(`> waiting alert: ${waiting.length} request${waiting.length === 1 ? "" : "s"} nothing here picked up`);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
358
395
|
if (dirty || !existsSync(stateFile))
|
|
359
396
|
writeState(stateFile, state);
|
|
360
397
|
const arrived = await client.next(pollMs);
|
package/dist/onboard-copy.js
CHANGED
|
@@ -61,8 +61,9 @@ export function agentRequest(invite, o) {
|
|
|
61
61
|
`First ask me for my email and for the username my teammates will see (it can't be changed later).${invite ? " Don't open the invite link: it holds a one-time secret, and the installer takes it as it is." : ""}`,
|
|
62
62
|
`On a Mac or Linux: download the installer and read it before running it — curl -fsSL ${base}/install.sh -o pantheon-install.sh — then run: sh pantheon-install.sh ${verb} ${flags}`,
|
|
63
63
|
`On Windows: curl.exe -fsSL ${base}/install.ps1 -o pantheon-install.ps1, read it, then run: powershell -NoProfile -Command "Set-Item Env:PANTHEON_ARGS '${psVerb} ${flags}'; Get-Content -Raw pantheon-install.ps1 | iex"`,
|
|
64
|
-
`It emails me a 6-digit code (it may land in spam).
|
|
65
|
-
|
|
64
|
+
`It emails me a 6-digit code and a link (it may land in spam), and prints two words in capitals. When you ask me for the code, show me those two words too: I can give you the code, or open the email's link and type the words there. Then, for the way I used, run the exact command it prints next (it names Pantheon by its full path, since this shell may not find \`pantheon\` yet), with the code in place of <the 6-digit code>.`,
|
|
65
|
+
...(invite ? [] : [`If it says I'm already in some teams, show me their names and ask which this computer should join, then run the line it gives for each one I pick. Don't ask me to name a new team unless I say I want one.`]),
|
|
66
|
+
`The download, the sign-in and the setup need network access, and the setup starts Pantheon's background helpers, which a sandbox blocks. If your shell runs in a sandbox (Codex's does), ask me to approve running each of them outside it. In Codex, ask me to approve running them with network access. If the request is turned down without asking me, or this shell still can't go online, don't look for a way around it: tell me to choose "Ask for approval" in Codex's permissions menu (under the message box), then try again when I say so.`,
|
|
66
67
|
"What it changes, to tell me before running it:",
|
|
67
68
|
...INSTALL_CHANGES.slice(0, 3).map((c) => `- ${c}`),
|
|
68
69
|
].join("\n");
|
package/dist/recover-offer.js
CHANGED
|
@@ -63,12 +63,14 @@ export async function offerSeats(seats, deps) {
|
|
|
63
63
|
deps.log(` ${strayLine(s)}`);
|
|
64
64
|
if (!offered.length)
|
|
65
65
|
return out;
|
|
66
|
-
for (const s of offered)
|
|
67
|
-
deps.log(` ${seatLine(s)}`);
|
|
68
66
|
if (!deps.tty) {
|
|
69
|
-
deps.log(`
|
|
67
|
+
deps.log(` ${teamsQuestion(offered)}`);
|
|
68
|
+
for (const s of offered)
|
|
69
|
+
deps.log(` ${seatLine(s)}`);
|
|
70
70
|
return out;
|
|
71
71
|
}
|
|
72
|
+
for (const s of offered)
|
|
73
|
+
deps.log(` ${seatLine(s)}`);
|
|
72
74
|
for (const s of offered) {
|
|
73
75
|
const a = ((await deps.ask(` Move your seat in ${s.space} to this machine now? [Y/n] `)) ?? "n").trim().toLowerCase();
|
|
74
76
|
if (a === "" || a === "y" || a === "yes") {
|
|
@@ -87,6 +89,15 @@ export async function offerSeats(seats, deps) {
|
|
|
87
89
|
}
|
|
88
90
|
return out;
|
|
89
91
|
}
|
|
92
|
+
export function listTeams(seats) {
|
|
93
|
+
const n = seats.map((s) => s.space);
|
|
94
|
+
return n.length <= 1 ? (n[0] ?? "") : `${n.slice(0, -1).join(", ")} and ${n[n.length - 1]}`;
|
|
95
|
+
}
|
|
96
|
+
export function teamsQuestion(seats) {
|
|
97
|
+
return seats.length === 1
|
|
98
|
+
? `Ask the person: "You're already in ${seats[0].space}. Bring it to this computer?" (It moves from your other computer.) On a yes, run:`
|
|
99
|
+
: `Ask the person which of these teams this computer should join (each one moves from your other computer); it can be several. Then run the line for each:`;
|
|
100
|
+
}
|
|
90
101
|
export async function startGate(o) {
|
|
91
102
|
const asked = o.asked ?? [];
|
|
92
103
|
const waiting = seatsToMove(o.seats).filter((s) => !o.moved.includes(s.space) && !asked.includes(s.space));
|
|
@@ -112,9 +123,9 @@ export async function startGate(o) {
|
|
|
112
123
|
const how = waiting.map((s) => ` ${recoverCommand(s.space)}`);
|
|
113
124
|
if (!o.tty) {
|
|
114
125
|
return { go: false, code: 1, lines: [
|
|
115
|
-
`not creating a new team:
|
|
126
|
+
`not creating a new team: you're already in ${listTeams(waiting)}. ${teamsQuestion(waiting)}`,
|
|
116
127
|
...how,
|
|
117
|
-
`
|
|
128
|
+
` Only if the person says they want a separate, new team as well: pantheon start --space <the name they give> --new-team (never make a name up, and don't ask for one unless they want a new team)`,
|
|
118
129
|
] };
|
|
119
130
|
}
|
|
120
131
|
const a = ((await o.ask(` Create a new team anyway, instead of moving ${waiting.length === 1 ? "that seat" : "those seats"}? [y/N] `)) ?? "").trim().toLowerCase();
|
package/dist/relay.js
CHANGED
|
@@ -438,6 +438,8 @@ const LOOP_WINDOW_MS = 60_000;
|
|
|
438
438
|
function loopMs(ns) {
|
|
439
439
|
return Math.max(0, Math.round((ns / 1e6 - LOOP_RESOLUTION_MS) * 100) / 100);
|
|
440
440
|
}
|
|
441
|
+
const LINK_CLOSED = "Different words were typed here, so this link is closed. That's all: the 6-digit code in the same email still works. Give it to your coding agent.";
|
|
442
|
+
const LINK_GONE = "This link has expired (they last 10 minutes), a newer Pantheon email replaced it, or it was already used. Use the code in the newest Pantheon email, or ask your coding agent to send a new one.";
|
|
441
443
|
const STORAGE_HELD = "the relay received this but has not saved it yet — its disk is refusing writes. It is kept, and reaches the team when the disk recovers; do not send it again.";
|
|
442
444
|
export function backupExcludes(dir, keep) {
|
|
443
445
|
const always = ["--exclude=*.tmp"];
|
|
@@ -1361,11 +1363,11 @@ export class Relay {
|
|
|
1361
1363
|
}
|
|
1362
1364
|
const why = r.reason;
|
|
1363
1365
|
if (why === "empty")
|
|
1364
|
-
return this.confirmPage(res, t, { said: "Type the two words your
|
|
1365
|
-
return this.confirmPage(res, "", { said: why === "wrong_words" ?
|
|
1366
|
+
return this.confirmPage(res, t, { said: "Type the two words in capitals that your coding agent (or terminal) showed you. Don't have them? Give your coding agent the 6-digit code from the email instead." });
|
|
1367
|
+
return this.confirmPage(res, "", { said: why === "wrong_words" ? LINK_CLOSED
|
|
1366
1368
|
: why === "links_locked" ? "Too many wrong words for this address in the last hour, so links are off for now. Use the 6-digit code from the email."
|
|
1367
1369
|
: why === "device_other_account" ? DEVICE_OTHER_ACCOUNT
|
|
1368
|
-
:
|
|
1370
|
+
: LINK_GONE });
|
|
1369
1371
|
});
|
|
1370
1372
|
}
|
|
1371
1373
|
if (url.pathname === "/auth/status" && req.method === "GET") {
|
|
@@ -1655,10 +1657,11 @@ export class Relay {
|
|
|
1655
1657
|
<p>Only go on if you started this yourself, just now, on your own computer or through your own coding agent.</p>
|
|
1656
1658
|
${o.said ? `<p class="said">${esc(o.said)}</p>` : ""}
|
|
1657
1659
|
<form method="post" action="/auth/confirm"><input type="hidden" name="t" value="${esc(token)}">
|
|
1658
|
-
<label for="w">The two words
|
|
1660
|
+
<label for="w">The two words in capitals your coding agent (or terminal) showed you</label>
|
|
1659
1661
|
<input id="w" name="words" autocomplete="off" autocapitalize="off" spellcheck="false" placeholder="two words">
|
|
1660
|
-
<button type="submit">Confirm</button></form
|
|
1661
|
-
|
|
1662
|
+
<button type="submit">Confirm</button></form>
|
|
1663
|
+
<p>Don't have the two words? Close this page and give your coding agent the 6-digit code from the same email. It works just as well.</p>`
|
|
1664
|
+
: `<h1>This link does not work.</h1><p>${esc(o.said ?? (token && A.linkGone(token) === "closed" ? LINK_CLOSED : LINK_GONE))}</p>`;
|
|
1662
1665
|
const html = `<!doctype html><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=no-referrer><title>Pantheon sign-in</title>
|
|
1663
1666
|
<style>body{font:16px/1.6 "Space Mono",Menlo,Consolas,monospace;background:#ece0c8;color:#1b1917;max-width:34rem;margin:10vh auto;padding:0 16px}h1{font:400 28px/1.15 "Archivo Black","Arial Black",Arial,sans-serif}label{display:block;margin:18px 0 6px}input{font:inherit;width:100%;box-sizing:border-box;padding:10px;border:2px solid #1b1917;border-radius:8px;background:#f1e7d3}button{margin-top:12px;font:inherit;font-weight:700;background:#e36f55;color:#1b1917;border:0;border-radius:8px;padding:10px 18px}.said{background:#f1e7d3;border-left:4px solid #b8492f;padding:8px 12px}</style>
|
|
1664
1667
|
${body}`;
|
package/dist/setup-guide.js
CHANGED
|
@@ -33,7 +33,7 @@ export const MODE_OPTIONS = [
|
|
|
33
33
|
{ id: "here", label: `${MODE_LABELS.here} — requests wait while I'm at my computer, and my agent takes them when I'm away.` },
|
|
34
34
|
];
|
|
35
35
|
export const ALERT_OPTIONS = [
|
|
36
|
-
{ id: "decisions", label: "
|
|
36
|
+
{ id: "decisions", label: "Decisions that need me, and a teammate's request nothing here has picked up (recommended) — never for ordinary agent traffic." },
|
|
37
37
|
{ id: "deliveries", label: "Decisions, and when a teammate delivers work to me." },
|
|
38
38
|
{ id: "worker", label: "Decisions, deliveries, and when my own worker finishes a run." },
|
|
39
39
|
{ id: "none", label: "None — I will look at pantheon status (and the menu bar, on a Mac)." },
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@join-pantheon/cli",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@join-pantheon/cli",
|
|
9
|
-
"version": "0.37.
|
|
9
|
+
"version": "0.37.3",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@join-pantheon/cli",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"description": "Let your coding agent collaborate directly with your teammates' agents — ask, agree an interface, and deliver, without a human relaying messages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|