Skip to content

Commit 3cc42fa

Browse files
committed
sync(bfmono): fix(gambit): correct relative deck paths after core relocation (+19 more) (bfmono@80329ce92)
This PR is an automated gambitmono sync of bfmono Gambit packages. - Source: `packages/gambit/` - Core: `packages/gambit/packages/gambit-core/` - bfmono rev: 80329ce92 Changes: - b504cb290 fix(gambit): correct relative deck paths after core relocation - 5d9de8c94 fix(gambit): align verification artifacts after core relocation - f6036daeb refactor(gambit): move gambit-core under packages/gambit - 232e540c3 docs(gambit): migrate onboarding guidance to serve - 0ac740288 refactor(gambit): remove init-only runtime assets - 242793426 feat(gambit): remove init from CLI command surface - 4a3d18204 fix(gambit-ui): prevent build stop response from wiping chat transcript - 0efecdc13 feat(gambit): add serve --artifact restore workflow - 95a72fd53 chore(gambit-examples): rename root decks to PROMPT files - b9278cdb5 feat(simulator-ui): unify activity reasoning/tool bubble disclosure UI - af3d012d9 feat(simulator-ui): unify activity transcript and add tooltip badges - f02cc9691 feat(simulator-ui): refine workbench drawer toggle and navigation layout - e0af6e37d fix(gambit-simulator-ui): restore build chat composer focus after send - 56c910860 fix(gambit-simulator): dock activity indicator above composer input - 568d1cde6 test(gambit-simulator): cover build chat activity lifecycle - 367d07aad feat(gambit-simulator): add build chat activity indicator states - 1bed909b0 fix(gambit-ui): recover build chat state when stop request fails - 9a6249fcd feat(gambit-ui): show stop control in build chat composer - 18a987db4 feat(gambit-ui): wire build chat stop lifecycle in workspace context - 71bde9b2e feat(gambit-server): add dedicated build stop endpoint Do not edit this repo directly; make changes in bfmono and re-run the sync.
1 parent 5356ee6 commit 3cc42fa

208 files changed

Lines changed: 33644 additions & 6656 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ since = "849762245925cce325c04da1d604088370ec3723"
77

88
## Unreleased (v0.8.4)
99

10-
- TBD
10+
- feat(gambit): remove `gambit init`; onboarding now routes through
11+
`gambit serve`
12+
- feat(gambit): add `createDefaultedRuntime` and defaulted `runDeck` wrapper
13+
with CLI-equivalent provider/model routing for library callers
14+
- refactor(gambit): route CLI runtime/provider setup through shared
15+
`default_runtime` construction path
16+
- feat(demo-runner): migrate demo test-deck prompt generation to Gambit default
17+
runtime wrapper (no hardwired OpenRouter provider)
18+
- docs(gambit): add migration guidance for `runDeck` wrapper and `runDeckCore`
19+
replacement mapping
1120

1221
## v0.8.3
1322

README.md

Lines changed: 78 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ npx @bolt-foundry/gambit demo
2222
Downloads example files (hello decks plus the `examples/` gallery) and sets
2323
environment 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

3534
Run an example in the terminal (`repl`):
3635

@@ -100,10 +99,10 @@ Drop into a REPL (streams by default):
10099
npx @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

109108
Grade 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

129145
The 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
271340
Then:
272341

273342
1. 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.
276345
2. 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.
278347
3. Head to the Calibrate tab and run the **Respond payload grader** to exercise
@@ -289,12 +358,6 @@ export OPENROUTER_API_KEY=...
289358
deno 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-
298361
Run a deck:
299362

300363
```

deno.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"bundle:sim:sourcemap": "deno run -A scripts/bundle_simulator_ui.ts --sourcemap=external",
2626
"bundle:sim:web": "deno run -A scripts/bundle_simulator_ui.ts --platform=browser",
2727
"bundle:sim:web:sourcemap": "deno run -A scripts/bundle_simulator_ui.ts --platform=browser --sourcemap=external",
28-
"serve:bot": "mkdir -p /tmp/gambit-bot-root && GAMBIT_BOT_ROOT=/tmp/gambit-bot-root deno run -A src/cli.ts serve src/decks/gambit-bot/PROMPT.md --bundle --port 8000",
28+
"serve:bot": "mkdir -p /tmp/gambit-bot-root && GAMBIT_SIMULATOR_BUILD_BOT_ROOT=/tmp/gambit-bot-root GAMBIT_BOT_ROOT=/tmp/gambit-bot-root deno run -A src/cli.ts serve src/decks/gambit-bot/PROMPT.md --bundle --port 8000",
2929
"serve:bot:sandbox": "deno run -A scripts/serve_bot_sandbox.ts",
3030
"build_npm": "deno run -A scripts/build_npm.ts"
3131
},

0 commit comments

Comments
 (0)