Repository navigation
Conversation
…#427) Switches the devDependency from a pkg.pr.new tarball URL off a forge main commit to the versioned npm package @cloudflare/forge@0.2.0, published with provenance via Trusted Publishing. The forge-tools workflow now reads the version string from package.json directly and surfaces it in the PR body, and the scripts/generate-tools.ts header describes the dep as a published npm release. Cadence moves from 'every forge main commit' to 'every tagged forge release'. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
The d1_studio App now renders one card per call: the answer's rows in Studio's table look (sortable, paged, copyable), the agent's earlier steps, an editor that re-runs reads in the view (d1_raw) and hands writes to the chat (ui/message), a frame-filling layout, and a fullscreen console with the run history and the database's tables. Its states are explicit machines (app/machines.ts). Five TLA+ models of them (the next commit, .agents/skills/verify-d1-*/) found the following, fixed here: - A write already sent or unconfirmed is never sent to the chat again (⌘↵ now does what the primary button shows); Revert waits out a send. - The card runs reads and sends writes only where the host offers each. - The answer card's machine and the console's history live above the display switch, so runs, sends and history survive fullscreen. - A console read you leave keeps going and lands in history; schema picks run at once; re-reads show the newest rows (as Studio's tabs do). - Sort and page combine (as Studio's table explorer): the page asked for last, during a sort too, is the page shown. - A slow Copy all never overwrites a later copy; toasts and ✓ follow the order copies land. - mount.tsx: a late cancel or failed connect no longer hides a shown result, and Try again appears once the call's arguments are known. - classifyStatement checks every REPLACE, so a replace() function can't hide a later REPLACE INTO from the read-only check. - The "Use <column>" fix replaces whole identifiers only, never inside longer names, strings or comments. - Picked tables are always quoted; a query ending in `; -- comment` can be paged; join keywords are no longer taken for table aliases. - In Code Mode the server refuses the view's d1_raw unless it is one read (appToolCheck on defineMcpApp), so reads-only holds whatever the view sends; reads from the view time out after 35 s. - The console matches the dashboard's Studio more closely: 35 px rows, no grid lines past the last row, and the column header stays clickable while D1 sorts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five project skills, one per state machine of the D1 Studio MCP App, each a TLA+ model checked through /statechart plus a replay of its paths against the real code (bun test): - verify-d1-card-run-send: the answer card's run / send-to-chat hand-off. - verify-d1-result-paging: paging, D1 sort and held blocks against runs. - verify-d1-console: the fullscreen console's history and background reads. - verify-d1-copy: the copy toast, Copy all and the trios' ✓ marks. - verify-d1-tool-lifecycle: mountMcpApp's pending/result/retry lifecycle. Every rule holds at the sync commit 1a0a923 and each fails on a broken variant restoring the bug it guards. .claude/skills links to .agents/skills so Claude Code and other harnesses find the same skills. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The view's SQL, table and console text now render in Paper Mono, as the dashboard's D1 Studio does, instead of falling back to the system mono. Regular only, subset to Latin, Latin-1, Latin Extended-A and the symbols the view draws: 16 KB, inlined by the build (the App's CSP allows no font host), +22 KB on the App's HTML. Other glyphs fall back per character. Paper Mono is SIL OFL 1.1 (no Reserved Font Name), Copyright 2025 Lost Coast Labs, Inc. (Paper Design), based on Geist Mono, Copyright 2023 Vercel. The license ships beside the font (fonts/PaperMono-LICENSE.txt) and in the font's name table; source paper-design/paper-mono @ 74fc5537. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #421 (the shared MCP Apps foundation); retarget to
mainonce it merges.What
d1_studiois a read-only MCP App for D1. Each call renders one card:sliceSql). A query's own smallLIMITpages by writingOFFSETinto its SQL. Sorting a partial result asks D1 to sort the whole of it and keeps your page, as Studio's table explorer does.Reads re-run in the view through
d1_raw, with no model turn. Writes are never run by the view: they go to the chat as the user's message (ui/message), and the agent runs them withd1_queryonce the user agrees.Reads only, enforced twice
d1_studiotool: it runs only statementsclassifyStatementproves are one read, and refuses the whole call before sending anything otherwise, because D1's/rawhas no read-only mode. This round also fixes a bypass where areplace()call hid a laterREPLACE INTO.d1_rawcalls unless the body is onesqlread, never a write or abatch. This usesrawCallRefusalthrough a new optionalappToolCheckondefineMcpApp. Direct tools (?codemode=false) keepd1_rawas the model's own tool, unchanged.State machines, model-checked
The view's states are explicit reducers in
app/machines.ts. Five TLA+ models, checked with TLC, cover:Each model comes with a replay of its paths against the real code. Bugs they found and this PR fixes:
The models live in the second commit as project skills (
.agents/skills/verify-d1-*/, linked from.claude/skills). Every rule holds at1a0a9230, and each fails on a variant that restores the bug it guards. That commit can be split into its own PR if reviewers prefer.Commits
feat(d1-studio): the D1 Studio MCP App view: the App, the fixes above, tests, AGENTS.md.test(d1-studio): TLA+ verification skills: five skills with models and replays (about 70 small files, no product code).feat(d1-studio): bundle Paper Mono: the dashboard Studio's mono font. It's SIL OFL 1.1 and credited, with its license beside it. It is subset to 16 KB (adding 22 KB to the App's HTML) and falls back to the system mono.style(d1-studio): drops a repeated CSS rule.Verification
vitest run: 1,066 passed, 1 skipped, before commits 3–4. Those two are CSS and font only; after them the 80 D1 Studio tests pass.oxlintreports 0 errors, andnpm run app:checkis fresh.bun test ./.agents/skills).d1_rawread past the 200 rows held), and a D1 sort that kept rows 501–510 in the new order.Not covered / known
data:font); if not, it falls back to the system mono.READ_TIMEOUT_MS), just past D1's 30 s query limit.Screenshots
Local fixtures, fake data. To attach:
🤖 Generated with Claude Code