@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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { parseInteractiveEngineCommand, serializeInteractiveEngineMessage, } from "./protocol.js";
|
|
2
|
+
/** Child-side owner for host-native input forms. */
|
|
3
|
+
export class EngineInputFormService {
|
|
4
|
+
constructor(write) {
|
|
5
|
+
this.active = new Map();
|
|
6
|
+
this.nextId = 0;
|
|
7
|
+
this.write = write;
|
|
8
|
+
}
|
|
9
|
+
open(request) {
|
|
10
|
+
const componentId = `input_form_${++this.nextId}`;
|
|
11
|
+
let resolveResult;
|
|
12
|
+
const result = new Promise((resolve) => { resolveResult = resolve; });
|
|
13
|
+
const record = {
|
|
14
|
+
settled: false,
|
|
15
|
+
resolve: (values) => {
|
|
16
|
+
if (record.settled)
|
|
17
|
+
return;
|
|
18
|
+
record.settled = true;
|
|
19
|
+
this.active.delete(componentId);
|
|
20
|
+
resolveResult(values);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
this.active.set(componentId, record);
|
|
24
|
+
this.send({ type: "engine_input_form_open", componentId, title: request.title, fields: request.fields.map((field) => ({ ...field, choices: field.choices ? [...field.choices] : undefined })) });
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
handleLine(line) {
|
|
28
|
+
const command = parseInteractiveEngineCommand(line);
|
|
29
|
+
if (!command || !command.type.startsWith("engine_input_form_"))
|
|
30
|
+
return false;
|
|
31
|
+
const record = this.active.get(command.componentId);
|
|
32
|
+
if (!record)
|
|
33
|
+
return true;
|
|
34
|
+
if (command.type === "engine_input_form_submit")
|
|
35
|
+
record.resolve(command.values);
|
|
36
|
+
else if (command.type === "engine_input_form_cancel")
|
|
37
|
+
record.resolve(undefined);
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
dispose() {
|
|
41
|
+
for (const record of this.active.values())
|
|
42
|
+
record.resolve(undefined);
|
|
43
|
+
this.active.clear();
|
|
44
|
+
}
|
|
45
|
+
send(message) {
|
|
46
|
+
this.write(serializeInteractiveEngineMessage(message));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=engine-input-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-input-form.js","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-input-form.ts"],"names":[],"mappings":"AACA,OAAO,EACN,6BAA6B,EAC7B,iCAAiC,GAEjC,MAAM,eAAe,CAAC;AAOvB,oDAAoD;AACpD,MAAM,OAAO,sBAAsB;IAIlC,YAAY,KAA6B;QAHxB,WAAM,GAAG,IAAI,GAAG,EAAsB,CAAC;QAEhD,WAAM,GAAG,CAAC,CAAC;QAElB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC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AAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,IAAI,OAAO,CAAC,IAAI,KAAK,0BAA0B;YAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;aAC3E,IAAI,OAAO,CAAC,IAAI,KAAK,0BAA0B;YAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChF,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO;QACN,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACrE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEO,IAAI,CAAC,OAAiC;QAC7C,IAAI,CAAC,KAAK,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,CAAC;CACD","sourcesContent":["import type { HostInputFormRequest } from \"../../core/extensions/ui-types.ts\";\nimport {\n\tparseInteractiveEngineCommand,\n\tserializeInteractiveEngineMessage,\n\ttype InteractiveEngineMessage,\n} from \"./protocol.ts\";\n\ninterface ActiveForm {\n\tsettled: boolean;\n\tresolve: (values: Record<string, string> | undefined) => void;\n}\n\n/** Child-side owner for host-native input forms. */\nexport class EngineInputFormService {\n\tprivate readonly active = new Map<string, ActiveForm>();\n\tprivate readonly write: (line: string) => void;\n\tprivate nextId = 0;\n\tconstructor(write: (line: string) => void) {\n\t\tthis.write = write;\n\t}\n\n\topen(request: HostInputFormRequest): Promise<Record<string, string> | undefined> {\n\t\tconst componentId = `input_form_${++this.nextId}`;\n\t\tlet resolveResult!: (values: Record<string, string> | undefined) => void;\n\t\tconst result = new Promise<Record<string, string> | undefined>((resolve) => { resolveResult = resolve; });\n\t\tconst record: ActiveForm = {\n\t\t\tsettled: false,\n\t\t\tresolve: (values) => {\n\t\t\t\tif (record.settled) return;\n\t\t\t\trecord.settled = true;\n\t\t\t\tthis.active.delete(componentId);\n\t\t\t\tresolveResult(values);\n\t\t\t},\n\t\t};\n\t\tthis.active.set(componentId, record);\n\t\tthis.send({ type: \"engine_input_form_open\", componentId, title: request.title, fields: request.fields.map((field) => ({ ...field, choices: field.choices ? [...field.choices] : undefined })) });\n\t\treturn result;\n\t}\n\n\thandleLine(line: string): boolean {\n\t\tconst command = parseInteractiveEngineCommand(line);\n\t\tif (!command || !command.type.startsWith(\"engine_input_form_\")) return false;\n\t\tconst record = this.active.get(command.componentId);\n\t\tif (!record) return true;\n\t\tif (command.type === \"engine_input_form_submit\") record.resolve(command.values);\n\t\telse if (command.type === \"engine_input_form_cancel\") record.resolve(undefined);\n\t\treturn true;\n\t}\n\n\tdispose(): void {\n\t\tfor (const record of this.active.values()) record.resolve(undefined);\n\t\tthis.active.clear();\n\t}\n\n\tprivate send(message: InteractiveEngineMessage): void {\n\t\tthis.write(serializeInteractiveEngineMessage(message));\n\t}\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ActivityWatchdogDiagnostic } from "./activity-watchdog.ts";
|
|
2
|
+
import { type InteractiveEngineMessage } from "./protocol.ts";
|
|
3
|
+
export declare class InteractiveEngineMonitor {
|
|
4
|
+
private readonly watchdog;
|
|
5
|
+
private readonly readiness;
|
|
6
|
+
private resolveReady;
|
|
7
|
+
private readonly bound;
|
|
8
|
+
private resolveBound;
|
|
9
|
+
private rejectBound;
|
|
10
|
+
private readonly onMessage;
|
|
11
|
+
constructor(onDiagnostic: (diagnostic: ActivityWatchdogDiagnostic) => void, onMessage: (message: InteractiveEngineMessage) => void);
|
|
12
|
+
stop(): void;
|
|
13
|
+
fail(error: Error): void;
|
|
14
|
+
waitUntilReady(timeoutMs?: number): Promise<void>;
|
|
15
|
+
waitUntilBound(): Promise<void>;
|
|
16
|
+
handleLine(line: string): boolean;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=engine-monitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-monitor.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-monitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAiC,KAAK,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE7F,qBAAa,wBAAwB;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAC1C,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8C;IAExE,YACC,YAAY,EAAE,CAAC,UAAU,EAAE,0BAA0B,KAAK,IAAI,EAC9D,SAAS,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,EAWtD;IAGD,IAAI,IAAI,IAAI,CAEX;IACD,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAA6B;IAE/C,cAAc,CAAC,SAAS,SAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrD;IAED,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAuB;IAEtD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAyBhC;CACD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ActivityWatchdog } from "./activity-watchdog.js";
|
|
2
|
+
import { parseInteractiveEngineMessage } from "./protocol.js";
|
|
3
|
+
export class InteractiveEngineMonitor {
|
|
4
|
+
constructor(onDiagnostic, onMessage) {
|
|
5
|
+
this.watchdog = new ActivityWatchdog({ onDiagnostic });
|
|
6
|
+
this.onMessage = onMessage;
|
|
7
|
+
this.readiness = new Promise((resolve) => {
|
|
8
|
+
this.resolveReady = resolve;
|
|
9
|
+
});
|
|
10
|
+
this.bound = new Promise((resolve, reject) => {
|
|
11
|
+
this.resolveBound = resolve;
|
|
12
|
+
this.rejectBound = reject;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
stop() {
|
|
16
|
+
this.watchdog.stop();
|
|
17
|
+
}
|
|
18
|
+
fail(error) { this.rejectBound(error); }
|
|
19
|
+
async waitUntilReady(timeoutMs = 5_000) {
|
|
20
|
+
let timeout;
|
|
21
|
+
try {
|
|
22
|
+
await Promise.race([
|
|
23
|
+
this.readiness,
|
|
24
|
+
new Promise((_, reject) => {
|
|
25
|
+
timeout = setTimeout(() => reject(new Error(`Interactive engine did not become ready within ${timeoutMs} ms`)), timeoutMs);
|
|
26
|
+
}),
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
if (timeout)
|
|
31
|
+
clearTimeout(timeout);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
waitUntilBound() { return this.bound; }
|
|
35
|
+
handleLine(line) {
|
|
36
|
+
const message = parseInteractiveEngineMessage(line);
|
|
37
|
+
if (!message)
|
|
38
|
+
return false;
|
|
39
|
+
this.onMessage(message);
|
|
40
|
+
switch (message.type) {
|
|
41
|
+
case "engine_ready":
|
|
42
|
+
this.watchdog.heartbeat();
|
|
43
|
+
this.watchdog.start();
|
|
44
|
+
this.resolveReady();
|
|
45
|
+
break;
|
|
46
|
+
case "engine_bound":
|
|
47
|
+
this.resolveBound();
|
|
48
|
+
break;
|
|
49
|
+
case "engine_heartbeat":
|
|
50
|
+
this.watchdog.heartbeat();
|
|
51
|
+
this.watchdog.start();
|
|
52
|
+
break;
|
|
53
|
+
case "engine_activity_started":
|
|
54
|
+
this.watchdog.activityStarted(message.activity);
|
|
55
|
+
break;
|
|
56
|
+
case "engine_activity_finished":
|
|
57
|
+
this.watchdog.activityFinished(message.activityId);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=engine-monitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-monitor.js","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-monitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmC,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,6BAA6B,EAAiC,MAAM,eAAe,CAAC;AAE7F,MAAM,OAAO,wBAAwB;IASpC,YACC,YAA8D,EAC9D,SAAsD;QAEtD,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACxC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;YAC5B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC3B,CAAC,CAAC,CAAC;IACJ,CAAC;IAGD,IAAI;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;IACD,IAAI,CAAC,KAAY,IAAU,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAErD,KAAK,CAAC,cAAc,CAAC,SAAS,GAAG,KAAK;QACrC,IAAI,OAAkD,CAAC;QACvD,IAAI,CAAC;YACJ,MAAM,OAAO,CAAC,IAAI,CAAC;gBAClB,IAAI,CAAC,SAAS;gBACd,IAAI,OAAO,CAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;o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chdogDiagnostic } from \"./activity-watchdog.ts\";\nimport { parseInteractiveEngineMessage, type InteractiveEngineMessage } from \"./protocol.ts\";\n\nexport class InteractiveEngineMonitor {\n\tprivate readonly watchdog: ActivityWatchdog;\n\tprivate readonly readiness: Promise<void>;\n\tprivate resolveReady!: () => void;\n\tprivate readonly bound: Promise<void>;\n\tprivate resolveBound!: () => void;\n\tprivate rejectBound!: (error: Error) => void;\n\tprivate readonly onMessage: (message: InteractiveEngineMessage) => void;\n\n\tconstructor(\n\t\tonDiagnostic: (diagnostic: ActivityWatchdogDiagnostic) => void,\n\t\tonMessage: (message: InteractiveEngineMessage) => void,\n\t) {\n\t\tthis.watchdog = new ActivityWatchdog({ onDiagnostic });\n\t\tthis.onMessage = onMessage;\n\t\tthis.readiness = new Promise((resolve) => {\n\t\t\tthis.resolveReady = resolve;\n\t\t});\n\t\tthis.bound = new Promise((resolve, reject) => {\n\t\t\tthis.resolveBound = resolve;\n\t\t\tthis.rejectBound = reject;\n\t\t});\n\t}\n\n\n\tstop(): void {\n\t\tthis.watchdog.stop();\n\t}\n\tfail(error: Error): void { this.rejectBound(error); }\n\n\tasync waitUntilReady(timeoutMs = 5_000): Promise<void> {\n\t\tlet timeout: ReturnType<typeof setTimeout> | undefined;\n\t\ttry {\n\t\t\tawait Promise.race([\n\t\t\t\tthis.readiness,\n\t\t\t\tnew Promise<never>((_, reject) => {\n\t\t\t\t\ttimeout = setTimeout(() => reject(new Error(`Interactive engine did not become ready within ${timeoutMs} ms`)), timeoutMs);\n\t\t\t\t}),\n\t\t\t]);\n\t\t} finally {\n\t\t\tif (timeout) clearTimeout(timeout);\n\t\t}\n\t}\n\n\twaitUntilBound(): Promise<void> { return this.bound; }\n\n\thandleLine(line: string): boolean {\n\t\tconst message = parseInteractiveEngineMessage(line);\n\t\tif (!message) return false;\n\t\tthis.onMessage(message);\n\t\tswitch (message.type) {\n\t\t\tcase \"engine_ready\":\n\t\t\t\tthis.watchdog.heartbeat();\n\t\t\t\tthis.watchdog.start();\n\t\t\t\tthis.resolveReady();\n\t\t\t\tbreak;\n\t\t\tcase \"engine_bound\":\n\t\t\t\tthis.resolveBound();\n\t\t\t\tbreak;\n\t\t\tcase \"engine_heartbeat\":\n\t\t\t\tthis.watchdog.heartbeat();\n\t\t\t\tthis.watchdog.start();\n\t\t\t\tbreak;\n\t\t\tcase \"engine_activity_started\":\n\t\t\t\tthis.watchdog.activityStarted(message.activity);\n\t\t\t\tbreak;\n\t\t\tcase \"engine_activity_finished\":\n\t\t\t\tthis.watchdog.activityFinished(message.activityId);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AgentSession } from "../../core/agent-session.ts";
|
|
2
|
+
export declare class EngineRenderService {
|
|
3
|
+
private readonly records;
|
|
4
|
+
private session;
|
|
5
|
+
private readonly write;
|
|
6
|
+
constructor(write: (line: string) => void);
|
|
7
|
+
bindSession(session: AgentSession): void;
|
|
8
|
+
handleLine(line: string): boolean;
|
|
9
|
+
dispose(): void;
|
|
10
|
+
private boundSession;
|
|
11
|
+
private createTerminal;
|
|
12
|
+
private renderTool;
|
|
13
|
+
private renderMessage;
|
|
14
|
+
private disposeRecord;
|
|
15
|
+
private send;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=engine-render-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-render-service.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-render-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAkEhE,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAC3D,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyB;IAE/C,YAAY,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAExC;IAED,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAGvC;IAED,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAuBhC;IAED,OAAO,IAAI,IAAI,CAEd;IAED,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,UAAU;IAoClB,OAAO,CAAC,aAAa;IAoBrB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,IAAI;CAGZ"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { TUI } from "@earendil-works/pi-tui";
|
|
2
|
+
import { runCallback } from "../../core/callback-activity.js";
|
|
3
|
+
import { CustomMessageComponent } from "../interactive/components/custom-message.js";
|
|
4
|
+
import { ToolExecutionComponent } from "../interactive/components/tool-execution.js";
|
|
5
|
+
import { INTERACTIVE_ENGINE_MAX_FRAME_BYTES, parseInteractiveEngineCommand, serializeInteractiveEngineMessage, } from "./protocol.js";
|
|
6
|
+
class RenderTerminal {
|
|
7
|
+
constructor(requestRender) {
|
|
8
|
+
this.columns = 80;
|
|
9
|
+
this.rows = 24;
|
|
10
|
+
this.kittyProtocolActive = false;
|
|
11
|
+
this.requestRender = requestRender;
|
|
12
|
+
}
|
|
13
|
+
start() { }
|
|
14
|
+
stop() { }
|
|
15
|
+
async drainInput() { }
|
|
16
|
+
write() { this.requestRender(); }
|
|
17
|
+
moveBy() { }
|
|
18
|
+
hideCursor() { }
|
|
19
|
+
showCursor() { }
|
|
20
|
+
clearLine() { }
|
|
21
|
+
clearFromCursor() { }
|
|
22
|
+
clearScreen() { }
|
|
23
|
+
setTitle() { }
|
|
24
|
+
setProgress() { }
|
|
25
|
+
}
|
|
26
|
+
function boundedLines(lines) {
|
|
27
|
+
let remaining = INTERACTIVE_ENGINE_MAX_FRAME_BYTES - 512;
|
|
28
|
+
const result = [];
|
|
29
|
+
for (const line of lines) {
|
|
30
|
+
if (remaining <= 0)
|
|
31
|
+
break;
|
|
32
|
+
const bytes = Buffer.from(line);
|
|
33
|
+
const value = bytes.length <= remaining ? line : bytes.subarray(0, remaining).toString("utf8");
|
|
34
|
+
result.push(value);
|
|
35
|
+
remaining -= Buffer.byteLength(value, "utf8");
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
export class EngineRenderService {
|
|
40
|
+
constructor(write) {
|
|
41
|
+
this.records = new Map();
|
|
42
|
+
this.write = write;
|
|
43
|
+
}
|
|
44
|
+
bindSession(session) {
|
|
45
|
+
this.dispose();
|
|
46
|
+
this.session = session;
|
|
47
|
+
}
|
|
48
|
+
handleLine(line) {
|
|
49
|
+
const command = parseInteractiveEngineCommand(line);
|
|
50
|
+
if (!command || !command.type.startsWith("engine_") || command.type.startsWith("engine_custom_"))
|
|
51
|
+
return false;
|
|
52
|
+
if (command.type === "engine_render_dispose") {
|
|
53
|
+
this.disposeRecord(command.componentId);
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
if (command.type !== "engine_tool_render" && command.type !== "engine_message_render")
|
|
57
|
+
return false;
|
|
58
|
+
const name = command.type === "engine_tool_render" ? `tool:${command.toolName}` : `message:${command.message.customType ?? "custom"}`;
|
|
59
|
+
void runCallback({ kind: "renderer", name }, async () => {
|
|
60
|
+
return command.type === "engine_tool_render" ? this.renderTool(command) : this.renderMessage(command);
|
|
61
|
+
}).then((lines) => this.send({
|
|
62
|
+
type: "engine_custom_frame",
|
|
63
|
+
componentId: command.componentId,
|
|
64
|
+
requestId: command.requestId,
|
|
65
|
+
lines,
|
|
66
|
+
})).catch((error) => this.send({
|
|
67
|
+
type: "engine_custom_frame",
|
|
68
|
+
componentId: command.componentId,
|
|
69
|
+
requestId: command.requestId,
|
|
70
|
+
lines: [`Remote renderer failed: ${error.message}`],
|
|
71
|
+
}));
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
dispose() {
|
|
75
|
+
for (const id of [...this.records.keys()])
|
|
76
|
+
this.disposeRecord(id);
|
|
77
|
+
}
|
|
78
|
+
boundSession() {
|
|
79
|
+
const session = this.session;
|
|
80
|
+
if (!session)
|
|
81
|
+
throw new Error("Renderer session is not bound");
|
|
82
|
+
return session;
|
|
83
|
+
}
|
|
84
|
+
createTerminal(componentId) {
|
|
85
|
+
return new RenderTerminal(() => this.send({ type: "engine_custom_invalidate", componentId }));
|
|
86
|
+
}
|
|
87
|
+
renderTool(command) {
|
|
88
|
+
let record = this.records.get(command.componentId);
|
|
89
|
+
if (record?.kind !== "tool") {
|
|
90
|
+
const session = this.boundSession();
|
|
91
|
+
this.disposeRecord(command.componentId);
|
|
92
|
+
const terminal = this.createTerminal(command.componentId);
|
|
93
|
+
terminal.columns = Math.max(1, command.width);
|
|
94
|
+
const tui = new TUI(terminal);
|
|
95
|
+
const component = new ToolExecutionComponent(command.toolName, command.toolCallId, command.args, { showImages: command.showImages, imageWidthCells: command.imageWidthCells }, session.getToolDefinition(command.toolName), tui, session.sessionManager.getCwd());
|
|
96
|
+
tui.addChild(component);
|
|
97
|
+
record = { kind: "tool", component, terminal, tui };
|
|
98
|
+
this.records.set(command.componentId, record);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
record.terminal.columns = Math.max(1, command.width);
|
|
102
|
+
record.component.updateArgs(command.args);
|
|
103
|
+
record.component.setShowImages(command.showImages);
|
|
104
|
+
record.component.setImageWidthCells(command.imageWidthCells);
|
|
105
|
+
}
|
|
106
|
+
const tool = record.component;
|
|
107
|
+
if (command.executionStarted)
|
|
108
|
+
tool.markExecutionStarted();
|
|
109
|
+
if (command.argsComplete)
|
|
110
|
+
tool.setArgsComplete();
|
|
111
|
+
tool.setExpanded(command.expanded);
|
|
112
|
+
if (command.result) {
|
|
113
|
+
tool.updateResult(command.result, command.isPartial);
|
|
114
|
+
}
|
|
115
|
+
return boundedLines(tool.render(command.width));
|
|
116
|
+
}
|
|
117
|
+
renderMessage(command) {
|
|
118
|
+
let record = this.records.get(command.componentId);
|
|
119
|
+
if (record?.kind !== "message") {
|
|
120
|
+
const session = this.boundSession();
|
|
121
|
+
this.disposeRecord(command.componentId);
|
|
122
|
+
const terminal = this.createTerminal(command.componentId);
|
|
123
|
+
terminal.columns = Math.max(1, command.width);
|
|
124
|
+
const tui = new TUI(terminal);
|
|
125
|
+
const message = command.message;
|
|
126
|
+
const component = new CustomMessageComponent(message, session.extensionRunner.getMessageRenderer(message.customType));
|
|
127
|
+
tui.addChild(component);
|
|
128
|
+
record = { kind: "message", component, terminal, tui };
|
|
129
|
+
this.records.set(command.componentId, record);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
record.terminal.columns = Math.max(1, command.width);
|
|
133
|
+
}
|
|
134
|
+
record.component.setExpanded(command.expanded);
|
|
135
|
+
return boundedLines(record.component.render(command.width));
|
|
136
|
+
}
|
|
137
|
+
disposeRecord(id) {
|
|
138
|
+
const record = this.records.get(id);
|
|
139
|
+
if (!record)
|
|
140
|
+
return;
|
|
141
|
+
this.records.delete(id);
|
|
142
|
+
if (record.kind === "tool")
|
|
143
|
+
record.component.dispose();
|
|
144
|
+
record.tui.stop();
|
|
145
|
+
}
|
|
146
|
+
send(message) {
|
|
147
|
+
this.write(serializeInteractiveEngineMessage(message));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=engine-render-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-render-service.js","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-render-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EACN,kCAAkC,EAGlC,6BAA6B,EAC7B,iCAAiC,GACjC,MAAM,eAAe,CAAC;AAoBvB,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O,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACtD,CAAC;QACD,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC/C,OAAO,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEO,aAAa,CAAC,EAAU;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACpC,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACxB,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM;YAAE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACvD,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;IAEO,IAAI,CAAC,OAAiC;QAC7C,IAAI,CAAC,KAAK,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,CAAC;CACD","sourcesContent":["import type { Terminal } from \"@earendil-works/pi-tui\";\nimport { TUI } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../core/agent-session.ts\";\nimport { runCallback } from \"../../core/callback-activity.ts\";\nimport type { CustomMessage } from \"../../core/messages.ts\";\nimport { CustomMessageComponent } from \"../interactive/components/custom-message.ts\";\nimport { ToolExecutionComponent } from \"../interactive/components/tool-execution.ts\";\nimport {\n\tINTERACTIVE_ENGINE_MAX_FRAME_BYTES,\n\ttype InteractiveEngineCommand,\n\ttype InteractiveEngineMessage,\n\tparseInteractiveEngineCommand,\n\tserializeInteractiveEngineMessage,\n} from \"./protocol.ts\";\n\ntype ToolRenderCommand = Extract<InteractiveEngineCommand, { type: \"engine_tool_render\" }>;\ntype MessageRenderCommand = Extract<InteractiveEngineCommand, { type: \"engine_message_render\" }>;\n\n/**\n * Cached per-componentId render state. Records are REUSED across render\n * requests: recreating (and re-seeding) the component on every request made\n * the seeding setters call `ui.requestRender()` each time, whose eventual\n * terminal write emitted `engine_custom_invalidate` back to the host, which\n * re-sent the render request — a self-sustaining host⇄engine render\n * ping-pong that presented as full-screen TUI flicker (quit/pause while a\n * workflow stage streams). Reuse plus idempotent seeding setters lets the\n * loop converge after at most one round trip while still forwarding\n * legitimate async invalidations (e.g. image conversion).\n */\ntype RenderRecord =\n\t| { kind: \"message\"; component: CustomMessageComponent; terminal: RenderTerminal; tui: TUI }\n\t| { kind: \"tool\"; component: ToolExecutionComponent; terminal: RenderTerminal; tui: TUI };\n\nclass RenderTerminal implements Terminal {\n\tcolumns = 80;\n\trows = 24;\n\tkittyProtocolActive = false;\n\tprivate readonly requestRender: () => void;\n\tconstructor(requestRender: () => void) {\n\t\tthis.requestRender = requestRender;\n\t}\n\tstart(): void {}\n\tstop(): void {}\n\tasync drainInput(): Promise<void> {}\n\twrite(): void { this.requestRender(); }\n\tmoveBy(): void {}\n\thideCursor(): void {}\n\tshowCursor(): void {}\n\tclearLine(): void {}\n\tclearFromCursor(): void {}\n\tclearScreen(): void {}\n\tsetTitle(): void {}\n\tsetProgress(): void {}\n}\n\nfunction boundedLines(lines: string[]): string[] {\n\tlet remaining = INTERACTIVE_ENGINE_MAX_FRAME_BYTES - 512;\n\tconst result: string[] = [];\n\tfor (const line of lines) {\n\t\tif (remaining <= 0) break;\n\t\tconst bytes = Buffer.from(line);\n\t\tconst value = bytes.length <= remaining ? line : bytes.subarray(0, remaining).toString(\"utf8\");\n\t\tresult.push(value);\n\t\tremaining -= Buffer.byteLength(value, \"utf8\");\n\t}\n\treturn result;\n}\n\nexport class EngineRenderService {\n\tprivate readonly records = new Map<string, RenderRecord>();\n\tprivate session: AgentSession | undefined;\n\tprivate readonly write: (line: string) => void;\n\n\tconstructor(write: (line: string) => void) {\n\t\tthis.write = write;\n\t}\n\n\tbindSession(session: AgentSession): void {\n\t\tthis.dispose();\n\t\tthis.session = session;\n\t}\n\n\thandleLine(line: string): boolean {\n\t\tconst command = parseInteractiveEngineCommand(line);\n\t\tif (!command || !command.type.startsWith(\"engine_\") || command.type.startsWith(\"engine_custom_\")) return false;\n\t\tif (command.type === \"engine_render_dispose\") {\n\t\t\tthis.disposeRecord(command.componentId);\n\t\t\treturn true;\n\t\t}\n\t\tif (command.type !== \"engine_tool_render\" && command.type !== \"engine_message_render\") return false;\n\t\tconst name = command.type === \"engine_tool_render\" ? `tool:${command.toolName}` : `message:${command.message.customType ?? \"custom\"}`;\n\t\tvoid runCallback({ kind: \"renderer\", name }, async () => {\n\t\t\treturn command.type === \"engine_tool_render\" ? this.renderTool(command) : this.renderMessage(command);\n\t\t}).then((lines) => this.send({\n\t\t\ttype: \"engine_custom_frame\",\n\t\t\tcomponentId: command.componentId,\n\t\t\trequestId: command.requestId,\n\t\t\tlines,\n\t\t})).catch((error: Error) => this.send({\n\t\t\ttype: \"engine_custom_frame\",\n\t\t\tcomponentId: command.componentId,\n\t\t\trequestId: command.requestId,\n\t\t\tlines: [`Remote renderer failed: ${error.message}`],\n\t\t}));\n\t\treturn true;\n\t}\n\n\tdispose(): void {\n\t\tfor (const id of [...this.records.keys()]) this.disposeRecord(id);\n\t}\n\n\tprivate boundSession(): AgentSession {\n\t\tconst session = this.session;\n\t\tif (!session) throw new Error(\"Renderer session is not bound\");\n\t\treturn session;\n\t}\n\n\tprivate createTerminal(componentId: string): RenderTerminal {\n\t\treturn new RenderTerminal(() => this.send({ type: \"engine_custom_invalidate\", componentId }));\n\t}\n\n\tprivate renderTool(command: ToolRenderCommand): string[] {\n\t\tlet record = this.records.get(command.componentId);\n\t\tif (record?.kind !== \"tool\") {\n\t\t\tconst session = this.boundSession();\n\t\t\tthis.disposeRecord(command.componentId);\n\t\t\tconst terminal = this.createTerminal(command.componentId);\n\t\t\tterminal.columns = Math.max(1, command.width);\n\t\t\tconst tui = new TUI(terminal);\n\t\t\tconst component = new ToolExecutionComponent(\n\t\t\t\tcommand.toolName,\n\t\t\t\tcommand.toolCallId,\n\t\t\t\tcommand.args,\n\t\t\t\t{ showImages: command.showImages, imageWidthCells: command.imageWidthCells },\n\t\t\t\tsession.getToolDefinition(command.toolName),\n\t\t\t\ttui,\n\t\t\t\tsession.sessionManager.getCwd(),\n\t\t\t);\n\t\t\ttui.addChild(component);\n\t\t\trecord = { kind: \"tool\", component, terminal, tui };\n\t\t\tthis.records.set(command.componentId, record);\n\t\t} else {\n\t\t\trecord.terminal.columns = Math.max(1, command.width);\n\t\t\trecord.component.updateArgs(command.args);\n\t\t\trecord.component.setShowImages(command.showImages);\n\t\t\trecord.component.setImageWidthCells(command.imageWidthCells);\n\t\t}\n\t\tconst tool = record.component;\n\t\tif (command.executionStarted) tool.markExecutionStarted();\n\t\tif (command.argsComplete) tool.setArgsComplete();\n\t\ttool.setExpanded(command.expanded);\n\t\tif (command.result) {\n\t\t\ttool.updateResult(command.result as unknown as Parameters<ToolExecutionComponent[\"updateResult\"]>[0], command.isPartial);\n\t\t}\n\t\treturn boundedLines(tool.render(command.width));\n\t}\n\n\tprivate renderMessage(command: MessageRenderCommand): string[] {\n\t\tlet record = this.records.get(command.componentId);\n\t\tif (record?.kind !== \"message\") {\n\t\t\tconst session = this.boundSession();\n\t\t\tthis.disposeRecord(command.componentId);\n\t\t\tconst terminal = this.createTerminal(command.componentId);\n\t\t\tterminal.columns = Math.max(1, command.width);\n\t\t\tconst tui = new TUI(terminal);\n\t\t\tconst message = command.message as unknown as CustomMessage<object>;\n\t\t\tconst component = new CustomMessageComponent(message, session.extensionRunner.getMessageRenderer(message.customType));\n\t\t\ttui.addChild(component);\n\t\t\trecord = { kind: \"message\", component, terminal, tui };\n\t\t\tthis.records.set(command.componentId, record);\n\t\t} else {\n\t\t\trecord.terminal.columns = Math.max(1, command.width);\n\t\t}\n\t\trecord.component.setExpanded(command.expanded);\n\t\treturn boundedLines(record.component.render(command.width));\n\t}\n\n\tprivate disposeRecord(id: string): void {\n\t\tconst record = this.records.get(id);\n\t\tif (!record) return;\n\t\tthis.records.delete(id);\n\t\tif (record.kind === \"tool\") record.component.dispose();\n\t\trecord.tui.stop();\n\t}\n\n\tprivate send(message: InteractiveEngineMessage): void {\n\t\tthis.write(serializeInteractiveEngineMessage(message));\n\t}\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HostSessionPickerHandle, HostSessionPickerRequest } from "../../core/extensions/ui-types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Child-side half of the host-native session picker channel.
|
|
4
|
+
*
|
|
5
|
+
* Runs in the interactive-engine child and backs the optional
|
|
6
|
+
* `ctx.ui.hostSessionPicker()` capability: `open()` ships JSON-safe rows to the
|
|
7
|
+
* terminal host, which mounts the REAL `SessionSelectorComponent` locally so
|
|
8
|
+
* arrow-key navigation and search never cross the process boundary. Only the
|
|
9
|
+
* semantic events do — open/update/error/close travel child→host as engine
|
|
10
|
+
* messages, and select/cancel/delete travel host→child as engine commands.
|
|
11
|
+
*/
|
|
12
|
+
export declare class EngineSessionPickerService {
|
|
13
|
+
private readonly active;
|
|
14
|
+
private nextId;
|
|
15
|
+
private readonly write;
|
|
16
|
+
constructor(write: (line: string) => void);
|
|
17
|
+
open(request: HostSessionPickerRequest): HostSessionPickerHandle;
|
|
18
|
+
handleLine(line: string): boolean;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
private send;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=engine-session-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-session-picker.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-session-picker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,wBAAwB,EAExB,MAAM,mCAAmC,CAAC;AAa3C;;;;;;;;;GASG;AACH,qBAAa,0BAA0B;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyB;IAE/C,YAAY,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAExC;IAED,IAAI,CAAC,OAAO,EAAE,wBAAwB,GAAG,uBAAuB,CAqC/D;IAED,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAiChC;IAED,OAAO,IAAI,IAAI,CAGd;IAED,OAAO,CAAC,IAAI;CAGZ"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { parseInteractiveEngineCommand, serializeInteractiveEngineMessage, } from "./protocol.js";
|
|
2
|
+
/**
|
|
3
|
+
* Child-side half of the host-native session picker channel.
|
|
4
|
+
*
|
|
5
|
+
* Runs in the interactive-engine child and backs the optional
|
|
6
|
+
* `ctx.ui.hostSessionPicker()` capability: `open()` ships JSON-safe rows to the
|
|
7
|
+
* terminal host, which mounts the REAL `SessionSelectorComponent` locally so
|
|
8
|
+
* arrow-key navigation and search never cross the process boundary. Only the
|
|
9
|
+
* semantic events do — open/update/error/close travel child→host as engine
|
|
10
|
+
* messages, and select/cancel/delete travel host→child as engine commands.
|
|
11
|
+
*/
|
|
12
|
+
export class EngineSessionPickerService {
|
|
13
|
+
constructor(write) {
|
|
14
|
+
this.active = new Map();
|
|
15
|
+
this.nextId = 0;
|
|
16
|
+
this.write = write;
|
|
17
|
+
}
|
|
18
|
+
open(request) {
|
|
19
|
+
const componentId = `session_picker_${++this.nextId}`;
|
|
20
|
+
let resolveResult;
|
|
21
|
+
const result = new Promise((resolve) => { resolveResult = resolve; });
|
|
22
|
+
const record = {
|
|
23
|
+
settled: false,
|
|
24
|
+
resolve: (path) => {
|
|
25
|
+
if (record.settled)
|
|
26
|
+
return;
|
|
27
|
+
record.settled = true;
|
|
28
|
+
this.active.delete(componentId);
|
|
29
|
+
resolveResult(path);
|
|
30
|
+
},
|
|
31
|
+
...(request.onDelete ? { onDelete: request.onDelete } : {}),
|
|
32
|
+
};
|
|
33
|
+
this.active.set(componentId, record);
|
|
34
|
+
this.send({
|
|
35
|
+
type: "engine_session_picker_open",
|
|
36
|
+
componentId,
|
|
37
|
+
sessions: [...request.sessions],
|
|
38
|
+
...(request.showRenameHint !== undefined ? { showRenameHint: request.showRenameHint } : {}),
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
result,
|
|
42
|
+
update: (sessions) => {
|
|
43
|
+
if (record.settled)
|
|
44
|
+
return;
|
|
45
|
+
this.send({ type: "engine_session_picker_update", componentId, sessions: [...sessions] });
|
|
46
|
+
},
|
|
47
|
+
error: (message) => {
|
|
48
|
+
if (record.settled)
|
|
49
|
+
return;
|
|
50
|
+
this.send({ type: "engine_session_picker_error", componentId, message });
|
|
51
|
+
},
|
|
52
|
+
close: () => {
|
|
53
|
+
if (record.settled)
|
|
54
|
+
return;
|
|
55
|
+
this.send({ type: "engine_session_picker_close", componentId });
|
|
56
|
+
record.resolve(undefined);
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
handleLine(line) {
|
|
61
|
+
const command = parseInteractiveEngineCommand(line);
|
|
62
|
+
if (!command || !command.type.startsWith("engine_session_picker_"))
|
|
63
|
+
return false;
|
|
64
|
+
const record = this.active.get(command.componentId);
|
|
65
|
+
if (!record)
|
|
66
|
+
return true;
|
|
67
|
+
switch (command.type) {
|
|
68
|
+
case "engine_session_picker_select":
|
|
69
|
+
record.resolve(command.path);
|
|
70
|
+
break;
|
|
71
|
+
case "engine_session_picker_cancel":
|
|
72
|
+
record.resolve(undefined);
|
|
73
|
+
break;
|
|
74
|
+
case "engine_session_picker_delete":
|
|
75
|
+
if (!record.onDelete) {
|
|
76
|
+
this.send({
|
|
77
|
+
type: "engine_session_picker_error",
|
|
78
|
+
componentId: command.componentId,
|
|
79
|
+
message: "Deletion is not supported for this picker",
|
|
80
|
+
});
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
void Promise.resolve(record.onDelete(command.path)).catch((error) => {
|
|
84
|
+
if (record.settled)
|
|
85
|
+
return;
|
|
86
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
87
|
+
this.send({
|
|
88
|
+
type: "engine_session_picker_error",
|
|
89
|
+
componentId: command.componentId,
|
|
90
|
+
message: `Failed to delete: ${message}`,
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
dispose() {
|
|
98
|
+
for (const record of [...this.active.values()])
|
|
99
|
+
record.resolve(undefined);
|
|
100
|
+
this.active.clear();
|
|
101
|
+
}
|
|
102
|
+
send(message) {
|
|
103
|
+
this.write(serializeInteractiveEngineMessage(message));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=engine-session-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-session-picker.js","sourceRoot":"","sources":["../../../src/modes/interactive-engine/engine-session-picker.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,6BAA6B,EAC7B,iCAAiC,GAEjC,MAAM,eAAe,CAAC;AAQvB;;;;;;;;;GASG;AACH,MAAM,OAAO,0BAA0B;IAKtC,YAAY,KAA6B;QAJxB,WAAM,GAAG,IAAI,GAAG,EAAwB,CAAC;QAClD,WAAM,GAAG,CAAC,CAAC;QAIlB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,CAAC,OAAiC;QACrC,MAAM,WAAW,GAAG,kBAAkB,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QACtD,IAAI,aAAkD,CAAC;QACvD,MAAM,MAAM,GAAG,IAAI,OAAO,CAAqB,CAAC,OAAO,EAAE,EAAE,GAAG,aAAa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AI,MAAM,CAAC,OAAO;wBAAE,OAAO;oBAC3B,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBACvE,IAAI,CAAC,IAAI,CAAC;wBACT,IAAI,EAAE,6BAA6B;wBACnC,WAAW,EAAE,OAAO,CAAC,WAAW;wBAChC,OAAO,EAAE,qBAAqB,OAAO,EAAE;qBACvC,CAAC,CAAC;gBACJ,CAAC,CAAC,CAAC;gBACH,MAAM;QACR,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO;QACN,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEO,IAAI,CAAC,OAAiC;QAC7C,IAAI,CAAC,KAAK,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,CAAC;CACD","sourcesContent":["import type {\n\tHostSessionPickerHandle,\n\tHostSessionPickerRequest,\n\tHostSessionPickerRow,\n} from \"../../core/extensions/ui-types.ts\";\nimport {\n\tparseInteractiveEngineCommand,\n\tserializeInteractiveEngineMessage,\n\ttype InteractiveEngineMessage,\n} from \"./protocol.ts\";\n\ninterface ActivePicker {\n\tsettled: boolean;\n\tresolve: (path: string | undefined) => void;\n\tonDelete?: (path: string) => void | Promise<void>;\n}\n\n/**\n * Child-side half of the host-native session picker channel.\n *\n * Runs in the interactive-engine child and backs the optional\n * `ctx.ui.hostSessionPicker()` capability: `open()` ships JSON-safe rows to the\n * terminal host, which mounts the REAL `SessionSelectorComponent` locally so\n * arrow-key navigation and search never cross the process boundary. Only the\n * semantic events do — open/update/error/close travel child→host as engine\n * messages, and select/cancel/delete travel host→child as engine commands.\n */\nexport class EngineSessionPickerService {\n\tprivate readonly active = new Map<string, ActivePicker>();\n\tprivate nextId = 0;\n\tprivate readonly write: (line: string) => void;\n\n\tconstructor(write: (line: string) => void) {\n\t\tthis.write = write;\n\t}\n\n\topen(request: HostSessionPickerRequest): HostSessionPickerHandle {\n\t\tconst componentId = `session_picker_${++this.nextId}`;\n\t\tlet resolveResult!: (path: string | undefined) => void;\n\t\tconst result = new Promise<string | undefined>((resolve) => { resolveResult = resolve; });\n\t\tconst record: ActivePicker = {\n\t\t\tsettled: false,\n\t\t\tresolve: (path) => {\n\t\t\t\tif (record.settled) return;\n\t\t\t\trecord.settled = true;\n\t\t\t\tthis.active.delete(componentId);\n\t\t\t\tresolveResult(path);\n\t\t\t},\n\t\t\t...(request.onDelete ? { onDelete: request.onDelete } : {}),\n\t\t};\n\t\tthis.active.set(componentId, record);\n\t\tthis.send({\n\t\t\ttype: \"engine_session_picker_open\",\n\t\t\tcomponentId,\n\t\t\tsessions: [...request.sessions],\n\t\t\t...(request.showRenameHint !== undefined ? { showRenameHint: request.showRenameHint } : {}),\n\t\t});\n\t\treturn {\n\t\t\tresult,\n\t\t\tupdate: (sessions: HostSessionPickerRow[]) => {\n\t\t\t\tif (record.settled) return;\n\t\t\t\tthis.send({ type: \"engine_session_picker_update\", componentId, sessions: [...sessions] });\n\t\t\t},\n\t\t\terror: (message: string) => {\n\t\t\t\tif (record.settled) return;\n\t\t\t\tthis.send({ type: \"engine_session_picker_error\", componentId, message });\n\t\t\t},\n\t\t\tclose: () => {\n\t\t\t\tif (record.settled) return;\n\t\t\t\tthis.send({ type: \"engine_session_picker_close\", componentId });\n\t\t\t\trecord.resolve(undefined);\n\t\t\t},\n\t\t};\n\t}\n\n\thandleLine(line: string): boolean {\n\t\tconst command = parseInteractiveEngineCommand(line);\n\t\tif (!command || !command.type.startsWith(\"engine_session_picker_\")) return false;\n\t\tconst record = this.active.get(command.componentId);\n\t\tif (!record) return true;\n\t\tswitch (command.type) {\n\t\t\tcase \"engine_session_picker_select\":\n\t\t\t\trecord.resolve(command.path);\n\t\t\t\tbreak;\n\t\t\tcase \"engine_session_picker_cancel\":\n\t\t\t\trecord.resolve(undefined);\n\t\t\t\tbreak;\n\t\t\tcase \"engine_session_picker_delete\":\n\t\t\t\tif (!record.onDelete) {\n\t\t\t\t\tthis.send({\n\t\t\t\t\t\ttype: \"engine_session_picker_error\",\n\t\t\t\t\t\tcomponentId: command.componentId,\n\t\t\t\t\t\tmessage: \"Deletion is not supported for this picker\",\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvoid Promise.resolve(record.onDelete(command.path)).catch((error: unknown) => {\n\t\t\t\t\tif (record.settled) return;\n\t\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\t\tthis.send({\n\t\t\t\t\t\ttype: \"engine_session_picker_error\",\n\t\t\t\t\t\tcomponentId: command.componentId,\n\t\t\t\t\t\tmessage: `Failed to delete: ${message}`,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}\n\n\tdispose(): void {\n\t\tfor (const record of [...this.active.values()]) record.resolve(undefined);\n\t\tthis.active.clear();\n\t}\n\n\tprivate send(message: InteractiveEngineMessage): void {\n\t\tthis.write(serializeInteractiveEngineMessage(message));\n\t}\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AgentSessionRuntime } from "../../core/agent-session-runtime.ts";
|
|
2
|
+
import type { KeybindingsManager } from "../../core/keybindings.ts";
|
|
3
|
+
import type { ExtensionUIContext } from "../../core/extensions/index.ts";
|
|
4
|
+
import type { ActivityWatchdogDiagnostic } from "./activity-watchdog.ts";
|
|
5
|
+
import type { EngineKeybindingState, InteractiveEngineMessage } from "./protocol.ts";
|
|
6
|
+
import type { RpcSlashCommand } from "../rpc/rpc-types.ts";
|
|
7
|
+
interface EngineMessageSource {
|
|
8
|
+
onEngineMessage(listener: (message: InteractiveEngineMessage) => void): () => void;
|
|
9
|
+
onKeybindingState?(listener: (state: EngineKeybindingState) => void): () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function attachInteractiveEngineKeybindingSync(runtime: EngineMessageSource, keybindings: KeybindingsManager, onState?: (state: EngineKeybindingState) => void): () => void;
|
|
12
|
+
export declare function attachInteractiveEngineHost(runtime: AgentSessionRuntime, ui: ExtensionUIContext, onDiagnostic: (diagnostic: ActivityWatchdogDiagnostic) => void, setShortcutHandler?: (handler: (data: string) => boolean) => void | (() => void), keybindings?: KeybindingsManager): () => void;
|
|
13
|
+
export declare function waitForInteractiveEngineBound(runtime: AgentSessionRuntime): Promise<void>;
|
|
14
|
+
export declare function interruptBlockedInteractiveEngine(runtime: AgentSessionRuntime): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Command catalog the engine child exposes to the isolated host. Returns an
|
|
17
|
+
* empty list for non-isolated runtimes so callers can merge unconditionally.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getInteractiveEngineRemoteCommands(runtime: AgentSessionRuntime): readonly RpcSlashCommand[];
|
|
20
|
+
/** Subscribe to engine-child command catalog changes. No-op when not isolated. */
|
|
21
|
+
export declare function onInteractiveEngineRemoteCommandsChanged(runtime: AgentSessionRuntime, listener: (commands: readonly RpcSlashCommand[]) => void): () => void;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=extension-ui-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-ui-bridge.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive-engine/extension-ui-bridge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAC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