@join-pantheon/cli 0.37.3 → 0.38.0
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/admin-founder.js +5 -2
- package/dist/admin-pages.js +29 -2
- package/dist/cli.js +285 -38
- package/dist/crash-loop.js +207 -0
- package/dist/doctor.js +38 -1
- package/dist/finish-line.js +14 -7
- package/dist/folder-ask.js +104 -0
- package/dist/founder-stats.js +24 -1
- package/dist/home-guard.js +21 -0
- package/dist/home-safety.js +2 -0
- package/dist/install-stats.js +314 -0
- package/dist/machine.js +2 -0
- package/dist/mcp.js +37 -1
- package/dist/notice.js +106 -0
- package/dist/notifier.js +206 -16
- package/dist/onboard-copy.js +3 -0
- package/dist/pickup.js +11 -3
- package/dist/quickstart.js +41 -21
- package/dist/relay.js +56 -6
- package/dist/service.js +5 -0
- package/dist/setup-changes.js +5 -0
- package/dist/setup-guide.js +25 -4
- package/dist/status-engine.js +1 -1
- package/dist/tray.js +9 -2
- package/dist/version-health.js +288 -0
- package/dist/win-host.js +2 -0
- package/dist/worker-policy.js +45 -3
- package/dist/worker.js +61 -24
- package/npm-shrinkwrap.json +13 -2
- package/package.json +2 -1
package/dist/admin-founder.js
CHANGED
|
@@ -8,6 +8,7 @@ export const FOUNDER_DEFS = {
|
|
|
8
8
|
handoffs: "Requests one agent sent to another in the week.",
|
|
9
9
|
answered: "Of this week's hand-offs, the share already answered or delivered by someone they were asked of.",
|
|
10
10
|
answerTime: "Half of this week's answered hand-offs were answered faster than this.",
|
|
11
|
+
pickedUp: "Of this week's hand-offs, the share that someone it was asked of claimed or replied to within 5 minutes. A request that sits unseen is the first thing people notice. Never picked up means over an hour old with nothing from anyone it was asked of.",
|
|
11
12
|
byWorker: "Of this week's answered hand-offs, the share a person's worker answered unattended. A person answered the rest in their own session.",
|
|
12
13
|
decisions: "Escalations and decision requests raised this week that only a person can settle; how many are settled, and the median wait of those.",
|
|
13
14
|
delivered: "Work handed back as delivered this week. The relay accepts a delivery only with a branch and a commit.",
|
|
@@ -85,11 +86,13 @@ export function founderSections(f, h, now) {
|
|
|
85
86
|
</section>`;
|
|
86
87
|
const ans = [rate(v.answered[0], v.asks[0]), rate(v.answered[1], v.asks[1])];
|
|
87
88
|
const wk = [rate(v.byWorker[0], v.answered[0]), rate(v.byWorker[1], v.answered[1])];
|
|
89
|
+
const pk = [rate(v.quick[0], v.asks[0]), rate(v.quick[1], v.asks[1])];
|
|
88
90
|
const value = `<section class="sec fsec" id="value" aria-labelledby="h-value">
|
|
89
91
|
<div class="sechead"><h2 id="h-value">Is it delivering value</h2><p>agents hand off, people decide: this week, against last week</p></div>
|
|
90
|
-
<div class="mgrid
|
|
92
|
+
<div class="mgrid">
|
|
91
93
|
${metric({ key: "answered", title: "Hand-offs answered", value: ans[0] === null ? "none asked" : `${ans[0]}%`, sub: `${v.answered[0]} of ${plural(v.asks[0], "hand-off")}`, delta: ans[0] === null ? "" : delta(ans[0], ans[1], { unit: "pts", better: "up" }) })}
|
|
92
94
|
${metric({ key: "answerTime", title: "Median time to answer", value: v.medianAnswerMs[0] === null ? "none yet" : dur(v.medianAnswerMs[0]), delta: v.medianAnswerMs[0] === null ? "" : delta(v.medianAnswerMs[0], v.medianAnswerMs[1], { unit: "ms", better: "down" }) })}
|
|
95
|
+
${metric({ key: "pickedUp", title: "Picked up within 5 minutes", value: pk[0] === null ? "none asked" : `${pk[0]}%`, sub: v.asks[0] ? `${v.quick[0]} of ${plural(v.asks[0], "hand-off")}${v.unpicked[0] ? ` · ${v.unpicked[0]} never picked up` : ""}` : "", delta: pk[0] === null ? "" : delta(pk[0], pk[1], { unit: "pts", better: "up" }) })}
|
|
93
96
|
${metric({ key: "byWorker", title: "Answered by a worker", value: wk[0] === null ? "none yet" : `${wk[0]}%`, sub: v.answered[0] ? `${v.byWorker[0]} by a worker · ${v.byPerson[0]} by a person` : "", delta: wk[0] === null ? "" : delta(wk[0], wk[1], { unit: "pts" }) })}
|
|
94
97
|
${metric({ key: "decisions", title: "Decisions that reached a person", value: String(v.decisions[0]), sub: v.decisions[0] ? `${v.decided[0]} settled${v.medianDecisionMs[0] !== null ? `, median wait ${dur(v.medianDecisionMs[0])}` : ""}${v.decisions[0] - v.decided[0] ? ` · ${v.decisions[0] - v.decided[0]} still waiting` : ""}` : "none raised", delta: delta(v.decisions[0], v.decisions[1]) })}
|
|
95
98
|
${metric({ key: "delivered", title: "Deliveries", value: String(v.delivered[0]), sub: "each with a branch and a commit", delta: delta(v.delivered[0], v.delivered[1], { better: "up" }) })}
|
|
@@ -131,7 +134,7 @@ export function founderSections(f, h, now) {
|
|
|
131
134
|
return `${healthSection(h, now)}${usage}${value}${growth}${retention}${plansSec}`;
|
|
132
135
|
}
|
|
133
136
|
export function definitionsSection() {
|
|
134
|
-
const order = [["week", "This week"], ["activeTeams", "Weekly active teams"], ["activePeople", "Weekly active people"], ["handoffs", "Hand-offs"], ["answered", "Hand-offs answered"], ["answerTime", "Median time to answer"], ["byWorker", "Answered by a worker"], ["decisions", "Decisions that reached a person"], ["delivered", "Deliveries"], ["newTeams", "New teams"], ["newPeople", "New people"], ["activation", "First hand-off within 7 days"], ["funnel", "Sign-up to first hand-off"], ["wow", "Still active a week later"], ["fourWeek", "Still active 4 weeks later"], ["quiet", "Went quiet"], ["plans", "Plans"], ["relay", "The relay"], ["waiting", "Decisions waiting on a person"], ["workers", "Workers that can't take requests"], ["behind", "Machines behind on version"]];
|
|
137
|
+
const order = [["week", "This week"], ["activeTeams", "Weekly active teams"], ["activePeople", "Weekly active people"], ["handoffs", "Hand-offs"], ["answered", "Hand-offs answered"], ["answerTime", "Median time to answer"], ["pickedUp", "Picked up within 5 minutes"], ["byWorker", "Answered by a worker"], ["decisions", "Decisions that reached a person"], ["delivered", "Deliveries"], ["newTeams", "New teams"], ["newPeople", "New people"], ["activation", "First hand-off within 7 days"], ["funnel", "Sign-up to first hand-off"], ["wow", "Still active a week later"], ["fourWeek", "Still active 4 weeks later"], ["quiet", "Went quiet"], ["plans", "Plans"], ["relay", "The relay"], ["waiting", "Decisions waiting on a person"], ["workers", "Workers that can't take requests"], ["behind", "Machines behind on version"]];
|
|
135
138
|
return `<section class="sec" id="definitions" aria-labelledby="h-defs">
|
|
136
139
|
<div class="sechead"><h2 id="h-defs">What these mean</h2><p>built only from what the relay already keeps: no tracking was added</p></div>
|
|
137
140
|
<div class="card pad"><dl class="defs">${order.map(([k, t]) => `<div><dt>${esc(t)}</dt><dd id="def-${k}">${esc(FOUNDER_DEFS[k])}</dd></div>`).join("")}</dl></div>
|
package/dist/admin-pages.js
CHANGED
|
@@ -257,6 +257,7 @@ export function renderOverview(d) {
|
|
|
257
257
|
const F = d.founder ?? null;
|
|
258
258
|
const nav = secbar([
|
|
259
259
|
...(F ? [{ id: "health", label: "Health", n: null }, { id: "usage", label: "Usage" }, { id: "value", label: "Value" }, { id: "growth", label: "Growth" }, { id: "retention", label: "Retention" }, { id: "plans", label: "Plans" }] : []),
|
|
260
|
+
...(d.installs ? [{ id: "installs", label: "Downloads" }] : []),
|
|
260
261
|
{ id: "teams", label: "Teams", n: T.length }, { id: "people", label: "People", n: d.accounts.total }, { id: "audit", label: "Audit" },
|
|
261
262
|
], "Overview sections");
|
|
262
263
|
return page({
|
|
@@ -265,7 +266,7 @@ export function renderOverview(d) {
|
|
|
265
266
|
<main id="main">
|
|
266
267
|
${d.done ? `<div class="flash" role="status">${esc(d.done)}</div>` : ""}
|
|
267
268
|
<div class="sechead" style="margin-top:22px;margin-bottom:0"><h1>What's going on</h1><p>this week is the last 7 days in UTC, today included</p></div>
|
|
268
|
-
${F ? founderSections(F, fh, d.now) : `<div class="health" aria-label="Relay health">
|
|
269
|
+
${F ? founderSections(F, fh, d.now) : ""}${d.installs ? installsSection(d.installs) : ""}${F ? "" : `<div class="health" aria-label="Relay health">
|
|
269
270
|
<span><span class="dot"></span>Relay <b>${esc(h.version)}</b>, up ${up}${h.hold ? ` · upgrades held at <b>${esc(h.hold)}</b>` : ""}</span>
|
|
270
271
|
${h.loopP99 !== null ? `<span>Loop delay p99 <b>${Math.round(h.loopP99)} ms</b></span>` : ""}
|
|
271
272
|
<span>${h.storage ? `<span class="dot bad"></span>Disk <b>failing: ${esc(h.storage)}</b>` : `Disk <b>writing normally</b>`}</span>
|
|
@@ -558,7 +559,7 @@ export function rightNow(o, m, now, asker) {
|
|
|
558
559
|
return o.claimed.by === "worker" ? `${who}'s worker is working on it now (started ${when(o.claimed.at, "time")})` : `Claimed by ${who}'s agent window ${when(o.claimed.at, "time")}`;
|
|
559
560
|
if (!m)
|
|
560
561
|
return `${who} is not on this team any more`;
|
|
561
|
-
const where = m.online ? `${who} is online${m.windows ? "" : " in a worker only"}` : `${who} is offline${seen}`;
|
|
562
|
+
const where = m.online ? `${who} is online${m.windows ? "" : (m.workerOn ?? !!m.worker) ? " in a worker only" : ", with nothing set up to take requests while away"}` : `${who} is offline${seen}`;
|
|
562
563
|
if (o.human)
|
|
563
564
|
return `Waits for ${who} to decide, since ${when(o.since, "time")}. ${where}`;
|
|
564
565
|
if (o.handedBackAt)
|
|
@@ -573,6 +574,8 @@ export function rightNow(o, m, now, asker) {
|
|
|
573
574
|
return `${who}'s worker is busy with something else`;
|
|
574
575
|
if (m.online && !m.windows && m.worker)
|
|
575
576
|
return `${who}'s worker is ${esc(m.worker.state)} and has not taken it yet`;
|
|
577
|
+
if (m.online && !m.windows && !(m.workerOn ?? !!m.worker))
|
|
578
|
+
return `${who}'s computer is on, but nothing there is set up to take requests while ${who} is away`;
|
|
576
579
|
if (m.online)
|
|
577
580
|
return m.busy ? `${who}'s session is mid-turn; it reaches the agent after this turn` : `Delivered to ${who}'s session, not picked up yet`;
|
|
578
581
|
return `${who} is offline${seen}${m.worker ? "" : ", with no worker connected"}`;
|
|
@@ -817,4 +820,28 @@ export function renderGoal(d) {
|
|
|
817
820
|
${inlineReadScript(d.nonce)}`,
|
|
818
821
|
});
|
|
819
822
|
}
|
|
823
|
+
export function installsSection(s) {
|
|
824
|
+
const rows = (xs, none) => xs.length
|
|
825
|
+
? `<table class="rt"><tbody>${xs.map((x) => `<tr><td class="span">${esc(x.name)}</td><td class="r num">${x.n}</td></tr>`).join("")}</tbody></table>`
|
|
826
|
+
: `<p class="none" style="padding:4px 18px 14px">${none}</p>`;
|
|
827
|
+
const place = (e) => [e.city, e.region, e.country_name ?? e.country].filter(Boolean).map((x) => esc(String(x))).join(", ") || "unknown";
|
|
828
|
+
const tag = (e) => e.bot ? "bot" : e.datacenter ? "server" : e.method === "HEAD" ? "check only" : "";
|
|
829
|
+
const days = s.days.map((d) => `<tr><td>${esc(d.day)}</td><td class="r num">${d.downloads}</td><td class="r num">${d.networks}</td><td class="r num">${d.sh}</td><td class="r num">${d.ps1}</td></tr>`).join("");
|
|
830
|
+
return `<section class="sec fsec" id="installs" aria-labelledby="h-installs">
|
|
831
|
+
<div class="sechead"><h2 id="h-installs">Installer downloads</h2><p>install.sh and install.ps1 from this relay, last 30 days. Bots, servers and HEAD checks are left out of the counts.</p></div>
|
|
832
|
+
<div class="mgrid">
|
|
833
|
+
<div class="metric"><span class="l">Downloads</span><div class="v">${s.total30}</div><div class="s">from ${plural(s.networks30, "network")}</div><span class="trend">${spark(s.days.map((d) => d.downloads), 112, 28)}<span class="vh">Daily, oldest first: ${s.days.map((d) => d.downloads).join(", ")}.</span></span></div>
|
|
834
|
+
<div class="metric"><span class="l">Set up from the same network</span><div class="v">${s.signedIn30}</div><div class="s">${s.networks30 ? `${pct(s.signedIn30, s.networks30)}% of networks that downloaded connected a computer within a day` : "no downloads yet"}</div></div>
|
|
835
|
+
<div class="metric"><span class="l">Left out</span><div class="v">${s.excluded30.bots + s.excluded30.datacenter + s.excluded30.head}</div><div class="s">${s.excluded30.bots} bots · ${s.excluded30.datacenter} servers (our checks, CI) · ${s.excluded30.head} checks only</div></div>
|
|
836
|
+
</div>
|
|
837
|
+
<div class="mgrid" style="margin-top:14px">
|
|
838
|
+
<div class="card"><div class="fhead">By day (last ${s.days.length})</div><div class="scroll"><table class="rt"><thead><tr><th>Day</th><th class="r">Downloads</th><th class="r">Networks</th><th class="r">Mac/Linux</th><th class="r">Windows</th></tr></thead><tbody>${days}</tbody></table></div></div>
|
|
839
|
+
<div class="card"><div class="fhead">Countries</div>${rows(s.countries, s.geo ? "No downloads yet." : "Places appear once the location database is on (PANTHEON_GEOIP=dbip).")}</div>
|
|
840
|
+
<div class="card"><div class="fhead">Cities</div>${rows(s.cities, s.geo ? "No downloads yet." : "Places appear once the location database is on (PANTHEON_GEOIP=dbip).")}</div>
|
|
841
|
+
</div>
|
|
842
|
+
<div class="card" style="margin-top:14px"><div class="fhead">How they were fetched</div>${rows(s.clients, "No downloads yet.")}</div>
|
|
843
|
+
<div class="card" style="margin-top:14px"><div class="fhead">Latest downloads</div><div class="scroll"><table class="rt"><thead><tr><th>When</th><th>File</th><th>Where</th><th>Network</th><th>Client</th><th></th></tr></thead><tbody>${s.recent.map((e) => `<tr><td>${when(e.at, "full")}</td><td class="mono">${esc(e.file)}</td><td>${place(e)}</td><td>${esc(e.org ?? "")}</td><td>${esc(e.client)}${e.os ? ` · ${esc(e.os)}` : ""}</td><td class="muted">${tag(e)}</td></tr>`).join("") || `<tr><td colspan="6" class="empty">No downloads yet.</td></tr>`}</tbody></table></div></div>
|
|
844
|
+
${s.geo ? `<p class="note">IP geolocation by <a href="https://db-ip.com">DB-IP</a>, read on this relay; no address is kept or sent anywhere.</p>` : ""}
|
|
845
|
+
</section>`;
|
|
846
|
+
}
|
|
820
847
|
//# sourceMappingURL=admin-pages.js.map
|