Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/cli/guides/sandbox-rendezvous.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
{/* 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 -->
{/* sync-templates:end */}

(`modal` and `daytona` are catalog placeholders — AIP-36 day-1 provider ids
with no published package yet.)
Expand Down
13 changes: 11 additions & 2 deletions scripts/sync-templates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,17 @@ const PACKAGE_DESCRIPTION =

// --- Compute the plan ---

const MARKER_START_RE = /^[ \t]*(?:<!--|\/\*) sync-templates:start (?:-->|\*\/)[ \t]*\n/m
const MARKER_END_RE = /\n[ \t]*(?:<!--|\/\*) sync-templates:end (?:-->|\*\/)/
// 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]*(?:<!--|\{\/\*|\/\*) sync-templates:start (?:-->|\*\/\}|\*\/)[ \t]*\n/m
const MARKER_END_RE =
/\n[ \t]*(?:<!--|\{\/\*|\/\*) sync-templates:end (?:-->|\*\/\}|\*\/)/

const plans = []
function planFile(filePath, nextContent) {
Expand Down
4 changes: 3 additions & 1 deletion scripts/sync-templates.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ function makeFixture() {
path.join(root, "packages/sandbox-e2b/README.md"),
"# pkg\n\n<!-- sync-templates:start -->\nstale\n<!-- sync-templates:end -->\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<!-- sync-templates:start -->\nstale\n<!-- sync-templates:end -->\n",
"# guide\n\n{/* sync-templates:start */}\nstale\n{/* sync-templates:end */}\n",
)
writeFileSync(
path.join(root, "packages/runtime/src/sandbox-providers/registry.ts"),
Expand Down
Loading