visionclaw 0.1.219-beta.0 → 0.1.219-dev.codex-issue-2805-worker-runtime.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/dist/agent/api-proxy.d.ts +0 -16
- package/dist/agent/api-proxy.d.ts.map +1 -1
- package/dist/agent/api-proxy.js +9 -8
- package/dist/agent/api-proxy.js.map +1 -1
- package/dist/agent/browser-launcher.d.ts +3 -0
- package/dist/agent/browser-launcher.d.ts.map +1 -1
- package/dist/agent/browser-launcher.js +101 -43
- package/dist/agent/browser-launcher.js.map +1 -1
- package/dist/agent/coding-conventions.d.ts +8 -0
- package/dist/agent/coding-conventions.d.ts.map +1 -0
- package/dist/agent/coding-conventions.js +19 -0
- package/dist/agent/coding-conventions.js.map +1 -0
- package/dist/agent/command-handlers.d.ts.map +1 -1
- package/dist/agent/command-handlers.js +4 -16
- package/dist/agent/command-handlers.js.map +1 -1
- package/dist/agent/context-action-restart-fallback.d.ts.map +1 -1
- package/dist/agent/context-action-restart-fallback.js +9 -3
- package/dist/agent/context-action-restart-fallback.js.map +1 -1
- package/dist/agent/context-refresh.d.ts.map +1 -1
- package/dist/agent/context-refresh.js +0 -7
- package/dist/agent/context-refresh.js.map +1 -1
- package/dist/agent/context.d.ts +2 -4
- package/dist/agent/context.d.ts.map +1 -1
- package/dist/agent/context.js +12 -21
- package/dist/agent/context.js.map +1 -1
- package/dist/agent/engine-fallback.d.ts +0 -35
- package/dist/agent/engine-fallback.d.ts.map +1 -1
- package/dist/agent/engine-fallback.js +4 -3
- package/dist/agent/engine-fallback.js.map +1 -1
- package/dist/agent/engine-switch.d.ts +19 -38
- package/dist/agent/engine-switch.d.ts.map +1 -1
- package/dist/agent/engine-switch.js +46 -111
- package/dist/agent/engine-switch.js.map +1 -1
- package/dist/agent/engines/browser-tool-policy.d.ts +12 -1
- package/dist/agent/engines/browser-tool-policy.d.ts.map +1 -1
- package/dist/agent/engines/browser-tool-policy.js +17 -2
- package/dist/agent/engines/browser-tool-policy.js.map +1 -1
- package/dist/agent/engines/claude/executor-shell-groups.d.ts +11 -0
- package/dist/agent/engines/claude/executor-shell-groups.d.ts.map +1 -0
- package/dist/agent/engines/claude/executor-shell-groups.js +22 -0
- package/dist/agent/engines/claude/executor-shell-groups.js.map +1 -0
- package/dist/agent/engines/claude/session.d.ts +13 -4
- package/dist/agent/engines/claude/session.d.ts.map +1 -1
- package/dist/agent/engines/claude/session.js +165 -84
- package/dist/agent/engines/claude/session.js.map +1 -1
- package/dist/agent/engines/pi/shared/usage.d.ts +6 -8
- package/dist/agent/engines/pi/shared/usage.d.ts.map +1 -1
- package/dist/agent/engines/pi/shared/usage.js +24 -7
- package/dist/agent/engines/pi/shared/usage.js.map +1 -1
- package/dist/agent/engines/pi/tools.d.ts +3 -10
- package/dist/agent/engines/pi/tools.d.ts.map +1 -1
- package/dist/agent/engines/pi/tools.js +6 -20
- package/dist/agent/engines/pi/tools.js.map +1 -1
- package/dist/agent/engines/pi-coding/executor-shell.d.ts +4 -0
- package/dist/agent/engines/pi-coding/executor-shell.d.ts.map +1 -0
- package/dist/agent/engines/pi-coding/executor-shell.js +175 -0
- package/dist/agent/engines/pi-coding/executor-shell.js.map +1 -0
- package/dist/agent/engines/pi-coding/session.d.ts +4 -4
- package/dist/agent/engines/pi-coding/session.d.ts.map +1 -1
- package/dist/agent/engines/pi-coding/session.js +118 -66
- package/dist/agent/engines/pi-coding/session.js.map +1 -1
- package/dist/agent/engines/pi-coding/tools.d.ts +2 -5
- package/dist/agent/engines/pi-coding/tools.d.ts.map +1 -1
- package/dist/agent/engines/pi-coding/tools.js +7 -5
- package/dist/agent/engines/pi-coding/tools.js.map +1 -1
- package/dist/agent/engines/session-types.d.ts +8 -8
- package/dist/agent/engines/session-types.d.ts.map +1 -1
- package/dist/agent/external-context/interrupt.d.ts +0 -2
- package/dist/agent/external-context/interrupt.d.ts.map +1 -1
- package/dist/agent/external-context/interrupt.js +0 -1
- package/dist/agent/external-context/interrupt.js.map +1 -1
- package/dist/agent/external-context/registry.d.ts +0 -2
- package/dist/agent/external-context/registry.d.ts.map +1 -1
- package/dist/agent/external-context/registry.js +2 -4
- package/dist/agent/external-context/registry.js.map +1 -1
- package/dist/agent/external-context/runtime.d.ts.map +1 -1
- package/dist/agent/external-context/runtime.js +15 -14
- package/dist/agent/external-context/runtime.js.map +1 -1
- package/dist/agent/external-context/types.d.ts +0 -2
- package/dist/agent/external-context/types.d.ts.map +1 -1
- package/dist/agent/fast-responder.d.ts +4 -20
- package/dist/agent/fast-responder.d.ts.map +1 -1
- package/dist/agent/fast-responder.js +28 -42
- package/dist/agent/fast-responder.js.map +1 -1
- package/dist/agent/interrupt-handler.d.ts +0 -6
- package/dist/agent/interrupt-handler.d.ts.map +1 -1
- package/dist/agent/interrupt-handler.js +5 -47
- package/dist/agent/interrupt-handler.js.map +1 -1
- package/dist/agent/lab-run-system-prompt.d.ts.map +1 -1
- package/dist/agent/lab-run-system-prompt.js +4 -1
- package/dist/agent/lab-run-system-prompt.js.map +1 -1
- package/dist/agent/lifecycle-trace.d.ts.map +1 -1
- package/dist/agent/lifecycle-trace.js +6 -5
- package/dist/agent/lifecycle-trace.js.map +1 -1
- package/dist/agent/loop.d.ts +8 -2
- package/dist/agent/loop.d.ts.map +1 -1
- package/dist/agent/loop.js +287 -156
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/memory-protocol.d.ts +2 -2
- package/dist/agent/memory-protocol.d.ts.map +1 -1
- package/dist/agent/memory-protocol.js +3 -15
- package/dist/agent/memory-protocol.js.map +1 -1
- package/dist/agent/memory-store.d.ts +58 -0
- package/dist/agent/memory-store.d.ts.map +1 -0
- package/dist/agent/memory-store.js +152 -0
- package/dist/agent/memory-store.js.map +1 -0
- package/dist/agent/model-provider.d.ts +18 -5
- package/dist/agent/model-provider.d.ts.map +1 -1
- package/dist/agent/model-provider.js +58 -18
- package/dist/agent/model-provider.js.map +1 -1
- package/dist/agent/nightly-maintenance/dreaming-batch.d.ts +184 -0
- package/dist/agent/nightly-maintenance/dreaming-batch.d.ts.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-batch.js +192 -0
- package/dist/agent/nightly-maintenance/dreaming-batch.js.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-files.d.ts +48 -0
- package/dist/agent/nightly-maintenance/dreaming-files.d.ts.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-files.js +109 -0
- package/dist/agent/nightly-maintenance/dreaming-files.js.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-ledger.d.ts +62 -0
- package/dist/agent/nightly-maintenance/dreaming-ledger.d.ts.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-ledger.js +146 -0
- package/dist/agent/nightly-maintenance/dreaming-ledger.js.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-planner.d.ts +86 -0
- package/dist/agent/nightly-maintenance/dreaming-planner.d.ts.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-planner.js +304 -0
- package/dist/agent/nightly-maintenance/dreaming-planner.js.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-runner.d.ts +93 -0
- package/dist/agent/nightly-maintenance/dreaming-runner.d.ts.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-runner.js +156 -0
- package/dist/agent/nightly-maintenance/dreaming-runner.js.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-sources.d.ts +115 -0
- package/dist/agent/nightly-maintenance/dreaming-sources.d.ts.map +1 -0
- package/dist/agent/nightly-maintenance/dreaming-sources.js +270 -0
- package/dist/agent/nightly-maintenance/dreaming-sources.js.map +1 -0
- package/dist/agent/nightly-maintenance/index.d.ts +28 -8
- package/dist/agent/nightly-maintenance/index.d.ts.map +1 -1
- package/dist/agent/nightly-maintenance/index.js +42 -15
- package/dist/agent/nightly-maintenance/index.js.map +1 -1
- package/dist/agent/nightly-maintenance/skill-learning-gate.js +1 -1
- package/dist/agent/nightly-maintenance/skill-learning-gate.js.map +1 -1
- package/dist/agent/nightly-maintenance/vocabulary-processor.d.ts +1 -1
- package/dist/agent/nightly-maintenance/vocabulary-processor.d.ts.map +1 -1
- package/dist/agent/product-identity.d.ts +5 -4
- package/dist/agent/product-identity.d.ts.map +1 -1
- package/dist/agent/product-identity.js +7 -6
- package/dist/agent/product-identity.js.map +1 -1
- package/dist/agent/public-activity.js +1 -1
- package/dist/agent/public-activity.js.map +1 -1
- package/dist/agent/runtime-context.d.ts +27 -0
- package/dist/agent/runtime-context.d.ts.map +1 -0
- package/dist/agent/runtime-context.js +60 -0
- package/dist/agent/runtime-context.js.map +1 -0
- package/dist/agent/runtime-disclosure-policy.d.ts +6 -0
- package/dist/agent/runtime-disclosure-policy.d.ts.map +1 -0
- package/dist/agent/runtime-disclosure-policy.js +16 -0
- package/dist/agent/runtime-disclosure-policy.js.map +1 -0
- package/dist/agent/runtime-surface.d.ts +15 -4
- package/dist/agent/runtime-surface.d.ts.map +1 -1
- package/dist/agent/runtime-surface.js +0 -1
- package/dist/agent/runtime-surface.js.map +1 -1
- package/dist/agent/session-manager.d.ts +30 -126
- package/dist/agent/session-manager.d.ts.map +1 -1
- package/dist/agent/session-manager.js +60 -484
- package/dist/agent/session-manager.js.map +1 -1
- package/dist/agent/state.d.ts +42 -2
- package/dist/agent/state.d.ts.map +1 -1
- package/dist/agent/state.js +21 -11
- package/dist/agent/state.js.map +1 -1
- package/dist/agent/stream-handler.d.ts +6 -13
- package/dist/agent/stream-handler.d.ts.map +1 -1
- package/dist/agent/stream-handler.js +8 -62
- package/dist/agent/stream-handler.js.map +1 -1
- package/dist/agent/system-prompt.d.ts +2 -0
- package/dist/agent/system-prompt.d.ts.map +1 -1
- package/dist/agent/system-prompt.js +21 -20
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/agent/tool-usage.d.ts.map +1 -1
- package/dist/agent/tool-usage.js +0 -1
- package/dist/agent/tool-usage.js.map +1 -1
- package/dist/agent/transcript/transcript-backfill.js +3 -3
- package/dist/agent/transcript/transcript-backfill.js.map +1 -1
- package/dist/agent/transcript/transcript-indexer.d.ts +3 -31
- package/dist/agent/transcript/transcript-indexer.d.ts.map +1 -1
- package/dist/agent/transcript/transcript-indexer.js +58 -57
- package/dist/agent/transcript/transcript-indexer.js.map +1 -1
- package/dist/agent/transcript-parsers/trivial-tools.d.ts.map +1 -1
- package/dist/agent/transcript-parsers/trivial-tools.js +0 -2
- package/dist/agent/transcript-parsers/trivial-tools.js.map +1 -1
- package/dist/agent/transcript-parsers/types.d.ts +1 -1
- package/dist/agent/transcript-summarizer.d.ts +14 -0
- package/dist/agent/transcript-summarizer.d.ts.map +1 -1
- package/dist/agent/transcript-summarizer.js +69 -45
- package/dist/agent/transcript-summarizer.js.map +1 -1
- package/dist/agent/usage/usage-report-queue.d.ts.map +1 -1
- package/dist/agent/usage/usage-report-queue.js +53 -52
- package/dist/agent/usage/usage-report-queue.js.map +1 -1
- package/dist/agent/usage/usage-report-types.d.ts +1 -1
- package/dist/agent/usage/usage-report-types.d.ts.map +1 -1
- package/dist/agent/vocabulary-glossary.d.ts +3 -3
- package/dist/agent/wake-cycle-runner.d.ts +14 -17
- package/dist/agent/wake-cycle-runner.d.ts.map +1 -1
- package/dist/agent/wake-cycle-runner.js +121 -290
- package/dist/agent/wake-cycle-runner.js.map +1 -1
- package/dist/builtin-skills/owner-manual/SKILL.md +2 -2
- package/dist/calendar/occurrence-ownership.d.ts.map +1 -1
- package/dist/calendar/occurrence-ownership.js +6 -5
- package/dist/calendar/occurrence-ownership.js.map +1 -1
- package/dist/calendar/scheduler.d.ts.map +1 -1
- package/dist/calendar/scheduler.js +4 -3
- package/dist/calendar/scheduler.js.map +1 -1
- package/dist/channels/interface.d.ts +8 -2
- package/dist/channels/interface.d.ts.map +1 -1
- package/dist/channels/interface.js +8 -1
- package/dist/channels/interface.js.map +1 -1
- package/dist/channels/manager.d.ts.map +1 -1
- package/dist/channels/manager.js +5 -1
- package/dist/channels/manager.js.map +1 -1
- package/dist/channels/queue.d.ts.map +1 -1
- package/dist/channels/queue.js +8 -0
- package/dist/channels/queue.js.map +1 -1
- package/dist/channels/tui.d.ts +14 -1
- package/dist/channels/tui.d.ts.map +1 -1
- package/dist/channels/tui.js +64 -2
- package/dist/channels/tui.js.map +1 -1
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +22 -53
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +13 -7
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +51 -64
- package/dist/config/index.js.map +1 -1
- package/dist/config/types.d.ts +28 -7
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +22 -20
- package/dist/config/types.js.map +1 -1
- package/dist/conversations/lazy-runtime.d.ts +5 -0
- package/dist/conversations/lazy-runtime.d.ts.map +1 -0
- package/dist/conversations/lazy-runtime.js +12 -0
- package/dist/conversations/lazy-runtime.js.map +1 -0
- package/dist/conversations/runtime.d.ts +17 -0
- package/dist/conversations/runtime.d.ts.map +1 -0
- package/dist/conversations/runtime.js +92 -0
- package/dist/conversations/runtime.js.map +1 -0
- package/dist/conversations/scheduler.d.ts +57 -0
- package/dist/conversations/scheduler.d.ts.map +1 -0
- package/dist/conversations/scheduler.js +175 -0
- package/dist/conversations/scheduler.js.map +1 -0
- package/dist/data-processing/pipeline.d.ts +0 -2
- package/dist/data-processing/pipeline.d.ts.map +1 -1
- package/dist/data-processing/pipeline.js +19 -24
- package/dist/data-processing/pipeline.js.map +1 -1
- package/dist/data-processing/restructure.d.ts +0 -2
- package/dist/data-processing/restructure.d.ts.map +1 -1
- package/dist/data-processing/restructure.js +6 -9
- package/dist/data-processing/restructure.js.map +1 -1
- package/dist/data-processing/types.d.ts +2 -9
- package/dist/data-processing/types.d.ts.map +1 -1
- package/dist/data-processing/types.js +2 -13
- package/dist/data-processing/types.js.map +1 -1
- package/dist/email/email-route-store.d.ts.map +1 -1
- package/dist/email/email-route-store.js +6 -5
- package/dist/email/email-route-store.js.map +1 -1
- package/dist/i18n/messages.d.ts +26 -2
- package/dist/i18n/messages.d.ts.map +1 -1
- package/dist/i18n/messages.js +30 -5
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +11 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +49 -1
- package/dist/logger.js.map +1 -1
- package/dist/obs/mini-app/status.d.ts.map +1 -1
- package/dist/obs/mini-app/status.js +0 -1
- package/dist/obs/mini-app/status.js.map +1 -1
- package/dist/onboarding/onboarding-service-client.d.ts +1 -0
- package/dist/onboarding/onboarding-service-client.d.ts.map +1 -1
- package/dist/onboarding/onboarding-service-client.js.map +1 -1
- package/dist/onboarding/remote-set-owner.d.ts.map +1 -1
- package/dist/onboarding/remote-set-owner.js +0 -1
- package/dist/onboarding/remote-set-owner.js.map +1 -1
- package/dist/onboarding/set-owner.d.ts +1 -1
- package/dist/onboarding/set-owner.d.ts.map +1 -1
- package/dist/onboarding/set-owner.js +3 -6
- package/dist/onboarding/set-owner.js.map +1 -1
- package/dist/reconfigure.d.ts.map +1 -1
- package/dist/reconfigure.js +1 -32
- package/dist/reconfigure.js.map +1 -1
- package/dist/reset.d.ts.map +1 -1
- package/dist/reset.js +3 -1
- package/dist/reset.js.map +1 -1
- package/dist/threads/active-threads-store.d.ts.map +1 -1
- package/dist/threads/active-threads-store.js +8 -27
- package/dist/threads/active-threads-store.js.map +1 -1
- package/dist/threads/dreaming-execution.d.ts +10 -0
- package/dist/threads/dreaming-execution.d.ts.map +1 -0
- package/dist/threads/dreaming-execution.js +78 -0
- package/dist/threads/dreaming-execution.js.map +1 -0
- package/dist/threads/execution-authority.d.ts +43 -0
- package/dist/threads/execution-authority.d.ts.map +1 -0
- package/dist/threads/execution-authority.js +75 -0
- package/dist/threads/execution-authority.js.map +1 -0
- package/dist/threads/execution-budget.d.ts +107 -0
- package/dist/threads/execution-budget.d.ts.map +1 -0
- package/dist/threads/execution-budget.js +257 -0
- package/dist/threads/execution-budget.js.map +1 -0
- package/dist/threads/execution-host.d.ts +17 -0
- package/dist/threads/execution-host.d.ts.map +1 -0
- package/dist/threads/execution-host.js +66 -0
- package/dist/threads/execution-host.js.map +1 -0
- package/dist/threads/execution-scheduler.d.ts +162 -0
- package/dist/threads/execution-scheduler.d.ts.map +1 -0
- package/dist/threads/execution-scheduler.js +413 -0
- package/dist/threads/execution-scheduler.js.map +1 -0
- package/dist/threads/execution-snapshot.d.ts +91 -0
- package/dist/threads/execution-snapshot.d.ts.map +1 -0
- package/dist/threads/execution-snapshot.js +146 -0
- package/dist/threads/execution-snapshot.js.map +1 -0
- package/dist/threads/execution-store.d.ts +374 -0
- package/dist/threads/execution-store.d.ts.map +1 -0
- package/dist/threads/execution-store.js +910 -0
- package/dist/threads/execution-store.js.map +1 -0
- package/dist/threads/execution-thread-error.d.ts +9 -0
- package/dist/threads/execution-thread-error.d.ts.map +1 -0
- package/dist/threads/execution-thread-error.js +12 -0
- package/dist/threads/execution-thread-error.js.map +1 -0
- package/dist/threads/executor-exit.d.ts +18 -0
- package/dist/threads/executor-exit.d.ts.map +1 -0
- package/dist/threads/executor-exit.js +21 -0
- package/dist/threads/executor-exit.js.map +1 -0
- package/dist/threads/foreground-task.d.ts +91 -0
- package/dist/threads/foreground-task.d.ts.map +1 -0
- package/dist/threads/foreground-task.js +191 -0
- package/dist/threads/foreground-task.js.map +1 -0
- package/dist/threads/foreman-business.d.ts +9 -0
- package/dist/threads/foreman-business.d.ts.map +1 -0
- package/dist/threads/foreman-business.js +117 -0
- package/dist/threads/foreman-business.js.map +1 -0
- package/dist/threads/foreman-client.d.ts +18 -0
- package/dist/threads/foreman-client.d.ts.map +1 -0
- package/dist/threads/foreman-client.js +51 -0
- package/dist/threads/foreman-client.js.map +1 -0
- package/dist/threads/foreman-delivery.d.ts +5 -0
- package/dist/threads/foreman-delivery.d.ts.map +1 -0
- package/dist/threads/foreman-delivery.js +21 -0
- package/dist/threads/foreman-delivery.js.map +1 -0
- package/dist/threads/foreman-execution.d.ts +32 -0
- package/dist/threads/foreman-execution.d.ts.map +1 -0
- package/dist/threads/foreman-execution.js +90 -0
- package/dist/threads/foreman-execution.js.map +1 -0
- package/dist/threads/foreman-host.d.ts +77 -0
- package/dist/threads/foreman-host.d.ts.map +1 -0
- package/dist/threads/foreman-host.js +891 -0
- package/dist/threads/foreman-host.js.map +1 -0
- package/dist/threads/foreman-protocol.d.ts +242 -0
- package/dist/threads/foreman-protocol.d.ts.map +1 -0
- package/dist/threads/foreman-protocol.js +116 -0
- package/dist/threads/foreman-protocol.js.map +1 -0
- package/dist/threads/foreman-store.d.ts +151 -0
- package/dist/threads/foreman-store.d.ts.map +1 -0
- package/dist/threads/foreman-store.js +299 -0
- package/dist/threads/foreman-store.js.map +1 -0
- package/dist/threads/generic-execution.d.ts +25 -0
- package/dist/threads/generic-execution.d.ts.map +1 -0
- package/dist/threads/generic-execution.js +86 -0
- package/dist/threads/generic-execution.js.map +1 -0
- package/dist/threads/init-thread-dir.d.ts +2 -2
- package/dist/threads/init-thread-dir.d.ts.map +1 -1
- package/dist/threads/init-thread-dir.js +6 -6
- package/dist/threads/init-thread-dir.js.map +1 -1
- package/dist/threads/ipc.d.ts +108 -2
- package/dist/threads/ipc.d.ts.map +1 -1
- package/dist/threads/ipc.js +14 -2
- package/dist/threads/ipc.js.map +1 -1
- package/dist/threads/lab-run-thread.d.ts +3 -5
- package/dist/threads/lab-run-thread.d.ts.map +1 -1
- package/dist/threads/lab-run-thread.js +3 -5
- package/dist/threads/lab-run-thread.js.map +1 -1
- package/dist/threads/lab-runtime-policy.d.ts +26 -21
- package/dist/threads/lab-runtime-policy.d.ts.map +1 -1
- package/dist/threads/lab-runtime-policy.js +31 -126
- package/dist/threads/lab-runtime-policy.js.map +1 -1
- package/dist/threads/process-group.d.ts +41 -0
- package/dist/threads/process-group.d.ts.map +1 -0
- package/dist/threads/process-group.js +161 -0
- package/dist/threads/process-group.js.map +1 -0
- package/dist/threads/relay-adapter.d.ts +8 -0
- package/dist/threads/relay-adapter.d.ts.map +1 -1
- package/dist/threads/relay-adapter.js +26 -1
- package/dist/threads/relay-adapter.js.map +1 -1
- package/dist/threads/supervisor.d.ts +191 -57
- package/dist/threads/supervisor.d.ts.map +1 -1
- package/dist/threads/supervisor.js +766 -427
- package/dist/threads/supervisor.js.map +1 -1
- package/dist/threads/task-workspace.d.ts +8 -0
- package/dist/threads/task-workspace.d.ts.map +1 -0
- package/dist/threads/task-workspace.js +52 -0
- package/dist/threads/task-workspace.js.map +1 -0
- package/dist/threads/worker-entry.d.ts.map +1 -1
- package/dist/threads/worker-entry.js +314 -34
- package/dist/threads/worker-entry.js.map +1 -1
- package/dist/threads/worker-execution-runtime.d.ts +75 -0
- package/dist/threads/worker-execution-runtime.d.ts.map +1 -0
- package/dist/threads/worker-execution-runtime.js +142 -0
- package/dist/threads/worker-execution-runtime.js.map +1 -0
- package/dist/threads/worker-execution.d.ts +35 -0
- package/dist/threads/worker-execution.d.ts.map +1 -0
- package/dist/threads/worker-execution.js +2 -0
- package/dist/threads/worker-execution.js.map +1 -0
- package/dist/threads/worker-runtime-policy.d.ts +42 -0
- package/dist/threads/worker-runtime-policy.d.ts.map +1 -0
- package/dist/threads/worker-runtime-policy.js +98 -0
- package/dist/threads/worker-runtime-policy.js.map +1 -0
- package/dist/tools/adapter-tool.d.ts +12 -0
- package/dist/tools/adapter-tool.d.ts.map +1 -0
- package/dist/tools/adapter-tool.js +2 -0
- package/dist/tools/adapter-tool.js.map +1 -0
- package/dist/tools/data-service.d.ts +2 -2
- package/dist/tools/delegation.d.ts +121 -0
- package/dist/tools/delegation.d.ts.map +1 -0
- package/dist/tools/delegation.js +106 -0
- package/dist/tools/delegation.js.map +1 -0
- package/dist/tools/dream-memory.d.ts +122 -0
- package/dist/tools/dream-memory.d.ts.map +1 -0
- package/dist/tools/dream-memory.js +513 -0
- package/dist/tools/dream-memory.js.map +1 -0
- package/dist/tools/email.d.ts +1 -1
- package/dist/tools/execution-control.d.ts +31 -0
- package/dist/tools/execution-control.d.ts.map +1 -0
- package/dist/tools/execution-control.js +71 -0
- package/dist/tools/execution-control.js.map +1 -0
- package/dist/tools/index.d.ts +5 -7
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +7 -13
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/mcp-manager.d.ts +1 -1
- package/dist/tools/memory.d.ts +1 -1
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/memory.js +69 -45
- package/dist/tools/memory.js.map +1 -1
- package/dist/tools/notify.d.ts +5 -0
- package/dist/tools/notify.d.ts.map +1 -1
- package/dist/tools/notify.js +45 -10
- package/dist/tools/notify.js.map +1 -1
- package/dist/tools/skill.d.ts +1 -1
- package/dist/tools/totp.d.ts +1 -1
- package/dist/tui/client.d.ts +1 -16
- package/dist/tui/client.d.ts.map +1 -1
- package/dist/tui/client.js +0 -4
- package/dist/tui/client.js.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +0 -41
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/protocol.d.ts +2 -1
- package/dist/tui/protocol.d.ts.map +1 -1
- package/dist/tui/protocol.js +2 -1
- package/dist/tui/protocol.js.map +1 -1
- package/dist/tui/renderer.d.ts.map +1 -1
- package/dist/tui/renderer.js +0 -5
- package/dist/tui/renderer.js.map +1 -1
- package/dist/tui/request-store.d.ts +1 -1
- package/dist/tui/request-store.d.ts.map +1 -1
- package/dist/tui/request-store.js +2 -2
- package/dist/tui/request-store.js.map +1 -1
- package/dist/tui/server.d.ts.map +1 -1
- package/dist/tui/server.js +137 -25
- package/dist/tui/server.js.map +1 -1
- package/dist/utils/claude-transcripts.d.ts +6 -0
- package/dist/utils/claude-transcripts.d.ts.map +1 -1
- package/dist/utils/claude-transcripts.js +8 -2
- package/dist/utils/claude-transcripts.js.map +1 -1
- package/dist/utils/restart.d.ts.map +1 -1
- package/dist/utils/restart.js +6 -0
- package/dist/utils/restart.js.map +1 -1
- package/dist-agent/bundle.cjs +2 -2
- package/package.json +1 -1
- package/dist/agent/mailbox.d.ts +0 -50
- package/dist/agent/mailbox.d.ts.map +0 -1
- package/dist/agent/mailbox.js +0 -124
- package/dist/agent/mailbox.js.map +0 -1
- package/dist/agent/nightly-maintenance/memory-dreaming-sweep.d.ts +0 -77
- package/dist/agent/nightly-maintenance/memory-dreaming-sweep.d.ts.map +0 -1
- package/dist/agent/nightly-maintenance/memory-dreaming-sweep.js +0 -158
- package/dist/agent/nightly-maintenance/memory-dreaming-sweep.js.map +0 -1
- package/dist/agent/nightly-maintenance/memory-dreaming.d.ts +0 -116
- package/dist/agent/nightly-maintenance/memory-dreaming.d.ts.map +0 -1
- package/dist/agent/nightly-maintenance/memory-dreaming.js +0 -458
- package/dist/agent/nightly-maintenance/memory-dreaming.js.map +0 -1
- package/dist/threads/task-contracts.d.ts +0 -194
- package/dist/threads/task-contracts.d.ts.map +0 -1
- package/dist/threads/task-contracts.js +0 -82
- package/dist/threads/task-contracts.js.map +0 -1
- package/dist/threads/task-sidecar.d.ts +0 -145
- package/dist/threads/task-sidecar.d.ts.map +0 -1
- package/dist/threads/task-sidecar.js +0 -311
- package/dist/threads/task-sidecar.js.map +0 -1
- package/dist/threads/task-store.d.ts +0 -172
- package/dist/threads/task-store.d.ts.map +0 -1
- package/dist/threads/task-store.js +0 -599
- package/dist/threads/task-store.js.map +0 -1
- package/dist/threads/thread-task-context.d.ts +0 -40
- package/dist/threads/thread-task-context.d.ts.map +0 -1
- package/dist/threads/thread-task-context.js +0 -160
- package/dist/threads/thread-task-context.js.map +0 -1
- package/dist/threads/thread-task-controller.d.ts +0 -122
- package/dist/threads/thread-task-controller.d.ts.map +0 -1
- package/dist/threads/thread-task-controller.js +0 -276
- package/dist/threads/thread-task-controller.js.map +0 -1
- package/dist/threads/thread-task-runtime.d.ts +0 -354
- package/dist/threads/thread-task-runtime.d.ts.map +0 -1
- package/dist/threads/thread-task-runtime.js +0 -917
- package/dist/threads/thread-task-runtime.js.map +0 -1
- package/dist/tools/switch-session.d.ts +0 -15
- package/dist/tools/switch-session.d.ts.map +0 -1
- package/dist/tools/switch-session.js +0 -88
- package/dist/tools/switch-session.js.map +0 -1
- package/dist/tools/thread-tasks.d.ts +0 -23
- package/dist/tools/thread-tasks.d.ts.map +0 -1
- package/dist/tools/thread-tasks.js +0 -122
- package/dist/tools/thread-tasks.js.map +0 -1
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ThreadTaskRuntime (issue #1996, PR 3): the one object the live loop talks
|
|
3
|
-
* to. It owns this process's {@link ThreadTaskStore} and
|
|
4
|
-
* {@link ThreadTaskController} for the thread it serves — the default thread
|
|
5
|
-
* in the main process, a business thread in its worker.
|
|
6
|
-
*
|
|
7
|
-
* Hot-path rule: every method is fail-safe. A store, controller or model
|
|
8
|
-
* error is logged and swallowed; it must never break message handling, a
|
|
9
|
-
* wake or a reply. The cost of a failure is a missed task update that the
|
|
10
|
-
* next run can still recover from the persisted events, never a lost message.
|
|
11
|
-
*/
|
|
12
|
-
import type { VisionClawConfig } from "../config/types.js";
|
|
13
|
-
import { type CommandMessage } from "../channels/interface.js";
|
|
14
|
-
import { type MessageQueue } from "../channels/queue.js";
|
|
15
|
-
import { type TaskEventInput, type TaskStatus, type ThreadTask } from "./task-contracts.js";
|
|
16
|
-
import { type SidecarModel } from "./task-sidecar.js";
|
|
17
|
-
import { type ThreadTaskControllerOptions } from "./thread-task-controller.js";
|
|
18
|
-
/**
|
|
19
|
-
* How long a fast reply waits for the sidecar before it settles for
|
|
20
|
-
* "received". Added in front of the fast responder's own 5 s budget.
|
|
21
|
-
*/
|
|
22
|
-
export declare const REGISTRATION_WAIT_MS = 6000;
|
|
23
|
-
/**
|
|
24
|
-
* How long a lifecycle boundary waits for the sidecar to catch up (#1996 PR 4).
|
|
25
|
-
* Wake end is short because the next message waits behind it; compaction,
|
|
26
|
-
* refresh and handoff are already slow.
|
|
27
|
-
*/
|
|
28
|
-
export declare const RECONCILE_WAIT_MS: {
|
|
29
|
-
readonly wakeEnd: 5000;
|
|
30
|
-
readonly handoff: 8000;
|
|
31
|
-
readonly boundary: 10000;
|
|
32
|
-
};
|
|
33
|
-
export type ReconcilePhase = "wake_end" | "handoff" | "compaction" | "refresh" | "stop";
|
|
34
|
-
/** `meta.kind` of a queued resume (PR 5). A system row: no fast reply, watchdog or gate reply. */
|
|
35
|
-
export declare const TASK_RESUME_KIND = "thread-task-resume";
|
|
36
|
-
/** A resume pass waits for the sidecar to catch up; if it cannot, it retries after this. */
|
|
37
|
-
export declare const RESUME_RETRY_MS = 60000;
|
|
38
|
-
/** How the loop lets the runtime queue and start resumes. */
|
|
39
|
-
export interface ResumeHooks {
|
|
40
|
-
queue: Pick<MessageQueue, "enqueue">;
|
|
41
|
-
/** A wake is running or work is queued; the end of that wake starts the next pass. */
|
|
42
|
-
isBusy: () => boolean;
|
|
43
|
-
/** Execution is stopped (service gate, league hold); the pass retries later. */
|
|
44
|
-
isGated: () => boolean;
|
|
45
|
-
/** Wake the loop after a resume was queued (works with proactive wake off). */
|
|
46
|
-
wake: () => void;
|
|
47
|
-
}
|
|
48
|
-
/** The queue, as `/stop` needs it: read and drop rows that are still pending. */
|
|
49
|
-
export type StopQueue = Pick<MessageQueue, "snapshot" | "remove" | "markHandled">;
|
|
50
|
-
/** What `/stop` did. */
|
|
51
|
-
export interface StopOutcome {
|
|
52
|
-
/** Tasks moved to `cancelled`. */
|
|
53
|
-
cancelled: ThreadTask[];
|
|
54
|
-
/** Queued owner messages dropped before they could become tasks. */
|
|
55
|
-
droppedQueued: number;
|
|
56
|
-
}
|
|
57
|
-
/** What `close_thread_task` did: the closed task, or why it was refused. */
|
|
58
|
-
export type CloseTaskOutcome = {
|
|
59
|
-
ok: true;
|
|
60
|
-
task: ThreadTask;
|
|
61
|
-
} | {
|
|
62
|
-
ok: false;
|
|
63
|
-
reason: string;
|
|
64
|
-
};
|
|
65
|
-
/** What a resume pass did; for logs and tests. */
|
|
66
|
-
export interface ResumeOutcome {
|
|
67
|
-
/** Resumes handed to the queue in this pass (new or re-sent reservations). */
|
|
68
|
-
queued: string[];
|
|
69
|
-
}
|
|
70
|
-
/** Where a reconcile left the consume position relative to its target. */
|
|
71
|
-
export interface ReconcileOutcome {
|
|
72
|
-
reached: boolean;
|
|
73
|
-
/** Latest event seq when the boundary was hit. */
|
|
74
|
-
target: number;
|
|
75
|
-
position: number;
|
|
76
|
-
}
|
|
77
|
-
export interface ThreadTaskRuntimeOptions {
|
|
78
|
-
threadId: string;
|
|
79
|
-
/** Worker instance id in workers (same fence as the queue); a per-process id in the main process. */
|
|
80
|
-
writerId: string;
|
|
81
|
-
config: VisionClawConfig;
|
|
82
|
-
/** Overrides for tests. */
|
|
83
|
-
dbPath?: string;
|
|
84
|
-
model?: SidecarModel;
|
|
85
|
-
controller?: Partial<ThreadTaskControllerOptions>;
|
|
86
|
-
}
|
|
87
|
-
/** What a fast reply may claim about a batch of messages. */
|
|
88
|
-
export interface RegistrationOutcome {
|
|
89
|
-
/** Every message's event is durable, so the request survives a crash. */
|
|
90
|
-
recorded: boolean;
|
|
91
|
-
/** Open tasks whose sources include one of the messages, after the sidecar ran. */
|
|
92
|
-
registered: ThreadTask[];
|
|
93
|
-
}
|
|
94
|
-
export declare class ThreadTaskRuntime {
|
|
95
|
-
readonly threadId: string;
|
|
96
|
-
private readonly store;
|
|
97
|
-
private readonly controller;
|
|
98
|
-
/**
|
|
99
|
-
* Latest event seq when this process started. A task whose last committed
|
|
100
|
-
* change came from events up to here was moved by a previous process.
|
|
101
|
-
*/
|
|
102
|
-
private readonly startSeq;
|
|
103
|
-
/** Resumes this process accepted, by task id: a resume runs once per task per process. Released when its message goes back on the queue. */
|
|
104
|
-
private readonly resumesAccepted;
|
|
105
|
-
private closed;
|
|
106
|
-
private resumeHooks;
|
|
107
|
-
private resumeRetry;
|
|
108
|
-
private resumeRunning;
|
|
109
|
-
/** Do not schedule recovery while /stop folds evidence before cancellation. */
|
|
110
|
-
private stopRequests;
|
|
111
|
-
private constructor();
|
|
112
|
-
/**
|
|
113
|
-
* Open the thread's store next to its queue.db, take the writer slot and
|
|
114
|
-
* start the controller (which picks up events a previous process left).
|
|
115
|
-
* Returns null instead of throwing: without a runtime the agent runs
|
|
116
|
-
* exactly as before.
|
|
117
|
-
*/
|
|
118
|
-
static start(options: ThreadTaskRuntimeOptions): ThreadTaskRuntime | null;
|
|
119
|
-
/**
|
|
120
|
-
* Persist owner messages as events. Idempotent per message (queue dedup
|
|
121
|
-
* key), so a redelivered message, the watchdog and the wake path can all
|
|
122
|
-
* call it. Returns false if any message could not be recorded.
|
|
123
|
-
*/
|
|
124
|
-
recordMessages(messages: readonly CommandMessage[], options?: {
|
|
125
|
-
notify?: boolean;
|
|
126
|
-
}): boolean;
|
|
127
|
-
/** Persist an execution event (response, tool result, todo update, status report). */
|
|
128
|
-
recordExecution(input: TaskEventInput): void;
|
|
129
|
-
/**
|
|
130
|
-
* Record the messages, then wait up to `waitMs` for the sidecar to consume
|
|
131
|
-
* them. `registered` lists the open tasks the commit tied to these messages;
|
|
132
|
-
* empty means a reply may only acknowledge receipt.
|
|
133
|
-
*
|
|
134
|
-
* A run that started before these events cannot commit them (it snapshotted
|
|
135
|
-
* its batch), and a batch is a contiguous prefix, so the message may need
|
|
136
|
-
* more than one run: an execution-event backlog in front of it is folded
|
|
137
|
-
* first. The loop therefore waits for this message's events to be consumed,
|
|
138
|
-
* not for a single run, and stops as soon as the deadline passes or a run
|
|
139
|
-
* fails (the controller keeps retrying those events on its own schedule).
|
|
140
|
-
*/
|
|
141
|
-
registerMessages(messages: readonly CommandMessage[], waitMs?: number): Promise<RegistrationOutcome>;
|
|
142
|
-
/** `close()` may run while a wait awaits; a method read is not narrowed away. */
|
|
143
|
-
private isClosed;
|
|
144
|
-
/** Open tasks already tied to any of these messages (no model call). */
|
|
145
|
-
tasksForMessages(messages: readonly CommandMessage[]): ThreadTask[];
|
|
146
|
-
/** Tasks of this thread for the query tool; `[]` on error. */
|
|
147
|
-
listTasks(statuses?: readonly TaskStatus[]): ThreadTask[];
|
|
148
|
-
/**
|
|
149
|
-
* Let the sidecar fold every event up to the latest one (the explicit
|
|
150
|
-
* position of this boundary), waiting at most `waitMs`. No events past the
|
|
151
|
-
* position means no model call. On timeout, budget exhaustion or failure
|
|
152
|
-
* the events simply stay unconsumed: the controller keeps retrying them,
|
|
153
|
-
* and {@link contextBlock} shows them raw to the next recovery.
|
|
154
|
-
*/
|
|
155
|
-
reconcile(phase: ReconcilePhase, waitMs: number): Promise<ReconcileOutcome>;
|
|
156
|
-
/**
|
|
157
|
-
* Tasks a previous process left `in_progress`: their last change came from
|
|
158
|
-
* events recorded before this process started. That includes a task those
|
|
159
|
-
* events only move to `in_progress` when this process folds them at
|
|
160
|
-
* startup (the sidecar batches, so a crash usually leaves some). Once this
|
|
161
|
-
* process's own events move the task, it is no longer interrupted.
|
|
162
|
-
* TODO: a startup fold whose batch also holds events of this process
|
|
163
|
-
* stamps the task with the later seq and drops the flag early.
|
|
164
|
-
*/
|
|
165
|
-
interruptedTaskIds(): Set<string>;
|
|
166
|
-
/** The recovery context for this thread, or null when it owes nothing. Never throws. */
|
|
167
|
-
contextBlock(): string | null;
|
|
168
|
-
/**
|
|
169
|
-
* Queue a resume for the next runnable task (PR 5), so the thread keeps
|
|
170
|
-
* working without a new owner message. Crash-safe in three steps:
|
|
171
|
-
* reserve the delivery record (`recovery:<task>:v<version>`), enqueue a
|
|
172
|
-
* system message whose id is that key, then mark it delivered. A crash
|
|
173
|
-
* before the enqueue leaves a reservation that the next pass re-sends; a
|
|
174
|
-
* crash after it is harmless because the queue dedups the id. A resume
|
|
175
|
-
* that was already delivered is never queued again for the same version.
|
|
176
|
-
*
|
|
177
|
-
* Never throws. Returns what it queued.
|
|
178
|
-
*/
|
|
179
|
-
deliverResumes(queue: Pick<MessageQueue, "enqueue">, now?: number): ResumeOutcome;
|
|
180
|
-
/**
|
|
181
|
-
* Whether a dequeued resume may still run (the re-check before execution).
|
|
182
|
-
* Yes when its task is still pending at the version it was queued for and
|
|
183
|
-
* is due: a cancel, modification, wait or block since then makes it stale.
|
|
184
|
-
* Also yes, once per task per process, when a previous process left the
|
|
185
|
-
* task `in_progress` ({@link interruptedTaskIds}): that is a resume replayed
|
|
186
|
-
* after a crash, or one queued for the interrupted task. Its version is not
|
|
187
|
-
* compared, because folding the previous process's last events at startup
|
|
188
|
-
* bumps it.
|
|
189
|
-
*
|
|
190
|
-
* The "once" test is against {@link resumesAccepted}, which a requeue
|
|
191
|
-
* releases ({@link releaseResume}): an accepted resume whose message went
|
|
192
|
-
* back on the queue must still run when it is dequeued again, or the
|
|
193
|
-
* interrupted task keeps its only recovery row forever.
|
|
194
|
-
* Fail-closed: any error means no.
|
|
195
|
-
*/
|
|
196
|
-
isResumeRunnable(msg: CommandMessage, now?: number): boolean;
|
|
197
|
-
/**
|
|
198
|
-
* The re-check at dequeue: {@link isResumeRunnable}, and if yes, record
|
|
199
|
-
* that this process is now working on the task so a second copy of its
|
|
200
|
-
* resume is stale.
|
|
201
|
-
*/
|
|
202
|
-
acceptResume(msg: CommandMessage, now?: number): boolean;
|
|
203
|
-
/**
|
|
204
|
-
* The resume was accepted but its message went back on the queue (a failed
|
|
205
|
-
* inject, an orphaned injection, a failed wake). Takes the acceptance back
|
|
206
|
-
* so the next dequeue may run it. Safe for any message: not a resume, or
|
|
207
|
-
* never accepted, does nothing. #2664 review P1-B.
|
|
208
|
-
*/
|
|
209
|
-
releaseResume(messages: readonly CommandMessage[]): void;
|
|
210
|
-
/** Install the loop's hooks. Resumes are only queued once this is set. */
|
|
211
|
-
enableResumes(hooks: ResumeHooks): void;
|
|
212
|
-
/**
|
|
213
|
-
* The owner sent `/stop` (option B, owner 10-04): cancel every unfinished
|
|
214
|
-
* task of this thread. Cancelled is a stored status, so nothing queued
|
|
215
|
-
* starts on its own, a restart cannot bring it back, and resumes already
|
|
216
|
-
* queued are retired at dequeue.
|
|
217
|
-
*
|
|
218
|
-
* Fold pre-stop events first (bounded by `waitMs`) so recorded completion
|
|
219
|
-
* evidence can close tasks before cancellation. Remaining open tasks and
|
|
220
|
-
* tasks created from messages just before `/stop` are then cancelled.
|
|
221
|
-
* Tasks from messages after the `/stop` are kept. Returns every
|
|
222
|
-
* cancelled task, for the reply. Never throws.
|
|
223
|
-
* TODO: a fold that misses `waitMs` (or more than {@link STOP_EVENTS}
|
|
224
|
-
* unfolded events) can still create a task from a pre-stop message later.
|
|
225
|
-
*/
|
|
226
|
-
cancelOpenTasks(waitMs?: number, queue?: StopQueue): Promise<StopOutcome>;
|
|
227
|
-
private cancelOpenTasksAtStop;
|
|
228
|
-
/**
|
|
229
|
-
* Drop queued owner messages: rows not claimed by a wake, that are not
|
|
230
|
-
* system rows (a resume, or the stop command itself) and that the task
|
|
231
|
-
* sidecar would read as owner input. Returns how many were dropped.
|
|
232
|
-
* Fail-safe: a row that cannot be read is left alone.
|
|
233
|
-
*/
|
|
234
|
-
private dropQueuedMessages;
|
|
235
|
-
/**
|
|
236
|
-
* Commit `cancelled` for these tasks without consuming any event, so the
|
|
237
|
-
* sidecar still folds everything. Read and commit run in one synchronous
|
|
238
|
-
* stretch, so no sidecar commit lands between them; a sidecar call in
|
|
239
|
-
* flight hits a version conflict and re-reads.
|
|
240
|
-
*/
|
|
241
|
-
private cancelTasks;
|
|
242
|
-
/**
|
|
243
|
-
* Close one open task of this thread for the agent's `close_thread_task`
|
|
244
|
-
* tool (#2822). The sidecar completes a task only with evidence from the
|
|
245
|
-
* batch it folds, so finished work it missed stayed open and kept being
|
|
246
|
-
* resumed; this is the explicit way out. Commits like {@link cancelTasks}:
|
|
247
|
-
* no event is consumed, and a sidecar call in flight hits a version
|
|
248
|
-
* conflict and re-reads. Never throws.
|
|
249
|
-
*/
|
|
250
|
-
closeTask(input: {
|
|
251
|
-
taskId: string;
|
|
252
|
-
status: "completed" | "cancelled";
|
|
253
|
-
summary: string;
|
|
254
|
-
evidenceRef: string;
|
|
255
|
-
}): CloseTaskOutcome;
|
|
256
|
-
/**
|
|
257
|
-
* Fold the events up to now, then queue the next runnable task. Called at
|
|
258
|
-
* wake end and at startup; never throws and never blocks the caller's
|
|
259
|
-
* loop. Without the fold a task the wake just finished could still look
|
|
260
|
-
* pending, so a pass that cannot catch up delivers nothing and retries
|
|
261
|
-
* after {@link RESUME_RETRY_MS} instead. A fold that needs a slow sidecar
|
|
262
|
-
* call therefore starts the next task about a minute later, not at once.
|
|
263
|
-
*/
|
|
264
|
-
requestResume(waitMs?: number): Promise<ResumeOutcome>;
|
|
265
|
-
private scheduleResumeRetry;
|
|
266
|
-
private clearResumeRetry;
|
|
267
|
-
/** Enqueue one reserved resume and mark it delivered. False when nothing was handed over. */
|
|
268
|
-
private enqueueResume;
|
|
269
|
-
/** Events not yet folded into tasks (the sidecar is behind or failing). */
|
|
270
|
-
pendingEventCount(): number;
|
|
271
|
-
close(graceMs?: number): Promise<void>;
|
|
272
|
-
private safeNotify;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* A task whose checkpoint lists nothing remaining and no blockers: the work
|
|
276
|
-
* is done but the sidecar did not complete it (no evidence in its batch).
|
|
277
|
-
* Resuming it only wakes the agent to find nothing to do (#2822). A task
|
|
278
|
-
* with no checkpoint yet has not been worked on, so it still resumes.
|
|
279
|
-
* TODO: a checkpoint that empties `remaining` too early stops auto-resume;
|
|
280
|
-
* the task stays open and visible in the context block.
|
|
281
|
-
*/
|
|
282
|
-
export declare function hasNoRemainingWork(task: Pick<ThreadTask, "checkpoint">): boolean;
|
|
283
|
-
/** True for a queued thread-task resume row. */
|
|
284
|
-
export declare function isTaskResumeMessage(msg: CommandMessage): boolean;
|
|
285
|
-
/**
|
|
286
|
-
* The re-check before execution, at every place a wake takes rows off the
|
|
287
|
-
* queue: a resume whose task was cancelled, changed, put on hold or already
|
|
288
|
-
* started since it was queued is retired unexecuted. Without a runtime (the
|
|
289
|
-
* switch was turned off) every resume is stale. Returns true when retired.
|
|
290
|
-
*/
|
|
291
|
-
export declare function retireStaleResume(queue: Pick<MessageQueue, "markHandled">, runtime: ThreadTaskRuntime | null, msg: CommandMessage): boolean;
|
|
292
|
-
/**
|
|
293
|
-
* Messages the task store tracks: anything from a real channel. System
|
|
294
|
-
* messages (heartbeats, internal continuations) and external-wake markers
|
|
295
|
-
* carry no owner request. Email and group chats are included; the sidecar
|
|
296
|
-
* decides whether they hold a request.
|
|
297
|
-
*/
|
|
298
|
-
export declare function isTaskRelevantMessage(msg: CommandMessage): boolean;
|
|
299
|
-
/**
|
|
300
|
-
* The end-of-wake handoff (issue #1996 PR 1 rule): a claim is released as
|
|
301
|
-
* handled only after its message is a durable task event, so the follow-up
|
|
302
|
-
* belongs to the task store instead of vanishing with the queue row.
|
|
303
|
-
*
|
|
304
|
-
* Fail-safe: if recording fails the claims are still released. The agent
|
|
305
|
-
* already processed them in this wake; replaying them would redo the work.
|
|
306
|
-
* The error is logged. `handled` never means a task is completed.
|
|
307
|
-
*/
|
|
308
|
-
export declare function releaseClaimsAfterRecording(queue: Pick<MessageQueue, "currentCycleClaims" | "markAllInFlightHandled">, runtime: ThreadTaskRuntime | null): void;
|
|
309
|
-
/**
|
|
310
|
-
* Wake end. A wake cut short by an engine failover restart leaves its claims
|
|
311
|
-
* in flight for the replacement process (issue #2519) and folds nothing.
|
|
312
|
-
* Otherwise release the claims, fold this wake's events into the
|
|
313
|
-
* checkpoints and queue the next runnable task (PR 5). Not awaited: the
|
|
314
|
-
* session keeps its transcript, so the loop need not hold the next message
|
|
315
|
-
* for it. Bounded; leftovers stay unconsumed and the next wake's context
|
|
316
|
-
* shows them raw.
|
|
317
|
-
*/
|
|
318
|
-
export declare function endWakeThreadTasks(queue: Pick<MessageQueue, "currentCycleClaims" | "markAllInFlightHandled">, runtime: ThreadTaskRuntime | null, options: {
|
|
319
|
-
failoverRestartPending: boolean;
|
|
320
|
-
}): void;
|
|
321
|
-
/**
|
|
322
|
-
* Engine-neutral execution events. Both engines feed the same stream
|
|
323
|
-
* handler, so these are called from there. Each id is unique per call, so
|
|
324
|
-
* keys never collide across wakes or retries.
|
|
325
|
-
*/
|
|
326
|
-
export declare const executionEvents: {
|
|
327
|
-
toolResult(toolUseId: string, toolName: string, output: string, isError: boolean): TaskEventInput | null;
|
|
328
|
-
todos(toolUseId: string, todos: readonly {
|
|
329
|
-
content: string;
|
|
330
|
-
status: string;
|
|
331
|
-
}[]): TaskEventInput | null;
|
|
332
|
-
response(turnId: string, text: string): TaskEventInput | null;
|
|
333
|
-
/** What the agent told the owner through notify_user: an explicit status report. */
|
|
334
|
-
statusReport(toolUseId: string, message: string): TaskEventInput | null;
|
|
335
|
-
};
|
|
336
|
-
/**
|
|
337
|
-
* The fast responder's reading of a batch, as one candidate event. It shares
|
|
338
|
-
* the message's dedup key, so the sidecar's origin key matches the message's
|
|
339
|
-
* and the same task is never created twice. Only for a single-message batch:
|
|
340
|
-
* a brief over several messages cannot be keyed to the right one, and the
|
|
341
|
-
* messages themselves are already events.
|
|
342
|
-
*/
|
|
343
|
-
export declare function fastResponderCandidate(messages: readonly CommandMessage[], brief: unknown): TaskEventInput | null;
|
|
344
|
-
/** Record the fast responder's brief as a candidate event. Never throws. */
|
|
345
|
-
export declare function recordFastResponderCandidate(messages: readonly CommandMessage[], brief: unknown): void;
|
|
346
|
-
/** Record an execution event on the process runtime, if there is one. Never throws. */
|
|
347
|
-
export declare function recordExecutionEvent(input: TaskEventInput | null): void;
|
|
348
|
-
/** The process runtime's recovery context, or null without a runtime (then nothing is injected). */
|
|
349
|
-
export declare function buildThreadTaskContext(): string | null;
|
|
350
|
-
/** Bounded reconcile on the process runtime; resolves immediately without one. */
|
|
351
|
-
export declare function reconcileThreadTasks(phase: ReconcilePhase, waitMs?: number): Promise<void>;
|
|
352
|
-
export declare function setThreadTaskRuntime(runtime: ThreadTaskRuntime | null): void;
|
|
353
|
-
export declare function getThreadTaskRuntime(): ThreadTaskRuntime | null;
|
|
354
|
-
//# sourceMappingURL=thread-task-runtime.d.ts.map
|
|
@@ -1 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