Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| The artifacts service is services/artifacts, the Worker g1t-artifacts, bound as ARTIFACTS by the API, the site and the agents; its live rooms move to it with a Durable Object transfer from g1t-docs-service, and its database, bucket, indexes and queue keep their names. The git store's binding and settings are GITSTORE, its ops scripts gitstore-*, and workflow run artifacts keep their compatible API under run_artifacts modules. The deploy tool puts a Worker that has never deployed before the Workers in its stage that bind to it, and the deploy guide gives the cutover runbook. | 1 | /** |
| 2 | * The templates g1t ships for folios. Docs' page templates | |
| 3 | * (src/templates.ts) are the doc kind's, as they are; each later kind | |
| 4 | * adds its own here (slides in Phase 4, dashboards in 5b, designs in 6b). | |
| 5 | * A workspace's own are in `folio_templates`. Pure. | |
| 6 | */ | |
| 7 | import type { FolioKind, FolioTemplate } from "@g1t/contracts"; | |
| 8 | ||
| 9 | import { BUILTIN_TEMPLATES } from "../templates.ts"; | |
| 10 | ||
| 11 | /** Built-in ids are `builtin:<kind>:<slug>`; a doc's old `builtin:<slug>` is still found. */ | |
| 12 | export const BUILTIN_FOLIO_TEMPLATES: FolioTemplate[] = BUILTIN_TEMPLATES.map((t) => ({ | |
| 13 | id: `builtin:doc:${t.id.replace(/^builtin:/, "")}`, | |
| 14 | kind: "doc" as const, | |
| 15 | name: t.name, | |
| 16 | description: t.description, | |
| 17 | icon: t.icon, | |
| 18 | builtin: true, | |
| 19 | body: t.markdown, | |
| 20 | created_by: null, | |
| 21 | })); | |
| 22 | ||
| 23 | export function builtinFolioTemplate(id: string): FolioTemplate | null { | |
| 24 | const wanted = String(id ?? ""); | |
| 25 | return BUILTIN_FOLIO_TEMPLATES.find((t) => t.id === wanted || t.id === `builtin:doc:${wanted.replace(/^builtin:/, "")}`) ?? null; | |
| 26 | } | |
| 27 | ||
| 28 | export function builtinFolioTemplates(kind?: FolioKind | null): FolioTemplate[] { | |
| 29 | return kind ? BUILTIN_FOLIO_TEMPLATES.filter((t) => t.kind === kind) : BUILTIN_FOLIO_TEMPLATES; | |
| 30 | } |