Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
refactor(relay): isolate status rendering [H15,H17]
Corey Olson9306a20b75d6
diff --git a/src/cli.js b/src/cli.jsindex d13dc5e3..aa9dd086 100644--- a/src/cli.js+++ b/src/cli.js@@ -308,6 +308,7 @@ import {} from './projects.js';import * as roadmapView from './roadmap.js';import * as queueView from './queue.js';+import * as relayOutput from './relay-output.js';import {rigorLines,rigorReport,@@ -421,7 +422,6 @@ import {relayRecovered,relayRevoke,relayStatus,- relayStorageLine,relayTokens,syncRelay,} from './relay.js';@@ -2539,9 +2539,7 @@ function readCommands(io, { first, second, rest, values }) {io.result(summary);return 0;}- if (summary.relay.linked) io.say(`relay: sequence ${summary.relay.sequence}; ${summary.relay.behind} pending uploads${summary.relay.recovery?.pending ? `; recovery pending for sequence ${summary.relay.recovery.skip}; retry ${summary.relay.recovery.next}` : ''}`);- if (summary.relay.oversizedSnapshot && !summary.relay.refusedCheckpoint) io.say(formatSnapshotLimit(summary.relay.oversizedSnapshot));- if (summary.relay.storage) io.say(relayStorageLine(summary.relay.storage));+ for (const line of relayOutput.briefLines(summary.relay)) io.say(line);const { items, accepted, rejected } = summary.stats;io.say(`${summary.me.displayName}: ${summary.unread} unread shouts; holding ${summary.mine.map((item) => `#${item.item_id}`).join(', ') || 'nothing'}`);io.say(`board: ${items.open} open, ${items.claimed} claimed, ${items.submitted} awaiting verification, ${items.verified} verified, ${items.withdrawn} withdrawn`);@@ -4471,8 +4469,7 @@ async function runCommand(argv, io) {: first === 'off' ? await relayOff(ctx.info.root, io) : relayStatus(ctx.info.root);io.result?.(result);const boardName = listApiProjects().find((project) => project.root === ctx.info.root)?.name ?? basename(ctx.info.root);- io.say(result.linked ? `${result.link}\nrelay: ${boardName} (board ${result.board}) is linked for GitHub ${result.login || `account ${result.account}`}; sequence ${result.sequence}; ${result.behind} pending uploads${result.recovery?.pending ? `; recovery pending for sequence ${result.recovery.skip}; retry ${result.recovery.next}` : ''}` : (result.notice || 'relay off; the local board is complete'));- if (result.storage) io.say(relayStorageLine(result.storage));+ for (const line of relayOutput.detailLines(result, boardName)) io.say(line);return 0;}if (command === 'blueprint' && first === 'save') {diff --git a/src/relay-output.js b/src/relay-output.jsnew file mode 100644index 00000000..75b591d0--- /dev/null+++ b/src/relay-output.js@@ -0,0 +1,20 @@+/** Relay text output stays separate from CLI dispatch and encrypted transport [H15,H17]. */+import { formatSnapshotLimit } from './relay.js';+import { relayStorageLine } from './relay-storage.js';++/** Preserve status's short relay summary, any pending-size finding and the authenticated account quota. */+export function briefLines(state) {+ const lines = [];+ if (state.linked) lines.push(`relay: sequence ${state.sequence}; ${state.behind} pending uploads${state.recovery?.pending ? `; recovery pending for sequence ${state.recovery.skip}; retry ${state.recovery.next}` : ''}`);+ if (state.oversizedSnapshot && !state.refusedCheckpoint) lines.push(formatSnapshotLimit(state.oversizedSnapshot));+ if (state.storage) lines.push(relayStorageLine(state.storage));+ return lines;+}++/** Preserve the named relay-status link and account lines, including recovery and deleted-copy guidance. */+export function detailLines(result, boardName) {+ const lines = [];+ lines.push(result.linked ? `${result.link}\nrelay: ${boardName} (board ${result.board}) is linked for GitHub ${result.login || `account ${result.account}`}; sequence ${result.sequence}; ${result.behind} pending uploads${result.recovery?.pending ? `; recovery pending for sequence ${result.recovery.skip}; retry ${result.recovery.next}` : ''}` : (result.notice || 'relay off; the local board is complete'));+ if (result.storage) lines.push(relayStorageLine(result.storage));+ return lines;+}