The spawner's claim link
The account that sent a forge (a person or an agent) can ask for its claim link again until somebody claims it. A site admin always could; the spawner no longer needs one. The old link stops working the moment a new one is made, and a claimed forge refuses the ask. Anyone else, signed in or not, is refused.
Ending a link (revoke) or bringing it back (undo) stays a site admin's, on every door.
Try it, every door the same:
- API:
POST /api/v1/forges/<name>/claim-linkwith the tokenPOST /api/v1/startgave you (scoperw). - MCP: the
claim_linktool,{ "name": "<name>", "reveal": true }. - Web: open
/forges/<name>/claim-linkand press Send a fresh link; the link is shown once. - Terminal: the
:palette, A fresh claim link for a forge I sent; type the name, the link and its QR code follow.
The owner check is reissueClaim in src/actions/spawn.ts: the ledger's owner against the signed-in account, after
the same-origin check. A forge spawned with no plan and no key runs its crew on the host's included credit; a run that
finds its copy of that credit short asks the host first, at most once in 15 s (refreshFundingOnce).
Resuming an unfinished forge
If a spawn is cut off before it finishes, sending the same POST /api/v1/forges again resumes it and mints a fresh
claim link. Only the person who started it may (#14910); anyone else gets not_yours: "<name> is being made by
someone else; only the person who started it can resume it".
- Signed in: your sign-in is the proof. Do not send
resumeKey; the door refuses one asinvalidonresumeKey. - Signed out: the first answer carries
resumeKey. Keep it and send it back asresumeKeyon the retry. You may also choose it yourself on the first call, so that a cut-off answer still leaves you holding it: 32 to 128 characters fromA-Za-z0-9_-(RESUME_KEY); any other shape, or a value that is not a string, isinvalid. - The ledger keeps only the key's hash, and the check compares in constant time. Nobody can tell you a lost key: start again under another name.
The one-click doors keep the key for the stranger and never show it (#15126). The home page's Start my forge
sends a key it chose and keeps it in an HttpOnly, SameSite=Lax cookie named for the forge (forge_resume_<name>,
Path=/forges/start, a day), set on every refusal, a start that stops part way included, and cleared once the forge
is made (src/web/resume_cookie.ts). The terminal's guest Start my forge keeps it for the SSH session, for the last 8 names typed. Pressing
it again from the same browser or session resumes; any other gets not_yours in plain words: "Someone else is making
a forge by that name. Pick another name and press Start my forge again." A finished forge is answered as before. Pinned by
test/spawn-resume.test.ts, test/spawn-resume-door.test.ts and test/start-forge-resume.test.ts.
A spawn through the API or MCP holds its reply at most HOME_WAIT_MS (20 s, one budget for the cell's start and the
home's first answer). A home that answers in time gets "Ready: send the link"; otherwise "It will answer in about a
minute", and settleChild keeps watching for the 3-minute alarm. The page spawn (opts.page) is not held: it returns
at once and the page is where the person is already waiting on the forge itself.
Pinned by test/agent-owns-forge.test.ts, test/crew-lent-refresh.test.ts and test/funding-sync.test.ts.