#codemode-gateway
41 files tagged codemode-gateway.
Wrangler
{ // codemode-gateway — persistent execute gateway over DynamicWorkerExecutor. // Binding shape mirrors examples/cod…
Deploy
{"url":"https://codemode-gateway.ceo-a53.workers.dev","versionId":"0790f352-ace5-4d1a-8c61-9e5d54d05630","deployedAt":"2…
Tsconfig
{ "compilerOptions": { "target": "es2022", "module": "es2022", "moduleResolution": "bundler", "lib": […
Package
{"name":"codemode-gateway","version":"1.4.0","private":true,"type":"module","engines":{"bun":"1.3.14"},"scripts":{"dev":…
Agents
# codemode-gateway — agent notes Persistent Cloudflare Worker: LLM-written code in, isolated sandbox execution out. The…
Claude
# codemode-gateway Read `AGENTS.md` in this directory — it is the source of truth for working here. Codebase index: `CO…
Codeatlas
# CODEATLAS.md — queryable codebase index for this repo This repo is indexed by **code-atlas** (deterministic tree-sitt…
0001 Scrape Store
-- 0001_scrape_store.sql — B6 D1 persistence layer for codemode-gateway. -- Creates the single `scrape_pages` table back…
6Ab1672Bd0B99C04A4B3891Ef39Bb50E612C5236E171Dcbd473728439A6D9Ef5
7� -� wb��������e�b_�, wb������i��>�b�SQLite format 3 @ …
Metadata
SQLite format 3 @ .~X …
6Ab1672Bd0B99C04A4B3891Ef39Bb50E612C5236E171Dcbd473728439A6D9Ef5
�- ���{���wb������dЪ����*�- ���{���wb������dЪ����* ������������ …
6Ab1672Bd0B99C04A4B3891Ef39Bb50E612C5236E171Dcbd473728439A6D9Ef5
SQLite format 3 @ .~X …
Metadata
�- �X���ᙪ�,�'_k��� ^n�Vv�- �X���ᙪ�,�'_k��� ^n�Vv ������������ …
Metadata
7� -� �,�'_k���/�K�r� �,�'_k����O�*a�SQLite format 3 @ …
Metadata
SQLite format 3 @ .~X …
Metadata
�- p1>(��[�hޒzt��+��- p1>(��[�hޒzt��+� ������������ …
Metadata
7� -� [�hޒzp�n�C�{ [�hޒz���\�9�SQLite format 3 @ …
Deploy B3
#!/usr/bin/env bash # B3 deploy sequence for codemode-gateway (snippet store + codemode.run). # Authorized reversible ve…
Deploy Info 2026 07 11
#!/usr/bin/env bash # Focused deploy for the GET / info-endpoint addition (codemode-gateway). # # This is the B6 deploy …
Deploy B6
#!/usr/bin/env bash # B6 deploy sequence for codemode-gateway (D1 persistence layer: db + scrape). # Authorized reversib…
Deploy B2
#!/usr/bin/env bash # B2 deploy sequence for codemode-gateway. # Authorized reversible versioned Worker update (per disp…
Verify B2
#!/usr/bin/env bash # B2 live self-verification for codemode-gateway. Never prints the token. set -euo pipefail set -a; …
Scrape And Store
async () => { const md = await browser.markdown({ url: "https://example.com" }); const summary = await ai.generate({…
Index
import { DynamicWorkerExecutor } from "@cloudflare/codemode"; import type { Env, ErrorResponse, ExecuteRequest, …
Parse
/** * Parse-don't-validate helpers for tool argument parsing. * * Each helper throws a plain `Error` with a `"<tool>:…
Registry
import { DynamicWorkerExecutor, type ResolvedProvider } from "@cloudflare/codemode"; import type { Env, ToolDef, T…
Client
import type { CfEnvelope, CfError, Env } from "../types"; import { CloudflareApiError } from "../types"; /** * Host-si…
Tools
import type { CfEnvelope, CfError, D1Database, Env, KvNamespace } from "../types"; import { CloudflareApiError } from ".…
Snippet
/** * Snippet store types. A snippet is a saved, named sandbox script — the * gateway's "procedural memory". Stored as…
Index
/** * Barrel export for gateway-local types. */ export type { Env } from "./env"; export type { ExecuteRequest, Ex…
Env
/** * Worker environment bindings for codemode-gateway. * * `LOADER` is the `worker_loaders` binding used by `Dynamic…
Cf
/** * Cloudflare REST API client types and the typed error surfaced to sandbox * code when the API returns `success:fa…
Execute
/** * HTTP request/response contracts for `POST /execute`. * * These are the gateway's own wire types and are intenti…
Registry
import type { Env } from "./env"; /** * Tool registry types. The registry (`src/registry.ts`) is the single source * …
Store
import { normalizeCode } from "@cloudflare/codemode"; import type { Env, Snippet, SnippetSummary } from "../types"; /**…
Browser
import type { Env } from "../types"; /** * Browser namespace tools — powered by Browser Rendering quick actions. * *…
Artifacts
import type { Env } from "../types"; /** * Artifacts namespace tools — R2 bucket for binary artifacts. * * Provides …
Scrape
import type { Env } from "../types"; /** * `scrape` namespace tools — convenience persistence over the bound D1 * dat…
Db
import type { Env } from "../types"; /** * `db` namespace tools — generic SQL over the bound D1 database `env.DB`. * …
Util
/** * Implementations for the `util` namespace: `util.echo(x)`, `util.now()`, * `util.rand()`. Contains only trivial, …
Ai
import type { Env } from "../types"; /** * AI namespace tools — powered by Workers AI binding. * * Uses `env.AI.run(…