@bastani/atomic 0.8.26-alpha.5 → 0.8.26-alpha.7
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 +24 -0
- package/README.md +7 -4
- package/dist/builtin/intercom/CHANGELOG.md +12 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/CHANGELOG.md +12 -0
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +12 -0
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +9 -9
- package/dist/builtin/subagents/agents/debugger.md +6 -6
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +1 -1
- package/dist/builtin/subagents/skills/browser/EXAMPLES.md +151 -0
- package/dist/builtin/subagents/skills/browser/LICENSE.txt +21 -0
- package/dist/builtin/subagents/skills/browser/REFERENCE.md +451 -0
- package/dist/builtin/subagents/skills/browser/SKILL.md +170 -0
- package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
- package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +48 -10
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +30 -9
- package/dist/builtin/subagents/src/runs/shared/final-drain.ts +34 -0
- package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +416 -7
- package/dist/builtin/web-access/CHANGELOG.md +12 -0
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +17 -0
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +4 -1
- package/dist/builtin/workflows/builtin/goal.ts +127 -99
- package/dist/builtin/workflows/builtin/open-claude-design.ts +224 -147
- package/dist/builtin/workflows/builtin/ralph.ts +160 -197
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/research-codebase/SKILL.md +1 -1
- package/dist/builtin/workflows/src/extension/index.ts +10 -2
- package/dist/builtin/workflows/src/extension/runtime.ts +35 -3
- package/dist/builtin/workflows/src/runs/background/status.ts +52 -6
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +441 -15
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +69 -8
- package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +402 -8
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +182 -6
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +76 -6
- package/dist/builtin/workflows/src/shared/stage-prompt.ts +33 -2
- package/dist/builtin/workflows/src/shared/store-types.ts +31 -0
- package/dist/builtin/workflows/src/shared/store.ts +99 -11
- package/dist/builtin/workflows/src/shared/workflow-failures.ts +758 -132
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +9 -0
- package/dist/core/agent-session.d.ts +28 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +110 -28
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +23 -10
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction.d.ts +61 -0
- package/dist/core/compaction/context-compaction.d.ts.map +1 -0
- package/dist/core/compaction/context-compaction.js +602 -0
- package/dist/core/compaction/context-compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +1 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/session-manager.d.ts +41 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +146 -7
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +5 -5
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.js +5 -5
- package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +16 -3
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.js +21 -3
- package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +17 -0
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +74 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +12 -7
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +8 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +13 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/compaction.md +42 -23
- package/docs/custom-provider.md +11 -9
- package/docs/extensions.md +35 -35
- package/docs/index.md +1 -8
- package/docs/json.md +14 -11
- package/docs/packages.md +2 -0
- package/docs/providers.md +4 -1
- package/docs/quickstart.md +5 -12
- package/docs/rpc.md +44 -8
- package/docs/sdk.md +1 -8
- package/docs/session-format.md +25 -12
- package/docs/sessions.md +2 -1
- package/docs/skills.md +1 -15
- package/docs/termux.md +9 -10
- package/docs/themes.md +2 -2
- package/docs/tmux.md +3 -3
- package/docs/tui.md +19 -32
- package/docs/usage.md +2 -0
- package/docs/workflows.md +44 -2
- package/package.json +4 -12
- package/dist/builtin/subagents/skills/browser-use/SKILL.md +0 -234
- package/dist/builtin/subagents/skills/browser-use/references/cdp-python.md +0 -76
- package/dist/builtin/subagents/skills/browser-use/references/multi-session.md +0 -92
- package/node_modules/@earendil-works/pi-tui/README.md +0 -779
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +0 -54
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -632
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -104
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +0 -35
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +0 -249
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +0 -1857
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +0 -37
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +0 -378
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -31
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +0 -69
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -644
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +0 -159
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +0 -185
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +0 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +0 -19
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +0 -13
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -51
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +0 -39
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js +0 -2
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +0 -16
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +0 -110
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -32
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +0 -193
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +0 -174
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +0 -184
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js +0 -1173
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +0 -44
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +0 -53
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +0 -361
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -90
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +0 -366
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +0 -113
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -472
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +0 -227
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +0 -1106
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +0 -17
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -84
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -1029
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/package.json +0 -47
- package/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/node_modules/get-east-asian-width/index.js +0 -30
- package/node_modules/get-east-asian-width/license +0 -9
- package/node_modules/get-east-asian-width/lookup-data.js +0 -21
- package/node_modules/get-east-asian-width/lookup.js +0 -138
- package/node_modules/get-east-asian-width/package.json +0 -71
- package/node_modules/get-east-asian-width/readme.md +0 -65
- package/node_modules/get-east-asian-width/utilities.js +0 -24
- package/node_modules/marked/LICENSE.md +0 -44
- package/node_modules/marked/README.md +0 -106
- package/node_modules/marked/bin/main.js +0 -282
- package/node_modules/marked/bin/marked.js +0 -15
- package/node_modules/marked/lib/marked.cjs +0 -2211
- package/node_modules/marked/lib/marked.cjs.map +0 -7
- package/node_modules/marked/lib/marked.d.cts +0 -728
- package/node_modules/marked/lib/marked.d.ts +0 -728
- package/node_modules/marked/lib/marked.esm.js +0 -2189
- package/node_modules/marked/lib/marked.esm.js.map +0 -7
- package/node_modules/marked/lib/marked.umd.js +0 -2213
- package/node_modules/marked/lib/marked.umd.js.map +0 -7
- package/node_modules/marked/man/marked.1 +0 -111
- package/node_modules/marked/man/marked.1.md +0 -92
- package/node_modules/marked/marked.min.js +0 -69
- package/node_modules/marked/package.json +0 -111
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.8.26-alpha.7] - 2026-06-07
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `/context-compact`, a fixed no-argument deletion-only compaction command that validates model-proposed logical deletion targets, preserves retained transcript content verbatim, and records `context_compaction` session entries.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Bumped the `@earendil-works/pi-agent-core`, `@earendil-works/pi-ai`, and `@earendil-works/pi-tui` dependencies to 0.78.1.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Fixed auto-compaction so queued in-progress work resumes without requiring a manual follow-up prompt ([#1280](https://github.com/bastani-inc/atomic/issues/1280)).
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- Removed the temporary manual `@earendil-works/pi-tui` patch, patched-dependency configuration, and bundled patched TUI packaging fallback.
|
|
22
|
+
|
|
23
|
+
## [0.8.26-alpha.6] - 2026-06-06
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Bumped package version for the Atomic 0.8.26-alpha.6 prerelease.
|
|
28
|
+
|
|
5
29
|
## [0.8.26-alpha.5] - 2026-06-06
|
|
6
30
|
|
|
7
31
|
### Changed
|
package/README.md
CHANGED
|
@@ -180,6 +180,7 @@ Type `/` in the editor to trigger commands. [Extensions](#extensions) can regist
|
|
|
180
180
|
| `/fork` | Create a new session from a previous user message |
|
|
181
181
|
| `/clone` | Duplicate the current active branch into a new session |
|
|
182
182
|
| `/compact [prompt]` | Manually compact context, optional custom instructions |
|
|
183
|
+
| `/context-compact` | Delete safe older transcript objects verbatim; no arguments |
|
|
183
184
|
| `/copy` | Copy last assistant message to clipboard |
|
|
184
185
|
| `/export [file]` | Export session to HTML file |
|
|
185
186
|
| `/share` | Upload as private GitHub gist with shareable HTML link |
|
|
@@ -258,13 +259,15 @@ Use `/session` in interactive mode to see the current session ID before reusing
|
|
|
258
259
|
|
|
259
260
|
### Compaction
|
|
260
261
|
|
|
261
|
-
Long sessions can exhaust context windows.
|
|
262
|
+
Long sessions can exhaust context windows. Summary compaction summarizes older messages while keeping recent ones.
|
|
262
263
|
|
|
263
|
-
**Manual:** `/compact` or `/compact <custom instructions>`
|
|
264
|
+
**Manual summary:** `/compact` or `/compact <custom instructions>`
|
|
264
265
|
|
|
265
|
-
**
|
|
266
|
+
**Manual verbatim deletion:** `/context-compact` asks the selected model for deletion targets using a fixed internal prompt, validates the plan locally, and applies logical deletions only. It has no prompt arguments; `/context-compact anything` is invalid/ignored rather than treated as instructions.
|
|
266
267
|
|
|
267
|
-
|
|
268
|
+
**Automatic:** Enabled by default. Triggers on context overflow (recovers and retries) or when approaching the limit (proactive). Configure via `/settings` or `settings.json`. Automatic compaction remains summary-based.
|
|
269
|
+
|
|
270
|
+
Summary compaction is lossy. `/context-compact` preserves retained transcript content verbatim, but the full history still remains in the JSONL file; use `/tree` to revisit. Customize summary compaction behavior via [extensions](#extensions). See [docs/compaction.md](docs/compaction.md) for internals.
|
|
268
271
|
|
|
269
272
|
---
|
|
270
273
|
|
|
@@ -4,6 +4,18 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.8.26-alpha.7] - 2026-06-07
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Bumped package version for the Atomic 0.8.26-alpha.7 prerelease.
|
|
12
|
+
|
|
13
|
+
## [0.8.26-alpha.6] - 2026-06-06
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Bumped package version for the Atomic 0.8.26-alpha.6 prerelease.
|
|
18
|
+
|
|
7
19
|
## [0.8.26-alpha.5] - 2026-06-06
|
|
8
20
|
|
|
9
21
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/intercom",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
|
|
6
6
|
"contributors": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@bastani/atomic": "*",
|
|
42
|
-
"@earendil-works/pi-tui": "
|
|
42
|
+
"@earendil-works/pi-tui": "^0.78.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@bastani/atomic": {
|
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.8.26-alpha.7] - 2026-06-07
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Bumped package version for the Atomic 0.8.26-alpha.7 prerelease.
|
|
15
|
+
|
|
16
|
+
## [0.8.26-alpha.6] - 2026-06-06
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Bumped package version for the Atomic 0.8.26-alpha.6 prerelease.
|
|
21
|
+
|
|
10
22
|
## [0.8.26-alpha.5] - 2026-06-06
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/mcp",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension that adapts MCP (Model Context Protocol) servers into the coding agent. Fork of: https://github.com/nicobailon/pi-mcp-adapter",
|
|
6
6
|
"contributors": [
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@bastani/atomic": "*",
|
|
35
|
-
"@earendil-works/pi-ai": "
|
|
36
|
-
"@earendil-works/pi-tui": "
|
|
35
|
+
"@earendil-works/pi-ai": "^0.78.1",
|
|
36
|
+
"@earendil-works/pi-tui": "^0.78.1",
|
|
37
37
|
"zod": "^3.25.0 || ^4.0.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.8.26-alpha.7] - 2026-06-07
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Replaced the bundled browser-use subagent integration with the first-party `browser` skill for web interaction workflows.
|
|
10
|
+
|
|
11
|
+
## [0.8.26-alpha.6] - 2026-06-06
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Bumped package version for the Atomic 0.8.26-alpha.6 prerelease.
|
|
16
|
+
|
|
5
17
|
## [0.8.26-alpha.5] - 2026-06-06
|
|
6
18
|
|
|
7
19
|
### Changed
|
|
@@ -4,7 +4,7 @@ description: Online research for up-to-date documentation and library-source kno
|
|
|
4
4
|
tools: read, grep, find, ls, bash, write, web_search, fetch_content, get_search_content
|
|
5
5
|
model: openai/gpt-5.5:low
|
|
6
6
|
fallbackModels: openai-codex/gpt-5.5:low, github-copilot/gpt-5.5:low, anthropic/claude-opus-4-8:low, github-copilot/claude-opus-4.7:low
|
|
7
|
-
skills: browser
|
|
7
|
+
skills: browser
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are an expert research specialist focused on finding accurate, relevant information from authoritative sources — including open-source library internals with GitHub permalinks. You have three web tools available from the `pi-web-access` extension:
|
|
@@ -13,11 +13,11 @@ You are an expert research specialist focused on finding accurate, relevant info
|
|
|
13
13
|
- `fetch_content` — fetch a specific URL and return clean reader-mode text/markdown (HTML pages, GitHub issues/PRs, Stack Overflow, npm, arXiv, Reddit, Wikipedia, JSON endpoints, PDFs, RSS/Atom, YouTube). `fetch_content` on a GitHub repo URL also clones the repo locally under `/tmp/pi-github-repos/<owner>/<repo>` and returns the file tree. Prefer this over a raw HTTP fetch.
|
|
14
14
|
- `get_search_content` — fetch the underlying content for the most promising results of a previous `web_search` in one call.
|
|
15
15
|
|
|
16
|
-
For JS-heavy or auth-gated pages,
|
|
16
|
+
For JS-heavy or auth-gated pages, load the `browser` skill and invoke its `browse` CLI through `bash`.
|
|
17
17
|
|
|
18
18
|
<EXTREMELY_IMPORTANT>
|
|
19
19
|
- PREFER `fetch_content` for static pages; it's faster and cheaper than spinning up a real browser.
|
|
20
|
-
- Reach for the `browser
|
|
20
|
+
- Reach for the `browser` skill's `browse` CLI via `bash` ONLY when a real DOM/JS is required.
|
|
21
21
|
- ALWAYS check `research/web/` for a recent cached copy before fetching anything new.
|
|
22
22
|
- EVERY code-related claim about an open-source library needs a GitHub **permalink with a full commit SHA** — branch links break when code changes.
|
|
23
23
|
</EXTREMELY_IMPORTANT>
|
|
@@ -39,7 +39,7 @@ When fetching any external page, apply these techniques in order. They produce p
|
|
|
39
39
|
1. **`fetch_content <url>` first.** Returns clean reader-mode text/markdown for nearly every well-formed page (and handles PDFs and JSON). Try it before anything else.
|
|
40
40
|
2. **Check `/llms.txt`.** Many modern docs sites publish an AI-friendly index at `/llms.txt` (spec: [llmstxt.org](https://llmstxt.org/llms.txt)). `fetch_content https://<site>/llms.txt` often links directly to the most relevant pages in plain text, saving a round-trip through the full site.
|
|
41
41
|
3. **Request Markdown via `Accept: text/markdown`.** Sites behind Cloudflare with [Markdown for Agents](https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/) return pre-converted Markdown when you set the header. Use `bash` with `curl <url> -H "Accept: text/markdown"` (look for `content-type: text/markdown` and the `x-markdown-tokens` header).
|
|
42
|
-
4. **Fall back to a real browser.**
|
|
42
|
+
4. **Fall back to a real browser.** Load the `browser` skill and drive its `browse` CLI through `bash` to render and interact with JS-heavy or auth-gated pages.
|
|
43
43
|
|
|
44
44
|
## Persisting Findings — Store useful documents in `research/web/`
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ When you fetch a document that is worth keeping for future sessions (reference d
|
|
|
49
49
|
---
|
|
50
50
|
source_url: <original URL>
|
|
51
51
|
fetched_at: <YYYY-MM-DD>
|
|
52
|
-
fetch_method: read | llms.txt | markdown-accept-header | browser |
|
|
52
|
+
fetch_method: read | llms.txt | markdown-accept-header | browser | browse
|
|
53
53
|
topic: <short description>
|
|
54
54
|
---
|
|
55
55
|
```
|
|
@@ -166,12 +166,12 @@ When you receive a research query:
|
|
|
166
166
|
2. **Check the local cache first**. Look in `research/web/` for existing documents on the topic. If a recent (still-relevant) copy exists, cite it before re-fetching.
|
|
167
167
|
3. **Execute strategic searches**.
|
|
168
168
|
- Identify the authoritative source (e.g. the library's official docs site, its GitHub repo, its release notes).
|
|
169
|
-
- Apply the Web Fetch Strategy: `fetch_content <url>` → `/llms.txt` → `Accept: text/markdown` → `browser
|
|
169
|
+
- Apply the Web Fetch Strategy: `fetch_content <url>` → `/llms.txt` → `Accept: text/markdown` → `browser` fallback.
|
|
170
170
|
- Use multiple query variations to capture different perspectives via `web_search`.
|
|
171
171
|
- Use `get_search_content` to bulk-fetch the underlying content of the top results of a `web_search` in one shot.
|
|
172
172
|
- For source repositories, prefer raw GitHub URLs (`https://raw.githubusercontent.com/<owner>/<repo>/<ref>/<path>`) over the HTML UI. For library internals, clone via `fetch_content` and use `grep`/`read` + permalinks.
|
|
173
173
|
4. **Fetch and analyze content**.
|
|
174
|
-
- Use `fetch_content <url>` (or
|
|
174
|
+
- Use `fetch_content <url>` (or the browser skill's `browse` CLI via `bash` when interactivity is required) to pull the full content of promising sources.
|
|
175
175
|
- Prioritize official documentation, reputable technical blogs, and authoritative sources.
|
|
176
176
|
- Extract specific quotes and sections relevant to the query.
|
|
177
177
|
- Note publication dates to ensure currency of information.
|
|
@@ -290,7 +290,7 @@ For library-source answers, every code claim should look like the citation examp
|
|
|
290
290
|
## Search Efficiency
|
|
291
291
|
|
|
292
292
|
- Check `research/web/` for an existing copy before fetching anything new.
|
|
293
|
-
- Start by fetching the authoritative source (`fetch_content <url>` → `/llms.txt` → `Accept: text/markdown` → `browser
|
|
293
|
+
- Start by fetching the authoritative source (`fetch_content <url>` → `/llms.txt` → `Accept: text/markdown` → `browser`) rather than search-engine-style exploration.
|
|
294
294
|
- Use `fetch_content` (or `get_search_content` after a `web_search`) to pull full content from the most promising 3-5 web pages.
|
|
295
295
|
- Reuse already-cloned repos under `/tmp/pi-github-repos/` instead of re-cloning.
|
|
296
296
|
- If initial results are insufficient, refine search terms and try again.
|
|
@@ -313,4 +313,4 @@ For library-source answers, every code claim should look like the citation examp
|
|
|
313
313
|
| Page returns 403 / bot block | Gemini fallback triggers automatically; no action needed if Gemini is configured. |
|
|
314
314
|
| `web_search` fails | Check provider config; try explicit `provider: "gemini"` if a Perplexity key is missing. |
|
|
315
315
|
|
|
316
|
-
Remember: you are the user's expert guide to technical research. Lean on `fetch_content` first with the `/llms.txt` → `Accept: text/markdown` → `browser
|
|
316
|
+
Remember: you are the user's expert guide to technical research. Lean on `fetch_content` first with the `/llms.txt` → `Accept: text/markdown` → `browser` fallback chain to efficiently pull authoritative content, clone open-source repos when implementation evidence is needed, store anything reusable under `research/web/`, and deliver comprehensive, up-to-date answers with exact citations and GitHub permalinks. Answer directly — skip preamble like "I'll help you with…" and go straight to findings.
|
|
@@ -4,7 +4,7 @@ description: Debug errors, test failures, and unexpected behavior. Use PROACTIVE
|
|
|
4
4
|
tools: read, edit, write, grep, find, ls, bash, web_search, fetch_content, get_search_content
|
|
5
5
|
model: openai/gpt-5.5:xhigh
|
|
6
6
|
fallbackModels: openai-codex/gpt-5.5:xhigh, github-copilot/gpt-5.5:xhigh, anthropic/claude-opus-4-8:xhigh, github-copilot/claude-opus-4.7:xhigh
|
|
7
|
-
skills: tdd, browser
|
|
7
|
+
skills: tdd, browser, tmux
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are tasked with debugging and identifying errors, test failures, and unexpected behavior in the codebase. Your goal is to identify root causes, generate a report detailing the issues and proposed fixes, and fix the problem from that report.
|
|
@@ -13,13 +13,13 @@ You are tasked with debugging and identifying errors, test failures, and unexpec
|
|
|
13
13
|
|
|
14
14
|
- `tdd` — load the TDD skill before creating or modifying any tests.
|
|
15
15
|
- `tmux` load the tmux skill for debugging terminal environment or TUI apps.
|
|
16
|
-
- `browser
|
|
16
|
+
- `browser` — load the browser skill for debugging web apps. Assume the `browse` CLI is installed; if it fails, follow the skill setup (`which browse || npm install -g browse`) or use `npx browse`.
|
|
17
17
|
- `fetch_content <url>` — the `pi-web-access` fetch tool returns reader-mode text/markdown for URLs (HTML, JSON, PDFs, GitHub issues/PRs, npm, arXiv, RSS, Reddit, Stack Overflow, etc.). Prefer it over a real browser when you only need page content.
|
|
18
18
|
- `web_search` / `get_search_content` — issue web queries and bulk-fetch the top results for triage.
|
|
19
|
-
- `
|
|
19
|
+
- `browse` (via `bash` after loading the `browser` skill) — full Chromium when you need JS execution, auth, or interactive actions. Prefer snapshots/structured state over screenshots for understanding page state.
|
|
20
20
|
|
|
21
21
|
<EXTREMELY_IMPORTANT>
|
|
22
|
-
- PREFER `fetch_content <url>` for static content. Only reach for the `browser
|
|
22
|
+
- PREFER `fetch_content <url>` for static content. Only reach for the `browser` skill's `browse` CLI when you need JS execution, authentication, or interactive page actions.
|
|
23
23
|
- ALWAYS `tdd` BEFORE creating or modifying any tests.
|
|
24
24
|
- NEVER suppress a failing test to make it pass. Reproduce the failure first; only then fix the underlying defect.
|
|
25
25
|
</EXTREMELY_IMPORTANT>
|
|
@@ -45,7 +45,7 @@ When you need to consult docs, forums, or issue trackers, apply these techniques
|
|
|
45
45
|
1. **`fetch_content <url>` first.** The `pi-web-access` fetch tool returns clean reader-mode text/markdown for HTML, GitHub issues/PRs, Stack Overflow, npm, arXiv, RSS, Wikipedia, Reddit, JSON endpoints, and PDFs — no browser needed.
|
|
46
46
|
2. **Check `/llms.txt`.** Many modern docs sites publish an AI-friendly index at `/llms.txt` (spec: [llmstxt.org](https://llmstxt.org/llms.txt)). Try `fetch_content https://<site>/llms.txt` before anything else; it often links directly to the most relevant pages in plain text.
|
|
47
47
|
3. **`Accept: text/markdown` header.** Some sites behind Cloudflare serve pre-converted Markdown via the header. If `fetch_content` returns thin or noisy content, try `bash` with `curl <url> -H "Accept: text/markdown"`.
|
|
48
|
-
4. **Fall back to the browser
|
|
48
|
+
4. **Fall back to the browser skill** — only when JS execution, login, or interactive actions are required.
|
|
49
49
|
|
|
50
50
|
**Persist useful findings to `research/web/`:** When you fetch a document worth keeping for future sessions (error-message writeups, API schemas, troubleshooting guides, release notes), save it to `research/web/<YYYY-MM-DD>-<kebab-case-topic>.md` with a short header noting the source URL and fetch date. Future debugging sessions can then reuse the lookup without re-fetching.
|
|
51
51
|
|
|
@@ -79,7 +79,7 @@ Debugging process:
|
|
|
79
79
|
- Form and test hypotheses
|
|
80
80
|
- Add strategic debug logging or drive the project's own debugger (`bun --inspect`, `node --inspect-brk`, `python -m pdb`, etc.) through `bash` instead of `print` spam
|
|
81
81
|
- Inspect variable state by capturing it through the project's debugger session in `bash` or by writing a short repro script
|
|
82
|
-
- Use the web research order above (`fetch_content <url>` → `/llms.txt` → `Accept: text/markdown` → browser
|
|
82
|
+
- Use the web research order above (`fetch_content <url>` → `/llms.txt` → `Accept: text/markdown` → browser) to look up external library docs, error messages, Stack Overflow threads, and GitHub issues
|
|
83
83
|
|
|
84
84
|
For each issue, provide:
|
|
85
85
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.7",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and TUI clarification. Fork of: https://github.com/nicobailon/pi-subagents",
|
|
6
6
|
"contributors": [
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@bastani/atomic": "*",
|
|
41
|
-
"@earendil-works/pi-agent-core": "
|
|
42
|
-
"@earendil-works/pi-ai": "
|
|
43
|
-
"@earendil-works/pi-tui": "
|
|
41
|
+
"@earendil-works/pi-agent-core": "^0.78.1",
|
|
42
|
+
"@earendil-works/pi-ai": "^0.78.1",
|
|
43
|
+
"@earendil-works/pi-tui": "^0.78.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"@bastani/atomic": {
|
|
@@ -38,7 +38,7 @@ External researcher (`codebase-online-researcher`):
|
|
|
38
38
|
|
|
39
39
|
- Study linked projects, docs, issues, examples, source code, or prompt guidance.
|
|
40
40
|
- Identify the behavior, API, implementation files, constraints, and transferable ideas.
|
|
41
|
-
- Use `fetch_content` first, then `/llms.txt`, then `Accept: text/markdown`, and only fall back to `browser
|
|
41
|
+
- Use `fetch_content` first, then `/llms.txt`, then `Accept: text/markdown`, and only fall back to `browser` when JS execution or auth is required.
|
|
42
42
|
- Persist any high-value fetch to `research/web/<YYYY-MM-DD>-<topic>.md`.
|
|
43
43
|
- Return source links, repo paths, key evidence, risks, and what matters for this implementation.
|
|
44
44
|
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Browser Automation Examples
|
|
2
|
+
|
|
3
|
+
Common browser automation workflows using the `browse` CLI. Each example demonstrates a distinct pattern using real commands.
|
|
4
|
+
|
|
5
|
+
For localhost and other local dev flows, start with `browse open <url> --local` for a clean isolated browser. Use `browse open <url> --auto-connect` only when the agent should attach to an existing debuggable Chrome session for cookies or login state.
|
|
6
|
+
|
|
7
|
+
## Example 1: Extract Data from a Page
|
|
8
|
+
|
|
9
|
+
**User request**: "Get the product details from example.com/product/123"
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
browse open https://example.com/product/123
|
|
13
|
+
browse snapshot # read page structure + element refs
|
|
14
|
+
browse get text "body" # extract all visible text content
|
|
15
|
+
browse stop
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Parse the text output to extract structured data (name, price, description, etc.).
|
|
19
|
+
|
|
20
|
+
For a specific section, use a CSS selector:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
browse get text ".product-details" # text from a specific container
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Note**: `browse get text` requires a CSS selector — use `"body"` for all page text.
|
|
27
|
+
|
|
28
|
+
## Example 2: Fill and Submit a Form
|
|
29
|
+
|
|
30
|
+
**User request**: "Fill out the contact form on example.com with my information"
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
browse open https://example.com/contact
|
|
34
|
+
browse snapshot # find form fields and their refs
|
|
35
|
+
browse click @0-3 # click the Name input (ref from snapshot)
|
|
36
|
+
browse type "John Doe"
|
|
37
|
+
browse press Tab # move to next field
|
|
38
|
+
browse type "john@example.com"
|
|
39
|
+
browse fill "#message" "I would like to inquire about your services"
|
|
40
|
+
browse snapshot # verify fields are filled
|
|
41
|
+
browse click @0-8 # click Submit button (ref from snapshot)
|
|
42
|
+
browse snapshot # confirm submission result
|
|
43
|
+
browse stop
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Key pattern**: Use `browse snapshot` before interacting to discover element refs, then `browse click <ref>` and `browse type` to interact.
|
|
47
|
+
|
|
48
|
+
## Example 3: Multi-Step Navigation
|
|
49
|
+
|
|
50
|
+
**User request**: "Get headlines from the first 3 pages of results on example.com/news"
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
browse open https://example.com/news
|
|
54
|
+
browse snapshot # read page 1 content
|
|
55
|
+
browse get text ".headline" # extract headlines
|
|
56
|
+
|
|
57
|
+
browse snapshot # find "Next" button ref
|
|
58
|
+
browse click @0-12 # click Next (ref from snapshot)
|
|
59
|
+
browse wait load # wait for page 2 to load
|
|
60
|
+
browse get text ".headline" # extract page 2 headlines
|
|
61
|
+
|
|
62
|
+
browse snapshot # find Next again (ref may change)
|
|
63
|
+
browse click @0-15 # click Next
|
|
64
|
+
browse wait load
|
|
65
|
+
browse get text ".headline" # extract page 3 headlines
|
|
66
|
+
|
|
67
|
+
browse stop
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Key pattern**: Re-run `browse snapshot` after each navigation because element refs change when the page updates.
|
|
71
|
+
|
|
72
|
+
## Example 4: Escalate to Remote Mode
|
|
73
|
+
|
|
74
|
+
**User request**: "Scrape pricing from competitor.com" (a site with Cloudflare protection)
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Attempt 1: local mode
|
|
78
|
+
browse open https://competitor.com/pricing --local
|
|
79
|
+
browse snapshot
|
|
80
|
+
# Output shows: "Checking your browser..." (Cloudflare interstitial)
|
|
81
|
+
# or: page content is empty / access denied
|
|
82
|
+
browse stop
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The agent detects bot protection and tells the user:
|
|
86
|
+
|
|
87
|
+
> This site has Cloudflare bot detection. Browserbase remote mode can use Browserbase Identity with a Verified browser and residential proxies. Want me to set it up?
|
|
88
|
+
|
|
89
|
+
If the user agrees:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Set Browserbase credentials
|
|
93
|
+
export BROWSERBASE_API_KEY="bb_live_..."
|
|
94
|
+
|
|
95
|
+
# Retry in remote mode
|
|
96
|
+
browse open https://competitor.com/pricing --remote
|
|
97
|
+
browse snapshot # full page content now accessible
|
|
98
|
+
browse get text ".pricing-table"
|
|
99
|
+
browse stop
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Example 5: Persist Login with Context ID
|
|
103
|
+
|
|
104
|
+
**User request**: "Log into my dashboard and save the session so I don't have to log in again next time"
|
|
105
|
+
|
|
106
|
+
This uses Browserbase contexts to persist cookies and storage across sessions. Requires remote mode.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Session 1: Log in and persist state
|
|
110
|
+
SESSION_JSON="$(browse cloud sessions create --context-id ctx_abc123 --persist --keep-alive)"
|
|
111
|
+
SESSION_ID="$(echo "$SESSION_JSON" | jq -r .id)"
|
|
112
|
+
CONNECT_URL="$(echo "$SESSION_JSON" | jq -r .connectUrl)"
|
|
113
|
+
|
|
114
|
+
browse open https://app.example.com/login --cdp "$CONNECT_URL"
|
|
115
|
+
browse snapshot # find login form fields
|
|
116
|
+
browse click @0-3 # click email input
|
|
117
|
+
browse type "user@example.com"
|
|
118
|
+
browse press Tab
|
|
119
|
+
browse type "my-password"
|
|
120
|
+
browse click @0-7 # click Sign In button
|
|
121
|
+
browse wait load
|
|
122
|
+
browse snapshot # confirm logged-in dashboard
|
|
123
|
+
browse stop
|
|
124
|
+
browse cloud sessions update "$SESSION_ID" --status REQUEST_RELEASE # state is saved back to ctx_abc123
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
In a later session, reuse the same context — already authenticated:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Session 2: Resume with saved state (already logged in)
|
|
131
|
+
SESSION_JSON="$(browse cloud sessions create --context-id ctx_abc123 --keep-alive)"
|
|
132
|
+
SESSION_ID="$(echo "$SESSION_JSON" | jq -r .id)"
|
|
133
|
+
CONNECT_URL="$(echo "$SESSION_JSON" | jq -r .connectUrl)"
|
|
134
|
+
|
|
135
|
+
browse open https://app.example.com/dashboard --cdp "$CONNECT_URL"
|
|
136
|
+
browse snapshot # dashboard loads — no login needed
|
|
137
|
+
browse get text ".welcome-message"
|
|
138
|
+
browse stop
|
|
139
|
+
browse cloud sessions update "$SESSION_ID" --status REQUEST_RELEASE
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Key pattern**: Use `browse cloud sessions create --context-id <id> --persist` for the first Browserbase session to save auth state, then attach with `browse open ... --cdp "$CONNECT_URL"`. On subsequent sessions, create with the same `--context-id` and omit `--persist` if you don't want changes saved back.
|
|
143
|
+
|
|
144
|
+
## Tips
|
|
145
|
+
|
|
146
|
+
- **Snapshot first**: Always run `browse snapshot` before interacting — it gives you the accessibility tree with element refs
|
|
147
|
+
- **Use refs to click**: `browse click @0-5` is more reliable than trying to describe elements
|
|
148
|
+
- **Re-snapshot after actions**: Element refs change when the page updates
|
|
149
|
+
- **`get text` for data extraction**: Use `browse get text [selector]` to pull text content from specific elements
|
|
150
|
+
- **`stop` when done**: Always `browse stop` to clean up the browser session
|
|
151
|
+
- **Prefer snapshot over screenshot**: Snapshot is fast and structured; screenshot is slow and uses vision tokens. Only screenshot when you need visual context (layout, images, debugging)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Browserbase, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|