@bastani/atomic 0.10.14-alpha.1 → 0.10.15-alpha.1
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 +29 -0
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
- package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
- package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
- package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
- package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
- package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
- package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.code.js +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/compaction/compactor.d.ts +0 -8
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +1 -1
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +3 -3
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +2 -2
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +2 -2
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +2 -2
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +2 -2
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +1 -1
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/startup-database-spare.code.js +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +182 -0
- package/docs/background-tasks.md +98 -405
- package/docs/build.md +67 -27
- package/docs/changelog.mdx +9 -0
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +76 -63
- package/docs/environment-variables.md +94 -44
- package/docs/extensions/api-reference.md +86 -43
- package/docs/extensions/authoring.md +162 -154
- package/docs/extensions/events.md +80 -25
- package/docs/extensions/examples.md +90 -85
- package/docs/extensions/ui.md +206 -82
- package/docs/extensions.md +79 -108
- package/docs/getting-started/authentication.md +67 -36
- package/docs/getting-started/first-session.md +53 -43
- package/docs/getting-started/installation.md +116 -89
- package/docs/getting-started/project-instructions.md +48 -34
- package/docs/guides/configuration.md +82 -20
- package/docs/guides/non-interactive.md +66 -24
- package/docs/guides/resume-on-any-machine.md +135 -82
- package/docs/guides/team-setup.md +114 -105
- package/docs/guides.md +76 -32
- package/docs/herdr.md +15 -16
- package/docs/how-atomic-works.md +140 -0
- package/docs/index.md +58 -44
- package/docs/intercom/operations.md +141 -151
- package/docs/intercom/reference.md +85 -108
- package/docs/intercom.md +84 -145
- package/docs/json.md +120 -67
- package/docs/keybindings.md +85 -49
- package/docs/libraries/agent-core.md +137 -275
- package/docs/libraries/ai.md +100 -84
- package/docs/libraries/codemode.md +210 -300
- package/docs/libraries/schema.md +59 -53
- package/docs/libraries/storage-postgres.md +49 -35
- package/docs/libraries/telemetry.md +153 -354
- package/docs/libraries/tui.md +265 -393
- package/docs/libraries.md +42 -26
- package/docs/llama-cpp.md +171 -161
- package/docs/mcp-servers.md +90 -51
- package/docs/models/choose-a-model.md +188 -0
- package/docs/models/reference.md +74 -30
- package/docs/models.md +153 -88
- package/docs/orchestration/migrating-workflows.md +23 -16
- package/docs/orchestration/patterns.md +39 -44
- package/docs/orchestration.md +65 -26
- package/docs/packages/authoring.md +51 -29
- package/docs/packages/reference.md +42 -21
- package/docs/packages.md +69 -58
- package/docs/programmatic.md +118 -24
- package/docs/prompt-templates.md +84 -83
- package/docs/providers/reference.md +43 -48
- package/docs/providers.md +219 -451
- package/docs/quickstart.md +140 -120
- package/docs/reference/cli.md +135 -97
- package/docs/reference.md +20 -18
- package/docs/rpc/examples.md +76 -20
- package/docs/rpc/extension-ui.md +64 -38
- package/docs/rpc/protocol.md +361 -110
- package/docs/rpc.md +57 -17
- package/docs/sdk/reference.md +409 -534
- package/docs/sdk/storage.md +53 -13
- package/docs/sdk/structured-decisions.md +82 -56
- package/docs/sdk/web-server.md +57 -43
- package/docs/sdk.md +106 -84
- package/docs/security.md +42 -64
- package/docs/session-format.md +62 -38
- package/docs/sessions.md +99 -214
- package/docs/settings.md +165 -195
- package/docs/shell-aliases.md +9 -6
- package/docs/skills/authoring.md +69 -48
- package/docs/skills/reference.md +51 -20
- package/docs/skills.md +99 -148
- package/docs/slash-commands.md +129 -0
- package/docs/storage/custom-adapters.md +160 -85
- package/docs/storage/jsonl.md +81 -66
- package/docs/storage/postgres/pgbouncer.md +120 -126
- package/docs/storage/postgres/tuning.md +120 -143
- package/docs/storage/postgres.md +314 -330
- package/docs/storage/sqlite.md +71 -42
- package/docs/storage.md +298 -302
- package/docs/subagents/authoring.md +55 -38
- package/docs/subagents/reference.md +73 -33
- package/docs/subagents.md +119 -187
- package/docs/terminal-setup.md +50 -38
- package/docs/termux.md +67 -41
- package/docs/themes/reference.md +23 -19
- package/docs/themes.md +142 -127
- package/docs/tmux.md +47 -55
- package/docs/tools.md +147 -109
- package/docs/tui/reference.md +166 -214
- package/docs/tui.md +196 -341
- package/docs/usage.md +118 -138
- package/docs/verification.md +79 -51
- package/docs/web-access.md +121 -101
- package/docs/windows.md +26 -27
- package/docs/worktree-snapshots/reference.md +245 -0
- package/docs/worktree-snapshots.md +71 -259
- package/package.json +8 -8
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
- package/docs/guides/intercom.md +0 -32
- package/docs/guides/orchestration.md +0 -28
- package/docs/guides/subagents.md +0 -37
|
@@ -8,11 +8,39 @@ description: "Reference for extension lifecycle events, payloads, handler chaini
|
|
|
8
8
|
|
|
9
9
|
Subscribe to lifecycle events with `atomic.on(event, handler)`. Every `atomic.on()` call returns an unsubscribe function `() => void` if you need to detach a listener before reload or shutdown.
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
## Quick-reference event index
|
|
12
|
+
|
|
13
|
+
| Event | Fires when | Can modify or cancel? |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| [`project_trust`](#project_trust) | Before deciding whether to trust project config | Decide trust (`"yes"` / `"no"` / `"undecided"`) |
|
|
16
|
+
| [`resources_discover`](#resources_discover) | After `session_start` on startup or `/reload` | Contribute skill, prompt, and theme paths |
|
|
17
|
+
| [`session_start`](#session_start) | Session starts, reloads, switches, or forks | Notification-only |
|
|
18
|
+
| [`session_recovery_restore`](#session_recovery_restore) / `session_recovery_replay` | Recovering unfinished work after an earlier exit | Return notices; replay, drop, or defer pending cards |
|
|
19
|
+
| [`session_info_changed`](#session_info_changed) | Session display name changes | Notification-only |
|
|
20
|
+
| [`session_before_switch`](#session_before_switch) | Before `/new` or `/resume` | Cancel |
|
|
21
|
+
| [`session_before_fork`](#session_before_fork) | Before `/fork` or `/clone` | Cancel or skip conversation restore |
|
|
22
|
+
| [`session_before_compact`](#session_before_compact) | Before `/compact` or automatic compaction | Cancel or return `{ compactedText }` |
|
|
23
|
+
| [`session_compact`](#session_before_compact) / `session_compact_failed` | After compaction persists, fails, or cancels | Notification-only |
|
|
24
|
+
| [`session_before_tree`](#session_before_tree) / `session_tree` | Before / after `/tree` navigation | Cancel, customize summary prompt/label, or supply summary |
|
|
25
|
+
| [`session_shutdown`](#session_shutdown) | Before quit, reload, switch, or fork | Cleanup; thrown errors propagate as `AggregateError` |
|
|
26
|
+
| [`input`](#input) | User input arrives (after slash commands, before skill/template expansion) | Transform text/images or handle (`"handled"`) |
|
|
27
|
+
| [`before_agent_start`](#before_agent_start) | Before a model run begins | Inject custom message; edit system prompt or active tools |
|
|
28
|
+
| [`agent_start`](#agent_start) / `agent_end` / `agent_settled` | Start, end, and final settlement of an agent run | Notification-only |
|
|
29
|
+
| [`agent_before_settle`](#agent_start) | Final actionable boundary before going idle | Append entries and request one continuation |
|
|
30
|
+
| [`ui_prompt_start`](#ui_prompt_start) / `ui_prompt_end` | Blocking user prompt opens or closes | Notification-only |
|
|
31
|
+
| [`turn_start`](#turn_start) / `turn_end` | Around each model turn + tool batch | `turn_end`: append entries and request continuation |
|
|
32
|
+
| [`message_start`](#message_start) / `message_update` / `message_end` | Message lifecycle and streaming deltas | `message_end`: replace finalized message (same role) |
|
|
33
|
+
| [`context`](#context) / [`context_with_system`](#context_with_system) | Before each provider request | Filter or rewrite messages (`context_with_system` includes system messages) |
|
|
34
|
+
| [`before_provider_headers`](#before_provider_headers) / [`before_provider_request`](#before_provider_request) | Before HTTP dispatch | Mutate headers / replace request payload |
|
|
35
|
+
| [`after_provider_response`](#after_provider_response) / [`provider_stream_event`](#provider_stream_event) | HTTP response received / raw stream chunk arrives | Notification-only |
|
|
36
|
+
| [`tool_execution_start`](#tool_execution_start) / `_update` / `_end` | Around each tool execution | Notification-only |
|
|
37
|
+
| [`tool_call`](#tool_call) | Before tool `execute()` | Patch arguments, block call, or terminate turn |
|
|
38
|
+
| [`tool_result`](#tool_result) | After tool finishes, before persistence | Patch `content`, `structuredContent`, `details`, `usage`, `isError` |
|
|
39
|
+
| [`model_select`](#model_select) / [`thinking_level_select`](#thinking_level_select) | Active model or thinking level changes | Notification-only |
|
|
40
|
+
| [`cache_warming_decision`](#cache_warming_decision) | Prompt cache warmer evaluates a tick | Override `{ action: "warm" \| "stop" }` |
|
|
41
|
+
| [`user_bash`](#user_bash) | User runs `!` or `!!` shell command | Return custom `{ operations }` or direct `{ result }` |
|
|
14
42
|
|
|
15
|
-
|
|
43
|
+
## Lifecycle overview
|
|
16
44
|
|
|
17
45
|
```text
|
|
18
46
|
Atomic starts
|
|
@@ -118,7 +146,7 @@ atomic.on("project_trust", async (event, ctx) => {
|
|
|
118
146
|
|
|
119
147
|
A `project_trust` handler must return `{ trusted: "yes" | "no" | "undecided" }`. The first `"yes"` or `"no"` decision wins and suppresses the built-in trust prompt. Set `remember: true` to persist the decision; otherwise it applies to the current process only.
|
|
120
148
|
|
|
121
|
-
Return `"undecided"` to pass control to later handlers or Atomic's built-in trust flow, and check `ctx.hasUI` before prompting. If no handler decides, saved `trust.json` decisions apply first, then `defaultProjectTrust` decides whether Atomic asks, trusts, or declines.
|
|
149
|
+
Return `"undecided"` to pass control to later handlers or Atomic's built-in trust flow, and check `ctx.hasUI` before prompting. If a handler throws an error, Atomic records the error and continues to the next handler. Any dialogs opened by a handler are automatically aborted when that handler settles. If no handler decides, saved `trust.json` decisions apply first, then `defaultProjectTrust` decides whether Atomic asks, trusts, or declines.
|
|
122
150
|
|
|
123
151
|
## Resource events
|
|
124
152
|
|
|
@@ -138,6 +166,10 @@ atomic.on("resources_discover", async (event, _ctx) => {
|
|
|
138
166
|
});
|
|
139
167
|
```
|
|
140
168
|
|
|
169
|
+
<Note>
|
|
170
|
+
When interactive startup must ask whether to trust a project, user, global, and CLI `-e` extensions start first (receiving `session_start` and `resources_discover`) so they can participate in `project_trust`. After trust is granted, project extensions load, receive `session_start`, and `resources_discover` runs again for the full set. Already-started extensions do not receive a second `session_start`, and a `resources_discover` handler that fails both passes with the same error is reported once (different handlers are reported separately). Non-interactive startup resolves trust before running the normal lifecycle.
|
|
171
|
+
</Note>
|
|
172
|
+
|
|
141
173
|
## Session events
|
|
142
174
|
|
|
143
175
|
See [Session format](/session-format) for session storage details and the `SessionManager` API.
|
|
@@ -159,7 +191,7 @@ atomic.on("session_start", async (event, ctx) => {
|
|
|
159
191
|
|
|
160
192
|
If a handler throws, interactive mode shows the error with the extension's path and keeps the session open; print mode, RPC mode, and SDK sessions fail startup instead. See [Error handling](/extensions/api-reference#error-handling).
|
|
161
193
|
|
|
162
|
-
### session_recovery_restore / session_recovery_replay
|
|
194
|
+
### session_recovery_restore / session_recovery_replay {#session_recovery_restore}
|
|
163
195
|
|
|
164
196
|
Fired once per session when recovering unfinished work from an earlier process. Interactive mode runs them after the transcript renders; SDK and RPC hosts run them when calling `session.startPendingRecovery()` or sending `start_pending_recovery`.
|
|
165
197
|
|
|
@@ -234,19 +266,20 @@ atomic.on("session_before_fork", async (event) => {
|
|
|
234
266
|
|
|
235
267
|
After a successful fork or clone, Atomic emits `session_shutdown`, reloads extensions for the new session, and emits `session_start` with `reason: "fork"` and `previousSessionId`.
|
|
236
268
|
|
|
237
|
-
### session_before_compact / session_compact / session_compact_failed
|
|
269
|
+
### session_before_compact / session_compact / session_compact_failed {#session_before_compact}
|
|
238
270
|
|
|
239
271
|
Fired by `/compact` and automatic compaction, including when tool output pushes the prospective next-turn context past the threshold. Atomic prepares all context since the last compaction boundary.
|
|
240
272
|
|
|
241
|
-
Handlers on `session_before_compact` can cancel compaction (`{ cancel: true }`, short-circuiting later handlers) or return `{ compactedText }`. When `compactedText` is provided, Atomic skips
|
|
273
|
+
Handlers on `session_before_compact` can cancel compaction (`{ cancel: true }`, short-circuiting later handlers) or return `{ compactedText }`. When non-empty `compactedText` is provided, Atomic skips any configured compactor model and inserts that text verbatim into a `Context compacted` boundary message followed by history recovery instructions. Empty or whitespace-only text counts as no replacement so the configured compaction form runs instead.
|
|
242
274
|
|
|
243
|
-
|
|
275
|
+
Extension-provided `compactedText` has **no built-in size limit** and does not fall back to clearing the context. Keep it concise so the rebuilt context fits comfortably in the active model's context window. (For automatic compaction, Atomic skips compaction before calling `session_before_compact` if even a cleared context plus the system prompt would still reach the threshold.) A successful post-tool compaction feeds its rebuilt context directly into the active turn loop; cancellation or failure stops the follow-up model request.
|
|
244
276
|
|
|
245
277
|
```typescript
|
|
246
278
|
atomic.on("session_before_compact", async (event) => {
|
|
247
279
|
const { preparation, branchEntries, parameters, reason, signal } = event;
|
|
248
280
|
// preparation.region.lines - role-tagged lines since the last boundary (deep-frozen)
|
|
249
|
-
// preparation.firstKeptEntryId - always null
|
|
281
|
+
// preparation.firstKeptEntryId - always null (backward-compatibility field; verbatim
|
|
282
|
+
// compaction replaces everything before the boundary rather than keeping a tail)
|
|
250
283
|
// preparation.tokensBefore - whole-context token estimate
|
|
251
284
|
// parameters.query - /compact instructions or latest user request
|
|
252
285
|
// branchEntries - raw entries on the active branch
|
|
@@ -263,7 +296,8 @@ atomic.on("session_before_compact", async (event) => {
|
|
|
263
296
|
|
|
264
297
|
atomic.on("session_compact", async (event) => {
|
|
265
298
|
// event.result - VerbatimCompactionResult (compactedText, form, backend, model, fallbackReason, history, stats)
|
|
266
|
-
// event.compactionEntry - saved CompactionEntry
|
|
299
|
+
// event.compactionEntry - saved CompactionEntry (details.strategy is "verbatim-lines",
|
|
300
|
+
// identifying Atomic's verbatim-history compaction format)
|
|
267
301
|
// event.fromExtension - true when session_before_compact provided compactedText
|
|
268
302
|
// Notification-only: handler errors are logged and do not affect the saved compaction.
|
|
269
303
|
});
|
|
@@ -276,7 +310,7 @@ atomic.on("session_compact_failed", async (event) => {
|
|
|
276
310
|
});
|
|
277
311
|
```
|
|
278
312
|
|
|
279
|
-
### session_before_tree / session_tree
|
|
313
|
+
### session_before_tree / session_tree {#session_before_tree}
|
|
280
314
|
|
|
281
315
|
Fired on `/tree` navigation. See [Sessions](/sessions) for tree navigation concepts.
|
|
282
316
|
|
|
@@ -323,7 +357,11 @@ atomic.on("session_shutdown", async (event) => {
|
|
|
323
357
|
|
|
324
358
|
`fromSignal` is set only when `reason === "quit"` came from an OS signal (`SIGTERM`, `SIGHUP`, or terminal close); `Ctrl+D` and `/quit` leave it unset.
|
|
325
359
|
|
|
326
|
-
|
|
360
|
+
<Warning>
|
|
361
|
+
Unlike most lifecycle events, uncaught errors from `session_shutdown` handlers (and tracked shutdown work) are **not** silently ignored: Atomic collects them into an `AggregateError("Extension shutdown failed")` with `code: "ShutdownFailed"` and re-throws it. During retired cleanup on reload or session switch, `atomic.events.emit()` is silently ignored and session-mutating actions throw stale-context errors.
|
|
362
|
+
</Warning>
|
|
363
|
+
|
|
364
|
+
Handlers have about 5 seconds to finish on Linux and macOS quit or signal shutdown (a second `SIGTERM` exits immediately), and about 4 seconds on Windows console close or OS shutdown after startup finishes. Any running [`atomic.exec`](/extensions/api-reference#atomic-exec-command-args-options) command is stopped first (1-second grace) so it cannot block shutdown handlers; commands started inside `session_shutdown` run without that 1-second pre-shutdown kill.
|
|
327
365
|
|
|
328
366
|
## Agent events
|
|
329
367
|
|
|
@@ -358,7 +396,7 @@ atomic.on("before_agent_start", async (event) => {
|
|
|
358
396
|
|
|
359
397
|
Prefer mutating `event.systemPromptOptions.sections`, `selectedTools`, or `promptGuidelines` instead of returning a full `systemPrompt` override so prompt caching stays intact. Editing `selectedTools` or calling `atomic.setActiveTools()` here applies to the same run's executable tools as well as its prompt text.
|
|
360
398
|
|
|
361
|
-
### agent_start / agent_end / agent_before_settle / agent_settled
|
|
399
|
+
### agent_start / agent_end / agent_before_settle / agent_settled {#agent_start}
|
|
362
400
|
|
|
363
401
|
- `agent_start` marks the start of one low-level model run.
|
|
364
402
|
- `agent_end` marks the end of that run (Atomic may still retry, compact and retry, or deliver queued follow-ups).
|
|
@@ -397,9 +435,11 @@ atomic.on("agent_settled", async (event, ctx) => {
|
|
|
397
435
|
|
|
398
436
|
If aborted during `agent_before_settle`, valid entries still persist while `continue: true` is suppressed. Input queued from `agent_before_settle` with `deliverAs: "steer"` or `"followUp"` joins the requested continuation instead of starting a second run.
|
|
399
437
|
|
|
400
|
-
|
|
438
|
+
<Warning>
|
|
439
|
+
Each provider request builds from the persisted session only after earlier event handlers (`agent_start`, `turn_start`, `message_start`, `message_end`, `tool_execution_*`) finish, because `message_end` can modify a saved message. Never await work that depends on a later step of the same run inside those handlers; wait in `agent_end` or `agent_settled` instead.
|
|
440
|
+
</Warning>
|
|
401
441
|
|
|
402
|
-
### ui_prompt_start / ui_prompt_end
|
|
442
|
+
### ui_prompt_start / ui_prompt_end {#ui_prompt_start}
|
|
403
443
|
|
|
404
444
|
Notification-only events wrapping blocking user-facing prompts:
|
|
405
445
|
|
|
@@ -420,7 +460,7 @@ atomic.on("ui_prompt_end", (event) => {
|
|
|
420
460
|
});
|
|
421
461
|
```
|
|
422
462
|
|
|
423
|
-
### turn_start / turn_end
|
|
463
|
+
### turn_start / turn_end {#turn_start}
|
|
424
464
|
|
|
425
465
|
Fired around each turn (one model response plus its tool calls). `turn_end` runs after the assistant message and tool results persist, and lets extensions append structural entries and request a continuation.
|
|
426
466
|
|
|
@@ -434,7 +474,7 @@ atomic.on("turn_end", async (event) => {
|
|
|
434
474
|
// event.turnIndex, event.message, event.toolResults
|
|
435
475
|
// event.messageEntryId, event.toolResultEntryIds, event.outcome
|
|
436
476
|
// event.entries - entries proposed by earlier handlers
|
|
437
|
-
// event.context -
|
|
477
|
+
// event.context - preview of the context after applying proposed entries
|
|
438
478
|
if (replacedResponse || event.outcome !== "completed" || event.toolResults.length > 0) return;
|
|
439
479
|
replacedResponse = true;
|
|
440
480
|
return {
|
|
@@ -453,14 +493,22 @@ atomic.on("turn_end", async (event) => {
|
|
|
453
493
|
});
|
|
454
494
|
```
|
|
455
495
|
|
|
496
|
+
`event.context` (`BoundaryContextPreview`, present on both `turn_end` and `agent_before_settle`) previews the next request after applying all `entries` proposed so far:
|
|
497
|
+
|
|
498
|
+
- `contextEntries`: projected session entries that will remain in context.
|
|
499
|
+
- `contextMessages`: agent messages built from `contextEntries`.
|
|
500
|
+
- `llmMessages`: provider-ready messages converted from `contextMessages`.
|
|
501
|
+
- `pendingMessages`: queued steering or follow-up messages waiting to be delivered.
|
|
502
|
+
- `canContinue`: `true` when the turn or run can legally start another model request (`false` after an `"aborted"` or `"error"` outcome).
|
|
503
|
+
|
|
456
504
|
Boundary rules shared by `turn_end` and `agent_before_settle`:
|
|
457
505
|
|
|
458
|
-
- Allowed draft entry types are `custom`, `custom_message`, `context_edit`, and `compaction` (`summary
|
|
506
|
+
- Allowed draft entry types are `custom`, `custom_message`, `context_edit`, and `compaction` (`{ type: "compaction", summary, firstKeptEntryId, usage? }`, where `firstKeptEntryId` is either an existing entry ID to keep from that point onward or `null` to replace the entire pre-boundary transcript).
|
|
459
507
|
- Returning `entries` or `continue` updates only that field; omitted fields keep earlier handlers' proposals.
|
|
460
|
-
- Atomic validates the combined proposal
|
|
508
|
+
- Atomic validates the combined proposal after each handler. If a handler throws, the error is reported without stopping later handlers. **If the final combined `entries` fail validation, Atomic discards all proposed `entries` (including valid ones from earlier handlers) and forces `continue` to `false`.**
|
|
461
509
|
- `continue: true` ensures one next model request when tool results, steering, or follow-ups do not already trigger one. Always guard `continue: true` so it cannot loop indefinitely. Error and aborted outcomes stop regardless.
|
|
462
510
|
|
|
463
|
-
### message_start / message_update / message_end
|
|
511
|
+
### message_start / message_update / message_end {#message_start}
|
|
464
512
|
|
|
465
513
|
- `message_start` and `message_end` fire for `user`, `assistant`, and `toolResult` messages.
|
|
466
514
|
- `message_update` fires for streaming assistant deltas (`event.assistantMessageEvent`).
|
|
@@ -486,7 +534,7 @@ atomic.on("message_end", async (event) => {
|
|
|
486
534
|
});
|
|
487
535
|
```
|
|
488
536
|
|
|
489
|
-
### tool_execution_start / tool_execution_update / tool_execution_end
|
|
537
|
+
### tool_execution_start / tool_execution_update / tool_execution_end {#tool_execution_start}
|
|
490
538
|
|
|
491
539
|
Fired around each tool execution. Nested tool calls invoked through `ctx.executeTool()` include `event.parentToolCallId`.
|
|
492
540
|
|
|
@@ -523,7 +571,12 @@ atomic.on("context", async (event) => {
|
|
|
523
571
|
});
|
|
524
572
|
```
|
|
525
573
|
|
|
526
|
-
`event.messages` excludes system messages so filtering cannot drop Atomic's prompt or tool declarations.
|
|
574
|
+
`event.messages` excludes system messages so filtering cannot drop Atomic's prompt or tool declarations. Handlers may either return `{ messages }` or mutate `event.messages` in place:
|
|
575
|
+
|
|
576
|
+
- **In-place field edits on the same element references** preserve mid-conversation system patches so prompt caching stays intact.
|
|
577
|
+
- **Splicing, filtering, or replacing message elements** triggers Atomic to replay the active prompt sections and tool declarations into one leading system message ahead of your returned messages.
|
|
578
|
+
|
|
579
|
+
To change prompts or tools durably, use [`before_agent_start`](#before_agent_start) or `atomic.setActiveTools()`; to edit system messages directly for one request, use [`context_with_system`](#context_with_system).
|
|
527
580
|
|
|
528
581
|
### context_with_system
|
|
529
582
|
|
|
@@ -539,7 +592,7 @@ atomic.on("context_with_system", async (event) => {
|
|
|
539
592
|
});
|
|
540
593
|
```
|
|
541
594
|
|
|
542
|
-
Keep a system message at index `0
|
|
595
|
+
Keep a system message at index `0`. If a handler removes the leading system message, Atomic reports an extension error **but still sends your returned array verbatim to the provider**. Verify your result with `getCurrentSystemPrompt()` and `getCurrentTools()` from `@bastani/atomic-ai`. A `systemPrompt` forced in `before_agent_start` still applies afterward.
|
|
543
596
|
|
|
544
597
|
### before_provider_headers
|
|
545
598
|
|
|
@@ -744,6 +797,8 @@ atomic.on("tool_result", async (event, ctx) => {
|
|
|
744
797
|
|
|
745
798
|
Fired when the user runs `!` or `!!` shell commands. Return `{ operations }` to customize execution (optionally wrapping `createLocalBashOperations()` from `@bastani/atomic`) or `{ result }` to return a result directly.
|
|
746
799
|
|
|
800
|
+
The **first** handler returning a non-`undefined` value wins and short-circuits later handlers. Return shapes are strictly validated: returning both `operations` and `result`, or omitting required fields (`operations.exec` or `{ output, exitCode, cancelled, truncated }`), throws an invalid-result error. Unlike most events, any error thrown by a `user_bash` handler is re-thrown and aborts the `!` command rather than falling back to local execution.
|
|
801
|
+
|
|
747
802
|
```typescript
|
|
748
803
|
import { createLocalBashOperations } from "@bastani/atomic";
|
|
749
804
|
|
|
@@ -816,4 +871,4 @@ See [input-transform.ts](https://github.com/bastani-inc/atomic/blob/main/package
|
|
|
816
871
|
|
|
817
872
|
## Next steps
|
|
818
873
|
|
|
819
|
-
Continue with [
|
|
874
|
+
Continue with [Build custom UI](/extensions/ui) to add dialogs, pickers, widgets, and custom components, or inspect all context properties in the [Extension API reference](/extensions/api-reference#extensioncontext).
|
|
@@ -4,142 +4,147 @@ sidebarTitle: "Examples"
|
|
|
4
4
|
description: "Browse runnable TypeScript extensions shipped in Atomic for custom tools, commands, hooks, UI components, and providers."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Every example below lives in [examples/extensions/](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions).
|
|
7
|
+
Every example below lives in [examples/extensions/](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions). Clone the repository (or copy an individual file locally), then try any example for one session with `-e`:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
git clone https://github.com/bastani-inc/atomic.git
|
|
11
|
+
atomic -e ./atomic/packages/coding-agent/examples/extensions/hello.ts
|
|
11
12
|
```
|
|
12
13
|
|
|
14
|
+
<Note>
|
|
15
|
+
**Interactive UI compatibility:** Default interactive CLI mode (`atomic`) runs extensions in an isolated worker process. Most examples work out of the box with `atomic -e`, while the UI examples marked **In-process TUI only** below rely on synchronous TUI callbacks, theme switching, or working-indicator APIs that require an embedded in-process TUI host via the SDK. See the [UI API compatibility matrix](/extensions/ui#ui-api-compatibility-matrix).
|
|
16
|
+
</Note>
|
|
17
|
+
|
|
13
18
|
## Tools
|
|
14
19
|
|
|
15
20
|
| Example | Description | Key APIs |
|
|
16
21
|
| --- | --- | --- |
|
|
17
|
-
| `hello.ts` | Minimal tool registration | `registerTool` |
|
|
18
|
-
| `question.ts` | Width-wrapped single-question custom UI with option descriptions and typed answers | `registerTool`, `ui.custom` |
|
|
19
|
-
| `questionnaire.ts` | Width-wrapped multi-step wizard with tab navigation and typed answers | `registerTool`, `ui.custom` |
|
|
20
|
-
| `todo.ts` | Stateful tool with session persistence | `registerTool`, `appendEntry`, `renderResult`, session events |
|
|
21
|
-
| `dynamic-tools.ts` | Register tools after startup and during commands | `registerTool`, `session_start`, `registerCommand` |
|
|
22
|
-
| `structured-output.ts` | Opt-in schema-specific `structured_output` tool using the canonical factory | `createStructuredOutputTool`, `registerTool`, terminating tool results |
|
|
23
|
-
| `truncated-tool.ts` | Output truncation example | `registerTool`, `truncateHead` |
|
|
24
|
-
| `tool-override.ts` | Override built-in `read` tool behavior | `registerTool` (same name as built-in) |
|
|
25
|
-
| `built-in-tool-renderer.ts` | Replace rendering of built-in tools (`read`, `bash`, `edit`, `write`) while delegating execution | `registerTool`, `create*ToolDefinition`, `renderShell: "self"` |
|
|
26
|
-
| `minimal-mode.ts` | Minimal collapsed rendering for built-in tools toggled with `Ctrl+O` | `registerTool`, `create*ToolDefinition`, `renderResult` |
|
|
22
|
+
| [`hello.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/hello.ts) | Minimal tool registration | `registerTool` |
|
|
23
|
+
| [`question.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/question.ts) | Width-wrapped single-question custom UI with option descriptions and typed answers | `registerTool`, `ui.custom` |
|
|
24
|
+
| [`questionnaire.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/questionnaire.ts) | Width-wrapped multi-step wizard with tab navigation and typed answers | `registerTool`, `ui.custom` |
|
|
25
|
+
| [`todo.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/todo.ts) | Stateful tool with session persistence | `registerTool`, `appendEntry`, `renderResult`, session events |
|
|
26
|
+
| [`dynamic-tools.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/dynamic-tools.ts) | Register tools after startup and during commands | `registerTool`, `session_start`, `registerCommand` |
|
|
27
|
+
| [`structured-output.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/structured-output.ts) | Opt-in schema-specific `structured_output` tool using the canonical factory | `createStructuredOutputTool`, `registerTool`, terminating tool results |
|
|
28
|
+
| [`truncated-tool.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/truncated-tool.ts) | Output truncation example | `registerTool`, `truncateHead` |
|
|
29
|
+
| [`tool-override.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/tool-override.ts) | Override built-in `read` tool behavior | `registerTool` (same name as built-in) |
|
|
30
|
+
| [`built-in-tool-renderer.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/built-in-tool-renderer.ts) | Replace rendering of built-in tools (`read`, `bash`, `edit`, `write`) while delegating execution | `registerTool`, `create*ToolDefinition`, `renderShell: "self"` |
|
|
31
|
+
| [`minimal-mode.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/minimal-mode.ts) | Minimal collapsed rendering for built-in tools toggled with `Ctrl+O` | `registerTool`, `create*ToolDefinition`, `renderResult` |
|
|
27
32
|
|
|
28
33
|
## Commands
|
|
29
34
|
|
|
30
35
|
| Example | Description | Key APIs |
|
|
31
36
|
| --- | --- | --- |
|
|
32
|
-
| `commands.ts` | `/commands` slash command that lists and filters all registered commands by source | `registerCommand`, `getCommands`, `getArgumentCompletions` |
|
|
33
|
-
| `pirate.ts` | Modify the system prompt per turn | `registerCommand`, `before_agent_start` |
|
|
34
|
-
| `summarize.ts` | Conversation summary command | `registerCommand`, `ui.custom` |
|
|
35
|
-
| `handoff.ts` | Cross-provider model handoff | `registerCommand`, `ui.editor`, `ui.custom` |
|
|
36
|
-
| `qna.ts` | Q&A helper with custom UI | `registerCommand`, `ui.custom`, `setEditorText` |
|
|
37
|
-
| `send-user-message.ts` | Inject user messages from a command | `registerCommand`, `sendUserMessage` |
|
|
38
|
-
| `reload-runtime.ts` | Reload command and model tool handoff | `registerCommand`, `ctx.reload()`, `sendUserMessage` |
|
|
39
|
-
| `shutdown-command.ts` | Graceful shutdown command | `registerCommand`, `ctx.shutdown()` |
|
|
37
|
+
| [`commands.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/commands.ts) | `/commands` slash command that lists and filters all registered commands by source | `registerCommand`, `getCommands`, `getArgumentCompletions` |
|
|
38
|
+
| [`pirate.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/pirate.ts) | Modify the system prompt per turn | `registerCommand`, `before_agent_start` |
|
|
39
|
+
| [`summarize.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/summarize.ts) | Conversation summary command | `registerCommand`, `ui.custom` |
|
|
40
|
+
| [`handoff.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/handoff.ts) | Cross-provider model handoff | `registerCommand`, `ui.editor`, `ui.custom` |
|
|
41
|
+
| [`qna.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/qna.ts) | Q&A helper with custom UI | `registerCommand`, `ui.custom`, `setEditorText` |
|
|
42
|
+
| [`send-user-message.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/send-user-message.ts) | Inject user messages from a command | `registerCommand`, `sendUserMessage` |
|
|
43
|
+
| [`reload-runtime.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/reload-runtime.ts) | Reload command and model tool handoff | `registerCommand`, `ctx.reload()`, `sendUserMessage` |
|
|
44
|
+
| [`shutdown-command.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/shutdown-command.ts) | Graceful shutdown command | `registerCommand`, `ctx.shutdown()` |
|
|
40
45
|
|
|
41
46
|
## Events and gates
|
|
42
47
|
|
|
43
48
|
| Example | Description | Key APIs |
|
|
44
49
|
| --- | --- | --- |
|
|
45
|
-
| `permission-gate.ts` | Prompt before dangerous bash commands | `on("tool_call")`, `ui.confirm` |
|
|
46
|
-
| `protected-paths.ts` | Block writes to protected paths | `on("tool_call")` |
|
|
47
|
-
| `confirm-destructive.ts` | Confirm session switches and forks | `on("session_before_switch")`, `on("session_before_fork")` |
|
|
48
|
-
| `dirty-repo-guard.ts` | Warn when switching sessions in a dirty git repo | `on("session_before_*")`, `exec` |
|
|
49
|
-
| `input-transform.ts` | Transform user input before the model sees it | `on("input")` |
|
|
50
|
-
| `input-transform-streaming.ts` | Streaming-aware input transformation | `on("input")`, `streamingBehavior` |
|
|
51
|
-
| `project-trust.ts` | Decide or defer project trust from a user or CLI extension | `on("project_trust")`, trust UI |
|
|
52
|
-
| `dynamic-resources/` | Dynamically contribute skills, prompt templates, and themes at startup | `on("resources_discover")` |
|
|
53
|
-
| `model-status.ts` | Display active model changes in the status bar | `on("model_select")`, `setStatus` |
|
|
54
|
-
| `provider-payload.ts` | Inspect outgoing payloads and provider response headers | `on("before_provider_request")`, `on("after_provider_response")` |
|
|
55
|
-
| `system-prompt-header.ts` | Display system prompt summary information | `on("agent_start")`, `getSystemPrompt` |
|
|
56
|
-
| `claude-rules.ts` | Load rules from files and inject them into turns | `on("session_start")`, `on("before_agent_start")` |
|
|
57
|
-
| `prompt-customizer.ts` | Add context-aware tool guidance using `systemPromptOptions` | `on("before_agent_start")`, `BuildSystemPromptOptions` |
|
|
58
|
-
| `file-trigger.ts` | File watcher that sends messages into the session | `sendMessage` |
|
|
50
|
+
| [`permission-gate.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/permission-gate.ts) | Prompt before dangerous bash commands | `on("tool_call")`, `ui.confirm` |
|
|
51
|
+
| [`protected-paths.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/protected-paths.ts) | Block writes to protected paths | `on("tool_call")` |
|
|
52
|
+
| [`confirm-destructive.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/confirm-destructive.ts) | Confirm session switches and forks | `on("session_before_switch")`, `on("session_before_fork")` |
|
|
53
|
+
| [`dirty-repo-guard.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/dirty-repo-guard.ts) | Warn when switching sessions in a dirty git repo | `on("session_before_*")`, `exec` |
|
|
54
|
+
| [`input-transform.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/input-transform.ts) | Transform user input before the model sees it | `on("input")` |
|
|
55
|
+
| [`input-transform-streaming.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/input-transform-streaming.ts) | Streaming-aware input transformation | `on("input")`, `streamingBehavior` |
|
|
56
|
+
| [`project-trust.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/project-trust.ts) | Decide or defer project trust from a user or CLI extension | `on("project_trust")`, trust UI |
|
|
57
|
+
| [`dynamic-resources/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/dynamic-resources) | Dynamically contribute skills, prompt templates, and themes at startup | `on("resources_discover")` |
|
|
58
|
+
| [`model-status.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/model-status.ts) | Display active model changes in the status bar | `on("model_select")`, `setStatus` |
|
|
59
|
+
| [`provider-payload.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/provider-payload.ts) | Inspect outgoing payloads and provider response headers | `on("before_provider_request")`, `on("after_provider_response")` |
|
|
60
|
+
| [`system-prompt-header.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/system-prompt-header.ts) | Display system prompt summary information | `on("agent_start")`, `getSystemPrompt` |
|
|
61
|
+
| [`claude-rules.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/claude-rules.ts) | Load rules from files and inject them into turns | `on("session_start")`, `on("before_agent_start")` |
|
|
62
|
+
| [`prompt-customizer.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/prompt-customizer.ts) | Add context-aware tool guidance using `systemPromptOptions` | `on("before_agent_start")`, `BuildSystemPromptOptions` |
|
|
63
|
+
| [`file-trigger.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/file-trigger.ts) | File watcher that sends messages into the session | `sendMessage` |
|
|
59
64
|
|
|
60
65
|
## Compaction and sessions
|
|
61
66
|
|
|
62
67
|
| Example | Description | Key APIs |
|
|
63
68
|
| --- | --- | --- |
|
|
64
|
-
| `custom-compaction.ts` | Replace compacted context with custom text without calling a model | `on("session_before_compact")`, `on("session_compact")` |
|
|
65
|
-
| `trigger-compact.ts` | Trigger compaction at a token threshold or via `/trigger-compact [instructions]` | `ctx.compact()` |
|
|
66
|
-
| `git-checkpoint.ts` | Create git stashes on turns for rollback | `on("turn_start")`, `on("session_before_fork")`, `exec` |
|
|
67
|
-
| `git-merge-and-resolve.ts` | Auto-fetch and merge upstream after each turn, sending conflict blocks to the agent | `on("agent_end")`, `exec`, `sendMessage` |
|
|
68
|
-
| `auto-commit-on-exit.ts` | Commit working tree changes on session shutdown | `on("session_shutdown")`, `exec` |
|
|
69
|
+
| [`custom-compaction.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/custom-compaction.ts) | Replace compacted context with custom text without calling a model | `on("session_before_compact")`, `on("session_compact")` |
|
|
70
|
+
| [`trigger-compact.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/trigger-compact.ts) | Trigger compaction at a token threshold or via `/trigger-compact [instructions]` | `ctx.compact()` |
|
|
71
|
+
| [`git-checkpoint.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/git-checkpoint.ts) | Create git stashes on turns for rollback | `on("turn_start")`, `on("session_before_fork")`, `exec` |
|
|
72
|
+
| [`git-merge-and-resolve.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/git-merge-and-resolve.ts) | Auto-fetch and merge upstream after each turn, sending conflict blocks to the agent | `on("agent_end")`, `exec`, `sendMessage` |
|
|
73
|
+
| [`auto-commit-on-exit.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/auto-commit-on-exit.ts) | Commit working tree changes on session shutdown | `on("session_shutdown")`, `exec` |
|
|
69
74
|
|
|
70
75
|
## UI components
|
|
71
76
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| `
|
|
79
|
-
| `github-
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
77
|
+
<Warning>
|
|
78
|
+
Examples marked **In-process TUI only** do not take effect in default interactive CLI mode (`atomic -e ...`) because they call TUI-process APIs that are no-ops or emit warnings in the isolated worker. Load them in an embedded in-process TUI session via the SDK instead.
|
|
79
|
+
</Warning>
|
|
80
|
+
|
|
81
|
+
| Example | Runtime | Description | Key APIs |
|
|
82
|
+
| --- | --- | --- | --- |
|
|
83
|
+
| [`status-line.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/status-line.ts) | Default CLI | Footer status indicator | `setStatus`, session events |
|
|
84
|
+
| [`titlebar-spinner.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/titlebar-spinner.ts) | Default CLI | Animate a braille spinner in the terminal title while the agent works | `setTitle`, `on("agent_start")`, `on("agent_end")` |
|
|
85
|
+
| [`widget-placement.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/widget-placement.ts) | Default CLI | Place widgets above or below the editor | `setWidget` |
|
|
86
|
+
| [`overlay-test.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/overlay-test.ts) | Default CLI | Overlay positioning example | `ui.custom` with overlay options |
|
|
87
|
+
| [`overlay-qa-tests.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/overlay-qa-tests.ts) | Default CLI | Overlay positioning, visibility, and resize suite | `ui.custom`, all overlay options |
|
|
88
|
+
| [`notify.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/notify.ts) | Default CLI | Simple notification examples | `ui.notify` |
|
|
89
|
+
| [`timed-confirm.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/timed-confirm.ts) | Default CLI | Confirmation dialogs with countdown timeout and abort signal | `ui.confirm` with `timeout` and `signal` |
|
|
90
|
+
| [`rpc-demo.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/rpc-demo.ts) | RPC / Default CLI | Exercise all RPC-supported UI dialogs, status, widgets, title, and editor prefill | `select`, `confirm`, `input`, `editor`, `setStatus`, `setWidget`, `setTitle`, `setEditorText` |
|
|
91
|
+
| [`working-indicator.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/working-indicator.ts) | **In-process TUI only** | Customize the streaming working indicator | `setWorkingIndicator`, `registerCommand` |
|
|
92
|
+
| [`working-message-test.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/working-message-test.ts) | **In-process TUI only** | Keep a custom working message and indicator across turns | `setWorkingMessage`, `setWorkingIndicator`, `on("session_start")` |
|
|
93
|
+
| [`hidden-thinking-label.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/hidden-thinking-label.ts) | **In-process TUI only** | Customize the placeholder label for collapsed thinking blocks via `/thinking-label` | `setHiddenThinkingLabel`, `registerCommand` |
|
|
94
|
+
| [`github-issue-autocomplete.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/github-issue-autocomplete.ts) | **In-process TUI only** | Layer `#1234` GitHub issue completions onto built-in autocomplete | `addAutocompleteProvider`, `on("session_start")`, `exec` |
|
|
95
|
+
| [`custom-footer.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/custom-footer.ts) | **In-process TUI only** | Replace the footer component | `registerCommand`, `setFooter` |
|
|
96
|
+
| [`custom-header.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/custom-header.ts) | **In-process TUI only** | Replace the startup header component | `on("session_start")`, `setHeader` |
|
|
97
|
+
| [`border-status-editor.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/border-status-editor.ts) | **In-process TUI only** | Custom editor that draws aligned left and right status labels in its border | `setEditorComponent`, `setWorkingVisible`, `setFooter`, `CustomEditor` |
|
|
98
|
+
| [`modal-editor.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/modal-editor.ts) | **In-process TUI only** | Vim-style modal editor | `setEditorComponent`, `CustomEditor` |
|
|
99
|
+
| [`rainbow-editor.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/rainbow-editor.ts) | **In-process TUI only** | Custom editor border styling | `setEditorComponent` |
|
|
100
|
+
| [`mac-system-theme.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/mac-system-theme.ts) | **In-process TUI only** | Switch theme based on macOS appearance | `setTheme`, `exec` |
|
|
92
101
|
|
|
93
102
|
## Complete extensions
|
|
94
103
|
|
|
95
104
|
| Example | Description | Key APIs |
|
|
96
105
|
| --- | --- | --- |
|
|
97
|
-
| `plan-mode/` |
|
|
98
|
-
| `preset.ts` | Saveable presets for model, active tools, and thinking level | `registerCommand`, `registerShortcut`, `registerFlag`, `setModel`, `setActiveTools`, `setThinkingLevel`, `appendEntry` |
|
|
99
|
-
| `tools.ts` | Interactive menu to toggle tools on and off | `registerCommand`, `setActiveTools`, `SettingsList`, session events |
|
|
100
|
-
|
|
101
|
-
### Plan-mode completion
|
|
102
|
-
|
|
103
|
-
In `plan-mode/`, write `[DONE:1]` to mark an individual step complete, including inside thinking blocks. To finish the entire plan without per-step markers, send a standalone final visible reply such as `All steps are complete.` or `The plan is done.`. Hidden thinking does not count toward that whole-plan reply, and negated summaries, questions, conditional statements, or completion phrases embedded in longer prose leave unfinished steps active.
|
|
106
|
+
| [`plan-mode/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/plan-mode) | Read-only planning and step-tracked execution workflow (see its [README](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/plan-mode/README.md)) | Lifecycle events, `registerCommand`, `registerShortcut`, `registerFlag`, `setStatus`, `setWidget`, `sendMessage`, `setActiveTools` |
|
|
107
|
+
| [`preset.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/preset.ts) | Saveable presets for model, active tools, and thinking level | `registerCommand`, `registerShortcut`, `registerFlag`, `setModel`, `setActiveTools`, `setThinkingLevel`, `appendEntry` |
|
|
108
|
+
| [`tools.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/tools.ts) | Interactive menu to toggle tools on and off | `registerCommand`, `setActiveTools`, `SettingsList`, session events |
|
|
104
109
|
|
|
105
110
|
## Remote execution and sandboxes
|
|
106
111
|
|
|
107
112
|
| Example | Description | Key APIs |
|
|
108
113
|
| --- | --- | --- |
|
|
109
|
-
| `ssh.ts` | Run built-in tools and `!` commands over SSH | `registerFlag`, `on("user_bash")`, `on("before_agent_start")`, tool operations |
|
|
110
|
-
| `interactive-shell.ts` | Persistent shell session for user bash commands | `on("user_bash")` |
|
|
111
|
-
| `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM | Tool operations, built-in tool overrides, `on("user_bash")` |
|
|
112
|
-
| `subagent/` | Spawn child agents from a custom tool | `registerTool`, `exec` |
|
|
114
|
+
| [`ssh.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/ssh.ts) | Run built-in tools and `!` commands over SSH | `registerFlag`, `on("user_bash")`, `on("before_agent_start")`, tool operations |
|
|
115
|
+
| [`interactive-shell.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/interactive-shell.ts) | Persistent shell session for user bash commands | `on("user_bash")` |
|
|
116
|
+
| [`gondolin/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/gondolin) | Route built-in tools and `!` commands into a Gondolin micro-VM | Tool operations, built-in tool overrides, `on("user_bash")` |
|
|
117
|
+
| [`subagent/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/subagent) | Spawn child agents from a custom tool | `registerTool`, `exec` |
|
|
113
118
|
|
|
114
119
|
## Games
|
|
115
120
|
|
|
116
121
|
| Example | Description | Key APIs |
|
|
117
122
|
| --- | --- | --- |
|
|
118
|
-
| `snake.ts` | Snake game in custom UI | `registerCommand`, `ui.custom`, keyboard handling |
|
|
119
|
-
| `space-invaders.ts` | Space Invaders game in custom UI | `registerCommand`, `ui.custom` |
|
|
120
|
-
| `doom-overlay/` | Doom inside an overlay component | `ui.custom` with overlay |
|
|
121
|
-
| `tic-tac-toe.ts` | Interactive Tic-Tac-Toe demonstrating `executionMode: "sequential"` on stateful sibling tool calls | `registerTool` (`executionMode: "sequential"`), `registerCommand`, `ui.custom` |
|
|
123
|
+
| [`snake.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/snake.ts) | Snake game in custom UI | `registerCommand`, `ui.custom`, keyboard handling |
|
|
124
|
+
| [`space-invaders.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/space-invaders.ts) | Space Invaders game in custom UI | `registerCommand`, `ui.custom` |
|
|
125
|
+
| [`doom-overlay/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/doom-overlay) | Doom inside an overlay component | `ui.custom` with overlay |
|
|
126
|
+
| [`tic-tac-toe.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/tic-tac-toe.ts) | Interactive Tic-Tac-Toe demonstrating `executionMode: "sequential"` on stateful sibling tool calls | `registerTool` (`executionMode: "sequential"`), `registerCommand`, `ui.custom` |
|
|
122
127
|
|
|
123
128
|
## Providers
|
|
124
129
|
|
|
125
130
|
| Example | Description | Key APIs |
|
|
126
131
|
| --- | --- | --- |
|
|
127
|
-
| `custom-provider-anthropic/` | Custom Anthropic proxy provider | `registerProvider` |
|
|
128
|
-
| `custom-provider-gitlab-duo/` | GitLab Duo provider with OAuth login | `registerProvider` with OAuth |
|
|
129
|
-
| `provider-accounts.ts` | Register multiple numbered OpenAI account aliases (`openai-1` through `openai-7`) | `registerProviderAlias` |
|
|
132
|
+
| [`custom-provider-anthropic/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-anthropic) | Custom Anthropic proxy provider | `registerProvider` |
|
|
133
|
+
| [`custom-provider-gitlab-duo/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-gitlab-duo) | GitLab Duo provider with OAuth login | `registerProvider` with OAuth |
|
|
134
|
+
| [`provider-accounts.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/provider-accounts.ts) | Register multiple numbered OpenAI account aliases (`openai-1` through `openai-7`) | `registerProviderAlias` |
|
|
130
135
|
|
|
131
136
|
## Messages, metadata, and utilities
|
|
132
137
|
|
|
133
138
|
| Example | Description | Key APIs |
|
|
134
139
|
| --- | --- | --- |
|
|
135
|
-
| `message-renderer.ts` | Custom renderer for extension messages | `registerMessageRenderer`, `sendMessage` |
|
|
136
|
-
| `debug-provider.ts` | Capture raw provider stream events per assistant message with `/debug-provider` | `on("provider_stream_event")`, `registerEntryRenderer`, `appendEntry` |
|
|
137
|
-
| `event-bus.ts` | Inter-extension messaging | `atomic.events` |
|
|
138
|
-
| `session-name.ts` | Name sessions for the session picker | `setSessionName`, `getSessionName` |
|
|
139
|
-
| `bookmark.ts` | Bookmark entries for `/tree` | `setLabel` |
|
|
140
|
-
| `inline-bash.ts` | Expand inline bash expressions inside tool calls | `on("tool_call")` |
|
|
141
|
-
| `bash-spawn-hook.ts` | Customize bash command, `cwd`, and `env` before spawn | `createBashTool`, `spawnHook` |
|
|
142
|
-
| `with-deps/` | Extension package with third-party npm dependencies | Package layout with `package.json` |
|
|
140
|
+
| [`message-renderer.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/message-renderer.ts) | Custom renderer for extension messages | `registerMessageRenderer`, `sendMessage` |
|
|
141
|
+
| [`debug-provider.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/debug-provider.ts) | Capture raw provider stream events per assistant message with `/debug-provider` | `on("provider_stream_event")`, `registerEntryRenderer`, `appendEntry` |
|
|
142
|
+
| [`event-bus.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/event-bus.ts) | Inter-extension messaging | `atomic.events` |
|
|
143
|
+
| [`session-name.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/session-name.ts) | Name sessions for the session picker | `setSessionName`, `getSessionName` |
|
|
144
|
+
| [`bookmark.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/bookmark.ts) | Bookmark entries for `/tree` | `setLabel` |
|
|
145
|
+
| [`inline-bash.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/inline-bash.ts) | Expand inline bash expressions inside tool calls | `on("tool_call")` |
|
|
146
|
+
| [`bash-spawn-hook.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/bash-spawn-hook.ts) | Customize bash command, `cwd`, and `env` before spawn | `createBashTool`, `spawnHook` |
|
|
147
|
+
| [`with-deps/`](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/with-deps) | Extension package with third-party npm dependencies | Package layout with `package.json` |
|
|
143
148
|
|
|
144
149
|
## Next steps
|
|
145
150
|
|