Templates an admin offers for new forges
A site admin may offer any repository on this forge as a template for new forges, so the list grows without a release.
- Offer:
POST /api/v1/forge-templates {repo, title, says}(site admin,rw), the MCPtemplatestool withaction: "offer", or the control on the repository's App settings. The repository must be readable by the admin and its default branch must declare an app (forge.json, checked as the settings toggle checks it). Offering again rewords it. - Withdraw:
DELETE /api/v1/forge-templates/:id(owner~nameorowner%2Fname),action: "withdraw", or the Withdraw button. - Where it shows:
GET /api/v1/forges/templates(source: "repo", idowner/name) and the New forge picker, under the admin's title and sentence, to whoever can read the repository. A repository made private or deleted drops out; a spawn naming it, or a withdrawn one, is a 422. - Birth: the new forge copies the repository's files at its default-branch tip and records
{id, repo, tip}inparent.json(spawn/template_record.ts).
Whether a repository is offered is its template flag (repo.is_template); forge_template only holds the admin's words, so the list, the picker and a spawn read one truth.
Offering sets the flag only when it was off, and remembers that it did (forge_template.flagged); withdrawing clears it only then, so a flag the repository's owner set stays. This is separate from the New app list (app_template, Settings → App templates), which an offer never touches. In the terminal, the App templates screen takes o (offer: repository, title, sentence) and w (withdraw).
The web control is src/web/pages/forge-template-setting.ts; its terminal side is src/tui/screens/app_templates.ts.