@@ -22,15 +22,14 @@ npx @bolt-foundry/gambit demo
2222Downloads example files (hello decks plus the ` examples/ ` gallery) and sets
2323environment variables.
2424
25- To scaffold a starter project that you can customize , run:
25+ To start onboarding with the simulator , run:
2626
2727```
28- npx @bolt-foundry/gambit init my-project
28+ npx @bolt-foundry/gambit serve gambit/hello.deck.md
29+ open http://localhost:8000/debug
2930```
3031
31- This creates a structured skeleton (` decks/ ` , ` actions/ ` , ` graders/ ` , ` tests/ ` ,
32- ` schemas/ ` , ` .gambit/ ` ) with README guides so you can start authoring your own
33- workflows immediately.
32+ Use the Build tab to draft your own workspace decks and scenarios.
3433
3534Run an example in the terminal (` repl ` ):
3635
@@ -100,10 +99,10 @@ Drop into a REPL (streams by default):
10099npx @bolt-foundry/gambit repl <deck>
101100```
102101
103- Run a persona against a root deck (test bot ):
102+ Run a persona against a root deck (scenario ):
104103
105104```
106- npx @bolt-foundry/gambit test-bot <root-deck> --test-deck <persona-deck>
105+ npx @bolt-foundry/gambit scenario <root-deck> --test-deck <persona-deck>
107106```
108107
109108Grade a saved session:
@@ -124,6 +123,23 @@ Tracing and state:
124123` --verbose ` to print events\
125124` --state <file> ` to persist a session.
126125
126+ ### Worker sandbox defaults
127+
128+ - Deck-executing CLI surfaces default to worker sandbox execution.
129+ - Use ` --no-worker-sandbox ` (or ` --legacy-exec ` ) to force legacy in-process
130+ execution.
131+ - ` --worker-sandbox ` explicitly forces worker execution on.
132+ - ` --sandbox ` / ` --no-sandbox ` are deprecated aliases.
133+ - ` gambit.toml ` equivalent:
134+ ``` toml
135+ [execution ]
136+ worker_sandbox = false # same as --no-worker-sandbox
137+ # legacy_exec = true # equivalent rollback toggle
138+ ```
139+
140+ The npm launcher (` npx @bolt-foundry/gambit ... ` ) runs the Gambit CLI binary for
141+ your platform, so these defaults and flags apply there as well.
142+
127143## Using the Simulator
128144
129145The simulator is the local Debug UI that streams runs and renders traces.
@@ -173,6 +189,59 @@ Define `contextSchema`/`responseSchema` with Zod to validate IO, and implement\
173189` ctx.spawnAndWait({ path, input }) ` . Emit structured trace events with\
174190` ctx.log(...) ` .
175191
192+ ### Runtime defaults for programmatic ` runDeck `
193+
194+ ` runDeck ` from ` @bolt-foundry/gambit ` now uses CLI-equivalent provider/model
195+ defaults (alias expansion, provider routing, fallback behavior).
196+
197+ Before (direct-provider setup in each caller):
198+
199+ ``` ts
200+ import { createOpenRouterProvider , runDeck } from " jsr:@bolt-foundry/gambit" ;
201+
202+ const provider = createOpenRouterProvider ({
203+ apiKey: Deno .env .get (" OPENROUTER_API_KEY" )! ,
204+ });
205+ await runDeck ({
206+ path: " ./root.deck.md" ,
207+ input: { message: " hi" },
208+ modelProvider: provider ,
209+ });
210+ ```
211+
212+ After (defaulted wrapper):
213+
214+ ``` ts
215+ import { runDeck } from " jsr:@bolt-foundry/gambit" ;
216+
217+ await runDeck ({
218+ path: " ./root.deck.md" ,
219+ input: { message: " hi" },
220+ });
221+ ```
222+
223+ Per-runtime override (shared runtime object):
224+
225+ ``` ts
226+ import { createDefaultedRuntime , runDeck } from " jsr:@bolt-foundry/gambit" ;
227+
228+ const runtime = await createDefaultedRuntime ({
229+ fallbackProvider: " codex-cli" ,
230+ });
231+
232+ await runDeck ({
233+ runtime ,
234+ path: " ./root.deck.md" ,
235+ input: { message: " hi" },
236+ });
237+ ```
238+
239+ Replacement mapping:
240+
241+ - Legacy direct core passthrough export: ` runDeck ` -> ` runDeckCore `
242+ - Defaulted wrapper export: ` runDeck `
243+ - Runtime builder: ` createDefaultedRuntime `
244+
176245---
177246
178247## Author your first deck
@@ -271,8 +340,8 @@ npx @bolt-foundry/gambit serve ./examples/respond_flow/decks/root.deck.ts --port
271340Then:
272341
2733421 . Open ` http://localhost:8000/test ` , pick the ** Escalation persona** , and run
274- it. Leave the “Use test deck input for init” toggle on to see persona data
275- seed the init form automatically.
343+ it. Leave the “Use scenario deck input for init” toggle on to see persona
344+ data seed the init form automatically.
2763452 . Switch to the Debug tab to inspect the session—the child deck emits a
277346 ` gambit_respond ` payload that now shows up as a structured assistant turn.
2783473 . Head to the Calibrate tab and run the ** Respond payload grader** to exercise
@@ -289,12 +358,6 @@ export OPENROUTER_API_KEY=...
289358deno run -A jsr:@bolt-foundry/gambit/cli demo
290359```
291360
292- Starter project:
293-
294- ```
295- deno run -A jsr:@bolt-foundry/gambit/cli init my-project
296- ```
297-
298361Run a deck:
299362
300363```
0 commit comments