feat(orchestrator): hub requirements 066 to 082 and 084

Radio footer, rules page, schedules editor (System timers and Claude
tasks through signed runner jobs), account usage bar, usage explorer
with a streamed usage.jsonl, queue Controls tab and override, running
tasks on the board, stale task prune with the generic dial, greyed card
stamps, commit-tree diffs from the runner preview, VS Code path links,
expired asks and decisions that stay as EXPIRED cards (asks keyed by a
call digest; an async PostToolUse hook closes those answered in the
terminal), the Match refresh hourglass, attachments by paste, drop and
paperclip in every text field (page CSP gains img-src blob: for the
thumbnails) and the limits board with profiles and a passkey to loosen.
Fixes: one red accept on a red-gate commit and no release while a risk
is open, the send bar footer segments share one height, the mic button
survives a redraw, new Match cards queue before the release card.

E2E specs were still running at commit time (operator order); their
failures follow as separate fixes.

🎯 Fix: 88 %
💥 Break: 8 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 81
🚦 Gate: ⛔ fix 88 % < 90, break 8 % > 5 (committed on the operator's word)

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-27 19:05:38 +00:00
1 parent dc0d578eca
commit f356083a24
149 files changed
+10646 -963

No files matched your search

+73
View File
@@ -0,0 +1,73 @@
const Prune = (() => {
"use strict";
const {staleFor, STALE_DAYS} = typeof Plan === "object" ? Plan : require("./plan.js");
const {marks} = typeof KanbanMarks === "object" ? KanbanMarks : require("./kanban-marks.js");
const KIND = "prune";
const ANNOUNCE = "announce";
const APPLY = "prune";
const MINUTE = 60;
const MINUTES = {value: 10, min: 1, max: 60, page: 5};
const DAYS = {min: 1, max: 999};
/**
* @param rows - the hub's task rows.
* @param sources - the mark sources of KanbanMarks.marks: {now, tasks, beats, runner}.
* @param days - N: how many days without a register change make a task stale.
* @returns the stale tasks, oldest change first: register tasks the operator may change (editable: open, no
* operator/ or hotfix/ record) without a register change for N days and without a running mark.
*/
function stale(rows, sources, days) {
const found = rows.filter((row) => row.editable && staleFor(row, sources.now, days) && !marks(row, sources).length);
return found.sort((a, b) => a.updated - b.updated || a.task.localeCompare(b.task));
}
/**
* @param tasks - the ticked task slugs.
* @param days - N of the stale list.
* @param since - the epoch the list was taken at; a register change after it keeps a task.
* @param minutes - the answer window on the dial.
* @returns the two items one passkey assertion signs: the announce job, run at once, and the rasci.py prune job,
* which the runner holds back until the deadline since + minutes.
*/
function items(tasks, days, since, minutes) {
const deadline = since + minutes * MINUTE;
return [
{kind: KIND, argv: [ANNOUNCE, "--days", String(days), "--deadline", String(deadline), ...tasks]},
{kind: KIND, argv: [APPLY, "--since", String(since), ...tasks], not_before: deadline},
];
}
/**
* @param jobs - the hub's runner jobs (state.jobs).
* @param now - the hub's epoch seconds.
* @returns the queued apply job of a signed prune nearest its deadline as {job, deadline, tasks, left}, left the whole
* seconds until the deadline and never below 0; null without one.
*/
function pending(jobs, now) {
const queued = jobs.filter((job) => job.kind === KIND && job.status === "queued" && typeof job.not_before === "number" && Array.isArray(job.argv) && job.argv[0] === APPLY);
const next = queued.sort((a, b) => a.not_before - b.not_before)[0];
return next ? {job: next.id, deadline: next.not_before, tasks: next.argv.slice(3), left: Math.max(0, Math.ceil(next.not_before - now))} : null;
}
/**
* @param seconds - whole seconds left.
* @returns them as m:ss.
*/
function clock(seconds) {
return `${Math.floor(seconds / MINUTE)}:${String(seconds % MINUTE).padStart(2, "0")}`;
}
/**
* @param text - what the operator typed in the days field.
* @returns the whole number of days between DAYS.min and DAYS.max it names, else null.
*/
function daysOf(text) {
const value = /^[0-9]{1,3}$/.test(text.trim()) ? Number(text.trim()) : NaN;
return value >= DAYS.min && value <= DAYS.max ? value : null;
}
return {KIND, MINUTE, MINUTES, DAYS, STALE_DAYS, stale, items, pending, clock, daysOf};
})();
if (typeof module === "object" && module.exports) {
module.exports = Prune;
}