@bastani/atomic 0.8.25 → 0.8.26-alpha.10
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 +84 -0
- package/README.md +5 -5
- package/dist/builtin/intercom/CHANGELOG.md +60 -0
- package/dist/builtin/intercom/index-heavy.ts +1754 -0
- package/dist/builtin/intercom/index.ts +374 -1746
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/result-renderers.ts +77 -0
- package/dist/builtin/mcp/CHANGELOG.md +64 -0
- package/dist/builtin/mcp/index.ts +151 -57
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +61 -0
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +9 -9
- package/dist/builtin/subagents/agents/debugger.md +6 -6
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +1 -1
- package/dist/builtin/subagents/skills/browser/EXAMPLES.md +151 -0
- package/dist/builtin/subagents/skills/browser/LICENSE.txt +21 -0
- package/dist/builtin/subagents/skills/browser/REFERENCE.md +451 -0
- package/dist/builtin/subagents/skills/browser/SKILL.md +170 -0
- package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
- package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +55 -12
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +71 -12
- package/dist/builtin/subagents/src/runs/shared/acceptance.ts +2 -1
- package/dist/builtin/subagents/src/runs/shared/final-drain.ts +34 -0
- package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +416 -7
- package/dist/builtin/subagents/src/runs/shared/worktree.ts +2 -2
- package/dist/builtin/web-access/CHANGELOG.md +60 -0
- package/dist/builtin/web-access/index-heavy.ts +2060 -0
- package/dist/builtin/web-access/index.ts +182 -2274
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/web-access/result-renderers.ts +364 -0
- package/dist/builtin/workflows/CHANGELOG.md +75 -0
- package/dist/builtin/workflows/README.md +10 -8
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +11 -8
- package/dist/builtin/workflows/builtin/goal.ts +137 -109
- package/dist/builtin/workflows/builtin/index.d.ts +2 -0
- package/dist/builtin/workflows/builtin/open-claude-design.ts +228 -151
- package/dist/builtin/workflows/builtin/ralph.d.ts +2 -0
- package/dist/builtin/workflows/builtin/ralph.ts +452 -279
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/create-spec/SKILL.md +14 -0
- package/dist/builtin/workflows/skills/research-codebase/SKILL.md +29 -10
- package/dist/builtin/workflows/src/extension/index.ts +23 -5
- package/dist/builtin/workflows/src/extension/runtime.ts +35 -3
- package/dist/builtin/workflows/src/extension/wiring.ts +13 -1
- package/dist/builtin/workflows/src/runs/background/status.ts +52 -6
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +453 -21
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +130 -13
- package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +402 -8
- package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -2
- package/dist/builtin/workflows/src/shared/authoring-contract.d.ts +2 -2
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +182 -6
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +76 -6
- package/dist/builtin/workflows/src/shared/stage-prompt.ts +33 -2
- package/dist/builtin/workflows/src/shared/store-types.ts +31 -0
- package/dist/builtin/workflows/src/shared/store.ts +160 -18
- package/dist/builtin/workflows/src/shared/types.ts +3 -3
- package/dist/builtin/workflows/src/shared/workflow-failures.ts +758 -132
- package/dist/builtin/workflows/src/tui/inline-form-overlay.ts +12 -3
- package/dist/builtin/workflows/src/tui/inline-form-store.ts +17 -6
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +39 -3
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +74 -74
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +13 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +33 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +157 -182
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.js +11 -9
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +23 -10
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction.d.ts +175 -0
- package/dist/core/compaction/context-compaction.d.ts.map +1 -0
- package/dist/core/compaction/context-compaction.js +1636 -0
- package/dist/core/compaction/context-compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +1 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +7 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +16 -3
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +3 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +14 -7
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +17 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-manager.d.ts +41 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +146 -7
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/timings.d.ts +9 -0
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +28 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts +5 -5
- package/dist/core/tools/ask-user-question/tool/format-answer.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/format-answer.js +5 -5
- package/dist/core/tools/ask-user-question/tool/format-answer.js.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts +16 -3
- package/dist/core/tools/ask-user-question/tool/response-envelope.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/tool/response-envelope.js +21 -3
- package/dist/core/tools/ask-user-question/tool/response-envelope.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +4 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +17 -0
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/context-compaction-summary-message.d.ts +17 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.js +83 -0
- package/dist/modes/interactive/components/context-compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +36 -4
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +4 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +94 -17
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +13 -8
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +8 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +14 -3
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/utils/git-env.d.ts +10 -0
- package/dist/utils/git-env.d.ts.map +1 -0
- package/dist/utils/git-env.js +33 -0
- package/dist/utils/git-env.js.map +1 -0
- package/docs/compaction.md +185 -50
- package/docs/custom-provider.md +11 -9
- package/docs/extensions.md +46 -42
- package/docs/index.md +13 -6
- package/docs/json.md +15 -12
- package/docs/packages.md +2 -0
- package/docs/providers.md +4 -1
- package/docs/quickstart.md +18 -11
- package/docs/rpc.md +38 -23
- package/docs/sdk.md +17 -8
- package/docs/session-format.md +26 -13
- package/docs/sessions.md +3 -3
- package/docs/settings.md +2 -2
- package/docs/skills.md +1 -15
- package/docs/termux.md +9 -10
- package/docs/themes.md +2 -2
- package/docs/tmux.md +3 -3
- package/docs/tui.md +19 -32
- package/docs/usage.md +2 -2
- package/docs/workflows.md +60 -16
- package/package.json +6 -12
- package/dist/builtin/subagents/skills/browser-use/SKILL.md +0 -234
- package/dist/builtin/subagents/skills/browser-use/references/cdp-python.md +0 -76
- package/dist/builtin/subagents/skills/browser-use/references/multi-session.md +0 -92
- package/node_modules/@earendil-works/pi-tui/README.md +0 -779
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +0 -54
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -632
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -104
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +0 -35
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +0 -249
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +0 -1857
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +0 -37
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +0 -378
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -31
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +0 -69
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -644
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +0 -159
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +0 -185
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +0 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +0 -19
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +0 -13
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -51
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +0 -39
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js +0 -2
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +0 -16
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +0 -110
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -32
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +0 -193
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +0 -174
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +0 -184
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js +0 -1173
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +0 -44
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +0 -53
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +0 -361
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -90
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +0 -366
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +0 -113
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -472
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +0 -227
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +0 -1106
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +0 -17
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -84
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -1029
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/package.json +0 -47
- package/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/node_modules/get-east-asian-width/index.js +0 -30
- package/node_modules/get-east-asian-width/license +0 -9
- package/node_modules/get-east-asian-width/lookup-data.js +0 -21
- package/node_modules/get-east-asian-width/lookup.js +0 -138
- package/node_modules/get-east-asian-width/package.json +0 -71
- package/node_modules/get-east-asian-width/readme.md +0 -65
- package/node_modules/get-east-asian-width/utilities.js +0 -24
- package/node_modules/marked/LICENSE.md +0 -44
- package/node_modules/marked/README.md +0 -106
- package/node_modules/marked/bin/main.js +0 -282
- package/node_modules/marked/bin/marked.js +0 -15
- package/node_modules/marked/lib/marked.cjs +0 -2211
- package/node_modules/marked/lib/marked.cjs.map +0 -7
- package/node_modules/marked/lib/marked.d.cts +0 -728
- package/node_modules/marked/lib/marked.d.ts +0 -728
- package/node_modules/marked/lib/marked.esm.js +0 -2189
- package/node_modules/marked/lib/marked.esm.js.map +0 -7
- package/node_modules/marked/lib/marked.umd.js +0 -2213
- package/node_modules/marked/lib/marked.umd.js.map +0 -7
- package/node_modules/marked/man/marked.1 +0 -111
- package/node_modules/marked/man/marked.1.md +0 -92
- package/node_modules/marked/marked.min.js +0 -69
- package/node_modules/marked/package.json +0 -111
|
@@ -16,6 +16,9 @@ import type {
|
|
|
16
16
|
RunStatus,
|
|
17
17
|
StageStatus,
|
|
18
18
|
WorkflowFailureKind,
|
|
19
|
+
WorkflowFailureCode,
|
|
20
|
+
WorkflowFailureRecoverability,
|
|
21
|
+
WorkflowFailureDisposition,
|
|
19
22
|
WorkflowNotice,
|
|
20
23
|
WorkflowChildRunRef,
|
|
21
24
|
} from "./store-types.js";
|
|
@@ -43,9 +46,55 @@ function cannotPause(status: StageStatus): boolean {
|
|
|
43
46
|
|
|
44
47
|
export interface RunEndMetadata {
|
|
45
48
|
readonly failureKind?: WorkflowFailureKind;
|
|
49
|
+
readonly failureCode?: WorkflowFailureCode;
|
|
50
|
+
readonly failureRecoverability?: WorkflowFailureRecoverability;
|
|
51
|
+
readonly failureDisposition?: WorkflowFailureDisposition;
|
|
46
52
|
readonly failureMessage?: string;
|
|
47
53
|
readonly failedStageId?: string;
|
|
48
54
|
readonly resumable?: boolean;
|
|
55
|
+
readonly retryAfterMs?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface RunBlockedMetadata extends RunEndMetadata {
|
|
59
|
+
readonly failureRecoverability: "recoverable";
|
|
60
|
+
readonly failedStageId: string;
|
|
61
|
+
readonly resumable: true;
|
|
62
|
+
readonly blockedAt?: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function clearRunFailureMetadata(run: RunSnapshot): void {
|
|
66
|
+
delete run.error;
|
|
67
|
+
delete run.failureKind;
|
|
68
|
+
delete run.failureCode;
|
|
69
|
+
delete run.failureRecoverability;
|
|
70
|
+
delete run.failureDisposition;
|
|
71
|
+
delete run.failureMessage;
|
|
72
|
+
delete run.failedStageId;
|
|
73
|
+
delete run.resumable;
|
|
74
|
+
delete run.retryAfterMs;
|
|
75
|
+
delete run.blockedAt;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function clearStaleBlockedRunMetadata(run: RunSnapshot, metadata: RunEndMetadata | undefined): void {
|
|
79
|
+
if (metadata?.failureKind === undefined) delete run.failureKind;
|
|
80
|
+
if (metadata?.failureCode === undefined) delete run.failureCode;
|
|
81
|
+
if (metadata?.failureRecoverability === undefined) delete run.failureRecoverability;
|
|
82
|
+
if (metadata?.failureDisposition === undefined) delete run.failureDisposition;
|
|
83
|
+
if (metadata?.failureMessage === undefined) delete run.failureMessage;
|
|
84
|
+
if (metadata?.failedStageId === undefined) delete run.failedStageId;
|
|
85
|
+
if (metadata?.resumable === undefined) delete run.resumable;
|
|
86
|
+
if (metadata?.retryAfterMs === undefined) delete run.retryAfterMs;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function applyRunEndMetadata(run: RunSnapshot, metadata: RunEndMetadata): void {
|
|
90
|
+
if (metadata.failureKind !== undefined) run.failureKind = metadata.failureKind;
|
|
91
|
+
if (metadata.failureCode !== undefined) run.failureCode = metadata.failureCode;
|
|
92
|
+
if (metadata.failureRecoverability !== undefined) run.failureRecoverability = metadata.failureRecoverability;
|
|
93
|
+
if (metadata.failureDisposition !== undefined) run.failureDisposition = metadata.failureDisposition;
|
|
94
|
+
if (metadata.retryAfterMs !== undefined) run.retryAfterMs = metadata.retryAfterMs;
|
|
95
|
+
if (metadata.failureMessage !== undefined) run.failureMessage = metadata.failureMessage;
|
|
96
|
+
if (metadata.failedStageId !== undefined) run.failedStageId = metadata.failedStageId;
|
|
97
|
+
if (metadata.resumable !== undefined) run.resumable = metadata.resumable;
|
|
49
98
|
}
|
|
50
99
|
|
|
51
100
|
export type StagePromptAnswerSource = "workflow_ui" | "workflow_tool";
|
|
@@ -95,6 +144,12 @@ export interface Store {
|
|
|
95
144
|
error?: string,
|
|
96
145
|
metadata?: RunEndMetadata,
|
|
97
146
|
): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Record an active, recoverable workflow failure without ending the run.
|
|
149
|
+
* The run remains resumable/running and carries failure metadata for status,
|
|
150
|
+
* persistence restore, and continuation decisions.
|
|
151
|
+
*/
|
|
152
|
+
recordRunBlocked(runId: string, error: string, metadata: RunBlockedMetadata): boolean;
|
|
98
153
|
/**
|
|
99
154
|
* Remove a run from live workflow history/status. Any pending HIL prompt
|
|
100
155
|
* waiter is rejected because the workflow will not resume through that path.
|
|
@@ -151,6 +206,16 @@ export interface Store {
|
|
|
151
206
|
): boolean;
|
|
152
207
|
/** Wait for a stage/node-scoped HIL prompt to resolve. */
|
|
153
208
|
awaitStagePendingPrompt(runId: string, stageId: string, promptId: string): Promise<unknown>;
|
|
209
|
+
/**
|
|
210
|
+
* Record a live-only draft for an active stage-local input/editor prompt.
|
|
211
|
+
* Draft text may contain secrets and must never be copied into snapshots,
|
|
212
|
+
* status output, logs, notifications, or persisted metadata.
|
|
213
|
+
*/
|
|
214
|
+
recordStagePromptDraft(runId: string, stageId: string, promptId: string, text: string): boolean;
|
|
215
|
+
/** Return a live-only draft for an active stage-local input/editor prompt, if present. */
|
|
216
|
+
getStagePromptDraft(runId: string, stageId: string, promptId: string): string | undefined;
|
|
217
|
+
/** Clear a live-only draft for a stage-local prompt. */
|
|
218
|
+
clearStagePromptDraft(runId: string, stageId: string, promptId: string): boolean;
|
|
154
219
|
/**
|
|
155
220
|
* Return the live-only prompt answer record for a completed prompt stage, if
|
|
156
221
|
* still available. The returned value may contain secrets and must never be
|
|
@@ -239,6 +304,7 @@ export function createStore(): Store {
|
|
|
239
304
|
const _notices: WorkflowNotice[] = [];
|
|
240
305
|
const _listeners: Set<(snap: StoreSnapshot) => void> = new Set();
|
|
241
306
|
const _stagePromptAnswers = new Map<string, PromptAnswerRecord>();
|
|
307
|
+
const _stagePromptDrafts = new Map<string, string>();
|
|
242
308
|
let _version = 0;
|
|
243
309
|
|
|
244
310
|
/**
|
|
@@ -285,16 +351,36 @@ export function createStore(): Store {
|
|
|
285
351
|
return JSON.stringify([runId, stageId]);
|
|
286
352
|
}
|
|
287
353
|
|
|
288
|
-
function
|
|
354
|
+
function stagePromptDraftKey(runId: string, stageId: string, promptId: string): string {
|
|
355
|
+
return JSON.stringify([runId, stageId, promptId]);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function stageHasActiveTextPrompt(
|
|
359
|
+
runId: string,
|
|
360
|
+
stageId: string,
|
|
361
|
+
promptId: string,
|
|
362
|
+
): { prompt: PendingPrompt } | undefined {
|
|
363
|
+
const run = findRun(runId);
|
|
364
|
+
if (!run || TERMINAL_STATUSES.has(run.status)) return undefined;
|
|
365
|
+
const stage = findStage(run, stageId);
|
|
366
|
+
if (!stage || isTerminalStageStatus(stage.status)) return undefined;
|
|
367
|
+
const prompt = stage.pendingPrompt;
|
|
368
|
+
if (!prompt || prompt.id !== promptId) return undefined;
|
|
369
|
+
if (prompt.kind !== "input" && prompt.kind !== "editor") return undefined;
|
|
370
|
+
return { prompt };
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function rejectStagePrompt(runId: string, stage: StageSnapshot, reason: string): void {
|
|
289
374
|
const prompt = stage.pendingPrompt;
|
|
290
375
|
if (!prompt) return;
|
|
291
376
|
stage.pendingPrompt = undefined;
|
|
377
|
+
_stagePromptDrafts.delete(stagePromptDraftKey(runId, stage.id, prompt.id));
|
|
292
378
|
rejectPrompt(prompt.id, reason);
|
|
293
379
|
}
|
|
294
380
|
|
|
295
|
-
function rejectAllStagePrompts(run: RunSnapshot, reason: string): void {
|
|
381
|
+
function rejectAllStagePrompts(runId: string, run: RunSnapshot, reason: string): void {
|
|
296
382
|
for (const stage of run.stages) {
|
|
297
|
-
rejectStagePrompt(stage, reason);
|
|
383
|
+
rejectStagePrompt(runId, stage, reason);
|
|
298
384
|
}
|
|
299
385
|
}
|
|
300
386
|
|
|
@@ -417,6 +503,10 @@ export function createStore(): Store {
|
|
|
417
503
|
existing.result = stage.result;
|
|
418
504
|
existing.error = stage.error;
|
|
419
505
|
existing.failureKind = stage.failureKind;
|
|
506
|
+
existing.failureCode = stage.failureCode;
|
|
507
|
+
existing.failureRecoverability = stage.failureRecoverability;
|
|
508
|
+
existing.failureDisposition = stage.failureDisposition;
|
|
509
|
+
existing.retryAfterMs = stage.retryAfterMs;
|
|
420
510
|
existing.failureMessage = stage.failureMessage;
|
|
421
511
|
existing.skippedReason = stage.skippedReason;
|
|
422
512
|
if (stage.replayKey !== undefined) existing.replayKey = stage.replayKey;
|
|
@@ -427,7 +517,7 @@ export function createStore(): Store {
|
|
|
427
517
|
if (stage.workflowChild !== undefined) existing.workflowChild = structuredClone(stage.workflowChild);
|
|
428
518
|
delete existing.awaitingInputSince;
|
|
429
519
|
delete existing.inputRequest;
|
|
430
|
-
rejectStagePrompt(existing, `atomic-workflows: stage ${stage.id} ended before prompt resolved`);
|
|
520
|
+
rejectStagePrompt(runId, existing, `atomic-workflows: stage ${stage.id} ended before prompt resolved`);
|
|
431
521
|
_version++;
|
|
432
522
|
notify();
|
|
433
523
|
},
|
|
@@ -454,17 +544,26 @@ export function createStore(): Store {
|
|
|
454
544
|
run.pausedAt = undefined;
|
|
455
545
|
}
|
|
456
546
|
run.durationMs = elapsedRunMs(run, run.endedAt);
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
if (
|
|
466
|
-
if (
|
|
467
|
-
|
|
547
|
+
const wasBlocked = run.blockedAt !== undefined || run.failureDisposition === "active_blocked";
|
|
548
|
+
delete run.blockedAt;
|
|
549
|
+
if (status === "completed") {
|
|
550
|
+
if (result !== undefined) {
|
|
551
|
+
run.result = result;
|
|
552
|
+
}
|
|
553
|
+
clearRunFailureMetadata(run);
|
|
554
|
+
} else {
|
|
555
|
+
if (wasBlocked && error === undefined) delete run.error;
|
|
556
|
+
if ((status === "failed" || status === "killed") && error !== undefined) {
|
|
557
|
+
run.error = error;
|
|
558
|
+
}
|
|
559
|
+
if (wasBlocked) clearStaleBlockedRunMetadata(run, metadata);
|
|
560
|
+
if (metadata !== undefined) applyRunEndMetadata(run, metadata);
|
|
561
|
+
if (run.failureDisposition === "active_blocked") delete run.failureDisposition;
|
|
562
|
+
if (status === "killed") {
|
|
563
|
+
run.failureRecoverability = "non_recoverable";
|
|
564
|
+
run.failureDisposition = "terminal_killed";
|
|
565
|
+
run.resumable = false;
|
|
566
|
+
}
|
|
468
567
|
}
|
|
469
568
|
// Abandon any waiting HIL prompt — workflow body never resumed past
|
|
470
569
|
// it, but the awaiter promise must reject so the executor's catch
|
|
@@ -474,7 +573,27 @@ export function createStore(): Store {
|
|
|
474
573
|
run.pendingPrompt = undefined;
|
|
475
574
|
rejectPrompt(pending.id, `atomic-workflows: run ${runId} ended before prompt resolved`);
|
|
476
575
|
}
|
|
477
|
-
rejectAllStagePrompts(run, `atomic-workflows: run ${runId} ended before prompt resolved`);
|
|
576
|
+
rejectAllStagePrompts(runId, run, `atomic-workflows: run ${runId} ended before prompt resolved`);
|
|
577
|
+
_version++;
|
|
578
|
+
notify();
|
|
579
|
+
return true;
|
|
580
|
+
},
|
|
581
|
+
|
|
582
|
+
recordRunBlocked(runId: string, error: string, metadata: RunBlockedMetadata): boolean {
|
|
583
|
+
const run = findRun(runId);
|
|
584
|
+
if (!run) return false;
|
|
585
|
+
if (TERMINAL_STATUSES.has(run.status)) return false;
|
|
586
|
+
run.status = "running";
|
|
587
|
+
run.error = error;
|
|
588
|
+
run.failureKind = metadata.failureKind;
|
|
589
|
+
run.failureCode = metadata.failureCode;
|
|
590
|
+
run.failureRecoverability = metadata.failureRecoverability;
|
|
591
|
+
run.failureDisposition = metadata.failureDisposition;
|
|
592
|
+
run.failureMessage = metadata.failureMessage;
|
|
593
|
+
run.failedStageId = metadata.failedStageId;
|
|
594
|
+
run.resumable = metadata.resumable;
|
|
595
|
+
run.blockedAt = metadata.blockedAt ?? Date.now();
|
|
596
|
+
if (metadata.retryAfterMs !== undefined) run.retryAfterMs = metadata.retryAfterMs;
|
|
478
597
|
_version++;
|
|
479
598
|
notify();
|
|
480
599
|
return true;
|
|
@@ -488,7 +607,7 @@ export function createStore(): Store {
|
|
|
488
607
|
if (pending) {
|
|
489
608
|
rejectPrompt(pending.id, `atomic-workflows: run ${runId} was removed before prompt resolved`);
|
|
490
609
|
}
|
|
491
|
-
rejectAllStagePrompts(run, `atomic-workflows: run ${runId} was removed before prompt resolved`);
|
|
610
|
+
rejectAllStagePrompts(runId, run, `atomic-workflows: run ${runId} was removed before prompt resolved`);
|
|
492
611
|
for (const stage of run.stages) {
|
|
493
612
|
_stagePromptAnswers.delete(stagePromptAnswerKey(runId, stage.id));
|
|
494
613
|
}
|
|
@@ -599,6 +718,7 @@ export function createStore(): Store {
|
|
|
599
718
|
if (!stage) return false;
|
|
600
719
|
const pending = stage.pendingPrompt;
|
|
601
720
|
if (!pending || pending.id !== promptId) return false;
|
|
721
|
+
_stagePromptDrafts.delete(stagePromptDraftKey(runId, stageId, promptId));
|
|
602
722
|
if (options.recordAnswer !== false) {
|
|
603
723
|
_stagePromptAnswers.set(stagePromptAnswerKey(runId, stageId), {
|
|
604
724
|
runId,
|
|
@@ -654,6 +774,21 @@ export function createStore(): Store {
|
|
|
654
774
|
});
|
|
655
775
|
},
|
|
656
776
|
|
|
777
|
+
recordStagePromptDraft(runId: string, stageId: string, promptId: string, text: string): boolean {
|
|
778
|
+
if (stageHasActiveTextPrompt(runId, stageId, promptId) === undefined) return false;
|
|
779
|
+
_stagePromptDrafts.set(stagePromptDraftKey(runId, stageId, promptId), text);
|
|
780
|
+
return true;
|
|
781
|
+
},
|
|
782
|
+
|
|
783
|
+
getStagePromptDraft(runId: string, stageId: string, promptId: string): string | undefined {
|
|
784
|
+
if (stageHasActiveTextPrompt(runId, stageId, promptId) === undefined) return undefined;
|
|
785
|
+
return _stagePromptDrafts.get(stagePromptDraftKey(runId, stageId, promptId));
|
|
786
|
+
},
|
|
787
|
+
|
|
788
|
+
clearStagePromptDraft(runId: string, stageId: string, promptId: string): boolean {
|
|
789
|
+
return _stagePromptDrafts.delete(stagePromptDraftKey(runId, stageId, promptId));
|
|
790
|
+
},
|
|
791
|
+
|
|
657
792
|
getStagePromptAnswer(runId: string, stageId: string): PromptAnswerRecord | undefined {
|
|
658
793
|
return _stagePromptAnswers.get(stagePromptAnswerKey(runId, stageId));
|
|
659
794
|
},
|
|
@@ -896,7 +1031,13 @@ export function createStore(): Store {
|
|
|
896
1031
|
},
|
|
897
1032
|
|
|
898
1033
|
clear(): void {
|
|
899
|
-
if (
|
|
1034
|
+
if (
|
|
1035
|
+
_runs.length === 0 &&
|
|
1036
|
+
_notices.length === 0 &&
|
|
1037
|
+
_resolvers.size === 0 &&
|
|
1038
|
+
_stagePromptAnswers.size === 0 &&
|
|
1039
|
+
_stagePromptDrafts.size === 0
|
|
1040
|
+
) return;
|
|
900
1041
|
_runs.length = 0;
|
|
901
1042
|
_notices.length = 0;
|
|
902
1043
|
// Reject any outstanding HIL waiters so background promises terminate
|
|
@@ -907,6 +1048,7 @@ export function createStore(): Store {
|
|
|
907
1048
|
}
|
|
908
1049
|
_resolvers.clear();
|
|
909
1050
|
_stagePromptAnswers.clear();
|
|
1051
|
+
_stagePromptDrafts.clear();
|
|
910
1052
|
_version++;
|
|
911
1053
|
notify();
|
|
912
1054
|
},
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type {
|
|
7
7
|
AgentSession,
|
|
8
8
|
AgentSessionEvent,
|
|
9
|
-
|
|
9
|
+
ContextCompactionResult,
|
|
10
10
|
CreateAgentSessionOptions,
|
|
11
11
|
ModelCycleResult,
|
|
12
12
|
PromptOptions,
|
|
@@ -19,7 +19,7 @@ import type * as AuthoringContract from "./authoring-contract.js";
|
|
|
19
19
|
|
|
20
20
|
export type { TSchema };
|
|
21
21
|
|
|
22
|
-
export type { AgentSessionEvent,
|
|
22
|
+
export type { AgentSessionEvent, ContextCompactionResult, ModelCycleResult, PromptOptions };
|
|
23
23
|
|
|
24
24
|
export type WorkflowModelValue = NonNullable<CreateAgentSessionOptions["model"]> | string;
|
|
25
25
|
export type WorkflowModelUsage = AuthoringContract.WorkflowModelUsage;
|
|
@@ -308,7 +308,7 @@ export interface StageContext {
|
|
|
308
308
|
): Promise<{ editorText?: string; cancelled: boolean }>;
|
|
309
309
|
|
|
310
310
|
/** Compaction. */
|
|
311
|
-
compact(
|
|
311
|
+
compact(): Promise<ContextCompactionResult>;
|
|
312
312
|
abortCompaction(): void;
|
|
313
313
|
|
|
314
314
|
/** Abort current operation. */
|