ptbk 0.119.0-21 → 0.119.0-26

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 (223) hide show
  1. package/README.md +16 -9
  2. package/dist/browser/browser.d.ts +50 -36
  3. package/dist/browser/browser.js +162 -118
  4. package/dist/browser/browser.js.map +1 -1
  5. package/dist/browser/fleet.d.ts +59 -0
  6. package/dist/browser/fleet.js +148 -0
  7. package/dist/browser/fleet.js.map +1 -0
  8. package/dist/browser/recording.js +2 -2
  9. package/dist/browser/recording.js.map +1 -1
  10. package/dist/chats/conversation.d.ts +1 -1
  11. package/dist/chats/conversation.js +8 -6
  12. package/dist/chats/conversation.js.map +1 -1
  13. package/dist/chats/local.js +5 -5
  14. package/dist/chats/local.js.map +1 -1
  15. package/dist/cli/commands/add.js +1 -1
  16. package/dist/cli/commands/add.js.map +1 -1
  17. package/dist/cli/commands/boilerplates.js +1 -1
  18. package/dist/cli/commands/boilerplates.js.map +1 -1
  19. package/dist/cli/commands/find.js +1 -1
  20. package/dist/cli/commands/find.js.map +1 -1
  21. package/dist/cli/commands/fix.js +9 -4
  22. package/dist/cli/commands/fix.js.map +1 -1
  23. package/dist/cli/commands/init.d.ts +5 -0
  24. package/dist/cli/commands/init.js +279 -118
  25. package/dist/cli/commands/init.js.map +1 -1
  26. package/dist/cli/commands/migrate.js +1 -1
  27. package/dist/cli/commands/migrate.js.map +1 -1
  28. package/dist/cli/commands/ping.js +20 -12
  29. package/dist/cli/commands/ping.js.map +1 -1
  30. package/dist/cli/commands/plan.js +20 -12
  31. package/dist/cli/commands/plan.js.map +1 -1
  32. package/dist/cli/commands/recover.js +1 -1
  33. package/dist/cli/commands/recover.js.map +1 -1
  34. package/dist/cli/commands/restart.js +6 -5
  35. package/dist/cli/commands/restart.js.map +1 -1
  36. package/dist/cli/commands/run.js +26 -15
  37. package/dist/cli/commands/run.js.map +1 -1
  38. package/dist/cli/commands/start.js +11 -7
  39. package/dist/cli/commands/start.js.map +1 -1
  40. package/dist/cli/commands/tool.d.ts +19 -0
  41. package/dist/cli/commands/tool.js +320 -0
  42. package/dist/cli/commands/tool.js.map +1 -0
  43. package/dist/cli/commands/verify.js +1 -1
  44. package/dist/cli/commands/verify.js.map +1 -1
  45. package/dist/cli/common.d.ts +7 -1
  46. package/dist/cli/common.js +37 -20
  47. package/dist/cli/common.js.map +1 -1
  48. package/dist/cli/compatibility.d.ts +8 -0
  49. package/dist/cli/compatibility.js +32 -0
  50. package/dist/cli/compatibility.js.map +1 -0
  51. package/dist/cli/parser.js +7 -3
  52. package/dist/cli/parser.js.map +1 -1
  53. package/dist/cli/registry.js +182 -7
  54. package/dist/cli/registry.js.map +1 -1
  55. package/dist/cli/service-view.js +1 -1
  56. package/dist/cli/service-view.js.map +1 -1
  57. package/dist/cli/sources.js +2 -0
  58. package/dist/cli/sources.js.map +1 -1
  59. package/dist/cli/spec.js +8 -6
  60. package/dist/cli/spec.js.map +1 -1
  61. package/dist/common/naming.d.ts +53 -0
  62. package/dist/common/naming.js +90 -0
  63. package/dist/common/naming.js.map +1 -0
  64. package/dist/engine/agenda.d.ts +70 -9
  65. package/dist/engine/agenda.js +294 -61
  66. package/dist/engine/agenda.js.map +1 -1
  67. package/dist/engine/executor.d.ts +5 -0
  68. package/dist/engine/executor.js +24 -11
  69. package/dist/engine/executor.js.map +1 -1
  70. package/dist/engine/harnesses.d.ts +82 -18
  71. package/dist/engine/harnesses.js +191 -39
  72. package/dist/engine/harnesses.js.map +1 -1
  73. package/dist/engine/preview.js +2 -2
  74. package/dist/engine/preview.js.map +1 -1
  75. package/dist/engine/routing.d.ts +10 -0
  76. package/dist/engine/routing.js +67 -28
  77. package/dist/engine/routing.js.map +1 -1
  78. package/dist/engine/snapshot.d.ts +107 -7
  79. package/dist/engine/state.d.ts +4 -2
  80. package/dist/engine/state.js.map +1 -1
  81. package/dist/engine/sync.d.ts +96 -0
  82. package/dist/engine/sync.js +199 -0
  83. package/dist/engine/sync.js.map +1 -0
  84. package/dist/engine/team.d.ts +1 -0
  85. package/dist/engine/team.js +12 -8
  86. package/dist/engine/team.js.map +1 -1
  87. package/dist/expert/_main.md +96 -67
  88. package/dist/expert/agents/_index.md +10 -7
  89. package/dist/expert/agents/core-agents.md +4 -2
  90. package/dist/expert/agents/fixer.md +15 -12
  91. package/dist/expert/cli/acceptance.md +96 -78
  92. package/dist/expert/cli/api.md +26 -14
  93. package/dist/expert/cli/autonomous-operation.md +17 -19
  94. package/dist/expert/cli/browser.md +24 -24
  95. package/dist/expert/cli/checks.md +18 -10
  96. package/dist/expert/cli/cli.md +48 -41
  97. package/dist/expert/cli/configuration-migrations.md +43 -0
  98. package/dist/expert/cli/configuration.md +24 -14
  99. package/dist/expert/cli/controls.md +23 -11
  100. package/dist/expert/cli/dashboard-details.md +28 -10
  101. package/dist/expert/cli/dashboard-layout.md +15 -15
  102. package/dist/expert/cli/dashboard.md +8 -10
  103. package/dist/expert/cli/environment.md +33 -0
  104. package/dist/expert/cli/execution.md +10 -8
  105. package/dist/expert/cli/git-persistence.md +27 -21
  106. package/dist/expert/cli/git-preflight.md +8 -4
  107. package/dist/expert/cli/git-synchronization.md +32 -6
  108. package/dist/expert/cli/harness-plugins.md +12 -12
  109. package/dist/expert/cli/harnesses.md +22 -16
  110. package/dist/expert/cli/initialization-ui.md +14 -14
  111. package/dist/expert/cli/initialization.md +31 -21
  112. package/dist/expert/cli/installation.md +6 -0
  113. package/dist/expert/cli/isolation.md +5 -3
  114. package/dist/expert/cli/releasing.md +17 -3
  115. package/dist/expert/cli/retries.md +10 -8
  116. package/dist/expert/cli/run.md +7 -5
  117. package/dist/expert/cli/start.md +21 -15
  118. package/dist/expert/cli/status-view.md +15 -17
  119. package/dist/expert/cli/synchronization-setup.md +24 -0
  120. package/dist/expert/cli/terminal.md +14 -16
  121. package/dist/expert/cli/tool-management.md +60 -0
  122. package/dist/expert/cli/tool-runtime.md +35 -0
  123. package/dist/expert/cli/tools-migration.md +50 -0
  124. package/dist/expert/cli/tools.md +73 -0
  125. package/dist/expert/cli/trace-configuration.md +9 -11
  126. package/dist/expert/cli/updates.md +7 -7
  127. package/dist/expert/cli/windows-installer.md +67 -0
  128. package/dist/expert/cli/workspace.md +2 -0
  129. package/dist/expert/coding-standards/_index.md +11 -0
  130. package/dist/expert/coding-standards/naming.md +30 -0
  131. package/dist/expert/coding-standards/shared-logic.md +27 -0
  132. package/dist/expert/concepts/automatic-repair.md +33 -0
  133. package/dist/expert/concepts/engine-and-project.md +7 -5
  134. package/dist/expert/dictionary.md +18 -18
  135. package/dist/harness/plugins/claude-code/index.js +4 -2
  136. package/dist/harness/plugins/claude-code/index.js.map +1 -1
  137. package/dist/harness/plugins/cline/index.js +1 -0
  138. package/dist/harness/plugins/cline/index.js.map +1 -1
  139. package/dist/harness/plugins/gemini/index.js +2 -0
  140. package/dist/harness/plugins/gemini/index.js.map +1 -1
  141. package/dist/harness/plugins/github-copilot/index.js +1 -0
  142. package/dist/harness/plugins/github-copilot/index.js.map +1 -1
  143. package/dist/harness/plugins/openai-codex/index.js +13 -9
  144. package/dist/harness/plugins/openai-codex/index.js.map +1 -1
  145. package/dist/harness/plugins/opencode/index.js +1 -0
  146. package/dist/harness/plugins/opencode/index.js.map +1 -1
  147. package/dist/harness/plugins/qwen-code/index.js +1 -0
  148. package/dist/harness/plugins/qwen-code/index.js.map +1 -1
  149. package/dist/harness/types.d.ts +16 -5
  150. package/dist/project/config.d.ts +135 -48
  151. package/dist/project/config.js +331 -119
  152. package/dist/project/config.js.map +1 -1
  153. package/dist/project/configuration.d.ts +43 -0
  154. package/dist/project/configuration.js +165 -0
  155. package/dist/project/configuration.js.map +1 -0
  156. package/dist/project/defaults.d.ts +4 -2
  157. package/dist/project/defaults.js +10 -5
  158. package/dist/project/defaults.js.map +1 -1
  159. package/dist/project/git.d.ts +28 -0
  160. package/dist/project/git.js +81 -0
  161. package/dist/project/git.js.map +1 -1
  162. package/dist/project/migrations.d.ts +96 -0
  163. package/dist/project/migrations.js +301 -0
  164. package/dist/project/migrations.js.map +1 -0
  165. package/dist/project/publication.d.ts +57 -0
  166. package/dist/project/publication.js +117 -0
  167. package/dist/project/publication.js.map +1 -0
  168. package/dist/project/readiness.d.ts +14 -5
  169. package/dist/project/readiness.js +23 -22
  170. package/dist/project/readiness.js.map +1 -1
  171. package/dist/project/setup.js +2 -0
  172. package/dist/project/setup.js.map +1 -1
  173. package/dist/service/actions.d.ts +12 -4
  174. package/dist/service/actions.js +32 -2
  175. package/dist/service/actions.js.map +1 -1
  176. package/dist/service/control.d.ts +1 -1
  177. package/dist/service/control.js +1 -1
  178. package/dist/service/host.d.ts +5 -2
  179. package/dist/service/host.js +26 -16
  180. package/dist/service/host.js.map +1 -1
  181. package/dist/service/http.js +7 -2
  182. package/dist/service/http.js.map +1 -1
  183. package/dist/service/launcher.d.ts +2 -1
  184. package/dist/service/launcher.js +1 -0
  185. package/dist/service/launcher.js.map +1 -1
  186. package/dist/service/records.d.ts +3 -0
  187. package/dist/service/records.js +1 -1
  188. package/dist/service/records.js.map +1 -1
  189. package/dist/service/spa/app.css +39 -0
  190. package/dist/service/spa/app.js +242 -39
  191. package/dist/service/worker.js +1 -0
  192. package/dist/service/worker.js.map +1 -1
  193. package/dist/tools/environment.d.ts +122 -0
  194. package/dist/tools/environment.js +199 -0
  195. package/dist/tools/environment.js.map +1 -0
  196. package/dist/tools/model.d.ts +180 -0
  197. package/dist/tools/model.js +111 -0
  198. package/dist/tools/model.js.map +1 -0
  199. package/dist/tools/normalize.d.ts +51 -0
  200. package/dist/tools/normalize.js +321 -0
  201. package/dist/tools/normalize.js.map +1 -0
  202. package/dist/tools/operations.d.ts +198 -0
  203. package/dist/tools/operations.js +378 -0
  204. package/dist/tools/operations.js.map +1 -0
  205. package/dist/tools/readiness.d.ts +72 -0
  206. package/dist/tools/readiness.js +160 -0
  207. package/dist/tools/readiness.js.map +1 -0
  208. package/dist/ui/dashboard.d.ts +3 -0
  209. package/dist/ui/dashboard.js +173 -2
  210. package/dist/ui/dashboard.js.map +1 -1
  211. package/dist/ui/details.d.ts +35 -1
  212. package/dist/ui/details.js +103 -2
  213. package/dist/ui/details.js.map +1 -1
  214. package/dist/ui/secret.d.ts +8 -0
  215. package/dist/ui/secret.js +41 -0
  216. package/dist/ui/secret.js.map +1 -0
  217. package/dist/ui/status-view.d.ts +1 -0
  218. package/dist/ui/status-view.js +33 -8
  219. package/dist/ui/status-view.js.map +1 -1
  220. package/dist/ui/tool-forms.d.ts +24 -0
  221. package/dist/ui/tool-forms.js +133 -0
  222. package/dist/ui/tool-forms.js.map +1 -0
  223. package/package.json +1 -1
package/README.md CHANGED
@@ -17,13 +17,16 @@ npx ptbk --version
17
17
 
18
18
  Global and local installations are independent; every project keeps using the installation that started it, including after restarts. A dashboard or status opened with another ptbk version shows the service through its own installation.
19
19
 
20
+ **Windows:** every release also ships `Promptbook-Setup-<version>-windows-x64.exe` on its [GitHub Release](https://github.com/webgptorg/promptbook/releases). It installs missing prerequisites (Node.js, npm, Git) from their official distributions, installs that exact `ptbk` version globally, creates an empty first-project folder in `%USERPROFILE%\Promptbook` and opens a terminal running `ptbk init` there. It is only a bootstrap: the project itself is set up by the ordinary `ptbk init`.
21
+
20
22
  ## Use
21
23
 
22
24
  ```bash
23
25
  ptbk init # describe your project, answer a few setup questions; the agenda then starts in the background
24
26
  ptbk dashboard # live terminal view and controls (Q leaves, the service keeps running)
25
27
  ptbk dashboard --global # every running project engine on this computer, from any directory
26
- ptbk status # one snapshot: agents waiting for you, current work, queue, connection
28
+ ptbk status # one snapshot: agents waiting for you, current work, tools, queue, connection
29
+ ptbk tool list # the named browser and harness tools: enabled, usable, in use
27
30
  ptbk chat # talk with Chatter (Enter) or choose another agent; Ctrl+C closes only the chat
28
31
  ptbk ask "What is left?" # quick question to one agent, saved as a chat
29
32
  ptbk answer # answer agents that wait for you
@@ -36,12 +39,13 @@ ptbk start # start an initialized, cloned or stopped project
36
39
  ptbk run --limit 1 # finite run with one agent/harness configuration
37
40
  ```
38
41
 
39
- `ptbk init` first asks what you are working on — free text, long pasted material, images or other files (Ctrl+O attaches a file, Ctrl+V pastes a clipboard image, long pastes become compact `[Pasted text #1, 120 lines]` tokens). Your input is saved verbatim in `specs/_initial.md` (attachments in `specs/_initial/`), and one ordinary task assigned to the engine-supplied Expert transforms the project according to it. Init shows `Step X of Y`, never runs that task itself, starts the background agenda and returns; a blank intent gives a small skeleton whose first task is a readiness review.
42
+ `ptbk init` first asks what you are working on — free text, long pasted material, images or other files (Ctrl+O attaches a file, Ctrl+V pastes a clipboard image, long pastes become compact `[Pasted text #1, 120 lines]` tokens). Your input is saved verbatim in `specs/_initial.md` (attachments in `specs/_initial/`), and one ordinary task assigned to the engine-supplied Expert transforms the project according to it. Init shows `Step X of Y`, never runs that task itself, starts the background agenda and returns; a blank intent gives a small skeleton whose first task is a readiness review. Init does not ask for a check command: an existing real check is kept, otherwise `execution.check` gets an informational placeholder that always succeeds and never counts as passing tests (Expert can add real validation). It asks once whether to synchronize with a Git remote (default no; yes publishes to a new private GitHub repository through your GitHub CLI login, or to another origin URL).
40
43
 
41
44
  Run `ptbk help` for all commands and `ptbk help <command>` for one command's options, defaults and examples.
42
45
 
43
- - **Unattended setup:** `ptbk init --non-interactive --installation local --harness openai-codex --check "npm test" --intent-file brief.md --attach mockup.png` (`--no-start` only prepares the project).
44
- - **Harnesses:** OpenAI Codex and Claude Code are featured; GitHub Copilot, Cline, OpenCode, Gemini CLI and Qwen Code are also supported. They are installed globally and use their own login.
46
+ - **Unattended setup:** `ptbk init --non-interactive --installation local --harness openai-codex --check "npm test" --intent-file brief.md --attach mockup.png` (`--no-start` only prepares the project; `--auto-sync --github-repository me/project` or `--origin-url <url>` also publishes it).
47
+ - **Tools:** browsers and harnesses are ordered named tools in `ptbk.json` `tools` — `BROWSER` (variants `CHROME`, `CHROMIUM`, `EDGE`; profile `MANAGED_GLOBAL`, `PROJECT`, `USER_EXISTING` or `CUSTOM`) and `HARNESS` (`OPENAI_CODEX`, `CLAUDE_CODE`, `GITHUB_COPILOT`, `CLINE`, `OPENCODE`, `GEMINI`, `QWEN_CODE`; authentication `NATIVE` or `API_KEY`). Init creates one browser and one native instance per selected harness; add more later — e.g. a second subscription or a paid API fallback (`ptbk tool add HARNESS --variant OPENAI_CODEX --name company-api --authentication API_KEY --api-key-env COMPANY_OPENAI_API_KEY --api-key-stdin`), or separate browser profiles for different accounts. Within one variant the first usable instance serves work and later ones are fallbacks (e.g. after a quota limit). API keys are stored only as `${{ env.NAME }}` references; values go to the Git-ignored `.env` with timestamped comments and are never deleted (replaced values stay commented out). Every `ptbk tool add|modify|enable|disable|remove|move` is committed at once, also while a task runs, and the running engine uses a new tool immediately — even in the current task. With no usable browser or harness the engine keeps running and waits for tools.
48
+ - **Harnesses:** OpenAI Codex and Claude Code are featured; GitHub Copilot, Cline, OpenCode, Gemini CLI and Qwen Code are also supported. They are installed globally; native instances use their own login (ambient API keys never switch them to API billing).
45
49
  - **Files:** agents in `agents/` (core Adam, Manager, Teacher, Fixer and Chatter in `agents/.core/`), tasks in `tasks/` (Books or Markdown), chats in `chats/`, specifications in `specs/`, per-task audit evidence in `traces/<task-file-basename>/`, configuration in `ptbk.json`, runtime state in the Git-ignored `.ptbk/`.
46
50
  - **Books:** every Book opens with one declaration, then commitments, e.g.
47
51
 
@@ -53,13 +57,16 @@ Run `ptbk help` for all commands and `ptbk help <command>` for one command's opt
53
57
  ```
54
58
 
55
59
  A commitment keyword is a complete line-initial uppercase word sequence of at least three letters (so a name must not begin with an all-uppercase word: `AGENT Ceo`, not `AGENT CEO`); descriptions go under commitments such as `GOAL`, `PERSONA` or `NOTE`. New tasks and chats get generated names — a readable title plus the creation date/time, distinct from every other name. Books in the former syntax (a plain name line, `ENTITY`) are reported and converted only by `ptbk migrate`.
56
- - **Names, references and traces:** `@Name` and `{{Multi Word Name}}` (the older `{Name}` still reads) reference any Book through one resolver: built-ins (`@Void`, `@Null`, `@Expert`, `@User`), then `agents/`, `tasks/`, `chats/`, the rest of the project and finally Git-ignored content; a same-name copy is shadowed and reported, never merged or renamed. Commits carry `Task-Name`/`Chat-Name` trailers and each task's evidence lives in `traces/<task-file-basename>/` — the task's source filename without `.book` (e.g. `tasks/2026-10-19-1205-browser-repair.book` → `traces/2026-10-19-1205-browser-repair/`), with the declared name and source revision recorded inside: the consolidated harness output (`harness.log`), events (`events.jsonl`) and, when the task used the project browser, its video (`video/`, sign-in steps excluded). `ptbk.json` `traces.commit` (default off: `traces/` is ignored), `traces.ignoreVideos` (default on) and `traces.recordVideo` (default on) are chosen on init's Traces screen. With `ffmpeg` on PATH videos are H.264 MP4, otherwise Motion-JPEG MOV.
60
+ - **Names, references and traces:** `@Name` and `{{Multi Word Name}}` (the older `{Name}` still reads) reference any Book through one resolver: built-ins (`@Void`, `@Null`, `@Expert`, `@User`), then `agents/`, `tasks/`, `chats/`, the rest of the project and finally Git-ignored content; a same-name copy is shadowed and reported, never merged or renamed. Commits carry `Task-Name`/`Chat-Name` trailers and each task's evidence lives in `traces/<task-file-basename>/` — the task's source filename without `.book` (e.g. `tasks/2026-10-19-1205-browser-repair.book` → `traces/2026-10-19-1205-browser-repair/`), with the declared name and source revision recorded inside: the consolidated harness output (`harness.log`), events (`events.jsonl`) and, when the task used the project browser, its video (`video/`, sign-in steps excluded). `ptbk.json` `traces.isCommitted` (default off: `traces/` is ignored), `traces.isVideoIgnored` (default on) and `traces.isVideoRecordingEnabled` (default on) are chosen on init's Traces screen. With `ffmpeg` on PATH videos are H.264 MP4, otherwise Motion-JPEG MOV.
57
61
  - **Chats:** a new chat goes to **Chatter**, the project's conversational guide (Enter), unless you choose another agent; Chatter consults the right specialists for you (attributed, linked consultation chats) and creates ordinary tasks only when you ask for work. Every message you or an agent write is committed (`PTBK: Chat - <name>`); reading never commits. A correction in a chat can schedule an ordinary Teacher task. Questions, sign-in requests and failure decisions from running tasks are chats started by the responsible agent (dashboard key `A`, `ptbk answer`); the task resumes on a valid answer. The dashboards start chats with `C` (terminal) or **New chat** (browser).
58
- - **Browser:** agents share one browser per project. Profiles: the dedicated Promptbook profile shared by your projects (default; one project at a time), an isolated project profile in `.ptbk/`, your own Chrome profile, or a custom path (`browser.profile`: `global`, `isolated`, `user` or a path).
59
- - **Service lifecycle:** a running engine is `running`, `pausing`, `pause` or `stopping`. Pause and stop let the current task finish without starting another one; `ptbk resume` cancels a pending pause, stop or restart; `ptbk stop --force` (`-F`) interrupts owned work immediately (recoverable). The dashboards and browser expose the same controls; leaving a dashboard never stops the service, and any number of dashboards can watch one engine. Execution details (agent, harness, model, thinking level) and browser details (profile, health, recheck/retry/restart) are collapsible panels (`E`/`B` in the terminal).
62
+ - **Browser:** each browser tool is one profile shared by the project's agents: the dedicated Promptbook profile shared by your projects (`MANAGED_GLOBAL`, default; one project at a time), an isolated project profile in `.ptbk/` (`PROJECT`), your own Chrome profile (`USER_EXISTING`), or a custom path (`CUSTOM`). Agents choose among several browsers by name and description (`browser_list`).
63
+ - **Configuration:** `ptbk.json` records `promptbookVersion`, the engine version that initialized or last migrated it. A newer engine migrates an older configuration in one dedicated `PTBK: Migrate configuration from … to …` commit before new work (a configuration without the field is treated as `0.119.0-21`); an older engine refuses and offers its update instead of downgrading. Keys are lower camelCase, booleans start with `is`, tool names are kebab-case and fixed enum values are uppercase (`YES_AND_FIX`, `OPENAI_CODEX`); unambiguous spelling mistakes are corrected in a scoped commit, ambiguous ones are left for Fixer.
64
+ - **Synchronization:** `isAutoSync` (default `false`) synchronizes with the repository's existing origin and the current branch: pull every minute and before work and commits (visible merge commits, never rebase or force-push), then push completed work. Failed pulls/pushes never stop local work; conflicts go to Fixer as ordinary work. The dashboards show a synchronization panel with **Synchronize now** only while it is enabled. `--auto-sync`/`--no-auto-sync` override it for one invocation (`--auto-pull`/`--auto-push` are compatibility aliases).
65
+ - **Service lifecycle:** a running engine is `running`, `pausing`, `pause` or `stopping`. Pause and stop let the current task finish without starting another one; `ptbk resume` cancels a pending pause, stop or restart; `ptbk stop --force` (`-F`) interrupts owned work immediately (recoverable). The dashboards and browser expose the same controls; leaving a dashboard never stops the service, and any number of dashboards can watch one engine. Execution details (agent, harness tool, model, thinking level) and browser details (profile, health, recheck/retry/restart) are collapsible panels (`E`/`B` in the terminal); `T` manages tools (Space enables/disables, N adds, M modifies, `[`/`]` reorders, D removes) and, with synchronization on, `Y`/`G` show it and synchronize now.
60
66
  - **Remote access:** `ptbk start` serves a dashboard on `127.0.0.1` and publishes it through a Cloudflare quick tunnel; devices must pair with a single-use link shown in the local terminal (`ptbk access pair`). Use `--no-tunnel` for local-only access or `--no-server` for neither.
61
67
  - **Presentation:** pretty terminal UI by default; `--raw` (or redirected output) gives plain text without prompts. `--non-interactive` never asks questions.
62
- - **Commits:** every mutating workflow commits its own changes with a `PTBK: ` subject; `--no-commit` is the explicit exception.
68
+ - **Commits:** every mutating workflow commits its own changes with a `PTBK: ` subject; `--no-commit` is the explicit exception (never for configuration migrations or tool management).
69
+ - **Fixer:** an ordinary editable core agent whose goal is to solve problems and reduce the decisions you need to make; its initial TEAM includes you and Expert, so it asks only when it genuinely needs help — edit its Book to require more consultation or none.
63
70
 
64
71
  The behavior is defined by [the specification](specs/_main.md).
65
72
 
@@ -79,7 +86,7 @@ From a clean, committed, named branch:
79
86
  npm version prerelease # or patch / minor / major
80
87
  ```
81
88
 
82
- `preversion` verifies the clean branch, typechecks, runs the tests and validates the manifest/lockfile. `postversion` atomically pushes the version commit and its `vX.Y.Z` tag. GitHub Actions then runs **Check ptbk** on Node 22/24 × Linux/macOS/Windows for the tag and, only if it passes, **Publish ptbk** publishes the single `ptbk` package with npm provenance and verifies the public registry and default local/global installations. Publishing needs the `NPM_TOKEN` secret or npm trusted publishing configured for this repository.
89
+ `preversion` verifies the clean branch, typechecks, runs the tests and validates the manifest/lockfile. `postversion` atomically pushes the version commit and its `vX.Y.Z` tag. GitHub Actions then runs **Check ptbk** on Node 22/24 × Linux/macOS/Windows for the tag and, only if it passes, **Publish ptbk** publishes the single `ptbk` package with npm provenance and verifies the public registry and default local/global installations. Publishing needs the `NPM_TOKEN` secret or npm trusted publishing configured for this repository. After npm publication the same workflow builds the Windows installer from the tag (Inno Setup around `installer/windows/bootstrap.ps1`), checks that it installs and reports the published version, and attaches it with its SHA-256 checksum to the version's GitHub Release (an identical existing asset is reused, a different one is never overwritten; a missing installer leaves the release incomplete).
83
90
 
84
91
  ## License
85
92
 
@@ -1,31 +1,18 @@
1
- import { type EffectiveSettings } from '../project/config.js';
1
+ import { type BrowserToolRecord } from '../tools/model.js';
2
2
  import type { Project } from '../project/workspace.js';
3
3
  import type { BridgeTool } from '../engine/bridge.js';
4
4
  import type { TaskChats } from '../chats/task-chats.js';
5
- import type { TaskTrace } from '../engine/task-trace.js';
6
5
  import type { BrowserDetailView } from '../engine/snapshot.js';
7
6
  import type { ControlOutcome } from '../service/actions.js';
8
7
  import { promptbookAppData } from '../common/app-data.js';
9
8
  import { BrowserRecorder } from './recording.js';
9
+ import type { BrowserFleet } from './fleet.js';
10
10
  /**
11
- * Locates a Chrome-compatible browser (configuration, `CHROME_PATH`, standard locations, PATH).
11
+ * Locates the executable of a browser tool (its explicit executable, `CHROME_PATH`, standard locations, PATH).
12
12
  *
13
13
  * @private project browser
14
14
  */
15
- export declare function findBrowserExecutable(settings: EffectiveSettings, env?: NodeJS.ProcessEnv): Promise<string | undefined>;
16
- /**
17
- * Where the project's browser profile comes from (saved in ptbk.json as a portable kind, never a machine path for
18
- * the managed global profile).
19
- *
20
- * @private project browser
21
- */
22
- export type BrowserProfileSource = 'global' | 'isolated' | 'user' | 'custom';
23
- /**
24
- * Classifies a `browser.profile` value: `global`, `isolated`, `user`, or a custom profile path.
25
- *
26
- * @private project browser
27
- */
28
- export declare function browserProfileSource(value: string): BrowserProfileSource;
15
+ export declare function findBrowserExecutable(tool: Pick<BrowserToolRecord, 'variant' | 'executable'>, env?: NodeJS.ProcessEnv): Promise<string | undefined>;
29
16
  export { promptbookAppData };
30
17
  /**
31
18
  * The dedicated Promptbook-managed browser profile shared by this user's projects (not the user's own Chrome profile).
@@ -40,18 +27,13 @@ export declare function globalBrowserProfile(env?: NodeJS.ProcessEnv): string;
40
27
  */
41
28
  export declare function userChromeProfile(env?: NodeJS.ProcessEnv): string;
42
29
  /**
43
- * Resolves the profile directory of the selected source: the managed global profile, the isolated project profile in
44
- * `.ptbk/`, the user's Chrome profile, or a custom path (relative paths resolve against the project).
30
+ * Resolves the profile directory of a browser tool at runtime: the managed global profile (per OS user), an isolated
31
+ * project profile in `.ptbk/` (separate per instance), the user's Chrome profile, or a custom path (relative paths
32
+ * resolve against the project).
45
33
  *
46
34
  * @private project browser
47
35
  */
48
- export declare function browserProfileDirectory(project: Project, settings: EffectiveSettings, env?: NodeJS.ProcessEnv): string;
49
- /**
50
- * Human description of a `browser.profile` value.
51
- *
52
- * @private project browser
53
- */
54
- export declare function describeBrowserProfile(value: string): string;
36
+ export declare function browserProfileDirectory(project: Project, tool: Pick<BrowserToolRecord, 'name' | 'profile'>, env?: NodeJS.ProcessEnv): string;
55
37
  /**
56
38
  * Checks whether another browser process currently owns a profile (Chrome's singleton lock).
57
39
  *
@@ -76,13 +58,28 @@ export type BrowserHealth = {
76
58
  lastAction?: BrowserDetailView['lastAction'];
77
59
  };
78
60
  /**
79
- * The project's single shared browser instance (one profile, one automation owner at a time).
61
+ * The effective configuration of one browser tool as the service resolves it.
62
+ *
63
+ * @private project browser
64
+ */
65
+ export type BrowserTarget = {
66
+ /** Effective record (the saved one with this invocation's temporary overrides). */
67
+ readonly tool: BrowserToolRecord;
68
+ /** Temporary invocation overrides change it (the saved record stays in ptbk.json). */
69
+ readonly overridden: boolean;
70
+ };
71
+ /**
72
+ * One named browser tool of the project: one profile and one automation owner at a time, shared by the project's
73
+ * agents. A launched process keeps the configuration it was acquired with (retained use) until the task that uses
74
+ * it releases it; later selections see the new saved configuration.
80
75
  *
81
76
  * @private project browser
82
77
  */
83
78
  export declare class ProjectBrowser {
84
79
  private readonly project;
85
- private readonly settings;
80
+ /** Name of the browser tool this instance serves. */
81
+ readonly name: string;
82
+ private readonly target;
86
83
  private readonly env;
87
84
  /** Publishes health changes to every view. */
88
85
  private readonly onChange;
@@ -92,6 +89,8 @@ export declare class ProjectBrowser {
92
89
  private connection?;
93
90
  private sessionId?;
94
91
  private note?;
92
+ /** Configuration the running process was launched with (retained while a task uses it). */
93
+ private launchedWith?;
95
94
  /** A launch in progress (concurrent automatic/manual starts share it: never two owners). */
96
95
  private launching?;
97
96
  /** The current task used the browser (a restart waits for the task boundary). */
@@ -102,9 +101,17 @@ export declare class ProjectBrowser {
102
101
  private health;
103
102
  /** Task-linked recording of browser activity (`traces/<task-file-basename>/video/`). */
104
103
  readonly recorder: BrowserRecorder;
105
- constructor(project: Project, settings: () => EffectiveSettings, env: NodeJS.ProcessEnv,
104
+ constructor(project: Project,
105
+ /** Name of the browser tool this instance serves. */
106
+ name: string, target: () => BrowserTarget | undefined, env: NodeJS.ProcessEnv,
106
107
  /** Publishes health changes to every view. */
107
- onChange?: () => void);
108
+ onChange?: () => void, recordingEnabled?: () => boolean);
109
+ /** Configuration of the next use: the retained one while a task holds the process, otherwise the saved one. */
110
+ private config;
111
+ /** Whether a task currently holds this browser. */
112
+ get inUse(): boolean;
113
+ /** Whether the running process still uses a configuration that was changed, disabled or removed meanwhile. */
114
+ get retained(): boolean;
108
115
  /** Updates the observed health and notifies the views. */
109
116
  private setHealth;
110
117
  /** Records a real launch/connection failure with redacted evidence. */
@@ -130,12 +137,13 @@ export declare class ProjectBrowser {
130
137
  restart(): Promise<ControlOutcome>;
131
138
  /** Performs a restart at a safe boundary. */
132
139
  private restartNow;
133
- /** After a task: performs a deferred restart and releases a shared profile. */
140
+ /**
141
+ * After a task: performs a deferred restart, ends a retained use of a changed/disabled/removed configuration and
142
+ * releases a shared profile.
143
+ */
134
144
  taskFinished(): Promise<void>;
135
145
  /** Handles a lost connection: stops only this project's browser process; the next use relaunches it. */
136
146
  private connectionLost;
137
- /** Associates subsequent browser use with a task attempt for recording. */
138
- useFor(trace: TaskTrace, attempt: string): Promise<void>;
139
147
  /** Unsubscribes the page-transition listener of the current connection. */
140
148
  private navigationListener?;
141
149
  /** Ensures the browser runs and recording of the attached task has begun. */
@@ -178,11 +186,17 @@ export declare class ProjectBrowser {
178
186
  releaseShared(): void;
179
187
  }
180
188
  /**
181
- * Browser tools exposed to agents through the ptbk MCP bridge.
189
+ * Browser tools exposed to agents through the ptbk MCP bridge. Every call resolves the live inventory: a browser
190
+ * added during the task is selectable at the next call; `browser` names a specific tool (account/profile).
182
191
  *
183
192
  * @private project browser
184
193
  */
185
- export declare function browserTools(browser: ProjectBrowser, chats: TaskChats | undefined, agent: string, onUserChat: (chat: {
194
+ export declare function browserTools(fleet: BrowserFleet, chats: TaskChats | undefined, agent: string, onUserChat: (chat: {
186
195
  chat: string;
187
196
  awaited: number;
188
- }) => void): BridgeTool[];
197
+ }) => void, describe: () => Array<{
198
+ name: string;
199
+ description?: string;
200
+ profile: string;
201
+ isHeadless: boolean;
202
+ }>): BridgeTool[];