diff --git a/docs/cli/guides/sandbox-rendezvous.md b/docs/cli/guides/sandbox-rendezvous.md index 0e0c11aee8..f8002ead9e 100644 --- a/docs/cli/guides/sandbox-rendezvous.md +++ b/docs/cli/guides/sandbox-rendezvous.md @@ -22,11 +22,11 @@ Providers are resolved from a small built-in catalog by slug: | `box` | An ascii.dev [Box](https://ascii.dev) cloud computer, behind an always-on systemd unit. | `@agentproto/sandbox-box` | | `e2b` | An e2b Firecracker microVM (`agentproto-workstation` template). | `@agentproto/sandbox-e2b` | - +{/* sync-templates:start */} The `e2b` provider's default template is declared in `templates/workstation/versions.json`: `@agentproto/cli@0.17.0`, `@agentproto/adapter-hermes@0.4.10`, `@agentproto/adapter-mastra-agent@0.6.0`, `@agentproto/adapter-opencode@1.1.10`, `opencode-ai@1.18.28`. The on-boot CLI install is skipped only once the template's recorded `baked` block proves the image carries the requested pin. - +{/* sync-templates:end */} (`modal` and `daytona` are catalog placeholders — AIP-36 day-1 provider ids with no published package yet.) diff --git a/scripts/sync-templates.mjs b/scripts/sync-templates.mjs index 50fe760c2d..c784e9b2b9 100644 --- a/scripts/sync-templates.mjs +++ b/scripts/sync-templates.mjs @@ -377,8 +377,17 @@ const PACKAGE_DESCRIPTION = // --- Compute the plan --- -const MARKER_START_RE = /^[ \t]*(?:|\*\/)[ \t]*\n/m -const MARKER_END_RE = /\n[ \t]*(?:|\*\/)/ +// Three comment flavors, one marker vocabulary: +// HTML, for plain markdown (sandbox-e2b README) +// /* … */ JS block, for .ts sources +// {/* … */} MDX expression, for markdown that gets compiled as MDX +// docs/cli/ is mirrored into cli.agentproto.sh and compiled by +// fumadocs-mdx, and MDX rejects HTML comments outright — so files under +// docs/cli/ must use the `{/* … */}` flavor. +const MARKER_START_RE = + /^[ \t]*(?:|\*\/\}|\*\/)[ \t]*\n/m +const MARKER_END_RE = + /\n[ \t]*(?:|\*\/\}|\*\/)/ const plans = [] function planFile(filePath, nextContent) { diff --git a/scripts/sync-templates.test.mjs b/scripts/sync-templates.test.mjs index 030d9d9f34..0d2731efdb 100644 --- a/scripts/sync-templates.test.mjs +++ b/scripts/sync-templates.test.mjs @@ -41,9 +41,11 @@ function makeFixture() { path.join(root, "packages/sandbox-e2b/README.md"), "# pkg\n\n\nstale\n\n", ) + // MDX comment flavor on purpose — docs/cli/ is mirrored into + // cli.agentproto.sh and compiled by fumadocs-mdx, which rejects ``. writeFileSync( path.join(root, "docs/cli/guides/sandbox-rendezvous.md"), - "# guide\n\n\nstale\n\n", + "# guide\n\n{/* sync-templates:start */}\nstale\n{/* sync-templates:end */}\n", ) writeFileSync( path.join(root, "packages/runtime/src/sandbox-providers/registry.ts"),