@bastani/atomic 0.9.37-alpha.1 → 0.9.38-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 +18 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +12 -0
- package/dist/builtin/workflows/builtin/{chunk-rhkg3d8e.js → chunk-3n2bnz64.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-3xffzzbg.js → chunk-ad83gc5p.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-7fvrnzhb.js → chunk-x6az1sxp.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-8c3ae7tt.js → chunk-ymwq372z.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +7 -0
- package/dist/builtin/workflows/src/index.js +7 -0
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +4 -4
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +19 -5
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +2 -2
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-retry.js +1 -1
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-state.d.ts +4 -6
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +13 -8
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +3 -1
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session.js +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/export-html/template-js/message-tools.js +20 -7
- package/dist/core/export-html/template-js/tree-filter-render.js +1 -9
- package/dist/core/export-html/template.js +21 -16
- package/dist/core/model-config.d.ts +9 -9
- package/dist/core/model-fallback-failures.d.ts.map +1 -1
- package/dist/core/model-fallback-failures.js +3 -1
- package/dist/core/model-fallback-failures.js.map +1 -1
- package/dist/core/model-resolver-cli.d.ts +2 -0
- package/dist/core/model-resolver-cli.d.ts.map +1 -1
- package/dist/core/model-resolver-cli.js +47 -143
- package/dist/core/model-resolver-cli.js.map +1 -1
- package/dist/core/model-resolver-patterns.d.ts +48 -22
- package/dist/core/model-resolver-patterns.d.ts.map +1 -1
- package/dist/core/model-resolver-patterns.js +154 -105
- package/dist/core/model-resolver-patterns.js.map +1 -1
- package/dist/core/model-resolver-scope.d.ts +6 -9
- package/dist/core/model-resolver-scope.d.ts.map +1 -1
- package/dist/core/model-resolver-scope.js +51 -53
- package/dist/core/model-resolver-scope.js.map +1 -1
- package/dist/core/model-resolver-types.d.ts +0 -6
- package/dist/core/model-resolver-types.d.ts.map +1 -1
- package/dist/core/model-resolver-types.js.map +1 -1
- package/dist/core/model-resolver.d.ts +3 -2
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +6 -2
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/retry-policy.d.ts +5 -2
- package/dist/core/retry-policy.d.ts.map +1 -1
- package/dist/core/retry-policy.js +4 -3
- package/dist/core/retry-policy.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +1 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +1 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/tools/malformed-tool-arguments.d.ts +3 -0
- package/dist/core/tools/malformed-tool-arguments.d.ts.map +1 -0
- package/dist/core/tools/malformed-tool-arguments.js +23 -0
- package/dist/core/tools/malformed-tool-arguments.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +2 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +19 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main-session-options.d.ts.map +1 -1
- package/dist/main-session-options.js +1 -0
- package/dist/main-session-options.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.js +2 -9
- package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
- package/docs/docs.json +2 -1
- package/docs/extensions/ui.md +10 -0
- package/docs/llama-cpp.md +2 -0
- package/docs/models/reference.md +7 -0
- package/docs/nvidia-rtx-llama-cpp.md +101 -0
- package/docs/prompt-templates.md +2 -0
- package/docs/providers.md +4 -0
- package/docs/reference/cli.md +3 -3
- package/docs/sessions.md +4 -0
- package/docs/settings.md +3 -3
- package/docs/tools.md +2 -0
- package/docs/workflows/api-reference.md +2 -0
- package/examples/extensions/minimal-mode.ts +1 -8
- package/examples/extensions/subagent/display.ts +4 -6
- package/npm-shrinkwrap.json +32 -32
- package/package.json +3 -3
- package/schemas/models.schema.json +5 -5
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Local models on NVIDIA RTX"
|
|
3
|
+
description: "Convert NVIDIA llama.cpp recipes into router presets for Atomic."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Run Atomic with NVIDIA RTX and llama.cpp
|
|
7
|
+
|
|
8
|
+
[NVIDIA Local AI Inference Recipes](https://nvidia.github.io/local-ai-inference-recipes/index.html) provides llama.cpp settings tuned for specific NVIDIA hardware and models. Each recipe gives a single-model `llama-server` command. Atomic works with the llama.cpp router, which can serve and manage several models, so this guide converts the recipe command into a router preset.
|
|
9
|
+
|
|
10
|
+
The examples below use Windows PowerShell. See [Local Models with llama.cpp](/llama-cpp) for Atomic's complete router and model-management reference.
|
|
11
|
+
|
|
12
|
+
## Before you begin
|
|
13
|
+
|
|
14
|
+
1. Open the [recipe catalog](https://nvidia.github.io/local-ai-inference-recipes/index.html), select your hardware, operating system, and model, then choose **llama.cpp**. Check the prerequisites and memory requirements. Keep the recipe's launch command for the conversion below.
|
|
15
|
+
2. Install llama.cpp with the recipe's setup instructions. The recipe's settings depend on its build, for example CUDA support or speculative decoding options.
|
|
16
|
+
3. Run `llama-server --help` and check that it lists `--models-preset`. Without it, the build cannot load the recipe as a router preset. Use a newer build that still meets the recipe's requirements.
|
|
17
|
+
4. Install Atomic with the [Quickstart](/quickstart). On native Windows, also see [Run Atomic on Windows](/windows).
|
|
18
|
+
|
|
19
|
+
## Convert the recipe to a preset
|
|
20
|
+
|
|
21
|
+
A preset lists the settings for one or more models. Each section name becomes the model ID shown in Atomic. Save the preset next to `llama-server`, or pass its full path when starting the router.
|
|
22
|
+
|
|
23
|
+
Convert each option from the recipe command into one preset line:
|
|
24
|
+
|
|
25
|
+
- Remove the leading dashes: `--ctx-size 65536` becomes `ctx-size = 65536`.
|
|
26
|
+
- Write options without a value as `true`: `--jinja` becomes `jinja = true`.
|
|
27
|
+
- Remove quotes and PowerShell line-continuation backticks around values.
|
|
28
|
+
- Leave out `--host` and `--port`. They belong on the router command line.
|
|
29
|
+
- Add `load-on-startup = true` so the router loads the model when it starts.
|
|
30
|
+
- Replace short model-file options with their long preset keys:
|
|
31
|
+
|
|
32
|
+
| Recipe option | Preset key |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `-hf` | `hf-repo` |
|
|
35
|
+
| `-hff` | `hf-file` |
|
|
36
|
+
| `-hfrd` | `hf-repo-draft` |
|
|
37
|
+
| `--spec-draft-model` | `spec-draft-model` |
|
|
38
|
+
|
|
39
|
+
For example, this recipe command:
|
|
40
|
+
|
|
41
|
+
```powershell
|
|
42
|
+
llama-server.exe -hf "unsloth/Qwen3.8-27B-GGUF" `
|
|
43
|
+
-hff "Qwen3.8-27B-UD-Q4_K_M.gguf" `
|
|
44
|
+
-hfrd "z-lab/Qwen3.8-27B-DFlash2-GGUF" `
|
|
45
|
+
--spec-draft-model "Qwen3.8-27B-DFlash2-Q4_K_M.gguf" `
|
|
46
|
+
--no-mmproj `
|
|
47
|
+
--host 127.0.0.1 `
|
|
48
|
+
--port 9931 `
|
|
49
|
+
--batch-size 4096 `
|
|
50
|
+
--ubatch-size 1024 `
|
|
51
|
+
--ctx-size 65536 `
|
|
52
|
+
--parallel 1 `
|
|
53
|
+
-ngl 999 `
|
|
54
|
+
--jinja `
|
|
55
|
+
--chat-template-kwargs '{"preserve_thinking":true}' `
|
|
56
|
+
--spec-type draft-dflash `
|
|
57
|
+
--spec-draft-n-max 7 `
|
|
58
|
+
--spec-draft-backend-sampling
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
becomes `qwen3.8-27b.ini`:
|
|
62
|
+
|
|
63
|
+
```ini
|
|
64
|
+
version = 1
|
|
65
|
+
|
|
66
|
+
[qwen3.8-27b]
|
|
67
|
+
load-on-startup = true
|
|
68
|
+
hf-repo = unsloth/Qwen3.8-27B-GGUF
|
|
69
|
+
hf-file = Qwen3.8-27B-UD-Q4_K_M.gguf
|
|
70
|
+
hf-repo-draft = z-lab/Qwen3.8-27B-DFlash2-GGUF
|
|
71
|
+
spec-draft-model = Qwen3.8-27B-DFlash2-Q4_K_M.gguf
|
|
72
|
+
no-mmproj = true
|
|
73
|
+
batch-size = 4096
|
|
74
|
+
ubatch-size = 1024
|
|
75
|
+
ctx-size = 65536
|
|
76
|
+
parallel = 1
|
|
77
|
+
ngl = 999
|
|
78
|
+
jinja = true
|
|
79
|
+
chat-template-kwargs = {"preserve_thinking":true}
|
|
80
|
+
spec-type = draft-dflash
|
|
81
|
+
spec-draft-n-max = 7
|
|
82
|
+
spec-draft-backend-sampling = true
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Start the router
|
|
86
|
+
|
|
87
|
+
Open PowerShell in the llama.cpp folder and run:
|
|
88
|
+
|
|
89
|
+
```powershell
|
|
90
|
+
.\llama-server.exe --models-preset qwen3.8-27b.ini --host 127.0.0.1 --port 8080
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If the recipe requires a Hugging Face token, set `$env:HF_TOKEN` in the same PowerShell window before starting the router. On its first start, the router downloads the model files.
|
|
94
|
+
|
|
95
|
+
Use the [router health checks](/llama-cpp#troubleshooting) to confirm that the server is ready. In Windows PowerShell, use `curl.exe` rather than `curl`, which PowerShell maps to a different command. The model is ready when `/models` lists `qwen3.8-27b` with the status `loaded`.
|
|
96
|
+
|
|
97
|
+
## Use the model in Atomic
|
|
98
|
+
|
|
99
|
+
Follow [Configure Atomic](/llama-cpp#configure-atomic) and connect to `http://127.0.0.1:8080`. The preset section name is the model ID, so select `qwen3.8-27b` in `/model` for this example.
|
|
100
|
+
|
|
101
|
+
NVIDIA recipe memory settings assume that only the selected model uses the GPU. If `/llama` shows other loaded models, unload them before using the recipe model.
|
package/docs/prompt-templates.md
CHANGED
|
@@ -95,6 +95,8 @@ Summarize the current state in ${1:-7} bullet points.
|
|
|
95
95
|
|
|
96
96
|
Usage: `/component Button "onClick handler" "disabled support"`
|
|
97
97
|
|
|
98
|
+
Use `""` or `''` to pass an empty argument without shifting later positions. For a template containing `Review $2. Focus: ${1:-correctness}.`, `/review "" src/index.ts` expands to `Review src/index.ts. Focus: correctness.`
|
|
99
|
+
|
|
98
100
|
## Loading Rules
|
|
99
101
|
|
|
100
102
|
- Template discovery in `prompts/` is non-recursive.
|
package/docs/providers.md
CHANGED
|
@@ -294,6 +294,10 @@ Catalog failures preserve the last usable models for each provider. See [catalog
|
|
|
294
294
|
|
|
295
295
|
Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`), and both direct providers also expose the multimodal `glm-5.3-flash`. Baseten defaults to its directly selectable `zai-org/GLM-5.3` and also exposes `zai-org/GLM-5.3-Fast` and the multimodal `zai-org/GLM-5.3-Flash`; OpenRouter exposes `z-ai/glm-5.3` and `z-ai/glm-5.3-flash`. The full and Flash entries support `low`, `high`, and `max` reasoning; Baseten's Fast entry also supports `off`. Use Baseten's `zai-org/GLM-5.2` or `zai-org/GLM-5.3-Fast` when fully disabled reasoning is required. Qwen Token Plan Individual defaults to `qwen3.8-max` and uses the international `QWEN_TOKEN_PLAN_API_KEY` shared with the existing Qwen Token Plan provider. These catalogs follow their upstream providers, so use `--list-models` for the current entries.
|
|
296
296
|
|
|
297
|
+
Xiaomi MiMo reasoning models on `xiaomi` and all three `xiaomi-token-plan-*` providers support only `off` (thinking disabled) and `high` (thinking enabled). Use these levels when selecting thinking; Xiaomi does not distinguish intermediate effort levels.
|
|
298
|
+
|
|
299
|
+
Kimi For Coding (`kimi-coding`) uses OpenAI Chat Completions at `https://api.kimi.com/coding/v1`. If a `models.json` override sets its `baseUrl`, include the `/v1` suffix. Kimi Code models always think, so `off` is not a selectable thinking level.
|
|
300
|
+
|
|
297
301
|
Use the table above for environment-variable and `auth.json` names.
|
|
298
302
|
|
|
299
303
|
#### Auth File
|
package/docs/reference/cli.md
CHANGED
|
@@ -121,10 +121,10 @@ When a print-mode turn correctly finishes by calling an opt-in terminating struc
|
|
|
121
121
|
| Option | Description |
|
|
122
122
|
|--------|-------------|
|
|
123
123
|
| `--provider <name>` | Provider to search for `--model`, such as `anthropic`, `openai`, or `google`; requires `--model` |
|
|
124
|
-
| `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking
|
|
125
|
-
| `--api-key <key>` | API key, overriding environment variables |
|
|
124
|
+
| `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>`. If several providers match, Atomic prefers the one with credentials; otherwise it asks for `--provider` |
|
|
125
|
+
| `--api-key <key>` | API key, overriding environment variables. It does not choose between providers that offer the same model |
|
|
126
126
|
| `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`; model capability mapping still governs availability |
|
|
127
|
-
| `--models <patterns>` | Comma-separated patterns for CTRL+P cycling |
|
|
127
|
+
| `--models <patterns>` | Comma-separated patterns for CTRL+P cycling. A model offered by several providers is added for each, with a warning |
|
|
128
128
|
| `--list-models [search]` | List available models |
|
|
129
129
|
|
|
130
130
|
## Session Options
|
package/docs/sessions.md
CHANGED
|
@@ -56,6 +56,10 @@ For the JSONL file format and SessionManager API, see [Session Format](/session-
|
|
|
56
56
|
|
|
57
57
|
Resuming restores saved verbatim compaction without another planning request. Older sessions with retired logical-deletion compaction can bring previously hidden content back into context.
|
|
58
58
|
|
|
59
|
+
When you resume at startup with the default tool selection, Atomic restores the tools recorded in the session, including tools activated during the conversation. `--tools +name,-name` modifies that restored selection. Explicit `--tools name,...`, `--no-tools`, and `--no-builtin-tools` keep their requested tool restrictions, and excluded tools stay excluded. Sessions with no recorded tool selection use the current defaults.
|
|
60
|
+
|
|
61
|
+
Workflow stages and subagents that fork the conversation keep their own configured tools, including stage result tools and child-only extension tools, rather than adopting the parent's recorded selection. Parent tool restrictions still apply.
|
|
62
|
+
|
|
59
63
|
In the picker you can:
|
|
60
64
|
|
|
61
65
|
- search by typing
|
package/docs/settings.md
CHANGED
|
@@ -118,7 +118,7 @@ Limits which models workflow stages and subagents with `model: "auto"` can be ro
|
|
|
118
118
|
|
|
119
119
|
Use provider IDs as shown by `/model` or `workflow({ action: "models" })`, such as `github-copilot`, `openai-codex`, `anthropic`, or `openrouter`. For example, to route only to your subscriptions, exclude the API-billed providers you have configured. The Claude subscription and the Anthropic API both use the `anthropic` provider, so the provider lists cannot separate them.
|
|
120
120
|
|
|
121
|
-
Model patterns use the same format as [`enabledModels`](#models) and `--models`: a full `provider/model` ID, a bare model ID, or a glob such as `anthropic/claude-*` or `*sonnet*`. Matching is case-insensitive. A pattern without glob characters selects a single model, so use a glob to cover a family. A thinking suffix such as `anthropic/claude-opus-4-8:high` selects the model only; it does not limit the effort `auto` chooses. A candidate must pass every list. Patterns that match no available model are ignored, so an allowlist whose patterns match nothing leaves no candidate.
|
|
121
|
+
Model patterns use the same format as [`enabledModels`](#models) and `--models`: a full `provider/model` ID, a bare model ID, or a glob such as `anthropic/claude-*` or `*sonnet*`. Matching is case-insensitive. A pattern without glob characters selects a single model ID, so use a glob to cover a family; a bare ID offered by several providers covers each of them, so use `provider/model` to pick one. A thinking suffix such as `anthropic/claude-opus-4-8:high` selects the model only; it does not limit the effort `auto` chooses. A candidate must pass every list. Patterns that match no available model are ignored, so an allowlist whose patterns match nothing leaves no candidate.
|
|
122
122
|
|
|
123
123
|
A project list replaces the global list of the same name; the other lists are kept. A subagent call or workflow stage that sets `modelConstraints.allowedProviders` or `excludedProviders`, for example because you asked for a provider, uses its own lists instead of the provider lists here for that call. `allowedModels` and `excludedModels` always apply, and the call's own `modelConstraints.allowedModels` can only narrow them. Provider lists in an agent definition or inherited from a parent workflow only narrow these settings; they never lift an exclusion. The filters apply to the routed model, its ranked fallbacks, any other fallback models the stage or subagent would try, and the current chat model that `auto` falls back to when routing fails, so none of them can run a filtered-out model.
|
|
124
124
|
|
|
@@ -342,9 +342,9 @@ Both fields must be non-negative safe integers, including ordinary settings. Inv
|
|
|
342
342
|
| `retry.maxAgentDelayMs` | number | `60000` | Maximum agent-level backoff delay (60s); `0` retries immediately |
|
|
343
343
|
| `retry.provider.timeoutMs` | number | SDK default | Provider/SDK request timeout in milliseconds |
|
|
344
344
|
| `retry.provider.maxRetries` | number | `0` | Provider/SDK retry attempts. Leave unset/`0` to let Atomic's agent-level retry handle transient failures |
|
|
345
|
-
| `retry.provider.maxRetryDelayMs` | number | `60000` | Max server-requested delay before failing (60s) |
|
|
345
|
+
| `retry.provider.maxRetryDelayMs` | number | `60000` | Max server-requested delay before failing (60s); also caps how long an agent-level retry waits for a server retry hint |
|
|
346
346
|
|
|
347
|
-
Agent-level retries use exponential backoff capped by `retry.maxAgentDelayMs`, including the shared main-chat and workflow retry policy and summary calls. This is independent of provider retry limits. Legacy `retry.maxDelayMs` still migrates to `retry.provider.maxRetryDelayMs`, not the agent cap.
|
|
347
|
+
Agent-level retries use exponential backoff capped by `retry.maxAgentDelayMs`, including the shared main-chat and workflow retry policy and summary calls. When a failed response carries a server retry hint (`Retry-After-Ms` or `Retry-After` header, or a Cloudflare 5xx `retry_after` body field), Atomic waits as long as the server asks instead, up to `retry.provider.maxRetryDelayMs`. OpenAI, OpenAI-compatible and ChatGPT (Codex) providers report these hints. `retry.maxRetries` still limits the number of retries, so with the defaults a hinted outage can take up to about 3 × 60s before the turn fails or switches to a configured `fallbackModels` entry. Cloudflare 520-524 responses and connection resets count as transient errors; non-retryable 4xx and quota errors still stop immediately. This is independent of provider retry limits. Legacy `retry.maxDelayMs` still migrates to `retry.provider.maxRetryDelayMs`, not the agent cap.
|
|
348
348
|
|
|
349
349
|
When a provider requests a retry delay longer than `retry.provider.maxRetryDelayMs` (e.g., Google's "quota will reset after 5h"), the request fails immediately with an informative error instead of waiting silently. Set to `0` to disable the cap.
|
|
350
350
|
|
package/docs/tools.md
CHANGED
|
@@ -16,6 +16,8 @@ Bundled integrations also provide [public repository search](#code_search), [web
|
|
|
16
16
|
|
|
17
17
|
Run `/tools` to see which tools are active, why the others are off and how to turn them on, and which selected names nothing registered, such as a misspelled `defaultTools` entry. SDK and RPC clients get the same report from [`session.getToolStatus()`](/sdk/reference#checking-tool-status) and [`get_tools`](/rpc/protocol#get_tools).
|
|
18
18
|
|
|
19
|
+
If a model finishes a tool call with malformed JSON arguments, Atomic rejects the call rather than executing a partially parsed request. The model receives an error containing its original arguments and can retry with valid JSON. This also applies to calls whose arguments were cut off before completion.
|
|
20
|
+
|
|
19
21
|
## `codemode`
|
|
20
22
|
|
|
21
23
|
Codemode lets the model compose permitted tool calls in JavaScript and return only the useful output. It is shipped but inactive by default. Enable it alongside Atomic's defaults in `~/.atomic/agent/settings.json` or project `.atomic/settings.json`:
|
|
@@ -1403,6 +1403,8 @@ One process uses one workflow database: DBOS runs a single executor per process,
|
|
|
1403
1403
|
|
|
1404
1404
|
While DBOS remains configured, a request for a different `poolSize` rejects. Repeating the same size or omitting it keeps the current configuration.
|
|
1405
1405
|
|
|
1406
|
+
You can await multiple durable `run()` calls in sequence in the same process. Each call sets up durability again if the previous call shut it down.
|
|
1407
|
+
|
|
1406
1408
|
```ts
|
|
1407
1409
|
import { run, WorkflowDurabilityRequiredError } from "@bastani/atomic/workflows";
|
|
1408
1410
|
|
|
@@ -63,14 +63,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
63
63
|
|
|
64
64
|
renderCall(args, theme, _context) {
|
|
65
65
|
const path = shortenPath(args.path || "");
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// Show line range if specified
|
|
69
|
-
if (args.offset !== undefined || args.limit !== undefined) {
|
|
70
|
-
const startLine = args.offset ?? 1;
|
|
71
|
-
const endLine = args.limit !== undefined ? startLine + args.limit - 1 : "";
|
|
72
|
-
pathDisplay += theme.fg("warning", `:${startLine}${endLine ? `-${endLine}` : ""}`);
|
|
73
|
-
}
|
|
66
|
+
const pathDisplay = path ? theme.fg("accent", path) : theme.fg("toolOutput", "...");
|
|
74
67
|
|
|
75
68
|
return new Text(`${theme.fg("toolTitle", theme.bold("read"))} ${pathDisplay}`, 0, 0);
|
|
76
69
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as os from "node:os";
|
|
2
|
+
import { formatReadLineRange } from "@bastani/atomic";
|
|
2
3
|
import type { Message } from "@bastani/pi-ai/compat";
|
|
3
4
|
|
|
4
5
|
export function formatTokens(count: number): string {
|
|
@@ -53,13 +54,10 @@ export function formatToolCall(
|
|
|
53
54
|
case "read": {
|
|
54
55
|
const rawPath = (args.file_path || args.path || "...") as string;
|
|
55
56
|
const filePath = shortenPath(rawPath);
|
|
56
|
-
const
|
|
57
|
-
const limit = args.limit as number | undefined;
|
|
57
|
+
const lineRange = formatReadLineRange(args.offset, args.limit);
|
|
58
58
|
let text = themeFg("accent", filePath);
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
const endLine = limit !== undefined ? startLine + limit - 1 : "";
|
|
62
|
-
text += themeFg("warning", `:${startLine}${endLine ? `-${endLine}` : ""}`);
|
|
59
|
+
if (lineRange) {
|
|
60
|
+
text += themeFg("warning", lineRange);
|
|
63
61
|
}
|
|
64
62
|
return themeFg("muted", "read ") + text;
|
|
65
63
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.38-alpha.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bastani/atomic",
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.38-alpha.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@bastani/atomic-natives": "0.9.
|
|
13
|
-
"@bastani/pi-ai": "0.9.
|
|
12
|
+
"@bastani/atomic-natives": "0.9.38-alpha.1",
|
|
13
|
+
"@bastani/pi-ai": "0.9.38-alpha.1",
|
|
14
14
|
"@dbos-inc/dbos-sdk": "4.25.14",
|
|
15
15
|
"@earendil-works/pi-agent-core": "1.2.0",
|
|
16
16
|
"@earendil-works/pi-codemode": "1.2.0",
|
|
@@ -430,18 +430,18 @@
|
|
|
430
430
|
}
|
|
431
431
|
},
|
|
432
432
|
"node_modules/@bastani/atomic-natives": {
|
|
433
|
-
"version": "0.9.
|
|
434
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.
|
|
433
|
+
"version": "0.9.38-alpha.1",
|
|
434
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives/-/atomic-natives-0.9.38-alpha.1.tgz",
|
|
435
435
|
"license": "MIT",
|
|
436
436
|
"optionalDependencies": {
|
|
437
|
-
"@bastani/atomic-natives-darwin-arm64": "0.9.
|
|
438
|
-
"@bastani/atomic-natives-darwin-x64": "0.9.
|
|
439
|
-
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.
|
|
440
|
-
"@bastani/atomic-natives-linux-arm64-musl": "0.9.
|
|
441
|
-
"@bastani/atomic-natives-linux-x64-gnu": "0.9.
|
|
442
|
-
"@bastani/atomic-natives-linux-x64-musl": "0.9.
|
|
443
|
-
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.
|
|
444
|
-
"@bastani/atomic-natives-win32-x64-msvc": "0.9.
|
|
437
|
+
"@bastani/atomic-natives-darwin-arm64": "0.9.38-alpha.1",
|
|
438
|
+
"@bastani/atomic-natives-darwin-x64": "0.9.38-alpha.1",
|
|
439
|
+
"@bastani/atomic-natives-linux-arm64-gnu": "0.9.38-alpha.1",
|
|
440
|
+
"@bastani/atomic-natives-linux-arm64-musl": "0.9.38-alpha.1",
|
|
441
|
+
"@bastani/atomic-natives-linux-x64-gnu": "0.9.38-alpha.1",
|
|
442
|
+
"@bastani/atomic-natives-linux-x64-musl": "0.9.38-alpha.1",
|
|
443
|
+
"@bastani/atomic-natives-win32-arm64-msvc": "0.9.38-alpha.1",
|
|
444
|
+
"@bastani/atomic-natives-win32-x64-msvc": "0.9.38-alpha.1"
|
|
445
445
|
},
|
|
446
446
|
"engines": {
|
|
447
447
|
"bun": ">=1.4.2",
|
|
@@ -449,8 +449,8 @@
|
|
|
449
449
|
}
|
|
450
450
|
},
|
|
451
451
|
"node_modules/@bastani/atomic-natives-darwin-arm64": {
|
|
452
|
-
"version": "0.9.
|
|
453
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.
|
|
452
|
+
"version": "0.9.38-alpha.1",
|
|
453
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-arm64/-/atomic-natives-darwin-arm64-0.9.38-alpha.1.tgz",
|
|
454
454
|
"license": "MIT",
|
|
455
455
|
"os": [
|
|
456
456
|
"darwin"
|
|
@@ -461,8 +461,8 @@
|
|
|
461
461
|
"optional": true
|
|
462
462
|
},
|
|
463
463
|
"node_modules/@bastani/atomic-natives-darwin-x64": {
|
|
464
|
-
"version": "0.9.
|
|
465
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.
|
|
464
|
+
"version": "0.9.38-alpha.1",
|
|
465
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-darwin-x64/-/atomic-natives-darwin-x64-0.9.38-alpha.1.tgz",
|
|
466
466
|
"license": "MIT",
|
|
467
467
|
"os": [
|
|
468
468
|
"darwin"
|
|
@@ -473,8 +473,8 @@
|
|
|
473
473
|
"optional": true
|
|
474
474
|
},
|
|
475
475
|
"node_modules/@bastani/atomic-natives-linux-arm64-gnu": {
|
|
476
|
-
"version": "0.9.
|
|
477
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.
|
|
476
|
+
"version": "0.9.38-alpha.1",
|
|
477
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-gnu/-/atomic-natives-linux-arm64-gnu-0.9.38-alpha.1.tgz",
|
|
478
478
|
"license": "MIT",
|
|
479
479
|
"os": [
|
|
480
480
|
"linux"
|
|
@@ -488,8 +488,8 @@
|
|
|
488
488
|
"optional": true
|
|
489
489
|
},
|
|
490
490
|
"node_modules/@bastani/atomic-natives-linux-arm64-musl": {
|
|
491
|
-
"version": "0.9.
|
|
492
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.
|
|
491
|
+
"version": "0.9.38-alpha.1",
|
|
492
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-arm64-musl/-/atomic-natives-linux-arm64-musl-0.9.38-alpha.1.tgz",
|
|
493
493
|
"license": "MIT",
|
|
494
494
|
"os": [
|
|
495
495
|
"linux"
|
|
@@ -503,8 +503,8 @@
|
|
|
503
503
|
"optional": true
|
|
504
504
|
},
|
|
505
505
|
"node_modules/@bastani/atomic-natives-linux-x64-gnu": {
|
|
506
|
-
"version": "0.9.
|
|
507
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.
|
|
506
|
+
"version": "0.9.38-alpha.1",
|
|
507
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-gnu/-/atomic-natives-linux-x64-gnu-0.9.38-alpha.1.tgz",
|
|
508
508
|
"license": "MIT",
|
|
509
509
|
"os": [
|
|
510
510
|
"linux"
|
|
@@ -518,8 +518,8 @@
|
|
|
518
518
|
"optional": true
|
|
519
519
|
},
|
|
520
520
|
"node_modules/@bastani/atomic-natives-linux-x64-musl": {
|
|
521
|
-
"version": "0.9.
|
|
522
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.
|
|
521
|
+
"version": "0.9.38-alpha.1",
|
|
522
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-linux-x64-musl/-/atomic-natives-linux-x64-musl-0.9.38-alpha.1.tgz",
|
|
523
523
|
"license": "MIT",
|
|
524
524
|
"os": [
|
|
525
525
|
"linux"
|
|
@@ -533,8 +533,8 @@
|
|
|
533
533
|
"optional": true
|
|
534
534
|
},
|
|
535
535
|
"node_modules/@bastani/atomic-natives-win32-arm64-msvc": {
|
|
536
|
-
"version": "0.9.
|
|
537
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.
|
|
536
|
+
"version": "0.9.38-alpha.1",
|
|
537
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-arm64-msvc/-/atomic-natives-win32-arm64-msvc-0.9.38-alpha.1.tgz",
|
|
538
538
|
"license": "MIT",
|
|
539
539
|
"os": [
|
|
540
540
|
"win32"
|
|
@@ -545,8 +545,8 @@
|
|
|
545
545
|
"optional": true
|
|
546
546
|
},
|
|
547
547
|
"node_modules/@bastani/atomic-natives-win32-x64-msvc": {
|
|
548
|
-
"version": "0.9.
|
|
549
|
-
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.
|
|
548
|
+
"version": "0.9.38-alpha.1",
|
|
549
|
+
"resolved": "https://registry.npmjs.org/@bastani/atomic-natives-win32-x64-msvc/-/atomic-natives-win32-x64-msvc-0.9.38-alpha.1.tgz",
|
|
550
550
|
"license": "MIT",
|
|
551
551
|
"os": [
|
|
552
552
|
"win32"
|
|
@@ -557,8 +557,8 @@
|
|
|
557
557
|
"optional": true
|
|
558
558
|
},
|
|
559
559
|
"node_modules/@bastani/pi-ai": {
|
|
560
|
-
"version": "0.9.
|
|
561
|
-
"resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.
|
|
560
|
+
"version": "0.9.38-alpha.1",
|
|
561
|
+
"resolved": "https://registry.npmjs.org/@bastani/pi-ai/-/pi-ai-0.9.38-alpha.1.tgz",
|
|
562
562
|
"license": "MIT",
|
|
563
563
|
"dependencies": {
|
|
564
564
|
"@anthropic-ai/sdk": "0.129.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.38-alpha.1",
|
|
4
4
|
"description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"atomicConfig": {
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"prepublishOnly": "bun run clean && bun run build && bun run shrinkwrap"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@bastani/atomic-natives": "0.9.
|
|
82
|
-
"@bastani/pi-ai": "0.9.
|
|
81
|
+
"@bastani/atomic-natives": "0.9.38-alpha.1",
|
|
82
|
+
"@bastani/pi-ai": "0.9.38-alpha.1",
|
|
83
83
|
"@dbos-inc/dbos-sdk": "4.25.14",
|
|
84
84
|
"@earendil-works/pi-agent-core": "1.2.0",
|
|
85
85
|
"@earendil-works/pi-codemode": "1.2.0",
|
|
@@ -1015,6 +1015,11 @@
|
|
|
1015
1015
|
"description": "Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter.",
|
|
1016
1016
|
"default": false
|
|
1017
1017
|
},
|
|
1018
|
+
"supportsMidConvoEffort": {
|
|
1019
|
+
"type": "boolean",
|
|
1020
|
+
"description": "Whether thinking level changes are sent inside the conversation instead of changing the request's effort, so a change keeps the prompt cache. Used by the anthropic-messages and openai-responses APIs.",
|
|
1021
|
+
"default": false
|
|
1022
|
+
},
|
|
1018
1023
|
"supportsMaxOutputTokens": {
|
|
1019
1024
|
"type": "boolean",
|
|
1020
1025
|
"description": "Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it.",
|
|
@@ -1045,11 +1050,6 @@
|
|
|
1045
1050
|
"description": "Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly.",
|
|
1046
1051
|
"default": false
|
|
1047
1052
|
},
|
|
1048
|
-
"supportsMidConvoEffort": {
|
|
1049
|
-
"type": "boolean",
|
|
1050
|
-
"description": "Whether the exact model transport supports effort-only system messages and thinking binding controls.",
|
|
1051
|
-
"default": false
|
|
1052
|
-
},
|
|
1053
1053
|
"supportsMidConvoToolChanges": {
|
|
1054
1054
|
"type": "boolean",
|
|
1055
1055
|
"description": "Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages.",
|