@bastani/atomic 0.9.2 → 0.9.3-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +2 -2
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/direct-tools.ts +4 -2
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/mcp/proxy-call.ts +3 -1
- package/dist/builtin/mcp/utils.ts +18 -7
- package/dist/builtin/subagents/CHANGELOG.md +11 -0
- package/dist/builtin/subagents/README.md +6 -6
- package/dist/builtin/subagents/agents/code-simplifier.md +7 -6
- package/dist/builtin/subagents/agents/codebase-analyzer.md +5 -4
- package/dist/builtin/subagents/agents/codebase-locator.md +3 -3
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +10 -10
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +4 -4
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +3 -3
- package/dist/builtin/subagents/agents/codebase-research-locator.md +4 -4
- package/dist/builtin/subagents/agents/debugger.md +5 -5
- package/dist/builtin/subagents/agents/worker.md +56 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/subagent/SKILL.md +11 -11
- package/dist/builtin/subagents/src/agents/agent-loaders.ts +3 -5
- package/dist/builtin/subagents/src/agents/agent-management-helpers.ts +3 -3
- package/dist/builtin/subagents/src/extension/schemas.ts +2 -2
- package/dist/builtin/subagents/src/intercom/result-intercom.ts +4 -3
- package/dist/builtin/subagents/src/runs/shared/mcp-direct-tool-allowlist.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/nested-render.ts +2 -2
- package/dist/builtin/subagents/src/runs/shared/pi-args.ts +2 -1
- package/dist/builtin/subagents/src/shared/types-depth.ts +5 -5
- package/dist/builtin/subagents/src/shared/types-runtime.ts +2 -1
- package/dist/builtin/subagents/src/tui/render-event-formatting.ts +2 -2
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +13 -0
- package/dist/builtin/workflows/README.md +2 -2
- package/dist/builtin/workflows/builtin/goal-artifacts.ts +11 -6
- package/dist/builtin/workflows/builtin/goal-ledger.ts +33 -1
- package/dist/builtin/workflows/builtin/goal-prompts.ts +23 -28
- package/dist/builtin/workflows/builtin/goal-reducer.ts +2 -2
- package/dist/builtin/workflows/builtin/goal-reports.ts +2 -5
- package/dist/builtin/workflows/builtin/goal-review.ts +1 -1
- package/dist/builtin/workflows/builtin/goal-runner.ts +10 -17
- package/dist/builtin/workflows/builtin/open-claude-design-feedback.ts +3 -3
- package/dist/builtin/workflows/builtin/open-claude-design-phases.ts +1 -3
- package/dist/builtin/workflows/builtin/open-claude-design-setup.ts +1 -1
- package/dist/builtin/workflows/builtin/ralph-core.ts +7 -17
- package/dist/builtin/workflows/builtin/ralph-runner.ts +11 -18
- package/dist/builtin/workflows/builtin/shared-prompts.ts +1 -1
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/extension/config-loader.ts +35 -15
- package/dist/builtin/workflows/src/extension/discovery.ts +20 -8
- package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +1 -2
- package/dist/builtin/workflows/src/extension/wiring.ts +1 -1
- package/dist/builtin/workflows/src/tui/dispatch-confirm.ts +11 -10
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +9 -9
- package/dist/cli/args.js.map +1 -1
- package/dist/config-self-update.d.ts.map +1 -1
- package/dist/config-self-update.js +3 -4
- package/dist/config-self-update.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -5
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts +1 -0
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +1 -0
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +23 -0
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/bash-executor.d.ts +2 -0
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +1 -0
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +29 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +36 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction-metrics.d.ts +14 -2
- package/dist/core/compaction/context-compaction-metrics.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-metrics.js +50 -1
- package/dist/core/compaction/context-compaction-metrics.js.map +1 -1
- package/dist/core/compaction/context-compaction-prompt.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-prompt.js +2 -0
- package/dist/core/compaction/context-compaction-prompt.js.map +1 -1
- package/dist/core/compaction/context-compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-runner.js +1 -1
- package/dist/core/compaction/context-compaction-runner.js.map +1 -1
- package/dist/core/compaction/context-deletion-application.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-application.js +5 -5
- package/dist/core/compaction/context-deletion-application.js.map +1 -1
- package/dist/core/compaction/context-deletion-targets.d.ts +2 -0
- package/dist/core/compaction/context-deletion-targets.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-targets.js +23 -3
- package/dist/core/compaction/context-deletion-targets.js.map +1 -1
- package/dist/core/compaction/context-deletion-tool-definitions.d.ts +6 -0
- package/dist/core/compaction/context-deletion-tool-definitions.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-tool-definitions.js.map +1 -1
- package/dist/core/compaction/context-deletion-tools.d.ts.map +1 -1
- package/dist/core/compaction/context-deletion-tools.js +18 -10
- package/dist/core/compaction/context-deletion-tools.js.map +1 -1
- package/dist/core/compaction/context-transcript-analysis.d.ts.map +1 -1
- package/dist/core/compaction/context-transcript-analysis.js +2 -4
- package/dist/core/compaction/context-transcript-analysis.js.map +1 -1
- package/dist/core/copilot-gemini-tool-arguments.d.ts.map +1 -1
- package/dist/core/copilot-gemini-tool-arguments.js +2 -60
- package/dist/core/copilot-gemini-tool-arguments.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +2 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +11 -3
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/runner-context.d.ts.map +1 -1
- package/dist/core/extensions/runner-context.js +11 -0
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/tool-events.d.ts +13 -13
- package/dist/core/extensions/tool-events.d.ts.map +1 -1
- package/dist/core/extensions/tool-events.js +3 -3
- package/dist/core/extensions/tool-events.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/flattened-tool-arguments.d.ts +18 -0
- package/dist/core/flattened-tool-arguments.d.ts.map +1 -1
- package/dist/core/flattened-tool-arguments.js +104 -0
- package/dist/core/flattened-tool-arguments.js.map +1 -1
- package/dist/core/sdk-exports.d.ts +1 -1
- package/dist/core/sdk-exports.d.ts.map +1 -1
- package/dist/core/sdk-exports.js +1 -1
- package/dist/core/sdk-exports.js.map +1 -1
- package/dist/core/sdk-types.d.ts +2 -2
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +4 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +18 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager-resource-accessors.d.ts +4 -0
- package/dist/core/settings-manager-resource-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-resource-accessors.js +15 -0
- package/dist/core/settings-manager-resource-accessors.js.map +1 -1
- package/dist/core/settings-types.d.ts +11 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/system-prompt.d.ts +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +3 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/artifact-protocol.d.ts +11 -0
- package/dist/core/tools/artifact-protocol.d.ts.map +1 -0
- package/dist/core/tools/artifact-protocol.js +76 -0
- package/dist/core/tools/artifact-protocol.js.map +1 -0
- package/dist/core/tools/artifacts.d.ts +18 -0
- package/dist/core/tools/artifacts.d.ts.map +1 -0
- package/dist/core/tools/artifacts.js +90 -0
- package/dist/core/tools/artifacts.js.map +1 -0
- package/dist/core/tools/bash-async-jobs.d.ts +20 -0
- package/dist/core/tools/bash-async-jobs.d.ts.map +1 -0
- package/dist/core/tools/bash-async-jobs.js +59 -0
- package/dist/core/tools/bash-async-jobs.js.map +1 -0
- package/dist/core/tools/bash-async-output.d.ts +10 -0
- package/dist/core/tools/bash-async-output.d.ts.map +1 -0
- package/dist/core/tools/bash-async-output.js +80 -0
- package/dist/core/tools/bash-async-output.js.map +1 -0
- package/dist/core/tools/bash-interceptor.d.ts +10 -0
- package/dist/core/tools/bash-interceptor.d.ts.map +1 -0
- package/dist/core/tools/bash-interceptor.js +39 -0
- package/dist/core/tools/bash-interceptor.js.map +1 -0
- package/dist/core/tools/bash-leading-cd.d.ts +7 -0
- package/dist/core/tools/bash-leading-cd.d.ts.map +1 -0
- package/dist/core/tools/bash-leading-cd.js +59 -0
- package/dist/core/tools/bash-leading-cd.js.map +1 -0
- package/dist/core/tools/bash-pty-native.d.ts +14 -0
- package/dist/core/tools/bash-pty-native.d.ts.map +1 -0
- package/dist/core/tools/bash-pty-native.js +71 -0
- package/dist/core/tools/bash-pty-native.js.map +1 -0
- package/dist/core/tools/bash.d.ts +28 -17
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +152 -35
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/block-resolver.d.ts +16 -0
- package/dist/core/tools/block-resolver.d.ts.map +1 -0
- package/dist/core/tools/block-resolver.js +74 -0
- package/dist/core/tools/block-resolver.js.map +1 -0
- package/dist/core/tools/conflict-registry.d.ts +16 -0
- package/dist/core/tools/conflict-registry.d.ts.map +1 -0
- package/dist/core/tools/conflict-registry.js +44 -0
- package/dist/core/tools/conflict-registry.js.map +1 -0
- package/dist/core/tools/directory-tree.d.ts +13 -0
- package/dist/core/tools/directory-tree.d.ts.map +1 -0
- package/dist/core/tools/directory-tree.js +81 -0
- package/dist/core/tools/directory-tree.js.map +1 -0
- package/dist/core/tools/edit.d.ts +4 -29
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +136 -228
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/fetch-url.d.ts +74 -0
- package/dist/core/tools/fetch-url.d.ts.map +1 -0
- package/dist/core/tools/fetch-url.js +518 -0
- package/dist/core/tools/fetch-url.js.map +1 -0
- package/dist/core/tools/find.d.ts +27 -9
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +400 -176
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/glob-path-utils.d.ts +8 -0
- package/dist/core/tools/glob-path-utils.d.ts.map +1 -0
- package/dist/core/tools/glob-path-utils.js +26 -0
- package/dist/core/tools/glob-path-utils.js.map +1 -0
- package/dist/core/tools/grep.d.ts +12 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +141 -17
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/hashline-engine/apply.d.ts +11 -0
- package/dist/core/tools/hashline-engine/apply.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/apply.js +752 -0
- package/dist/core/tools/hashline-engine/apply.js.map +1 -0
- package/dist/core/tools/hashline-engine/block.d.ts +40 -0
- package/dist/core/tools/hashline-engine/block.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/block.js +117 -0
- package/dist/core/tools/hashline-engine/block.js.map +1 -0
- package/dist/core/tools/hashline-engine/diff-preview.d.ts +15 -0
- package/dist/core/tools/hashline-engine/diff-preview.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/diff-preview.js +98 -0
- package/dist/core/tools/hashline-engine/diff-preview.js.map +1 -0
- package/dist/core/tools/hashline-engine/format.d.ts +71 -0
- package/dist/core/tools/hashline-engine/format.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/format.js +178 -0
- package/dist/core/tools/hashline-engine/format.js.map +1 -0
- package/dist/core/tools/hashline-engine/fs.d.ts +81 -0
- package/dist/core/tools/hashline-engine/fs.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/fs.js +143 -0
- package/dist/core/tools/hashline-engine/fs.js.map +1 -0
- package/dist/core/tools/hashline-engine/index.d.ts +18 -0
- package/dist/core/tools/hashline-engine/index.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/index.js +20 -0
- package/dist/core/tools/hashline-engine/index.js.map +1 -0
- package/dist/core/tools/hashline-engine/input.d.ts +101 -0
- package/dist/core/tools/hashline-engine/input.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/input.js +398 -0
- package/dist/core/tools/hashline-engine/input.js.map +1 -0
- package/dist/core/tools/hashline-engine/messages.d.ts +99 -0
- package/dist/core/tools/hashline-engine/messages.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/messages.js +144 -0
- package/dist/core/tools/hashline-engine/messages.js.map +1 -0
- package/dist/core/tools/hashline-engine/mismatch.d.ts +45 -0
- package/dist/core/tools/hashline-engine/mismatch.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/mismatch.js +90 -0
- package/dist/core/tools/hashline-engine/mismatch.js.map +1 -0
- package/dist/core/tools/hashline-engine/normalize.d.ts +21 -0
- package/dist/core/tools/hashline-engine/normalize.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/normalize.js +33 -0
- package/dist/core/tools/hashline-engine/normalize.js.map +1 -0
- package/dist/core/tools/hashline-engine/parser.d.ts +24 -0
- package/dist/core/tools/hashline-engine/parser.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/parser.js +381 -0
- package/dist/core/tools/hashline-engine/parser.js.map +1 -0
- package/dist/core/tools/hashline-engine/patcher.d.ts +118 -0
- package/dist/core/tools/hashline-engine/patcher.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/patcher.js +341 -0
- package/dist/core/tools/hashline-engine/patcher.js.map +1 -0
- package/dist/core/tools/hashline-engine/prefixes.d.ts +43 -0
- package/dist/core/tools/hashline-engine/prefixes.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/prefixes.js +135 -0
- package/dist/core/tools/hashline-engine/prefixes.js.map +1 -0
- package/dist/core/tools/hashline-engine/recovery.d.ts +41 -0
- package/dist/core/tools/hashline-engine/recovery.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/recovery.js +168 -0
- package/dist/core/tools/hashline-engine/recovery.js.map +1 -0
- package/dist/core/tools/hashline-engine/snapshots.d.ts +65 -0
- package/dist/core/tools/hashline-engine/snapshots.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/snapshots.js +108 -0
- package/dist/core/tools/hashline-engine/snapshots.js.map +1 -0
- package/dist/core/tools/hashline-engine/stream.d.ts +3 -0
- package/dist/core/tools/hashline-engine/stream.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/stream.js +111 -0
- package/dist/core/tools/hashline-engine/stream.js.map +1 -0
- package/dist/core/tools/hashline-engine/tokenizer.d.ts +69 -0
- package/dist/core/tools/hashline-engine/tokenizer.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/tokenizer.js +430 -0
- package/dist/core/tools/hashline-engine/tokenizer.js.map +1 -0
- package/dist/core/tools/hashline-engine/types.d.ts +166 -0
- package/dist/core/tools/hashline-engine/types.d.ts.map +1 -0
- package/dist/core/tools/hashline-engine/types.js +9 -0
- package/dist/core/tools/hashline-engine/types.js.map +1 -0
- package/dist/core/tools/hashline.d.ts +29 -0
- package/dist/core/tools/hashline.d.ts.map +1 -0
- package/dist/core/tools/hashline.js +110 -0
- package/dist/core/tools/hashline.js.map +1 -0
- package/dist/core/tools/index.d.ts +6 -4
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +52 -35
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/notebook.d.ts +38 -0
- package/dist/core/tools/notebook.d.ts.map +1 -0
- package/dist/core/tools/notebook.js +125 -0
- package/dist/core/tools/notebook.js.map +1 -0
- package/dist/core/tools/read-document-extract.d.ts +9 -0
- package/dist/core/tools/read-document-extract.d.ts.map +1 -0
- package/dist/core/tools/read-document-extract.js +212 -0
- package/dist/core/tools/read-document-extract.js.map +1 -0
- package/dist/core/tools/read-selectors.d.ts +24 -0
- package/dist/core/tools/read-selectors.d.ts.map +1 -0
- package/dist/core/tools/read-selectors.js +277 -0
- package/dist/core/tools/read-selectors.js.map +1 -0
- package/dist/core/tools/read-url.d.ts +37 -0
- package/dist/core/tools/read-url.d.ts.map +1 -0
- package/dist/core/tools/read-url.js +39 -0
- package/dist/core/tools/read-url.js.map +1 -0
- package/dist/core/tools/read.d.ts +11 -11
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +224 -94
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/resource-selectors.d.ts +44 -0
- package/dist/core/tools/resource-selectors.d.ts.map +1 -0
- package/dist/core/tools/resource-selectors.js +808 -0
- package/dist/core/tools/resource-selectors.js.map +1 -0
- package/dist/core/tools/search-details.d.ts +26 -0
- package/dist/core/tools/search-details.d.ts.map +1 -0
- package/dist/core/tools/search-details.js +24 -0
- package/dist/core/tools/search-details.js.map +1 -0
- package/dist/core/tools/search-line-ranges.d.ts +11 -0
- package/dist/core/tools/search-line-ranges.d.ts.map +1 -0
- package/dist/core/tools/search-line-ranges.js +65 -0
- package/dist/core/tools/search-line-ranges.js.map +1 -0
- package/dist/core/tools/search-native.d.ts +97 -0
- package/dist/core/tools/search-native.d.ts.map +1 -0
- package/dist/core/tools/search-native.js +27 -0
- package/dist/core/tools/search-native.js.map +1 -0
- package/dist/core/tools/search.d.ts +24 -0
- package/dist/core/tools/search.d.ts.map +1 -0
- package/dist/core/tools/search.js +573 -0
- package/dist/core/tools/search.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +4 -4
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +3 -3
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/url-ip-guards.d.ts +4 -0
- package/dist/core/tools/url-ip-guards.d.ts.map +1 -0
- package/dist/core/tools/url-ip-guards.js +126 -0
- package/dist/core/tools/url-ip-guards.js.map +1 -0
- package/dist/core/tools/write.d.ts +12 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +166 -14
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +2 -3
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/index-extensions.d.ts +2 -2
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +9 -2
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +7 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-content.js +0 -5
- package/dist/modes/interactive/components/tree-selector-content.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +1 -0
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +80 -2
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js +3 -0
- package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +51 -0
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +5 -0
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +5 -0
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +12 -0
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +4 -1
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-onboarding.d.ts +11 -0
- package/dist/modes/interactive/interactive-onboarding.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-onboarding.js +220 -0
- package/dist/modes/interactive/interactive-onboarding.js.map +1 -0
- package/dist/modes/interactive/interactive-selectors.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +4 -0
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +6 -0
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +9 -4
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +28 -0
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +21 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/markit.d.ts +8 -0
- package/dist/utils/markit.d.ts.map +1 -0
- package/dist/utils/markit.js +53 -0
- package/dist/utils/markit.js.map +1 -0
- package/dist/utils/paths.d.ts +2 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +14 -1
- package/dist/utils/paths.js.map +1 -1
- package/docs/compaction.md +16 -1
- package/docs/containerization.md +1 -1
- package/docs/docs.json +1 -0
- package/docs/extensions.md +25 -36
- package/docs/quickstart.md +11 -6
- package/docs/sdk.md +5 -5
- package/docs/settings.md +7 -0
- package/docs/subagents.md +3 -2
- package/docs/tools.md +49 -0
- package/docs/usage.md +3 -3
- package/docs/workflows.md +7 -5
- package/examples/extensions/subagent/README.md +5 -5
- package/examples/extensions/subagent/agents/planner.md +1 -1
- package/examples/extensions/subagent/agents/reviewer.md +1 -1
- package/examples/extensions/subagent/agents/scout.md +2 -2
- package/examples/extensions/subagent/display.ts +3 -3
- package/examples/sdk/05-tools.ts +3 -3
- package/examples/sdk/README.md +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker
|
|
3
|
+
description: Implementation agent for normal tasks and approved orchestrator handoffs.
|
|
4
|
+
systemPromptMode: replace
|
|
5
|
+
inheritProjectContext: true
|
|
6
|
+
inheritSkills: false
|
|
7
|
+
tools: read, edit, write, search, find, ls, bash, web_search, fetch_content, get_search_content, intercom, contact_supervisor, todo
|
|
8
|
+
model: zai/glm-5.2:medium
|
|
9
|
+
fallbackModels: zai-coding-cn/glm-5.2:medium, openai-codex/gpt-5.5:medium, github-copilot/gpt-5.5:medium, openai/gpt-5.5:medium, github-copilot/claude-opus-4.8 (1m):medium, anthropic/claude-opus-4-8:medium, github-copilot/gemini-3.5-flash (1m):medium, google/gemini-3.5-flash:medium, google-vertex/gemini-3.5-flash:medium, github-copilot/gemini-3.1-pro-preview (1m):medium, google/gemini-3.1-pro-preview:medium, google-vertex/gemini-3.1-pro-preview:medium
|
|
10
|
+
skills: tdd, playwright-cli, tmux
|
|
11
|
+
defaultContext: fork
|
|
12
|
+
defaultProgress: true
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
You are `worker`: the implementation subagent.
|
|
16
|
+
|
|
17
|
+
You are the single writer thread. Your job is to execute the assigned task or approved direction with narrow, coherent edits. The main agent and user remain the decision authority.
|
|
18
|
+
|
|
19
|
+
Use the provided tools directly. First understand the inherited context, supplied files, plan, and explicit task. Then implement carefully and minimally.
|
|
20
|
+
|
|
21
|
+
If the task is framed as an approved direction, handoff, or execution plan, treat that direction as the contract. Validate it against the actual code, but do not silently make new product, architecture, or scope decisions.
|
|
22
|
+
|
|
23
|
+
If the implementation reveals a decision that was not approved and is required to continue safely, pause and escalate through the live coordination channel. If runtime bridge instructions are present, use them as the source of truth for which supervisor session to contact and how to coordinate. Use `contact_supervisor` with `reason: "need_decision"` when a new decision is needed, and stay alive to receive the reply before continuing. Use `reason: "progress_update"` only for concise non-blocking progress updates when that extra coordination is helpful or explicitly requested. Fall back to generic `intercom` only if `contact_supervisor` is unavailable. Do not finish your final response with a question that requires the supervisor to choose before you can continue.
|
|
24
|
+
|
|
25
|
+
Default responsibilities:
|
|
26
|
+
- validate the task or approved direction against the actual code
|
|
27
|
+
- implement the smallest correct change
|
|
28
|
+
- follow existing patterns in the codebase
|
|
29
|
+
- verify the result with appropriate checks when possible
|
|
30
|
+
- keep `progress.md` accurate when asked to maintain it
|
|
31
|
+
- report back clearly with changes, validation, risks, and next steps
|
|
32
|
+
|
|
33
|
+
Working rules:
|
|
34
|
+
- Prefer narrow, correct changes over broad rewrites.
|
|
35
|
+
- Do not add speculative scaffolding or future-proofing unless explicitly required.
|
|
36
|
+
- Do not leave placeholder code, TODOs, or silent scope changes.
|
|
37
|
+
- Use `bash` for inspection, validation, and relevant tests.
|
|
38
|
+
- If there is supplied context or a plan, read it first.
|
|
39
|
+
- If implementation reveals a gap in the approved direction, pause and escalate with `contact_supervisor` and `reason: "need_decision"` instead of silently patching around it with an implicit decision.
|
|
40
|
+
- If implementation reveals an unapproved product or architecture choice, use `contact_supervisor` with `reason: "need_decision"` and wait for the reply instead of deciding it yourself or returning a final choose-one answer.
|
|
41
|
+
- If your delegated task expects code or file edits and you have not made those edits, do not return a success summary. Make the edits, contact the supervisor if blocked, or explicitly report that no edits were made.
|
|
42
|
+
- If you send a blocked/progress update through `contact_supervisor`, keep it short and still return the full structured task result normally.
|
|
43
|
+
- Do not send routine completion handoffs. Return the completed implementation summary normally when no coordination is needed.
|
|
44
|
+
|
|
45
|
+
When running in a chain, expect instructions about:
|
|
46
|
+
- which files to read first
|
|
47
|
+
- where to maintain progress tracking
|
|
48
|
+
- where to write output if a file target is provided
|
|
49
|
+
|
|
50
|
+
Your final response should follow this shape:
|
|
51
|
+
|
|
52
|
+
Implemented X.
|
|
53
|
+
Changed files: Y.
|
|
54
|
+
Validation: Z.
|
|
55
|
+
Open risks/questions: R.
|
|
56
|
+
Recommended next step: N.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/subagents",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3-alpha.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and TUI clarification. Fork of: https://github.com/nicobailon/pi-subagents",
|
|
6
6
|
"contributors": [
|
|
@@ -153,14 +153,14 @@ Builtin agents load at the lowest priority. Project agents override user agents,
|
|
|
153
153
|
|
|
154
154
|
| Agent | Purpose | Default model | Thinking | Tools | Notes |
|
|
155
155
|
| ---------------------------- | ----------------------------------------------------------------- | --------------------- | -------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
156
|
-
| `codebase-locator` | Locate files, directories, tests, and configs relevant to a topic | `openai/gpt-5.4-mini` | low | read,
|
|
157
|
-
| `codebase-analyzer` | Explain how specific code currently works | `openai/gpt-5.5` | low | read,
|
|
158
|
-
| `codebase-pattern-finder` | Find similar implementations or conventions | `openai/gpt-5.4-mini` | low | read,
|
|
159
|
-
| `codebase-research-locator` | Discover prior `research/` and `specs/` docs | `openai/gpt-5.4-mini` | low | read,
|
|
160
|
-
| `codebase-research-analyzer` | Extract decisions and constraints from prior docs | `openai/gpt-5.5` | low | read,
|
|
161
|
-
| `codebase-online-researcher` | Web research with authoritative sources | `openai/gpt-5.5` | low | read,
|
|
162
|
-
| `code-simplifier` | Clean up recently changed code without changing behavior | `openai/gpt-5.5` | low | read, edit, write,
|
|
163
|
-
| `debugger` | Reproduce, diagnose, and fix failing behavior | `openai/gpt-5.5` | high | read, edit, write,
|
|
156
|
+
| `codebase-locator` | Locate files, directories, tests, and configs relevant to a topic | `openai/gpt-5.4-mini` | low | read, search, find, ls, bash | Read-only finder. Returns a categorized file map; no analysis. |
|
|
157
|
+
| `codebase-analyzer` | Explain how specific code currently works | `openai/gpt-5.5` | low | read, search, find, ls, bash | Read-only. Traces flow with `file:line` references; does not critique. |
|
|
158
|
+
| `codebase-pattern-finder` | Find similar implementations or conventions | `openai/gpt-5.4-mini` | low | read, search, find, ls, bash | Read-only. Returns code snippets with `file:line` references. |
|
|
159
|
+
| `codebase-research-locator` | Discover prior `research/` and `specs/` docs | `openai/gpt-5.4-mini` | low | read, search, find, ls, bash | Read-only. Sorts by date, tiers by recency, flags supersession. |
|
|
160
|
+
| `codebase-research-analyzer` | Extract decisions and constraints from prior docs | `openai/gpt-5.5` | low | read, search, find, ls, bash | Read-only. Filters aggressively for what still applies today. |
|
|
161
|
+
| `codebase-online-researcher` | Web research with authoritative sources | `openai/gpt-5.5` | low | read, search, find, ls, bash, write, web_search, fetch_content, get_search_content | Has the `browser` skill. Persists keepers to `research/web/`. |
|
|
162
|
+
| `code-simplifier` | Clean up recently changed code without changing behavior | `openai/gpt-5.5` | low | read, edit, write, search, find, ls, bash | **Writer.** Scopes to recently modified code by default; preserves all observable behavior. |
|
|
163
|
+
| `debugger` | Reproduce, diagnose, and fix failing behavior | `openai/gpt-5.5` | high | read, edit, write, search, find, ls, bash, web_search, fetch_content, get_search_content | **Writer.** Has the `tdd` and `browser` skills. Inspect-only mode requires an explicit instruction. |
|
|
164
164
|
|
|
165
165
|
Each builtin declares an explicit `model` and `fallbackModels` chain (typically `github-copilot/<same>`, then `anthropic/claude-opus-4-8`, then `github-copilot/claude-opus-4.7`). The current user-selected model is automatically appended as the last fallback and de-duplicated. Override per run with inline config:
|
|
166
166
|
|
|
@@ -479,7 +479,7 @@ subagent({
|
|
|
479
479
|
systemPrompt: "Your system prompt here.",
|
|
480
480
|
systemPromptMode: "replace",
|
|
481
481
|
model: "openai/gpt-5.5",
|
|
482
|
-
tools: "read,
|
|
482
|
+
tools: "read,search,find,ls,bash"
|
|
483
483
|
}
|
|
484
484
|
})
|
|
485
485
|
```
|
|
@@ -517,7 +517,7 @@ package: code-analysis
|
|
|
517
517
|
description: What this agent does
|
|
518
518
|
model: openai/gpt-5.5
|
|
519
519
|
thinking: high
|
|
520
|
-
tools: read,
|
|
520
|
+
tools: read, search, find, ls, bash
|
|
521
521
|
---
|
|
522
522
|
|
|
523
523
|
Your system prompt here.
|
|
@@ -548,7 +548,7 @@ If a prompt-template extension is installed, additional user prompt templates ca
|
|
|
548
548
|
|
|
549
549
|
- **Forking requires a persisted parent session.** If the current session does not have a persisted session file, forked runs fail.
|
|
550
550
|
- **Forked runs inherit parent history.** They are branched threads, not fresh filtered contexts. Use fresh context for adversarial review unless the user explicitly asks for forked context.
|
|
551
|
-
- **Default subagent nesting depth is
|
|
551
|
+
- **Default subagent nesting depth is 5.** Deeper recursive delegation is blocked, and configured values above 5 are clamped to the hard ceiling.
|
|
552
552
|
- **Attention signals are not lifecycle state.** `needs_attention` means no activity has been observed past the configured threshold. `paused` means the child turn was intentionally interrupted or is awaiting direction; it is not the same as `failed`.
|
|
553
553
|
- **Builtin specialists do not have `intercom`.** They cannot escalate decisions mid-run. Decide what the child should do up front, or use a custom agent with bridge tools when mid-run coordination is required.
|
|
554
554
|
- **Intercom asks are blocking.** A session can only maintain one pending outbound ask wait state at a time.
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
type ChainConfig,
|
|
15
15
|
type ChainDiscoveryDiagnostic,
|
|
16
16
|
} from "./agent-types.ts";
|
|
17
|
+
import { normalizeMaxSubagentDepth } from "../shared/types.ts";
|
|
17
18
|
|
|
18
19
|
function listFilesRecursive(dir: string, predicate: (fileName: string) => boolean): string[] {
|
|
19
20
|
const files: string[] = [];
|
|
@@ -111,7 +112,7 @@ export function loadAgentsFromDir(dir: string, source: AgentSource): AgentConfig
|
|
|
111
112
|
if (shouldPreserveAgentExtraField(key)) extraFields[key] = value;
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
const parsedMaxSubagentDepth =
|
|
115
|
+
const parsedMaxSubagentDepth = normalizeMaxSubagentDepth(frontmatter.maxSubagentDepth);
|
|
115
116
|
|
|
116
117
|
agents.push({
|
|
117
118
|
name: runtimeName,
|
|
@@ -137,10 +138,7 @@ export function loadAgentsFromDir(dir: string, source: AgentSource): AgentConfig
|
|
|
137
138
|
defaultReads,
|
|
138
139
|
defaultProgress: frontmatter.defaultProgress === "true",
|
|
139
140
|
interactive: frontmatter.interactive === "true",
|
|
140
|
-
maxSubagentDepth:
|
|
141
|
-
Number.isInteger(parsedMaxSubagentDepth) && parsedMaxSubagentDepth >= 0
|
|
142
|
-
? parsedMaxSubagentDepth
|
|
143
|
-
: undefined,
|
|
141
|
+
maxSubagentDepth: parsedMaxSubagentDepth,
|
|
144
142
|
extraFields: Object.keys(extraFields).length > 0 ? extraFields : undefined,
|
|
145
143
|
});
|
|
146
144
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentConfig, AgentScope, ChainConfig, ChainStepConfig } from "./agents.ts";
|
|
2
2
|
import { discoverAgentsAll, parsePackageName } from "./agents.ts";
|
|
3
3
|
import { discoverAvailableSkills } from "./skills.ts";
|
|
4
|
-
import type
|
|
4
|
+
import { MAX_SUBAGENT_NESTING_DEPTH, type SubagentToolResult } from "../shared/types.ts";
|
|
5
5
|
import type { ManagementContext, ManagementScope } from "./agent-management.ts";
|
|
6
6
|
|
|
7
7
|
export function result(text: string, isError = false): SubagentToolResult {
|
|
@@ -302,8 +302,8 @@ export function applyAgentConfig(target: AgentConfig, cfg: Record<string, unknow
|
|
|
302
302
|
if (hasKey(cfg, "maxSubagentDepth")) {
|
|
303
303
|
if (cfg.maxSubagentDepth === false || cfg.maxSubagentDepth === "") target.maxSubagentDepth = undefined;
|
|
304
304
|
else if (typeof cfg.maxSubagentDepth === "number" && Number.isInteger(cfg.maxSubagentDepth) && cfg.maxSubagentDepth >= 0) {
|
|
305
|
-
target.maxSubagentDepth = cfg.maxSubagentDepth;
|
|
306
|
-
} else return
|
|
305
|
+
target.maxSubagentDepth = Math.min(cfg.maxSubagentDepth, MAX_SUBAGENT_NESTING_DEPTH);
|
|
306
|
+
} else return `config.maxSubagentDepth must be an integer >= 0 or false when provided; values above ${MAX_SUBAGENT_NESTING_DEPTH} are clamped.`;
|
|
307
307
|
}
|
|
308
308
|
return undefined;
|
|
309
309
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Type } from "typebox";
|
|
6
|
-
import { SUBAGENT_ACTIONS } from "../shared/types.ts";
|
|
6
|
+
import { MAX_SUBAGENT_NESTING_DEPTH, SUBAGENT_ACTIONS } from "../shared/types.ts";
|
|
7
7
|
|
|
8
8
|
const SkillOverride = Type.Unsafe({
|
|
9
9
|
anyOf: [
|
|
@@ -188,7 +188,7 @@ export const SubagentParams = Type.Object({
|
|
|
188
188
|
{ type: "object", additionalProperties: true },
|
|
189
189
|
{ type: "string" },
|
|
190
190
|
],
|
|
191
|
-
description:
|
|
191
|
+
description: `Agent or chain config for create/update. Agent: name, package (optional namespace; runtime name becomes package.name), description, scope ('user'|'project', default 'user'), systemPrompt, systemPromptMode, inheritProjectContext, inheritSkills, defaultContext ('fresh'|'fork'), model, tools (comma-separated), extensions (comma-separated), skills (comma-separated), thinking, output, reads, progress, maxSubagentDepth (integer >= 0, clamped to ${MAX_SUBAGENT_NESTING_DEPTH}). Chain: name, package, description, scope, steps (array of {agent, task?, output?, outputMode?, reads?, model?, skill?, progress?}). Presence of 'steps' creates a chain instead of an agent. String values must be valid JSON.`
|
|
192
192
|
})),
|
|
193
193
|
tasks: Type.Optional(Type.Array(TaskItem, { description: "PARALLEL mode: [{agent, task, count?, output?, outputMode?, reads?, progress?}, ...]" })),
|
|
194
194
|
concurrency: Type.Optional(Type.Integer({ minimum: 1, description: "Top-level PARALLEL mode only: max concurrent tasks. Defaults to config.parallel.concurrency or 4." })),
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
type SubagentResultIntercomPayload,
|
|
11
11
|
type SubagentResultStatus,
|
|
12
12
|
type SubagentRunMode,
|
|
13
|
+
MAX_SUBAGENT_NESTING_DEPTH,
|
|
13
14
|
SUBAGENT_RESULT_INTERCOM_DELIVERY_EVENT,
|
|
14
15
|
SUBAGENT_RESULT_INTERCOM_EVENT,
|
|
15
16
|
} from "../shared/types.ts";
|
|
@@ -69,7 +70,7 @@ function compactNestedRun(run: NestedRunSummary | PublicNestedRunSummary, depth
|
|
|
69
70
|
...(run.parentStepIndex !== undefined ? { parentStepIndex: run.parentStepIndex } : {}),
|
|
70
71
|
...(run.parentAgent ? { parentAgent: run.parentAgent } : {}),
|
|
71
72
|
depth: run.depth,
|
|
72
|
-
path: run.path.slice(0,
|
|
73
|
+
path: run.path.slice(0, MAX_SUBAGENT_NESTING_DEPTH + 1).map((part) => ({
|
|
73
74
|
runId: part.runId,
|
|
74
75
|
...(part.stepIndex !== undefined ? { stepIndex: part.stepIndex } : {}),
|
|
75
76
|
...(part.agent ? { agent: part.agent } : {}),
|
|
@@ -114,9 +115,9 @@ function compactNestedRun(run: NestedRunSummary | PublicNestedRunSummary, depth
|
|
|
114
115
|
...(step.startedAt !== undefined ? { startedAt: step.startedAt } : {}),
|
|
115
116
|
...(step.endedAt !== undefined ? { endedAt: step.endedAt } : {}),
|
|
116
117
|
...(step.error ? { error: step.error } : {}),
|
|
117
|
-
...(depth <
|
|
118
|
+
...(depth < MAX_SUBAGENT_NESTING_DEPTH && step.children?.length ? { children: step.children.slice(0, 8).map((child) => compactNestedRun(child, depth + 1)) } : {}),
|
|
118
119
|
})) } : {}),
|
|
119
|
-
...(depth <
|
|
120
|
+
...(depth < MAX_SUBAGENT_NESTING_DEPTH && run.children?.length ? { children: run.children.slice(0, 8).map((child) => compactNestedRun(child, depth + 1)) } : {}),
|
|
120
121
|
};
|
|
121
122
|
}
|
|
122
123
|
|
|
@@ -7,7 +7,7 @@ import { getAgentDir } from "../../shared/utils.ts";
|
|
|
7
7
|
|
|
8
8
|
const CACHE_VERSION = 1;
|
|
9
9
|
const CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1000;
|
|
10
|
-
const BUILTIN_TOOL_NAMES = new Set(["read", "bash", "edit", "write", "grep", "find", "ls", "mcp"]);
|
|
10
|
+
const BUILTIN_TOOL_NAMES = new Set(["read", "bash", "edit", "write", "grep", "find", "search", "ls", "mcp"]);
|
|
11
11
|
const GENERIC_GLOBAL_CONFIG_PATH = path.join(os.homedir(), ".config", "mcp", "mcp.json");
|
|
12
12
|
const IMPORT_PATHS = {
|
|
13
13
|
cursor: [path.join(os.homedir(), ".cursor", "mcp.json")],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatDuration, formatTokens, shortenPath } from "../../shared/formatters.ts";
|
|
2
2
|
import { formatActivityLabel } from "../../shared/status-format.ts";
|
|
3
|
-
import type
|
|
3
|
+
import { MAX_SUBAGENT_NESTING_DEPTH, type ActivityState, type NestedRunSummary } from "../../shared/types.ts";
|
|
4
4
|
|
|
5
5
|
export interface NestedRunCounts {
|
|
6
6
|
total: number;
|
|
@@ -108,7 +108,7 @@ function formatNestedRunLines(children: NestedRunSummary[] | undefined, options:
|
|
|
108
108
|
export function formatNestedRunStatusLines(children: NestedRunSummary[] | undefined, options: { indent?: string; maxDepth?: number; maxLines?: number; commandHints?: boolean } = {}): string[] {
|
|
109
109
|
return formatNestedRunLines(children, {
|
|
110
110
|
indent: options.indent ?? " ",
|
|
111
|
-
maxDepth: options.maxDepth ??
|
|
111
|
+
maxDepth: options.maxDepth ?? MAX_SUBAGENT_NESTING_DEPTH,
|
|
112
112
|
maxLines: options.maxLines ?? 40,
|
|
113
113
|
commandHints: options.commandHints ?? false,
|
|
114
114
|
});
|
|
@@ -13,10 +13,11 @@ import { encodeNestedPathEnv, parseNestedPathEnv, type NestedPathEntry } from ".
|
|
|
13
13
|
import { resolveMcpDirectToolNames } from "./mcp-direct-tool-allowlist.ts";
|
|
14
14
|
import { STRUCTURED_OUTPUT_CAPTURE_ENV, STRUCTURED_OUTPUT_SCHEMA_ENV } from "./structured-output.ts";
|
|
15
15
|
import type { JsonSchemaObject } from "../../shared/types.ts";
|
|
16
|
+
import { MAX_SUBAGENT_NESTING_DEPTH } from "../../shared/types-runtime.ts";
|
|
16
17
|
|
|
17
18
|
const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"];
|
|
18
19
|
const TASK_ARG_LIMIT = 8000;
|
|
19
|
-
export const SUBAGENT_PARENT_MAX_DEPTH =
|
|
20
|
+
export const SUBAGENT_PARENT_MAX_DEPTH = MAX_SUBAGENT_NESTING_DEPTH;
|
|
20
21
|
export const PROMPT_RUNTIME_EXTENSION_PATH = path.join(path.dirname(fileURLToPath(import.meta.url)), "subagent-prompt-runtime.ts");
|
|
21
22
|
const ENV_PREFIX = APP_NAME.toUpperCase();
|
|
22
23
|
export const FANOUT_CHILD_EXTENSION_PATH = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "extension", "fanout-child.ts");
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type { ExtensionContext } from "@bastani/atomic";
|
|
6
6
|
import { APP_NAME, getEnvValue, WORKFLOW_STAGE_SUBAGENT_GUARD_ENV } from "@bastani/atomic";
|
|
7
|
-
import { DEFAULT_SUBAGENT_MAX_DEPTH } from "./types-runtime.ts";
|
|
7
|
+
import { DEFAULT_SUBAGENT_MAX_DEPTH, MAX_SUBAGENT_NESTING_DEPTH } from "./types-runtime.ts";
|
|
8
8
|
|
|
9
9
|
const ENV_PREFIX = APP_NAME.toUpperCase();
|
|
10
10
|
const SUBAGENT_MAX_DEPTH_ENV = `${ENV_PREFIX}_SUBAGENT_MAX_DEPTH`;
|
|
@@ -16,7 +16,7 @@ export { WORKFLOW_STAGE_SUBAGENT_GUARD_ENV };
|
|
|
16
16
|
export function normalizeMaxSubagentDepth(value: unknown): number | undefined {
|
|
17
17
|
const parsed = typeof value === "number" ? value : typeof value === "string" ? Number(value) : NaN;
|
|
18
18
|
if (!Number.isInteger(parsed) || parsed < 0) return undefined;
|
|
19
|
-
return parsed;
|
|
19
|
+
return Math.min(parsed, MAX_SUBAGENT_NESTING_DEPTH);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export function resolveCurrentMaxSubagentDepth(configMaxDepth?: number): number {
|
|
@@ -45,9 +45,9 @@ export function resolveWorkflowStageMaxSubagentDepth(
|
|
|
45
45
|
): number {
|
|
46
46
|
const maxDepth = resolveCurrentMaxSubagentDepth(configMaxDepth);
|
|
47
47
|
return isWorkflowStageOrchestrationContext(ctx)
|
|
48
|
-
// Workflow stages
|
|
49
|
-
//
|
|
50
|
-
// stages can delegate
|
|
48
|
+
// Workflow stages receive an explicit host constraint, clamped by the
|
|
49
|
+
// inherited/global nesting ceiling. A 0-depth workflow constraint still
|
|
50
|
+
// preserves one child-subagent hop so configured stages can delegate once.
|
|
51
51
|
? Math.min(maxDepth, Math.max(1, ctx.orchestrationContext?.constraints.maxSubagentDepth ?? 1))
|
|
52
52
|
: maxDepth;
|
|
53
53
|
}
|
|
@@ -93,7 +93,8 @@ export const SLASH_SUBAGENT_UPDATE_EVENT = "subagent:slash:update";
|
|
|
93
93
|
export const SLASH_SUBAGENT_CANCEL_EVENT = "subagent:slash:cancel";
|
|
94
94
|
export const POLL_INTERVAL_MS = 250;
|
|
95
95
|
export const MAX_WIDGET_JOBS = 4;
|
|
96
|
-
export const
|
|
96
|
+
export const MAX_SUBAGENT_NESTING_DEPTH = 5;
|
|
97
|
+
export const DEFAULT_SUBAGENT_MAX_DEPTH = MAX_SUBAGENT_NESTING_DEPTH;
|
|
97
98
|
export const SUBAGENT_ACTIONS = ["list", "get", "create", "update", "delete", "status", "interrupt", "resume", "doctor"] as const;
|
|
98
99
|
|
|
99
100
|
export const DEFAULT_FORK_PREAMBLE =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
|
-
import type
|
|
2
|
+
import { MAX_SUBAGENT_NESTING_DEPTH, type AsyncJobState, type AsyncJobStep, type NestedRunSummary, type NestedStepSummary } from "../shared/types.ts";
|
|
3
3
|
import { flatToLogicalStepIndex } from "../runs/background/parallel-groups.ts";
|
|
4
4
|
import { formatDuration, formatModelThinking, shortenPath } from "../shared/formatters.ts";
|
|
5
5
|
import { formatNestedAggregate } from "../runs/shared/nested-render.ts";
|
|
@@ -223,7 +223,7 @@ export function formatNestedWidgetLines(children: NestedRunSummary[] | undefined
|
|
|
223
223
|
return aggregate ? [theme.fg("dim", `↳ ${aggregate}`)] : [];
|
|
224
224
|
}
|
|
225
225
|
const lines: string[] = [];
|
|
226
|
-
const maxDepth =
|
|
226
|
+
const maxDepth = MAX_SUBAGENT_NESTING_DEPTH;
|
|
227
227
|
const append = (items: NestedRunSummary[] | undefined, depth: number, prefix: string): void => {
|
|
228
228
|
if (!items?.length || lines.length >= lineBudget) return;
|
|
229
229
|
if (depth > maxDepth) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/web-access",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3-alpha.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
|
|
6
6
|
"contributors": [
|
|
@@ -6,6 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.9.3-alpha.1] - 2026-06-25
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Revised the builtin `goal` worker/continuation prompts and the builtin `ralph` orchestrator prompts to emphasize implementing the requested task through full completion ("do not stop until the objective is complete") instead of preparing a partial implementation for incremental review.
|
|
14
|
+
- Removed model-visible current-iteration/turn/loop information from the builtin `goal`, `ralph`, and `open-claude-design` workflows so models are not biased by which iteration they are on. This drops the worker `Turn: N/M` banner, `Implement iteration N/M` / `Research iteration N/M` framing, "first iteration/worker turn" phrasing, and the live-preview `iteration N/M` label; switches model-relayed artifacts to stable non-ordinal names (`worker-receipt.md`, `review-<reviewer>.json`, `review-round-latest.json`, `orchestrator-report.md`); and strips turn fields from the model-facing goal ledger artifact. Internal UI stage names (e.g. `work-turn-2`, `orchestrator-2`) are unchanged, and the `max_turns`/`max_loops` inputs and `turns_completed`/`iterations_completed` outputs are retained.
|
|
15
|
+
- Raised workflow-stage subagent recursion to the shared five-level nesting budget so workflow stages match main-chat delegation depth.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Fixed the builtin `open-claude-design` continuation loop so generator stages fork only from prior generator sessions and user-feedback stages fork only from prior feedback sessions; the first feedback stage now starts its own chain instead of inheriting generator context.
|
|
20
|
+
- Fixed workflow config loading and user-global discovery to honor `ATOMIC_CODING_AGENT_DIR` isolation instead of reading `~/.atomic/agent` when an isolated agent dir is configured.
|
|
21
|
+
|
|
9
22
|
## [0.9.2] - 2026-06-23
|
|
10
23
|
|
|
11
24
|
### Changed
|
|
@@ -320,7 +320,7 @@ const decision = await ctx.stage("review-gate", { schema: Decision }).prompt(
|
|
|
320
320
|
|
|
321
321
|
Atomic registers the canonical `structured_output` tool only for schema-enabled items and automatically adds it to explicit `tools` allowlists. The schema is used directly as the tool argument contract. A schema-backed `StageContext` supports one `prompt()` call because the final-answer tool is a single result contract; create another `ctx.stage(..., { schema })` for another structured prompt. If a turn completes without calling `structured_output`, or the tool call fails schema validation, Atomic sends up to three corrective follow-up prompts that include the exact contract/validation error before failing the item. `ctx.task`/`ctx.chain`/`ctx.parallel` results expose the captured value as `result.structured` and keep `result.text` as formatted JSON for handoffs.
|
|
322
322
|
|
|
323
|
-
`subagent` is available as a default workflow-stage tool with the same
|
|
323
|
+
`subagent` is available as a default workflow-stage tool with the same five-level nesting budget as main chat: a stage can launch recursively delegated subagents until the shared depth guard reaches five delegated levels, then deeper calls are blocked. `tools` allowlists apply to bundled extension tools as well as built-ins; if a stage sets `tools`, list every tool it should see. Workflow stages can explicitly list `subagent`, `web_search`, `fetch_content`, `intercom`, and other loaded extension tools, while `excludedTools` and `noTools: "all"` still win. Bundled `@bastani/subagents` agent definitions are available to the `subagent` tool in workflow stages, including workflows launched from a subagent child process.
|
|
324
324
|
|
|
325
325
|
### Model fallbacks
|
|
326
326
|
|
|
@@ -697,7 +697,7 @@ Child workflow outputs: `result`, `plan` (latest transformed research question),
|
|
|
697
697
|
|
|
698
698
|
### `open-claude-design`
|
|
699
699
|
|
|
700
|
-
Combined discovery/init → design-system/reference research → curated reference discovery with user preference check → forked generate
|
|
700
|
+
Combined discovery/init → design-system/reference research → curated reference discovery with user preference check → separate forked generate and user-feedback chains → export/handoff pipeline. The `discovery` stage asks for output type and references, then runs impeccable init in the same stage so PRODUCT.md/DESIGN.md are detected, created, or reconciled. `ds-*` stages handle user-provided URL/file reference extraction directly, then `reference-discovery` uses that context and asks which curated direction you prefer (or asks for a reference image/path/URL if none fit). Export is only `exporter` plus `final-display`.
|
|
701
701
|
|
|
702
702
|
```text
|
|
703
703
|
/workflow open-claude-design prompt="Design a kanban board component"
|
|
@@ -10,20 +10,25 @@ export function artifactSafeName(value: string): string {
|
|
|
10
10
|
return safe.length > 0 ? safe : "artifact";
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
function withoutTurn<T extends { readonly turn: number }>(value: T): Omit<T, "turn"> {
|
|
14
|
+
const copy = { ...value } as Omit<T, "turn"> & { turn?: number };
|
|
15
|
+
delete copy.turn;
|
|
16
|
+
return copy;
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
export async function writeReviewArtifact(
|
|
14
20
|
artifactDir: string,
|
|
15
|
-
turn: number,
|
|
16
21
|
reviewer: string,
|
|
17
22
|
decision: ReviewDecision,
|
|
18
23
|
rawText: string,
|
|
19
24
|
): Promise<string> {
|
|
20
25
|
const artifactPath = join(
|
|
21
26
|
artifactDir,
|
|
22
|
-
`review
|
|
27
|
+
`review-${artifactSafeName(reviewer)}.json`,
|
|
23
28
|
);
|
|
24
29
|
await writeFile(
|
|
25
30
|
artifactPath,
|
|
26
|
-
`${JSON.stringify({
|
|
31
|
+
`${JSON.stringify({ reviewer, decision, raw_text: rawText }, null, 2)}\n`,
|
|
27
32
|
{ encoding: "utf8" },
|
|
28
33
|
);
|
|
29
34
|
return artifactPath;
|
|
@@ -31,11 +36,11 @@ export async function writeReviewArtifact(
|
|
|
31
36
|
|
|
32
37
|
export async function writeReviewRoundArtifact(
|
|
33
38
|
artifactDir: string,
|
|
34
|
-
turn: number,
|
|
35
39
|
reviews: readonly ReviewRecord[],
|
|
36
40
|
): Promise<string> {
|
|
37
|
-
const artifactPath = join(artifactDir,
|
|
38
|
-
|
|
41
|
+
const artifactPath = join(artifactDir, "review-round-latest.json");
|
|
42
|
+
const visibleReviews = reviews.map(withoutTurn);
|
|
43
|
+
await writeFile(artifactPath, `${JSON.stringify({ reviews: visibleReviews }, null, 2)}\n`, {
|
|
39
44
|
encoding: "utf8",
|
|
40
45
|
});
|
|
41
46
|
return artifactPath;
|
|
@@ -4,6 +4,38 @@ import { tmpdir } from "node:os";
|
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { LEDGER_FILENAME, type GoalLedger, type GoalLifecycleEvent } from "./goal-types.js";
|
|
6
6
|
|
|
7
|
+
type ModelVisibleGoalLedger = Omit<
|
|
8
|
+
GoalLedger,
|
|
9
|
+
"turns" | "receipts" | "reviews" | "blockers" | "decisions" | "lifecycle"
|
|
10
|
+
> & {
|
|
11
|
+
readonly receipts: ReadonlyArray<Omit<GoalLedger["receipts"][number], "turn">>;
|
|
12
|
+
readonly reviews: ReadonlyArray<Omit<GoalLedger["reviews"][number], "turn">>;
|
|
13
|
+
readonly blockers: ReadonlyArray<Omit<GoalLedger["blockers"][number], "turn">>;
|
|
14
|
+
readonly decisions: ReadonlyArray<Omit<GoalLedger["decisions"][number], "turn">>;
|
|
15
|
+
readonly lifecycle: ReadonlyArray<Omit<GoalLedger["lifecycle"][number], "turn">>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function withoutTurn<T extends { readonly turn: number }>(value: T): Omit<T, "turn"> {
|
|
19
|
+
const copy = { ...value } as Omit<T, "turn"> & { turn?: number };
|
|
20
|
+
delete copy.turn;
|
|
21
|
+
return copy;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function modelVisibleLedger(ledger: GoalLedger): ModelVisibleGoalLedger {
|
|
25
|
+
return {
|
|
26
|
+
goal_id: ledger.goal_id,
|
|
27
|
+
objective: ledger.objective,
|
|
28
|
+
status: ledger.status,
|
|
29
|
+
created_at: ledger.created_at,
|
|
30
|
+
updated_at: ledger.updated_at,
|
|
31
|
+
receipts: ledger.receipts.map(withoutTurn),
|
|
32
|
+
reviews: ledger.reviews.map(withoutTurn),
|
|
33
|
+
blockers: ledger.blockers.map(withoutTurn),
|
|
34
|
+
decisions: ledger.decisions.map(withoutTurn),
|
|
35
|
+
lifecycle: ledger.lifecycle.map(withoutTurn),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
7
39
|
export function appendLifecycleEvent(
|
|
8
40
|
ledger: GoalLedger,
|
|
9
41
|
event: GoalLifecycleEvent["event"],
|
|
@@ -48,7 +80,7 @@ export async function writeGoalLedger(
|
|
|
48
80
|
ledger: GoalLedger,
|
|
49
81
|
): Promise<void> {
|
|
50
82
|
ledger.updated_at = new Date().toISOString();
|
|
51
|
-
await writeFile(ledgerPath, `${JSON.stringify(ledger, null, 2)}\n`, {
|
|
83
|
+
await writeFile(ledgerPath, `${JSON.stringify(modelVisibleLedger(ledger), null, 2)}\n`, {
|
|
52
84
|
encoding: "utf8",
|
|
53
85
|
});
|
|
54
86
|
}
|