@bastani/atomic 0.9.9 → 0.9.10-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 +66 -0
- package/README.md +2 -0
- package/dist/builtin/cursor/CHANGELOG.md +6 -0
- package/dist/builtin/cursor/package.json +3 -3
- package/dist/builtin/intercom/CHANGELOG.md +15 -0
- package/dist/builtin/intercom/README.md +12 -4
- package/dist/builtin/intercom/broker/broker.ts +96 -14
- package/dist/builtin/intercom/broker/client-message-validation.ts +39 -0
- package/dist/builtin/intercom/broker/client.ts +101 -92
- package/dist/builtin/intercom/broker/group-isolation.ts +28 -0
- package/dist/builtin/intercom/broker/send-handler.ts +62 -10
- package/dist/builtin/intercom/broker/send-signature.ts +3 -0
- package/dist/builtin/intercom/broker/supervisor-channel.ts +126 -0
- package/dist/builtin/intercom/closed-workflow-stage-message.ts +66 -0
- package/dist/builtin/intercom/config.ts +10 -0
- package/dist/builtin/intercom/contact-supervisor-tool.ts +14 -10
- package/dist/builtin/intercom/foreground-detach-handoff.ts +12 -2
- package/dist/builtin/intercom/group.ts +46 -0
- package/dist/builtin/intercom/inbound-message-admission.ts +79 -0
- package/dist/builtin/intercom/incoming-message-delivery.ts +49 -0
- package/dist/builtin/intercom/index-heavy.ts +148 -94
- package/dist/builtin/intercom/index.ts +66 -4
- package/dist/builtin/intercom/intercom-test-seams.ts +6 -0
- package/dist/builtin/intercom/intercom-tool.ts +71 -20
- package/dist/builtin/intercom/intercom-utils.ts +15 -2
- package/dist/builtin/intercom/late-stage-message-router.ts +148 -0
- package/dist/builtin/intercom/lifecycle.ts +10 -4
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/reconnect-backoff.ts +6 -0
- package/dist/builtin/intercom/reply-tracker.ts +8 -0
- package/dist/builtin/intercom/skills/intercom/SKILL.md +2 -0
- package/dist/builtin/intercom/stable-delivery-retry.ts +32 -0
- package/dist/builtin/intercom/subagent-relay.ts +67 -14
- package/dist/builtin/intercom/supervisor-authorization-registry.ts +22 -0
- package/dist/builtin/intercom/terminal-ordering-barrier.ts +144 -25
- package/dist/builtin/intercom/types.ts +18 -5
- package/dist/builtin/intercom/workflow-reply-tracker.ts +19 -0
- package/dist/builtin/intercom/workflow-stage-admission.ts +43 -0
- package/dist/builtin/intercom/workflow-stage-delivery-failure.ts +77 -0
- package/dist/builtin/mcp/CHANGELOG.md +11 -0
- package/dist/builtin/mcp/README.md +6 -2
- package/dist/builtin/mcp/config.ts +8 -8
- package/dist/builtin/mcp/direct-tool-executor.ts +7 -6
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/mcp/proxy-call.ts +5 -4
- package/dist/builtin/mcp/sampling-handler.ts +7 -2
- package/dist/builtin/mcp/tool-call-timeout.ts +101 -0
- package/dist/builtin/mcp/tool-result-renderer.ts +3 -2
- package/dist/builtin/mcp/types.ts +5 -0
- package/dist/builtin/mcp/ui-server.ts +3 -2
- package/dist/builtin/subagents/CHANGELOG.md +21 -0
- package/dist/builtin/subagents/README.md +6 -3
- package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
- package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-locator.md +1 -1
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +1 -1
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-locator.md +1 -1
- package/dist/builtin/subagents/agents/debugger.md +1 -1
- package/dist/builtin/subagents/agents/worker.md +1 -1
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/skills/subagent/SKILL.md +1 -1
- package/dist/builtin/subagents/src/extension/index.ts +37 -61
- package/dist/builtin/subagents/src/extension/notification-content.ts +80 -0
- package/dist/builtin/subagents/src/extension/schemas.ts +9 -0
- package/dist/builtin/subagents/src/extension/tool-description.ts +1 -0
- package/dist/builtin/subagents/src/intercom/supervisor-authorization.ts +23 -0
- package/dist/builtin/subagents/src/runs/background/async-execution-chain.ts +4 -0
- package/dist/builtin/subagents/src/runs/background/async-execution-single.ts +2 -0
- package/dist/builtin/subagents/src/runs/background/async-execution-types.ts +4 -0
- package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +75 -13
- package/dist/builtin/subagents/src/runs/background/async-status.ts +19 -0
- package/dist/builtin/subagents/src/runs/background/completion-notification.ts +4 -3
- package/dist/builtin/subagents/src/runs/background/notify.ts +76 -15
- package/dist/builtin/subagents/src/runs/background/stale-run-reconciler.ts +1 -1
- package/dist/builtin/subagents/src/runs/background/subagent-runner-dynamic.ts +13 -0
- package/dist/builtin/subagents/src/runs/background/subagent-runner-parallel.ts +1 -0
- package/dist/builtin/subagents/src/runs/background/subagent-runner-sequential.ts +1 -0
- package/dist/builtin/subagents/src/runs/background/subagent-runner-step.ts +2 -1
- package/dist/builtin/subagents/src/runs/background/subagent-runner-types.ts +4 -0
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +13 -0
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-step.ts +19 -2
- package/dist/builtin/subagents/src/runs/foreground/detached-cleanup-barrier.ts +26 -0
- package/dist/builtin/subagents/src/runs/foreground/execution-attempt.ts +19 -30
- package/dist/builtin/subagents/src/runs/foreground/execution-intercom-detach.ts +47 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +60 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +21 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +21 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-resume.ts +6 -1
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +2 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-types.ts +2 -0
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/intercom-group.ts +50 -0
- package/dist/builtin/subagents/src/runs/shared/pi-args.ts +16 -0
- package/dist/builtin/subagents/src/runs/shared/worktree-post-create.ts +75 -0
- package/dist/builtin/subagents/src/runs/shared/worktree-root.ts +51 -0
- package/dist/builtin/subagents/src/runs/shared/worktree.ts +69 -77
- package/dist/builtin/subagents/src/shared/types-config.ts +6 -0
- package/dist/builtin/subagents/src/slash/slash-commands.ts +3 -2
- package/dist/builtin/subagents/src/tui/render-result-compact.ts +5 -3
- package/dist/builtin/subagents/src/tui/render-result.ts +5 -3
- package/dist/builtin/subagents/src/tui/render-widget-graph.ts +7 -4
- package/dist/builtin/web-access/CHANGELOG.md +11 -0
- package/dist/builtin/web-access/extract-frames.ts +14 -13
- package/dist/builtin/web-access/extract.ts +2 -2
- package/dist/builtin/web-access/gemini-api.ts +0 -3
- package/dist/builtin/web-access/gemini-web-config.ts +1 -3
- package/dist/builtin/web-access/gemini-web.ts +1 -0
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/web-access/perplexity.ts +0 -3
- package/dist/builtin/web-access/result-renderers.ts +7 -5
- package/dist/builtin/web-access/subprocess.ts +100 -0
- package/dist/builtin/web-access/summary-review.ts +14 -3
- package/dist/builtin/web-access/video-extract.ts +12 -17
- package/dist/builtin/web-access/web-search-browser.ts +18 -10
- package/dist/builtin/web-access/web-search-summary.ts +9 -2
- package/dist/builtin/web-access/youtube-extract.ts +22 -25
- package/dist/builtin/workflows/CHANGELOG.md +77 -0
- package/dist/builtin/workflows/README.md +76 -38
- package/dist/builtin/workflows/ambient.d.ts +30 -0
- package/dist/builtin/workflows/builtin/adversarial-verification-prompts.ts +15 -0
- package/dist/builtin/workflows/builtin/adversarial-verification-runner.ts +93 -0
- package/dist/builtin/workflows/builtin/adversarial-verification.d.ts +11 -0
- package/dist/builtin/workflows/builtin/adversarial-verification.ts +24 -0
- package/dist/builtin/workflows/builtin/classify-and-act-prompts.ts +11 -0
- package/dist/builtin/workflows/builtin/classify-and-act-runner.ts +110 -0
- package/dist/builtin/workflows/builtin/classify-and-act.d.ts +24 -0
- package/dist/builtin/workflows/builtin/classify-and-act.ts +35 -0
- package/dist/builtin/workflows/builtin/deep-research-codebase-utils.ts +8 -2
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize-prompts.ts +11 -0
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize-runner.ts +96 -0
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.d.ts +23 -0
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.ts +32 -0
- package/dist/builtin/workflows/builtin/generate-and-filter-prompts.ts +15 -0
- package/dist/builtin/workflows/builtin/generate-and-filter-runner.ts +75 -0
- package/dist/builtin/workflows/builtin/generate-and-filter.d.ts +11 -0
- package/dist/builtin/workflows/builtin/generate-and-filter.ts +26 -0
- package/dist/builtin/workflows/builtin/goal-models.ts +72 -0
- package/dist/builtin/workflows/builtin/goal-runner.ts +2 -64
- package/dist/builtin/workflows/builtin/index.d.ts +44 -0
- package/dist/builtin/workflows/builtin/index.ts +6 -0
- package/dist/builtin/workflows/builtin/loop-until-done-prompts.ts +79 -0
- package/dist/builtin/workflows/builtin/loop-until-done-runner.ts +189 -0
- package/dist/builtin/workflows/builtin/loop-until-done.d.ts +34 -0
- package/dist/builtin/workflows/builtin/loop-until-done.ts +31 -0
- package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +6 -1
- package/dist/builtin/workflows/builtin/pattern-artifact-root.ts +28 -0
- package/dist/builtin/workflows/builtin/ralph-models.ts +26 -5
- package/dist/builtin/workflows/builtin/ralph-runner.ts +1 -0
- package/dist/builtin/workflows/builtin/tournament-prompts.ts +79 -0
- package/dist/builtin/workflows/builtin/tournament-runner.ts +188 -0
- package/dist/builtin/workflows/builtin/tournament.d.ts +33 -0
- package/dist/builtin/workflows/builtin/tournament.ts +34 -0
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/authoring.d.ts +2 -6
- package/dist/builtin/workflows/src/durable/backend.ts +163 -120
- package/dist/builtin/workflows/src/durable/completed-catalog.ts +37 -64
- package/dist/builtin/workflows/src/durable/completed-inspection.ts +4 -72
- package/dist/builtin/workflows/src/durable/dbos-backend.ts +242 -195
- package/dist/builtin/workflows/src/durable/dbos-embedded-postgres.ts +207 -0
- package/dist/builtin/workflows/src/durable/dbos-envelope.ts +42 -42
- package/dist/builtin/workflows/src/durable/dbos-lifecycle.ts +155 -0
- package/dist/builtin/workflows/src/durable/dbos-local-postgres.ts +126 -0
- package/dist/builtin/workflows/src/durable/dbos-metadata.ts +105 -58
- package/dist/builtin/workflows/src/durable/dbos-prompt-reservations.ts +320 -0
- package/dist/builtin/workflows/src/durable/dbos-sdk-handle.ts +161 -0
- package/dist/builtin/workflows/src/durable/dbos-status-transition.ts +62 -0
- package/dist/builtin/workflows/src/durable/dbos-tombstone.ts +2 -2
- package/dist/builtin/workflows/src/durable/durable-hash.ts +20 -0
- package/dist/builtin/workflows/src/durable/factory.ts +23 -83
- package/dist/builtin/workflows/src/durable/format-version.ts +4 -10
- package/dist/builtin/workflows/src/durable/index.ts +16 -20
- package/dist/builtin/workflows/src/durable/local-command.ts +63 -0
- package/dist/builtin/workflows/src/durable/prompt-reservation-state.ts +177 -0
- package/dist/builtin/workflows/src/durable/prompt-reservations.ts +36 -0
- package/dist/builtin/workflows/src/durable/resume-catalog.ts +2 -200
- package/dist/builtin/workflows/src/durable/resume-eligibility.ts +42 -2
- package/dist/builtin/workflows/src/durable/resume-runtime.ts +121 -118
- package/dist/builtin/workflows/src/durable/retention-policy.ts +42 -0
- package/dist/builtin/workflows/src/durable/run-timing.ts +98 -0
- package/dist/builtin/workflows/src/durable/scoped-backend.ts +62 -14
- package/dist/builtin/workflows/src/durable/stage-primitive.ts +15 -2
- package/dist/builtin/workflows/src/durable/tool-primitive.ts +11 -7
- package/dist/builtin/workflows/src/durable/types.ts +25 -18
- package/dist/builtin/workflows/src/durable/ui-primitive.ts +117 -29
- package/dist/builtin/workflows/src/durable/workflow-status-transition.ts +30 -0
- package/dist/builtin/workflows/src/engine/primitives/parallel.ts +20 -5
- package/dist/builtin/workflows/src/engine/primitives/task.ts +3 -2
- package/dist/builtin/workflows/src/engine/primitives/ui.ts +6 -3
- package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +14 -22
- package/dist/builtin/workflows/src/engine/run-durable-stage-session.ts +14 -14
- package/dist/builtin/workflows/src/engine/run.ts +35 -37
- package/dist/builtin/workflows/src/engine/runtime.ts +3 -0
- package/dist/builtin/workflows/src/engine/workflow-activity.ts +9 -0
- package/dist/builtin/workflows/src/extension/completed-stage-intercom-ask.ts +155 -0
- package/dist/builtin/workflows/src/extension/config-file-loader.ts +13 -0
- package/dist/builtin/workflows/src/extension/config-loader.ts +20 -0
- package/dist/builtin/workflows/src/extension/dispatcher.ts +56 -17
- package/dist/builtin/workflows/src/extension/extension-factory.ts +13 -10
- package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +37 -59
- package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +16 -18
- package/dist/builtin/workflows/src/extension/lifecycle-notification-delivery.ts +83 -0
- package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +80 -41
- package/dist/builtin/workflows/src/extension/postmortem-deps.ts +73 -0
- package/dist/builtin/workflows/src/extension/public-types.ts +11 -51
- package/dist/builtin/workflows/src/extension/render-call.ts +3 -9
- package/dist/builtin/workflows/src/extension/render-result.ts +22 -7
- package/dist/builtin/workflows/src/extension/runtime-active-block-claim.ts +78 -0
- package/dist/builtin/workflows/src/extension/runtime-durable-resume.ts +50 -29
- package/dist/builtin/workflows/src/extension/runtime.ts +70 -219
- package/dist/builtin/workflows/src/extension/ui-surface.ts +107 -3
- package/dist/builtin/workflows/src/extension/wiring.ts +76 -7
- package/dist/builtin/workflows/src/extension/workflow-command-completions.ts +10 -5
- package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +27 -5
- package/dist/builtin/workflows/src/extension/workflow-durable-resume-command.ts +49 -19
- package/dist/builtin/workflows/src/extension/workflow-prompts.ts +8 -8
- package/dist/builtin/workflows/src/extension/workflow-resume-picker-rows.ts +81 -0
- package/dist/builtin/workflows/src/extension/workflow-resume-shadow.ts +55 -0
- package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +193 -145
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +9 -133
- package/dist/builtin/workflows/src/extension/workflow-status-summary.ts +189 -0
- package/dist/builtin/workflows/src/extension/workflow-targets.ts +1 -1
- package/dist/builtin/workflows/src/extension/workflow-tool-content.ts +78 -3
- package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +185 -89
- package/dist/builtin/workflows/src/extension/workflow-tool-send.ts +92 -11
- package/dist/builtin/workflows/src/extension/workflow-tool.ts +18 -24
- package/dist/builtin/workflows/src/runs/background/durable-resume-transition.ts +63 -0
- package/dist/builtin/workflows/src/runs/background/quit.ts +139 -29
- package/dist/builtin/workflows/src/runs/background/resume-acknowledgements.ts +97 -0
- package/dist/builtin/workflows/src/runs/background/run-inspect.ts +111 -0
- package/dist/builtin/workflows/src/runs/background/runner.ts +46 -17
- package/dist/builtin/workflows/src/runs/background/startup-admission.ts +77 -0
- package/dist/builtin/workflows/src/runs/background/status.ts +133 -224
- package/dist/builtin/workflows/src/runs/background/workflow-lifecycle-aggregate.ts +44 -0
- package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +57 -256
- package/dist/builtin/workflows/src/runs/foreground/executor-hil.ts +7 -4
- package/dist/builtin/workflows/src/runs/foreground/executor-lifecycle.ts +12 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-prompt-nodes.ts +39 -0
- package/dist/builtin/workflows/src/runs/foreground/executor-queued-user-message.ts +75 -0
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-call.ts +44 -12
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-control.ts +63 -12
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +30 -4
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-replay.ts +3 -0
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-types.ts +4 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-task-prompts.ts +0 -67
- package/dist/builtin/workflows/src/runs/foreground/executor-types.ts +6 -0
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +0 -1
- package/dist/builtin/workflows/src/runs/foreground/postmortem-stage-chat.ts +169 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +38 -1
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-candidate.ts +21 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-context.ts +21 -3
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +85 -84
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-message-admission.ts +195 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-options.ts +12 -5
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-replacement.ts +42 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-send-user-message.ts +100 -8
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-session-options.ts +51 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-session.ts +19 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-types.ts +28 -2
- package/dist/builtin/workflows/src/runs/shared/prompt-callsite.ts +4 -6
- package/dist/builtin/workflows/src/runs/shared/worktree-git-runner.ts +89 -0
- package/dist/builtin/workflows/src/runs/shared/worktree-git.ts +29 -133
- package/dist/builtin/workflows/src/runs/shared/worktree-post-create.ts +130 -0
- package/dist/builtin/workflows/src/runs/shared/worktree-root.ts +84 -0
- package/dist/builtin/workflows/src/runs/shared/worktree-setup.ts +77 -63
- package/dist/builtin/workflows/src/runs/shared/worktree-types.ts +4 -0
- package/dist/builtin/workflows/src/sdk-surface.ts +1 -1
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +29 -22
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.ts +26 -24
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +5 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +5 -0
- package/dist/builtin/workflows/src/shared/intercom-group.ts +51 -0
- package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +6 -0
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +4 -0
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +3 -0
- package/dist/builtin/workflows/src/shared/prompt-callsite-context.ts +13 -0
- package/dist/builtin/workflows/src/shared/returned-run-status.ts +2 -1
- package/dist/builtin/workflows/src/shared/session-transcript.ts +74 -0
- package/dist/builtin/workflows/src/shared/store-stage-methods.ts +1 -0
- package/dist/builtin/workflows/src/shared/store-types.ts +8 -0
- package/dist/builtin/workflows/src/shared/timing.ts +4 -1
- package/dist/builtin/workflows/src/shared/types.ts +2 -6
- package/dist/builtin/workflows/src/tui/chat-surface-message.ts +2 -42
- package/dist/builtin/workflows/src/tui/dispatch-confirm.ts +2 -2
- package/dist/builtin/workflows/src/tui/graph-view-constants.ts +7 -3
- package/dist/builtin/workflows/src/tui/graph-view-input.ts +29 -67
- package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +15 -10
- package/dist/builtin/workflows/src/tui/graph-view-state.ts +0 -2
- package/dist/builtin/workflows/src/tui/graph-view-types.ts +3 -9
- package/dist/builtin/workflows/src/tui/host-input-form.ts +62 -0
- package/dist/builtin/workflows/src/tui/mouse-input.ts +63 -0
- package/dist/builtin/workflows/src/tui/node-card.ts +1 -0
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +67 -42
- package/dist/builtin/workflows/src/tui/overlay-terminal-modes.ts +49 -0
- package/dist/builtin/workflows/src/tui/session-overlays.ts +3 -104
- package/dist/builtin/workflows/src/tui/session-picker.ts +3 -12
- package/dist/builtin/workflows/src/tui/stage-chat-composer-drafts.ts +19 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-archive-history.ts +30 -10
- package/dist/builtin/workflows/src/tui/stage-chat-view-footer-status.ts +19 -9
- package/dist/builtin/workflows/src/tui/stage-chat-view-input.ts +25 -38
- package/dist/builtin/workflows/src/tui/stage-chat-view-render-helpers.ts +1 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +7 -6
- package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +7 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +3 -1
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +19 -20
- package/dist/builtin/workflows/src/tui/switcher.ts +4 -4
- package/dist/builtin/workflows/src/tui/widget.ts +46 -33
- package/dist/builtin/workflows/src/tui/workflow-attach-pane-handle.ts +26 -0
- package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +14 -2
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +26 -27
- package/dist/builtin/workflows/src/tui/workflow-resume-selector.ts +208 -69
- package/dist/bun/cli.js +3 -0
- package/dist/bun/cli.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +3 -0
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +19 -2
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-compaction.js +2 -2
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +5 -3
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-export.js +1 -1
- package/dist/core/agent-session-export.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts +2 -4
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +9 -2
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts +6 -0
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +107 -36
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +18 -7
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts +3 -1
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +1 -1
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.d.ts +16 -0
- package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -0
- package/dist/core/agent-session-post-tool-compaction.js +113 -0
- package/dist/core/agent-session-post-tool-compaction.js.map +1 -0
- package/dist/core/agent-session-prompt.d.ts +12 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +22 -5
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +3 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +21 -0
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tree.d.ts.map +1 -1
- package/dist/core/agent-session-tree.js +2 -1
- package/dist/core/agent-session-tree.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +7 -0
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +6 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +18 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/async/job-manager.d.ts +1 -0
- package/dist/core/async/job-manager.d.ts.map +1 -1
- package/dist/core/async/job-manager.js +29 -5
- package/dist/core/async/job-manager.js.map +1 -1
- package/dist/core/async/session-manager.d.ts +2 -4
- package/dist/core/async/session-manager.d.ts.map +1 -1
- package/dist/core/async/session-manager.js +5 -32
- package/dist/core/async/session-manager.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.js +2 -0
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/auth-storage.d.ts +20 -10
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +151 -92
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/callback-activity.d.ts +27 -0
- package/dist/core/callback-activity.d.ts.map +1 -0
- package/dist/core/callback-activity.js +44 -0
- package/dist/core/callback-activity.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +4 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +4 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction-boundary.d.ts +1 -1
- package/dist/core/compaction/compaction-boundary.d.ts.map +1 -1
- package/dist/core/compaction/compaction-boundary.js +10 -23
- package/dist/core/compaction/compaction-boundary.js.map +1 -1
- package/dist/core/compaction/compaction-runner.d.ts +4 -1
- package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/compaction-runner.js +1 -1
- package/dist/core/compaction/compaction-runner.js.map +1 -1
- package/dist/core/compaction/compaction-types.d.ts +3 -2
- package/dist/core/compaction/compaction-types.d.ts.map +1 -1
- package/dist/core/compaction/compaction-types.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +6 -6
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +12 -9
- package/dist/core/compaction/compaction.js.map +1 -1
- 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/compaction/range-planner-diagnostics.d.ts +101 -0
- package/dist/core/compaction/range-planner-diagnostics.d.ts.map +1 -0
- package/dist/core/compaction/range-planner-diagnostics.js +116 -0
- package/dist/core/compaction/range-planner-diagnostics.js.map +1 -0
- package/dist/core/compaction/range-planner.d.ts +13 -3
- package/dist/core/compaction/range-planner.d.ts.map +1 -1
- package/dist/core/compaction/range-planner.js +117 -68
- package/dist/core/compaction/range-planner.js.map +1 -1
- package/dist/core/compaction/truncated-range-recovery.d.ts +47 -0
- package/dist/core/compaction/truncated-range-recovery.d.ts.map +1 -0
- package/dist/core/compaction/truncated-range-recovery.js +112 -0
- package/dist/core/compaction/truncated-range-recovery.js.map +1 -0
- package/dist/core/extensions/api-types.d.ts +2 -2
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +23 -1
- 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 +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-api.js +2 -2
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-core.d.ts.map +1 -1
- package/dist/core/extensions/loader-core.js +8 -1
- package/dist/core/extensions/loader-core.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +9 -6
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/message-types.d.ts +17 -0
- package/dist/core/extensions/message-types.d.ts.map +1 -1
- package/dist/core/extensions/message-types.js.map +1 -1
- package/dist/core/extensions/provider-types.d.ts +3 -0
- package/dist/core/extensions/provider-types.d.ts.map +1 -1
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-events.d.ts.map +1 -1
- package/dist/core/extensions/runner-events.js +11 -10
- package/dist/core/extensions/runner-events.js.map +1 -1
- package/dist/core/extensions/runtime-types.d.ts +2 -2
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/extensions/ui-types.d.ts +78 -0
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/model-registry-auth.d.ts +2 -1
- package/dist/core/model-registry-auth.d.ts.map +1 -1
- package/dist/core/model-registry-auth.js +25 -6
- package/dist/core/model-registry-auth.js.map +1 -1
- package/dist/core/model-registry-builtins.d.ts +3 -2
- package/dist/core/model-registry-builtins.d.ts.map +1 -1
- package/dist/core/model-registry-builtins.js +12 -6
- package/dist/core/model-registry-builtins.js.map +1 -1
- package/dist/core/model-registry-dynamic.d.ts +1 -0
- package/dist/core/model-registry-dynamic.d.ts.map +1 -1
- package/dist/core/model-registry-dynamic.js +53 -13
- package/dist/core/model-registry-dynamic.js.map +1 -1
- package/dist/core/model-registry-loader.d.ts +2 -1
- package/dist/core/model-registry-loader.d.ts.map +1 -1
- package/dist/core/model-registry-loader.js +2 -2
- package/dist/core/model-registry-loader.js.map +1 -1
- package/dist/core/model-registry-types.d.ts +10 -3
- package/dist/core/model-registry-types.d.ts.map +1 -1
- package/dist/core/model-registry-types.js.map +1 -1
- package/dist/core/model-registry.d.ts +15 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +214 -30
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/models-store.d.ts +25 -0
- package/dist/core/models-store.d.ts.map +1 -0
- package/dist/core/models-store.js +73 -0
- package/dist/core/models-store.js.map +1 -0
- package/dist/core/oauth-compat.d.ts +17 -0
- package/dist/core/oauth-compat.d.ts.map +1 -0
- package/dist/core/oauth-compat.js +2 -0
- package/dist/core/oauth-compat.js.map +1 -0
- package/dist/core/oauth-provider-bridge.d.ts +40 -0
- package/dist/core/oauth-provider-bridge.d.ts.map +1 -0
- package/dist/core/oauth-provider-bridge.js +169 -0
- package/dist/core/oauth-provider-bridge.js.map +1 -0
- package/dist/core/output-guard.d.ts +2 -0
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js +14 -0
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +5 -0
- package/dist/core/remote-catalog-provider.d.ts.map +1 -0
- package/dist/core/remote-catalog-provider.js +138 -0
- package/dist/core/remote-catalog-provider.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +8 -3
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +1 -1
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +1 -1
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts +1 -1
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-history.d.ts +2 -2
- package/dist/core/session-manager-history.js +2 -2
- package/dist/core/session-manager-history.js.map +1 -1
- package/dist/core/session-manager-list.d.ts.map +1 -1
- package/dist/core/session-manager-list.js +65 -23
- package/dist/core/session-manager-list.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +3 -2
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +9 -5
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +2 -3
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/find.js +2 -2
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.js +2 -2
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.js +2 -2
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -3
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/todos-render.d.ts.map +1 -1
- package/dist/core/tools/todos-render.js +3 -2
- package/dist/core/tools/todos-render.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +3 -2
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/write.js +2 -2
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/workflow-stage-admission.d.ts +29 -0
- package/dist/core/workflow-stage-admission.d.ts.map +1 -0
- package/dist/core/workflow-stage-admission.js +81 -0
- package/dist/core/workflow-stage-admission.js.map +1 -0
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/main-types.d.ts +13 -0
- package/dist/main-types.d.ts.map +1 -0
- package/dist/main-types.js +2 -0
- package/dist/main-types.js.map +1 -0
- package/dist/main.d.ts +2 -5
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +25 -17
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +17 -12
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.d.ts +7 -0
- package/dist/modes/interactive/components/atomic-banner.d.ts.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.js +20 -0
- package/dist/modes/interactive/components/atomic-banner.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +5 -3
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +3 -4
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +4 -0
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +4 -0
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.js +79 -8
- package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +4 -2
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts +1 -0
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +4 -1
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-boundary-message.js +3 -4
- package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
- package/dist/modes/interactive/components/host-input-form-mount.d.ts +14 -0
- package/dist/modes/interactive/components/host-input-form-mount.d.ts.map +1 -0
- package/dist/modes/interactive/components/host-input-form-mount.js +79 -0
- package/dist/modes/interactive/components/host-input-form-mount.js.map +1 -0
- package/dist/modes/interactive/components/host-input-form.d.ts +52 -0
- package/dist/modes/interactive/components/host-input-form.d.ts.map +1 -0
- package/dist/modes/interactive/components/host-input-form.js +278 -0
- package/dist/modes/interactive/components/host-input-form.js.map +1 -0
- package/dist/modes/interactive/components/host-session-picker.d.ts +46 -0
- package/dist/modes/interactive/components/host-session-picker.d.ts.map +1 -0
- package/dist/modes/interactive/components/host-session-picker.js +183 -0
- package/dist/modes/interactive/components/host-session-picker.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +2 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +12 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +3 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +8 -2
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +7 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +57 -10
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +15 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +35 -3
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +3 -2
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +9 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +24 -10
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +7 -1
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js +3 -3
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +49 -0
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js +2 -0
- package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-context.js +14 -0
- package/dist/modes/interactive/interactive-extension-context.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-global-clear.d.ts +13 -0
- package/dist/modes/interactive/interactive-global-clear.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-global-clear.js +11 -0
- package/dist/modes/interactive/interactive-global-clear.js.map +1 -0
- package/dist/modes/interactive/interactive-input-handling.js +17 -10
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +6 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +25 -2
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +4 -3
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +2 -2
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts +4 -1
- package/dist/modes/interactive/interactive-mode-helpers.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-helpers.js +14 -1
- package/dist/modes/interactive/interactive-mode-helpers.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +3 -2
- 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-types.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +7 -4
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-queueing.js +2 -2
- package/dist/modes/interactive/interactive-queueing.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +25 -4
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +3 -0
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +5 -2
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +22 -9
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-terminal-title.d.ts +6 -0
- package/dist/modes/interactive/interactive-terminal-title.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-terminal-title.js +7 -0
- package/dist/modes/interactive/interactive-terminal-title.js.map +1 -0
- package/dist/modes/interactive-engine/activity-watchdog.d.ts +45 -0
- package/dist/modes/interactive-engine/activity-watchdog.d.ts.map +1 -0
- package/dist/modes/interactive-engine/activity-watchdog.js +74 -0
- package/dist/modes/interactive-engine/activity-watchdog.js.map +1 -0
- package/dist/modes/interactive-engine/create-isolated-runtime.d.ts +14 -0
- package/dist/modes/interactive-engine/create-isolated-runtime.d.ts.map +1 -0
- package/dist/modes/interactive-engine/create-isolated-runtime.js +56 -0
- package/dist/modes/interactive-engine/create-isolated-runtime.js.map +1 -0
- package/dist/modes/interactive-engine/engine-args.d.ts +10 -0
- package/dist/modes/interactive-engine/engine-args.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-args.js +55 -0
- package/dist/modes/interactive-engine/engine-args.js.map +1 -0
- package/dist/modes/interactive-engine/engine-child-liveness.d.ts +7 -0
- package/dist/modes/interactive-engine/engine-child-liveness.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-child-liveness.js +50 -0
- package/dist/modes/interactive-engine/engine-child-liveness.js.map +1 -0
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts +47 -0
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-custom-ui.js +276 -0
- package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -0
- package/dist/modes/interactive-engine/engine-input-form.d.ts +13 -0
- package/dist/modes/interactive-engine/engine-input-form.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-input-form.js +49 -0
- package/dist/modes/interactive-engine/engine-input-form.js.map +1 -0
- package/dist/modes/interactive-engine/engine-monitor.d.ts +18 -0
- package/dist/modes/interactive-engine/engine-monitor.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-monitor.js +63 -0
- package/dist/modes/interactive-engine/engine-monitor.js.map +1 -0
- package/dist/modes/interactive-engine/engine-render-service.d.ts +17 -0
- package/dist/modes/interactive-engine/engine-render-service.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-render-service.js +150 -0
- package/dist/modes/interactive-engine/engine-render-service.js.map +1 -0
- package/dist/modes/interactive-engine/engine-session-picker.d.ts +22 -0
- package/dist/modes/interactive-engine/engine-session-picker.d.ts.map +1 -0
- package/dist/modes/interactive-engine/engine-session-picker.js +106 -0
- package/dist/modes/interactive-engine/engine-session-picker.js.map +1 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +23 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.js +126 -0
- package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -0
- package/dist/modes/interactive-engine/input-form-host.d.ts +15 -0
- package/dist/modes/interactive-engine/input-form-host.d.ts.map +1 -0
- package/dist/modes/interactive-engine/input-form-host.js +44 -0
- package/dist/modes/interactive-engine/input-form-host.js.map +1 -0
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +75 -0
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -0
- package/dist/modes/interactive-engine/isolated-runtime.js +448 -0
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -0
- package/dist/modes/interactive-engine/protocol.d.ts +184 -0
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -0
- package/dist/modes/interactive-engine/protocol.js +254 -0
- package/dist/modes/interactive-engine/protocol.js.map +1 -0
- package/dist/modes/interactive-engine/remote-command-catalog.d.ts +33 -0
- package/dist/modes/interactive-engine/remote-command-catalog.d.ts.map +1 -0
- package/dist/modes/interactive-engine/remote-command-catalog.js +51 -0
- package/dist/modes/interactive-engine/remote-command-catalog.js.map +1 -0
- package/dist/modes/interactive-engine/remote-component.d.ts +16 -0
- package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -0
- package/dist/modes/interactive-engine/remote-component.js +209 -0
- package/dist/modes/interactive-engine/remote-component.js.map +1 -0
- package/dist/modes/interactive-engine/remote-frame-clamp.d.ts +25 -0
- package/dist/modes/interactive-engine/remote-frame-clamp.d.ts.map +1 -0
- package/dist/modes/interactive-engine/remote-frame-clamp.js +43 -0
- package/dist/modes/interactive-engine/remote-frame-clamp.js.map +1 -0
- package/dist/modes/interactive-engine/remote-renderer.d.ts +59 -0
- package/dist/modes/interactive-engine/remote-renderer.d.ts.map +1 -0
- package/dist/modes/interactive-engine/remote-renderer.js +123 -0
- package/dist/modes/interactive-engine/remote-renderer.js.map +1 -0
- package/dist/modes/interactive-engine/session-picker-host.d.ts +25 -0
- package/dist/modes/interactive-engine/session-picker-host.d.ts.map +1 -0
- package/dist/modes/interactive-engine/session-picker-host.js +75 -0
- package/dist/modes/interactive-engine/session-picker-host.js.map +1 -0
- package/dist/modes/interactive-engine/terminal-mode-controller.d.ts +43 -0
- package/dist/modes/interactive-engine/terminal-mode-controller.d.ts.map +1 -0
- package/dist/modes/interactive-engine/terminal-mode-controller.js +109 -0
- package/dist/modes/interactive-engine/terminal-mode-controller.js.map +1 -0
- package/dist/modes/rpc/bounded-writer.d.ts +27 -0
- package/dist/modes/rpc/bounded-writer.d.ts.map +1 -0
- package/dist/modes/rpc/bounded-writer.js +103 -0
- package/dist/modes/rpc/bounded-writer.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +15 -12
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +102 -28
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +83 -0
- package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client-api.js +64 -0
- package/dist/modes/rpc/rpc-client-api.js.map +1 -0
- package/dist/modes/rpc/rpc-client-process.d.ts +19 -0
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client-process.js +79 -0
- package/dist/modes/rpc/rpc-client-process.js.map +1 -0
- package/dist/modes/rpc/rpc-client-waits.d.ts +8 -0
- package/dist/modes/rpc/rpc-client-waits.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client-waits.js +33 -0
- package/dist/modes/rpc/rpc-client-waits.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +48 -124
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +295 -249
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts +5 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +79 -3
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-event-buffer.d.ts +11 -0
- package/dist/modes/rpc/rpc-event-buffer.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-event-buffer.js +30 -0
- package/dist/modes/rpc/rpc-event-buffer.js.map +1 -0
- package/dist/modes/rpc/rpc-extension-ui.d.ts +7 -1
- package/dist/modes/rpc/rpc-extension-ui.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-extension-ui.js +54 -32
- package/dist/modes/rpc/rpc-extension-ui.js.map +1 -1
- package/dist/modes/rpc/rpc-input-scheduler.d.ts +16 -0
- package/dist/modes/rpc/rpc-input-scheduler.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-input-scheduler.js +69 -0
- package/dist/modes/rpc/rpc-input-scheduler.js.map +1 -0
- package/dist/modes/rpc/rpc-input.d.ts +2 -1
- package/dist/modes/rpc/rpc-input.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-input.js +4 -9
- package/dist/modes/rpc/rpc-input.js.map +1 -1
- package/dist/modes/rpc/rpc-keybindings-reload.d.ts +27 -0
- package/dist/modes/rpc/rpc-keybindings-reload.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-keybindings-reload.js +69 -0
- package/dist/modes/rpc/rpc-keybindings-reload.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +63 -8
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-output-buffer.d.ts +10 -0
- package/dist/modes/rpc/rpc-output-buffer.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-output-buffer.js +70 -0
- package/dist/modes/rpc/rpc-output-buffer.js.map +1 -0
- package/dist/modes/rpc/rpc-session-binding.d.ts +16 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +16 -3
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +109 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli-parser.d.ts +2 -0
- package/dist/package-manager-cli-parser.d.ts.map +1 -1
- package/dist/package-manager-cli-parser.js +24 -5
- package/dist/package-manager-cli-parser.js.map +1 -1
- package/dist/package-manager-cli.d.ts +7 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +65 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/shell.d.ts +1 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +46 -0
- package/dist/utils/shell.js.map +1 -1
- package/docs/changelog.mdx +11 -0
- package/docs/compaction.md +53 -17
- package/docs/custom-provider.md +24 -5
- package/docs/development.md +9 -7
- package/docs/docs.json +1 -0
- package/docs/extensions.md +30 -16
- package/docs/intercom.md +489 -0
- package/docs/json.md +1 -1
- package/docs/keybindings.md +1 -1
- package/docs/packages.md +1 -0
- package/docs/quickstart.md +11 -5
- package/docs/rpc.md +9 -7
- package/docs/sdk.md +6 -0
- package/docs/session-format.md +7 -6
- package/docs/sessions.md +4 -2
- package/docs/settings.md +2 -2
- package/docs/subagents.md +7 -2
- package/docs/tui.md +61 -2
- package/docs/usage.md +6 -5
- package/docs/workflows.md +2572 -1379
- package/examples/extensions/handoff.ts +1 -1
- package/examples/extensions/qna.ts +1 -1
- package/examples/extensions/summarize.ts +1 -1
- package/npm-shrinkwrap.json +225 -76
- package/package.json +7 -6
- package/dist/builtin/workflows/src/durable/file-backend.ts +0 -439
- package/dist/builtin/workflows/src/durable/file-lock.ts +0 -153
- package/dist/builtin/workflows/src/durable/file-state.ts +0 -104
- package/dist/builtin/workflows/src/extension/runtime-direct.ts +0 -96
- package/dist/builtin/workflows/src/extension/workflow-tool-helpers.ts +0 -66
- package/dist/builtin/workflows/src/runs/foreground/executor-direct-output.ts +0 -91
- package/dist/builtin/workflows/src/runs/foreground/executor-direct.ts +0 -282
- package/dist/builtin/workflows/src/shared/resumable-workflow-notices.ts +0 -43
- package/dist/builtin/workflows/src/tui/session-confirm.ts +0 -299
package/docs/sdk.md
CHANGED
|
@@ -432,6 +432,8 @@ const { session } = await createAgentSession({
|
|
|
432
432
|
});
|
|
433
433
|
```
|
|
434
434
|
|
|
435
|
+
`ModelRegistry` keeps synchronous reads for SDK and extension compatibility, while catalog refresh is asynchronous. Await `modelRegistry.refresh()` before reading `getAll()`, `find()`, or `getAvailable()` when a provider may update its catalog. The refresh result reports `aborted` and per-provider `errors`; successful providers publish their new catalogs even if another provider fails, and failed or timed-out providers retain their last-known models.
|
|
436
|
+
|
|
435
437
|
If no model is provided:
|
|
436
438
|
1. Tries to restore from session (if continuing)
|
|
437
439
|
2. Uses default from settings
|
|
@@ -447,12 +449,16 @@ The package root exports the same context-window helpers and types used by the r
|
|
|
447
449
|
|
|
448
450
|
### API Keys and OAuth
|
|
449
451
|
|
|
452
|
+
`AuthStorage` and `ModelRegistry` remain synchronous public SDK entry points. Token refresh is serialized under Atomic's credential-store lock, and the `authStorage` and `modelRegistry` session options remain available.
|
|
453
|
+
|
|
450
454
|
API key resolution priority (handled by AuthStorage):
|
|
451
455
|
1. Runtime overrides (via `setRuntimeApiKey`, not persisted)
|
|
452
456
|
2. Stored credentials in `auth.json` (API keys or OAuth tokens)
|
|
453
457
|
3. Environment variables (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc.)
|
|
454
458
|
4. Fallback resolver (for custom provider keys from `models.json`)
|
|
455
459
|
|
|
460
|
+
OAuth credentials may provide an API key, request headers, and a credential-specific `baseUrl`. Atomic applies all three to the request. In particular, GitHub Copilot enterprise and token-specific endpoints replace the static model URL without dropping retries, attribution headers, fast mode, or extension request hooks.
|
|
461
|
+
|
|
456
462
|
```typescript
|
|
457
463
|
import { AuthStorage, ModelRegistry } from "@bastani/atomic";
|
|
458
464
|
|
package/docs/session-format.md
CHANGED
|
@@ -236,15 +236,15 @@ Emitted when the user selects a supported context-window size for the active mod
|
|
|
236
236
|
|
|
237
237
|
### CompactionEntry
|
|
238
238
|
|
|
239
|
-
Created by `/compact`, RPC `compact`, and automatic compaction. The `summary` field contains the mechanically reconstructed verbatim transcript string, not generated summary prose. `firstKeptEntryId`
|
|
239
|
+
Created by `/compact`, RPC `compact`, and automatic compaction. The `summary` field contains the mechanically reconstructed verbatim transcript string, not generated summary prose. `firstKeptEntryId` is the first context-visible entry retained outside compaction, or `null` when no pre-boundary context-visible message is retained (including `preserve_recent: 0`).
|
|
240
240
|
|
|
241
241
|
An entry is active only when `details.strategy` is exactly `"verbatim-lines"`:
|
|
242
242
|
|
|
243
243
|
```json
|
|
244
|
-
{"type":"compaction","id":"c1","parentId":"m9","timestamp":"2026-07-13T10:00:00.000Z","summary":"[User]: fix the test\n(filtered 42 lines)\n[Assistant]: Fixed.","firstKeptEntryId":"m7","tokensBefore":51234,"details":{"strategy":"verbatim-lines","promptVersion":
|
|
244
|
+
{"type":"compaction","id":"c1","parentId":"m9","timestamp":"2026-07-13T10:00:00.000Z","summary":"[User]: fix the test\n(filtered 42 lines)\n[Assistant]: Fixed.","firstKeptEntryId":"m7","tokensBefore":51234,"details":{"strategy":"verbatim-lines","promptVersion":3,"rung":"planned","parameters":{"compression_ratio":0.5,"preserve_recent":2,"query":"fix the test"},"stats":{"linesBefore":812,"linesDeleted":417,"linesKept":395,"rangeCount":63,"tokensBefore":51234,"tokensAfter":24980,"percentReduction":51.2}}}
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
On rebuild, Atomic emits the durable `summary` as a synthesized visible custom message, then emits original entries beginning at `firstKeptEntryId`. This exact
|
|
247
|
+
On rebuild, Atomic emits the durable `summary` as a synthesized visible custom message, then emits original entries beginning at a string `firstKeptEntryId`. When the field is `null`, it emits no pre-boundary ordinary entries. In both cases, messages appended after the boundary are emitted. This exact state survives resume without rerunning a planner. Existing records with string IDs retain their behavior; `details.rung` is `"planned"` or `"extension"`, and `details.backupPath` is optional.
|
|
248
248
|
|
|
249
249
|
Historical `compaction` records without `details.strategy: "verbatim-lines"` are retired summary-compaction records. They remain parseable and visible to audit/export tools but are inert in active LLM context.
|
|
250
250
|
|
|
@@ -332,8 +332,9 @@ Entries form a tree:
|
|
|
332
332
|
`buildSessionContext()` walks the active branch from root to leaf and replays model, thinking-level, and context-window changes. It selects the latest `compaction` entry whose `details.strategy` is `"verbatim-lines"`.
|
|
333
333
|
|
|
334
334
|
- With no active boundary, normal message, custom-message, and branch-summary entries are emitted verbatim.
|
|
335
|
-
- With a boundary, Atomic emits its durable string as a custom-role `customType:"compaction"` message, then original messages from
|
|
336
|
-
-
|
|
335
|
+
- With a boundary whose `firstKeptEntryId` is a string, Atomic emits its durable string as a custom-role `customType:"compaction"` message, then original messages from that ID onward, including messages appended after the boundary.
|
|
336
|
+
- With `firstKeptEntryId: null`, Atomic emits the boundary and post-boundary messages but no pre-boundary ordinary message.
|
|
337
|
+
- If a corrupt/foreign boundary's non-null `firstKeptEntryId` is absent, Atomic emits the boundary followed by post-boundary messages rather than resurrecting all older content.
|
|
337
338
|
- Legacy `context_compaction` entries and non-verbatim `compaction` entries are skipped as inert archival records.
|
|
338
339
|
## Parsing Example
|
|
339
340
|
|
|
@@ -425,7 +426,7 @@ for (const stage of stages.filter((session) => session.internal)) {
|
|
|
425
426
|
- `appendThinkingLevelChange(level)` - Record thinking change
|
|
426
427
|
- `appendContextWindowChange(contextWindow)` - Record context-window selection in tokens
|
|
427
428
|
- `appendModelChange(provider, modelId)` - Record model change
|
|
428
|
-
- `appendCompaction(compactedText, firstKeptEntryId, tokensBefore, details)` - Add a durable verbatim-line compaction boundary
|
|
429
|
+
- `appendCompaction(compactedText, firstKeptEntryId, tokensBefore, details)` - Add a durable verbatim-line compaction boundary; pass `null` when no pre-boundary message is retained
|
|
429
430
|
- `appendCustomEntry(customType, data?)` - Extension state (not in context)
|
|
430
431
|
- `appendSessionInfo(name)` - Set session display name
|
|
431
432
|
- `appendCustomMessageEntry(customType, content, display, details?)` - Extension message (in context)
|
package/docs/sessions.md
CHANGED
|
@@ -34,7 +34,7 @@ For the JSONL file format and SessionManager API, see [Session Format](/session-
|
|
|
34
34
|
| `/tree` | Navigate the current session tree |
|
|
35
35
|
| `/fork` | Create a new session from a previous user message |
|
|
36
36
|
| `/clone` | Duplicate the current active branch into a new session |
|
|
37
|
-
| `/compact` | Compact
|
|
37
|
+
| `/compact` | Compact transcript lines verbatim while preserving exactly the configured number of newest context-visible messages; see [Compaction](/compaction) |
|
|
38
38
|
| `/export [file]` | Export session to HTML |
|
|
39
39
|
| `/share` | Upload as private GitHub gist with shareable HTML link |
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@ For the JSONL file format and SessionManager API, see [Session Format](/session-
|
|
|
42
42
|
|
|
43
43
|
`/resume` opens an interactive session picker for the current project. `atomic -r` opens the same picker at startup.
|
|
44
44
|
|
|
45
|
-
When Atomic reconstructs a resumed session, the latest active verbatim `compaction` entry supplies a durable compacted transcript string followed by the original kept tail. Resume does not rerun a planner or re-derive omissions. Legacy logical-deletion `context_compaction` entries are inert archival records, so previously hidden content can re-enter context in sessions created by older versions.
|
|
45
|
+
When Atomic reconstructs a resumed session, the latest active verbatim `compaction` entry supplies a durable compacted transcript string followed by the exact original kept tail. A zero-retention boundary stores `firstKeptEntryId: null` and replays no pre-boundary ordinary message. Resume does not rerun a planner or re-derive omissions. Legacy logical-deletion `context_compaction` entries are inert archival records, so previously hidden content can re-enter context in sessions created by older versions.
|
|
46
46
|
|
|
47
47
|
In the picker you can:
|
|
48
48
|
|
|
@@ -55,6 +55,8 @@ In the picker you can:
|
|
|
55
55
|
|
|
56
56
|
When available, Atomic uses the `trash` CLI for deletion instead of permanently removing files.
|
|
57
57
|
|
|
58
|
+
The picker opens instantly: its header, search field, and loading indicator paint on the first frame, then sessions are discovered and parsed off the terminal's UI loop. Large session directories are scanned in cooperative batches and a single very large transcript is parsed in yielding chunks, so search, navigation, and cancel stay responsive and no individual session can freeze the picker while it loads. Closing the picker cancels any in-flight scan and discards stale results, so a slow load that finishes after you leave never updates the list.
|
|
59
|
+
|
|
58
60
|
### Internal (workflow) sessions
|
|
59
61
|
|
|
60
62
|
Sessions created by workflow stage execution are marked as **internal** and are excluded from the standard `/resume`, `atomic -r`, and `--continue` history by default. This keeps the resume picker focused on your interactive coding sessions. Workflow stage sessions remain fully discoverable and resumable through the workflow-specific path: use `/workflow resume <runId>` (or the workflow tool's resume/status actions) to inspect and continue a workflow run and its stages. A workflow stage session can still be opened directly by passing its file path to `--session`.
|
package/docs/settings.md
CHANGED
|
@@ -137,7 +137,7 @@ Set `ATOMIC_SKIP_VERSION_CHECK=1` to disable the Atomic version update check. Us
|
|
|
137
137
|
| `compaction.enabled` | boolean | `true` | Enable automatic verbatim line compaction |
|
|
138
138
|
| `compaction.reserveTokens` | number | `16384` | Tokens reserved for the next model response; automatic threshold compaction begins before this reserve is consumed |
|
|
139
139
|
| `compaction.compression_ratio` | number | `0.5` | Fraction of compactable transcript **lines to keep** (`0 < value < 1`) |
|
|
140
|
-
| `compaction.preserve_recent` | number | `2` |
|
|
140
|
+
| `compaction.preserve_recent` | number | `2` | Exact number of newest context-visible messages kept outside the compactable region; `0` keeps none |
|
|
141
141
|
| `compaction.query` | string | last user message | Optional relevance focus for selecting older lines to retain |
|
|
142
142
|
|
|
143
143
|
```json
|
|
@@ -152,7 +152,7 @@ Set `ATOMIC_SKIP_VERSION_CHECK=1` to disable the Atomic version update check. Us
|
|
|
152
152
|
}
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
The model emits numbered line ranges only; Atomic reconstructs retained text mechanically. `preserve_recent` is enforced client-side and is not a provider parameter.
|
|
155
|
+
The model emits numbered line ranges only; Atomic reconstructs retained text mechanically. `preserve_recent` is enforced client-side and is not a provider parameter. Atomic does not widen this exact message count to a user-turn boundary or force a final logical turn to remain outside compaction.
|
|
156
156
|
|
|
157
157
|
### Branch Summary
|
|
158
158
|
|
package/docs/subagents.md
CHANGED
|
@@ -37,9 +37,9 @@ Subagents now run and return their results directly. Atomic does not infer accep
|
|
|
37
37
|
|
|
38
38
|
## Foreground supervisor coordination
|
|
39
39
|
|
|
40
|
-
When a foreground child sends `intercom.ask`, `intercom.send`, or `contact_supervisor` coordination, Atomic first probes for the exact foreground owner. Only an exact live child reserves the request; Atomic then sends a generation-scoped detach commit and waits for that child to acknowledge it before placing the message in the parent's model-visible steering queue. Unmatched and background-child messages retain
|
|
40
|
+
When a foreground child sends `intercom.ask`, `intercom.send`, or `contact_supervisor` coordination, Atomic first probes for the exact foreground owner. Only an exact live child reserves the request; Atomic then sends a generation-scoped detach commit and waits for that child to acknowledge it before placing the message in the parent's model-visible steering queue. This first-refusal ordering also applies when the parent is a busy workflow stage: detach completes before the request enters the stage AgentSession generation boundary, breaking the child-waits-for-reply / stage-waits-for-child cycle. Unmatched and background-child messages retain existing routing—ordinary parents queue until idle, while open workflow stages fall back to their native generation admission. Blocking `need_decision` and `interview_request` calls remain actionable through [Intercom](/intercom)'s pending/reply tracker, and the exact threaded reply resumes the retained child without delayed duplicate delivery.
|
|
41
41
|
|
|
42
|
-
Only the matching foreground child
|
|
42
|
+
Only the matching foreground child can authorize release of the parent `subagent` tool. For a parallel foreground group, that accepted commit releases foreground supervision for every active sibling as one unit, so a long-running sibling cannot keep a blocking child request trapped behind the aggregate tool call; tasks still waiting behind the concurrency limit are skipped and never launched unsupervised. Active child processes stay alive under normal watchdog, cancellation, drain, and stdio cleanup ownership; each eventual completion replaces its detached placeholder. Run-owned worktrees remain attached until every detached child closes, then Atomic captures their diffs before cleanup. Fire-and-forget `intercom.send` and `progress_update` also release foreground supervision promptly, but do not create a reply waiter.
|
|
43
43
|
|
|
44
44
|
Blocking coordination is race-safe: a session holds at most one outbound reply waiter, and concurrent blocking requests (parallel `intercom.ask` calls, or `intercom.ask` racing `contact_supervisor`) settle atomically. One request wins the reservation; every other concurrent call returns a normal "Already waiting for a reply" tool error without crashing the agent process or disturbing the pending ask. Cancellation and send failures release only their own waiter, and threaded replies still resolve the exact winning request.
|
|
45
45
|
|
|
@@ -129,6 +129,8 @@ Completion delivery distinguishes two compatibility surfaces. Intercom delivery
|
|
|
129
129
|
|
|
130
130
|
Terminal background notifications preserve each child’s accepted Intercom order. Every broker message retains its sender timestamp and source session ID/name; bridged-child messages additionally carry their source run ID, agent, and child index. The deterministic child Intercom target and result-relay child mapping use the same run/agent/index identity, so duplicate display aliases remain isolated by run ownership. Before a paused, completed, or failed result is delivered, Intercom synchronously claims pre-terminal ordinary messages from those exact child targets and atomically admits the FIFO prelude plus terminal message as one ordered custom-message batch. A process-local bridge complements the extension event bus because lazily activated companion extensions may have distinct loader buses; duplicate bridge/event delivery is deduplicated by exact terminal identity even when the successful dispatch has no prelude. Failed dispatches remain retryable, and a resumed run’s later lifecycle terminal has a distinct identity. Terminal admission does not wait for a separate model turn, unrelated child entries remain independently queued, and exact threaded ask replies retain their correlation and timeout behavior.
|
|
131
131
|
|
|
132
|
+
Inside workflow stages, completion delivery observes the stage generation boundary. A completion received before the boundary closes is queued through the stage AgentSession and processed before the stage publishes its terminal snapshot. A detached completion that arrives after close is routed once to the parent/main chat and cannot automatically reopen or append to the completed stage transcript. Producers that are still running do not hold the stage open, so background work remains non-blocking; explicit post-mortem stage chat is still available separately.
|
|
133
|
+
|
|
132
134
|
When a workflow graph overlay is open, Atomic also publishes the live async subagent summary into the shared status surface. The below-editor async widget remains available when the workflow overlay is hidden, and the overlay statusline keeps the run count/state visible while the graph fills the terminal.
|
|
133
135
|
|
|
134
136
|
## Context and execution modes
|
|
@@ -146,6 +148,8 @@ Fresh child processes use normal Atomic package discovery when an agent omits `e
|
|
|
146
148
|
|
|
147
149
|
Top-level parallel calls support up to 50 subagents after expanding each task's optional `count`. The extension's `parallel.maxTasks` setting defaults to 50 and can enforce a lower task limit; `parallel.concurrency` independently controls how many of those children run at once.
|
|
148
150
|
|
|
151
|
+
Subagent tasks, parallel/chain items, and the top-level call accept a `group` field that sets the spawned child's [Intercom](/intercom) home group, so same-group subagents can intercom each other while staying isolated from other groups. A named string joins that group; `true` auto-generates one shared UUID group per parallel set (shared across all items in that set). Precedence is `explicit subagent group > inherited current-session (stage) group > env ATOMIC_INTERCOM_GROUP > config > "default"`. When a subagent does not specify a group, it **inherits the launching session's group** — read race-safely from the session, not from global env — so subagents spawned by a grouped workflow stage automatically join that stage's group and can coordinate with the stage and its sibling subagents. The child intercom group is applied only when the child actually has intercom access (the peer `intercom` tool or the subagent-only `contact_supervisor` tool); a child without intercom is never placed into a group. `contact_supervisor` still reaches the supervisor across group boundaries because Atomic requests a broker capability before spawn and binds the child's registration to the issuing supervisor. Foreground and single-child paths use exact child scopes; asynchronous chains use bounded per-child slots so indexes shifted by dynamic fanout remain valid. Capability environment values are explicitly cleared for descendants without a fresh grant, and parent-held grants are restored after reconnects. The lightweight Intercom wrapper lazy-loads the authorization provider; provider failures propagate and abort launch, while hosts without a provider omit supervisor metadata instead of exposing a broken `contact_supervisor` channel.
|
|
152
|
+
|
|
149
153
|
When a subagent call, parallel task, chain step, or background run uses a `cwd`, Atomic validates that working directory before starting the child runtime. Missing or non-directory paths are reported as `cwd` problems instead of lower-level process-spawn errors, so failures point at the requested child workspace rather than at the runtime binary.
|
|
150
154
|
|
|
151
155
|
Single-agent calls also accept `reads: string[] | false`. Atomic prepends those files as read context for foreground and background execution through the same path resolver, including `/run agent[reads=a.md+b.md]`. Relative entries resolve against the effective child `cwd` (including a relative top-level `cwd` resolved from the parent); absolute entries are unchanged. Invalid values fail before either child runtime starts.
|
|
@@ -257,5 +261,6 @@ Because the effort travels with each model string, every primary and fallback ca
|
|
|
257
261
|
## Related docs
|
|
258
262
|
|
|
259
263
|
- [Workflows](/workflows) for multi-stage reusable automation.
|
|
264
|
+
- [Intercom](/intercom) for cross-session messaging and supervisor escalation.
|
|
260
265
|
- [Skills](/skills) for reusable instructions invoked with `/skill:<name>`.
|
|
261
266
|
- [Settings](/settings) for user and project configuration.
|
package/docs/tui.md
CHANGED
|
@@ -99,6 +99,65 @@ pi.on("session_start", async (_event, ctx) => {
|
|
|
99
99
|
|
|
100
100
|
Pass `{ signal }` to `ctx.ui.custom()` when the UI belongs to an abortable operation. If the signal aborts, Atomic dismisses the custom UI and rejects the returned promise with the signal reason. For overlays, use `options.onHandle` to receive an overlay handle for programmatic visibility control.
|
|
101
101
|
|
|
102
|
+
In Atomic's default interactive mode, the component instance remains in the isolated engine child. The terminal host caches rendered lines and forwards input asynchronously, so `render()` and `handleInput()` must not depend on direct access to host process objects. The remote bridge preserves pi-tui's key-release contract: release events are filtered unless the child component sets `wantsKeyRelease = true`, matching a directly mounted component. Return values passed to `done()` must be JSON-safe.
|
|
103
|
+
|
|
104
|
+
### Host terminal modes from an isolated component
|
|
105
|
+
|
|
106
|
+
Because the component runs in the engine child — whose stdout is the JSONL transport, not a TTY — writing raw terminal escape sequences to `process.stdout` from `render()`/`handleInput()` is a no-op and never reaches the real host terminal. For the two host-terminal modes an overlay commonly needs, the factory `tui.terminal` exposes typed, allowlisted setters that the host applies to the real TTY over the engine protocol:
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
await ctx.ui.custom((tui, theme, keybindings, done) => {
|
|
110
|
+
tui.terminal.setMouseScrollTracking?.(true); // enable SGR mouse-scroll reporting on the host TTY
|
|
111
|
+
tui.terminal.setAutowrap?.(false); // disable autowrap (DECAWM) — Windows terminals only
|
|
112
|
+
return new MyOverlay({ onClose: done });
|
|
113
|
+
}, { overlay: true });
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
These are the only terminal controls exposed; arbitrary child bytes are never forwarded to the terminal. The host resets any mode a component enabled when the overlay hides, closes, is disposed, or when the engine child crashes/restarts, so a stranded child can never leave the terminal in mouse-reporting or autowrap-off mode. On non-isolated hosts and test seams the setters are absent, and callers should fall back to writing escape sequences to their own `process.stdout`.
|
|
117
|
+
|
|
118
|
+
### Host-native session picker
|
|
119
|
+
|
|
120
|
+
Remote-rendered components pay one host⇄child round trip per keypress under engine isolation. For session-style list pickers, the `ctx.ui.hostSessionPicker(request)` capability avoids that entirely: the terminal host mounts the real built-in `SessionSelectorComponent` and feeds it JSON-safe rows, so arrow-key navigation and search stay host-local and survive extension event-loop stalls. Only semantic events cross the host⇄extension boundary: the extension pushes row `update`s and `error`s (and may `close()` the picker); the host reports selection, cancel, and confirmed Ctrl+D deletes.
|
|
121
|
+
|
|
122
|
+
Every interactive host implements the same API — non-isolated mode mounts the selector directly in-process (no IPC at all), isolated mode routes it over the engine session-picker protocol channel — so callers never branch on the mode. The member is absent only on non-interactive surfaces (headless RPC, print); fail with an actionable error there instead of degrading to a hand-rolled picker.
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
const picker = ctx.ui.hostSessionPicker?.({
|
|
126
|
+
sessions: rows, // HostSessionPickerRow[]: SessionInfo with createdAt/modifiedAt epoch millis
|
|
127
|
+
showRenameHint: false,
|
|
128
|
+
onDelete: async (path) => {
|
|
129
|
+
// Deletion is extension-owned: the host keeps the row until you reply.
|
|
130
|
+
const outcome = await remove(path);
|
|
131
|
+
if (outcome.ok) picker!.update(rowsWithout(path));
|
|
132
|
+
else picker!.error(outcome.message);
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
if (!picker) throw new Error("This command requires an interactive session picker");
|
|
136
|
+
picker.update(await loadMoreRows()); // merge late rows into the open picker
|
|
137
|
+
const path = await picker.result; // selected row's path, or undefined on cancel
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The bundled workflows extension's `/workflow resume` picker is built exclusively on this channel.
|
|
141
|
+
|
|
142
|
+
### Host-native input form
|
|
143
|
+
|
|
144
|
+
Use `ctx.ui.hostInputForm(request)` for structured inline forms whose keyboard handling must remain responsive under interactive-engine isolation. The terminal host mounts and focuses the real form in the bottom editor slot (`overlay: false`); Tab/Shift+Tab, arrows, text editing, configured keybindings, Enter, Escape, and Ctrl+C are handled entirely in the host process. In isolated mode only the JSON-safe open request and the final submit/cancel event cross the engine boundary. Non-isolated mode mounts the same component directly.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
const values = await ctx.ui.hostInputForm?.({
|
|
148
|
+
title: "Release",
|
|
149
|
+
fields: [
|
|
150
|
+
{ name: "version", type: "string", required: true, initialValue: "" },
|
|
151
|
+
{ name: "channel", type: "select", choices: ["stable", "beta"], initialValue: "stable" },
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
if (values === undefined) return; // Escape, Ctrl+C, teardown, or close
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Field types are `string`, `text`, `number`, `integer`, `boolean`, and `select`. Initial and returned values are raw strings; the caller owns domain coercion. Every current interactive Atomic host exposes the optional capability, while headless RPC and print surfaces omit it. Keep a legacy fallback only when compatibility with older hosts is required.
|
|
158
|
+
|
|
159
|
+
The bundled `/workflow <name>` input picker uses this channel and retains its older custom-editor/`ctx.ui.custom()` paths only as compatibility fallbacks.
|
|
160
|
+
|
|
102
161
|
## Overlays
|
|
103
162
|
|
|
104
163
|
Overlays render components on top of existing content without clearing the screen. Pass `{ overlay: true }` to `ctx.ui.custom()`:
|
|
@@ -448,7 +507,7 @@ Set `ATOMIC_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout.
|
|
|
448
507
|
ATOMIC_TUI_WRITE_LOG=/tmp/tui-ansi.log atomic
|
|
449
508
|
```
|
|
450
509
|
|
|
451
|
-
Atomic vendors TUI components through the installed `@earendil-works/pi-tui` dependency
|
|
510
|
+
Atomic vendors TUI components through the installed `@earendil-works/pi-tui` dependency.
|
|
452
511
|
|
|
453
512
|
## Performance
|
|
454
513
|
|
|
@@ -760,7 +819,7 @@ ctx.ui.setWorkingIndicator({ frames: [] });
|
|
|
760
819
|
ctx.ui.setWorkingIndicator();
|
|
761
820
|
```
|
|
762
821
|
|
|
763
|
-
This only affects the normal streaming working indicator. Compaction and retry loaders keep their built-in styling. Custom frames are rendered verbatim, so extensions must add their own colors when needed.
|
|
822
|
+
This only affects the normal streaming working indicator. Compaction and retry loaders keep their built-in styling. During successful post-tool autocompaction, Atomic temporarily replaces the working indicator with the compaction loader and restores the working indicator before the same stream continues; no additional user input is required. Custom frames are rendered verbatim, so extensions must add their own colors when needed.
|
|
764
823
|
|
|
765
824
|
**Examples:** [working-indicator.ts](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/examples/extensions/working-indicator.ts)
|
|
766
825
|
|
package/docs/usage.md
CHANGED
|
@@ -39,7 +39,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
39
39
|
| `/model` | Switch models |
|
|
40
40
|
| `/scoped-models` | Enable/disable models for CTRL+P cycling |
|
|
41
41
|
| `/fast` | Toggle Codex fast mode for chat and workflow stages when `openai/*` or `openai-codex/*` models are available |
|
|
42
|
-
| `/workflow` | List/run workflows; manage runs (connect/inspect/pause/interrupt/resume
|
|
42
|
+
| `/workflow` | List/run workflows; manage runs (connect/inspect/pause/interrupt/quit/resume); reload workflow resources |
|
|
43
43
|
| `/settings` | Thinking level, theme, message delivery, transport |
|
|
44
44
|
| `/resume` | Pick from previous sessions |
|
|
45
45
|
| `/new` | Start a new session |
|
|
@@ -93,7 +93,7 @@ Useful session commands:
|
|
|
93
93
|
- `/tree` navigates the in-file session tree and can summarize abandoned branches.
|
|
94
94
|
- `/fork` creates a new session from an earlier user message.
|
|
95
95
|
- `/clone` duplicates the current active branch into a new session file.
|
|
96
|
-
- `/compact` uses verbatim line compaction: the model selects one-based numbered ranges to delete, Atomic validates them, and retained text is reconstructed mechanically with `(filtered N lines)` markers.
|
|
96
|
+
- `/compact` uses verbatim line compaction: the model selects one-based numbered ranges to delete, Atomic validates them, and retained text is reconstructed mechanically with `(filtered N lines)` markers. Exactly the configured number of newest context-visible messages remains ordinary; the default is two and zero preserves none.
|
|
97
97
|
|
|
98
98
|
See [Sessions](/sessions) and [Compaction](/compaction) for details.
|
|
99
99
|
|
|
@@ -122,7 +122,7 @@ Use `/export [file]` to write a session to HTML.
|
|
|
122
122
|
|
|
123
123
|
Use `/share` to upload a private GitHub gist with a shareable HTML link.
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
Treat exported and shared sessions as sensitive: transcripts can contain source code, file paths, credentials, and other private data from your session. Review a session before sharing it, and only upload transcripts you are comfortable making accessible to anyone with the link.
|
|
126
126
|
|
|
127
127
|
## CLI Reference
|
|
128
128
|
|
|
@@ -139,6 +139,7 @@ atomic uninstall <source> [-l] # Alias for remove
|
|
|
139
139
|
atomic update [source|self|atomic] # Update Atomic only, or one package source
|
|
140
140
|
atomic update --all # Update Atomic and packages; reconcile pinned git refs
|
|
141
141
|
atomic update --extensions # Update packages only; reconcile pinned git refs
|
|
142
|
+
atomic update --models # Force-refresh authenticated provider model catalogs
|
|
142
143
|
atomic update --self # Update Atomic only
|
|
143
144
|
atomic update --extension <src> # Update one package
|
|
144
145
|
atomic list # List installed packages
|
|
@@ -292,10 +293,10 @@ atomic --tools read,search,find,ls -p "Review the code"
|
|
|
292
293
|
| `PI_CACHE_RETENTION` | Provider/upstream-specific prompt-cache retention knob; set to `long` where supported |
|
|
293
294
|
| `VISUAL`, `EDITOR` | External editor for CTRL+G |
|
|
294
295
|
|
|
295
|
-
`PI_*` aliases are also supported for app-specific `ATOMIC_*` variables for legacy compatibility. For example, intercom honors `PI_CODING_AGENT_DIR` when `ATOMIC_CODING_AGENT_DIR` is unset and still reads legacy `~/.pi/agent/intercom/config.json` when the Atomic config is absent. `PI_CACHE_RETENTION` is not one of those aliases and has no `ATOMIC_*` equivalent. Use `PI_CACHE_RETENTION=long` when configuring prompt-cache retention for providers/upstreams that support long-lived caches. Intercom's default broker starter works across Node-based installs, Bun source checkouts, and standalone Atomic binaries without requiring `npx`, `tsx`, or `bun` to be present on `PATH`; custom broker commands remain explicit opt-in overrides.
|
|
296
|
+
`PI_*` aliases are also supported for app-specific `ATOMIC_*` variables for legacy compatibility. For example, [Intercom](/intercom) honors `PI_CODING_AGENT_DIR` when `ATOMIC_CODING_AGENT_DIR` is unset and still reads legacy `~/.pi/agent/intercom/config.json` when the Atomic config is absent. `PI_CACHE_RETENTION` is not one of those aliases and has no `ATOMIC_*` equivalent. Use `PI_CACHE_RETENTION=long` when configuring prompt-cache retention for providers/upstreams that support long-lived caches. Intercom's default broker starter works across Node-based installs, Bun source checkouts, and standalone Atomic binaries without requiring `npx`, `tsx`, or `bun` to be present on `PATH`; custom broker commands remain explicit opt-in overrides.
|
|
296
297
|
|
|
297
298
|
## Design Principles
|
|
298
299
|
|
|
299
|
-
Atomic keeps the core CLI small, while this distribution bundles first-party package extensions for workflows, subagents, MCP, web access, and intercom. Other workflows can still be installed as extensions or packages, or handled externally with tools such as containers and tmux.
|
|
300
|
+
Atomic keeps the core CLI small, while this distribution bundles first-party package extensions for workflows, subagents, MCP, web access, and [intercom](/intercom). Other workflows can still be installed as extensions or packages, or handled externally with tools such as containers and tmux.
|
|
300
301
|
|
|
301
302
|
For the full rationale, read the [blog post](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/).
|