@bolt-foundry/gambit 0.6.8 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -40
- package/README.md +53 -23
- package/esm/gambit/simulator-ui/dist/bundle.js +1010 -333
- package/esm/gambit/simulator-ui/dist/bundle.js.map +3 -3
- package/esm/src/server.d.ts.map +1 -1
- package/esm/src/server.js +119 -0
- package/package.json +2 -2
- package/script/gambit/simulator-ui/dist/bundle.js +1010 -333
- package/script/gambit/simulator-ui/dist/bundle.js.map +3 -3
- package/script/src/server.d.ts.map +1 -1
- package/script/src/server.js +119 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,43 +5,4 @@ since = "225456917f75e92cc095af525201373c4be37944"
|
|
|
5
5
|
|
|
6
6
|
# Changelog
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
- Repl fixes.
|
|
11
|
-
- Replaced voice front desk graders and expanded FAQ persona/grading coverage.
|
|
12
|
-
|
|
13
|
-
### CLI and UX
|
|
14
|
-
|
|
15
|
-
- Added a grading command with test-bot hooks in the CLI.
|
|
16
|
-
- `--message` now works without `--init` for object root schemas.
|
|
17
|
-
- REPL/serve/CLI flags refreshed; `--verbose` logs tool call args/results.
|
|
18
|
-
|
|
19
|
-
### Fixes
|
|
20
|
-
|
|
21
|
-
- Avoid extra assistant turn on test-bot resume; skip empty assistant turns in
|
|
22
|
-
grading; keep grader respond blocks last.
|
|
23
|
-
- Fixed test-bot sidebar loading, grader score reads, and booking confirmation
|
|
24
|
-
placement.
|
|
25
|
-
- Simulator UI polish: full-height layout, sourcemap adverts, locked init panel
|
|
26
|
-
behavior, and reconnect/permalink reloads.
|
|
27
|
-
|
|
28
|
-
## v0.0
|
|
29
|
-
|
|
30
|
-
- Authoring: TypeScript/Markdown decks and cards via `defineDeck`/`defineCard`;
|
|
31
|
-
embeds with cycle detection; card actions merge into decks (deck wins); card
|
|
32
|
-
schema fragments merge into deck schemas; non-root decks require input/output
|
|
33
|
-
schemas (root defaults to string-ish).
|
|
34
|
-
- Runtime: compute and LLM decks share the surface; assistant-first flow seeds a
|
|
35
|
-
synthetic `gambit_init` tool; helpers `spawnAndWait`, `return`, `fail`; action
|
|
36
|
-
names validated against reserved prefix/pattern/length; default guardrails
|
|
37
|
-
depth=3/passes=3/timeout≈120s with per-deck overrides.
|
|
38
|
-
- Handlers/events: optional `onError`/`onBusy`/`onIdle` decks emit structured
|
|
39
|
-
events (`gambit_complete` for handled errors, busy/idle updates) with default
|
|
40
|
-
delay 800ms and traces for fire/result (`onInterval` is deprecated alias for
|
|
41
|
-
`onBusy`).
|
|
42
|
-
- IO/host: CLI supports `run`, `repl`, `serve` (WebSocket simulator UI); flags
|
|
43
|
-
for streaming, turn order via user message, trace to console/JSONL, state
|
|
44
|
-
load/save, model overrides; `deno task compile` builds a binary; OpenRouter
|
|
45
|
-
chat provider with streaming/tool calls.
|
|
46
|
-
- Runtime + server tests for schemas/embeds/streaming/handlers; tasks for
|
|
47
|
-
fmt/lint/test/ci; root README with quick start.
|
|
8
|
+
## 0.7.0 — Show HN launch
|
package/README.md
CHANGED
|
@@ -6,14 +6,15 @@ debug with a built-in UI.
|
|
|
6
6
|
|
|
7
7
|
## Quickstart
|
|
8
8
|
|
|
9
|
-
Requirements:
|
|
9
|
+
Requirements: Node.js 18+ and `OPENROUTER_API_KEY` (set `OPENROUTER_BASE_URL`
|
|
10
|
+
if\
|
|
10
11
|
you proxy OpenRouter-style APIs).
|
|
11
12
|
|
|
12
|
-
Run the CLI directly
|
|
13
|
+
Run the CLI directly with npx (no install):
|
|
13
14
|
|
|
14
15
|
```
|
|
15
16
|
export OPENROUTER_API_KEY=...
|
|
16
|
-
|
|
17
|
+
npx @bolt-foundry/gambit init
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
Downloads example files and sets environment variables.
|
|
@@ -21,7 +22,7 @@ Downloads example files and sets environment variables.
|
|
|
21
22
|
Run an example in the terminal (`repl`):
|
|
22
23
|
|
|
23
24
|
```
|
|
24
|
-
|
|
25
|
+
npx @bolt-foundry/gambit repl gambit/hello.deck.md
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
This example just says "hello" and repeats your message back to you.
|
|
@@ -29,7 +30,7 @@ This example just says "hello" and repeats your message back to you.
|
|
|
29
30
|
Run an example in the browser (`serve`):
|
|
30
31
|
|
|
31
32
|
```
|
|
32
|
-
|
|
33
|
+
npx @bolt-foundry/gambit serve gambit/hello.deck.md
|
|
33
34
|
open http://localhost:8000/debug
|
|
34
35
|
```
|
|
35
36
|
|
|
@@ -65,40 +66,40 @@ open http://localhost:8000/debug
|
|
|
65
66
|
|
|
66
67
|
Use the CLI to run decks locally, stream output, and capture traces/state.
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
Run with npx (no install):
|
|
69
70
|
|
|
70
71
|
```
|
|
71
|
-
|
|
72
|
+
npx @bolt-foundry/gambit <command>
|
|
72
73
|
```
|
|
73
74
|
|
|
74
75
|
Run a deck once:
|
|
75
76
|
|
|
76
77
|
```
|
|
77
|
-
gambit run <deck> --init <json|string> --message <json|string>
|
|
78
|
+
npx @bolt-foundry/gambit run <deck> --init <json|string> --message <json|string>
|
|
78
79
|
```
|
|
79
80
|
|
|
80
81
|
Drop into a REPL (streams by default):
|
|
81
82
|
|
|
82
83
|
```
|
|
83
|
-
gambit repl <deck>
|
|
84
|
+
npx @bolt-foundry/gambit repl <deck>
|
|
84
85
|
```
|
|
85
86
|
|
|
86
87
|
Run a persona against a root deck (test bot):
|
|
87
88
|
|
|
88
89
|
```
|
|
89
|
-
gambit test-bot <root-deck> --test-deck <persona-deck>
|
|
90
|
+
npx @bolt-foundry/gambit test-bot <root-deck> --test-deck <persona-deck>
|
|
90
91
|
```
|
|
91
92
|
|
|
92
93
|
Grade a saved session:
|
|
93
94
|
|
|
94
95
|
```
|
|
95
|
-
gambit grade <grader-deck> --state <file>
|
|
96
|
+
npx @bolt-foundry/gambit grade <grader-deck> --state <file>
|
|
96
97
|
```
|
|
97
98
|
|
|
98
99
|
Start the Debug UI server:
|
|
99
100
|
|
|
100
101
|
```
|
|
101
|
-
gambit serve <deck> --port 8000
|
|
102
|
+
npx @bolt-foundry/gambit serve <deck> --port 8000
|
|
102
103
|
```
|
|
103
104
|
|
|
104
105
|
Tracing and state:
|
|
@@ -111,16 +112,16 @@ Tracing and state:
|
|
|
111
112
|
|
|
112
113
|
The simulator is the local Debug UI that streams runs and renders traces.
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
Run with npx (no install):
|
|
115
116
|
|
|
116
117
|
```
|
|
117
|
-
|
|
118
|
+
npx @bolt-foundry/gambit <command>
|
|
118
119
|
```
|
|
119
120
|
|
|
120
121
|
Start it:
|
|
121
122
|
|
|
122
123
|
```
|
|
123
|
-
gambit serve <deck> --port 8000
|
|
124
|
+
npx @bolt-foundry/gambit serve <deck> --port 8000
|
|
124
125
|
```
|
|
125
126
|
|
|
126
127
|
Then open:
|
|
@@ -159,7 +160,7 @@ Define `inputSchema`/`outputSchema` with Zod to validate IO, and implement\
|
|
|
159
160
|
|
|
160
161
|
## Author your first deck
|
|
161
162
|
|
|
162
|
-
### Minimal Markdown deck (model-powered):
|
|
163
|
+
### Minimal Markdown deck (model-powered): `hello_world.deck.md`
|
|
163
164
|
|
|
164
165
|
```
|
|
165
166
|
+++
|
|
@@ -176,12 +177,12 @@ You are a concise assistant. Greet the user and echo the input.
|
|
|
176
177
|
Run it:
|
|
177
178
|
|
|
178
179
|
```
|
|
179
|
-
|
|
180
|
+
npx @bolt-foundry/gambit run ./hello_world.deck.md --init '"Gambit"' --stream
|
|
180
181
|
```
|
|
181
182
|
|
|
182
|
-
### Compute deck in TypeScript (no model call):
|
|
183
|
+
### Compute deck in TypeScript (no model call): `echo.deck.ts`
|
|
183
184
|
|
|
184
|
-
```
|
|
185
|
+
```typescript
|
|
185
186
|
// echo.deck.ts
|
|
186
187
|
import { defineDeck } from "jsr:@bolt-foundry/gambit";
|
|
187
188
|
import { z } from "zod";
|
|
@@ -199,10 +200,10 @@ export default defineDeck({
|
|
|
199
200
|
Run it:
|
|
200
201
|
|
|
201
202
|
```
|
|
202
|
-
|
|
203
|
+
npx @bolt-foundry/gambit run ./echo.deck.ts --init '{"text":"ping"}'
|
|
203
204
|
```
|
|
204
205
|
|
|
205
|
-
### Deck with a child action (calls a TypeScript tool):
|
|
206
|
+
### Deck with a child action (calls a TypeScript tool): `agent_with_time.deck.md`
|
|
206
207
|
|
|
207
208
|
```
|
|
208
209
|
+++
|
|
@@ -217,9 +218,9 @@ description = "Return the current ISO timestamp."
|
|
|
217
218
|
A tiny agent that calls get_time, then replies with the timestamp and the input.
|
|
218
219
|
```
|
|
219
220
|
|
|
220
|
-
And the child action:
|
|
221
|
+
And the child action: `get_time.deck.ts`
|
|
221
222
|
|
|
222
|
-
```
|
|
223
|
+
```typescript
|
|
223
224
|
// get_time.deck.ts
|
|
224
225
|
import { defineDeck } from "jsr:@bolt-foundry/gambit";
|
|
225
226
|
import { z } from "zod";
|
|
@@ -233,3 +234,32 @@ export default defineDeck({
|
|
|
233
234
|
},
|
|
234
235
|
});
|
|
235
236
|
```
|
|
237
|
+
|
|
238
|
+
Run it:
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
npx @bolt-foundry/gambit run ./agent_with_time.deck.md --init '"hello"' --stream
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Deno
|
|
245
|
+
|
|
246
|
+
If you prefer Deno, use the Deno commands below.
|
|
247
|
+
|
|
248
|
+
Quickstart:
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
export OPENROUTER_API_KEY=...
|
|
252
|
+
deno run -A jsr:@bolt-foundry/gambit/cli init
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Run a deck:
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
deno run -A jsr:@bolt-foundry/gambit/cli run <deck> --init <json|string> --message <json|string>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Start the Debug UI:
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
deno run -A jsr:@bolt-foundry/gambit/cli serve <deck> --port 8000
|
|
265
|
+
```
|