@bolt-foundry/gambit 0.8.0 → 0.8.3
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 +82 -2
- package/README.md +31 -9
- package/esm/gambit/simulator-ui/dist/bundle.js +4744 -4360
- package/esm/gambit/simulator-ui/dist/bundle.js.map +4 -4
- package/esm/gambit/simulator-ui/dist/favicon.ico +0 -0
- package/esm/mod.d.ts +7 -3
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +5 -1
- package/esm/src/cli_utils.d.ts +3 -2
- package/esm/src/cli_utils.d.ts.map +1 -1
- package/esm/src/cli_utils.js +43 -27
- package/esm/src/openai_compat.d.ts +63 -0
- package/esm/src/openai_compat.d.ts.map +1 -0
- package/esm/src/openai_compat.js +277 -0
- package/esm/src/providers/google.d.ts +16 -0
- package/esm/src/providers/google.d.ts.map +1 -0
- package/esm/src/providers/google.js +352 -0
- package/esm/src/providers/ollama.d.ts +17 -0
- package/esm/src/providers/ollama.d.ts.map +1 -0
- package/esm/src/providers/ollama.js +509 -0
- package/esm/src/providers/openrouter.d.ts +14 -1
- package/esm/src/providers/openrouter.d.ts.map +1 -1
- package/esm/src/providers/openrouter.js +460 -463
- package/esm/src/server.d.ts +4 -0
- package/esm/src/server.d.ts.map +1 -1
- package/esm/src/server.js +623 -164
- package/esm/src/trace.d.ts.map +1 -1
- package/esm/src/trace.js +3 -6
- package/package.json +2 -2
- package/script/gambit/simulator-ui/dist/bundle.js +4744 -4360
- package/script/gambit/simulator-ui/dist/bundle.js.map +4 -4
- package/script/gambit/simulator-ui/dist/favicon.ico +0 -0
- package/script/mod.d.ts +7 -3
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +9 -3
- package/script/src/cli_utils.d.ts +3 -2
- package/script/src/cli_utils.d.ts.map +1 -1
- package/script/src/cli_utils.js +42 -26
- package/script/src/openai_compat.d.ts +63 -0
- package/script/src/openai_compat.d.ts.map +1 -0
- package/script/src/openai_compat.js +281 -0
- package/script/src/providers/google.d.ts +16 -0
- package/script/src/providers/google.d.ts.map +1 -0
- package/script/src/providers/google.js +359 -0
- package/script/src/providers/ollama.d.ts +17 -0
- package/script/src/providers/ollama.d.ts.map +1 -0
- package/script/src/providers/ollama.js +551 -0
- package/script/src/providers/openrouter.d.ts +14 -1
- package/script/src/providers/openrouter.d.ts.map +1 -1
- package/script/src/providers/openrouter.js +461 -463
- package/script/src/server.d.ts +4 -0
- package/script/src/server.d.ts.map +1 -1
- package/script/src/server.js +623 -164
- package/script/src/trace.d.ts.map +1 -1
- package/script/src/trace.js +3 -6
- package/esm/src/compat/openai.d.ts +0 -2
- package/esm/src/compat/openai.d.ts.map +0 -1
- package/esm/src/compat/openai.js +0 -1
- package/script/src/compat/openai.d.ts +0 -2
- package/script/src/compat/openai.d.ts.map +0 -1
- package/script/src/compat/openai.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,94 @@
|
|
|
1
1
|
+++
|
|
2
2
|
[release]
|
|
3
|
-
since = "
|
|
3
|
+
since = "849762245925cce325c04da1d604088370ec3723"
|
|
4
4
|
+++
|
|
5
5
|
|
|
6
6
|
# Changelog
|
|
7
7
|
|
|
8
|
-
## Unreleased (v0.8.
|
|
8
|
+
## Unreleased (v0.8.4)
|
|
9
9
|
|
|
10
10
|
- TBD
|
|
11
11
|
|
|
12
|
+
## v0.8.3
|
|
13
|
+
|
|
14
|
+
- fix(gambit): include CLI docs/reference files in binary builds
|
|
15
|
+
- chore(infra): run the Gambit compile check during `bft gambit:release`
|
|
16
|
+
|
|
17
|
+
## v0.8.2
|
|
18
|
+
|
|
19
|
+
- chore(gambit): release 0.8.1
|
|
20
|
+
- revert(gambit): back out Open Responses runtime
|
|
21
|
+
- fix(gambit): resolve gambit-core include paths
|
|
22
|
+
- docs(gambit): add ABOUT files and move public posts
|
|
23
|
+
- docs(gambit): split external docs and align readmes
|
|
24
|
+
- docs(gambit): add ABOUT/README pairs for doc hubs
|
|
25
|
+
- Phase 0: rename deck schema terms
|
|
26
|
+
- feat(gambit-core): add Open Responses v1 types
|
|
27
|
+
- feat(gambit): add OpenRouter responses adapter and flag
|
|
28
|
+
- test(gambit): add OpenRouter provider conformance coverage
|
|
29
|
+
- docs(gambit): document responses flag and Phase 2 progress
|
|
30
|
+
- test(gambit): fix lint in OpenRouter provider tests
|
|
31
|
+
- fix(gambit): preserve response parts and validate tool schemas
|
|
32
|
+
- feat(gambit): add responses mode for runtime/state
|
|
33
|
+
- fix(gambit): preserve optional tool args in responses schemas
|
|
34
|
+
- fix(gambit): avoid coercing non-type tool schemas
|
|
35
|
+
- fix(gambit): only normalize object tool schemas
|
|
36
|
+
- test(gambit): add responses CLI smoke coverage
|
|
37
|
+
- docs(gambit): expand phase 4 checklist
|
|
38
|
+
- docs(gambit): note phase 4 test-bot validation
|
|
39
|
+
- docs(gambit): note 0.8.2 release plan
|
|
40
|
+
- docs(gambit): expand phase 5 checklist
|
|
41
|
+
- chore(gambit): set 0.8.2-dev version
|
|
42
|
+
- chore(gambit-core): align version to 0.8.2-dev
|
|
43
|
+
- fix(gambit): widen context tool name set types
|
|
44
|
+
- [gambit] update simpsons explainer example
|
|
45
|
+
- [gambit] extract Test Bot page and shared helpers
|
|
46
|
+
- [gambit] test bot page updates
|
|
47
|
+
- [gambit] refactor headers/nav, add Button component
|
|
48
|
+
- fix(gambit-core): treat empty responses output as empty string
|
|
49
|
+
- chore(gambit): align grader models and schemas
|
|
50
|
+
- docs(gambit): align openresponses migration status
|
|
51
|
+
- refactor(gambit): move chat compat out of core
|
|
52
|
+
- refactor(gambit): move chat compat out of core
|
|
53
|
+
- fix(simulator-ui): stabilize test bot nav handlers
|
|
54
|
+
- chore(simulator-ui): bundle favicon for distribution
|
|
55
|
+
- refactor(simulator-ui): extract calibrate page
|
|
56
|
+
- feat(simulator-ui): standardize simulator page layout
|
|
57
|
+
- docs(gambit): defer phase 5 and move migration tracker
|
|
58
|
+
- docs(docs): align docs structure and links
|
|
59
|
+
- docs(gambit): add internal project and post docs
|
|
60
|
+
- docs reorg
|
|
61
|
+
- feat(gambit): wire init chat flow and init-only tools
|
|
62
|
+
- feat(simulator-ui): add icon system and grader UI polish
|
|
63
|
+
- refactor(simulator-ui): rename calibrate route to grade
|
|
64
|
+
- refactor(simulator-ui): rename test bot labels to test
|
|
65
|
+
- refactor(simulator-ui): drop copy ref button
|
|
66
|
+
- refactor(simulator-ui): drop reference sample overlays
|
|
67
|
+
- refactor(simulator-ui): simplify raw input details
|
|
68
|
+
- refactor(simulator-ui): remove session metadata display
|
|
69
|
+
- docs(gambit): update simulator links for test/grade
|
|
70
|
+
- feat(simulator-ui): make run header toggleable with icon cue
|
|
71
|
+
- fix(simulator-ui): normalize color tokens
|
|
72
|
+
- chore(simulator-ui): add "+" to positive scores
|
|
73
|
+
- feat(simulator-ui): add status badge component
|
|
74
|
+
- feat(simulator-ui): refine calibrate summary cards
|
|
75
|
+
- feat(simulator-ui): refine tool call display
|
|
76
|
+
- fix(simulator-ui): format json consistently
|
|
77
|
+
- nits(simulator-ui): small tweaks
|
|
78
|
+
- docs(gambit): document Gambit-first strategy shift
|
|
79
|
+
- feat(gambit): add ollama provider routing
|
|
80
|
+
- feat(gambit): auto-pull missing ollama models
|
|
81
|
+
- feat(gambit): add model availability check
|
|
82
|
+
- infra: add obsidian bft command and fix gambit check mocks
|
|
83
|
+
- fix(gambit): include handler decks in model check
|
|
84
|
+
- feat(gambit): add gambit.toml model aliases
|
|
85
|
+
- feat(gambit): default responses mode with chat fallback
|
|
86
|
+
- fix(gambit): publish scaffolds for jsr demo/init commands
|
|
87
|
+
|
|
88
|
+
## v0.8.1
|
|
89
|
+
|
|
90
|
+
- fix(gambit): include gambit-core cards/schemas in compiled binary
|
|
91
|
+
|
|
12
92
|
## v0.8.0
|
|
13
93
|
|
|
14
94
|
- chore(gambit): prepare 0.8.0 changelog
|
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# <img src="./gambit_1color_bg.png" alt="Gambit logo" height="50" />
|
|
2
2
|
|
|
3
|
-
Gambit
|
|
3
|
+
Gambit is an open-source, developer-first framework that helps you build\
|
|
4
|
+
reliable LLM workflows by composing small, typed “decks”\
|
|
4
5
|
with clear inputs/outputs and guardrails. Run decks locally, stream traces, and\
|
|
5
6
|
debug with a built-in UI.
|
|
6
7
|
|
|
@@ -148,12 +149,13 @@ http://localhost:8000/
|
|
|
148
149
|
It also serves:
|
|
149
150
|
|
|
150
151
|
```
|
|
151
|
-
http://localhost:8000/test
|
|
152
|
-
http://localhost:8000/
|
|
152
|
+
http://localhost:8000/test
|
|
153
|
+
http://localhost:8000/grade
|
|
153
154
|
```
|
|
154
155
|
|
|
155
156
|
The Debug UI shows transcript lanes plus a trace/tools feed. If the deck has an\
|
|
156
|
-
`
|
|
157
|
+
`contextSchema`, the UI renders a schema-driven form with defaults and a raw
|
|
158
|
+
JSON\
|
|
157
159
|
tab. Local-first state is stored under `.gambit/` (sessions, traces, notes).
|
|
158
160
|
|
|
159
161
|
## Using the Library
|
|
@@ -166,7 +168,7 @@ Import the helpers from JSR:
|
|
|
166
168
|
import { defineDeck, defineCard } from "jsr:@bolt-foundry/gambit";
|
|
167
169
|
```
|
|
168
170
|
|
|
169
|
-
Define `
|
|
171
|
+
Define `contextSchema`/`responseSchema` with Zod to validate IO, and implement\
|
|
170
172
|
`run`/`execute` for compute decks. To call a child deck from code, use\
|
|
171
173
|
`ctx.spawnAndWait({ path, input })`. Emit structured trace events with\
|
|
172
174
|
`ctx.log(...)`.
|
|
@@ -204,8 +206,8 @@ import { z } from "zod";
|
|
|
204
206
|
|
|
205
207
|
export default defineDeck({
|
|
206
208
|
label: "echo",
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
contextSchema: z.object({ text: z.string() }),
|
|
210
|
+
responseSchema: z.object({ text: z.string(), length: z.number() }),
|
|
209
211
|
run(ctx) {
|
|
210
212
|
return { text: ctx.input.text, length: ctx.input.text.length };
|
|
211
213
|
},
|
|
@@ -242,8 +244,8 @@ import { z } from "zod";
|
|
|
242
244
|
|
|
243
245
|
export default defineDeck({
|
|
244
246
|
label: "get_time",
|
|
245
|
-
|
|
246
|
-
|
|
247
|
+
contextSchema: z.object({}), // no args
|
|
248
|
+
responseSchema: z.object({ iso: z.string() }),
|
|
247
249
|
run() {
|
|
248
250
|
return { iso: new Date().toISOString() };
|
|
249
251
|
},
|
|
@@ -256,6 +258,26 @@ Run it:
|
|
|
256
258
|
npx @bolt-foundry/gambit run ./agent_with_time.deck.md --context '"hello"' --stream
|
|
257
259
|
```
|
|
258
260
|
|
|
261
|
+
### Respond flow demo (non-root decks + grading)
|
|
262
|
+
|
|
263
|
+
Need a turnkey scenario that hits personas → init → non-root `gambit_respond`
|
|
264
|
+
payloads → graders? Use the example in `packages/gambit/examples/respond_flow/`.
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
cd packages/gambit
|
|
268
|
+
npx @bolt-foundry/gambit serve ./examples/respond_flow/decks/root.deck.ts --port 8000
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Then:
|
|
272
|
+
|
|
273
|
+
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.
|
|
276
|
+
2. Switch to the Debug tab to inspect the session—the child deck emits a
|
|
277
|
+
`gambit_respond` payload that now shows up as a structured assistant turn.
|
|
278
|
+
3. Head to the Calibrate tab and run the **Respond payload grader** to exercise
|
|
279
|
+
grading on the non-root respond output.
|
|
280
|
+
|
|
259
281
|
## Deno
|
|
260
282
|
|
|
261
283
|
If you prefer Deno, use the Deno commands below.
|