@basein/runner 0.2.7 → 0.2.10

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.
Files changed (45) hide show
  1. package/README.md +64 -21
  2. package/dist/auth/client.d.ts +40 -1
  3. package/dist/auth/client.js +77 -9
  4. package/dist/bin/bir-hooks.d.ts +18 -3
  5. package/dist/bin/bir-hooks.js +124 -38
  6. package/dist/bin/bir.d.ts +2 -0
  7. package/dist/bin/bir.js +362 -39
  8. package/dist/bin/investigate.js +5 -1
  9. package/dist/bin/setup.d.ts +72 -0
  10. package/dist/bin/setup.js +286 -0
  11. package/dist/config/adapters/claude-code.d.ts +90 -4
  12. package/dist/config/adapters/claude-code.js +164 -16
  13. package/dist/config/generate.d.ts +93 -1
  14. package/dist/config/generate.js +90 -3
  15. package/dist/control/client.d.ts +5 -0
  16. package/dist/control/client.js +8 -0
  17. package/dist/control/daemon.d.ts +116 -0
  18. package/dist/control/daemon.js +339 -0
  19. package/dist/control/discovery.d.ts +26 -0
  20. package/dist/control/discovery.js +41 -9
  21. package/dist/control/ensure-hook.d.ts +39 -0
  22. package/dist/control/ensure-hook.js +98 -0
  23. package/dist/control/paths.d.ts +14 -0
  24. package/dist/control/paths.js +20 -0
  25. package/dist/control/server.d.ts +28 -0
  26. package/dist/control/server.js +22 -6
  27. package/dist/proxy/session.d.ts +8 -1
  28. package/dist/proxy/session.js +28 -6
  29. package/dist/replay/controller.d.ts +24 -1
  30. package/dist/replay/controller.js +76 -20
  31. package/dist/replay/handover.js +5 -0
  32. package/dist/replay/plan.d.ts +2 -0
  33. package/dist/replay/plan.js +53 -6
  34. package/dist/replay/pricing.d.ts +1 -1
  35. package/dist/replay/pricing.js +12 -4
  36. package/dist/replay/tool-error.d.ts +15 -0
  37. package/dist/replay/tool-error.js +17 -0
  38. package/dist/replay/types.d.ts +48 -1
  39. package/docs/calculatedReplayGuide.md +157 -68
  40. package/docs/installRun.md +457 -111
  41. package/docs/loginWeb.md +1 -1
  42. package/docs/quickstart.md +193 -158
  43. package/package.json +2 -1
  44. package/scripts/install.ps1 +669 -0
  45. package/scripts/install.sh +586 -0
package/docs/loginWeb.md CHANGED
@@ -395,7 +395,7 @@ with a TTY and no session no longer prompts; it logs
395
395
 
396
396
  ### 5.4 Installer scripts
397
397
 
398
- `scripts/install-runner.sh:144-145` and `install-runner.ps1:153-154` call
398
+ `scripts/install.sh (via `bir setup`)` and `install.ps1 (via `bir setup`)` call
399
399
  `bir login` in the foreground and need **no code change** — the device flow
400
400
  prints its link and code on whatever terminal the script has, and works over
401
401
  SSH because the link can be opened anywhere. What changes is the prose around
@@ -1,234 +1,269 @@
1
1
  # Setting up a runner machine
2
2
 
3
- This guide takes one computer from nothing to recording. It assumes no prior
4
- knowledge of the project. It should take about ten minutes, most of which is
5
- waiting for downloads.
3
+ One person, one computer: from nothing to a project whose every Claude Code
4
+ session is recorded and whose calculated scenarios run. It takes a few minutes,
5
+ most of them downloads. Nothing has to stay open afterwards.
6
6
 
7
- **What you are setting up.** BaseInstRunner sits quietly between your AI coding
8
- assistant and the tools it uses, watches what happens, and saves each session to
9
- the BaseIn service so it can be reviewed or re-run later. It does not change what
10
- the assistant does.
7
+ **What you are setting up.** BaseInstRunner sits between Claude Code and the
8
+ tools it uses, records each session to the BaseIn service, and — when a new
9
+ prompt means the same thing as one it has seen — runs the calculated scenario
10
+ instead of letting the model rediscover the plan. Otherwise it does not change
11
+ what the model does.
11
12
 
12
13
  ---
13
14
 
14
15
  ## Before you start
15
16
 
16
- Three things:
17
-
18
- 1. **Node 20 or newer.** Check by opening a terminal and typing `node -v`. If you
19
- see something like `v20.11.0` or higher, you are fine. If you see an error or
20
- a smaller number, install it from [nodejs.org](https://nodejs.org) first.
21
- 2. **The BaseIn service address** — a URL like `https://basein.example.com`.
22
- Whoever runs the service gives you this.
23
- 3. **Your BaseIn email and password.** You will type these once.
17
+ A BaseIn account. That is all: Node and Claude Code are installed for you if the
18
+ machine has neither. On Windows use PowerShell or cmd, whichever your terminal
19
+ is; the console shows a line for each.
24
20
 
25
21
  ---
26
22
 
27
- ## Step 1 — run one command
28
-
29
- Open a terminal **in the folder where you unpacked this project's `scripts`
30
- folder**, and run the line for your machine. Replace the two placeholder values
31
- with your real service address and your real project folder.
23
+ ## Step 1 — paste the line
32
24
 
33
- ### Windows
25
+ Sign in to the console and open **Set up the runner**. The first thing on the
26
+ page is one line with a one-time setup token filled in (valid for ten minutes,
27
+ usable once). Open a terminal **in the project folder you start Claude Code in**
28
+ and paste it:
34
29
 
35
30
  ```powershell
36
- .\scripts\install-runner.ps1 C:\path\to\your\project -AuthUrl https://basein.example.com
31
+ $env:BIR_SETUP_TOKEN="<token>"; irm https://api.bi2202.com/install.ps1 | iex
37
32
  ```
38
33
 
39
- ### macOS
34
+ ```cmd
35
+ powershell -NoProfile -Command "$env:BIR_SETUP_TOKEN='<token>'; irm https://api.bi2202.com/install.ps1 | iex"
36
+ ```
40
37
 
41
38
  ```bash
42
- BIR_AUTH_URL=https://basein.example.com ./scripts/install-runner.sh ~/path/to/your/project
39
+ curl -fsSL https://api.bi2202.com/install.sh | BIR_SETUP_TOKEN="<token>" sh
43
40
  ```
44
41
 
45
- > **"Running scripts is disabled on this system"** (Windows only) — Windows blocks
46
- > unsigned scripts by default. Allow them for your own account with:
47
- > `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`, then run the command
48
- > again.
49
-
50
- ---
51
-
52
- ## Step 2 — watch what it does
53
-
54
- The script narrates each stage. A healthy run looks like this:
42
+ Without a token — it expired, or you are not at the console — the same line
43
+ without the `BIR_SETUP_TOKEN` part works: `bir setup` uses the sign-in already
44
+ cached on this computer if there is one, and otherwise opens your browser to
45
+ approve the sign-in and waits. Over SSH it prints the link and a short code
46
+ instead; they work from any device, a phone included.
47
+
48
+ The script prints a `==>` line per stage and never asks a question. Before it
49
+ downloads anything it checks that this is not your home folder or a drive root;
50
+ if it is, it stops and asks you to `cd` to the project and paste again. Then:
51
+
52
+ 1. **Node.** A Node 20+ on PATH is used when npm sits beside it and nothing
53
+ can move it: a Node from nvm, fnm, Volta, asdf, mise or nodenv changes path
54
+ per shell or per version, and so does one from Homebrew or snap (macOS and
55
+ Linux) or Scoop (Windows) — a `brew upgrade` moves the path the hook pins.
56
+ Any of those, or no Node at all, and a private copy goes under
57
+ `~/.baseinstrunner/node/v<version>/`. It is never put on your PATH.
58
+ 2. **The runner.** `@basein/runner` is installed under `~/.baseinstrunner/npm/`,
59
+ with `bir` and `bir-hooks` launchers in `~/.baseinstrunner/bin/`, which goes
60
+ first on your user PATH. No execution-policy change on Windows.
61
+ 3. **Claude Code.** Installed with its official installer if `claude` is not on
62
+ PATH. This can take a minute.
63
+ 4. **`bir setup`**, which prints:
55
64
 
56
65
  ```
57
- ==> Checking Node
58
- node v20.11.0
59
- ==> Installing the runner
60
- @basein/runner@0.1.0 from the registry
61
- bir 0.1.0 -- all four binaries on PATH
62
- ==> Configuring the BaseIn service
63
- BIR_AUTH_URL=https://basein.example.com (persisted for this user)
64
- ==> Signing in
65
-
66
- [bir] Sign in to https://basein.example.com
67
-
68
- Open https://basein.example.com/activate?code=BKQM-TXZR
69
- Code BKQM-TXZR
70
-
71
- Opening your browser...
72
- Waiting for approval... (Ctrl-C to cancel)
73
-
74
- Signed in to https://basein.example.com as you@example.com.
75
- ==> Wrapping MCP servers in C:\path\to\your\project
76
- + chrome-devtools -> bir-proxy (project scope, upstream: npx)
77
- + hooks -> ...\.claude\settings.json
66
+ ==> Setting up the runner (0.2.9)
67
+ service https://api.bi2202.com
68
+ account you@example.com
69
+ ==> Wiring the project
70
+ + chrome-devtools → bir-proxy (project scope, upstream: npx)
71
+ + bir → bir-scenario (calculated replay; project scope)
72
+ + hooks → C:\work\repo\.claude\settings.local.json (control server on http://127.0.0.1:53411; the recorder starts itself with each session)
73
+ + .claude/settings.local.json is listed in C:\work\repo\.git\info\exclude
78
74
 
79
75
  Wrapped 1 server.
76
+ …
77
+ ==> Starting the recorder in the background
78
+
79
+ Done. Recording and replay are on for C:\work\repo
80
+ account you@example.com (https://api.bi2202.com)
81
+ wrapped chrome-devtools
82
+ replay on — direct execution allowed for: all wrapped (narrow it with `bir replay allow chrome-devtools`)
83
+ recorder started in the background (pid 1234) — it starts itself with every Claude Code session
84
+ log C:\Users\you\.baseinstrunner\logs\3f9c1a2b7d4e5f60.log
85
+
86
+ Now: claude
87
+ first time in this folder: say Yes to "trust this folder"
88
+ just installed Claude Code? it asks you to sign in to Claude (it needs a Claude subscription)
89
+ give it a task that takes 4+ tool calls — it appears at https://bi2202.com/recordings within a minute of finishing
90
+ Any time: bir doctor bir investigate bir down (stop) bir uninstall (undo)
80
91
  ```
81
92
 
82
- **Signing in happens in your browser, not the terminal.** The script prints a
83
- link and a short code, then waits. Open the link, check that the code matches
84
- and that it says it will sign you in as you, and press **Approve**. There is no
85
- password to type here, which is also why this works for an account that only
86
- ever signs in with Google.
87
-
88
- The link works from any device — a phone is fine — so this is also the answer on
89
- a machine with no browser. Add `--no-browser` to stop it trying to open one.
90
-
91
- If anything goes wrong the script stops immediately and says why — it checks
92
- everything it can *before* changing your machine, so a failed run leaves nothing
93
- half-installed.
93
+ Line by line: *service* is the API address, now stored so no terminal needs
94
+ `BIR_AUTH_URL`; *account* is who the recordings belong to; *wrapped* is the
95
+ project's MCP servers, each now routed through `bir-proxy` under its old name;
96
+ *replay* says which of them a calculated scenario may call unattended — narrow
97
+ it with `bir replay allow <names>`, turn it off with `bir replay off`, and read
98
+ [calculatedReplayGuide.md §5.1](calculatedReplayGuide.md) before leaving it wide
99
+ anywhere that matters; *recorder* is the background process, and *log* is where
100
+ its audit lines go.
101
+
102
+ A project with no MCP servers in any scope — none in `.mcp.json`, and none for
103
+ this project or your user in `~/.claude.json` — shows `wrapped (no MCP servers
104
+ here)` and `replay steer mode only`: built-in tools and prompts are still
105
+ recorded, and a scenario still steers the session, but there is nothing to
106
+ execute directly.
107
+
108
+ Pasted in the home folder anyway? The script stops before it downloads anything
109
+ — `This is your home folder. Open a terminal in the project you start Claude
110
+ Code in (cd there) and paste the line again.` Nothing was installed, nobody was
111
+ signed in and the token is unused, so `cd` to the project and paste the same
112
+ line. It is `bir setup` run by hand in the home folder, with the runner already
113
+ installed, that keeps the sign-in and prints the two commands left:
114
+ `cd <your project>` and `bir setup`. No token is needed then; the sign-in is
115
+ kept on this computer.
116
+
117
+ On macOS and Linux the script cannot change the terminal it was pasted into, so
118
+ it ends with a line to paste — `export PATH="$HOME/.baseinstrunner/bin:$PATH"` —
119
+ or open a new terminal. On Windows it ends with `bir works in every new terminal
120
+ (and in this window when it is PowerShell)`: the PowerShell line puts `bir` on
121
+ that window's PATH in place, but the cmd line runs the script in a child
122
+ `powershell.exe`, so a cmd window has to be a new one.
94
123
 
95
124
  ---
96
125
 
97
- ## Step 3 — start recording
98
-
99
- Two terminals, in the project folder you gave the script.
100
-
101
- **First terminal** — leave this one running the whole time:
102
-
103
- ```
104
- bir-hooks
105
- ```
126
+ ## Step 2 — start Claude Code
106
127
 
107
- **Second terminal** — your normal work:
128
+ In the same folder:
108
129
 
109
130
  ```
110
131
  claude
111
132
  ```
112
133
 
113
- That is it. Everything you do in the second terminal is now recorded.
134
+ The first time in a folder Claude Code asks whether to trust it: say Yes, or the
135
+ hooks do not run. If the script just installed Claude Code, it asks you to sign
136
+ in to Claude; that is Claude's own subscription, separate from BaseIn.
114
137
 
115
- When you are finished for the day, press `Ctrl+C` in the first terminal.
138
+ Then give it a task that takes four or more tool calls. It appears on the
139
+ console's Recordings page within a minute of finishing.
116
140
 
117
- ---
141
+ Nothing else to start. The SessionStart hook (`bir-hooks ensure`) starts the
142
+ recorder in the background whenever this folder has none, so a session started
143
+ tomorrow, or after a reboot, records the same way.
118
144
 
119
- ## Step 4 — check it actually worked
145
+ ---
120
146
 
121
- With `bir-hooks` running, in another terminal:
147
+ ## Step 3 — check it
122
148
 
123
149
  ```
124
- bir doctor
150
+ bir doctor # is it working right now? exits non-zero if not
151
+ bir status # what is installed for this folder; needs nothing running
125
152
  ```
126
153
 
127
- This is the one command worth remembering. It does not read a settings file and
128
- tell you what *should* happen — it asks the running system what is *actually*
129
- happening, and it fails loudly when something is wrong.
130
-
131
- To see what is set up without needing anything running:
154
+ `bir doctor` asks the running recorder rather than reading a settings file: it
155
+ says which service it records to, that the recorder runs in the background
156
+ (with its pid and log file), and what replay is set to and where that setting
157
+ came from. `bir status` prints the service address, the wrapped servers and the
158
+ control server's address and log.
132
159
 
133
- ```
134
- bir status
135
- ```
160
+ Then open https://bi2202.com/recordings. The run from Step 2 is there, with
161
+ its prompt, its tool calls and its final answer.
136
162
 
137
163
  ---
138
164
 
139
- ## When something is wrong
165
+ ## What it changed on your machine
140
166
 
141
- ### "It says nothing is recorded"
167
+ | Path | What it holds |
168
+ |---|---|
169
+ | `~/.baseinstrunner/config.json` | the service address; `BIR_AUTH_URL` in the environment overrides it, and `bir setup` warns when the two differ |
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 |
172
+ | `~/.baseinstrunner/logs/<key>.log` | the recorder's audit log, one file per project |
173
+ | `~/.baseinstrunner/node/` | a private Node, only if the machine had no usable one; not on PATH |
174
+ | `~/.baseinstrunner/npm/` | the runner package |
175
+ | `~/.baseinstrunner/bin/` | the `bir` and `bir-hooks` launchers, first on your user PATH |
176
+ | `<project>/.claude/settings.local.json` | Claude Code's hooks for this project and the pre-approved `bir` scenario server. Yours, not the team's: it carries this project's token and an absolute Node path |
177
+ | `<project>/.mcp.json` (or `~/.claude.json`, whichever scope an entry lives in) | each MCP entry rewritten to run through `bir-proxy`, same keys; plus the `bir` scenario entry, which always goes in `.mcp.json` (project scope), never in `~/.claude.json` |
178
+ | `<project>/.git/info/exclude` | one line, `.claude/settings.local.json`, so it never shows in `git status` |
142
179
 
143
- `bir status` will show `BaseIn: (BIR_AUTH_URL not set — nothing is recorded)`.
144
- The service address did not stick. Close the terminal, open a new one, and check
145
- `echo $env:BIR_AUTH_URL` (Windows) or `echo $BIR_AUTH_URL` (macOS). If it is
146
- empty, run the install script again with the `-AuthUrl` / `BIR_AUTH_URL` value.
180
+ Each project gets its own control port (from 53411 up) and its own token, so one
181
+ project's settings file cannot reach another project's recorder.
147
182
 
148
- ### "The browser never opened"
149
-
150
- Not a problem: the link and the code are printed either way, and the link works
151
- from any device. Open it on your phone and approve there. `bir login` skips
152
- opening a browser on purpose over SSH, and `--no-browser` skips it always.
153
-
154
- ### "The code expired before I approved it"
155
-
156
- Codes last ten minutes. Run `bir login` again for a fresh one.
157
-
158
- ### "bir login says … is not a BaseIn service" (or `HTTP 405 Method Not Allowed`)
159
-
160
- `BIR_AUTH_URL` points at a website — the docs or app address — instead of the
161
- API. It must be the service address, normally `https://api.<your-domain>`. Fix
162
- the value, then **open a fresh terminal**: an existing one keeps the value it
163
- started with, even after the install script or a settings change updates it.
164
- `bir doctor` prints what the current terminal has on its `BaseIn (shell)` line.
165
-
166
- ### "bir is not recognised as a command"
183
+ ---
167
184
 
168
- The install worked but your terminal has not noticed yet. **Close the terminal
169
- and open a new one.** This fixes it almost every time.
185
+ ## Another project
170
186
 
171
- ### "It records the tools but not what I typed"
187
+ ```
188
+ cd the-other-project
189
+ bir setup
190
+ ```
172
191
 
173
- `bir-hooks` is not running, or it is running in a different folder. It has to be
174
- started **in the same folder** as your session — that is how the two find each
175
- other. Stop it, `cd` to the project folder, and start it again.
192
+ No token: the sign-in is kept. The project gets its own port, token and log.
176
193
 
177
- ### "invalid JSON at ...\.mcp.json"
194
+ ---
178
195
 
179
- Something has edited that file into a shape that is no longer valid JSON —
180
- usually a missing comma or a stray bracket. Open it and check. (A file saved by
181
- Notepad is fine; that case is handled.)
196
+ ## Updating
182
197
 
183
- ### Anything else
198
+ Paste the line from the console again — the very same line is fine, used token
199
+ and all: `bir setup` says `the setup token was already used; keeping the sign-in
200
+ from before (you@example.com)` and goes on. It installs the newest version and
201
+ runs `bir setup`, which re-wraps any entry whose runner moved. If you installed
202
+ by hand with `npm i -g @basein/runner`, upgrade the same way and then run
203
+ `bir setup` in each project.
184
204
 
185
- Run `bir doctor` and keep the output. It says which part of the chain is broken,
186
- which is most of the way to an answer.
205
+ A recorder of the older version is replaced only at the moments that look for
206
+ one — the SessionStart hook, `bir up`, `bir setup` — and only when no session
207
+ is mid-run right then; nothing watches for a session to end. `bir setup` says
208
+ so when one is open (`recorder 0.2.8 is still serving an open Claude Code
209
+ session; it restarts to 0.2.9 with the next session`). `bir up --restart` does
210
+ it now.
187
211
 
188
212
  ---
189
213
 
190
- ## Updating to a newer version
191
-
192
- Run the same install script again with the new version number:
214
+ ## Undoing
193
215
 
194
- ```powershell
195
- .\scripts\install-runner.ps1 C:\path\to\your\project -Version 0.2.0 -AuthUrl https://basein.example.com
196
216
  ```
197
-
198
- ```bash
199
- BIR_VERSION=0.2.0 BIR_AUTH_URL=https://basein.example.com ./scripts/install-runner.sh ~/path/to/your/project
217
+ bir down # stop this project's recorder
218
+ bir uninstall # put every file back byte-for-byte; remove hooks and the bir entry
200
219
  ```
201
220
 
202
- It is safe to re-run: it will not ask you to sign in again, and it will not
203
- double-wrap anything.
221
+ `bir uninstall` also forgets the project's port and token and takes the
222
+ `.claude/settings.local.json` line back out of `.git/info/exclude`.
223
+ Byte-for-byte holds for a file nothing else edited since the install; one you
224
+ edited is repaired entry by entry instead, and it says so. A file the install
225
+ created — usually `.claude/settings.local.json` — stays behind, empty of our
226
+ entries.
204
227
 
205
- **One thing you must do by hand: stop `bir-hooks` and start it again.** A running
206
- process keeps using the old version until it is restarted. If you forget, the
207
- next session logs a `version.skew` warning telling you exactly that.
228
+ To remove the software: `bir logout` first, so the session is revoked on the
229
+ service rather than only forgotten here. Then `npm rm -g @basein/runner` if
230
+ you installed by hand, or delete `~/.baseinstrunner` (the runner, its private
231
+ Node, the launchers, the session and the logs) and remove
232
+ `~/.baseinstrunner/bin` from your PATH.
208
233
 
209
234
  ---
210
235
 
211
- ## Undoing it
212
-
213
- In the project folder:
214
-
215
- ```
216
- bir uninstall
217
- ```
218
-
219
- This puts every file it touched back exactly as it found it, byte for byte.
220
-
221
- To remove the software entirely as well:
236
+ ## When something is wrong
222
237
 
223
- ```
224
- npm rm -g @basein/runner
225
- ```
238
+ `bir doctor` first. It names the broken link in the chain, which is most of the
239
+ answer. Then:
240
+
241
+ | You see | Why | Do |
242
+ |---|---|---|
243
+ | `This is your home folder…` from the script | a terminal opened from the Start menu begins in the home folder; the script stopped before downloading anything, so nothing is installed, nobody is signed in and the token is unused | `cd` to the project and paste the same line again |
244
+ | `Signed in as … This is your home folder, so nothing was wired here` from `bir setup` | the same folder, but `bir setup` run by hand with the runner already installed; the sign-in is kept | `cd` to the project and run `bir setup` — no token needed |
245
+ | `… is not a BaseIn service` | the address is the website (docs or app), not the API; or a stale `BIR_AUTH_URL` in a shell profile — `bir setup` warns when the two disagree | `bir setup --auth-url https://api.bi2202.com`; remove the variable from the profile |
246
+ | `control.port_busy` in the log (`port N is held by another program or excluded by the system`); the recorder did not start | another program holds this project's port, or the system reserves the range it falls in — on Windows, Hyper-V and WSL exclude blocks that 53411 sits inside | `bir setup --port <n>` (by hand: `bir install --replay --port <n>` — a flag-less install keeps the way the project was installed — then `bir up --restart`) |
247
+ | `recorder.disabled … no BaseIn session` in the log; `bir doctor` says the recorder has nowhere to send steps; or `bir setup` ends with ``not signed in — run `bir setup` again (or `bir login`)`` | not signed in, or signed in to another service | `bir setup`, then `bir up --restart` |
248
+ | `that is not a valid setup token`, or `this setup token has expired or was already used` from `bir setup` | the token was cut short in the paste; or it is older than ten minutes or already redeemed, with no cached sign-in to fall back on | make a new one on the console's *Set up the runner* page and paste the whole line within ten minutes |
249
+ | the tools were recorded but not the prompt | no recorder was running for this folder, so the proxies recorded on their own (Tier 2) | `bir doctor` says whether a recorder runs for this folder; `bir up` starts one now — the next session starts it anyway |
250
+ | the run is not in Recordings | fewer than four tool calls; or the runner is signed in as a different account than the console | give a bigger task; compare the *account* line of `bir setup` with the console |
251
+ | `bir doctor`: `the SessionStart hook … points at a Node that is gone` | the Node the hook names was removed or moved by a version manager | `bir setup` — it rewires the hook to the current Node |
252
+ | Claude Code asks you to sign in | Claude Code was just installed; it needs a Claude subscription | sign in; nothing to do on the runner side |
253
+ | `bir` is not recognised in the terminal the line was pasted into | on macOS and Linux the script cannot change that terminal's PATH; on Windows the cmd line runs the script in a child `powershell.exe`, whose PATH dies with it (the PowerShell line changes its own window) | macOS / Linux: `export PATH="$HOME/.baseinstrunner/bin:$PATH"`, or open a new terminal; Windows cmd: open a new window |
254
+ | `invalid JSON at …/.mcp.json` | something edited the file into a shape that no longer parses | open it and fix the comma or bracket |
255
+
256
+ For a turn that did not do what you expected — a scenario that did not run, a
257
+ saving that was not made — `bir investigate` reads the journal and the service
258
+ and says why.
226
259
 
227
260
  ---
228
261
 
229
262
  ## Where to go next
230
263
 
231
- - [installRun.md](installRun.md) — the fleet version of this: packaging, release
232
- process, offline installs, keeping `bir-hooks` alive across reboots.
264
+ - [installRun.md](installRun.md) — the fleet version: packaging, releases,
265
+ offline installs, updates.
266
+ - [calculatedReplayGuide.md](calculatedReplayGuide.md) — record, calculate,
267
+ check, enable, and read the audit lines.
233
268
  - [../README.md](../README.md) — what is recorded, what cannot be, and every
234
269
  configuration switch.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basein/runner",
3
- "version": "0.2.7",
3
+ "version": "0.2.10",
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",
@@ -27,6 +27,7 @@
27
27
  "!dist/**/*.map",
28
28
  "README.md",
29
29
  "LICENSE",
30
+ "scripts",
30
31
  "docs",
31
32
  "!docs/next.md"
32
33
  ],