@bastani/atomic 0.8.21-0 → 0.8.22-0
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 +46 -9
- package/dist/builtin/intercom/broker/broker.ts +3 -3
- package/dist/builtin/intercom/config.ts +3 -3
- package/dist/builtin/intercom/index.ts +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/ui/compose.ts +2 -2
- package/dist/builtin/mcp/host-html-template.ts +0 -3
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +13 -4
- 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 +1 -1
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +1 -1
- package/dist/builtin/subagents/skills/browser-use/SKILL.md +234 -0
- package/dist/builtin/subagents/skills/browser-use/references/cdp-python.md +76 -0
- package/dist/builtin/subagents/skills/browser-use/references/multi-session.md +92 -0
- package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
- package/dist/builtin/subagents/src/agents/skills.ts +19 -1
- package/dist/builtin/subagents/src/extension/index.ts +24 -22
- package/dist/builtin/subagents/src/intercom/intercom-bridge.ts +7 -1
- package/dist/builtin/subagents/src/runs/background/async-execution.ts +23 -7
- package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +98 -3
- package/dist/builtin/subagents/src/runs/background/async-status.ts +3 -1
- package/dist/builtin/subagents/src/runs/background/run-status.ts +1 -1
- package/dist/builtin/subagents/src/runs/background/stale-run-reconciler.ts +3 -0
- package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +37 -12
- package/dist/builtin/subagents/src/runs/foreground/chain-clarify.ts +15 -15
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +26 -2
- package/dist/builtin/subagents/src/runs/shared/nested-render.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +7 -0
- package/dist/builtin/subagents/src/runs/shared/pi-args.ts +28 -1
- package/dist/builtin/subagents/src/shared/fast-mode.ts +80 -0
- package/dist/builtin/subagents/src/shared/formatters.ts +4 -2
- package/dist/builtin/subagents/src/shared/types.ts +4 -2
- package/dist/builtin/subagents/src/shared/utils.ts +3 -61
- package/dist/builtin/subagents/src/tui/render.ts +303 -157
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +101 -35
- package/dist/builtin/workflows/README.md +228 -41
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +535 -541
- package/dist/builtin/workflows/builtin/goal.ts +39 -25
- package/dist/builtin/workflows/builtin/open-claude-design.ts +66 -69
- package/dist/builtin/workflows/builtin/ralph.ts +21 -21
- package/dist/builtin/workflows/package.json +6 -5
- package/dist/builtin/workflows/skills/research-codebase/SKILL.md +1 -1
- package/dist/builtin/workflows/src/extension/background-ui-adapter.ts +2 -2
- package/dist/builtin/workflows/src/extension/discovery.ts +25 -146
- package/dist/builtin/workflows/src/extension/dispatcher.ts +72 -24
- package/dist/builtin/workflows/src/extension/hil-answer-notifications.ts +363 -0
- package/dist/builtin/workflows/src/extension/index.ts +690 -352
- package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +99 -62
- package/dist/builtin/workflows/src/extension/render-call.ts +2 -1
- package/dist/builtin/workflows/src/extension/render-result.ts +9 -3
- package/dist/builtin/workflows/src/extension/renderers.ts +5 -3
- package/dist/builtin/workflows/src/extension/runtime.ts +68 -33
- package/dist/builtin/workflows/src/extension/status-writer.ts +1 -1
- package/dist/builtin/workflows/src/extension/wiring.ts +34 -13
- package/dist/builtin/workflows/src/extension/workflow-module-loader.ts +142 -0
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +4 -4
- package/dist/builtin/workflows/src/index.ts +2 -0
- package/dist/builtin/workflows/src/intercom/result-intercom.ts +1 -1
- package/dist/builtin/workflows/src/runs/background/runner.ts +6 -4
- package/dist/builtin/workflows/src/runs/background/status.ts +45 -21
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +624 -52
- package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +1 -1
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +80 -24
- package/dist/builtin/workflows/src/runs/shared/validate-inputs.ts +61 -24
- package/dist/builtin/workflows/src/runs/shared/workflow-runner.ts +32 -10
- package/dist/builtin/workflows/src/sdk-surface.ts +6 -0
- package/dist/builtin/workflows/src/shared/expanded-workflow-graph.ts +178 -0
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +92 -12
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +21 -3
- package/dist/builtin/workflows/src/shared/render-inputs-schema.ts +1 -2
- package/dist/builtin/workflows/src/shared/run-visibility.ts +9 -0
- package/dist/builtin/workflows/src/shared/schema-introspection.ts +121 -0
- package/dist/builtin/workflows/src/shared/serializable.ts +132 -0
- package/dist/builtin/workflows/src/shared/stage-ui-broker.ts +91 -9
- package/dist/builtin/workflows/src/shared/store-types.ts +31 -3
- package/dist/builtin/workflows/src/shared/store.ts +58 -14
- package/dist/builtin/workflows/src/shared/types.ts +105 -40
- package/dist/builtin/workflows/src/tui/chat-surface-message.ts +129 -13
- package/dist/builtin/workflows/src/tui/chat-surface.ts +6 -1
- package/dist/builtin/workflows/src/tui/dispatch-confirm.ts +3 -2
- package/dist/builtin/workflows/src/tui/graph-canvas.ts +1 -1
- package/dist/builtin/workflows/src/tui/graph-view.ts +91 -65
- package/dist/builtin/workflows/src/tui/inline-form-card.ts +1 -1
- package/dist/builtin/workflows/src/tui/inline-form-overlay.ts +3 -2
- package/dist/builtin/workflows/src/tui/inputs-overlay.ts +3 -2
- package/dist/builtin/workflows/src/tui/inputs-picker.ts +8 -7
- package/dist/builtin/workflows/src/tui/keybindings-adapter.ts +2 -0
- package/dist/builtin/workflows/src/tui/node-card.ts +34 -8
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +4 -11
- package/dist/builtin/workflows/src/tui/prompt-card.ts +98 -50
- package/dist/builtin/workflows/src/tui/session-list.ts +7 -2
- package/dist/builtin/workflows/src/tui/session-picker.ts +2 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +226 -55
- package/dist/builtin/workflows/src/tui/status-helpers.ts +2 -0
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +37 -158
- package/dist/builtin/workflows/src/tui/toast.ts +2 -2
- package/dist/builtin/workflows/src/tui/widget.ts +53 -12
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +270 -19
- package/dist/builtin/workflows/src/tui/workflow-notice-card.ts +184 -0
- package/dist/builtin/workflows/src/workflows/define-workflow.ts +138 -43
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +45 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +27 -9
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +196 -17
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.js +2 -2
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/codex-fast-mode.d.ts +36 -0
- package/dist/core/codex-fast-mode.d.ts.map +1 -0
- package/dist/core/codex-fast-mode.js +117 -0
- package/dist/core/codex-fast-mode.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -1
- 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 +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/extensions/index.d.ts +4 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -0
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +7 -2
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +23 -8
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/reactive-widget.d.ts +58 -0
- package/dist/core/extensions/reactive-widget.d.ts.map +1 -0
- package/dist/core/extensions/reactive-widget.js +182 -0
- package/dist/core/extensions/reactive-widget.js.map +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +26 -12
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +8 -2
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +4 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +11 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/resource-loader.d.ts +9 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +49 -21
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +22 -13
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +7 -5
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +5 -3
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +16 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +64 -5
- package/dist/core/settings-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/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +7 -4
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/ask-user-question/ask-user-question.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/ask-user-question.js +2 -2
- package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +12 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/chat-input-actions.d.ts.map +1 -1
- package/dist/modes/interactive/chat-input-actions.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +0 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.d.ts +27 -0
- package/dist/modes/interactive/components/fast-mode-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/fast-mode-selector.js +105 -0
- package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +7 -12
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +4 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +132 -30
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +53 -6
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +3 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/docs/compaction.md +1 -1
- package/docs/custom-provider.md +2 -2
- package/docs/development.md +2 -2
- package/docs/docs.json +2 -2
- package/docs/extensions.md +18 -13
- package/docs/providers.md +5 -1
- package/docs/quickstart.md +5 -3
- package/docs/rpc.md +5 -5
- package/docs/sdk.md +12 -12
- package/docs/settings.md +18 -0
- package/docs/themes.md +6 -6
- package/docs/tui.md +20 -18
- package/docs/usage.md +2 -0
- package/docs/workflows.md +403 -39
- package/examples/extensions/qna.ts +2 -2
- package/package.json +4 -4
- package/dist/builtin/subagents/skills/playwright-cli/SKILL.md +0 -392
- package/dist/builtin/subagents/skills/playwright-cli/references/element-attributes.md +0 -23
- package/dist/builtin/subagents/skills/playwright-cli/references/playwright-tests.md +0 -39
- package/dist/builtin/subagents/skills/playwright-cli/references/request-mocking.md +0 -87
- package/dist/builtin/subagents/skills/playwright-cli/references/running-code.md +0 -241
- package/dist/builtin/subagents/skills/playwright-cli/references/session-management.md +0 -225
- package/dist/builtin/subagents/skills/playwright-cli/references/spec-driven-testing.md +0 -305
- package/dist/builtin/subagents/skills/playwright-cli/references/storage-state.md +0 -275
- package/dist/builtin/subagents/skills/playwright-cli/references/test-generation.md +0 -134
- package/dist/builtin/subagents/skills/playwright-cli/references/tracing.md +0 -139
- package/dist/builtin/subagents/skills/playwright-cli/references/video-recording.md +0 -143
package/docs/docs.json
CHANGED
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"links": [
|
|
82
82
|
{
|
|
83
83
|
"label": "GitHub",
|
|
84
|
-
"href": "https://github.com/
|
|
84
|
+
"href": "https://github.com/bastani-inc/atomic"
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
87
|
"primary": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
},
|
|
93
93
|
"footer": {
|
|
94
94
|
"socials": {
|
|
95
|
-
"github": "https://github.com/
|
|
95
|
+
"github": "https://github.com/bastani-inc/atomic"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"redirects": [
|
package/docs/extensions.md
CHANGED
|
@@ -26,7 +26,7 @@ Extensions are TypeScript modules that extend Atomic's behavior. They can subscr
|
|
|
26
26
|
- External integrations (file watchers, webhooks, CI triggers)
|
|
27
27
|
- Games while you wait (see `snake.ts` example)
|
|
28
28
|
|
|
29
|
-
See [examples/extensions/](https://github.com/
|
|
29
|
+
See [examples/extensions/](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions) for working implementations.
|
|
30
30
|
|
|
31
31
|
## Table of Contents
|
|
32
32
|
|
|
@@ -860,7 +860,7 @@ pi.on("input", async (event, ctx) => {
|
|
|
860
860
|
- `transform` - modify text/images, then continue to expansion
|
|
861
861
|
- `handled` - skip agent entirely (first handler to return this wins)
|
|
862
862
|
|
|
863
|
-
Transforms chain across handlers. See [input-transform.ts](https://github.com/
|
|
863
|
+
Transforms chain across handlers. See [input-transform.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/input-transform.ts).
|
|
864
864
|
|
|
865
865
|
## ExtensionContext
|
|
866
866
|
|
|
@@ -1239,7 +1239,7 @@ Use `promptSnippet` to opt a custom tool into a one-line entry in `Available too
|
|
|
1239
1239
|
|
|
1240
1240
|
**Important:** `promptGuidelines` bullets are appended flat to the `Guidelines` section with no tool name prefix. Each guideline must name the tool it refers to — avoid "Use this tool when..." because the LLM cannot tell which tool "this" means. Write "Use my_tool when..." instead.
|
|
1241
1241
|
|
|
1242
|
-
See [dynamic-tools.ts](https://github.com/
|
|
1242
|
+
See [dynamic-tools.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/dynamic-tools.ts) for a full example.
|
|
1243
1243
|
|
|
1244
1244
|
```typescript
|
|
1245
1245
|
import { Type } from "typebox";
|
|
@@ -1299,7 +1299,10 @@ pi.sendMessage({
|
|
|
1299
1299
|
- `"steer"` (default) - Queues the message while streaming. Delivered after the current assistant turn finishes executing its tool calls, before the next LLM call.
|
|
1300
1300
|
- `"followUp"` - Waits for agent to finish. Delivered only when agent has no more tool calls.
|
|
1301
1301
|
- `"nextTurn"` - Queued for next user prompt. Does not interrupt or trigger anything.
|
|
1302
|
-
- `triggerTurn: true
|
|
1302
|
+
- `"interrupt"` - With `triggerTurn: true`, aborts an active streaming turn and immediately starts a new turn with the custom message. When idle, behaves like a triggered custom message.
|
|
1303
|
+
- `triggerTurn: true` - If agent is idle, trigger an LLM response immediately. Required for `"interrupt"`; ignored for `"nextTurn"`.
|
|
1304
|
+
- `excludeFromContext: true` - Render and persist the custom message without adding it to LLM context. With no `deliverAs`, this remains display-only even while the agent is streaming.
|
|
1305
|
+
- `interruptAbortMessage` - Optional text used to replace generic abort results (for example `Operation aborted`) when `deliverAs: "interrupt"` aborts an active turn.
|
|
1303
1306
|
|
|
1304
1307
|
### pi.sendUserMessage(content, options?)
|
|
1305
1308
|
|
|
@@ -1327,7 +1330,7 @@ pi.sendUserMessage("And then summarize", { deliverAs: "followUp" });
|
|
|
1327
1330
|
|
|
1328
1331
|
When not streaming, the message is sent immediately and triggers a new turn. When streaming without `deliverAs`, throws an error.
|
|
1329
1332
|
|
|
1330
|
-
See [send-user-message.ts](https://github.com/
|
|
1333
|
+
See [send-user-message.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/send-user-message.ts) for a complete example.
|
|
1331
1334
|
|
|
1332
1335
|
### pi.appendEntry(customType, data?)
|
|
1333
1336
|
|
|
@@ -1773,7 +1776,7 @@ pi.registerTool({
|
|
|
1773
1776
|
|
|
1774
1777
|
**Signaling errors:** To mark a tool execution as failed (sets `isError: true` on the result and reports it to the LLM), throw an error from `execute`. Returning a value never sets the error flag regardless of what properties you include in the return object.
|
|
1775
1778
|
|
|
1776
|
-
**Early termination:** Return `terminate: true` from `execute()` to hint that the automatic follow-up LLM call should be skipped after the current tool batch. This only takes effect when every finalized tool result in that batch is terminating. See [examples/extensions/structured-output.ts](https://github.com/
|
|
1779
|
+
**Early termination:** Return `terminate: true` from `execute()` to hint that the automatic follow-up LLM call should be skipped after the current tool batch. This only takes effect when every finalized tool result in that batch is terminating. See [examples/extensions/structured-output.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/structured-output.ts) for a minimal example where the agent ends on a final structured-output tool call.
|
|
1777
1780
|
|
|
1778
1781
|
```typescript
|
|
1779
1782
|
// Correct: throw to signal an error
|
|
@@ -1849,7 +1852,7 @@ Alternatively, use `--no-builtin-tools` to start without any built-in tools whil
|
|
|
1849
1852
|
atomic --no-builtin-tools -e ./my-extension.ts
|
|
1850
1853
|
```
|
|
1851
1854
|
|
|
1852
|
-
See [examples/extensions/tool-override.ts](https://github.com/
|
|
1855
|
+
See [examples/extensions/tool-override.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/tool-override.ts) for a complete example that overrides `read` with logging and access control.
|
|
1853
1856
|
|
|
1854
1857
|
**Rendering:** Built-in renderer inheritance is resolved per slot. Execution override and rendering override are independent. If your override omits `renderCall`, the built-in `renderCall` is used. If your override omits `renderResult`, the built-in `renderResult` is used. If your override omits both, the built-in renderer is used automatically (syntax highlighting, diffs, etc.). This lets you wrap built-in tools for logging or access control without reimplementing the UI.
|
|
1855
1858
|
|
|
@@ -1913,7 +1916,7 @@ const bashTool = createBashTool(cwd, {
|
|
|
1913
1916
|
});
|
|
1914
1917
|
```
|
|
1915
1918
|
|
|
1916
|
-
See [examples/extensions/ssh.ts](https://github.com/
|
|
1919
|
+
See [examples/extensions/ssh.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/ssh.ts) for a complete SSH example with `--ssh` flag.
|
|
1917
1920
|
|
|
1918
1921
|
### Output Truncation
|
|
1919
1922
|
|
|
@@ -1965,7 +1968,7 @@ async execute(toolCallId, params, signal, onUpdate, ctx) {
|
|
|
1965
1968
|
- Always inform the LLM when output is truncated and where to find the full version
|
|
1966
1969
|
- Document the truncation limits in your tool's description
|
|
1967
1970
|
|
|
1968
|
-
See [examples/extensions/truncated-tool.ts](https://github.com/
|
|
1971
|
+
See [examples/extensions/truncated-tool.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/truncated-tool.ts) for a complete example wrapping `rg` (ripgrep) with proper truncation.
|
|
1969
1972
|
|
|
1970
1973
|
### Multiple Tools
|
|
1971
1974
|
|
|
@@ -2192,7 +2195,7 @@ if (confirmed) {
|
|
|
2192
2195
|
}
|
|
2193
2196
|
```
|
|
2194
2197
|
|
|
2195
|
-
See [examples/extensions/timed-confirm.ts](https://github.com/
|
|
2198
|
+
See [examples/extensions/timed-confirm.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/timed-confirm.ts) for complete examples.
|
|
2196
2199
|
|
|
2197
2200
|
### Widgets, Status, and Footer
|
|
2198
2201
|
|
|
@@ -2335,7 +2338,7 @@ pi.on("session_start", (_event, ctx) => {
|
|
|
2335
2338
|
});
|
|
2336
2339
|
```
|
|
2337
2340
|
|
|
2338
|
-
See [github-issue-autocomplete.ts](https://github.com/
|
|
2341
|
+
See [github-issue-autocomplete.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/github-issue-autocomplete.ts) for a complete example that preloads the latest open GitHub issues with `gh issue list` and filters them locally for fast `#...` completion. It requires GitHub CLI (`gh`) and a GitHub repository checkout.
|
|
2339
2342
|
|
|
2340
2343
|
### Custom Components
|
|
2341
2344
|
|
|
@@ -2367,6 +2370,8 @@ The callback receives:
|
|
|
2367
2370
|
- `keybindings` - App keybinding manager (for checking shortcuts)
|
|
2368
2371
|
- `done(value)` - Call to close component and return value
|
|
2369
2372
|
|
|
2373
|
+
Pass `{ signal }` to dismiss the custom UI if an operation is aborted; the returned promise rejects with the signal reason.
|
|
2374
|
+
|
|
2370
2375
|
See [TUI components](/tui) for the full component API.
|
|
2371
2376
|
|
|
2372
2377
|
#### Overlay Mode (Experimental)
|
|
@@ -2393,7 +2398,7 @@ const result = await ctx.ui.custom<string | null>(
|
|
|
2393
2398
|
);
|
|
2394
2399
|
```
|
|
2395
2400
|
|
|
2396
|
-
See [TUI components](/tui) for the full `OverlayOptions` API and [overlay-qa-tests.ts](https://github.com/
|
|
2401
|
+
See [TUI components](/tui) for the full `OverlayOptions` API and [overlay-qa-tests.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/overlay-qa-tests.ts) for examples.
|
|
2397
2402
|
|
|
2398
2403
|
### Custom Editor
|
|
2399
2404
|
|
|
@@ -2529,7 +2534,7 @@ In non-interactive modes, check `ctx.hasUI` before using UI methods.
|
|
|
2529
2534
|
|
|
2530
2535
|
## Examples Reference
|
|
2531
2536
|
|
|
2532
|
-
All examples in [examples/extensions/](https://github.com/
|
|
2537
|
+
All examples in [examples/extensions/](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions).
|
|
2533
2538
|
|
|
2534
2539
|
| Example | Description | Key APIs |
|
|
2535
2540
|
|---------|-------------|----------|
|
package/docs/providers.md
CHANGED
|
@@ -26,6 +26,10 @@ Use `/logout` to clear credentials. Tokens are stored in `~/.atomic/agent/auth.j
|
|
|
26
26
|
- Requires ChatGPT Plus or Pro subscription
|
|
27
27
|
- Officially endorsed by OpenAI: [Codex for OSS](https://developers.openai.com/community/codex-for-oss)
|
|
28
28
|
|
|
29
|
+
### Codex Fast Mode
|
|
30
|
+
|
|
31
|
+
Run `/fast` in interactive mode to enable OpenAI priority service tier separately for normal chat and workflow-stage sessions. The command is shown only when the current model scope includes a supported `openai/*` or `openai-codex/*` model. Workflow stages use the workflow setting, not the chat setting. When enabled for the active supported model, the UI appends `fast` after the model name in the chat footer and workflow stage model labels. Fast mode intentionally does not apply to `github-copilot/*`, Azure OpenAI, OpenRouter, or custom OpenAI-compatible providers. Use workflow fast mode deliberately because parallel workflow fan-out can multiply priority-tier usage.
|
|
32
|
+
|
|
29
33
|
### Claude Pro/Max
|
|
30
34
|
|
|
31
35
|
Anthropic subscription auth is active for Claude Pro/Max accounts. Third-party harness usage draws from [extra usage](https://claude.ai/settings/usage) and is billed per token, not against Claude plan limits.
|
|
@@ -231,7 +235,7 @@ Or set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key file.
|
|
|
231
235
|
|
|
232
236
|
**Via models.json:** Add Ollama, LM Studio, vLLM, or any provider that speaks a supported API (OpenAI Completions, OpenAI Responses, Anthropic Messages, Google Generative AI). See [Custom models](/models).
|
|
233
237
|
|
|
234
|
-
**Via extensions:** For providers that need custom API implementations or OAuth flows, create an extension. See [Custom providers](/custom-provider) and [examples/extensions/custom-provider-gitlab-duo](https://github.com/
|
|
238
|
+
**Via extensions:** For providers that need custom API implementations or OAuth flows, create an extension. See [Custom providers](/custom-provider) and [examples/extensions/custom-provider-gitlab-duo](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-gitlab-duo).
|
|
235
239
|
|
|
236
240
|
## Resolution Order
|
|
237
241
|
|
package/docs/quickstart.md
CHANGED
|
@@ -109,7 +109,9 @@ Named workflow runs execute in the background. After launch you get a run id; us
|
|
|
109
109
|
/workflow kill <run-id> # abort and retain for inspection
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
Human-in-the-loop prompts (`ctx.ui.input`, `confirm`, `select`, `editor`) surface in the graph viewer, not as chat modals — connect to the run to answer them.
|
|
112
|
+
Human-in-the-loop prompts (`ctx.ui.input`, `confirm`, `select`, `editor`) surface in the graph viewer, not as chat modals — connect to the run to answer them.
|
|
113
|
+
|
|
114
|
+
Atomic also posts main-chat lifecycle notices when a run completes, fails, or awaits input. If you answer a workflow prompt in the graph or attached stage chat, the main chat receives a display-only answer summary for audit; it does not wake the model, enter LLM context, or answer later prompts. See [Workflows](/workflows) for the full reference and authoring guide.
|
|
113
115
|
|
|
114
116
|
### Top skills to invoke directly
|
|
115
117
|
|
|
@@ -142,9 +144,9 @@ Atomic will:
|
|
|
142
144
|
|
|
143
145
|
- ask clarifying questions if stage purpose, inputs, models, or handoffs are ambiguous,
|
|
144
146
|
- write a `.atomic/workflows/<name>.ts` definition that uses `defineWorkflow(...).input(...).run(...).compile()`,
|
|
145
|
-
- and reload so
|
|
147
|
+
- and run `/workflow reload` so the generated workflow is rediscovered and can be launched with `/workflow <name>`.
|
|
146
148
|
|
|
147
|
-
The same plain-chat approach works for editing or hardening an existing workflow — ask Atomic to add a stage, switch a model, save artifacts, or wire in a human approval gate. For the full authoring reference, see [Workflows](/workflows).
|
|
149
|
+
The same plain-chat approach works for editing or hardening an existing workflow — ask Atomic to add a stage, switch a model, save artifacts, or wire in a human approval gate. For the full authoring reference, see [Workflows](/workflows). The authoring guide also covers [workflow composition](/workflows#workflow-composition), including calling user-defined workflows or builtin workflows such as `deep-research-codebase`, `goal`, and `ralph` from `@bastani/workflows/builtin`.
|
|
148
150
|
|
|
149
151
|
### Default tools and prompts
|
|
150
152
|
|
package/docs/rpc.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
RPC mode enables headless operation of the coding agent via a JSON protocol over stdin/stdout. This is useful for embedding the agent in other applications, IDEs, or custom UIs.
|
|
4
4
|
|
|
5
|
-
**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@bastani/atomic` instead of spawning a subprocess. See [`src/core/agent-session.ts`](https://github.com/
|
|
5
|
+
**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@bastani/atomic` instead of spawning a subprocess. See [`src/core/agent-session.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/rpc/rpc-client.ts).
|
|
6
6
|
|
|
7
7
|
## Starting RPC Mode
|
|
8
8
|
|
|
@@ -1202,8 +1202,8 @@ Parse errors:
|
|
|
1202
1202
|
Source files:
|
|
1203
1203
|
- [`packages/ai/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/types.ts) - `Model`, `UserMessage`, `AssistantMessage`, `ToolResultMessage`
|
|
1204
1204
|
- [`packages/agent/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/agent/src/types.ts) - `AgentMessage`, `AgentEvent`
|
|
1205
|
-
- [`src/core/messages.ts`](https://github.com/
|
|
1206
|
-
- [`src/modes/rpc/rpc-types.ts`](https://github.com/
|
|
1205
|
+
- [`src/core/messages.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/messages.ts) - `BashExecutionMessage`
|
|
1206
|
+
- [`src/modes/rpc/rpc-types.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/rpc/rpc-types.ts) - RPC command/response types, extension UI request/response types
|
|
1207
1207
|
|
|
1208
1208
|
### Model
|
|
1209
1209
|
|
|
@@ -1350,9 +1350,9 @@ for event in read_events():
|
|
|
1350
1350
|
|
|
1351
1351
|
## Example: Interactive Client (Node.js)
|
|
1352
1352
|
|
|
1353
|
-
See [`test/rpc-example.ts`](https://github.com/
|
|
1353
|
+
See [`test/rpc-example.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/test/rpc-example.ts) for a complete interactive example, or [`src/modes/rpc/rpc-client.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/rpc/rpc-client.ts) for a typed client implementation.
|
|
1354
1354
|
|
|
1355
|
-
For a complete example of handling the extension UI protocol, see [`examples/rpc-extension-ui.ts`](https://github.com/
|
|
1355
|
+
For a complete example of handling the extension UI protocol, see [`examples/rpc-extension-ui.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/rpc-extension-ui.ts) which pairs with the [`examples/extensions/rpc-demo.ts`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/rpc-demo.ts) extension.
|
|
1356
1356
|
|
|
1357
1357
|
```javascript
|
|
1358
1358
|
const { spawn } = require("child_process");
|
package/docs/sdk.md
CHANGED
|
@@ -11,7 +11,7 @@ The SDK provides programmatic access to atomic's agent capabilities. Use it to e
|
|
|
11
11
|
- Build custom tools that spawn sub-agents
|
|
12
12
|
- Test agent behavior programmatically
|
|
13
13
|
|
|
14
|
-
See [examples/sdk/](https://github.com/
|
|
14
|
+
See [examples/sdk/](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/sdk) for working examples from minimal to full control.
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
@@ -420,7 +420,7 @@ If no model is provided:
|
|
|
420
420
|
2. Uses default from settings
|
|
421
421
|
3. Falls back to first available model
|
|
422
422
|
|
|
423
|
-
> See [examples/sdk/02-custom-model.ts](https://github.com/
|
|
423
|
+
> See [examples/sdk/02-custom-model.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/02-custom-model.ts)
|
|
424
424
|
|
|
425
425
|
### API Keys and OAuth
|
|
426
426
|
|
|
@@ -461,7 +461,7 @@ const { session } = await createAgentSession({
|
|
|
461
461
|
const simpleRegistry = ModelRegistry.inMemory(authStorage);
|
|
462
462
|
```
|
|
463
463
|
|
|
464
|
-
> See [examples/sdk/09-api-keys-and-oauth.ts](https://github.com/
|
|
464
|
+
> See [examples/sdk/09-api-keys-and-oauth.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/09-api-keys-and-oauth.ts)
|
|
465
465
|
|
|
466
466
|
### System Prompt
|
|
467
467
|
|
|
@@ -478,7 +478,7 @@ await loader.reload();
|
|
|
478
478
|
const { session } = await createAgentSession({ resourceLoader: loader });
|
|
479
479
|
```
|
|
480
480
|
|
|
481
|
-
> See [examples/sdk/03-custom-prompt.ts](https://github.com/
|
|
481
|
+
> See [examples/sdk/03-custom-prompt.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/03-custom-prompt.ts)
|
|
482
482
|
|
|
483
483
|
### Tools
|
|
484
484
|
|
|
@@ -539,7 +539,7 @@ const { session } = await createAgentSession({
|
|
|
539
539
|
});
|
|
540
540
|
```
|
|
541
541
|
|
|
542
|
-
> See [examples/sdk/05-tools.ts](https://github.com/
|
|
542
|
+
> See [examples/sdk/05-tools.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/05-tools.ts)
|
|
543
543
|
|
|
544
544
|
### Custom Tools
|
|
545
545
|
|
|
@@ -573,7 +573,7 @@ Custom tools passed via `customTools` are combined with extension-registered too
|
|
|
573
573
|
|
|
574
574
|
If you pass `tools`, include each custom or extension tool name you want enabled, for example `tools: ["read", "bash", "my_tool"]`. Use `excludedTools` to remove a custom or extension tool by name from the final exposed set.
|
|
575
575
|
|
|
576
|
-
> See [examples/sdk/05-tools.ts](https://github.com/
|
|
576
|
+
> See [examples/sdk/05-tools.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/05-tools.ts)
|
|
577
577
|
|
|
578
578
|
### Extensions
|
|
579
579
|
|
|
@@ -613,7 +613,7 @@ await loader.reload();
|
|
|
613
613
|
eventBus.on("my-extension:status", (data) => console.log(data));
|
|
614
614
|
```
|
|
615
615
|
|
|
616
|
-
> See [examples/sdk/06-extensions.ts](https://github.com/
|
|
616
|
+
> See [examples/sdk/06-extensions.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/06-extensions.ts) and [Extensions](/extensions)
|
|
617
617
|
|
|
618
618
|
### Skills
|
|
619
619
|
|
|
@@ -643,7 +643,7 @@ await loader.reload();
|
|
|
643
643
|
const { session } = await createAgentSession({ resourceLoader: loader });
|
|
644
644
|
```
|
|
645
645
|
|
|
646
|
-
> See [examples/sdk/04-skills.ts](https://github.com/
|
|
646
|
+
> See [examples/sdk/04-skills.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/04-skills.ts)
|
|
647
647
|
|
|
648
648
|
### Context Files
|
|
649
649
|
|
|
@@ -663,7 +663,7 @@ await loader.reload();
|
|
|
663
663
|
const { session } = await createAgentSession({ resourceLoader: loader });
|
|
664
664
|
```
|
|
665
665
|
|
|
666
|
-
> See [examples/sdk/07-context-files.ts](https://github.com/
|
|
666
|
+
> See [examples/sdk/07-context-files.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/07-context-files.ts)
|
|
667
667
|
|
|
668
668
|
### Slash Commands
|
|
669
669
|
|
|
@@ -692,7 +692,7 @@ await loader.reload();
|
|
|
692
692
|
const { session } = await createAgentSession({ resourceLoader: loader });
|
|
693
693
|
```
|
|
694
694
|
|
|
695
|
-
> See [examples/sdk/08-prompt-templates.ts](https://github.com/
|
|
695
|
+
> See [examples/sdk/08-prompt-templates.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/08-prompt-templates.ts)
|
|
696
696
|
|
|
697
697
|
### Session Management
|
|
698
698
|
|
|
@@ -796,7 +796,7 @@ sm.branchWithSummary(id, "Summary..."); // Branch with context summary
|
|
|
796
796
|
sm.createBranchedSession(leafId); // Extract path to new file
|
|
797
797
|
```
|
|
798
798
|
|
|
799
|
-
> See [examples/sdk/11-sessions.ts](https://github.com/
|
|
799
|
+
> See [examples/sdk/11-sessions.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/11-sessions.ts) and [Session Format](/session-format)
|
|
800
800
|
|
|
801
801
|
### Settings Management
|
|
802
802
|
|
|
@@ -847,7 +847,7 @@ Project overrides global. Nested objects merge keys. Setters modify global setti
|
|
|
847
847
|
- Call `await settingsManager.flush()` when you need a durability boundary (for example, before process exit or before asserting file contents in tests).
|
|
848
848
|
- `SettingsManager` does not print settings I/O errors. Use `settingsManager.drainErrors()` and report them in your app layer.
|
|
849
849
|
|
|
850
|
-
> See [examples/sdk/10-settings.ts](https://github.com/
|
|
850
|
+
> See [examples/sdk/10-settings.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/sdk/10-settings.ts)
|
|
851
851
|
|
|
852
852
|
## ResourceLoader
|
|
853
853
|
|
package/docs/settings.md
CHANGED
|
@@ -34,6 +34,24 @@ Edit directly or use `/settings` for common options. Atomic reads legacy `~/.pi/
|
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
### Codex Fast Mode
|
|
38
|
+
|
|
39
|
+
Use `/fast` in interactive mode to edit these settings. Atomic applies fast mode only to supported `openai/*` and `openai-codex/*` providers, not `github-copilot/*` or other OpenAI-compatible providers. Chat and workflow-stage scopes are independent. When fast mode is active for the current supported model, Atomic shows `fast` after the model name in the chat footer and workflow stage model labels. Enable the workflow scope deliberately for broad fan-outs because each eligible stage can consume priority-tier requests.
|
|
40
|
+
|
|
41
|
+
| Setting | Type | Default | Description |
|
|
42
|
+
|---------|------|---------|-------------|
|
|
43
|
+
| `codexFastMode.chat` | boolean | `false` | Use OpenAI priority service tier for supported normal chat requests |
|
|
44
|
+
| `codexFastMode.workflow` | boolean | `false` | Use OpenAI priority service tier for supported workflow-stage requests |
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"codexFastMode": {
|
|
49
|
+
"chat": true,
|
|
50
|
+
"workflow": false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
37
55
|
### UI & Display
|
|
38
56
|
|
|
39
57
|
| Setting | Type | Default | Description |
|
package/docs/themes.md
CHANGED
|
@@ -291,9 +291,9 @@ echo $COLORTERM # Should output "truecolor" or "24bit"
|
|
|
291
291
|
## Examples
|
|
292
292
|
|
|
293
293
|
See the built-in themes:
|
|
294
|
-
- [dark.json](https://github.com/
|
|
295
|
-
- [light.json](https://github.com/
|
|
296
|
-
- [catppuccin-frappe.json](https://github.com/
|
|
297
|
-
- [catppuccin-latte.json](https://github.com/
|
|
298
|
-
- [catppuccin-macchiato.json](https://github.com/
|
|
299
|
-
- [catppuccin-mocha.json](https://github.com/
|
|
294
|
+
- [dark.json](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/interactive/theme/dark.json)
|
|
295
|
+
- [light.json](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/interactive/theme/light.json)
|
|
296
|
+
- [catppuccin-frappe.json](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/interactive/theme/catppuccin-frappe.json)
|
|
297
|
+
- [catppuccin-latte.json](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/interactive/theme/catppuccin-latte.json)
|
|
298
|
+
- [catppuccin-macchiato.json](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/interactive/theme/catppuccin-macchiato.json)
|
|
299
|
+
- [catppuccin-mocha.json](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/modes/interactive/theme/catppuccin-mocha.json)
|
package/docs/tui.md
CHANGED
|
@@ -106,6 +106,8 @@ async execute(toolCallId, params, onUpdate, ctx, signal) {
|
|
|
106
106
|
}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
Pass `{ signal }` to `ctx.ui.custom()` when the UI belongs to an abortable tool or operation. If the signal aborts, Atomic dismisses the custom UI and rejects the returned promise with the signal reason.
|
|
110
|
+
|
|
109
111
|
## Overlays
|
|
110
112
|
|
|
111
113
|
Overlays render components on top of existing content without clearing the screen. Pass `{ overlay: true }` to `ctx.ui.custom()`:
|
|
@@ -175,7 +177,7 @@ await showMenu(); // First show
|
|
|
175
177
|
await showMenu(); // "Back" = just call again
|
|
176
178
|
```
|
|
177
179
|
|
|
178
|
-
See [overlay-qa-tests.ts](https://github.com/
|
|
180
|
+
See [overlay-qa-tests.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/overlay-qa-tests.ts) for comprehensive examples covering anchors, margins, stacking, responsive visibility, and animation.
|
|
179
181
|
|
|
180
182
|
## Built-in Components
|
|
181
183
|
|
|
@@ -644,7 +646,7 @@ pi.registerCommand("pick", {
|
|
|
644
646
|
});
|
|
645
647
|
```
|
|
646
648
|
|
|
647
|
-
**Examples:** [preset.ts](https://github.com/
|
|
649
|
+
**Examples:** [preset.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/preset.ts), [tools.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/tools.ts)
|
|
648
650
|
|
|
649
651
|
### Pattern 2: Async Operation with Cancel (BorderedLoader)
|
|
650
652
|
|
|
@@ -676,7 +678,7 @@ pi.registerCommand("fetch", {
|
|
|
676
678
|
});
|
|
677
679
|
```
|
|
678
680
|
|
|
679
|
-
**Examples:** [qna.ts](https://github.com/
|
|
681
|
+
**Examples:** [qna.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/qna.ts), [handoff.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/handoff.ts)
|
|
680
682
|
|
|
681
683
|
### Pattern 3: Settings/Toggles (SettingsList)
|
|
682
684
|
|
|
@@ -720,7 +722,7 @@ pi.registerCommand("settings", {
|
|
|
720
722
|
});
|
|
721
723
|
```
|
|
722
724
|
|
|
723
|
-
**Examples:** [tools.ts](https://github.com/
|
|
725
|
+
**Examples:** [tools.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/tools.ts)
|
|
724
726
|
|
|
725
727
|
### Pattern 4: Persistent Status Indicator
|
|
726
728
|
|
|
@@ -734,7 +736,7 @@ ctx.ui.setStatus("my-ext", ctx.ui.theme.fg("accent", "● active"));
|
|
|
734
736
|
ctx.ui.setStatus("my-ext", undefined);
|
|
735
737
|
```
|
|
736
738
|
|
|
737
|
-
**Examples:** [status-line.ts](https://github.com/
|
|
739
|
+
**Examples:** [status-line.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/status-line.ts), [plan-mode/index.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/plan-mode/index.ts), [preset.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/preset.ts)
|
|
738
740
|
|
|
739
741
|
### Pattern 4b: Working Indicator Customization
|
|
740
742
|
|
|
@@ -764,7 +766,7 @@ ctx.ui.setWorkingIndicator();
|
|
|
764
766
|
|
|
765
767
|
This only affects the normal streaming working indicator. Compaction and retry loaders keep their built-in styling. Custom frames are rendered verbatim, so extensions must add their own colors when needed.
|
|
766
768
|
|
|
767
|
-
**Examples:** [working-indicator.ts](https://github.com/
|
|
769
|
+
**Examples:** [working-indicator.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/working-indicator.ts)
|
|
768
770
|
|
|
769
771
|
### Pattern 5: Widgets Above/Below Editor
|
|
770
772
|
|
|
@@ -794,7 +796,7 @@ ctx.ui.setWidget("my-widget", (_tui, theme) => {
|
|
|
794
796
|
ctx.ui.setWidget("my-widget", undefined);
|
|
795
797
|
```
|
|
796
798
|
|
|
797
|
-
**Examples:** [plan-mode/index.ts](https://github.com/
|
|
799
|
+
**Examples:** [plan-mode/index.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/plan-mode/index.ts)
|
|
798
800
|
|
|
799
801
|
### Pattern 6: Custom Footer
|
|
800
802
|
|
|
@@ -816,7 +818,7 @@ ctx.ui.setFooter(undefined); // restore default
|
|
|
816
818
|
|
|
817
819
|
Token stats available via `ctx.sessionManager.getBranch()` and `ctx.model`.
|
|
818
820
|
|
|
819
|
-
**Examples:** [custom-footer.ts](https://github.com/
|
|
821
|
+
**Examples:** [custom-footer.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/custom-footer.ts)
|
|
820
822
|
|
|
821
823
|
### Pattern 7: Custom Editor (vim mode, etc.)
|
|
822
824
|
|
|
@@ -892,7 +894,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
892
894
|
- **Factory pattern**: `setEditorComponent` receives a factory function that gets `tui`, `theme`, and `keybindings`
|
|
893
895
|
- **Pass `undefined`** to restore the default editor: `ctx.ui.setEditorComponent(undefined)`
|
|
894
896
|
|
|
895
|
-
**Examples:** [modal-editor.ts](https://github.com/
|
|
897
|
+
**Examples:** [modal-editor.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/modal-editor.ts)
|
|
896
898
|
|
|
897
899
|
## Key Rules
|
|
898
900
|
|
|
@@ -908,12 +910,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
908
910
|
|
|
909
911
|
## Examples
|
|
910
912
|
|
|
911
|
-
- **Selection UI**: [examples/extensions/preset.ts](https://github.com/
|
|
912
|
-
- **Async with cancel**: [examples/extensions/qna.ts](https://github.com/
|
|
913
|
-
- **Settings toggles**: [examples/extensions/tools.ts](https://github.com/
|
|
914
|
-
- **Status indicators**: [examples/extensions/plan-mode/index.ts](https://github.com/
|
|
915
|
-
- **Working indicator**: [examples/extensions/working-indicator.ts](https://github.com/
|
|
916
|
-
- **Custom footer**: [examples/extensions/custom-footer.ts](https://github.com/
|
|
917
|
-
- **Custom editor**: [examples/extensions/modal-editor.ts](https://github.com/
|
|
918
|
-
- **Snake game**: [examples/extensions/snake.ts](https://github.com/
|
|
919
|
-
- **Custom tool rendering**: [examples/extensions/todo.ts](https://github.com/
|
|
913
|
+
- **Selection UI**: [examples/extensions/preset.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/preset.ts) - SelectList with DynamicBorder framing
|
|
914
|
+
- **Async with cancel**: [examples/extensions/qna.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/qna.ts) - BorderedLoader for LLM calls
|
|
915
|
+
- **Settings toggles**: [examples/extensions/tools.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/tools.ts) - SettingsList for tool enable/disable
|
|
916
|
+
- **Status indicators**: [examples/extensions/plan-mode/index.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/plan-mode/index.ts) - setStatus and setWidget
|
|
917
|
+
- **Working indicator**: [examples/extensions/working-indicator.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/working-indicator.ts) - setWorkingIndicator
|
|
918
|
+
- **Custom footer**: [examples/extensions/custom-footer.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/custom-footer.ts) - setFooter with stats
|
|
919
|
+
- **Custom editor**: [examples/extensions/modal-editor.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/modal-editor.ts) - Vim-like modal editing
|
|
920
|
+
- **Snake game**: [examples/extensions/snake.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/snake.ts) - Full game with keyboard input, game loop
|
|
921
|
+
- **Custom tool rendering**: [examples/extensions/todo.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/todo.ts) - renderCall and renderResult
|
package/docs/usage.md
CHANGED
|
@@ -38,6 +38,8 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
38
38
|
| `/login`, `/logout` | Manage OAuth or API-key credentials |
|
|
39
39
|
| `/model` | Switch models |
|
|
40
40
|
| `/scoped-models` | Enable/disable models for CTRL+P cycling |
|
|
41
|
+
| `/fast` | Toggle Codex fast mode for chat and workflow stages when `openai/*` or `openai-codex/*` models are available |
|
|
42
|
+
| `/workflow` | List/run workflows; manage runs (connect/inspect/pause/interrupt/resume/kill); reload workflow resources |
|
|
41
43
|
| `/settings` | Thinking level, theme, message delivery, transport |
|
|
42
44
|
| `/resume` | Pick from previous sessions |
|
|
43
45
|
| `/new` | Start a new session |
|