@bastani/atomic 0.10.9 → 0.10.10-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 +83 -0
- package/README.md +226 -163
- 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 +27 -12
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
- package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
- package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
- package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +150 -62
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
- package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
- package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
- package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
- package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +87 -116
- package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
- package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
- package/dist/builtin/intercom/group.ts +7 -3
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +61 -27
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +8 -0
- package/dist/builtin/subagents/README.md +74 -141
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
- package/dist/builtin/web-access/CHANGELOG.md +9 -0
- package/dist/builtin/web-access/README.md +61 -88
- package/dist/builtin/web-access/index.bundle.mjs +387 -351
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +2 -2
- 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.code.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 +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/agent-session-methods.d.ts +4 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/compaction/compactor.d.ts +20 -14
- package/dist/core/compaction/errors.d.ts +120 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/model-resolver.d.ts +2 -2
- 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.code.js +1 -1
- 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/api-types.d.ts +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- 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.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/provider-types.d.ts +18 -6
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-context.js +1 -1
- 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 +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/model-config.d.ts +40 -0
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-resolver-scope.d.ts +4 -4
- package/dist/core/model-runtime.d.ts +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/provider-composer-internal.d.ts +11 -2
- package/dist/core/sdk.code.js +3 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- 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/settings-manager-basic-accessors.d.ts +6 -2
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.code.js +1 -1
- 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.code.js +2 -2
- 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 +3 -3
- 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.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +2 -2
- 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-extensions.d.ts +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -7
- package/dist/main-first-time-setup.code.js +2 -2
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- 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/interactive/theme/color-utils.d.ts +5 -5
- package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
- package/dist/modes/rpc/rpc-types.d.ts +29 -2
- package/dist/package-manager-cli.code.js +5 -5
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -2
- package/dist/startup-stages/9.js +2 -1
- package/dist/utils/native-module.d.ts +44 -0
- package/dist/utils/startup-database-spare.code.js +3 -3
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks.md +238 -243
- package/docs/build.md +21 -15
- package/docs/changelog.mdx +1 -1
- package/docs/codemode.md +68 -51
- package/docs/compaction/reference.md +65 -26
- package/docs/compaction.md +118 -66
- package/docs/computer-use.md +179 -146
- package/docs/containerization.md +87 -33
- package/docs/custom-provider/api-reference.md +152 -13
- package/docs/custom-provider/oauth.md +45 -28
- package/docs/custom-provider/override.md +14 -7
- package/docs/custom-provider/registration.md +77 -67
- package/docs/custom-provider/streaming.md +42 -19
- package/docs/custom-provider.md +26 -62
- package/docs/development.md +81 -42
- package/docs/docs.json +54 -38
- package/docs/environment-variables.md +92 -64
- package/docs/extensions/api-reference.md +326 -735
- package/docs/extensions/authoring.md +186 -269
- package/docs/extensions/events.md +308 -375
- package/docs/extensions/examples.md +122 -74
- package/docs/extensions/ui.md +217 -197
- package/docs/extensions.md +189 -259
- package/docs/getting-started/authentication.md +27 -14
- package/docs/getting-started/first-session.md +25 -26
- package/docs/getting-started/installation.md +62 -84
- package/docs/getting-started/project-instructions.md +39 -14
- package/docs/guides/configuration.md +62 -20
- package/docs/guides/intercom.md +20 -12
- package/docs/guides/non-interactive.md +31 -16
- package/docs/guides/orchestration.md +17 -9
- package/docs/guides/resume-on-any-machine.md +63 -52
- package/docs/guides/subagents.md +26 -14
- package/docs/guides/team-setup.md +49 -27
- package/docs/guides.md +30 -23
- package/docs/herdr.md +22 -17
- package/docs/index.md +24 -17
- package/docs/intercom/operations.md +90 -66
- package/docs/intercom/reference.md +219 -192
- package/docs/intercom.md +111 -92
- package/docs/json.md +73 -71
- package/docs/keybindings.md +74 -48
- package/docs/libraries/agent-core.md +52 -9
- package/docs/libraries/ai.md +90 -63
- package/docs/libraries/codemode.md +31 -8
- package/docs/libraries/schema.md +12 -9
- package/docs/libraries/storage-libsql.md +92 -0
- package/docs/libraries/storage-postgres.md +119 -0
- package/docs/libraries/telemetry.md +42 -9
- package/docs/libraries/tui.md +74 -94
- package/docs/libraries.md +25 -8
- package/docs/llama-cpp.md +38 -33
- package/docs/mcp-servers.md +140 -88
- package/docs/models/reference.md +53 -36
- package/docs/models-configuration.md +19 -13
- package/docs/models.md +102 -87
- package/docs/orchestration/migrating-workflows.md +22 -20
- package/docs/orchestration/patterns.md +36 -21
- package/docs/orchestration.md +24 -21
- package/docs/packages/authoring.md +29 -18
- package/docs/packages/reference.md +77 -16
- package/docs/packages.md +34 -34
- package/docs/programmatic.md +28 -21
- package/docs/prompt-templates.md +65 -41
- package/docs/providers/reference.md +36 -20
- package/docs/providers.md +78 -76
- package/docs/quickstart.md +42 -54
- package/docs/reference/cli.md +256 -254
- package/docs/reference.md +30 -23
- package/docs/rpc/examples.md +121 -17
- package/docs/rpc/extension-ui.md +86 -63
- package/docs/rpc/protocol.md +817 -358
- package/docs/rpc.md +78 -152
- package/docs/sdk/reference.md +309 -73
- package/docs/sdk/storage.md +614 -0
- package/docs/sdk/structured-decisions.md +168 -65
- package/docs/sdk/web-server.md +80 -46
- package/docs/sdk.md +168 -215
- package/docs/security.md +117 -44
- package/docs/session-format.md +127 -76
- package/docs/sessions.md +155 -113
- package/docs/settings.md +293 -205
- package/docs/shell-aliases.md +15 -6
- package/docs/skills/authoring.md +17 -9
- package/docs/skills/reference.md +23 -21
- package/docs/skills.md +148 -97
- package/docs/storage.md +172 -260
- package/docs/subagents/authoring.md +148 -15
- package/docs/subagents/reference.md +105 -29
- package/docs/subagents.md +247 -250
- package/docs/terminal-setup.md +97 -69
- package/docs/termux.md +51 -85
- package/docs/themes/reference.md +51 -37
- package/docs/themes.md +52 -55
- package/docs/tmux.md +38 -21
- package/docs/tools.md +209 -147
- package/docs/tui/reference.md +64 -32
- package/docs/tui.md +38 -66
- package/docs/usage.md +94 -86
- package/docs/verification.md +25 -25
- package/docs/web-access.md +106 -54
- package/docs/windows.md +55 -57
- package/docs/worktree-snapshots.md +82 -74
- package/examples/sdk/11-sessions.ts +4 -4
- package/package.json +8 -8
- package/schemas/models.schema.json +58 -7
- package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
- package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
- package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
|
@@ -1,97 +1,145 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Extension examples
|
|
3
|
-
|
|
2
|
+
title: "Extension examples"
|
|
3
|
+
sidebarTitle: "Examples"
|
|
4
|
+
description: "Browse runnable TypeScript extensions shipped in Atomic for custom tools, commands, hooks, UI components, and providers."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Every example below lives in [examples/extensions/](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions). Try any example directly for one session with `-e`:
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
```bash
|
|
10
|
+
atomic -e /path/to/atomic/packages/coding-agent/examples/extensions/hello.ts
|
|
11
|
+
```
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
## Tools
|
|
11
14
|
|
|
12
15
|
| Example | Description | Key APIs |
|
|
13
|
-
|
|
14
|
-
| **Tools** |||
|
|
16
|
+
| --- | --- | --- |
|
|
15
17
|
| `hello.ts` | Minimal tool registration | `registerTool` |
|
|
16
18
|
| `question.ts` | Width-wrapped single-question custom UI with option descriptions and typed answers | `registerTool`, `ui.custom` |
|
|
17
19
|
| `questionnaire.ts` | Width-wrapped multi-step wizard with tab navigation and typed answers | `registerTool`, `ui.custom` |
|
|
18
|
-
| `todo.ts` | Stateful tool with persistence | `registerTool`, `appendEntry`, `renderResult`, session events |
|
|
20
|
+
| `todo.ts` | Stateful tool with session persistence | `registerTool`, `appendEntry`, `renderResult`, session events |
|
|
19
21
|
| `dynamic-tools.ts` | Register tools after startup and during commands | `registerTool`, `session_start`, `registerCommand` |
|
|
20
22
|
| `structured-output.ts` | Opt-in schema-specific `structured_output` tool using the canonical factory | `createStructuredOutputTool`, `registerTool`, terminating tool results |
|
|
21
23
|
| `truncated-tool.ts` | Output truncation example | `registerTool`, `truncateHead` |
|
|
22
|
-
| `tool-override.ts` | Override built-in read tool | `registerTool` (same name as built-in) |
|
|
23
|
-
|
|
|
24
|
-
| `
|
|
24
|
+
| `tool-override.ts` | Override built-in `read` tool behavior | `registerTool` (same name as built-in) |
|
|
25
|
+
| `built-in-tool-renderer.ts` | Replace rendering of built-in tools (`read`, `bash`, `edit`, `write`) while delegating execution | `registerTool`, `create*ToolDefinition`, `renderShell: "self"` |
|
|
26
|
+
| `minimal-mode.ts` | Minimal collapsed rendering for built-in tools toggled with `Ctrl+O` | `registerTool`, `create*ToolDefinition`, `renderResult` |
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
|
|
30
|
+
| Example | Description | Key APIs |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `commands.ts` | `/commands` slash command that lists and filters all registered commands by source | `registerCommand`, `getCommands`, `getArgumentCompletions` |
|
|
33
|
+
| `pirate.ts` | Modify the system prompt per turn | `registerCommand`, `before_agent_start` |
|
|
25
34
|
| `summarize.ts` | Conversation summary command | `registerCommand`, `ui.custom` |
|
|
26
35
|
| `handoff.ts` | Cross-provider model handoff | `registerCommand`, `ui.editor`, `ui.custom` |
|
|
27
|
-
| `qna.ts` | Q&A with custom UI | `registerCommand`, `ui.custom`, `setEditorText` |
|
|
28
|
-
| `send-user-message.ts` | Inject user messages | `registerCommand`, `sendUserMessage` |
|
|
29
|
-
| `reload-runtime.ts` | Reload command and
|
|
30
|
-
| `shutdown-command.ts` | Graceful shutdown command | `registerCommand`, `shutdown()` |
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
36
|
+
| `qna.ts` | Q&A helper with custom UI | `registerCommand`, `ui.custom`, `setEditorText` |
|
|
37
|
+
| `send-user-message.ts` | Inject user messages from a command | `registerCommand`, `sendUserMessage` |
|
|
38
|
+
| `reload-runtime.ts` | Reload command and model tool handoff | `registerCommand`, `ctx.reload()`, `sendUserMessage` |
|
|
39
|
+
| `shutdown-command.ts` | Graceful shutdown command | `registerCommand`, `ctx.shutdown()` |
|
|
40
|
+
|
|
41
|
+
## Events and gates
|
|
42
|
+
|
|
43
|
+
| Example | Description | Key APIs |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| `permission-gate.ts` | Prompt before dangerous bash commands | `on("tool_call")`, `ui.confirm` |
|
|
46
|
+
| `protected-paths.ts` | Block writes to protected paths | `on("tool_call")` |
|
|
47
|
+
| `confirm-destructive.ts` | Confirm session switches and forks | `on("session_before_switch")`, `on("session_before_fork")` |
|
|
48
|
+
| `dirty-repo-guard.ts` | Warn when switching sessions in a dirty git repo | `on("session_before_*")`, `exec` |
|
|
49
|
+
| `input-transform.ts` | Transform user input before the model sees it | `on("input")` |
|
|
50
|
+
| `input-transform-streaming.ts` | Streaming-aware input transformation | `on("input")`, `streamingBehavior` |
|
|
51
|
+
| `project-trust.ts` | Decide or defer project trust from a user or CLI extension | `on("project_trust")`, trust UI |
|
|
52
|
+
| `dynamic-resources/` | Dynamically contribute skills, prompt templates, and themes at startup | `on("resources_discover")` |
|
|
53
|
+
| `model-status.ts` | Display active model changes in the status bar | `on("model_select")`, `setStatus` |
|
|
54
|
+
| `provider-payload.ts` | Inspect outgoing payloads and provider response headers | `on("before_provider_request")`, `on("after_provider_response")` |
|
|
55
|
+
| `system-prompt-header.ts` | Display system prompt summary information | `on("agent_start")`, `getSystemPrompt` |
|
|
56
|
+
| `claude-rules.ts` | Load rules from files and inject them into turns | `on("session_start")`, `on("before_agent_start")` |
|
|
43
57
|
| `prompt-customizer.ts` | Add context-aware tool guidance using `systemPromptOptions` | `on("before_agent_start")`, `BuildSystemPromptOptions` |
|
|
44
|
-
| `file-trigger.ts` | File watcher
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
58
|
+
| `file-trigger.ts` | File watcher that sends messages into the session | `sendMessage` |
|
|
59
|
+
|
|
60
|
+
## Compaction and sessions
|
|
61
|
+
|
|
62
|
+
| Example | Description | Key APIs |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| `custom-compaction.ts` | Replace compacted context with custom text without calling a model | `on("session_before_compact")`, `on("session_compact")` |
|
|
65
|
+
| `trigger-compact.ts` | Trigger compaction at a token threshold or via `/trigger-compact [instructions]` | `ctx.compact()` |
|
|
66
|
+
| `git-checkpoint.ts` | Create git stashes on turns for rollback | `on("turn_start")`, `on("session_before_fork")`, `exec` |
|
|
67
|
+
| `git-merge-and-resolve.ts` | Auto-fetch and merge upstream after each turn, sending conflict blocks to the agent | `on("agent_end")`, `exec`, `sendMessage` |
|
|
68
|
+
| `auto-commit-on-exit.ts` | Commit working tree changes on session shutdown | `on("session_shutdown")`, `exec` |
|
|
69
|
+
|
|
70
|
+
## UI components
|
|
71
|
+
|
|
72
|
+
| Example | Description | Key APIs |
|
|
73
|
+
| --- | --- | --- |
|
|
51
74
|
| `status-line.ts` | Footer status indicator | `setStatus`, session events |
|
|
52
|
-
| `working-indicator.ts` | Customize the
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
75
|
+
| `working-indicator.ts` | Customize the streaming working indicator | `setWorkingIndicator`, `registerCommand` |
|
|
76
|
+
| `working-message-test.ts` | Keep a custom working message and indicator across turns | `setWorkingMessage`, `setWorkingIndicator`, `on("session_start")` |
|
|
77
|
+
| `hidden-thinking-label.ts` | Customize the placeholder label for collapsed thinking blocks via `/thinking-label` | `setHiddenThinkingLabel`, `registerCommand` |
|
|
78
|
+
| `titlebar-spinner.ts` | Animate a braille spinner in the terminal title while the agent works | `setTitle`, `on("agent_start")`, `on("agent_end")` |
|
|
79
|
+
| `github-issue-autocomplete.ts` | Layer `#1234` GitHub issue completions onto built-in autocomplete | `addAutocompleteProvider`, `on("session_start")`, `exec` |
|
|
80
|
+
| `custom-footer.ts` | Replace the footer component | `registerCommand`, `setFooter` |
|
|
81
|
+
| `custom-header.ts` | Replace the startup header component | `on("session_start")`, `setHeader` |
|
|
82
|
+
| `border-status-editor.ts` | Custom editor that draws aligned left and right status labels in its border | `setEditorComponent`, `CustomEditor` |
|
|
56
83
|
| `modal-editor.ts` | Vim-style modal editor | `setEditorComponent`, `CustomEditor` |
|
|
57
|
-
| `rainbow-editor.ts` | Custom editor styling | `setEditorComponent` |
|
|
58
|
-
| `widget-placement.ts` |
|
|
59
|
-
| `overlay-test.ts` | Overlay
|
|
60
|
-
| `overlay-qa-tests.ts` | Overlay positioning, visibility, and resize
|
|
61
|
-
| `notify.ts` | Simple
|
|
62
|
-
| `timed-confirm.ts` |
|
|
63
|
-
| `mac-system-theme.ts` |
|
|
64
|
-
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
| `
|
|
84
|
+
| `rainbow-editor.ts` | Custom editor border styling | `setEditorComponent` |
|
|
85
|
+
| `widget-placement.ts` | Place widgets above or below the editor | `setWidget` |
|
|
86
|
+
| `overlay-test.ts` | Overlay positioning example | `ui.custom` with overlay options |
|
|
87
|
+
| `overlay-qa-tests.ts` | Overlay positioning, visibility, and resize suite | `ui.custom`, all overlay options |
|
|
88
|
+
| `notify.ts` | Simple notification examples | `ui.notify` |
|
|
89
|
+
| `timed-confirm.ts` | Confirmation dialogs with countdown timeout and abort signal | `ui.confirm` with `timeout` and `signal` |
|
|
90
|
+
| `mac-system-theme.ts` | Switch theme based on macOS appearance | `setTheme`, `exec` |
|
|
91
|
+
| `rpc-demo.ts` | Exercise all RPC-supported UI dialogs, status, widgets, title, and editor prefill | `select`, `confirm`, `input`, `editor`, `setStatus`, `setWidget`, `setTitle`, `setEditorText` |
|
|
92
|
+
|
|
93
|
+
## Complete extensions
|
|
94
|
+
|
|
95
|
+
| Example | Description | Key APIs |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| `plan-mode/` | Full plan mode workflow | Lifecycle events, `registerCommand`, `registerShortcut`, `registerFlag`, `setStatus`, `setWidget`, `sendMessage`, `setActiveTools` |
|
|
98
|
+
| `preset.ts` | Saveable presets for model, active tools, and thinking level | `registerCommand`, `registerShortcut`, `registerFlag`, `setModel`, `setActiveTools`, `setThinkingLevel`, `appendEntry` |
|
|
99
|
+
| `tools.ts` | Interactive menu to toggle tools on and off | `registerCommand`, `setActiveTools`, `SettingsList`, session events |
|
|
100
|
+
|
|
101
|
+
### Plan-mode completion
|
|
102
|
+
|
|
103
|
+
In `plan-mode/`, write `[DONE:1]` to mark an individual step complete, including inside thinking blocks. To finish the entire plan without per-step markers, send a standalone final visible reply such as `All steps are complete.` or `The plan is done.`. Hidden thinking does not count toward that whole-plan reply, and negated summaries, questions, conditional statements, or completion phrases embedded in longer prose leave unfinished steps active.
|
|
104
|
+
|
|
105
|
+
## Remote execution and sandboxes
|
|
106
|
+
|
|
107
|
+
| Example | Description | Key APIs |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| `ssh.ts` | Run built-in tools and `!` commands over SSH | `registerFlag`, `on("user_bash")`, `on("before_agent_start")`, tool operations |
|
|
110
|
+
| `interactive-shell.ts` | Persistent shell session for user bash commands | `on("user_bash")` |
|
|
71
111
|
| `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM | Tool operations, built-in tool overrides, `on("user_bash")` |
|
|
72
|
-
| `subagent/` | Spawn
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
|
|
|
81
|
-
| `
|
|
112
|
+
| `subagent/` | Spawn child agents from a custom tool | `registerTool`, `exec` |
|
|
113
|
+
|
|
114
|
+
## Games
|
|
115
|
+
|
|
116
|
+
| Example | Description | Key APIs |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| `snake.ts` | Snake game in custom UI | `registerCommand`, `ui.custom`, keyboard handling |
|
|
119
|
+
| `space-invaders.ts` | Space Invaders game in custom UI | `registerCommand`, `ui.custom` |
|
|
120
|
+
| `doom-overlay/` | Doom inside an overlay component | `ui.custom` with overlay |
|
|
121
|
+
| `tic-tac-toe.ts` | Interactive Tic-Tac-Toe demonstrating `executionMode: "sequential"` on stateful sibling tool calls | `registerTool` (`executionMode: "sequential"`), `registerCommand`, `ui.custom` |
|
|
122
|
+
|
|
123
|
+
## Providers
|
|
124
|
+
|
|
125
|
+
| Example | Description | Key APIs |
|
|
126
|
+
| --- | --- | --- |
|
|
127
|
+
| `custom-provider-anthropic/` | Custom Anthropic proxy provider | `registerProvider` |
|
|
128
|
+
| `custom-provider-gitlab-duo/` | GitLab Duo provider with OAuth login | `registerProvider` with OAuth |
|
|
129
|
+
| `provider-accounts.ts` | Register multiple numbered OpenAI account aliases (`openai-1` through `openai-7`) | `registerProviderAlias` |
|
|
130
|
+
|
|
131
|
+
## Messages, metadata, and utilities
|
|
132
|
+
|
|
133
|
+
| Example | Description | Key APIs |
|
|
134
|
+
| --- | --- | --- |
|
|
135
|
+
| `message-renderer.ts` | Custom renderer for extension messages | `registerMessageRenderer`, `sendMessage` |
|
|
82
136
|
| `debug-provider.ts` | Capture raw provider stream events per assistant message with `/debug-provider` | `on("provider_stream_event")`, `registerEntryRenderer`, `appendEntry` |
|
|
83
|
-
| `event-bus.ts` | Inter-extension
|
|
84
|
-
|
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
|
|
|
88
|
-
| `
|
|
89
|
-
| `bash-spawn-hook.ts` | Adjust bash command, cwd, and env before execution | `createBashTool`, `spawnHook` |
|
|
90
|
-
| `with-deps/` | Extension with npm dependencies | Package structure with `package.json` |
|
|
91
|
-
|
|
92
|
-
## Plan-mode completion
|
|
93
|
-
|
|
94
|
-
In `plan-mode/`, use `[DONE:1]` to mark an individual step complete, including in thinking blocks. To finish the whole plan without per-step markers, use a standalone final visible reply such as `All steps are complete.` or `The plan is done.`. Hidden thinking does not count toward that whole-plan reply. Negated summaries, questions, conditional statements, and completion phrases embedded in longer visible prose leave unfinished steps active.
|
|
137
|
+
| `event-bus.ts` | Inter-extension messaging | `atomic.events` |
|
|
138
|
+
| `session-name.ts` | Name sessions for the session picker | `setSessionName`, `getSessionName` |
|
|
139
|
+
| `bookmark.ts` | Bookmark entries for `/tree` | `setLabel` |
|
|
140
|
+
| `inline-bash.ts` | Expand inline bash expressions inside tool calls | `on("tool_call")` |
|
|
141
|
+
| `bash-spawn-hook.ts` | Customize bash command, `cwd`, and `env` before spawn | `createBashTool`, `spawnHook` |
|
|
142
|
+
| `with-deps/` | Extension package with third-party npm dependencies | Package layout with `package.json` |
|
|
95
143
|
|
|
96
144
|
## Next steps
|
|
97
145
|
|