@basein/runner 0.2.11 → 0.2.12
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/README.md +33 -14
- package/dist/bin/bir-scenario.d.ts +11 -0
- package/dist/bin/bir-scenario.js +132 -34
- package/dist/bin/bir.d.ts +2 -2
- package/dist/bin/bir.js +11 -8
- package/dist/bin/investigate.js +1 -1
- package/dist/bin/scenario-edit.d.ts +36 -9
- package/dist/bin/scenario-edit.js +240 -61
- package/dist/control/server.js +18 -5
- package/dist/record/housekeeping.d.ts +71 -0
- package/dist/record/housekeeping.js +417 -0
- package/dist/replay/controller.d.ts +3 -1
- package/dist/replay/controller.js +17 -12
- package/docs/calculatedReplay.md +89 -29
- package/docs/calculatedReplayGuide.md +294 -86
- package/docs/quickstart.md +42 -2
- package/package.json +1 -1
package/docs/quickstart.md
CHANGED
|
@@ -168,7 +168,7 @@ its prompt, its tool calls and its final answer.
|
|
|
168
168
|
|---|---|
|
|
169
169
|
| `~/.baseinstrunner/config.json` | the service address; `BIR_AUTH_URL` in the environment overrides it, and `bir setup` warns when the two differ |
|
|
170
170
|
| `~/.baseinstrunner/credentials.json` | the cached session, bound to the service that issued it |
|
|
171
|
-
| `~/.baseinstrunner/installed.json` | the original text of every file it rewrote, and each project's port, token and replay switches |
|
|
171
|
+
| `~/.baseinstrunner/installed.json` | the original text of every file it rewrote, and each project's port, token and replay switches, and whether Claude's `bir` tools may change scenarios there (`bir scenario editing on`) |
|
|
172
172
|
| `~/.baseinstrunner/logs/<key>.log` | the recorder's audit log, one file per project |
|
|
173
173
|
| `~/.baseinstrunner/node/` | a private Node, only if the machine had no usable one; not on PATH |
|
|
174
174
|
| `~/.baseinstrunner/npm/` | the runner package |
|
|
@@ -256,9 +256,49 @@ answer. Then:
|
|
|
256
256
|
For a turn that did not do what you expected — a scenario that did not run, a
|
|
257
257
|
saving that was not made — `bir investigate` reads the journal and the service
|
|
258
258
|
and says why. When it names a step whose code is wrong, you can fix that step
|
|
259
|
-
yourself
|
|
259
|
+
yourself: see the next section.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Fixing a step (not yet released)
|
|
264
|
+
|
|
265
|
+
Built 2026-09-25. It needs the next `@basein/runner` version and a service
|
|
266
|
+
deploy, so it does not work yet. The full guide, with real output, is
|
|
260
267
|
[calculatedReplayGuide.md](calculatedReplayGuide.md) §9.2.
|
|
261
268
|
|
|
269
|
+
A calculated step is code. When `bir investigate` says a step's code is wrong,
|
|
270
|
+
you can change that step. The service checks your change against the
|
|
271
|
+
recording. It saves it only if it gives the same call the recording made, and
|
|
272
|
+
is not a pasted copy of that call. Only the owner of a scenario can change it.
|
|
273
|
+
|
|
274
|
+
1. **Read the step.** `bir scenario show scn_… --step 4` (the `scn_` id and the
|
|
275
|
+
step number are the ones `bir investigate` printed).
|
|
276
|
+
2. **Write the new code to a file,** for example `step4.js`. Never on the
|
|
277
|
+
command line: the shell breaks JavaScript.
|
|
278
|
+
3. **Check it.** `bir scenario check scn_… --step 4 --input-logic step4.js`.
|
|
279
|
+
Nothing is saved. You should see `input reproduces the recorded call`.
|
|
280
|
+
4. **Save it.** `bir scenario edit scn_… --step 4 --input-logic step4.js --note "why"`.
|
|
281
|
+
You should see a line that starts `Saved as sedit_…`.
|
|
282
|
+
5. **Changed your mind?** `bir scenario undo scn_…` takes back the newest
|
|
283
|
+
change. Run it again to go one further back. With `--step 4` it takes
|
|
284
|
+
back only step 4's changes, newest first. An undo that would break a later
|
|
285
|
+
step or the final answer is refused (`undo_refused`).
|
|
286
|
+
|
|
287
|
+
If the check refuses your change, it says why. For example, the `input` line
|
|
288
|
+
says where your call differs from the recorded one. Fix the code and check
|
|
289
|
+
again. `--force --note "why"` saves it anyway, but use it only when the
|
|
290
|
+
recording itself was wrong.
|
|
291
|
+
|
|
292
|
+
The saved code runs on your machine without asking you, like the code the
|
|
293
|
+
calculation wrote. The check only tests what it sends for the recording's
|
|
294
|
+
values. So read the code before it is saved, yours or Claude's.
|
|
295
|
+
|
|
296
|
+
Claude can do this for you. Ask it in the session; it runs the same commands,
|
|
297
|
+
and Claude Code asks you before each one, unless you allowed it. Or run
|
|
298
|
+
`bir scenario editing on` in the project folder and restart Claude Code: the
|
|
299
|
+
`bir` server then also offers tools that change a scenario. These `bir` calls
|
|
300
|
+
are never recorded as part of your task.
|
|
301
|
+
|
|
262
302
|
---
|
|
263
303
|
|
|
264
304
|
## Where to go next
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basein/runner",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "A recording MCP proxy: sits between any MCP client and its MCP servers, executes each call on the client's behalf, and records the run as a reusable BaseIn scenario.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|