@bolt-foundry/gambit 0.6.7 → 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 CHANGED
@@ -5,113 +5,4 @@ since = "225456917f75e92cc095af525201373c4be37944"
5
5
 
6
6
  # Changelog
7
7
 
8
- ## Unreleased (v0.6.3)
9
-
10
- - TBD
11
-
12
- ## v0.6.2
13
-
14
- ### Release and packaging
15
-
16
- - Bump gambit + gambit-core to 0.6.2.
17
-
18
- ## v0.6.1
19
-
20
- ### Release and packaging
21
-
22
- - Bump gambit + gambit-core to 0.6.1.
23
-
24
- ## v0.6.0
25
-
26
- ### Release and packaging
27
-
28
- - Add an npm CLI wrapper that downloads prebuilt Gambit binaries with checksum
29
- verification.
30
- - Normalize release binary asset names and checksum generation for predictable
31
- npm downloads.
32
- - Fix the npm build to resolve gambit-core in the gambitmono layout and derive
33
- import-map targets from the detected path.
34
- - Add `@deno/dnt` to the Gambit package and refresh release/npm docs.
35
-
36
- ## v0.5.5
37
-
38
- ### Release and packaging
39
-
40
- - Publish a minimal `@bolt-foundry/gambit` npm package alongside gambit-core
41
- (runtime-only; no CLI/bin yet).
42
- - Document DNT/npm status and release notes for the npm publish flow.
43
-
44
- ## v0.5.0
45
-
46
- ### Runtime and API
47
-
48
- - Synthetic tools refreshed: `gambit_init`, `gambit_respond`, `gambit_complete`
49
- (function-style tools, underscore names).
50
- - Envelope simplification: init carries run/action IDs plus guardrails/model
51
- hints; respond wraps payload/message/status/code/meta (default status 200 for
52
- success, 500 for handled errors unless overridden).
53
- - Runtime behavior: child completions and handled errors emit `gambit_complete`;
54
- interval handlers surface mid-run updates; roots stay conversational-only.
55
- - `gambit_init` only fires when `--init` is provided and its payload is the raw
56
- input (no run/action metadata).
57
- - Added trace timestamps for latency metrics and persisted streamed assistant
58
- text before tool calls.
59
- - Added OpenAI chat completions compatibility (`renderDeck` plus wrapper).
60
- - Increased default guardrail `maxPasses`.
61
-
62
- ### Simulator UI and test bot
63
-
64
- - New React simulator UI with sessions, recents, nested trace hierarchy, and
65
- session notes/ratings.
66
- - Pivoted the simulator to debug/test/calibrate workflows with a new editor
67
- assistant endpoint and UI tab.
68
- - Test bot upgrades: per-run streaming + debug link, init/scenario panels,
69
- default scenario schema, deck input config, feedback on all bubbles, and
70
- session routing/persistence.
71
- - Calibration/grading updates: deck-defined grading flows, streamed results,
72
- reference samples, compact context previews, and renaming calibration runs to
73
- grading runs.
74
-
75
- ### Decks and examples (voice front desk)
76
-
77
- - Added voice front desk example decks and modularized the deck set.
78
- - Added new patient intake + additional voice front desk test decks.
79
- - Added appointment lookup orchestration and scheduling confirmation flow.
80
- - Enabled scheduling service deck and shared patient identity test input schema.
81
- - Replaced voice front desk graders and expanded FAQ persona/grading coverage.
82
-
83
- ### CLI and UX
84
-
85
- - Added a grading command with test-bot hooks in the CLI.
86
- - `--message` now works without `--init` for object root schemas.
87
- - REPL/serve/CLI flags refreshed; `--verbose` logs tool call args/results.
88
-
89
- ### Fixes
90
-
91
- - Avoid extra assistant turn on test-bot resume; skip empty assistant turns in
92
- grading; keep grader respond blocks last.
93
- - Fixed test-bot sidebar loading, grader score reads, and booking confirmation
94
- placement.
95
- - Simulator UI polish: full-height layout, sourcemap adverts, locked init panel
96
- behavior, and reconnect/permalink reloads.
97
-
98
- ## v0.0
99
-
100
- - Authoring: TypeScript/Markdown decks and cards via `defineDeck`/`defineCard`;
101
- embeds with cycle detection; card actions merge into decks (deck wins); card
102
- schema fragments merge into deck schemas; non-root decks require input/output
103
- schemas (root defaults to string-ish).
104
- - Runtime: compute and LLM decks share the surface; assistant-first flow seeds a
105
- synthetic `gambit_init` tool; helpers `spawnAndWait`, `return`, `fail`; action
106
- names validated against reserved prefix/pattern/length; default guardrails
107
- depth=3/passes=3/timeout≈120s with per-deck overrides.
108
- - Handlers/events: optional `onError`/`onBusy`/`onIdle` decks emit structured
109
- events (`gambit_complete` for handled errors, busy/idle updates) with default
110
- delay 800ms and traces for fire/result (`onInterval` is deprecated alias for
111
- `onBusy`).
112
- - IO/host: CLI supports `run`, `repl`, `serve` (WebSocket simulator UI); flags
113
- for streaming, turn order via user message, trace to console/JSONL, state
114
- load/save, model overrides; `deno task compile` builds a binary; OpenRouter
115
- chat provider with streaming/tool calls.
116
- - Runtime + server tests for schemas/embeds/streaming/handlers; tasks for
117
- 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: Deno 2.2+ and `OPENROUTER_API_KEY` (set `OPENROUTER_BASE_URL` if\
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 from JSR (no install):
13
+ Run the CLI directly with npx (no install):
13
14
 
14
15
  ```
15
16
  export OPENROUTER_API_KEY=...
16
- deno run -A jsr:@bolt-foundry/gambit/cli init
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
- deno run -A jsr:@bolt-foundry/gambit/cli repl examples/init/hello.deck.md
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
- deno run -A jsr:@bolt-foundry/gambit/cli serve examples/init/hello.deck.md
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
- Install the CLI:
69
+ Run with npx (no install):
69
70
 
70
71
  ```
71
- deno install -A -n gambit jsr:@bolt-foundry/gambit/cli
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
- Install the CLI:
115
+ Run with npx (no install):
115
116
 
116
117
  ```
117
- deno install -A -n gambit jsr:@bolt-foundry/gambit/cli
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
- deno run -A src/cli.ts run ./hello_world.deck.md --init '"Gambit"' --stream
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
- deno run -A src/cli.ts run ./echo.deck.ts --init '{"text":"ping"}'
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
+ ```