Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 16d3540c65670408948449ac1a5e90f2a38e81f8
parent da60ba8d641c6064f87373aa1b9f1e4586820725
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon,  9 Nov 2026 20:46:22 -0500

umtool: X's jar is a machine call (no piece's: beside a missing tool), a case's new transcripts its case's c: piece with no Park or Mute; docs for What needs you (redesign L4)

- lib/machine.ts: MachineCall x-jar-stale (its title and action the editor's settings);
  diskDecisions no longer asks the editor.
- case-new-cues rows carry `c:<case>`; InboxList draws no Park/Mute on a case's card
  (cases have no lifecycle or mutes yet); inbox-engine.spec's piece rule says so.
- docs/knobs.md "What needs you (home: the Inbox, one-press actions, Quick clip)" -- each
  call, its one press and its CLI twin; the quick clip row names home's box. docs/cli.md:
  `takes verdict`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/app/page.tsx | 4++--
Mumtool/components/inbox/InboxList.tsx | 6++++--
Mumtool/docs/cli.md | 1+
Mumtool/docs/knobs.md | 33++++++++++++++++++++++++++++++++-
Mumtool/e2e/inbox-engine.spec.ts | 3++-
Mumtool/e2e/needs-you.spec.ts | 6++++--
Mumtool/lib/inbox.ts | 23+++++++++--------------
Mumtool/lib/inbox/caseCues.mjs | 3+++
Mumtool/lib/inbox/needs-you.test.ts | 2+-
Mumtool/lib/inbox/xJar.mjs | 3++-
Mumtool/lib/machine.ts | 17+++++++++++++++--
11 files changed, 75 insertions(+), 26 deletions(-)

diff --git a/umtool/app/page.tsx b/umtool/app/page.tsx @@ -54,13 +54,13 @@ async function machineCards(): Promise<InboxCard[]> { return (await machineCalls()).map((m) => ({ key: `machine:${m.kind}`, piece: null, - title: "umtool", + title: m.title ?? "umtool", kind: m.kind, what: whatOf(m.kind), why: m.why, count: m.count, severity: "blocking", - action: { label: m.kind === "machine-tool" ? "Check tools" : "Open system", href: systemHref() }, + action: m.action ?? { label: m.kind === "machine-tool" ? "Check tools" : "Open system", href: systemHref() }, lifecycle: "active" as const, })); } diff --git a/umtool/components/inbox/InboxList.tsx b/umtool/components/inbox/InboxList.tsx @@ -127,6 +127,8 @@ export default function InboxList({ groups }: { groups: InboxGroup[] }) { function Card({ card: c }: { card: InboxCard }) { const parked = c.lifecycle !== "active"; + // A research case's card (`c:`): cases have no lifecycle or mutes yet, so no Park or Mute. + const parkable = !!c.piece && !c.piece.startsWith("c:"); // Pressed in place only on an active, unmuted card: a hidden one's action is its way back. const oneClick = !!(c.settle && c.project && !parked && !c.muted && !c.finish); return ( @@ -182,14 +184,14 @@ function Card({ card: c }: { card: InboxCard }) { )} </span> <LitActions className="ml-auto gap-0.5 sm:ml-0 max-md:hidden"> - {!parked && !c.muted && c.piece && ( + {!parked && !c.muted && c.piece && parkable && ( <> <LifecycleButton piece={c.piece} title={c.title} from={c.lifecycle} to="parked" label="Park" /> <MuteButton piece={c.piece} kind={c.kind} title={c.title} muted={false} label={c.finish ? "Not yet" : "Mute"} /> </> )} </LitActions> - {!parked && !c.muted && c.piece && ( + {!parked && !c.muted && c.piece && parkable && ( <PhoneOnly> <Menu data-inbox-more={c.key} diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md @@ -70,6 +70,7 @@ Inbox cannot disagree about what is wrong with one. | `takes make <project> [--recipe FILE] [--only ID,ID] [--force]` · `takes make <project> --all-styles [--group G] [--at S --dur S \| --full]` | a recipe's takes, one at a time (default `takes/recipe.json`); every montage style, one take each (Make all styles); **exit 1** if any failed | | `takes styles [--json]` · `takes effects <project> [--json]` · `takes pick <project> <take> [--anyway] [--pin \| --unpin] [--json]` | the montage styles; the overlay effects the cut offers (`render.chrome.fx` presets: the Takes page's **Effect** list); **Use this take** — refused (exit 1) when the project changed since the take was made, until `--anyway`; `--pin` keeps the pick when newer takes are built (each whole-cut take of the manifest is otherwise its group's pick once built), `--unpin` lets go ([report-video.md](report-video.md#takes-alternative-renders-judged-side-by-side)) | | `takes ls <project> [--json]` · `takes relabel <project> <take> <label…>` · `takes supersede <project> <take> [--by <take>]` · `takes supersede <project> <take> --clear` · `takes delete <project> <take> [--dry-run] [--force]` | **take housekeeping** (the Takes page's ✎, **Mark superseded**, **Delete take**): first the working cut's line (`Latest: draft-22 · 28:03 · +N edits since`, and the edits in words; `--json`: `working`), then the takes with latest / picked (pinned) / superseded / RENDERING; a label fixed in `take.json` (an undo point of the take's own); a take folded away as superseded (verdicts.json, nothing deleted); a take deleted. Relabel and delete are refused (**exit 1**) while the take renders or a live render is made from it ([knobs.md](knobs.md#takes-relabel-supersede-cancel-delete-fork-as-variant-compare)) | +| `takes verdict <project> <take> like\|maybe\|no\|clear [--note "…"] [--json]` | **a take's verdict** in `takes/verdicts.json` — the Takes page's and Play's **Like · Maybe · No**; a version with a render and none is a call on home ("versions to judge", [knobs.md](knobs.md#what-needs-you-home-the-inbox-one-press-actions-quick-clip)) | | `takes save <project> [--label L] [--force] [--json]` · `takes open <project> <take> [--json]` · `takes freeze <project> [<take>… \| --all] [--apply] [--json]` | **the working draft and its saved versions** (Play's **Save version** and **Open in draft**): `save` freezes the draft (`video.manifest.json`) as the next `v<N>` — `takes/v<N>/base.manifest.json` byte for byte, `take.json` `version: true` — and names it the draft's parent (`takes/draft.json`); nothing is saved when the draft has no edits since its parent, unless `--force`. `open` copies a version into the draft — the draft saved first as the next `v<N>` when it has edits since its parent — with one undo point (`umtool timeline <p> undo` puts the draft and its parent back); a legacy take with its own timeline opens by its patch over the draft (as `take --promote`), another legacy take as the manifest it was rendered from (as `takes pick`). Neither touches the pick or its pin. `freeze` gives legacy takes a frozen base (the manifest each was rendered from, else the draft now) — a dry run unless `--apply`, each take's difference from how it resolves today said. Version ids are `v1`, `v2`, … — one above every `v<N>` directory under `takes/`, never reused ([knobs.md](knobs.md#the-working-draft-and-saved-versions)) | | `takes cancel <project> <take> [--json]` · `takes fork <project> <take> [--name N] [--json]` · `takes compare <project> <a> <b> [--json]` | **take housekeeping, the rest**: **Cancel render** (asked of the process rendering it, which stops its render's process group, marks the take cancelled and lets render mode go; exit 1 when it has not stopped); **Fork as variant** (a project beside this one, default `v-<take>`: the take's manifest, `variant.json`, the parent's media and assets linked, the take in it); two takes **side by side** (`<take>` or `<project>:<take>`: the facts, the cut's changes A → B, the look's differences) ([knobs.md](knobs.md#takes-relabel-supersede-cancel-delete-fork-as-variant-compare)) | | `trailer <project> --take <t> (--beats FILE \| --beats-json JSON) [--intro] [--finale S] [--xfade 0.3] [--no-snap] [--out NAME] [--dry-run] [--json]` | a **trailer cut from the take's finished master**: spans of the master's own frames (the deck shows the whole timeline), clip beats in source seconds mapped by the take's build records, each clip beat's end moved forward into the next pause (through its sentence when one ends within 1 s) and its start back into the one before, so the crossfade lands in quiet, each move said (`--no-snap`: the edges as written), crossfaded, the take's encode, in the heavy slot; writes `takes/<t>/out/<slug>.trailer.mp4` and `.trailer.json`; **exit 1** on a refusal ([report-video.md](report-video.md#trailer-from-the-master)) · `--reel <name> [--take <t>]`: a **beat reel** -- its own beats file (`promo/<name>-beats.json`), crossfade, intro (one rendered for the reel when the master has none, or the reel's own) and outro card (the title, the call to action, an image, the site's name; faded in from the last beat, held to the end), written to `<slug>.<name>.mp4`; no `--take`: its pinned take, else the one it was last cut from, else the latest finished master ([report-video.md](report-video.md#beat-reels)) | diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -369,7 +369,7 @@ bare footage (no deck, no cards: `data-play-bare`). | the mode | Build, **Look**: **Basic \| Deck** | `umtool look <p> mode=basic` | `PUT /api/report/render {patch: {mode}}` | | the built-in preset | Media, Video modules, Look preset | `umtool preset apply basic <p> [--replace]` | — | | a clip's **share line** — its platform page at the first second it plays (YouTube `t=<s>s`, Rumble `start=<s>`, Twitch `t=<h>h<m>m<s>s`) and its moment on the archive (`archiveMomentUrl`); a Rumble folder id (the URL slug the corpus keeps it under) goes out as the embed id the archive serves | **Copy share line**: on each take's card (its first clip) and on Play (the clip on screen); the line is shown beside the button too | `umtool share <p> [<clip>] [--take <t>] [--site <id>] [--json]` | `GET /api/report/share-line?project&clip&take` | -| **quick clip** — one moment to a shareable mp4: a basic-mode project under `quick-clips/` (its slug from `--title`, else `<channel>-<video>-<start>`), its window ASKED OF THE EDITOR (a Rumble recording fetched whole — the editor decides), `--snap words`: the edges snapped to the words heard there (the editor's transcribe op; the first word mostly after the start, the last mostly before the end, 0.15 s before and 0.3 s after, never into a neighbour), rendered as the take `clip` (the heavy slot; its record; the take panel), then the mp4's path and the share line; `--site <id>` names the archive (else the first public site carrying the channel) | — (the route) | `umtool clip <channel>/<video>@<start>-<end> [--snap words] [--title T] [--site <id>] [--folder F] [--json]` | `POST /api/report/quick-clip {spec, snap?, title?, site?}` → 202 `{job}`; `GET ?job=<id>` → `{job, done?: {project, output, share}}` | +| **quick clip** — one moment to a shareable mp4: a basic-mode project under `quick-clips/` (its slug from `--title`, else `<channel>-<video>-<start>`), its window ASKED OF THE EDITOR (a Rumble recording fetched whole — the editor decides), `--snap words`: the edges snapped to the words heard there (the editor's transcribe op; the first word mostly after the start, the last mostly before the end, 0.15 s before and 0.3 s after, never into a neighbour), rendered as the take `clip` (the heavy slot; its record; the take panel), then the mp4's path and the share line; `--site <id>` names the archive (else the first public site carrying the channel) | home's **Quick clip** box ([What needs you](#what-needs-you-home-the-inbox-one-press-actions-quick-clip)) | `umtool clip <channel>/<video>@<start>-<end> [--snap words] [--title T] [--site <id>] [--folder F] [--json]` | `POST /api/report/quick-clip {spec, snap?, title?, site?}` → 202 `{job}`; `GET ?job=<id>` → `{job, done?: {project, output, share}}` | The Rumble mapping is ONE helper (`lib/report/shareLine.mjs` `siteVideoFor`, over common `videoDir-server.mjs` `recordIdOfVideoDir`: the folder's `metadata.info.json` `id`) and it has three callers: the share line; @@ -377,6 +377,37 @@ The Rumble mapping is ONE helper (`lib/report/shareLine.mjs` `siteVideoFor`, ove `citeUrl` that was the dead link moves with it); and `umtool timeline insert <rumble-channel>/<folder>@…`, which writes the inserted clip with its `siteVideo`. A clip that pins `siteVideo` is never looked up. +## What needs you (home: the Inbox, one-press actions, Quick clip) + +Home (`/`) is the Inbox widened (umtool redesign L4): the calls waiting on the operator, grouped and ranked +(`lib/inbox/groups.mjs`), and beside them the **Quick clip** box, what is **Running** and the **Recent cuts** — which +were the rail's; the rail keeps navigation only (Pinned, which never had a store, is gone). Every row is in +`GET /api/browse/decisions` (`items[]`, one per decision) and `umtool inbox`. + +| Call | When | Its action (one press, where there is one) | From a terminal | +|---|---|---|---| +| **versions to judge** (`version-unjudged`, Review) | a version — or a legacy take — with a render on disk (its preview) and no verdict, not superseded; a quick clip's is not one | **Play and judge**: Play on the newest (`?take=`), where **Like · Maybe · No** sit in the version's line (pressing the lit one clears it) | `umtool takes verdict <p> <take> like\|maybe\|no\|clear [--note "…"]` | +| **clips not walked** (`clips-unwalked`, Review) | the draft's clips with no walk verdict, on a draft whose walk has begun or that has a render or a saved version (a cut still being assembled is not a call) | **Walk the clips**: the bench on the first in walk order | `umtool walk <p>` | +| **quote checks out of date** (`quote-check-stale`, Open) | a project with `quote-check.json` and clips its rows no longer vouch for: the cut or the quote changed since, or never checked | **Run quote-check** on those clips: a step on the durable queue (POST `/api/cli`, the registry's `quote-check` row — it transcribes through the editor) | `umtool quote-check <p> --clips a,b` | +| a quote **heard away from the cut** (`clip-quote-moved`, Blocking) | the check's row says `moved` | **Snap the cut to the words** (`window --align`'s patch, through the window writer) | `umtool window <p> <clip> --align` | +| a quote **not heard** (`clip-quote-missing`, Blocking) | the check's row says `not-found` | **Run quote-check** (after a refetch) | `umtool fetch <p> --refetch <clip> && umtool quote-check <p> --clips <clip>` | +| **QR links that don't open** (`link-dead`, Blocking) on a Rumble folder id | the recorded check knows the fix: the archive serves the recording by its embed id | **Use embed ids (N)**: the clip's `siteVideo` (a `citeUrl` that was the dead link moves with it), one undo point, then the check again (POST `/api/report/links {fix: true}`, `linksCli.mjs` applyLinkFixes — only a clip still as the check saw it) | `umtool links <p> --fix` | +| **new transcripts since the last scan** (`case-new-cues`, Review) | a research case with a pipeline, not done, whose candidate scan last finished at T, and recordings in its scope transcribed since T (the transcript index's per-video mtimes; with no index, the files) | **Scan again**: the case's pipeline page | `archilyzer case candidates <case>` | +| **X's cookies are stale and X work waits** (`x-jar-stale`, Blocking) | the editor's services (`GET /api/ops/services`, asked through umtool's editor client, a minute's memo, never waited on past 1.5 s) carry a stale X alert — the rule the editor's banner draws by | **Refresh X's cookies**: the editor's settings (Refresh cookies / Connect X account, then Recheck) — a human click; nothing here asks X | `pnpm ops get services` | + +A card whose rows agree on one press shows it in place of its link (`mergeSettle`: a quote check over every clip the +card lists; the same project-wide press; never two clip patches), its title still a link to where it is settled — the +same `DecisionSettle` buttons the project page's Checks list presses. + +**Quick clip.** Paste a moment — an archive's moment link (`?v=<channel>/<video>&t=`, or a `/m/…/<s>-<e>/` page), a +YouTube or Rumble link with its time (the channel is the one whose `data/` holds the recording; a Rumble embed id, the +channel whose metadata names it), or `<channel>/<video>@<start>-<end>` (`lib/report/momentLink.mjs`, the timeline's +Add clip reads the same) — and **Find** shows the recording, its span (a link's second runs to the end of its +sentence, at most 20 s) and the words around it (the corpus's words, else its cues: `GET +/api/report/quick-clip/strip?moment=`). A word starts the clip there, shift-click ends it there; **−0.5 −0.1 +0.1 ++0.5** nudge each edge; **snap to the words** asks the editor to snap them. **Render** is `umtool clip` (above: POST +`/api/report/quick-clip`), the command line shown under it; when it is done, **Copy share line**. + ## Sections, split and flash-forward (editing the cut) Under the deck a cut's **sections are its markers** (`render.chrome.deck.markers`): §0 runs to the first marker's diff --git a/umtool/e2e/inbox-engine.spec.ts b/umtool/e2e/inbox-engine.spec.ts @@ -54,7 +54,8 @@ test("one row per decision, each with the inbox's fields; the counts add up", as expect(hidden).toBe(items.filter((d) => d.hidden).length); expect(groups.map((g) => g.id)).toEqual(["your-call", "review", "blocking", "notes", "open", "ready-to-finish", "quiet"]); for (const d of items) { - expect(d.piece, `${d.kind} ${d.project}`).toMatch(/^[ap]:/); + // A research case's new transcripts (L4, case-new-cues) are its case's: `c:<case>`. + expect(d.piece, `${d.kind} ${d.project}`).toMatch(d.kind === "case-new-cues" ? /^c:/ : /^[ap]:/); expect(d.group).toBeTruthy(); expect(d.category).toBeTruthy(); expect(d.lifecycle).toBeTruthy(); diff --git a/umtool/e2e/needs-you.spec.ts b/umtool/e2e/needs-you.spec.ts @@ -91,7 +91,7 @@ test("each new call is on home from its fixture -- versions, clips, quote checks // A one-press card's title still goes where it is settled. await expect(checks.locator("[data-card-link]")).toHaveAttribute("href", urls.projectHref(P)); - const theCase = card(page, "case-new-cues").filter({ hasText: "The Needs You Case" }); + const theCase = card(page, "case-new-cues", `c:${NY_CASE}`); await expect(theCase.locator("[data-card-title]")).toContainText("1 new transcript since the last scan"); await expect(theCase.locator("[data-action-link]")).toHaveAttribute("href", `/research/${NY_CASE}/pipeline`); @@ -115,7 +115,9 @@ test("each new call is on home from its fixture -- versions, clips, quote checks expect(items.filter((d) => d.kind === "version-unjudged" && d.project === P).map((d) => d.target).sort()).toEqual(["short", "v1"]); expect(items.filter((d) => d.kind === "clips-unwalked" && d.project === P).map((d) => d.target)).toEqual(["c02", "c03", "c04"]); expect(items.filter((d) => d.kind === "quote-check-stale" && d.project === P).map((d) => d.target)).toEqual(["c01", "c02", "c03", "c04"]); - expect(items.some((d) => d.kind === "x-jar-stale")).toBe(true); + // X's jar is a machine call (lib/machine.ts): on the page and the rail's count, not a piece's row. + expect(items.some((d) => d.kind === "x-jar-stale")).toBe(false); + expect(items.filter((d) => d.kind === "case-new-cues").map((d) => (d as { piece?: string }).piece)).toContain(`c:${NY_CASE}`); await services(request, []); await page.reload(); diff --git a/umtool/lib/inbox.ts b/umtool/lib/inbox.ts @@ -28,7 +28,6 @@ import type { ScheduleView } from "./schedule-types"; import { refreshDecisions } from "./inbox/refresh"; import { sourceWatchDecisions } from "./inbox/sourceWatch"; import { projectCallsAll } from "./inbox/projectCalls"; -import { xJarDecisions } from "./inbox/xJar"; import { caseCuesDecisions } from "./inbox/caseCues"; // --------------------------------------------------------------------------- @@ -78,17 +77,17 @@ import { caseCuesDecisions } from "./inbox/caseCues"; // Run quote-check in place (lib/inbox/checks.mjs) // case-new-cues a live research case's scope has new transcripts // since its last candidate scan (lib/inbox/caseCues.mjs) -// x-jar-stale X's login is past its age and X work waits on it -- -// the editor's banner's rule (lib/inbox/xJar.mjs; the -// one editor call here, memoised, never waited on long) +// +// (X's login when X work waits on it -- x-jar-stale, lib/inbox/xJar.mjs -- is a +// MACHINE call, lib/machine.ts, beside a missing tool: it is no piece's.) // // -- each row given its piece, category, group, one action, lifecycle and // `hidden` (lib/inbox/groups.mjs), ranked. One row per decision, never dropped: // the MCP reads `items[]` (mcp/src/archivalTools.ts). // -// One editor call only, X's jar (above): there is no "waiting on a cap" state -// (the daily cap refuses at start, a per-job cap ends the run), and running -// jobs are home's Running list (lib/activity.ts readRunning). +// No editor call anywhere here: there is no "waiting on a cap" state (the daily +// cap refuses at start, a per-job cap ends the run), and running jobs are +// home's Running list (lib/activity.ts readRunning). // // SERVER ONLY. // --------------------------------------------------------------------------- @@ -409,13 +408,9 @@ export async function diskDecisions(graph: PieceGraph, life: LifecycleRead): Pro .catch(() => [] as Decision[]); // Re-sweep when complete (UI notes item 16): a report video's source watch that fired. const sources = await sourceWatchDecisions().catch(() => [] as Decision[]); - // What needs you (L4): versions to judge, clips to walk, stale quote checks, a live case's new transcripts, X's jar. - const [calls, cases, xJar] = await Promise.all([ - projectCallsAll().catch(() => [] as Decision[]), - caseCuesDecisions().catch(() => [] as Decision[]), - xJarDecisions().catch(() => [] as Decision[]), - ]); - return [...perArticle.flat(), ...pieceDecisions(graph, life), ...drafts, ...proposals, ...refresh, ...recurring, ...sources, ...calls, ...cases, ...xJar]; + // What needs you (L4): versions to judge, clips to walk, stale quote checks, a live case's new transcripts. + const [calls, cases] = await Promise.all([projectCallsAll().catch(() => [] as Decision[]), caseCuesDecisions().catch(() => [] as Decision[])]); + return [...perArticle.flat(), ...pieceDecisions(graph, life), ...drafts, ...proposals, ...refresh, ...recurring, ...sources, ...calls, ...cases]; } /** diff --git a/umtool/lib/inbox/caseCues.mjs b/umtool/lib/inbox/caseCues.mjs @@ -49,6 +49,9 @@ export function caseCuesDecision({ id, title, since, fresh, href }) { return { project: `research/${id}`, projectTitle: title, + // The case's piece (lib/research/cases.mjs casePieceId): a case has no lifecycle or mutes yet, so the + // Inbox draws no Park or Mute on its card. + piece: `c:${id}`, kind: CASE_NEW_CUES, target: id, what: `${n} new transcript${n === 1 ? "" : "s"} since the last scan`, diff --git a/umtool/lib/inbox/needs-you.test.ts b/umtool/lib/inbox/needs-you.test.ts @@ -227,7 +227,7 @@ test("from disk: the live case's two new transcripts since its scan (the files, const { caseCuesDecisions } = await import("./caseCues"); const [row] = await caseCuesDecisions(); assert.ok(row); - assert.deepEqual([row.kind, row.project, row.projectTitle, row.href], [CASE_NEW_CUES, "research/ny-case", "The NY Case", "/research/ny-case/pipeline"]); + assert.deepEqual([row.kind, row.project, row.projectTitle, row.href, row.piece], [CASE_NEW_CUES, "research/ny-case", "The NY Case", "/research/ny-case/pipeline", "c:ny-case"]); assert.equal(row.what, "2 new transcripts since the last scan"); }); diff --git a/umtool/lib/inbox/xJar.mjs b/umtool/lib/inbox/xJar.mjs @@ -3,7 +3,8 @@ // over common/lib/serviceCookies.ts) carry X's jar age always, and an ALERT only // when the jar refused an X job or X jobs are queued behind it -- the rule the // editor's own banner draws by. So the Inbox shows the jar only when there is a -// stale alert of X's family: one Blocking row, the editor's three short lines +// stale alert of X's family: one Blocking card (a MACHINE call, lib/machine.ts: +// no piece's), the editor's three short lines // (how old, the one thing to do, what it refused), its action the editor's // settings, where Refresh cookies / Connect X account and Recheck are. // diff --git a/umtool/lib/machine.ts b/umtool/lib/machine.ts @@ -1,13 +1,23 @@ import { statfs } from "node:fs/promises"; import { toolsCache } from "./doctor"; import { REPORTS_ROOT } from "./paths"; +import { xJarDecisions } from "./inbox/xJar"; // The machine's own calls for the Inbox: a tool a report build needs that the // last doctor check found absent, and a reports root nearly out of space. Read // from the doctor's CACHE and one statfs -- never a probe (the probe is the -// button on /settings/system). SERVER ONLY. +// button on /settings/system). And X's login when X work waits on it (umtool +// redesign L4, lib/inbox/xJar.ts: the editor's services, memoised, never +// waited on long) -- its card names the editor's settings. SERVER ONLY. -export type MachineCall = { kind: "machine-tool" | "machine-disk"; why: string; count: number }; +export type MachineCall = { + kind: "machine-tool" | "machine-disk" | "x-jar-stale"; + why: string; + count: number; + /** The card's title and its one action, when not umtool's own (X's login: the editor's settings). */ + title?: string; + action?: { label: string; href: string }; +}; /** Below this a render or a fetch would fail part-way. */ export const LOW_DISK_BYTES = 5e9; @@ -35,5 +45,8 @@ export async function machineCalls(): Promise<MachineCall[]> { if (free !== null && free < LOW_DISK_BYTES) { out.push({ kind: "machine-disk", why: `${(free / 1e9).toFixed(1)} GB free under the reports root`, count: 1 }); } + for (const x of await xJarDecisions().catch(() => [])) { + out.push({ kind: "x-jar-stale", why: x.why, count: 1, title: x.projectTitle ?? "X login", action: { label: "Refresh X's cookies", href: x.href } }); + } return out; }