@bastani/atomic 0.8.28-alpha.1 → 0.8.28-alpha.3
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 +60 -0
- package/README.md +120 -118
- 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 +26 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/builtin/open-claude-design.ts +150 -13
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/authoring.d.ts +5 -2
- package/dist/builtin/workflows/src/extension/dispatcher.ts +2 -0
- package/dist/builtin/workflows/src/extension/index.ts +8 -0
- package/dist/builtin/workflows/src/extension/render-result.ts +5 -2
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +18 -0
- package/dist/builtin/workflows/src/runs/background/status.ts +4 -0
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +1251 -110
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +34 -10
- package/dist/builtin/workflows/src/shared/expanded-workflow-graph.ts +10 -2
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +28 -9
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +9 -3
- package/dist/builtin/workflows/src/shared/store-types.ts +10 -3
- package/dist/builtin/workflows/src/shared/store.ts +29 -7
- package/dist/builtin/workflows/src/shared/types.ts +12 -10
- package/dist/builtin/workflows/src/tui/chat-surface.ts +32 -33
- package/dist/builtin/workflows/src/tui/run-detail.ts +23 -4
- package/dist/builtin/workflows/src/tui/status-helpers.ts +4 -0
- package/dist/builtin/workflows/src/tui/status-list.ts +47 -3
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +1 -1
- package/dist/builtin/workflows/src/tui/widget.ts +12 -3
- package/dist/builtin/workflows/src/workflows/define-workflow.ts +3 -3
- package/dist/cli/args.d.ts +4 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +35 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +36 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +7 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +57 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -3
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +3 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +1 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +3 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +3 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +9 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +70 -21
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +4 -3
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +3 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +9 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +18 -24
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +5 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/template.js +19 -6
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +6 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +11 -4
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +53 -3
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +34 -4
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +2 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +27 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +64 -7
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -0
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/output-guard.d.ts +1 -0
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js +52 -22
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +20 -8
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +58 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +5 -4
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +30 -29
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts +4 -0
- package/dist/core/provider-attribution.d.ts.map +1 -0
- package/dist/core/provider-attribution.js +73 -0
- package/dist/core/provider-attribution.js.map +1 -0
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +3 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +9 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +134 -11
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +12 -2
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +108 -18
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +4 -2
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +13 -42
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +6 -7
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +99 -35
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +15 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +69 -10
- 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 +0 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/inline-input.d.ts +28 -0
- package/dist/core/tools/ask-user-question/state/inline-input.d.ts.map +1 -0
- package/dist/core/tools/ask-user-question/state/inline-input.js +56 -0
- package/dist/core/tools/ask-user-question/state/inline-input.js.map +1 -0
- package/dist/core/tools/ask-user-question/state/key-router.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/key-router.js +30 -4
- package/dist/core/tools/ask-user-question/state/key-router.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.js +9 -8
- package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.d.ts +3 -2
- package/dist/core/tools/ask-user-question/state/row-intent.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.js +1 -1
- package/dist/core/tools/ask-user-question/state/row-intent.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/contract.d.ts +2 -0
- package/dist/core/tools/ask-user-question/state/selectors/contract.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/contract.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/projections.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/selectors/projections.js +2 -0
- package/dist/core/tools/ask-user-question/state/selectors/projections.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/state-reducer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/state-reducer.js +36 -24
- package/dist/core/tools/ask-user-question/state/state-reducer.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/state.d.ts +8 -0
- package/dist/core/tools/ask-user-question/state/state.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/state.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +6 -0
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.js +19 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +3 -2
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.js +15 -3
- package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/types.d.ts +2 -1
- package/dist/core/tools/ask-user-question/tool/types.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/types.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.d.ts +5 -2
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.js +2 -0
- package/dist/core/tools/ask-user-question/view/components/chat-row-view.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.d.ts +1 -0
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.js +2 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/props-adapter.d.ts +3 -3
- package/dist/core/tools/ask-user-question/view/props-adapter.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/props-adapter.js +11 -4
- package/dist/core/tools/ask-user-question/view/props-adapter.js.map +1 -1
- package/dist/core/tools/bash-policy.d.ts +62 -0
- package/dist/core/tools/bash-policy.d.ts.map +1 -0
- package/dist/core/tools/bash-policy.js +1069 -0
- package/dist/core/tools/bash-policy.js.map +1 -0
- package/dist/core/tools/bash.d.ts +5 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +7 -10
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/oversized-tool-result.d.ts +53 -0
- package/dist/core/tools/oversized-tool-result.d.ts.map +1 -0
- package/dist/core/tools/oversized-tool-result.js +206 -0
- package/dist/core/tools/oversized-tool-result.js.map +1 -0
- package/dist/core/tools/read.d.ts +12 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +99 -34
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +6 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +17 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +6 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +2 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/tool-limits.d.ts +25 -0
- package/dist/core/tools/tool-limits.d.ts.map +1 -0
- package/dist/core/tools/tool-limits.js +25 -0
- package/dist/core/tools/tool-limits.js.map +1 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +31 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +196 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/index.d.ts +11 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +142 -30
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +3 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +325 -7
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +2 -2
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +6 -0
- 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/components/login-dialog.d.ts +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -16
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +22 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +85 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +1 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +130 -9
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +10 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +1 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +3 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +50 -6
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +23 -4
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +1 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts +6 -2
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +104 -10
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +72 -0
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/deprecation.d.ts +4 -0
- package/dist/utils/deprecation.d.ts.map +1 -0
- package/dist/utils/deprecation.js +13 -0
- package/dist/utils/deprecation.js.map +1 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +54 -22
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +7 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +22 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/docs/containerization.md +111 -0
- package/docs/custom-provider.md +9 -9
- package/docs/development.md +1 -1
- package/docs/docs.json +2 -0
- package/docs/extensions.md +40 -4
- package/docs/index.md +2 -0
- package/docs/models.md +10 -10
- package/docs/packages.md +1 -1
- package/docs/prompt-templates.md +9 -2
- package/docs/providers.md +18 -5
- package/docs/quickstart.md +1 -0
- package/docs/rpc.md +3 -2
- package/docs/sdk.md +47 -0
- package/docs/security.md +58 -0
- package/docs/session-format.md +2 -2
- package/docs/sessions.md +8 -0
- package/docs/settings.md +21 -4
- package/docs/skills.md +1 -1
- package/docs/terminal-setup.md +44 -2
- package/docs/themes.md +1 -1
- package/docs/tmux.md +4 -2
- package/docs/tui.md +14 -5
- package/docs/usage.md +17 -3
- package/docs/workflows.md +127 -15
- package/examples/README.md +1 -1
- package/examples/extensions/README.md +8 -5
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +1 -1
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/custom-header.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +3 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
- package/examples/extensions/custom-provider-anthropic/package.json +6 -6
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +55 -4
- package/examples/extensions/custom-provider-gitlab-duo/package.json +3 -3
- package/examples/extensions/doom-overlay/README.md +1 -1
- package/examples/extensions/doom-overlay/index.ts +2 -2
- package/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/gondolin/index.ts +523 -0
- package/examples/extensions/gondolin/package-lock.json +185 -0
- package/examples/extensions/gondolin/package.json +19 -0
- package/examples/extensions/handoff.ts +1 -1
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +2 -2
- package/examples/extensions/input-transform-streaming.ts +39 -0
- package/examples/extensions/input-transform.ts +3 -3
- package/examples/extensions/interactive-shell.ts +2 -2
- package/examples/extensions/mac-system-theme.ts +2 -2
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/modal-editor.ts +1 -1
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/overlay-qa-tests.ts +198 -179
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/preset.ts +14 -12
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +1 -1
- package/examples/extensions/qna.ts +1 -1
- package/examples/extensions/question.ts +1 -1
- package/examples/extensions/questionnaire.ts +1 -1
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/sandbox/index.ts +16 -14
- package/examples/extensions/sandbox/package-lock.json +90 -90
- package/examples/extensions/sandbox/package.json +17 -17
- package/examples/extensions/snake.ts +1 -1
- package/examples/extensions/space-invaders.ts +1 -1
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/subagent/README.md +13 -13
- package/examples/extensions/subagent/agents.ts +4 -2
- package/examples/extensions/subagent/index.ts +6 -6
- package/examples/extensions/summarize.ts +1 -1
- package/examples/extensions/tic-tac-toe.ts +1 -1
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/todo.ts +1 -1
- package/examples/extensions/tool-override.ts +1 -1
- package/examples/extensions/tools.ts +6 -1
- package/examples/extensions/with-deps/package-lock.json +4 -4
- package/examples/extensions/with-deps/package.json +7 -7
- package/examples/extensions/working-indicator.ts +4 -4
- package/examples/extensions/working-message-test.ts +1 -1
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/03-custom-prompt.ts +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +2 -2
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/examples/sdk/09-api-keys-and-oauth.ts +2 -2
- package/examples/sdk/README.md +2 -2
- package/package.json +4 -4
package/docs/custom-provider.md
CHANGED
|
@@ -42,7 +42,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
42
42
|
pi.registerProvider("my-provider", {
|
|
43
43
|
name: "My Provider",
|
|
44
44
|
baseUrl: "https://api.example.com",
|
|
45
|
-
apiKey: "MY_API_KEY",
|
|
45
|
+
apiKey: "$MY_API_KEY",
|
|
46
46
|
api: "openai-completions",
|
|
47
47
|
models: [
|
|
48
48
|
{
|
|
@@ -82,7 +82,7 @@ pi.registerProvider("openai", {
|
|
|
82
82
|
pi.registerProvider("google", {
|
|
83
83
|
baseUrl: "https://ai-gateway.corp.com/google",
|
|
84
84
|
headers: {
|
|
85
|
-
"X-Corp-Auth": "CORP_AUTH_TOKEN" // env
|
|
85
|
+
"X-Corp-Auth": "$CORP_AUTH_TOKEN" // resolves from env; omit $ for a literal
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
```
|
|
@@ -111,7 +111,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
111
111
|
|
|
112
112
|
pi.registerProvider("local-openai", {
|
|
113
113
|
baseUrl: "http://localhost:1234/v1",
|
|
114
|
-
apiKey: "LOCAL_OPENAI_API_KEY",
|
|
114
|
+
apiKey: "$LOCAL_OPENAI_API_KEY",
|
|
115
115
|
api: "openai-completions",
|
|
116
116
|
models: payload.data.map((model) => ({
|
|
117
117
|
id: model.id,
|
|
@@ -131,7 +131,7 @@ This registers the fetched models before startup finishes.
|
|
|
131
131
|
```typescript
|
|
132
132
|
pi.registerProvider("my-llm", {
|
|
133
133
|
baseUrl: "https://api.my-llm.com/v1",
|
|
134
|
-
apiKey: "MY_LLM_API_KEY", // env var
|
|
134
|
+
apiKey: "$MY_LLM_API_KEY", // env var reference; omit $ for a literal value
|
|
135
135
|
api: "openai-completions", // which streaming API to use
|
|
136
136
|
models: [
|
|
137
137
|
{
|
|
@@ -162,7 +162,7 @@ Use `pi.unregisterProvider(name)` to remove a provider that was previously regis
|
|
|
162
162
|
// Register
|
|
163
163
|
pi.registerProvider("my-llm", {
|
|
164
164
|
baseUrl: "https://api.my-llm.com/v1",
|
|
165
|
-
apiKey: "MY_LLM_API_KEY",
|
|
165
|
+
apiKey: "$MY_LLM_API_KEY",
|
|
166
166
|
api: "openai-completions",
|
|
167
167
|
models: [
|
|
168
168
|
{
|
|
@@ -240,7 +240,7 @@ If your provider expects `Authorization: Bearer <key>` but doesn't use a standar
|
|
|
240
240
|
```typescript
|
|
241
241
|
pi.registerProvider("custom-api", {
|
|
242
242
|
baseUrl: "https://api.example.com",
|
|
243
|
-
apiKey: "MY_API_KEY",
|
|
243
|
+
apiKey: "$MY_API_KEY",
|
|
244
244
|
authHeader: true, // adds Authorization: Bearer header
|
|
245
245
|
api: "openai-completions",
|
|
246
246
|
models: [...]
|
|
@@ -515,7 +515,7 @@ Register your stream function:
|
|
|
515
515
|
```typescript
|
|
516
516
|
pi.registerProvider("my-provider", {
|
|
517
517
|
baseUrl: "https://api.example.com",
|
|
518
|
-
apiKey: "MY_API_KEY",
|
|
518
|
+
apiKey: "$MY_API_KEY",
|
|
519
519
|
api: "my-custom-api",
|
|
520
520
|
models: [...],
|
|
521
521
|
streamSimple: streamMyProvider
|
|
@@ -552,7 +552,7 @@ interface ProviderConfig {
|
|
|
552
552
|
/** API endpoint URL. Required when defining models. */
|
|
553
553
|
baseUrl?: string;
|
|
554
554
|
|
|
555
|
-
/** API key or
|
|
555
|
+
/** API key literal or config value (for env vars use "$ENV_VAR" or "${ENV_VAR}"). Required when defining models (unless oauth). */
|
|
556
556
|
apiKey?: string;
|
|
557
557
|
|
|
558
558
|
/** API type for streaming. Required at provider or model level when defining models. */
|
|
@@ -565,7 +565,7 @@ interface ProviderConfig {
|
|
|
565
565
|
options?: SimpleStreamOptions
|
|
566
566
|
) => AssistantMessageEventStream;
|
|
567
567
|
|
|
568
|
-
/** Custom headers to include in requests. Values
|
|
568
|
+
/** Custom headers to include in requests. Values use the same config-value syntax as apiKey. */
|
|
569
569
|
headers?: Record<string, string>;
|
|
570
570
|
|
|
571
571
|
/** If true, adds Authorization: Bearer header with the resolved API key. */
|
package/docs/development.md
CHANGED
|
@@ -11,7 +11,7 @@ bun install
|
|
|
11
11
|
bun run typecheck
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Run package scripts from the monorepo root or package directory with Bun, for example:
|
|
14
|
+
This monorepo uses Bun for development commands; avoid npm/yarn/pnpm except for npm registry publishing. Run package scripts from the monorepo root or package directory with Bun, for example:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
bun run test:unit
|
package/docs/docs.json
CHANGED
package/docs/extensions.md
CHANGED
|
@@ -205,7 +205,7 @@ export default async function (pi: ExtensionAPI) {
|
|
|
205
205
|
|
|
206
206
|
pi.registerProvider("local-openai", {
|
|
207
207
|
baseUrl: "http://localhost:1234/v1",
|
|
208
|
-
apiKey: "LOCAL_OPENAI_API_KEY",
|
|
208
|
+
apiKey: "$LOCAL_OPENAI_API_KEY",
|
|
209
209
|
api: "openai-completions",
|
|
210
210
|
models: payload.data.map((model) => ({
|
|
211
211
|
id: model.id,
|
|
@@ -276,6 +276,7 @@ The manifest key is the configured Atomic app name (`atomic` here, from the runn
|
|
|
276
276
|
```
|
|
277
277
|
Atomic starts
|
|
278
278
|
│
|
|
279
|
+
├─► project_trust (user/global and CLI extensions only, before project resources load)
|
|
279
280
|
├─► session_start { reason: "startup" }
|
|
280
281
|
└─► resources_discover { reason: "startup" }
|
|
281
282
|
│
|
|
@@ -341,6 +342,25 @@ exit (CTRL+C, CTRL+D, SIGHUP, SIGTERM)
|
|
|
341
342
|
└─► session_shutdown
|
|
342
343
|
```
|
|
343
344
|
|
|
345
|
+
### Startup Events
|
|
346
|
+
|
|
347
|
+
#### project_trust
|
|
348
|
+
|
|
349
|
+
Fired before Atomic decides whether to trust a project with dynamic configs (`.atomic`, legacy `.pi`, or `.agents/skills`). It runs during startup and when session replacement (for example `/resume`) enters a cwd whose trust has not been resolved in the current process. Only user/global extensions and CLI `-e` extensions participate; project-local extensions are not loaded until after trust is resolved.
|
|
350
|
+
|
|
351
|
+
```typescript
|
|
352
|
+
pi.on("project_trust", async (event, ctx) => {
|
|
353
|
+
// event.cwd - current working directory
|
|
354
|
+
// ctx has a limited trust context: cwd, mode, hasUI, and select/confirm/input/notify UI helpers
|
|
355
|
+
if (ctx.hasUI && await ctx.ui.confirm("Trust project?", event.cwd)) {
|
|
356
|
+
return { trusted: "yes", remember: true };
|
|
357
|
+
}
|
|
358
|
+
return { trusted: "undecided" };
|
|
359
|
+
});
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
A `project_trust` handler must return `{ trusted: "yes" | "no" | "undecided" }`. A user/global or CLI extension that returns `"yes"` or `"no"` owns the decision; the first yes/no decision wins and suppresses the built-in trust prompt. Use `remember: true` to persist a yes/no decision; otherwise it applies only to the current process. Return `"undecided"` to let later handlers or the built-in trust flow decide. Check `ctx.hasUI` before prompting. If no handler returns yes/no, normal trust resolution continues: saved `trust.json` decisions apply first, then `defaultProjectTrust` controls whether Atomic asks, trusts, or declines by default.
|
|
363
|
+
|
|
344
364
|
### Resource Events
|
|
345
365
|
|
|
346
366
|
#### resources_discover
|
|
@@ -867,7 +887,7 @@ pi.on("input", async (event, ctx) => {
|
|
|
867
887
|
- `transform` - modify text/images, then continue to expansion
|
|
868
888
|
- `handled` - skip agent entirely (first handler to return this wins)
|
|
869
889
|
|
|
870
|
-
Transforms chain across handlers. See [input-transform.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/input-transform.ts).
|
|
890
|
+
Transforms chain across handlers. See [input-transform.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/input-transform.ts) and [input-transform-streaming.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/input-transform-streaming.ts) for `streamingBehavior`-aware routing.
|
|
871
891
|
|
|
872
892
|
## ExtensionContext
|
|
873
893
|
|
|
@@ -930,6 +950,19 @@ pi.on("tool_result", async (event, ctx) => {
|
|
|
930
950
|
|
|
931
951
|
Control flow helpers.
|
|
932
952
|
|
|
953
|
+
### ctx.isProjectTrusted()
|
|
954
|
+
|
|
955
|
+
Returns whether project-local trust is active for the current extension context. Use this before reading project-local config, loading project-local resources, or exposing actions that should only run after the user has trusted the cwd.
|
|
956
|
+
|
|
957
|
+
```typescript
|
|
958
|
+
pi.registerCommand("project-status", {
|
|
959
|
+
description: "Show trust state",
|
|
960
|
+
handler: async (_args, ctx) => {
|
|
961
|
+
ctx.ui.notify(ctx.isProjectTrusted() ? "Project is trusted" : "Project is not trusted", "info");
|
|
962
|
+
},
|
|
963
|
+
});
|
|
964
|
+
```
|
|
965
|
+
|
|
933
966
|
### ctx.shutdown()
|
|
934
967
|
|
|
935
968
|
Request a graceful shutdown of Atomic.
|
|
@@ -1575,7 +1608,7 @@ If you need to discover models from a remote endpoint, prefer an async extension
|
|
|
1575
1608
|
pi.registerProvider("my-proxy", {
|
|
1576
1609
|
name: "My Proxy",
|
|
1577
1610
|
baseUrl: "https://proxy.example.com",
|
|
1578
|
-
apiKey: "PROXY_API_KEY", // env var
|
|
1611
|
+
apiKey: "$PROXY_API_KEY", // env var reference; omit $ for a literal
|
|
1579
1612
|
api: "anthropic-messages",
|
|
1580
1613
|
models: [
|
|
1581
1614
|
{
|
|
@@ -1622,7 +1655,7 @@ pi.registerProvider("corporate-ai", {
|
|
|
1622
1655
|
**Config options:**
|
|
1623
1656
|
- `name` - Display name for the provider in UI such as `/login`.
|
|
1624
1657
|
- `baseUrl` - API endpoint URL. Required when defining models.
|
|
1625
|
-
- `apiKey` - API key or environment variable
|
|
1658
|
+
- `apiKey` - API key literal or explicit environment variable reference (`$ENV_VAR` or `${ENV_VAR}`). Required when defining models (unless `oauth` provided).
|
|
1626
1659
|
- `api` - API type: `"anthropic-messages"`, `"openai-completions"`, `"openai-responses"`, etc.
|
|
1627
1660
|
- `headers` - Custom headers to include in requests.
|
|
1628
1661
|
- `authHeader` - If true, adds `Authorization: Bearer` header automatically.
|
|
@@ -2576,6 +2609,8 @@ All examples in [examples/extensions/](https://github.com/bastani-inc/atomic/tre
|
|
|
2576
2609
|
| `confirm-destructive.ts` | Confirm session changes | `on("session_before_switch")`, `on("session_before_fork")` |
|
|
2577
2610
|
| `dirty-repo-guard.ts` | Warn on dirty git repo | `on("session_before_*")`, `exec` |
|
|
2578
2611
|
| `input-transform.ts` | Transform user input | `on("input")` |
|
|
2612
|
+
| `input-transform-streaming.ts` | Streaming-aware input transform | `on("input")`, `streamingBehavior` |
|
|
2613
|
+
| `project-trust.ts` | Decide or defer project trust from a user/global or CLI extension | `on("project_trust")`, trust UI, required trust result |
|
|
2579
2614
|
| `model-status.ts` | React to model changes | `on("model_select")`, `setStatus` |
|
|
2580
2615
|
| `provider-payload.ts` | Inspect payloads and provider response headers | `on("before_provider_request")`, `on("after_provider_response")` |
|
|
2581
2616
|
| `system-prompt-header.ts` | Display system prompt info | `on("agent_start")`, `getSystemPrompt` |
|
|
@@ -2609,6 +2644,7 @@ All examples in [examples/extensions/](https://github.com/bastani-inc/atomic/tre
|
|
|
2609
2644
|
| `ssh.ts` | SSH remote execution | `registerFlag`, `on("user_bash")`, `on("before_agent_start")`, tool operations |
|
|
2610
2645
|
| `interactive-shell.ts` | Persistent shell session | `on("user_bash")` |
|
|
2611
2646
|
| `sandbox/` | Sandboxed tool execution | Tool operations |
|
|
2647
|
+
| `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM | Tool operations, built-in tool overrides, `on("user_bash")` |
|
|
2612
2648
|
| `subagent/` | Spawn sub-agents | `registerTool`, `exec` |
|
|
2613
2649
|
| **Games** |||
|
|
2614
2650
|
| `snake.ts` | Snake game | `registerCommand`, `ui.custom`, keyboard handling |
|
package/docs/index.md
CHANGED
|
@@ -48,6 +48,8 @@ For the full first-run flow, see [Quickstart](/quickstart).
|
|
|
48
48
|
- [Quickstart](/quickstart) - install, authenticate, and run a first session.
|
|
49
49
|
- [Using Atomic](/usage) - interactive mode, slash commands, context files, and CLI reference.
|
|
50
50
|
- [Providers](/providers) - subscription and API-key setup for built-in providers.
|
|
51
|
+
- [Security](/security) - project trust, sandbox boundaries, and vulnerability reporting.
|
|
52
|
+
- [Containerization](/containerization) - sandbox Atomic with OpenShell, Gondolin, or Docker.
|
|
51
53
|
- [Settings](/settings) - global and project settings.
|
|
52
54
|
- [Keybindings](/keybindings) - default shortcuts and custom keybindings.
|
|
53
55
|
- [Sessions](/sessions) - session management, branching, and tree navigation.
|
package/docs/models.md
CHANGED
|
@@ -101,7 +101,7 @@ Use `google-generative-ai` with a `baseUrl` to add models from Google AI Studio,
|
|
|
101
101
|
"my-google": {
|
|
102
102
|
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
|
|
103
103
|
"api": "google-generative-ai",
|
|
104
|
-
"apiKey": "GEMINI_API_KEY",
|
|
104
|
+
"apiKey": "$GEMINI_API_KEY",
|
|
105
105
|
"models": [
|
|
106
106
|
{
|
|
107
107
|
"id": "gemma-4-31b-it",
|
|
@@ -150,11 +150,11 @@ The `apiKey` and `headers` fields support three formats:
|
|
|
150
150
|
"apiKey": "!security find-generic-password -ws 'anthropic'"
|
|
151
151
|
"apiKey": "!op read 'op://vault/item/credential'"
|
|
152
152
|
```
|
|
153
|
-
- **Environment variable:**
|
|
153
|
+
- **Environment variable:** Prefix the variable name with `$` (or use `${VAR}`) to resolve it from the environment
|
|
154
154
|
```json
|
|
155
|
-
"apiKey": "MY_API_KEY"
|
|
155
|
+
"apiKey": "$MY_API_KEY"
|
|
156
156
|
```
|
|
157
|
-
- **Literal value:** Used directly
|
|
157
|
+
- **Literal value:** Used directly; bare strings are not environment variable references
|
|
158
158
|
```json
|
|
159
159
|
"apiKey": "sk-..."
|
|
160
160
|
```
|
|
@@ -172,10 +172,10 @@ If your command is slow, expensive, rate-limited, or should keep using a previou
|
|
|
172
172
|
"providers": {
|
|
173
173
|
"custom-proxy": {
|
|
174
174
|
"baseUrl": "https://proxy.example.com/v1",
|
|
175
|
-
"apiKey": "MY_API_KEY",
|
|
175
|
+
"apiKey": "$MY_API_KEY",
|
|
176
176
|
"api": "anthropic-messages",
|
|
177
177
|
"headers": {
|
|
178
|
-
"x-portkey-api-key": "PORTKEY_API_KEY",
|
|
178
|
+
"x-portkey-api-key": "$PORTKEY_API_KEY",
|
|
179
179
|
"x-secret": "!op read 'op://vault/item/secret'"
|
|
180
180
|
},
|
|
181
181
|
"models": [...]
|
|
@@ -268,7 +268,7 @@ To merge custom models into a built-in provider, include the `models` array:
|
|
|
268
268
|
"providers": {
|
|
269
269
|
"anthropic": {
|
|
270
270
|
"baseUrl": "https://my-proxy.example.com/v1",
|
|
271
|
-
"apiKey": "ANTHROPIC_API_KEY",
|
|
271
|
+
"apiKey": "$ANTHROPIC_API_KEY",
|
|
272
272
|
"api": "anthropic-messages",
|
|
273
273
|
"models": [...]
|
|
274
274
|
}
|
|
@@ -325,7 +325,7 @@ By default, Atomic sends per-tool `eager_input_streaming: true`. If a proxy or A
|
|
|
325
325
|
"anthropic-proxy": {
|
|
326
326
|
"baseUrl": "https://proxy.example.com",
|
|
327
327
|
"api": "anthropic-messages",
|
|
328
|
-
"apiKey": "ANTHROPIC_PROXY_KEY",
|
|
328
|
+
"apiKey": "$ANTHROPIC_PROXY_KEY",
|
|
329
329
|
"compat": {
|
|
330
330
|
"supportsEagerToolInputStreaming": false,
|
|
331
331
|
"supportsLongCacheRetention": true
|
|
@@ -399,7 +399,7 @@ Example:
|
|
|
399
399
|
"providers": {
|
|
400
400
|
"openrouter": {
|
|
401
401
|
"baseUrl": "https://openrouter.ai/api/v1",
|
|
402
|
-
"apiKey": "OPENROUTER_API_KEY",
|
|
402
|
+
"apiKey": "$OPENROUTER_API_KEY",
|
|
403
403
|
"api": "openai-completions",
|
|
404
404
|
"models": [
|
|
405
405
|
{
|
|
@@ -449,7 +449,7 @@ Vercel AI Gateway example:
|
|
|
449
449
|
"providers": {
|
|
450
450
|
"vercel-ai-gateway": {
|
|
451
451
|
"baseUrl": "https://ai-gateway.vercel.sh/v1",
|
|
452
|
-
"apiKey": "AI_GATEWAY_API_KEY",
|
|
452
|
+
"apiKey": "$AI_GATEWAY_API_KEY",
|
|
453
453
|
"api": "openai-completions",
|
|
454
454
|
"models": [
|
|
455
455
|
{
|
package/docs/packages.md
CHANGED
|
@@ -43,7 +43,7 @@ atomic update npm:@foo/bar # update one package
|
|
|
43
43
|
atomic update --extension npm:@foo/bar
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
By default, `install` and `remove` write to global settings (`~/.atomic/agent/settings.json`). Use `-l` to write to project settings (`.atomic/settings.json`) instead. Project settings can be shared with your team, and Atomic installs any missing packages automatically on startup.
|
|
46
|
+
By default, `install` and `remove` write to global settings (`~/.atomic/agent/settings.json`). Use `-l` to write to project settings (`.atomic/settings.json`) instead. Project settings can be shared with your team, and Atomic installs any missing packages automatically on startup after the project is trusted.
|
|
47
47
|
|
|
48
48
|
To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:
|
|
49
49
|
|
package/docs/prompt-templates.md
CHANGED
|
@@ -9,7 +9,7 @@ Prompt templates are Markdown snippets that expand into full prompts. Type `/nam
|
|
|
9
9
|
Atomic loads prompt templates from:
|
|
10
10
|
|
|
11
11
|
- Global: `~/.atomic/agent/prompts/*.md` (legacy `~/.pi/agent/prompts/*.md`)
|
|
12
|
-
- Project: `.atomic/prompts/*.md` (legacy `.pi/prompts/*.md
|
|
12
|
+
- Project: `.atomic/prompts/*.md` (legacy `.pi/prompts/*.md`, only after the project is trusted)
|
|
13
13
|
- Packages: `prompts/` directories, `atomic.prompts`, or legacy `pi.prompts` entries in `package.json`
|
|
14
14
|
- Settings: `prompts` array with files or directories
|
|
15
15
|
- CLI: `--prompt-template <path>` (repeatable)
|
|
@@ -64,10 +64,11 @@ Type `/` followed by the template name in the editor. Autocomplete shows availab
|
|
|
64
64
|
|
|
65
65
|
## Arguments
|
|
66
66
|
|
|
67
|
-
Templates support positional arguments and simple slicing:
|
|
67
|
+
Templates support positional arguments, defaults, and simple slicing:
|
|
68
68
|
|
|
69
69
|
- `$1`, `$2`, ... positional args
|
|
70
70
|
- `$@` or `$ARGUMENTS` for all args joined
|
|
71
|
+
- `${1:-default}` uses arg 1 when present/non-empty, otherwise `default`
|
|
71
72
|
- `${@:N}` for args from the Nth position (1-indexed)
|
|
72
73
|
- `${@:N:L}` for `L` args starting at N
|
|
73
74
|
|
|
@@ -80,6 +81,12 @@ description: Create a component
|
|
|
80
81
|
Create a React component named $1 with features: $@
|
|
81
82
|
```
|
|
82
83
|
|
|
84
|
+
Default values are useful for optional arguments:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
Summarize the current state in ${1:-7} bullet points.
|
|
88
|
+
```
|
|
89
|
+
|
|
83
90
|
Usage: `/component Button "onClick handler" "disabled support"`
|
|
84
91
|
|
|
85
92
|
## Loading Rules
|
package/docs/providers.md
CHANGED
|
@@ -53,9 +53,11 @@ atomic
|
|
|
53
53
|
| Provider | Environment Variable | `auth.json` key |
|
|
54
54
|
|----------|----------------------|------------------|
|
|
55
55
|
| Anthropic | `ANTHROPIC_API_KEY` | `anthropic` |
|
|
56
|
+
| Ant Ling | `ANT_LING_API_KEY` | `ant-ling` |
|
|
56
57
|
| Azure OpenAI Responses | `AZURE_OPENAI_API_KEY` | `azure-openai-responses` |
|
|
57
58
|
| OpenAI | `OPENAI_API_KEY` | `openai` |
|
|
58
59
|
| DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
|
|
60
|
+
| NVIDIA NIM | `NVIDIA_API_KEY` | `nvidia` |
|
|
59
61
|
| Google Gemini | `GEMINI_API_KEY` | `google` |
|
|
60
62
|
| Google Vertex AI | `GOOGLE_CLOUD_API_KEY` | `google-vertex` |
|
|
61
63
|
| Mistral | `MISTRAL_API_KEY` | `mistral` |
|
|
@@ -67,6 +69,7 @@ atomic
|
|
|
67
69
|
| OpenRouter | `OPENROUTER_API_KEY` | `openrouter` |
|
|
68
70
|
| Vercel AI Gateway | `AI_GATEWAY_API_KEY` | `vercel-ai-gateway` |
|
|
69
71
|
| ZAI | `ZAI_API_KEY` | `zai` |
|
|
72
|
+
| ZAI Coding Plan (China) | `ZAI_CODING_CN_API_KEY` | `zai-coding-cn` |
|
|
70
73
|
| OpenCode Zen | `OPENCODE_API_KEY` | `opencode` |
|
|
71
74
|
| OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
|
|
72
75
|
| Hugging Face | `HF_TOKEN` | `huggingface` |
|
|
@@ -91,8 +94,10 @@ Store credentials in `~/.atomic/agent/auth.json`:
|
|
|
91
94
|
```json
|
|
92
95
|
{
|
|
93
96
|
"anthropic": { "type": "api_key", "key": "sk-ant-..." },
|
|
97
|
+
"ant-ling": { "type": "api_key", "key": "..." },
|
|
94
98
|
"openai": { "type": "api_key", "key": "sk-..." },
|
|
95
99
|
"deepseek": { "type": "api_key", "key": "sk-..." },
|
|
100
|
+
"nvidia": { "type": "api_key", "key": "nvapi-..." },
|
|
96
101
|
"google": { "type": "api_key", "key": "..." },
|
|
97
102
|
"opencode": { "type": "api_key", "key": "..." },
|
|
98
103
|
"opencode-go": { "type": "api_key", "key": "..." },
|
|
@@ -108,23 +113,31 @@ The file is created with `0600` permissions (user read/write only). Auth file cr
|
|
|
108
113
|
|
|
109
114
|
### Key Resolution
|
|
110
115
|
|
|
111
|
-
The `key` field supports
|
|
116
|
+
The `key` field supports command execution, environment interpolation, and literals:
|
|
112
117
|
|
|
113
|
-
- **Shell command:** `"!command"` executes and uses stdout (cached for process lifetime)
|
|
118
|
+
- **Shell command:** `"!command"` at the start executes the whole value as a command and uses stdout (cached for process lifetime)
|
|
114
119
|
```json
|
|
115
120
|
{ "type": "api_key", "key": "!security find-generic-password -ws 'anthropic'" }
|
|
116
121
|
{ "type": "api_key", "key": "!op read 'op://vault/item/credential'" }
|
|
117
122
|
```
|
|
118
|
-
- **Environment
|
|
123
|
+
- **Environment interpolation:** `"$ENV_VAR"` or `"${ENV_VAR}"` uses the value of the named variable. Interpolation works inside larger literals.
|
|
119
124
|
```json
|
|
120
|
-
{ "type": "api_key", "key": "MY_ANTHROPIC_KEY" }
|
|
125
|
+
{ "type": "api_key", "key": "$MY_ANTHROPIC_KEY" }
|
|
126
|
+
{ "type": "api_key", "key": "${KEY_PREFIX}_${KEY_SUFFIX}" }
|
|
127
|
+
```
|
|
128
|
+
`$FOO_BAR` is the variable `FOO_BAR`; use `${FOO}_BAR` when `BAR` is literal text. Missing environment variables make the value unresolved.
|
|
129
|
+
- **Escapes:** `"$$"` emits a literal `"$"`; `"$!"` emits a literal `"!"` without triggering command execution.
|
|
130
|
+
```json
|
|
131
|
+
{ "type": "api_key", "key": "$$literal-dollar-prefix" }
|
|
132
|
+
{ "type": "api_key", "key": "$!literal-bang-prefix" }
|
|
121
133
|
```
|
|
122
134
|
- **Literal value:** Used directly
|
|
123
135
|
```json
|
|
124
136
|
{ "type": "api_key", "key": "sk-ant-..." }
|
|
137
|
+
{ "type": "api_key", "key": "public" }
|
|
125
138
|
```
|
|
126
139
|
|
|
127
|
-
OAuth credentials are also stored here after `/login` and managed automatically.
|
|
140
|
+
Legacy uppercase env-var-like values such as `MY_API_KEY` are migrated to `$MY_API_KEY` on startup only when that environment variable is present during migration; otherwise the value is preserved as a literal. OAuth credentials are also stored here after `/login` and managed automatically.
|
|
128
141
|
|
|
129
142
|
## Cloud Providers
|
|
130
143
|
|
package/docs/quickstart.md
CHANGED
|
@@ -227,6 +227,7 @@ Sessions are saved automatically:
|
|
|
227
227
|
```bash
|
|
228
228
|
atomic -c # Continue most recent session
|
|
229
229
|
atomic -r # Browse previous sessions
|
|
230
|
+
atomic --name "my task" # Set session display name at startup
|
|
230
231
|
atomic --session <path|id> # Open a specific session
|
|
231
232
|
```
|
|
232
233
|
|
package/docs/rpc.md
CHANGED
|
@@ -13,6 +13,7 @@ atomic --mode rpc [options]
|
|
|
13
13
|
Common options:
|
|
14
14
|
- `--provider <name>`: Set the LLM provider (anthropic, openai, google, etc.)
|
|
15
15
|
- `--model <pattern>`: Model pattern or ID (supports `provider/id` and optional `:<thinking>`)
|
|
16
|
+
- `--name <name>` / `-n <name>`: Set the session display name at startup
|
|
16
17
|
- `--no-session`: Disable session persistence
|
|
17
18
|
- `--session-dir <path>`: Custom session storage directory
|
|
18
19
|
|
|
@@ -697,7 +698,7 @@ Response:
|
|
|
697
698
|
}
|
|
698
699
|
```
|
|
699
700
|
|
|
700
|
-
The current session name is available via `get_state` in the `sessionName` field.
|
|
701
|
+
The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `atomic --mode rpc` process.
|
|
701
702
|
|
|
702
703
|
### Commands
|
|
703
704
|
|
|
@@ -1018,7 +1019,7 @@ Some `ExtensionUIContext` methods are not supported or degraded in RPC mode beca
|
|
|
1018
1019
|
- `getTheme()` returns `undefined`
|
|
1019
1020
|
- `setTheme()` returns `{ success: false, error: "..." }`
|
|
1020
1021
|
|
|
1021
|
-
Note: `ctx.hasUI` is `true` in RPC mode because the dialog and fire-and-forget methods are functional via the extension UI sub-protocol.
|
|
1022
|
+
Note: `ctx.mode` is `"rpc"` and `ctx.hasUI` is `true` in RPC mode because the dialog and fire-and-forget methods are functional via the extension UI sub-protocol. Use `ctx.mode === "tui"` to guard TUI-specific features like `custom()` that require a real terminal.
|
|
1022
1023
|
|
|
1023
1024
|
### Extension UI Requests (stdout)
|
|
1024
1025
|
|
package/docs/sdk.md
CHANGED
|
@@ -525,6 +525,46 @@ const { session } = await createAgentSession({
|
|
|
525
525
|
});
|
|
526
526
|
```
|
|
527
527
|
|
|
528
|
+
#### Bash command policy
|
|
529
|
+
|
|
530
|
+
`bashPolicy` narrows what the built-in `bash` tool may execute after `tools`/`excludedTools` have already decided that `bash` is exposed. It does not grant shell access by itself.
|
|
531
|
+
|
|
532
|
+
```typescript
|
|
533
|
+
import { createAgentSession, type BashCommandPolicy } from "@bastani/atomic";
|
|
534
|
+
|
|
535
|
+
const browseOnly: BashCommandPolicy = {
|
|
536
|
+
default: "deny",
|
|
537
|
+
allow: [
|
|
538
|
+
"which browse",
|
|
539
|
+
{ prefix: "browse " },
|
|
540
|
+
{ prefix: "grep " },
|
|
541
|
+
{ glob: "bun test test/unit/*.test.ts" },
|
|
542
|
+
{ regex: "^rg\\b" },
|
|
543
|
+
],
|
|
544
|
+
deny: [{ regex: "\\brm\\b" }], // deny rules win over allow rules
|
|
545
|
+
// match defaults to "segments"
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
const { session } = await createAgentSession({
|
|
549
|
+
tools: ["read", "bash"],
|
|
550
|
+
bashPolicy: browseOnly,
|
|
551
|
+
});
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
Rules match exact command strings, prefixes, command-string globs, or JavaScript regular expressions. `default` defaults to `"allow"` for backward compatibility; set `default: "deny"` for an allowlist-only shell. Omitting `bashPolicy`, passing `{}`, or passing a default-allow policy with no `allow`/`deny` rules is a compatibility no-op and does not parse the command. Empty `allow`/`deny` arrays and match-only default-allow policies are treated the same; malformed policy objects still fail closed.
|
|
555
|
+
|
|
556
|
+
Glob rules match command target strings, not filesystem path segments. `*` and `?` can match `/`, so `{ glob: "browse *" }` matches `browse http://localhost:3000`, `browse docs/index.html`, and `browse ./preview/output.html`, while still matching the whole target so `echo browse docs/index.html` does not match unless the pattern includes leading wildcards. Backslash escapes the next glob character when you need a literal `*`, `?`, or bracket; inside bracket classes, escaped metacharacters such as `\-`, `\^`, `\]`, `\[`, and `\\` stay literal instead of becoming regex ranges, negation markers, class delimiters, or backslash escapes. Malformed glob bracket classes or ranges, such as `{ glob: "echo [z-a]" }`, fail closed as `invalid-policy` rather than surfacing raw regular-expression errors.
|
|
557
|
+
|
|
558
|
+
Runtime policy validation is part of enforcement for JavaScript/JSON callers: a provided policy must be a non-null object with only the top-level keys `default`, `allow`, `deny`, and `match`; typoed or extra keys such as `denny` or `extra` are rejected as `invalid-policy` even when the policy otherwise looks like default-allow. `allow`/`deny` must be arrays when present, rules must be non-empty strings or one-variant objects with string values, regex flags must be strings, and invalid regexes, invalid globs, or stateful `g`/`y` flags are rejected as `invalid-policy` before shell execution.
|
|
559
|
+
|
|
560
|
+
By default, `match: "segments"` parses shell separators and substitutions and requires every executable segment to pass. Separators include pipes, `&&`, `||`, `;`, background `&`, and unquoted line terminators: LF, CRLF, and bare CR are command separators rather than ordinary whitespace. Bash noclobber redirection `>|` is treated as redirection syntax rather than a pipeline separator after a command head, so `echo ok >|/tmp/out` remains one `echo` segment. For example, `browse snapshot | grep title` must satisfy both the `browse` rule and the `grep` rule, and `browse snapshot; rm -rf /` or `browse snapshot\nrm -rf /` is blocked when `rm` is denied or when `default: "deny"` has no matching allow rule. Segment mode also checks command substitutions (`$(...)`, backticks) and process substitutions (`<(...)`, `>(...)`). Syntax Atomic cannot safely segment is rejected before a shell process starts.
|
|
561
|
+
|
|
562
|
+
Segment mode requires each command head to be a statically identifiable literal word. Literal names such as `grep`, `./script`, `/usr/bin/env`, `bun`, `browse`, and names containing hyphens, underscores, dots, or slashes are accepted when they contain no shell expansion syntax. Atomic conservatively rejects Bash reserved words and compound introducers (`coproc`, `if`, `for`, `while`, `case`, `{`, `}`, `!`), leading redirection syntax (`>file cmd`, `2>file cmd`, `<file cmd`, `&>file cmd`, `>|file cmd`, `<&0 cmd`, `>&2 cmd`), redirection operators attached to the command-head word (`cmd>file`, `cmd>>file`, `cmd>|file`, `cmd2>file`, `cmd>&2`, `cmd</tmp/in`), leading environment assignment words (`PATH=/tmp:$PATH browse snapshot`, `LD_PRELOAD=/tmp/x browse snapshot`, `FOO=bar`), variable or parameter-expanded heads (`$cmd`, `${cmd}`), quote- or escape-constructed heads (`r''m`, `"rm"`, `r\m`), tilde/glob/brace-expanded heads (`~/bin/rm`, `r*m`, `{rm,echo}`), and command/process substitutions or backticks embedded in the head. Substitutions in argument positions are still parsed so nested commands must also pass the policy.
|
|
563
|
+
|
|
564
|
+
Use `match: "whole"` only when you intentionally want rules to match the raw command string as-is. Whole-command prefix rules can allow shell operators inside the same raw string.
|
|
565
|
+
|
|
566
|
+
`AgentSession.executeBash()` applies the same session `bashPolicy` before adding any configured command prefix or invoking the execution backend.
|
|
567
|
+
|
|
528
568
|
#### Tools with Custom cwd
|
|
529
569
|
|
|
530
570
|
When you pass a custom `cwd`, `createAgentSession()` builds selected built-in tools for that cwd.
|
|
@@ -1142,6 +1182,11 @@ createEventBus
|
|
|
1142
1182
|
|
|
1143
1183
|
// Helpers
|
|
1144
1184
|
defineTool
|
|
1185
|
+
getAgentDir
|
|
1186
|
+
getPackageDir
|
|
1187
|
+
getReadmePath
|
|
1188
|
+
getDocsPath
|
|
1189
|
+
getExamplesPath
|
|
1145
1190
|
|
|
1146
1191
|
// Session management
|
|
1147
1192
|
SessionManager
|
|
@@ -1156,6 +1201,8 @@ createGrepTool, createFindTool, createLsTool
|
|
|
1156
1201
|
// Types
|
|
1157
1202
|
type CreateAgentSessionOptions
|
|
1158
1203
|
type CreateAgentSessionResult
|
|
1204
|
+
type BashCommandPolicy
|
|
1205
|
+
type BashCommandRule
|
|
1159
1206
|
type ExtensionFactory
|
|
1160
1207
|
type ExtensionAPI
|
|
1161
1208
|
type ToolDefinition
|
package/docs/security.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
Atomic is a local coding agent. It runs with the permissions of the user account that starts it, and it treats files writable by that user as inside the same local trust boundary.
|
|
4
|
+
|
|
5
|
+
## Project Trust
|
|
6
|
+
|
|
7
|
+
Project trust controls whether Atomic loads project-local settings, resources, packages, and extensions. It is not a sandbox and it does not restrict what the model can ask tools to do after you start working in a directory.
|
|
8
|
+
|
|
9
|
+
Atomic considers a project to have trust inputs when it finds any of these from the current working directory:
|
|
10
|
+
|
|
11
|
+
- `.atomic/` (or legacy `.pi/`) in the current directory
|
|
12
|
+
- `AGENTS.md` or `CLAUDE.md` in the current directory or an ancestor directory
|
|
13
|
+
- `.agents/skills` in the current directory or an ancestor directory
|
|
14
|
+
|
|
15
|
+
When an interactive session starts in a project with configs in `.atomic`/`.pi`, project-local context files, or `.agents/skills` and no saved decision for the current directory or a parent directory, Atomic follows `defaultProjectTrust` from global settings. The default value is `"ask"`, which asks whether to trust the project when UI is available. Saved decisions are stored by canonical directory in `~/.atomic/agent/trust.json`, and the closest saved decision on the current or parent path applies before the global default.
|
|
16
|
+
|
|
17
|
+
Trusting a project allows Atomic to load trust-gated project inputs, including:
|
|
18
|
+
|
|
19
|
+
- `.atomic/settings.json` (or legacy `.pi/settings.json`)
|
|
20
|
+
- `.atomic`/`.pi` resources such as extensions, skills, prompt templates, themes, and system prompt files
|
|
21
|
+
- missing project packages configured through project settings
|
|
22
|
+
- project-local extensions and project package-managed extensions
|
|
23
|
+
|
|
24
|
+
Declining trust skips protected resources. Atomic also skips project-local `AGENTS.md` and `CLAUDE.md` context-file discovery while the project is untrusted; global context and explicitly supplied CLI resources remain available. Before trust is resolved, Atomic only loads user/global extensions and explicit CLI `-e` extensions so those trusted extensions can handle the `project_trust` event; the first extension that returns a yes/no decision owns the decision.
|
|
25
|
+
|
|
26
|
+
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, `defaultProjectTrust: "ask"` and `"never"` ignore such resources, while `"always"` trusts them. Use `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
27
|
+
|
|
28
|
+
## No Built-in Sandbox
|
|
29
|
+
|
|
30
|
+
Atomic does not include a built-in sandbox. Built-in tools can read files, write files, edit files, and run shell commands with the permissions of the Atomic process. Extensions are TypeScript modules that run with the same permissions. Package installs, shell commands, language servers, test commands, and other developer tools behave as ordinary local processes.
|
|
31
|
+
|
|
32
|
+
This is intentional. Atomic is designed to operate on local source trees, invoke project toolchains, and integrate with the user's existing development environment. A partial in-process sandbox would be easy to misunderstand as a security boundary while still depending on the host shell, filesystem, package managers, credentials, and extension code. Real isolation needs to come from the operating system or a virtualization/container boundary.
|
|
33
|
+
|
|
34
|
+
Project trust is only an input-loading guard. It prevents a repository from silently changing Atomic's settings or extensions before you approve it. It does not make untrusted code, untrusted prompts, or untrusted model output safe. Prompt injection from repository files, comments, documentation, context files, or build output is expected local-agent risk and cannot be reliably prevented by Atomic.
|
|
35
|
+
|
|
36
|
+
`bashPolicy` is a command-scoping guardrail for the built-in `bash` tool, not a sandbox. It can block model-supplied commands before shell execution, including disallowed segments in pipelines, command substitutions, process substitutions, and unquoted newline-separated commands (LF, CRLF, or bare CR). In segment mode, Atomic also rejects reserved or compound shell heads such as `coproc`, `if`, `for`, `while`, `case`, `{`, `}`, and `!`; leading redirection syntax such as `>file command`, `2>file command`, `<file command`, `&>file command`, `>|file command`, `<&0 command`, or `>&2 command`; redirection operators attached to the command head such as `cmd>file`, `cmd>>file`, `cmd>|file`, `cmd2>file`, `cmd>&2`, or `cmd</tmp/in`; leading environment assignments (`PATH=... command`, `LD_PRELOAD=... command`, assignment-only segments); and non-literal command heads such as variable-expanded, quote/escape-constructed, glob/brace/tilde-expanded, or substitution-built executable names instead of trying to normalize shell syntax. Non-leading Bash noclobber redirection `>|` after a literal command head is treated as redirection syntax rather than a pipeline separator, so it stays within the current command segment. Runtime-malformed policy objects, including typoed or extra top-level keys outside `default`, `allow`, `deny`, and `match`, fail closed rather than being partially interpreted, malformed glob bracket ranges become `invalid-policy` denials instead of raw JavaScript errors, and escaped glob bracket-class metacharacters such as `\-`, `\^`, `\]`, `\[`, and `\\` stay literal. Glob rules are command-string patterns where `*` and `?` may match `/`; they scope command text, not filesystem access. Default-allow policies with no allow/deny rules intentionally preserve legacy behavior and do not parse commands unless the policy object itself is invalid. `bashPolicy` cannot restrict what an allowed program does after it starts, and it does not isolate files, network access, credentials, shell startup behavior, aliases/functions, or child processes. Be especially careful when allowing interpreters, shells, package managers, `curl`, `git`, `sudo`, `env`, `xargs`, or other programs that can delegate arbitrary work.
|
|
37
|
+
|
|
38
|
+
## Running Untrusted or Unmonitored Work
|
|
39
|
+
|
|
40
|
+
For untrusted repositories, generated code you do not intend to monitor closely, or unattended automation, run Atomic in a contained environment. Use a container, VM, micro-VM, remote sandbox, or policy-controlled sandbox with only the files and credentials required for the task.
|
|
41
|
+
|
|
42
|
+
Common patterns are documented in [Containerization](/containerization):
|
|
43
|
+
|
|
44
|
+
- run the whole `atomic` process inside OpenShell or Docker
|
|
45
|
+
- run host Atomic while routing built-in tool execution into a Gondolin micro-VM
|
|
46
|
+
- mount only the workspace paths the agent should access
|
|
47
|
+
- avoid mounting host `~/.atomic/agent` unless the container should access host sessions, settings, and credentials
|
|
48
|
+
- pass the minimum required API keys or use short-lived credentials
|
|
49
|
+
- restrict network access when the task does not need it
|
|
50
|
+
- review diffs and outputs before copying results back to trusted systems
|
|
51
|
+
|
|
52
|
+
If you bind-mount a host workspace read/write, writes from inside the container or VM can still modify host files. Use read-only mounts or copy files into and out of the sandbox when you need stronger protection from unintended writes.
|
|
53
|
+
|
|
54
|
+
## Reporting Security Issues
|
|
55
|
+
|
|
56
|
+
To report a security issue, follow the repository [Security Policy](https://github.com/bastani-inc/atomic/blob/main/SECURITY.md). Do not open a public issue for security-sensitive reports.
|
|
57
|
+
|
|
58
|
+
Expected local-agent behavior, lack of a built-in sandbox, prompt injection from untrusted content, and behavior of user-installed extensions or skills are generally outside the security boundary unless the report demonstrates a real privilege-boundary bypass or shows how Atomic grants access that the local user did not already have.
|
package/docs/session-format.md
CHANGED
|
@@ -12,7 +12,7 @@ Where `<path>` is the working directory with `/` replaced by `-`.
|
|
|
12
12
|
|
|
13
13
|
## Deleting Sessions
|
|
14
14
|
|
|
15
|
-
Sessions can be removed by deleting their `.jsonl` files under `~/.atomic/agent/sessions/` (legacy `~/.pi/agent/sessions/` may exist from older installs).
|
|
15
|
+
Sessions can be removed by deleting their `.jsonl` files under `~/.atomic/agent/sessions/` (legacy `~/.pi/agent/sessions/` may exist from older Pi installs).
|
|
16
16
|
|
|
17
17
|
Atomic also supports deleting sessions interactively from `/resume` (select a session and press `CTRL+D`, then confirm). When available, Atomic uses the `trash` CLI to avoid permanent deletion.
|
|
18
18
|
|
|
@@ -285,7 +285,7 @@ Set `label` to `undefined` to clear a label.
|
|
|
285
285
|
|
|
286
286
|
### SessionInfoEntry
|
|
287
287
|
|
|
288
|
-
Session metadata (e.g., user-defined display name). Set via `/name`
|
|
288
|
+
Session metadata (e.g., user-defined display name). Set via `/name`, `--name` / `-n`, or `pi.setSessionName()` in extensions.
|
|
289
289
|
|
|
290
290
|
```json
|
|
291
291
|
{"type":"session_info","id":"k1l2m3n4","parentId":"j0k1l2m3","timestamp":"2024-12-03T14:35:00.000Z","name":"Refactor auth module"}
|
package/docs/sessions.md
CHANGED
|
@@ -10,6 +10,7 @@ Sessions auto-save to `~/.atomic/agent/sessions/`, organized by working director
|
|
|
10
10
|
atomic -c # Continue most recent session
|
|
11
11
|
atomic -r # Browse and select from past sessions
|
|
12
12
|
atomic --no-session # Ephemeral mode; do not save
|
|
13
|
+
atomic --name "my task" # Set session display name at startup
|
|
13
14
|
atomic --session <path|id> # Use a specific session file or partial session ID
|
|
14
15
|
atomic --fork <path|id> # Fork a session file or partial session ID into a new session
|
|
15
16
|
```
|
|
@@ -56,6 +57,13 @@ Use `/name <name>` to set a human-readable session name:
|
|
|
56
57
|
/name Refactor auth module
|
|
57
58
|
```
|
|
58
59
|
|
|
60
|
+
Set the name at startup with `--name` or `-n`:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
atomic --name "Refactor auth module"
|
|
64
|
+
atomic --name "CI audit" -p "Review this build failure"
|
|
65
|
+
```
|
|
66
|
+
|
|
59
67
|
Named sessions are easier to find in `/resume` and `atomic -r`.
|
|
60
68
|
|
|
61
69
|
## Branching with `/tree`
|