@bastani/atomic 0.10.14 → 0.10.15-alpha.2
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 +31 -0
- package/README.md +1 -1
- 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 +11 -1
- 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 +80 -67
- 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 +117 -90
- 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 +16 -17
- 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 -19
- 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 +51 -39
- 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
- package/docs/termux.md +0 -118
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Package reference"
|
|
3
3
|
sidebarTitle: "Packages"
|
|
4
|
-
description: "Reference for package resource filtering patterns, glob vs exact matching, autoload overrides, precedence, and
|
|
4
|
+
description: "Reference for package resource filtering patterns, glob vs exact matching, autoload overrides, precedence, deduplication, and cache paths."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Reference for package filtering, `autoload: false`, precedence, deduplication, and temporary cache paths. To install and manage packages, see [Install and manage packages](/packages) and [Package CLI commands](/reference/cli#package-commands). To publish a package, see [Create and publish packages](/packages/authoring).
|
|
8
8
|
|
|
9
9
|
## Package filtering
|
|
10
10
|
|
|
@@ -27,7 +27,10 @@ Use the object form in [`settings.json`](/settings) to filter which resources lo
|
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
How package filters interact with the package manifest:
|
|
31
|
+
|
|
32
|
+
- When the package manifest defines a non-empty array for a resource type, filters run only over the files enabled by that manifest entry and cannot force-include files the manifest excluded.
|
|
33
|
+
- When a package filter object is configured in `settings.json`, any resource type omitted from the package's `atomic` manifest—or set to `[]` under an active filter or `autoload: false`—falls back to scanning the package's convention directories (`extensions/`, `skills/`, `prompts/`, `themes/`).
|
|
31
34
|
|
|
32
35
|
### Pattern syntax
|
|
33
36
|
|
|
@@ -35,35 +38,35 @@ Package filters run on top of the files collected from the package manifest (or
|
|
|
35
38
|
| --- | --- | --- |
|
|
36
39
|
| *(key omitted)* | Default | Load all resources of this type exposed by the package |
|
|
37
40
|
| `[]` | Empty | Load no resources of this type |
|
|
38
|
-
| `pattern` (plain) | Glob
|
|
39
|
-
| `!pattern` | Glob
|
|
41
|
+
| `pattern` (plain) | Glob | Restrict to entries matching at least one plain pattern (or enable matching items under `autoload: false`) |
|
|
42
|
+
| `!pattern` | Glob | Exclude matching entries |
|
|
40
43
|
| `+path` / `+name` | Exact match | Force-include an exact relative path, full path, or MCP server name |
|
|
41
44
|
| `-path` / `-name` | Exact match | Force-exclude an exact relative path, full path, or MCP server name |
|
|
42
45
|
|
|
43
|
-
### Glob vs exact matching rules
|
|
46
|
+
### Glob vs. exact matching rules
|
|
44
47
|
|
|
45
|
-
- **Glob patterns (plain and `!pattern`)**
|
|
48
|
+
- **Glob patterns (plain and `!pattern`)** are case-sensitive and always use POSIX `/` separators (`*` matches within one path segment, `**` crosses segments, `?` matches a single character):
|
|
46
49
|
- For file resources (`extensions`, `skills`, `prompts`, `themes`, `agents`), globs test the relative path from the package root (or settings directory), the bare filename (`basename`), and the full path.
|
|
47
|
-
- For `SKILL.md` files, globs also test the skill's parent directory (relative path, directory basename, and full path).
|
|
50
|
+
- For `SKILL.md` files, globs also test the skill's parent directory (relative path, directory basename, and full path). `"!my-skill"` excludes `skills/my-skill/SKILL.md`.
|
|
48
51
|
- For `mcpServers`, globs test the server name from the manifest.
|
|
49
52
|
- **Exact patterns (`+path` and `-path`)** strip leading `./` or `.\`, expand `~` in top-level settings arrays, and normalize slashes to `/`:
|
|
50
|
-
- For file resources, exact patterns match **only** the exact relative path or exact full path, plus the exact parent directory path for `SKILL.md` files (
|
|
51
|
-
- Exact patterns do **not** match bare filenames.
|
|
53
|
+
- For file resources, exact patterns match **only** the exact relative path or exact full path, plus the exact parent directory path for `SKILL.md` files (`"-skills/my-skill"` excludes `skills/my-skill/SKILL.md`).
|
|
54
|
+
- Exact patterns do **not** match bare filenames. `"-legacy.json"` will not exclude `themes/legacy.json`; write `"-themes/legacy.json"` or `"!legacy.json"` instead.
|
|
52
55
|
- For `mcpServers`, `+name` and `-name` match exact server names.
|
|
53
56
|
|
|
54
57
|
### Evaluation order
|
|
55
58
|
|
|
56
59
|
In **normal mode** (`autoload` omitted or `true`), operator type decides precedence regardless of array order:
|
|
57
60
|
|
|
58
|
-
1. **Plain include globs:** if any plain patterns exist, narrow the set to files matching at least one of them;
|
|
61
|
+
1. **Plain include globs:** if any plain patterns exist, narrow the set to files matching at least one of them; otherwise start with every resource collected from the package.
|
|
59
62
|
2. **`!pattern` glob excludes:** remove matching entries.
|
|
60
|
-
3. **`+path` / `+name` exact force-includes:** re-add matching
|
|
63
|
+
3. **`+path` / `+name` exact force-includes:** re-add matching entries (overrides plain filters and `!pattern`).
|
|
61
64
|
4. **`-path` / `-name` exact force-excludes:** remove matching entries last (`-` always beats `+`).
|
|
62
65
|
|
|
63
|
-
With **`"autoload": false`**, evaluation switches to **array order (last match wins)
|
|
66
|
+
With **`"autoload": false`**, evaluation switches to **array order (last match wins)** across all four forms: plain globs and `+path`/`+name` enable matching items, while `!pattern` and `-path`/`-name` disable them.
|
|
64
67
|
|
|
65
|
-
- On a **project** entry matching a **global** package, `"autoload": false` starts from the inherited global selection and applies each entry in array order as a delta override
|
|
66
|
-
- On a **standalone** package (not present in global settings), `"autoload": false` starts empty and loads only resources
|
|
68
|
+
- On a **project** entry matching a **global** package, `"autoload": false` reuses the user-scoped package installation on disk (without re-installing into `.atomic/npm` or `.atomic/git`), starts from the inherited global selection, and applies each entry in array order as a delta override.
|
|
69
|
+
- On a **standalone** package (not present in global settings), `"autoload": false` starts empty and loads only resources enabled by matching entries in array order.
|
|
67
70
|
|
|
68
71
|
```json
|
|
69
72
|
{
|
|
@@ -82,17 +85,31 @@ With **`"autoload": false`**, evaluation switches to **array order (last match w
|
|
|
82
85
|
Top-level `extensions`, `skills`, `prompts`, and `themes` arrays in `settings.json` mix additive file or directory paths with `!`, `+`, and `-` filter patterns applied to both those paths and auto-discovered resources in the same scope:
|
|
83
86
|
|
|
84
87
|
- Patterns expand `~` to your home directory (for example `"!~/skills/legacy-*"` or `"-~/skills/legacy"`).
|
|
85
|
-
- Toggle built-in extensions (`builtin:codemode`, `builtin:tool-search`, `builtin:llama.cpp`) in
|
|
86
|
-
- Package [subagents](/packages/authoring#subagents) have no top-level settings array
|
|
87
|
-
- `mcpServers`
|
|
88
|
+
- Toggle built-in extensions (`builtin:codemode`, `builtin:tool-search`, `builtin:llama.cpp`) in top-level `extensions` with `"-builtin:<name>"` or `"+builtin:<name>"`. Global `extensions` evaluates `builtin:<name>` overrides by operator precedence (`!` < `+` < `-`), whereas project `extensions` evaluates override entries (`!`, `+`, `-`) in array order (last match wins).
|
|
89
|
+
- Package [subagents](/packages/authoring#subagents) have no top-level settings array—filter them per package with `agents`.
|
|
90
|
+
- `mcpServers` filters match server names rather than file paths.
|
|
91
|
+
|
|
92
|
+
<Note>
|
|
93
|
+
Putting a plain glob (containing `*` or `?`, without `!`, `+`, or `-`) in a top-level `extensions`, `skills`, `prompts`, or `themes` array does **not** discover files from disk. It filters only the other plain paths listed in that same array and does not filter auto-discovered directories (auto-discovered directories evaluate `!`, `+`, and `-` overrides only).
|
|
94
|
+
</Note>
|
|
88
95
|
|
|
89
96
|
## Scope and deduplication
|
|
90
97
|
|
|
91
|
-
- **Project overrides global.** When the same package appears in both global and project settings, the project entry wins (unless `"autoload": false` is set on the project entry to
|
|
98
|
+
- **Project overrides global.** When the same package appears in both global and project settings, the project entry wins (unless `"autoload": false` is set on the project entry to apply delta overrides on top of the inherited global selection).
|
|
92
99
|
- **Listing packages.** `atomic list` displays `User packages` and `Project packages` separately and marks object-form entries with `(filtered)`.
|
|
93
|
-
- **Package identity.** Atomic deduplicates packages by npm package name (`npm`), normalized repository URL without `@ref` (`git`), or resolved canonical path (`local`, so `./pkg` and `/abs/path/to/pkg` match as the same package).
|
|
100
|
+
- **Package identity.** Atomic deduplicates packages by npm package name (`npm`), normalized repository URL without `@ref`/`#ref` (`git`), or resolved canonical path (`local`, so `./pkg` and `/abs/path/to/pkg` match as the same package).
|
|
94
101
|
- **Subagent collisions.** When multiple packages define the same full subagent name, `-e` packages take precedence over project-installed packages, which take precedence over globally installed packages.
|
|
95
102
|
|
|
103
|
+
### Temporary package cache
|
|
104
|
+
|
|
105
|
+
Remote packages passed with `-e` / `--extension` install into a private user-owned cache directory chosen in this order:
|
|
106
|
+
|
|
107
|
+
1. `$XDG_RUNTIME_DIR/atomic/extensions`
|
|
108
|
+
2. `<agentDir>/cache/tmp/extensions`
|
|
109
|
+
3. `<tmpdir>/atomic-<uid>/extensions`
|
|
110
|
+
|
|
111
|
+
Symlinked, shared, or other-user-owned cache directories are refused. Unpinned npm specs and branch or tag git refs refresh on start and `/reload` (falling back to cached copies when offline or on error); exact `@1.2.3` npm pins and checked-out git commit hashes (7 to 64 hex characters matching `HEAD`) skip network refresh.
|
|
112
|
+
|
|
96
113
|
### Resource precedence order
|
|
97
114
|
|
|
98
115
|
When multiple sources declare a skill, prompt template, or theme with the same name, Atomic keeps the first match in this order:
|
|
@@ -106,4 +123,8 @@ When multiple sources declare a skill, prompt template, or theme with the same n
|
|
|
106
123
|
7. Bundled packages (`@bastani/subagents`, `@bastani/intercom`)
|
|
107
124
|
8. Explicit CLI flags (`--skill`, `--prompt-template`, `--theme`)
|
|
108
125
|
|
|
109
|
-
|
|
126
|
+
Special cases:
|
|
127
|
+
|
|
128
|
+
- Because explicit CLI flags (`--skill`, `--prompt-template`, `--theme`) apply last, pass `--no-skills` (`-ns`), `--no-prompt-templates` (`-np`), or `--no-themes` if you want a CLI path to override an existing or bundled resource with the same name.
|
|
129
|
+
- For prompt templates, an inherited legacy `.pi` template yields to a bundled template with the same name.
|
|
130
|
+
- For extensions, `-e` flags load before configured and auto-discovered extensions.
|
package/docs/packages.md
CHANGED
|
@@ -1,57 +1,77 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Install and manage packages"
|
|
3
|
-
sidebarTitle: "
|
|
3
|
+
sidebarTitle: "Install and manage"
|
|
4
4
|
description: "Install, update, remove, and configure Atomic packages from npm, git, or local directories."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Atomic packages bundle extensions, skills, [subagents](/packages/authoring#subagents), prompt templates, themes, MCP servers, and [storage adapters](/storage/custom-adapters#adapters-from-atomic-packages) for distribution over npm, git, or local
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
Atomic packages bundle extensions, skills, [subagents](/packages/authoring#subagents), prompt templates, themes, MCP servers, and [storage adapters](/storage/custom-adapters#adapters-from-atomic-packages) for distribution over npm, git, or local directories.
|
|
8
|
+
|
|
9
|
+
<Columns cols={2}>
|
|
10
|
+
<Card title="Create and publish packages" href="/packages/authoring">
|
|
11
|
+
Declare package manifests, subagents, MCP servers, storage adapters, convention directories, and dependencies.
|
|
12
|
+
</Card>
|
|
13
|
+
<Card title="Package reference" href="/packages/reference">
|
|
14
|
+
Look up filter patterns, `autoload: false` overrides, resource precedence, deduplication, and cache paths.
|
|
15
|
+
</Card>
|
|
16
|
+
<Card title="Package CLI commands" href="/reference/cli#package-commands">
|
|
17
|
+
Full reference for `install`, `remove`, `update`, `list`, and `config` flags.
|
|
18
|
+
</Card>
|
|
19
|
+
<Card title="SDK extensions" href="/sdk/reference#extensions">
|
|
20
|
+
Load local packages and extensions programmatically with `DefaultResourceLoader`.
|
|
21
|
+
</Card>
|
|
22
|
+
</Columns>
|
|
13
23
|
|
|
14
24
|
## Install and manage
|
|
15
25
|
|
|
16
|
-
>
|
|
26
|
+
<Warning>
|
|
27
|
+
Atomic packages run with full user permissions—extensions execute arbitrary code and skills instruct the model. Review third-party source code before installing. See [Security](/security) for project trust rules.
|
|
28
|
+
</Warning>
|
|
17
29
|
|
|
18
30
|
```bash
|
|
31
|
+
# Install globally (default) or into the current project (-l / --local)
|
|
19
32
|
atomic install npm:@foo/bar@1.0.0
|
|
20
33
|
atomic install git:github.com/user/repo@v1
|
|
21
|
-
atomic install https://github.com/user/repo # Raw URLs work
|
|
22
|
-
atomic install /absolute/path/to/package
|
|
34
|
+
atomic install https://github.com/user/repo # Raw protocol URLs work directly
|
|
23
35
|
atomic install ./relative/path/to/package
|
|
24
|
-
atomic install -l npm:@foo/bar #
|
|
36
|
+
atomic install -l npm:@foo/bar # Write to .atomic/settings.json
|
|
25
37
|
|
|
38
|
+
# Inspect and remove
|
|
39
|
+
atomic list # Show global and project packages
|
|
26
40
|
atomic remove npm:@foo/bar # Alias: atomic uninstall
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
atomic update --
|
|
30
|
-
atomic update --
|
|
31
|
-
atomic update --models # Force-refresh authenticated model catalogs (15s timeout)
|
|
32
|
-
atomic update --self # Update Atomic CLI only (also: atomic update self | atomic)
|
|
33
|
-
atomic update --self --force # Reinstall Atomic even if current
|
|
34
|
-
atomic update --self --extensions # Same as atomic update --all
|
|
41
|
+
|
|
42
|
+
# Update packages
|
|
43
|
+
atomic update --extensions # Update all packages and reconcile git refs
|
|
44
|
+
atomic update --all # Update Atomic CLI + packages + git refs
|
|
35
45
|
atomic update npm:@foo/bar # Update one package (or --extension <src>)
|
|
46
|
+
atomic update --models # Refresh authenticated model catalogs (15s timeout)
|
|
36
47
|
```
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
<Note>
|
|
50
|
+
Plain `atomic update` (or `atomic update --self`) updates only the Atomic CLI and reminds you to run `atomic update --extensions` for packages. Self-update verifies `atomic --version` on `PATH` and runs `atomic intercom upgrade`; see [Installation](/getting-started/installation) for self-update overrides (`selfUpdateCommand` / `ATOMIC_SELF_UPDATE_COMMAND`) and uninstall steps.
|
|
51
|
+
</Note>
|
|
52
|
+
|
|
53
|
+
### Scope and project trust
|
|
39
54
|
|
|
40
|
-
- **Global
|
|
41
|
-
- **Project trust gate.** In an untrusted project, `atomic install -l` and `atomic remove -l` exit with code 1 (`Project is not trusted. Use --approve to modify local package config.`) unless you trust the project first ([Security](/security)) or pass `-a` / `--approve`. Both `-a` / `--approve` and `-na` / `--no-approve`
|
|
42
|
-
- **Update output.** Atomic lists each updated npm version or git commit (for example `npm:@foo/bar 1.2.0 -> 1.3.0`), prints `Packages are already up to date` when nothing changed, prints warnings when no package upgraded, and reports skipped updates in offline mode.
|
|
43
|
-
- **Offline mode.** Pass `--offline` or set `ATOMIC_OFFLINE=1` to skip automatic startup installs and package updates.
|
|
44
|
-
- **Self-update safety.** Atomic installs the exact advertised version (showing any release note first) and only modifies installations managed and writable by the detected global package manager. On Windows, automatic self-update supports `npm` and `pnpm` installs only unless you override the command. Override auto-detection with `selfUpdateCommand` in global `settings.json` or the `ATOMIC_SELF_UPDATE_COMMAND` environment variable; otherwise Atomic prints the manual update command. To uninstall Atomic itself, see [Uninstall](/getting-started/installation#uninstall).
|
|
45
|
-
- **Resilience and concurrency.** Startup install failures (such as offline registries) warn with the `atomic remove` command, skip that package's resources, and retry on the next start or `/reload` (`atomic install` and `atomic update --extensions` still exit non-zero). Concurrent installs serialize per package, interrupted git clones re-clone on retry, and `atomic remove` cleans up orphaned package directories.
|
|
55
|
+
- **Global vs. project scope.** `install` and `remove` edit `~/.atomic/agent/settings.json` by default ([Settings](/settings)). Pass `-l` / `--local` to edit `.atomic/settings.json` (legacy `.pi/settings.json` is also read). Missing project packages install automatically on startup once the project is trusted.
|
|
56
|
+
- **Project trust gate.** In an untrusted project, `atomic install -l` and `atomic remove -l` exit with code 1 (`Project is not trusted. Use --approve to modify local package config.`) unless you trust the project first ([Security](/security)) or pass `-a` / `--approve`. Both `-a` / `--approve` and `-na` / `--no-approve` work on `install`, `remove`, `update`, `list`, and `config`.
|
|
46
57
|
|
|
47
|
-
|
|
58
|
+
### Updating packages and offline mode
|
|
59
|
+
|
|
60
|
+
- **Flag combinations.** `--all`, `--models`, and `--extension` are mutually exclusive and cannot be combined with positional sources; `--extension` may be passed only once.
|
|
61
|
+
- **Output and partial failures.** Atomic reports each updated npm version or git commit (for example `npm:@foo/bar 1.2.0 -> 1.3.0`, tagged `(project)` for project scope) or prints `Packages are already up to date`. When some packages fail during a batch update, Atomic still prints the packages that succeeded before exiting non-zero.
|
|
62
|
+
- **Offline mode.** Pass `--offline` or set `ATOMIC_OFFLINE` to `1`, `true`, or `yes` (case-insensitive; legacy `PI_OFFLINE` is also read) to skip automatic startup installs and package updates.
|
|
63
|
+
- **Startup resilience.** If an automatic startup install fails (for example offline), Atomic warns with the matching `atomic remove` command, skips that package's resources, and retries on the next start or `/reload` (`atomic install` and `atomic update --extensions` still exit non-zero). Concurrent installs serialize per package, interrupted git clones re-clone on retry, and `atomic remove` cleans up orphaned directories.
|
|
64
|
+
|
|
65
|
+
### Preview a package with `-e`
|
|
66
|
+
|
|
67
|
+
Try a package for a single run without editing `settings.json`:
|
|
48
68
|
|
|
49
69
|
```bash
|
|
50
70
|
atomic -e npm:@foo/bar
|
|
51
71
|
atomic -e git:github.com/user/repo
|
|
52
72
|
```
|
|
53
73
|
|
|
54
|
-
`-e` installs into a private user-owned cache (
|
|
74
|
+
`-e` / `--extension` installs remote sources into a private user-owned cache (see [Temporary package cache](/packages/reference#temporary-package-cache) for exact paths). Unpinned npm specs and branch or tag git refs refresh on start and `/reload` (falling back to cache offline or on error), while exact `@1.2.3` npm pins and matching git commit hashes skip network checks. Local `-e <dir>` paths can also load `<dir>/.atomic`, `<dir>/.pi`, and `<dir>/.agents/skills` after resolving trust for that directory.
|
|
55
75
|
|
|
56
76
|
## Package sources
|
|
57
77
|
|
|
@@ -64,36 +84,36 @@ npm:pkg@next
|
|
|
64
84
|
npm:pkg
|
|
65
85
|
```
|
|
66
86
|
|
|
67
|
-
- **Install locations.** Global npm packages install under `~/.atomic/agent/npm/` (
|
|
68
|
-
- **Pinning and
|
|
69
|
-
- **Custom package manager.** Override the
|
|
87
|
+
- **Install locations.** Global npm packages install under `~/.atomic/agent/npm/` (managed by Atomic rather than your system global `npm -g` root; Atomic checks system global `npm`, `pnpm`, or `bun` roots only for legacy installs already there). Project installs (`-l`) install under `.atomic/npm/` (legacy `.pi/npm/` fallback).
|
|
88
|
+
- **Pinning, ranges, and dist-tags.** Exact semver versions (`npm:pkg@1.2.3`) stay pinned and are skipped by `atomic update --extensions` and `--all`. Semver ranges (`^1.2.3`, `~1.2.3`) and dist-tags (`@next`) update when you run `atomic update --extensions` or `--all`. Dist-tags also check the registry on online startup and re-install when the tag moves.
|
|
89
|
+
- **Custom package manager (`npmCommand`).** Override the installer in `settings.json` when using `pnpm`, `bun`, or version managers such as `mise` or `asdf`:
|
|
70
90
|
|
|
71
91
|
```json
|
|
72
92
|
{
|
|
73
|
-
"npmCommand": ["mise", "exec", "node@
|
|
93
|
+
"npmCommand": ["mise", "exec", "node@24", "--", "npm"]
|
|
74
94
|
}
|
|
75
95
|
```
|
|
76
96
|
|
|
97
|
+
Atomic detects `npm`, `pnpm`, and `bun` even inside wrapper commands (use `--` if a wrapper mentions more than one manager name, or Atomic fails with `Ambiguous npmCommand package managers`) and passes manager-specific flags to avoid installing host peer dependencies:
|
|
98
|
+
|
|
99
|
+
- `npm`: `--legacy-peer-deps --no-audit --no-fund` (plus `--omit=dev` for git package dependencies)
|
|
100
|
+
- `pnpm`: `--config.auto-install-peers=false --config.strict-peer-dependencies=false --config.strict-dep-builds=false` (plus `--prod` for git dependencies)
|
|
101
|
+
- `bun`: `--omit=peer` (plus `--omit=dev` for git dependencies)
|
|
102
|
+
|
|
77
103
|
### git
|
|
78
104
|
|
|
79
105
|
```text
|
|
80
106
|
git:github.com/user/repo@v1
|
|
81
107
|
git:git@github.com:user/repo@main
|
|
82
108
|
https://github.com/user/repo@v1
|
|
109
|
+
https://github.com/user/repo#v1
|
|
83
110
|
ssh://git@github.com/user/repo@v1
|
|
84
111
|
```
|
|
85
112
|
|
|
86
|
-
- Bare protocol URLs (`https://`, `http://`, `ssh://`, `git://`) work directly
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
- `@ref` accepts a branch name, tag, or commit hash. Running `atomic update --extensions` or `--all` fetches that ref (`git fetch origin -- <ref>`) and resets hard to `FETCH_HEAD`: branch refs advance to new commits on that branch, while tags and commit hashes reconcile to their exact target. Whenever the checked-out commit changes, Atomic runs `git clean -fdx` (removing untracked files in the clone) and installs production dependencies if `package.json` exists. Change a pin with `atomic install git:host/user/repo@new-ref`.
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
atomic install git:git@github.com:user/repo
|
|
94
|
-
atomic install ssh://git@github.com/user/repo
|
|
95
|
-
atomic install git:git@github.com/user/repo@v1.0.0
|
|
96
|
-
```
|
|
113
|
+
- **URL syntax.** Bare protocol URLs (`https://`, `http://`, `ssh://`, `git://`) work directly; shorthand (`github.com/user/repo`, `git@github.com:user/repo`) requires the `git:` prefix. Hosted URLs accept `#ref` alongside `@ref`. Repository paths must have at least two segments (`owner/repo`) and cannot contain traversal (`..`, `.`), backslashes, or null bytes. Case-only path collisions on case-insensitive filesystems abort with an error.
|
|
114
|
+
- **SSH and CI.** SSH uses your keys and `~/.ssh/config`. For non-interactive or CI runs, set `GIT_TERMINAL_PROMPT=0` and `GIT_SSH_COMMAND="ssh -o BatchMode=yes -o ConnectTimeout=5"`.
|
|
115
|
+
- **Clone locations.** Repositories clone to `~/.atomic/agent/git/<host>/<path>` (global) or `.atomic/git/<host>/<path>` (project; legacy `.pi/git/` fallback).
|
|
116
|
+
- **Refs and updates.** `@ref` / `#ref` accepts a branch, tag, or commit hash. Running `atomic update --extensions` or `--all` fetches a pinned ref (`git fetch origin -- <ref>`) and resets hard to `FETCH_HEAD` (advancing branches and reconciling tags or commits). Unpinned checkouts track `@{upstream}` (when on `origin/`) or refresh `origin/HEAD`, and repair missing `dependencies` even when `HEAD` has not changed. Whenever `HEAD` changes, Atomic runs `git clean -fdx` and installs production dependencies if `package.json` exists (on Windows, locked files during cleanup warn and retry on a later update). Change a ref with `atomic install git:host/user/repo@new-ref`.
|
|
97
117
|
|
|
98
118
|
### Local paths
|
|
99
119
|
|
|
@@ -102,23 +122,14 @@ atomic install git:git@github.com/user/repo@v1.0.0
|
|
|
102
122
|
./relative/path/to/package
|
|
103
123
|
```
|
|
104
124
|
|
|
105
|
-
Local paths
|
|
106
|
-
|
|
107
|
-
Running `atomic remove <local-path>` deletes only the entry from `settings.json` and never deletes files from your local directory.
|
|
125
|
+
Local paths load in place without copying. `atomic install /absolute/path/to/package` stores the path in `settings.json` relative to the settings directory (`~/.atomic/agent` or `.atomic`). A file loads as a single extension; a directory loads as a package. `atomic remove <local-path>` removes only the settings entry and never deletes local files.
|
|
108
126
|
|
|
109
127
|
## Enable and disable resources
|
|
110
128
|
|
|
111
129
|
Run `atomic config` to toggle extensions, skills, prompt templates, and themes interactively:
|
|
112
130
|
|
|
113
|
-
- Opens global settings (`~/.atomic/agent/settings.json`). Press `Tab` to switch between global and project scope.
|
|
114
|
-
- Run `atomic config -l` (
|
|
115
|
-
- Package subagents do not appear in `atomic config`. Filter
|
|
116
|
-
- Toggle built-in extensions (`llama.cpp`, `codemode`, `tool-search`)
|
|
117
|
-
- If an interactive session crashes with an uncaught error whose stack crosses a loaded extension, Atomic names the extension in the exit output and suggests `atomic config` or `atomic -ne` to
|
|
118
|
-
|
|
119
|
-
## Authoring and reference
|
|
120
|
-
|
|
121
|
-
- [Create and publish packages](/packages/authoring#creating-an-atomic-package). Review manifest fields, [subagents](/packages/authoring#subagents), [MCP servers](/packages/authoring#mcp-servers), [storage adapters](/packages/authoring#storage-adapters), [gallery metadata](/packages/authoring#gallery-metadata), [convention directories](/packages/authoring#convention-directories), and [dependencies](/packages/authoring#dependencies).
|
|
122
|
-
- [Package reference](/packages/reference). Review [package filtering](/packages/reference#package-filtering) and [scope and deduplication](/packages/reference#scope-and-deduplication).
|
|
123
|
-
- [SDK extensions](/sdk/reference#extensions). Load local packages and extensions programmatically with `DefaultResourceLoader({ additionalExtensionPaths })`.
|
|
124
|
-
- [Package CLI commands](/reference/cli#package-commands), [Settings](/settings), and [Security](/security). Review CLI subcommands, `settings.json` keys, and project trust gates.
|
|
131
|
+
- Opens global settings (`~/.atomic/agent/settings.json`). Press `Tab` to switch between global and project scope in trusted projects (`Tab` is disabled in untrusted projects).
|
|
132
|
+
- Run `atomic config -l` (`--local`) to open project overrides (`.atomic/settings.json`) with inherited global entries dimmed. In an untrusted project, `atomic config -l` exits with code 1 unless you pass `--approve`.
|
|
133
|
+
- Package **subagents, MCP servers, and storage adapters** do not appear in `atomic config`. Filter `agents` and `mcpServers` per package in `settings.json` ([Package filtering](/packages/reference#package-filtering)), and select storage adapters via `storage.adapter`.
|
|
134
|
+
- Toggle built-in extensions (`llama.cpp`, `codemode`, `tool-search`) with `builtin:<name>` entries ([Built-in extension resources](/extensions#built-in-extension-resources)).
|
|
135
|
+
- If an interactive session crashes with an uncaught error whose stack crosses a loaded extension, Atomic names the extension in the exit output and suggests `atomic config` or `atomic -ne` to isolate the cause.
|
package/docs/programmatic.md
CHANGED
|
@@ -1,39 +1,133 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
sidebarTitle: "
|
|
4
|
-
description: "
|
|
2
|
+
title: "Choose an integration mode"
|
|
3
|
+
sidebarTitle: "Choose a mode"
|
|
4
|
+
description: "Compare Print mode, JSON event streams, RPC mode, and the TypeScript SDK, run a minimal example for each, and continue to its reference."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Atomic provides
|
|
7
|
+
Atomic provides four programmatic integration modes plus a component API for interactive extension interfaces. Choose the smallest mode that fits your integration, run its minimal example below, and continue to its guide or reference.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Compare integration modes
|
|
10
10
|
|
|
11
|
-
|
|
|
11
|
+
| What you want | Use this | Entry point |
|
|
12
12
|
| --- | --- | --- |
|
|
13
|
-
| Run one or more prompts and
|
|
14
|
-
|
|
|
15
|
-
|
|
|
13
|
+
| Run one or more prompts and capture plain text in a shell pipeline | [Print mode](/guides/non-interactive) | `atomic -p` |
|
|
14
|
+
| Run one or more prompts and parse structured session events in scripts or CI | [JSON event stream](/json) | `atomic --mode json` |
|
|
15
|
+
| Drive a long-lived Atomic process from another language, editor, or service | [RPC mode](/rpc) | `atomic --mode rpc` |
|
|
16
|
+
| Embed Atomic directly inside a Node.js 24.20+ application | [TypeScript SDK](/sdk) | `@bastani/atomic` |
|
|
16
17
|
|
|
17
|
-
- **
|
|
18
|
+
- **Print mode** runs one or more prompts (including piped stdin or `@file` inputs), writes the final response as plain text to stdout, and exits.
|
|
19
|
+
- **JSON event stream** executes prompts in sequence, writes every session event as newline-delimited JSON to stdout, and exits.
|
|
18
20
|
- **RPC mode** keeps an Atomic subprocess running over stdin/stdout JSON Lines so you can send follow-up prompts, steer or abort turns, switch models, and answer extension dialogs and OAuth prompts.
|
|
19
|
-
- **TypeScript SDK** runs the same agent runtime
|
|
21
|
+
- **TypeScript SDK** runs the same agent runtime in-process inside Node.js, with direct control over extensions, skills, tools, models, workspaces, and [session storage backends](/sdk/storage).
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## Minimal examples
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
- [SDK storage backends](/sdk/storage): configure SQLite, JSONL, in-memory, and PostgreSQL for `createAgentSession()`, `createAgentSessionRuntime()`, and `SessionManager`.
|
|
25
|
-
- [Structured decisions API](/sdk/structured-decisions): run typed classifier or chat decisions with `decide()` and `generateStructuredOutput()`.
|
|
26
|
-
- [Embed Atomic in a web server](/sdk/web-server): build a streaming HTTP API with Next.js App Router and `createAgentSession()`.
|
|
27
|
-
- [SDK API reference](/sdk/reference): complete session options, loaders, tool status, task supervision, run modes, and exports.
|
|
28
|
-
- [Remote compaction models](/models#remote-compaction-models) and [Environment blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint): plug in custom remote compactors and repeatable worktree setup for cross-machine resume.
|
|
25
|
+
### Print mode
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
```bash
|
|
28
|
+
git diff | atomic -p "Write a concise commit message for this diff"
|
|
29
|
+
```
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
### JSON event stream
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
atomic --mode json "List the TypeScript files in src/" 2>/dev/null \
|
|
35
|
+
| jq -c 'select(.type == "message_end")'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### RPC mode
|
|
39
|
+
|
|
40
|
+
Send newline-delimited JSON commands on stdin and read JSON responses and events from stdout:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
printf '%s\n' '{"id":"1","type":"prompt","message":"Say hello in one sentence."}' \
|
|
44
|
+
| atomic --mode rpc --no-session
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For multi-turn control, framing rules, and a streaming Python or TypeScript client, see [Drive Atomic over RPC](/rpc) and [Connect with RPC clients](/rpc/examples).
|
|
48
|
+
|
|
49
|
+
### TypeScript SDK
|
|
50
|
+
|
|
51
|
+
Install `@bastani/atomic` on Node.js 24.20+, create an in-memory session, stream text deltas, and dispose cleanly in `finally`:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { createAgentSession, ModelRuntime, SessionManager } from "@bastani/atomic";
|
|
55
|
+
|
|
56
|
+
const modelRuntime = await ModelRuntime.create();
|
|
57
|
+
const { session } = await createAgentSession({
|
|
58
|
+
sessionManager: SessionManager.inMemory(),
|
|
59
|
+
modelRuntime,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
session.subscribe((event) => {
|
|
63
|
+
if (event.type === "message_update" && event.assistantMessageEvent.type === "text_delta") {
|
|
64
|
+
process.stdout.write(event.assistantMessageEvent.delta);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
await session.prompt("List the files in the current directory.");
|
|
70
|
+
} finally {
|
|
71
|
+
await session.dispose();
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## TypeScript SDK guides
|
|
76
|
+
|
|
77
|
+
<Columns cols={2}>
|
|
78
|
+
<Card title="Use the TypeScript SDK" href="/sdk">
|
|
79
|
+
Create sessions, bind Git workspaces, configure Intercom policies, handle human input, and manage lifecycle events.
|
|
80
|
+
</Card>
|
|
81
|
+
<Card title="Configure session storage" href="/sdk/storage">
|
|
82
|
+
Wire SQLite, JSONL, in-memory, and PostgreSQL storage for `createAgentSession()`, `createAgentSessionRuntime()`, and `SessionManager`.
|
|
83
|
+
</Card>
|
|
84
|
+
<Card title="Make structured decisions" href="/sdk/structured-decisions">
|
|
85
|
+
Run typed classifier or chat decisions with `decide()`, `generateStructuredOutput()`, and `structured_output`.
|
|
86
|
+
</Card>
|
|
87
|
+
<Card title="Stream from a web server" href="/sdk/web-server">
|
|
88
|
+
Run Atomic behind a Next.js App Router endpoint and stream NDJSON transcript updates to a browser.
|
|
89
|
+
</Card>
|
|
90
|
+
<Card title="SDK API reference" href="/sdk/reference">
|
|
91
|
+
Complete reference for session options, runtime methods, resource loaders, run modes, error classes, and exports.
|
|
92
|
+
</Card>
|
|
93
|
+
<Card title="Compactors and blueprints" href="/compaction/custom-compactors">
|
|
94
|
+
Plug in custom remote compactors or configure repeatable [environment blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint) for cross-machine resume.
|
|
95
|
+
</Card>
|
|
96
|
+
</Columns>
|
|
97
|
+
|
|
98
|
+
## RPC and JSON guides
|
|
99
|
+
|
|
100
|
+
<Columns cols={2}>
|
|
101
|
+
<Card title="Drive Atomic over RPC" href="/rpc">
|
|
102
|
+
Startup flags, command concurrency lanes, strict JSONL framing, shutdown signals, and a Python client.
|
|
103
|
+
</Card>
|
|
104
|
+
<Card title="RPC protocol reference" href="/rpc/protocol">
|
|
105
|
+
Every RPC command, streamed event, structured error code, and JSON wire type.
|
|
106
|
+
</Card>
|
|
107
|
+
<Card title="Handle extension UI over RPC" href="/rpc/extension-ui">
|
|
108
|
+
Implement dialogs, notifications, widgets, questionnaires, and interactive OAuth prompts over RPC.
|
|
109
|
+
</Card>
|
|
110
|
+
<Card title="Connect with RPC clients" href="/rpc/examples">
|
|
111
|
+
Use the typed `RpcClient` in TypeScript or a standalone Node.js script.
|
|
112
|
+
</Card>
|
|
113
|
+
<Card title="Parse JSON event streams" href="/json">
|
|
114
|
+
Event shapes, `message_update` wire stripping, piped input, exit codes, and `jq` filtering for `--mode json`.
|
|
115
|
+
</Card>
|
|
116
|
+
</Columns>
|
|
35
117
|
|
|
36
118
|
## Terminal UI and standalone libraries
|
|
37
119
|
|
|
38
|
-
|
|
39
|
-
|
|
120
|
+
<Columns cols={2}>
|
|
121
|
+
<Card title="Build TUI components" href="/tui">
|
|
122
|
+
Walk through custom interactive components, overlays, status bars, and common extension UI patterns.
|
|
123
|
+
</Card>
|
|
124
|
+
<Card title="TUI API reference" href="/tui/reference">
|
|
125
|
+
Component, focus, keyboard input, and rendering contracts for interactive extensions.
|
|
126
|
+
</Card>
|
|
127
|
+
<Card title="Standalone libraries" href="/libraries">
|
|
128
|
+
Use the six core `@bastani/atomic-*` packages (`ai`, `agent-core`, `tui`, `codemode`, `schema`, and `telemetry`) directly.
|
|
129
|
+
</Card>
|
|
130
|
+
<Card title="PostgreSQL storage adapter" href="/libraries/storage-postgres">
|
|
131
|
+
Install the optional PostgreSQL storage adapter package (`@bastani/atomic-storage-postgres`) for shared multi-machine sessions.
|
|
132
|
+
</Card>
|
|
133
|
+
</Columns>
|