forked from Mike/freno-dev
DO NOT MERGE OR DEPLOY THIS BRANCH. It is the held half of FRE-997, split out ofa336a6cat the Code Review Engineer's changes-requested verdict and the Chief of Staff's 2026-11-03 launch hold (comment 2ccad154), and it is stacked on `freno-dev/FRE-997-count-18` so its own diff stays remote-only. The copy it restores was pulled by FRE-323 (c1c498e,c718370). FRE-997's argument is that those removals were checked against claims the copy never made: hosts come from `~/.ssh/config` and Tailscale (`RemoteHostDiscovery`), the one-time `ssh-copy-id` is a prerequisite the row hands the user as a command (`RemoteHostStatus.fixCommand`), the per-host credential is minted and copied over (`RemoteMirror`), and a remote host mirrors this Mac's integrations (`RemoteMirrorReconcile`). Two things in the old copy were genuinely wrong and are fixed rather than restored: the "every hooked agent" overstatement (Muse, Cline and Amp are `.unsupported` for remote and are named) and the count. It may land only when all of these are recorded on FRE-997: 1. a CTO verdict that the one-click flow was run on the shipping build; 2. footage of a remote agent joining the island; 3. the Chief of Staff revising the FRE-346 §3 launch gate and taking the public-claim call to the sponsor. Until then the live site keeps the FRE-323 state. The restore condition this commit deletes (`marketing/drafts/remote-ssh/copy.md`) is the gate being cited: FRE-205 is todo/unassigned, FRE-320 is a verdict task, and no recording exists. - The Remote collage tile and its mock. - The "Any SSH box, one click away" breakdown with its RemoteHostDemo. - The "One-click SSH setup" chip. - The /agents remote paragraph and the Cline/Amp "this Mac only" rows. - The approvals bullet names the three local-only agents instead of claiming every hooked agent. - remote-claims.test.ts guards the restored copy plus the two overstatements that must not return. - positioning.md moves remote SSH to publishable with its backing. Gate on this branch, this run: `bun test src/routes/nook` 17 pass / 0 fail; `bun run build` succeeds. Green tests do not lift the hold.
91 lines
3.0 KiB
TypeScript
91 lines
3.0 KiB
TypeScript
/**
|
|
* Regression test for the /agents roster and its coverage count.
|
|
*
|
|
* The page mirrors the app's registry, `AgentSpec.all` in
|
|
* the-nook/Sources/NookCore/Agents/AgentRegistry.swift. When Muse joined
|
|
* the registry in 0.10.0 the page kept twelve entries and kept saying
|
|
* "twelve", so a shipped agent was missing from the one page that lists
|
|
* them. The registry lives in another repo, so the expected roster is
|
|
* restated here; when an agent is added there, add it here and on the page.
|
|
*
|
|
* FRE-997 restored the count. The page said thirteen while the registry held
|
|
* eighteen, so the count was dropped rather than corrected (FRE-359 verdict B);
|
|
* now that all eighteen rows are on the page, the roster check is an equality
|
|
* check again and the page states eighteen. A subset check would let a shipped
|
|
* agent go missing behind a passing suite, which is the NOOK-336 failure.
|
|
*
|
|
* STATIC SOURCE AUDIT, the same pattern as the downloads regressions.
|
|
*/
|
|
import { describe, it, expect } from "bun:test";
|
|
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
|
|
const SOURCE = readFileSync(join(import.meta.dir, "agents.tsx"), "utf8");
|
|
|
|
/** User-facing copy only: comments are not copy and may name the old wording. */
|
|
const COPY = SOURCE.replace(/\/\*[\s\S]*?\*\//g, "").replace(/^\s*\/\/.*$/gm, "");
|
|
|
|
/** JSX wraps prose across lines; match a sentence, not its indentation. */
|
|
const PROSE = COPY.replace(/\s+/g, " ");
|
|
|
|
/** AgentSpec.all display names, in registry order (18 rows). @ The-Nook f4258034, 2026-10-29 */
|
|
const REGISTRY = [
|
|
"Claude Code",
|
|
"Codex",
|
|
"OpenCode",
|
|
"Pi",
|
|
"Oh My Pi",
|
|
"Muse",
|
|
"Hermes",
|
|
"OpenClaw",
|
|
"Z.ai (ZCode)",
|
|
"Gemini CLI",
|
|
"Cline",
|
|
"Qwen Code",
|
|
"DeepSeek",
|
|
"Kimi",
|
|
"GitHub Copilot CLI",
|
|
"Crush",
|
|
"Cursor",
|
|
"Amp"
|
|
];
|
|
|
|
const entries = [...SOURCE.matchAll(/^\s{4}name: "([^"]+)",$/gm)].map((m) => m[1]);
|
|
|
|
describe("Nook /agents roster", () => {
|
|
it("lists every registry agent, once, in registry order", () => {
|
|
expect(entries).toEqual(REGISTRY);
|
|
});
|
|
|
|
it("states the registry's size", () => {
|
|
expect(entries.length).toBe(18);
|
|
expect(COPY).toContain("all eighteen");
|
|
expect(COPY).toContain("The 18 agents");
|
|
expect(COPY).toContain("eighteen coding agents");
|
|
});
|
|
|
|
it("carries no stale count", () => {
|
|
expect(COPY.toLowerCase()).not.toContain("thirteen");
|
|
expect(COPY).not.toMatch(/\b13 agents\b/);
|
|
expect(COPY).not.toContain("all thirteen");
|
|
});
|
|
});
|
|
|
|
describe("Nook /agents remote coverage", () => {
|
|
it("says agents can run on remote machines over SSH", () => {
|
|
expect(PROSE).toContain("remote machines");
|
|
expect(PROSE).toContain("remote sessions report into the same grid");
|
|
});
|
|
|
|
it("names the three agents that stay on this Mac", () => {
|
|
expect(PROSE).toContain("Muse, Cline and Amp run on this Mac only");
|
|
});
|
|
|
|
it("discloses the local-only rows where they are listed", () => {
|
|
const localOnly = [
|
|
...SOURCE.matchAll(/This Mac only — remote hosts skip it/g)
|
|
];
|
|
expect(localOnly.length).toBe(3);
|
|
});
|
|
});
|