@code-yeongyu/senpi 2026.7.31 → 2026.8.3
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 +270 -0
- package/README.md +1 -0
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +27 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/credential-print.d.ts +23 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +116 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/remote-session.d.ts +53 -0
- package/dist/client/remote-session.d.ts.map +1 -0
- package/dist/client/remote-session.js +340 -0
- package/dist/client/remote-session.js.map +1 -0
- package/dist/client/transcript.d.ts +12 -0
- package/dist/client/transcript.d.ts.map +1 -0
- package/dist/client/transcript.js +98 -0
- package/dist/client/transcript.js.map +1 -0
- 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.d.ts +85 -14
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +445 -78
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +5 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +72 -11
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/dynamic-prompt/build.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.js +4 -0
- package/dist/core/dynamic-prompt/build.js.map +1 -1
- package/dist/core/dynamic-prompt/verification.d.ts +2 -2
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.js +2 -2
- package/dist/core/dynamic-prompt/verification.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.d.ts +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.js +25 -25
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.js +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.d.ts +9 -9
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.js +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.js +3 -3
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.d.ts +21 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.js +30 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/auth-lane.d.ts +8 -4
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/auth-lane.js +34 -25
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts +17 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js +56 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.js +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.js +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts +14 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/guidance.js +37 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts +4 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/index.js +12 -10
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.d.ts +3 -3
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.js +2 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.d.ts +18 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/options.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/options.js +70 -10
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.js +32 -19
- package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.d.ts +2 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts +32 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js +43 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts +18 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js +46 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +81 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +127 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts +10 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js +34 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts +56 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js +174 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts +24 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js +34 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +34 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +85 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts +19 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js +176 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts +18 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.js +33 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +76 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts +87 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js +259 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts +19 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +192 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts +20 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +132 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts +14 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js +42 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts +32 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js +8 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts +28 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js +107 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts +16 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js +92 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts +2 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js +10 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream.d.ts +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +208 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.js +25 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.js +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tools.d.ts +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tools.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts +18 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js +32 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts +18 -0
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.js +73 -0
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.d.ts +21 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.js +24 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +119 -15
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts +71 -0
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/lane-policy.js +94 -0
- package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js +1 -0
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts +59 -0
- package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/overflow-retry.js +155 -0
- package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative.d.ts +4 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +39 -115
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/task-intent.d.ts +2 -6
- package/dist/core/extensions/builtin/compaction/task-intent.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/task-intent.js +10 -9
- package/dist/core/extensions/builtin/compaction/task-intent.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/transient-failure.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/transient-failure.js +3 -0
- package/dist/core/extensions/builtin/compaction/transient-failure.js.map +1 -1
- package/dist/core/extensions/builtin/goal/continuation-recovery.d.ts +6 -0
- package/dist/core/extensions/builtin/goal/continuation-recovery.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/continuation-recovery.js +20 -0
- package/dist/core/extensions/builtin/goal/continuation-recovery.js.map +1 -0
- package/dist/core/extensions/builtin/goal/continuation.d.ts +2 -4
- package/dist/core/extensions/builtin/goal/continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/continuation.js +2 -8
- package/dist/core/extensions/builtin/goal/continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts +19 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js +48 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js.map +1 -0
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +17 -15
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js +12 -10
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +5 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +94 -52
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/persistence.d.ts +16 -0
- package/dist/core/extensions/builtin/goal/persistence.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/persistence.js +185 -11
- package/dist/core/extensions/builtin/goal/persistence.js.map +1 -1
- package/dist/core/extensions/builtin/goal/ui.d.ts +1 -0
- package/dist/core/extensions/builtin/goal/ui.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/ui.js +11 -2
- package/dist/core/extensions/builtin/goal/ui.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js +13 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +15 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.js +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js +53 -8
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +5 -2
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/detectors.d.ts +31 -0
- package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/detectors.js +152 -0
- package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/index.d.ts +3 -0
- package/dist/core/extensions/builtin/loop-guard/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/index.js +31 -0
- package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts +5 -0
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/notice.js +42 -0
- package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts +30 -0
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/policy.js +30 -0
- package/dist/core/extensions/builtin/loop-guard/policy.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts +4 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.js +50 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.d.ts +13 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.js +51 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts +13 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.js +39 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.js.map +1 -0
- package/dist/core/extensions/builtin/mcp/health.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/health.js +2 -1
- package/dist/core/extensions/builtin/mcp/health.js.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.d.ts +10 -0
- package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.js +10 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.js +10 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.js +11 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.d.ts +13 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.js +60 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +5 -3
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js +8 -4
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +8 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js +42 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js +3 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/recommended-models/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/recommended-models/index.js +2 -1
- package/dist/core/extensions/builtin/recommended-models/index.js.map +1 -1
- package/dist/core/extensions/builtin/rules/index.js +4 -3
- package/dist/core/extensions/builtin/rules/index.js.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/constants.d.ts +11 -0
- package/dist/core/extensions/builtin/rules/rules/constants.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/constants.js +11 -0
- package/dist/core/extensions/builtin/rules/rules/constants.js.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/formatter.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/formatter.js +15 -1
- package/dist/core/extensions/builtin/rules/rules/formatter.js.map +1 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js +23 -21
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.js +21 -7
- package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-notify.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-notify.js +42 -5
- package/dist/core/extensions/builtin/terminal/monitor-notify.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts +2 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-registry.js +2 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.d.ts +37 -0
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.d.ts.map +1 -0
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.js +61 -0
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.js.map +1 -0
- package/dist/core/extensions/builtin/terminal/monitor-status.d.ts +9 -1
- package/dist/core/extensions/builtin/terminal/monitor-status.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-status.js +35 -2
- package/dist/core/extensions/builtin/terminal/monitor-status.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.d.ts +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor.js +2 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/commands.d.ts +2 -2
- package/dist/core/extensions/builtin/todotools/commands.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/commands.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js +6 -3
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.js +1 -1
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/todo-widget-component.d.ts +19 -0
- package/dist/core/extensions/builtin/todotools/todo-widget-component.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/todo-widget-component.js +78 -0
- package/dist/core/extensions/builtin/todotools/todo-widget-component.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/todo-widget.d.ts +13 -1
- package/dist/core/extensions/builtin/todotools/todo-widget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/todo-widget.js +32 -14
- package/dist/core/extensions/builtin/todotools/todo-widget.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.d.ts +2 -2
- package/dist/core/extensions/builtin/todotools/tools/todo.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.js +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/tps.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tps.js +5 -2
- package/dist/core/extensions/builtin/tps.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/builtin-rules.d.ts +4 -0
- package/dist/core/extensions/builtin/ttsr/builtin-rules.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ttsr/builtin-rules.js +20 -0
- package/dist/core/extensions/builtin/ttsr/builtin-rules.js.map +1 -0
- package/dist/core/extensions/builtin/ttsr/commands.js +9 -1
- package/dist/core/extensions/builtin/ttsr/commands.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/index.js +4 -3
- package/dist/core/extensions/builtin/ttsr/index.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/manager.js +1 -1
- package/dist/core/extensions/builtin/ttsr/manager.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/config.js +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/config.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/native.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/native.js +16 -5
- package/dist/core/extensions/builtin/websearch/websearch/native.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.d.ts +4 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.js +44 -37
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.d.ts +3 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.d.ts.map +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.js +12 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.js.map +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers.js +2 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/renderers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/renderers.js +3 -3
- package/dist/core/extensions/builtin/websearch/websearch/renderers.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/search.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/search.js +1 -3
- package/dist/core/extensions/builtin/websearch/websearch/search.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/tool.js +2 -2
- package/dist/core/extensions/builtin/websearch/websearch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/types.d.ts +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/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.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +19 -18
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +5 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +21 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +38 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +10 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/keybindings.d.ts +24 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/model-registry.d.ts +2 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +3 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.js +2 -2
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +2 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +0 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +18 -34
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts +9 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +25 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/resource-loader.d.ts +15 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +55 -6
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/retry-fallback/hint-policy.d.ts +29 -0
- package/dist/core/retry-fallback/hint-policy.d.ts.map +1 -0
- package/dist/core/retry-fallback/hint-policy.js +54 -0
- package/dist/core/retry-fallback/hint-policy.js.map +1 -0
- package/dist/core/retry-fallback/probe-scheduler.d.ts +60 -0
- package/dist/core/retry-fallback/probe-scheduler.d.ts.map +1 -0
- package/dist/core/retry-fallback/probe-scheduler.js +206 -0
- package/dist/core/retry-fallback/probe-scheduler.js.map +1 -0
- package/dist/core/retry-fallback/settings.d.ts +9 -0
- package/dist/core/retry-fallback/settings.d.ts.map +1 -1
- package/dist/core/retry-fallback/settings.js +14 -0
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/settings-manager.d.ts +10 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +21 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/thinking-levels.d.ts +5 -0
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js +9 -39
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/extensions/llama/provider.js +1 -1
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +44 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/app-server/server/account.d.ts +1 -1
- package/dist/modes/app-server/server/account.js +1 -1
- package/dist/modes/app-server/server/account.js.map +1 -1
- package/dist/modes/app-server/server/server-core.js +1 -1
- package/dist/modes/app-server/server/server-core.js.map +1 -1
- package/dist/modes/interactive/compaction-queue-transfer.d.ts +2 -0
- package/dist/modes/interactive/compaction-queue-transfer.d.ts.map +1 -1
- package/dist/modes/interactive/compaction-queue-transfer.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +5 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +16 -4
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/continuity-notice.d.ts +21 -0
- package/dist/modes/interactive/components/continuity-notice.d.ts.map +1 -0
- package/dist/modes/interactive/components/continuity-notice.js +58 -0
- package/dist/modes/interactive/components/continuity-notice.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +9 -5
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +4 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +6 -2
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +8 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/help-content.d.ts.map +1 -1
- package/dist/modes/interactive/help-content.js +1 -0
- package/dist/modes/interactive/help-content.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +21 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +189 -62
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/risky-main-model-warning.d.ts +1 -1
- package/dist/modes/interactive/risky-main-model-warning.d.ts.map +1 -1
- package/dist/modes/interactive/risky-main-model-warning.js +1 -1
- package/dist/modes/interactive/risky-main-model-warning.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -0
- package/dist/modes/interactive/theme/grok-day.json +1 -0
- package/dist/modes/interactive/theme/grok-night.json +1 -0
- package/dist/modes/interactive/theme/light.json +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +5 -1
- package/dist/modes/interactive/theme/theme.d.ts +2 -2
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +13 -3
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +16 -3
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +22 -2
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/AGENTS.md +1 -6
- package/docs/custom-provider.md +10 -3
- package/docs/development.md +1 -2
- package/docs/extensions.md +34 -1
- package/docs/keybindings.md +13 -0
- package/docs/mcp.md +63 -4
- package/docs/models.md +1 -0
- package/docs/providers.md +41 -5
- package/docs/release-guide.md +7 -5
- package/docs/session-format.md +2 -0
- package/docs/settings.md +3 -1
- package/docs/skills.md +29 -0
- package/docs/themes.md +5 -3
- package/docs/usage.md +5 -0
- package/examples/extensions/custom-compaction.ts +1 -2
- package/examples/extensions/custom-provider-anthropic/index.ts +8 -2
- package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
- package/examples/extensions/handoff.ts +2 -3
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/qna.ts +2 -2
- package/examples/rpc-extension-ui.ts +11 -2
- package/examples/sdk/02-custom-model.ts +1 -2
- package/examples/sdk/12-full-control.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +6 -3
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +3 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-status-ticker.ts +79 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-status.ts +36 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +26 -12
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-execution.ts +146 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-handler.ts +21 -119
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +157 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +62 -208
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-notification.ts +98 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-snapshot.ts +81 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-state.ts +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-eval-result.ts +140 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-notification-queue.ts +53 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-request.ts +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +20 -342
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +14 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +156 -67
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js +70 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +22 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts +13 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js +304 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts +17 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js +60 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts +6 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js +107 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts +28 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js +61 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js +22 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -10
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +154 -77
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +49 -23
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +6 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
- package/node_modules/@earendil-works/pi-ai/README.md +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +56 -25
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js +134 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +64 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +12 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +13 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +12 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.d.ts +24 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.js +70 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +2 -16
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +94 -105
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +19 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +11 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +9 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +81 -26
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +16 -8
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +95 -19
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +18 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +23 -4
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +10 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +13 -12
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts +24 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js +233 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.js +36 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/package.json +10 -6
- package/node_modules/@earendil-works/pi-client/CHANGELOG.md +7 -0
- package/node_modules/@earendil-works/pi-client/README.md +64 -0
- package/node_modules/@earendil-works/pi-client/dist/client.d.ts +25 -0
- package/node_modules/@earendil-works/pi-client/dist/client.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/client.js +386 -0
- package/node_modules/@earendil-works/pi-client/dist/client.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.d.ts +25 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.js +204 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.d.ts +23 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.js +42 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/index.d.ts +6 -0
- package/node_modules/@earendil-works/pi-client/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/index.js +3 -0
- package/node_modules/@earendil-works/pi-client/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.d.ts +8 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.js +11 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts +54 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.js +50 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/state.d.ts +22 -0
- package/node_modules/@earendil-works/pi-client/dist/state.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/state.js +149 -0
- package/node_modules/@earendil-works/pi-client/dist/state.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.d.ts +17 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.js +2 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/types.d.ts +23 -0
- package/node_modules/@earendil-works/pi-client/dist/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/types.js +2 -0
- package/node_modules/@earendil-works/pi-client/dist/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.d.ts +8 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.js +151 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/package.json +56 -0
- package/node_modules/@earendil-works/pi-protocol/README.md +68 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js +163 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js +199 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts +26 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js +29 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts +29 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.js +140 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts +29 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.js +152 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.d.ts +5 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.js +5 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts +13818 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.js +382 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/package.json +48 -0
- package/node_modules/@earendil-works/pi-pty/package.json +2 -2
- package/node_modules/@earendil-works/pi-tui/README.md +77 -14
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts +83 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js +687 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts +13 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js +36 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +7 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js +43 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +3 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +51 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +163 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +3 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +32 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.js +109 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +8 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js +21 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +10 -4
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +10 -4
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +30 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +18 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +40 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.js +6 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +40 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.js +315 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/mux.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/mux.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +10 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +61 -3
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js +12 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +37 -16
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +89 -21
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +10 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +95 -4
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/node_modules/typebox/build/compile/validator.d.mts +3 -11
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +5 -9
- package/node_modules/typebox/build/guard/guard.mjs +10 -15
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
- package/node_modules/typebox/build/type/script/mapping.mjs +95 -92
- package/node_modules/typebox/build/type/script/parser.d.mts +42 -40
- package/node_modules/typebox/build/type/script/parser.mjs +23 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +3 -7
- package/node_modules/typebox/build/typebox.mjs +3 -7
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +33 -33
- package/node_modules/typebox/readme.md +117 -103
- package/package.json +20 -10
- package/dist/core/extensions/builtin/claude-agent-sdk/auth-lane.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/auth-lane.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/guidance.d.ts +0 -6
- package/dist/core/extensions/builtin/claude-agent-sdk/guidance.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/guidance.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/index.d.ts +0 -4
- package/dist/core/extensions/builtin/claude-agent-sdk/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/index.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/oauth-login.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/options.d.ts +0 -16
- package/dist/core/extensions/builtin/claude-agent-sdk/options.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/prompt-bridge.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/sdk-boundary.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.d.ts +0 -15
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.js +0 -41
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/stream.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/stream.js +0 -229
- package/dist/core/extensions/builtin/claude-agent-sdk/stream.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/tools.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/tools.js.map +0 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts +0 -3
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +0 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js +0 -75
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -100
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -42
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -286
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -44
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts +0 -33
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -163
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -39
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +0 -1
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.js +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -18,6 +18,7 @@ import { basename, dirname } from "node:path";
|
|
|
18
18
|
import { prepareAgentToolCall } from "@earendil-works/pi-agent-core";
|
|
19
19
|
import { contentText, SERVER_FALLBACK_ABORTED_DIAGNOSTIC } from "@earendil-works/pi-ai";
|
|
20
20
|
import { cleanupSessionResources, isClassifierRefusal, isContextOverflow, isProviderStreamStallError, isProviderTimeoutError, isRetryableAssistantError, modelsAreEqual, resetApiProviders, streamSimple, } from "@earendil-works/pi-ai/compat";
|
|
21
|
+
import { extract429RetryAfterMs, parseRetryAfterMsMarker } from "@earendil-works/pi-ai/utils/retry-hint";
|
|
21
22
|
import { getAgentDir } from "../config.js";
|
|
22
23
|
import { getThemeByName, theme } from "../modes/interactive/theme/theme.js";
|
|
23
24
|
import { stripFrontmatter } from "../utils/frontmatter.js";
|
|
@@ -41,9 +42,12 @@ import { getModelNarrowingPatterns, resolveModelScope } from "./model-resolver.j
|
|
|
41
42
|
import { PROMPT_CACHE_SAFE_WAIT_ENV, resolvePromptCacheSafeWaitSeconds } from "./prompt-cache-budget.js";
|
|
42
43
|
import { expandPromptTemplate } from "./prompt-templates.js";
|
|
43
44
|
import { isBillingErrorMessage } from "./retry-fallback/billing.js";
|
|
45
|
+
import { formatSelector } from "./retry-fallback/chains.js";
|
|
44
46
|
import { RetryFallbackController } from "./retry-fallback/controller.js";
|
|
45
47
|
import { SelectorCooldowns } from "./retry-fallback/cooldown.js";
|
|
48
|
+
import { classifyRateLimitedWait, nextInTurnDelayMs, probeBackSchedule, } from "./retry-fallback/hint-policy.js";
|
|
46
49
|
import { createFallbackLogger } from "./retry-fallback/log.js";
|
|
50
|
+
import { ProbeBackScheduler } from "./retry-fallback/probe-scheduler.js";
|
|
47
51
|
import { validateFallbackChains } from "./retry-fallback/validate.js";
|
|
48
52
|
import { createSessionLogger } from "./session-log.js";
|
|
49
53
|
import { buildSessionContext, CURRENT_SESSION_VERSION, getLatestCompactionEntry, } from "./session-manager.js";
|
|
@@ -195,10 +199,14 @@ export class AgentSession {
|
|
|
195
199
|
this._isAgentRunActive = false;
|
|
196
200
|
this._toolExecutionDepth = 0;
|
|
197
201
|
this._promptStartPending = false;
|
|
202
|
+
this._nextInputId = 0;
|
|
198
203
|
/** Tracks pending steering messages for UI display. Removed when delivered. */
|
|
199
204
|
this._steeringMessages = [];
|
|
200
205
|
/** Tracks pending follow-up messages for UI display. Removed when delivered. */
|
|
201
206
|
this._followUpMessages = [];
|
|
207
|
+
/** Recovery-only order across both native queue modes and TUI compaction ownership. */
|
|
208
|
+
this._queuedInputOrder = [];
|
|
209
|
+
this._nextQueuedInputOrder = 0;
|
|
202
210
|
/** Messages queued to be included with the next user prompt as context ("asides"). */
|
|
203
211
|
this._pendingNextTurnMessages = [];
|
|
204
212
|
// Queues held while the first post-compaction response is classified. Agent
|
|
@@ -229,16 +237,19 @@ export class AgentSession {
|
|
|
229
237
|
this._retryAbortController = undefined;
|
|
230
238
|
this._retryAttempt = 0;
|
|
231
239
|
this._consecutiveProviderStreamStalls = 0;
|
|
240
|
+
this._probePhase = "idle";
|
|
241
|
+
this._hintDeadlineMs = undefined;
|
|
242
|
+
this._cumulativeHintedWaitMs = 0;
|
|
232
243
|
this._retryPromise = undefined;
|
|
233
244
|
this._retryResolve = undefined;
|
|
234
245
|
this._userAbortPromise = undefined;
|
|
235
246
|
this._agentAbortSource = undefined;
|
|
236
247
|
this._suppressQueuedContinuationAfterUserAbort = false;
|
|
237
|
-
/** Set when clearQueue() drains
|
|
248
|
+
/** Set when clearQueue({ abortWillFollow: true }) drains queues immediately before abort(). */
|
|
238
249
|
this._hadClearedQueuedMessages = false;
|
|
239
250
|
this._extensionEventSignal = undefined;
|
|
240
251
|
// Bash execution state
|
|
241
|
-
this.
|
|
252
|
+
this._bashAbortControllers = new Set();
|
|
242
253
|
this._pendingBashMessages = [];
|
|
243
254
|
this._turnIndex = 0;
|
|
244
255
|
this._baseToolDefinitions = new Map();
|
|
@@ -252,7 +263,8 @@ export class AgentSession {
|
|
|
252
263
|
// Base system prompt (without extension appends) - used to apply fresh appends each turn
|
|
253
264
|
this._baseSystemPrompt = "";
|
|
254
265
|
this._currentServiceTier = undefined;
|
|
255
|
-
this.
|
|
266
|
+
this._sessionFastMode = false;
|
|
267
|
+
this._shownHighReasoningWarningKeys = new Set();
|
|
256
268
|
// Track last assistant message for auto-compaction check
|
|
257
269
|
this._lastAssistantMessage = undefined;
|
|
258
270
|
/** Internal handler for agent events - shared by subscribe and reconnect */
|
|
@@ -318,16 +330,19 @@ export class AgentSession {
|
|
|
318
330
|
}
|
|
319
331
|
this._modelRuntime = modelRuntime;
|
|
320
332
|
this._modelRegistry = config.modelRegistry ?? new ModelRegistry(modelRuntime);
|
|
321
|
-
|
|
322
|
-
|
|
333
|
+
this._agentDir = config.agentDir ?? getAgentDir();
|
|
334
|
+
const fallbackLogger = createFallbackLogger(this._agentDir);
|
|
335
|
+
this._sessionLogger = createSessionLogger(this._agentDir);
|
|
323
336
|
this._fallbackValidationWarnings = validateFallbackChains(this.settingsManager.getRawFallbackChains(), this._modelRegistry);
|
|
324
337
|
for (const warning of this._fallbackValidationWarnings) {
|
|
325
338
|
fallbackLogger.warn("validation_warning", { warning });
|
|
326
339
|
}
|
|
340
|
+
this._selectorCooldowns = new SelectorCooldowns(config.fallbackNow ?? (() => Date.now()));
|
|
341
|
+
this._fallbackNow = config.fallbackNow ?? (() => Date.now());
|
|
327
342
|
this._retryFallback = new RetryFallbackController({
|
|
328
343
|
getSettings: () => this.settingsManager.getRetryFallbackSettings(),
|
|
329
344
|
registry: this._modelRegistry,
|
|
330
|
-
cooldowns:
|
|
345
|
+
cooldowns: this._selectorCooldowns,
|
|
331
346
|
logger: fallbackLogger,
|
|
332
347
|
switchModel: async (model, thinking, reason) => {
|
|
333
348
|
await this._switchActiveModel(model, {
|
|
@@ -344,6 +359,9 @@ export class AgentSession {
|
|
|
344
359
|
getCurrentSelector: () => (this.model ? { model: this.model, thinkingLevel: this.thinkingLevel } : undefined),
|
|
345
360
|
isAuthAvailable: (provider) => this._modelRuntime.hasConfiguredAuth(provider),
|
|
346
361
|
});
|
|
362
|
+
this._probeBackScheduler = new ProbeBackScheduler({
|
|
363
|
+
now: this._fallbackNow,
|
|
364
|
+
});
|
|
347
365
|
this._extensionRunnerRef = config.extensionRunnerRef;
|
|
348
366
|
this._initialActiveToolNames = config.initialActiveToolNames;
|
|
349
367
|
this._allowedToolNames = config.allowedToolNames ? new Set(config.allowedToolNames) : undefined;
|
|
@@ -614,6 +632,10 @@ export class AgentSession {
|
|
|
614
632
|
}
|
|
615
633
|
/** Mirror stuck-prone lifecycle transitions into logs/session.log (content-free). */
|
|
616
634
|
_logSessionEvent(event) {
|
|
635
|
+
if (event.type === "compaction_start") {
|
|
636
|
+
this._sessionLogger.info("compaction_start", { reason: event.reason });
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
617
639
|
if (event.type === "compaction_end") {
|
|
618
640
|
this._sessionLogger.info("compaction_decision", {
|
|
619
641
|
reason: event.reason,
|
|
@@ -651,6 +673,10 @@ export class AgentSession {
|
|
|
651
673
|
getMessageRevision() {
|
|
652
674
|
return this._messageRevision;
|
|
653
675
|
}
|
|
676
|
+
/** Resolved agent state directory for this session. */
|
|
677
|
+
get agentDir() {
|
|
678
|
+
return this._agentDir;
|
|
679
|
+
}
|
|
654
680
|
async _waitForSettledSessionWork() {
|
|
655
681
|
await this._sessionWorkBarrier.waitForSettled(() => this._agentEventQueue);
|
|
656
682
|
}
|
|
@@ -733,7 +759,9 @@ export class AgentSession {
|
|
|
733
759
|
this.agent.steer(message);
|
|
734
760
|
const userMessage = queuedMessages.find((message) => message.role === "user");
|
|
735
761
|
if (userMessage?.role === "user") {
|
|
736
|
-
this.
|
|
762
|
+
const text = this._extractUserMessageText(userMessage.content);
|
|
763
|
+
this._steeringMessages.push(text);
|
|
764
|
+
this._recordQueuedInput(text, "steer");
|
|
737
765
|
this._emitQueueUpdate();
|
|
738
766
|
}
|
|
739
767
|
return;
|
|
@@ -941,6 +969,7 @@ export class AgentSession {
|
|
|
941
969
|
const steeringIndex = this._steeringMessages.indexOf(messageText);
|
|
942
970
|
if (steeringIndex !== -1) {
|
|
943
971
|
this._steeringMessages.splice(steeringIndex, 1);
|
|
972
|
+
this._removeQueuedInput(messageText, "steer");
|
|
944
973
|
this._emitQueueUpdate();
|
|
945
974
|
}
|
|
946
975
|
else {
|
|
@@ -948,6 +977,7 @@ export class AgentSession {
|
|
|
948
977
|
const followUpIndex = this._followUpMessages.indexOf(messageText);
|
|
949
978
|
if (followUpIndex !== -1) {
|
|
950
979
|
this._followUpMessages.splice(followUpIndex, 1);
|
|
980
|
+
this._removeQueuedInput(messageText, "followUp");
|
|
951
981
|
this._emitQueueUpdate();
|
|
952
982
|
}
|
|
953
983
|
}
|
|
@@ -1009,6 +1039,7 @@ export class AgentSession {
|
|
|
1009
1039
|
attempt: this._retryAttempt,
|
|
1010
1040
|
});
|
|
1011
1041
|
this._retryAttempt = 0;
|
|
1042
|
+
this._resetHintTierState();
|
|
1012
1043
|
}
|
|
1013
1044
|
}
|
|
1014
1045
|
}
|
|
@@ -1098,6 +1129,77 @@ export class AgentSession {
|
|
|
1098
1129
|
this._retryPromise = undefined;
|
|
1099
1130
|
}
|
|
1100
1131
|
}
|
|
1132
|
+
_resetHintTierState() {
|
|
1133
|
+
this._probePhase = "idle";
|
|
1134
|
+
this._hintDeadlineMs = undefined;
|
|
1135
|
+
this._cumulativeHintedWaitMs = 0;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Arm the probe-back scheduler for a tier-2 demoted selector. The scheduler
|
|
1139
|
+
* will fire at most two probes (half-hint, then deadline) and clear the
|
|
1140
|
+
* selector cooldown on success so maybeRestorePrimary reverts at the next
|
|
1141
|
+
* turn boundary.
|
|
1142
|
+
*/
|
|
1143
|
+
_armProbeBackForDemotedSelector(selector, hintMs) {
|
|
1144
|
+
if (!selector)
|
|
1145
|
+
return;
|
|
1146
|
+
// Guard: skip when the demoted selector is the ACTIVE model.
|
|
1147
|
+
const currentModel = this.model;
|
|
1148
|
+
if (currentModel && formatSelector(currentModel) === selector)
|
|
1149
|
+
return;
|
|
1150
|
+
// Guard: skip when auth is unavailable at arm time.
|
|
1151
|
+
const parts = selector.split("/");
|
|
1152
|
+
if (parts.length < 2)
|
|
1153
|
+
return;
|
|
1154
|
+
const provider = parts[0];
|
|
1155
|
+
if (!this._modelRuntime.hasConfiguredAuth(provider))
|
|
1156
|
+
return;
|
|
1157
|
+
const now = this._fallbackNow();
|
|
1158
|
+
const schedule = probeBackSchedule(hintMs, now);
|
|
1159
|
+
const modelId = parts.slice(1).join("/");
|
|
1160
|
+
const demotedModel = this._modelRuntime.getModel(provider, modelId);
|
|
1161
|
+
if (!demotedModel)
|
|
1162
|
+
return;
|
|
1163
|
+
this._probeBackScheduler.arm({
|
|
1164
|
+
selector,
|
|
1165
|
+
firstAtMs: schedule.firstAtMs,
|
|
1166
|
+
deadlineMs: schedule.deadlineMs,
|
|
1167
|
+
authAvailable: () => this._modelRuntime.hasConfiguredAuth(provider),
|
|
1168
|
+
runProbe: async (signal) => {
|
|
1169
|
+
try {
|
|
1170
|
+
const result = await this._modelRuntime.completeSimple(demotedModel, {
|
|
1171
|
+
systemPrompt: "Reply with OK.",
|
|
1172
|
+
messages: [{ role: "user", content: [{ type: "text", text: "OK" }], timestamp: now }],
|
|
1173
|
+
}, { maxTokens: 1, signal });
|
|
1174
|
+
return result.stopReason !== "error" && result.stopReason !== "aborted";
|
|
1175
|
+
}
|
|
1176
|
+
catch {
|
|
1177
|
+
return false;
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
onCleared: (sel) => {
|
|
1181
|
+
this._selectorCooldowns.clear(sel);
|
|
1182
|
+
},
|
|
1183
|
+
emit: (event) => {
|
|
1184
|
+
if (event.type === "retry_probe_scheduled") {
|
|
1185
|
+
this._emit({
|
|
1186
|
+
type: "retry_probe_scheduled",
|
|
1187
|
+
selector: event.selector,
|
|
1188
|
+
atMs: event.atMs,
|
|
1189
|
+
probeIndex: event.probeIndex,
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
else {
|
|
1193
|
+
this._emit({
|
|
1194
|
+
type: "retry_probe_result",
|
|
1195
|
+
selector: event.selector,
|
|
1196
|
+
ok: event.ok,
|
|
1197
|
+
errorMessage: event.errorMessage,
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1101
1203
|
/** Find the last assistant message in agent state (including aborted ones) */
|
|
1102
1204
|
_findLastAssistantMessage() {
|
|
1103
1205
|
const messages = this.agent.state.messages;
|
|
@@ -1309,6 +1411,7 @@ export class AgentSession {
|
|
|
1309
1411
|
*/
|
|
1310
1412
|
dispose() {
|
|
1311
1413
|
try {
|
|
1414
|
+
this._probeBackScheduler.cancel("dispose");
|
|
1312
1415
|
this.abortRetry();
|
|
1313
1416
|
this.abortCompaction();
|
|
1314
1417
|
this.abortBranchSummary();
|
|
@@ -1342,6 +1445,22 @@ export class AgentSession {
|
|
|
1342
1445
|
get serviceTier() {
|
|
1343
1446
|
return this._currentServiceTier;
|
|
1344
1447
|
}
|
|
1448
|
+
/**
|
|
1449
|
+
* True when the active model is served at the priority ("fast") tier: either the model
|
|
1450
|
+
* itself is configured for it (an `openai` `-fast` catalog variant, a scoped
|
|
1451
|
+
* `provider/id:priority`) or an extension turned fast mode on for this session.
|
|
1452
|
+
*
|
|
1453
|
+
* Display-only: it never feeds request composition, so an extension toggling fast mode
|
|
1454
|
+
* for one provider cannot leak `service_tier` into another provider's payload.
|
|
1455
|
+
* `serviceTier` stays the single request-side source.
|
|
1456
|
+
*/
|
|
1457
|
+
isFastModeActive() {
|
|
1458
|
+
return this._sessionFastMode || this._currentServiceTier === "priority";
|
|
1459
|
+
}
|
|
1460
|
+
/** Session-scoped fast-mode indicator; never persisted, reset on session start. */
|
|
1461
|
+
setSessionFastMode(enabled) {
|
|
1462
|
+
this._sessionFastMode = enabled;
|
|
1463
|
+
}
|
|
1345
1464
|
/**
|
|
1346
1465
|
* Explicit scoped/favorite tiers win; otherwise fall back to the model's
|
|
1347
1466
|
* configured serviceTier from models.json/extension compatibility config.
|
|
@@ -1683,6 +1802,12 @@ export class AgentSession {
|
|
|
1683
1802
|
let messages;
|
|
1684
1803
|
let titlePrompt;
|
|
1685
1804
|
let consumedNextTurnMessages;
|
|
1805
|
+
let inputId;
|
|
1806
|
+
const emitInputDisposition = async (disposition) => {
|
|
1807
|
+
if (inputId === undefined)
|
|
1808
|
+
return;
|
|
1809
|
+
await this._extensionRunner.emit({ type: "input_disposition", inputId, disposition });
|
|
1810
|
+
};
|
|
1686
1811
|
try {
|
|
1687
1812
|
// Handle extension commands first (execute immediately, even during streaming)
|
|
1688
1813
|
// Extension commands manage their own LLM interaction via pi.sendMessage()
|
|
@@ -1700,9 +1825,11 @@ export class AgentSession {
|
|
|
1700
1825
|
let currentText = text;
|
|
1701
1826
|
let currentImages = options?.images;
|
|
1702
1827
|
if (this._extensionRunner.hasHandlers("input")) {
|
|
1703
|
-
|
|
1828
|
+
inputId = `${this.sessionManager.getSessionId()}:${++this._nextInputId}`;
|
|
1829
|
+
const inputResult = await this._extensionRunner.emitInput(currentText, currentImages, options?.source ?? "interactive", this.isStreaming ? options?.streamingBehavior : undefined, inputId);
|
|
1704
1830
|
throwIfCancelled();
|
|
1705
1831
|
if (inputResult.action === "handled") {
|
|
1832
|
+
await emitInputDisposition("handled");
|
|
1706
1833
|
promptDisposition?.("handled");
|
|
1707
1834
|
preflightResult?.(true);
|
|
1708
1835
|
return;
|
|
@@ -1733,6 +1860,7 @@ export class AgentSession {
|
|
|
1733
1860
|
else {
|
|
1734
1861
|
await this._queueSteer(expandedText, currentImages);
|
|
1735
1862
|
}
|
|
1863
|
+
await emitInputDisposition("queued");
|
|
1736
1864
|
promptDisposition?.("queued");
|
|
1737
1865
|
preflightResult?.(true);
|
|
1738
1866
|
return;
|
|
@@ -1750,6 +1878,7 @@ export class AgentSession {
|
|
|
1750
1878
|
else {
|
|
1751
1879
|
await this._queueSteer(expandedText, currentImages);
|
|
1752
1880
|
}
|
|
1881
|
+
await emitInputDisposition("queued");
|
|
1753
1882
|
promptDisposition?.("queued");
|
|
1754
1883
|
preflightResult?.(true);
|
|
1755
1884
|
return;
|
|
@@ -1773,6 +1902,7 @@ export class AgentSession {
|
|
|
1773
1902
|
else {
|
|
1774
1903
|
await this._queueSteer(expandedText, currentImages);
|
|
1775
1904
|
}
|
|
1905
|
+
await emitInputDisposition("queued");
|
|
1776
1906
|
promptDisposition?.("queued");
|
|
1777
1907
|
preflightResult?.(true);
|
|
1778
1908
|
return;
|
|
@@ -1793,6 +1923,7 @@ export class AgentSession {
|
|
|
1793
1923
|
else {
|
|
1794
1924
|
await this._queueSteer(expandedText, currentImages);
|
|
1795
1925
|
}
|
|
1926
|
+
await emitInputDisposition("queued");
|
|
1796
1927
|
promptDisposition?.("queued");
|
|
1797
1928
|
preflightResult?.(true);
|
|
1798
1929
|
return;
|
|
@@ -1866,8 +1997,11 @@ export class AgentSession {
|
|
|
1866
1997
|
// next-turn, and before_agent_start additions are also provider-visible,
|
|
1867
1998
|
// so make one final admission decision against the complete request.
|
|
1868
1999
|
await this._enforceFinalProviderAdmission(messages);
|
|
2000
|
+
throwIfCancelled();
|
|
2001
|
+
await emitInputDisposition("started");
|
|
1869
2002
|
}
|
|
1870
2003
|
catch (error) {
|
|
2004
|
+
await emitInputDisposition("rejected");
|
|
1871
2005
|
if (consumedNextTurnMessages && consumedNextTurnMessages.length > 0) {
|
|
1872
2006
|
this._pendingNextTurnMessages = [...consumedNextTurnMessages, ...this._pendingNextTurnMessages];
|
|
1873
2007
|
}
|
|
@@ -1881,7 +2015,6 @@ export class AgentSession {
|
|
|
1881
2015
|
if (!messages) {
|
|
1882
2016
|
return;
|
|
1883
2017
|
}
|
|
1884
|
-
throwIfCancelled();
|
|
1885
2018
|
promptDisposition?.("started");
|
|
1886
2019
|
preflightResult?.(true);
|
|
1887
2020
|
if (options?.thinkingLevel !== undefined) {
|
|
@@ -2001,7 +2134,7 @@ export class AgentSession {
|
|
|
2001
2134
|
* @param images Optional image attachments to include with the message
|
|
2002
2135
|
* @throws Error if text is an extension command
|
|
2003
2136
|
*/
|
|
2004
|
-
async steer(text, images) {
|
|
2137
|
+
async steer(text, images, recovery) {
|
|
2005
2138
|
// Check for extension commands (cannot be queued)
|
|
2006
2139
|
if (text.startsWith("/")) {
|
|
2007
2140
|
this._throwIfExtensionCommand(text);
|
|
@@ -2009,7 +2142,7 @@ export class AgentSession {
|
|
|
2009
2142
|
// Expand skill commands and prompt templates
|
|
2010
2143
|
let expandedText = this._expandSkillCommand(text);
|
|
2011
2144
|
expandedText = expandPromptTemplate(expandedText, [...this.promptTemplates]);
|
|
2012
|
-
await this._queueSteer(expandedText, images);
|
|
2145
|
+
await this._queueSteer(expandedText, images, recovery?.enqueueOrder);
|
|
2013
2146
|
}
|
|
2014
2147
|
/**
|
|
2015
2148
|
* Queue a follow-up message to be processed after the agent finishes.
|
|
@@ -2018,7 +2151,7 @@ export class AgentSession {
|
|
|
2018
2151
|
* @param images Optional image attachments to include with the message
|
|
2019
2152
|
* @throws Error if text is an extension command
|
|
2020
2153
|
*/
|
|
2021
|
-
async followUp(text, images) {
|
|
2154
|
+
async followUp(text, images, recovery) {
|
|
2022
2155
|
// Check for extension commands (cannot be queued)
|
|
2023
2156
|
if (text.startsWith("/")) {
|
|
2024
2157
|
this._throwIfExtensionCommand(text);
|
|
@@ -2026,7 +2159,7 @@ export class AgentSession {
|
|
|
2026
2159
|
// Expand skill commands and prompt templates
|
|
2027
2160
|
let expandedText = this._expandSkillCommand(text);
|
|
2028
2161
|
expandedText = expandPromptTemplate(expandedText, [...this.promptTemplates]);
|
|
2029
|
-
await this._queueFollowUp(expandedText, images);
|
|
2162
|
+
await this._queueFollowUp(expandedText, images, recovery?.enqueueOrder);
|
|
2030
2163
|
}
|
|
2031
2164
|
_startSessionTitleGeneration(firstPrompt) {
|
|
2032
2165
|
if (!this._autoTitleSessions || this.sessionManager.getSessionName() || shouldSkipSessionTitle(firstPrompt)) {
|
|
@@ -2100,8 +2233,9 @@ export class AgentSession {
|
|
|
2100
2233
|
/**
|
|
2101
2234
|
* Internal: Queue a steering message (already expanded, no extension command check).
|
|
2102
2235
|
*/
|
|
2103
|
-
async _queueSteer(text, images) {
|
|
2236
|
+
async _queueSteer(text, images, enqueueOrder) {
|
|
2104
2237
|
this._steeringMessages.push(text);
|
|
2238
|
+
this._recordQueuedInput(text, "steer", enqueueOrder);
|
|
2105
2239
|
this._sessionLogger.debug("queue_enqueue", { mode: "steer", count: this._steeringMessages.length });
|
|
2106
2240
|
this._emitQueueUpdate();
|
|
2107
2241
|
const content = [{ type: "text", text }];
|
|
@@ -2118,8 +2252,9 @@ export class AgentSession {
|
|
|
2118
2252
|
/**
|
|
2119
2253
|
* Internal: Queue a follow-up message (already expanded, no extension command check).
|
|
2120
2254
|
*/
|
|
2121
|
-
async _queueFollowUp(text, images) {
|
|
2255
|
+
async _queueFollowUp(text, images, enqueueOrder) {
|
|
2122
2256
|
this._followUpMessages.push(text);
|
|
2257
|
+
this._recordQueuedInput(text, "followUp", enqueueOrder);
|
|
2123
2258
|
this._sessionLogger.debug("queue_enqueue", { mode: "followUp", count: this._followUpMessages.length });
|
|
2124
2259
|
this._emitQueueUpdate();
|
|
2125
2260
|
const content = [{ type: "text", text }];
|
|
@@ -2212,8 +2347,23 @@ export class AgentSession {
|
|
|
2212
2347
|
}
|
|
2213
2348
|
}
|
|
2214
2349
|
else if (options?.triggerTurn) {
|
|
2215
|
-
|
|
2216
|
-
|
|
2350
|
+
try {
|
|
2351
|
+
await this._enforceCompactionBeforeProvider(this._findLastAssistantMessage(), false, "pre_prompt");
|
|
2352
|
+
await this._enforceFinalProviderAdmission([appMessage]);
|
|
2353
|
+
}
|
|
2354
|
+
catch (error) {
|
|
2355
|
+
// Mirror sendUserMessage's retention contract: an admission
|
|
2356
|
+
// rejection must retain the message for later delivery instead
|
|
2357
|
+
// of silently dropping it (the fire-and-forget extension action
|
|
2358
|
+
// swallows this rejection).
|
|
2359
|
+
if (options.deliverAs === "followUp") {
|
|
2360
|
+
this.agent.followUp(appMessage);
|
|
2361
|
+
}
|
|
2362
|
+
else {
|
|
2363
|
+
this.agent.steer(appMessage);
|
|
2364
|
+
}
|
|
2365
|
+
throw error;
|
|
2366
|
+
}
|
|
2217
2367
|
await this._promptAgent(appMessage);
|
|
2218
2368
|
}
|
|
2219
2369
|
else {
|
|
@@ -2311,26 +2461,46 @@ export class AgentSession {
|
|
|
2311
2461
|
finishSessionWork?.();
|
|
2312
2462
|
}
|
|
2313
2463
|
}
|
|
2464
|
+
/** Reserve a global order for input temporarily owned outside the native queues. */
|
|
2465
|
+
reserveQueuedInputOrder() {
|
|
2466
|
+
this._nextQueuedInputOrder += 1;
|
|
2467
|
+
return this._nextQueuedInputOrder;
|
|
2468
|
+
}
|
|
2469
|
+
_recordQueuedInput(text, mode, enqueueOrder) {
|
|
2470
|
+
const order = enqueueOrder ?? this.reserveQueuedInputOrder();
|
|
2471
|
+
this._nextQueuedInputOrder = Math.max(this._nextQueuedInputOrder, order);
|
|
2472
|
+
this._queuedInputOrder.push({ text, mode, enqueueOrder: order });
|
|
2473
|
+
}
|
|
2474
|
+
_removeQueuedInput(text, mode) {
|
|
2475
|
+
const index = this._queuedInputOrder.findIndex((message) => message.mode === mode && message.text === text);
|
|
2476
|
+
if (index !== -1)
|
|
2477
|
+
this._queuedInputOrder.splice(index, 1);
|
|
2478
|
+
}
|
|
2314
2479
|
/**
|
|
2315
|
-
* Clear all queued messages and return them.
|
|
2316
|
-
*
|
|
2317
|
-
* @
|
|
2480
|
+
* Clear all queued messages and return them. The non-enumerable `ordered`
|
|
2481
|
+
* view preserves legacy object equality and native queue semantics.
|
|
2482
|
+
* @param options.abortWillFollow Mark a non-empty drain so an immediately following abort can emit session_abort.
|
|
2318
2483
|
*/
|
|
2319
|
-
clearQueue() {
|
|
2484
|
+
clearQueue(options = { abortWillFollow: false }) {
|
|
2320
2485
|
const steering = [...this._steeringMessages];
|
|
2321
2486
|
const followUp = [...this._followUpMessages];
|
|
2322
|
-
|
|
2487
|
+
const ordered = [...this._queuedInputOrder].sort((a, b) => a.enqueueOrder - b.enqueueOrder);
|
|
2488
|
+
if (options.abortWillFollow && (steering.length > 0 || followUp.length > 0)) {
|
|
2323
2489
|
this._hadClearedQueuedMessages = true;
|
|
2490
|
+
}
|
|
2324
2491
|
// Clear every queue synchronously. Deferred post-compaction messages are
|
|
2325
2492
|
// already represented in visible bookkeeping, so they must not be returned
|
|
2326
2493
|
// a second time or later resurrected into Agent's native queues.
|
|
2327
2494
|
this._steeringMessages = [];
|
|
2328
2495
|
this._followUpMessages = [];
|
|
2496
|
+
this._queuedInputOrder = [];
|
|
2329
2497
|
this._postCompactionDeferredSteeringMessages = [];
|
|
2330
2498
|
this._postCompactionDeferredFollowUpMessages = [];
|
|
2331
2499
|
this.agent.clearAllQueues();
|
|
2332
2500
|
this._emitQueueUpdate();
|
|
2333
|
-
|
|
2501
|
+
const cleared = { steering, followUp };
|
|
2502
|
+
Object.defineProperty(cleared, "ordered", { value: ordered, enumerable: false });
|
|
2503
|
+
return cleared;
|
|
2334
2504
|
}
|
|
2335
2505
|
/** Number of pending messages (includes both steering and follow-up) */
|
|
2336
2506
|
get pendingMessageCount() {
|
|
@@ -2448,6 +2618,7 @@ export class AgentSession {
|
|
|
2448
2618
|
// A manual model change abandons any active fallback window; if a fallback
|
|
2449
2619
|
// retry sleep is still pending, cancel it so no surprise continuation fires.
|
|
2450
2620
|
const hadActiveFallback = this._retryFallback.activeState !== undefined;
|
|
2621
|
+
this._probeBackScheduler.cancel("manual-model-change");
|
|
2451
2622
|
this._retryFallback.clearForManualModelChange(model);
|
|
2452
2623
|
if (hadActiveFallback && this._retryAbortController) {
|
|
2453
2624
|
this.abortRetry();
|
|
@@ -2487,9 +2658,6 @@ export class AgentSession {
|
|
|
2487
2658
|
if (opts.ephemeralThinkingLevel !== undefined) {
|
|
2488
2659
|
this._applyEphemeralThinkingLevel(thinkingLevel);
|
|
2489
2660
|
}
|
|
2490
|
-
else if (opts.persistDefault) {
|
|
2491
|
-
this.setThinkingLevel(thinkingLevel);
|
|
2492
|
-
}
|
|
2493
2661
|
else {
|
|
2494
2662
|
this.setSessionThinkingLevel(thinkingLevel);
|
|
2495
2663
|
}
|
|
@@ -2536,6 +2704,7 @@ export class AgentSession {
|
|
|
2536
2704
|
if (invalidatesCompaction) {
|
|
2537
2705
|
this._invalidateCompactionForModelSelection();
|
|
2538
2706
|
}
|
|
2707
|
+
this._probeBackScheduler.cancel("manual-model-change");
|
|
2539
2708
|
this._retryFallback.clearForManualModelChange(next.model);
|
|
2540
2709
|
const thinkingLevel = this._getThinkingLevelForModelSwitch(next.thinkingLevel);
|
|
2541
2710
|
this.agent.state.model = next.model;
|
|
@@ -2543,10 +2712,10 @@ export class AgentSession {
|
|
|
2543
2712
|
this.settingsManager.setDefaultModelAndProvider(next.model.provider, next.model.id);
|
|
2544
2713
|
this._currentServiceTier = this._resolveServiceTier(next.model, next.serviceTier);
|
|
2545
2714
|
// Apply thinking level.
|
|
2546
|
-
// - Explicit favorite model thinking level overrides
|
|
2547
|
-
// - Undefined favorite model thinking level
|
|
2548
|
-
//
|
|
2549
|
-
this.
|
|
2715
|
+
// - Explicit favorite model thinking level overrides the effective session level
|
|
2716
|
+
// - Undefined favorite model thinking level restores the remembered user preference
|
|
2717
|
+
// setSessionThinkingLevel clamps without replacing that preference.
|
|
2718
|
+
this.setSessionThinkingLevel(thinkingLevel);
|
|
2550
2719
|
const systemPromptChange = await this._emitModelSelect(next.model, currentModel, "cycle");
|
|
2551
2720
|
const cycleResult = { model: next.model, thinkingLevel: this.thinkingLevel, isScoped: true };
|
|
2552
2721
|
if (systemPromptChange) {
|
|
@@ -2599,15 +2768,12 @@ export class AgentSession {
|
|
|
2599
2768
|
_emitHighReasoningWarningIfNeeded() {
|
|
2600
2769
|
const model = this.model;
|
|
2601
2770
|
const level = this.thinkingLevel;
|
|
2602
|
-
if (!model || !shouldWarnHighReasoning(model, level))
|
|
2603
|
-
this._lastHighReasoningWarningKey = undefined;
|
|
2771
|
+
if (!model || !shouldWarnHighReasoning(model, level))
|
|
2604
2772
|
return;
|
|
2605
|
-
}
|
|
2606
|
-
|
|
2607
|
-
if (this._lastHighReasoningWarningKey === key) {
|
|
2773
|
+
const key = `${model.provider}/${model.id}`;
|
|
2774
|
+
if (this._shownHighReasoningWarningKeys.has(key))
|
|
2608
2775
|
return;
|
|
2609
|
-
|
|
2610
|
-
this._lastHighReasoningWarningKey = key;
|
|
2776
|
+
this._shownHighReasoningWarningKeys.add(key);
|
|
2611
2777
|
this._emit({
|
|
2612
2778
|
type: "high_reasoning_warning",
|
|
2613
2779
|
modelId: model.id,
|
|
@@ -2660,10 +2826,7 @@ export class AgentSession {
|
|
|
2660
2826
|
if (explicitLevel !== undefined) {
|
|
2661
2827
|
return explicitLevel;
|
|
2662
2828
|
}
|
|
2663
|
-
|
|
2664
|
-
return this.settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL;
|
|
2665
|
-
}
|
|
2666
|
-
return this.thinkingLevel;
|
|
2829
|
+
return this.settingsManager.getDefaultThinkingLevel() ?? this.thinkingLevel ?? DEFAULT_THINKING_LEVEL;
|
|
2667
2830
|
}
|
|
2668
2831
|
_clampThinkingLevel(level, availableLevels) {
|
|
2669
2832
|
const available = new Set(availableLevels);
|
|
@@ -2853,6 +3016,8 @@ export class AgentSession {
|
|
|
2853
3016
|
this._releasePendingCompactionAdmission(admission, outcome);
|
|
2854
3017
|
if (disconnected && !this.isCompacting)
|
|
2855
3018
|
this._reconnectToAgent();
|
|
3019
|
+
if (outcome === "completed")
|
|
3020
|
+
this._resumeQueuedMessagesAfterCompaction();
|
|
2856
3021
|
}
|
|
2857
3022
|
}
|
|
2858
3023
|
async applyCompaction(precomputed, options) {
|
|
@@ -2882,6 +3047,7 @@ export class AgentSession {
|
|
|
2882
3047
|
if (!execution.accepted) {
|
|
2883
3048
|
return { applied: false, reason: "rejected" };
|
|
2884
3049
|
}
|
|
3050
|
+
this._resumeQueuedMessagesAfterCompaction();
|
|
2885
3051
|
return { applied: true, reason: "ok" };
|
|
2886
3052
|
}
|
|
2887
3053
|
catch (error) {
|
|
@@ -3287,6 +3453,8 @@ export class AgentSession {
|
|
|
3287
3453
|
if (compacted)
|
|
3288
3454
|
return true;
|
|
3289
3455
|
}
|
|
3456
|
+
if (this._isCompactionOnCooldown())
|
|
3457
|
+
return false;
|
|
3290
3458
|
throw new RequiredCompactionError();
|
|
3291
3459
|
}
|
|
3292
3460
|
/**
|
|
@@ -3325,6 +3493,8 @@ export class AgentSession {
|
|
|
3325
3493
|
throw new RequiredCompactionError();
|
|
3326
3494
|
}
|
|
3327
3495
|
const compacted = await this._runPrePromptCompaction(lastAssistantMessage, false, "pre_prompt");
|
|
3496
|
+
if (!compacted && !isOversized() && this._isCompactionOnCooldown())
|
|
3497
|
+
return;
|
|
3328
3498
|
if (!compacted || isOversized()) {
|
|
3329
3499
|
throw new RequiredCompactionError();
|
|
3330
3500
|
}
|
|
@@ -3470,6 +3640,10 @@ export class AgentSession {
|
|
|
3470
3640
|
}
|
|
3471
3641
|
return false;
|
|
3472
3642
|
}
|
|
3643
|
+
_isCompactionOnCooldown() {
|
|
3644
|
+
const state = this._compactionLifecycle.state;
|
|
3645
|
+
return state.status === "failed" && state.rejectionCause === "circuit-breaker";
|
|
3646
|
+
}
|
|
3473
3647
|
async _runPrePromptCompaction(lastAssistantMessage, skipAbortedCheck, reason = "pre_prompt", willRetry = false, allowSummaryOnly = false) {
|
|
3474
3648
|
const controller = new AbortController();
|
|
3475
3649
|
this._claimCompactionController(controller, "compaction");
|
|
@@ -3530,8 +3704,11 @@ export class AgentSession {
|
|
|
3530
3704
|
if (!shouldCompact(contextTokens, model.contextWindow, settings))
|
|
3531
3705
|
return;
|
|
3532
3706
|
const compacted = await this._runPrePromptCompaction(this._findLastAssistantMessage(), true, "pre_prompt");
|
|
3533
|
-
if (!compacted)
|
|
3707
|
+
if (!compacted) {
|
|
3708
|
+
if (this._isCompactionOnCooldown())
|
|
3709
|
+
return;
|
|
3534
3710
|
throw new RequiredCompactionError();
|
|
3711
|
+
}
|
|
3535
3712
|
this._scheduledContinuationRecompacted = true;
|
|
3536
3713
|
}
|
|
3537
3714
|
async _continueAgentAfterCurrentRun(options = {}) {
|
|
@@ -3570,6 +3747,18 @@ export class AgentSession {
|
|
|
3570
3747
|
this._scheduledContinuationRecompacted = false;
|
|
3571
3748
|
}
|
|
3572
3749
|
}
|
|
3750
|
+
/**
|
|
3751
|
+
* Mirror _runAutoCompaction's post-success recovery for non-auto compaction
|
|
3752
|
+
* owners (manual, extension action, extension apply): a custom triggerTurn
|
|
3753
|
+
* message sent while the compaction was running is parked in the agent-level
|
|
3754
|
+
* queues without starting a turn, so a settled compaction must deliver it or
|
|
3755
|
+
* hidden continuations (e.g. goal) wedge until manual user input.
|
|
3756
|
+
*/
|
|
3757
|
+
_resumeQueuedMessagesAfterCompaction() {
|
|
3758
|
+
if (this.pendingMessageCount > 0 || this.agent.hasQueuedMessages()) {
|
|
3759
|
+
this._scheduleContinuationAfterCurrentEvent();
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3573
3762
|
_scheduleContinuationAfterCurrentEvent(options = {}, retryContinuation = false) {
|
|
3574
3763
|
// Tool hooks wait for queued message persistence, so continue() cannot run inside this event promise.
|
|
3575
3764
|
const currentEventQueue = this._agentEventQueue;
|
|
@@ -3909,10 +4098,13 @@ export class AgentSession {
|
|
|
3909
4098
|
return true;
|
|
3910
4099
|
},
|
|
3911
4100
|
setSessionThinkingLevel: (level) => this.setSessionThinkingLevel(level),
|
|
4101
|
+
setSessionFastMode: (enabled) => this.setSessionFastMode(enabled),
|
|
3912
4102
|
}, {
|
|
3913
4103
|
getModel: () => this.model,
|
|
3914
4104
|
getServiceTier: () => this.serviceTier,
|
|
4105
|
+
getScopedModels: () => this._scopedModels,
|
|
3915
4106
|
isIdle: () => this.isIdle,
|
|
4107
|
+
getAgentDir: () => this._agentDir,
|
|
3916
4108
|
isProjectTrusted: () => this.settingsManager.isProjectTrusted(),
|
|
3917
4109
|
getSignal: () => this._extensionEventSignal ?? this.agent.signal,
|
|
3918
4110
|
abort: () => {
|
|
@@ -3979,6 +4171,7 @@ export class AgentSession {
|
|
|
3979
4171
|
const controller = admission.controller;
|
|
3980
4172
|
void (async () => {
|
|
3981
4173
|
let outcome = "failed";
|
|
4174
|
+
let compactionCompleted = false;
|
|
3982
4175
|
let disconnected = false;
|
|
3983
4176
|
try {
|
|
3984
4177
|
await this._abortActiveAgentAndRetry("system");
|
|
@@ -3994,6 +4187,7 @@ export class AgentSession {
|
|
|
3994
4187
|
});
|
|
3995
4188
|
if (execution.accepted) {
|
|
3996
4189
|
outcome = "completed";
|
|
4190
|
+
compactionCompleted = true;
|
|
3997
4191
|
options?.onComplete?.(execution.result);
|
|
3998
4192
|
}
|
|
3999
4193
|
else {
|
|
@@ -4027,6 +4221,10 @@ export class AgentSession {
|
|
|
4027
4221
|
this._releasePendingCompactionAdmission(admission, outcome);
|
|
4028
4222
|
if (disconnected && !this.isCompacting)
|
|
4029
4223
|
this._reconnectToAgent();
|
|
4224
|
+
// A throwing onComplete consumer overwrites outcome in the catch
|
|
4225
|
+
// block, so recovery keys off whether compaction itself succeeded.
|
|
4226
|
+
if (compactionCompleted)
|
|
4227
|
+
this._resumeQueuedMessagesAfterCompaction();
|
|
4030
4228
|
}
|
|
4031
4229
|
})();
|
|
4032
4230
|
},
|
|
@@ -4288,32 +4486,11 @@ export class AgentSession {
|
|
|
4288
4486
|
this._retryFallback.canTryFallback());
|
|
4289
4487
|
}
|
|
4290
4488
|
_getProviderRetryDelayMs(errorMessage) {
|
|
4291
|
-
const
|
|
4292
|
-
if (
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
const retryAfterSecondsMatch = errorMessage.match(/\bretry[-_ ]?after\s*[:=]\s*(\d+(?:\.\d+)?)/i);
|
|
4297
|
-
if (retryAfterSecondsMatch) {
|
|
4298
|
-
const delayMs = Math.ceil(Number(retryAfterSecondsMatch[1]) * 1000);
|
|
4299
|
-
return Number.isFinite(delayMs) && delayMs > 0 ? delayMs : undefined;
|
|
4300
|
-
}
|
|
4301
|
-
const retryInMatch = errorMessage.match(/\b(?:retry|try again|wait)\s+(?:after|in)\s*(\d+(?:\.\d+)?)\s*(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m)\b/i);
|
|
4302
|
-
if (!retryInMatch) {
|
|
4303
|
-
return undefined;
|
|
4304
|
-
}
|
|
4305
|
-
const value = Number(retryInMatch[1]);
|
|
4306
|
-
if (!Number.isFinite(value) || value <= 0) {
|
|
4307
|
-
return undefined;
|
|
4308
|
-
}
|
|
4309
|
-
const unit = retryInMatch[2].toLowerCase();
|
|
4310
|
-
if (unit === "m" || unit.startsWith("min")) {
|
|
4311
|
-
return Math.ceil(value * 60_000);
|
|
4312
|
-
}
|
|
4313
|
-
if (unit.startsWith("s")) {
|
|
4314
|
-
return Math.ceil(value * 1000);
|
|
4315
|
-
}
|
|
4316
|
-
return Math.ceil(value);
|
|
4489
|
+
const markerMs = parseRetryAfterMsMarker(errorMessage);
|
|
4490
|
+
if (markerMs !== undefined)
|
|
4491
|
+
return markerMs;
|
|
4492
|
+
const hintMs = extract429RetryAfterMs({ bodyText: errorMessage });
|
|
4493
|
+
return hintMs;
|
|
4317
4494
|
}
|
|
4318
4495
|
_getProviderTimeoutRetryOptions(message) {
|
|
4319
4496
|
if (!isProviderTimeoutError(message))
|
|
@@ -4381,6 +4558,8 @@ export class AgentSession {
|
|
|
4381
4558
|
const isRefusal = isClassifierRefusal(message);
|
|
4382
4559
|
const hardErrorFallback = options.hardErrorFallback === true;
|
|
4383
4560
|
let switchedFallback = false;
|
|
4561
|
+
let is429TierRouted = false;
|
|
4562
|
+
let hintTierDelayMs;
|
|
4384
4563
|
if (hardErrorFallback) {
|
|
4385
4564
|
// A non-retryable provider failure must never replay on the same model.
|
|
4386
4565
|
// Billing-class failures never recover on this account, so the fallback
|
|
@@ -4398,6 +4577,16 @@ export class AgentSession {
|
|
|
4398
4577
|
// Refusals are only retried through a new chain candidate. They never use
|
|
4399
4578
|
// same-model retries or the transient over-budget fallback escape hatch.
|
|
4400
4579
|
if (this._retryAttempt + 1 > settings.maxRetries) {
|
|
4580
|
+
if (this._retryAttempt > 0) {
|
|
4581
|
+
this._emit({
|
|
4582
|
+
type: "auto_retry_end",
|
|
4583
|
+
success: false,
|
|
4584
|
+
attempt: this._retryAttempt,
|
|
4585
|
+
finalError: message.errorMessage,
|
|
4586
|
+
});
|
|
4587
|
+
}
|
|
4588
|
+
this._retryAttempt = 0;
|
|
4589
|
+
this._resetHintTierState();
|
|
4401
4590
|
this._resolveRetry();
|
|
4402
4591
|
return "not-handled";
|
|
4403
4592
|
}
|
|
@@ -4407,6 +4596,16 @@ export class AgentSession {
|
|
|
4407
4596
|
if (exhaustedChainKey) {
|
|
4408
4597
|
this._emit({ type: "retry_fallback_exhausted", chainKey: exhaustedChainKey, lastError: errorMessage });
|
|
4409
4598
|
}
|
|
4599
|
+
if (this._retryAttempt > 0) {
|
|
4600
|
+
this._emit({
|
|
4601
|
+
type: "auto_retry_end",
|
|
4602
|
+
success: false,
|
|
4603
|
+
attempt: this._retryAttempt,
|
|
4604
|
+
finalError: message.errorMessage,
|
|
4605
|
+
});
|
|
4606
|
+
}
|
|
4607
|
+
this._retryAttempt = 0;
|
|
4608
|
+
this._resetHintTierState();
|
|
4410
4609
|
this._resolveRetry();
|
|
4411
4610
|
return "not-handled";
|
|
4412
4611
|
}
|
|
@@ -4426,8 +4625,159 @@ export class AgentSession {
|
|
|
4426
4625
|
const stallError = isProviderStreamStallError(message);
|
|
4427
4626
|
const escalateAfterRepeatedStall = stallError && this._consecutiveProviderStreamStalls > 0;
|
|
4428
4627
|
this._consecutiveProviderStreamStalls = stallError ? this._consecutiveProviderStreamStalls + 1 : 0;
|
|
4429
|
-
|
|
4430
|
-
|
|
4628
|
+
// 429-class detection: retryable AND message carries rate-limit markers.
|
|
4629
|
+
const is429Class = !stallError &&
|
|
4630
|
+
/rate.?limit|(?:^429(?=\s+\{)|(?:\bHTTP\/1\.[01]\s+|\bHTTP\s+|\bstatus(?:\s+code)?\s+|\berror\s+|\bcode\s+)429\b)|too many requests|resource.?exhausted/i.test(errorMessage);
|
|
4631
|
+
if (is429Class) {
|
|
4632
|
+
const hintMs = this._getProviderRetryDelayMs(errorMessage);
|
|
4633
|
+
const hintSettings = this.settingsManager.getHintPolicySettings();
|
|
4634
|
+
const tier = classifyRateLimitedWait(hintMs, hintSettings);
|
|
4635
|
+
is429TierRouted = true;
|
|
4636
|
+
if (tier === "no-hint-fast-fallback") {
|
|
4637
|
+
// Skip same-model retries entirely; fall back immediately.
|
|
4638
|
+
switchedFallback = await this._retryFallback.tryFallback("transient", { errorMessage });
|
|
4639
|
+
if (switchedFallback) {
|
|
4640
|
+
this._retryAttempt = 1;
|
|
4641
|
+
}
|
|
4642
|
+
else {
|
|
4643
|
+
const exhaustedChainKey = this._retryFallback.exhaustedChainKey;
|
|
4644
|
+
if (exhaustedChainKey) {
|
|
4645
|
+
this._emit({
|
|
4646
|
+
type: "retry_fallback_exhausted",
|
|
4647
|
+
chainKey: exhaustedChainKey,
|
|
4648
|
+
lastError: errorMessage,
|
|
4649
|
+
});
|
|
4650
|
+
}
|
|
4651
|
+
this._emit({
|
|
4652
|
+
type: "auto_retry_end",
|
|
4653
|
+
success: false,
|
|
4654
|
+
attempt: 0,
|
|
4655
|
+
finalError: message.errorMessage,
|
|
4656
|
+
});
|
|
4657
|
+
this._retryAttempt = 0;
|
|
4658
|
+
this._resetHintTierState();
|
|
4659
|
+
this._resolveRetry();
|
|
4660
|
+
return "not-handled";
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
else if (tier === "tier1-in-turn") {
|
|
4664
|
+
this._retryAttempt++;
|
|
4665
|
+
if (this._retryAttempt > settings.maxRetries) {
|
|
4666
|
+
// Budget exhausted within tier1; fall back.
|
|
4667
|
+
switchedFallback = await this._retryFallback.tryFallback("transient", {
|
|
4668
|
+
errorMessage,
|
|
4669
|
+
retryAfterMs: this._getProviderRetryDelayMs(errorMessage),
|
|
4670
|
+
});
|
|
4671
|
+
if (switchedFallback) {
|
|
4672
|
+
this._retryAttempt = 1;
|
|
4673
|
+
}
|
|
4674
|
+
else {
|
|
4675
|
+
const exhaustedChainKey = this._retryFallback.exhaustedChainKey;
|
|
4676
|
+
if (exhaustedChainKey) {
|
|
4677
|
+
this._emit({
|
|
4678
|
+
type: "retry_fallback_exhausted",
|
|
4679
|
+
chainKey: exhaustedChainKey,
|
|
4680
|
+
lastError: errorMessage,
|
|
4681
|
+
});
|
|
4682
|
+
}
|
|
4683
|
+
this._emit({
|
|
4684
|
+
type: "auto_retry_end",
|
|
4685
|
+
success: false,
|
|
4686
|
+
attempt: this._retryAttempt - 1,
|
|
4687
|
+
finalError: message.errorMessage,
|
|
4688
|
+
});
|
|
4689
|
+
this._retryAttempt = 0;
|
|
4690
|
+
this._resetHintTierState();
|
|
4691
|
+
this._resolveRetry();
|
|
4692
|
+
return "not-handled";
|
|
4693
|
+
}
|
|
4694
|
+
}
|
|
4695
|
+
else {
|
|
4696
|
+
const inTurnResult = nextInTurnDelayMs({
|
|
4697
|
+
probePhase: this._probePhase,
|
|
4698
|
+
hintDeadlineMs: this._hintDeadlineMs,
|
|
4699
|
+
attempt: this._retryAttempt,
|
|
4700
|
+
cumulativeHintedWaitMs: this._cumulativeHintedWaitMs,
|
|
4701
|
+
}, hintMs, settings.baseDelayMs, hintSettings.hintedWaitCapMs, Date.now());
|
|
4702
|
+
this._probePhase = inTurnResult.probePhase;
|
|
4703
|
+
this._hintDeadlineMs = inTurnResult.hintDeadlineMs;
|
|
4704
|
+
this._cumulativeHintedWaitMs = inTurnResult.cumulativeHintedWaitMs;
|
|
4705
|
+
if (inTurnResult.demoteToProbeBack) {
|
|
4706
|
+
// Cumulative hinted wait exceeded cap; demote to tier2 fallback path.
|
|
4707
|
+
const remainingHintMs = Math.max(0, (this._hintDeadlineMs ?? Date.now()) - Date.now());
|
|
4708
|
+
switchedFallback = await this._retryFallback.tryFallback("transient", {
|
|
4709
|
+
errorMessage,
|
|
4710
|
+
retryAfterMs: remainingHintMs,
|
|
4711
|
+
});
|
|
4712
|
+
if (switchedFallback) {
|
|
4713
|
+
this._retryAttempt = 1;
|
|
4714
|
+
}
|
|
4715
|
+
else {
|
|
4716
|
+
const exhaustedChainKey = this._retryFallback.exhaustedChainKey;
|
|
4717
|
+
if (exhaustedChainKey) {
|
|
4718
|
+
this._emit({
|
|
4719
|
+
type: "retry_fallback_exhausted",
|
|
4720
|
+
chainKey: exhaustedChainKey,
|
|
4721
|
+
lastError: errorMessage,
|
|
4722
|
+
});
|
|
4723
|
+
}
|
|
4724
|
+
this._emit({
|
|
4725
|
+
type: "auto_retry_end",
|
|
4726
|
+
success: false,
|
|
4727
|
+
attempt: this._retryAttempt - 1,
|
|
4728
|
+
finalError: message.errorMessage,
|
|
4729
|
+
});
|
|
4730
|
+
this._retryAttempt = 0;
|
|
4731
|
+
this._resetHintTierState();
|
|
4732
|
+
this._resolveRetry();
|
|
4733
|
+
return "not-handled";
|
|
4734
|
+
}
|
|
4735
|
+
}
|
|
4736
|
+
else {
|
|
4737
|
+
hintTierDelayMs = inTurnResult.delayMs;
|
|
4738
|
+
}
|
|
4739
|
+
}
|
|
4740
|
+
}
|
|
4741
|
+
else {
|
|
4742
|
+
// tier2-fallback-probe-back or tier3-fallback-only: immediate fallback.
|
|
4743
|
+
const remainingHintMs = hintMs ?? 0;
|
|
4744
|
+
switchedFallback = await this._retryFallback.tryFallback("transient", {
|
|
4745
|
+
errorMessage,
|
|
4746
|
+
retryAfterMs: remainingHintMs,
|
|
4747
|
+
});
|
|
4748
|
+
if (switchedFallback) {
|
|
4749
|
+
this._retryAttempt = 1;
|
|
4750
|
+
if (tier === "tier2-fallback-probe-back") {
|
|
4751
|
+
const selector = this._retryFallback.activeState?.originalSelector ?? "";
|
|
4752
|
+
this._armProbeBackForDemotedSelector(selector, remainingHintMs);
|
|
4753
|
+
}
|
|
4754
|
+
}
|
|
4755
|
+
else {
|
|
4756
|
+
const exhaustedChainKey = this._retryFallback.exhaustedChainKey;
|
|
4757
|
+
if (exhaustedChainKey) {
|
|
4758
|
+
this._emit({
|
|
4759
|
+
type: "retry_fallback_exhausted",
|
|
4760
|
+
chainKey: exhaustedChainKey,
|
|
4761
|
+
lastError: errorMessage,
|
|
4762
|
+
});
|
|
4763
|
+
}
|
|
4764
|
+
this._emit({
|
|
4765
|
+
type: "auto_retry_end",
|
|
4766
|
+
success: false,
|
|
4767
|
+
attempt: 0,
|
|
4768
|
+
finalError: message.errorMessage,
|
|
4769
|
+
});
|
|
4770
|
+
this._retryAttempt = 0;
|
|
4771
|
+
this._resetHintTierState();
|
|
4772
|
+
this._resolveRetry();
|
|
4773
|
+
return "not-handled";
|
|
4774
|
+
}
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
if (!is429TierRouted) {
|
|
4778
|
+
this._retryAttempt++;
|
|
4779
|
+
}
|
|
4780
|
+
if (!is429TierRouted && (this._retryAttempt > settings.maxRetries || escalateAfterRepeatedStall)) {
|
|
4431
4781
|
switchedFallback = await this._retryFallback.tryFallback("transient", {
|
|
4432
4782
|
errorMessage,
|
|
4433
4783
|
retryAfterMs: this._getProviderRetryDelayMs(errorMessage),
|
|
@@ -4452,6 +4802,7 @@ export class AgentSession {
|
|
|
4452
4802
|
finalError: message.errorMessage,
|
|
4453
4803
|
});
|
|
4454
4804
|
this._retryAttempt = 0;
|
|
4805
|
+
this._resetHintTierState();
|
|
4455
4806
|
this._resolveRetry();
|
|
4456
4807
|
return "not-handled";
|
|
4457
4808
|
}
|
|
@@ -4462,7 +4813,8 @@ export class AgentSession {
|
|
|
4462
4813
|
}
|
|
4463
4814
|
const providerDelayMs = isRefusal || hardErrorFallback ? undefined : this._getProviderRetryDelayMs(errorMessage);
|
|
4464
4815
|
const maxRetryDelayMs = this.settingsManager.getProviderRetrySettings().maxRetryDelayMs;
|
|
4465
|
-
|
|
4816
|
+
// For 429-class failures the tier routing replaces the over-budget gate.
|
|
4817
|
+
if (!is429TierRouted && providerDelayMs !== undefined && providerDelayMs > maxRetryDelayMs) {
|
|
4466
4818
|
// A wait this long means the model is unavailable rather than busy, so the
|
|
4467
4819
|
// configured chain beats failing the turn. The switch is gated: the over-budget
|
|
4468
4820
|
// branch above may have already switched on this same error, and hopping again
|
|
@@ -4484,6 +4836,7 @@ export class AgentSession {
|
|
|
4484
4836
|
finalError: `Provider requested retry delay ${providerDelayMs}ms, exceeding configured maximum ${maxRetryDelayMs}ms`,
|
|
4485
4837
|
});
|
|
4486
4838
|
this._retryAttempt = 0;
|
|
4839
|
+
this._resetHintTierState();
|
|
4487
4840
|
this._resolveRetry();
|
|
4488
4841
|
return "not-handled";
|
|
4489
4842
|
}
|
|
@@ -4493,7 +4846,12 @@ export class AgentSession {
|
|
|
4493
4846
|
// reach this point with a fallback already applied (hard-error, refusal) set
|
|
4494
4847
|
// switchedFallback first and force providerDelayMs undefined, so no branch may
|
|
4495
4848
|
// be reordered to fall through here expecting an implicit switch.
|
|
4496
|
-
const
|
|
4849
|
+
const nonTierProviderDelayMs = providerDelayMs === 0 ? undefined : providerDelayMs;
|
|
4850
|
+
const delayMs = switchedFallback
|
|
4851
|
+
? 0
|
|
4852
|
+
: is429TierRouted
|
|
4853
|
+
? (hintTierDelayMs ?? providerDelayMs ?? settings.baseDelayMs * 2 ** (this._retryAttempt - 1))
|
|
4854
|
+
: (nonTierProviderDelayMs ?? settings.baseDelayMs * 2 ** (this._retryAttempt - 1));
|
|
4497
4855
|
// Prepare before auto_retry_start so an immediate Esc can cancel the retry sleep.
|
|
4498
4856
|
this._retryAbortController = new AbortController();
|
|
4499
4857
|
this._emit({
|
|
@@ -4517,6 +4875,7 @@ export class AgentSession {
|
|
|
4517
4875
|
// Aborted during sleep - emit end event so UI can clean up
|
|
4518
4876
|
const attempt = this._retryAttempt;
|
|
4519
4877
|
this._retryAttempt = 0;
|
|
4878
|
+
this._resetHintTierState();
|
|
4520
4879
|
this._retryAbortController = undefined;
|
|
4521
4880
|
await this._emitAgentSettled();
|
|
4522
4881
|
this._emit({
|
|
@@ -4541,9 +4900,11 @@ export class AgentSession {
|
|
|
4541
4900
|
if (compactionSettings.enabled &&
|
|
4542
4901
|
model &&
|
|
4543
4902
|
shouldCompact(contextTokens, model.contextWindow, compactionSettings)) {
|
|
4544
|
-
|
|
4903
|
+
const preRetryCompaction = await this._runPrePromptCompaction(message, true, "threshold", true, true);
|
|
4904
|
+
if (!preRetryCompaction && !this._isCompactionOnCooldown()) {
|
|
4545
4905
|
const attempt = this._retryAttempt;
|
|
4546
4906
|
this._retryAttempt = 0;
|
|
4907
|
+
this._resetHintTierState();
|
|
4547
4908
|
this._emit({
|
|
4548
4909
|
type: "auto_retry_end",
|
|
4549
4910
|
success: false,
|
|
@@ -4612,7 +4973,8 @@ export class AgentSession {
|
|
|
4612
4973
|
* @param options.operations Custom BashOperations for remote execution
|
|
4613
4974
|
*/
|
|
4614
4975
|
async executeBash(command, onChunk, options) {
|
|
4615
|
-
|
|
4976
|
+
const abortController = new AbortController();
|
|
4977
|
+
this._bashAbortControllers.add(abortController);
|
|
4616
4978
|
// Apply command prefix if configured (e.g., "shopt -s expand_aliases" for alias support)
|
|
4617
4979
|
const prefix = this.settingsManager.getShellCommandPrefix();
|
|
4618
4980
|
const shellPath = this.settingsManager.getShellPath();
|
|
@@ -4623,13 +4985,13 @@ export class AgentSession {
|
|
|
4623
4985
|
onChunk?.(delta);
|
|
4624
4986
|
this._emit({ type: "bash_execution_update", id: options?.id, delta });
|
|
4625
4987
|
},
|
|
4626
|
-
signal:
|
|
4988
|
+
signal: abortController.signal,
|
|
4627
4989
|
});
|
|
4628
4990
|
this.recordBashResult(command, result, options);
|
|
4629
4991
|
return result;
|
|
4630
4992
|
}
|
|
4631
4993
|
finally {
|
|
4632
|
-
this.
|
|
4994
|
+
this._bashAbortControllers.delete(abortController);
|
|
4633
4995
|
}
|
|
4634
4996
|
}
|
|
4635
4997
|
/**
|
|
@@ -4665,11 +5027,13 @@ export class AgentSession {
|
|
|
4665
5027
|
* Cancel running bash command.
|
|
4666
5028
|
*/
|
|
4667
5029
|
abortBash() {
|
|
4668
|
-
this.
|
|
5030
|
+
for (const abortController of [...this._bashAbortControllers]) {
|
|
5031
|
+
abortController.abort();
|
|
5032
|
+
}
|
|
4669
5033
|
}
|
|
4670
5034
|
/** Whether a bash command is currently running */
|
|
4671
5035
|
get isBashRunning() {
|
|
4672
|
-
return this.
|
|
5036
|
+
return this._bashAbortControllers.size > 0;
|
|
4673
5037
|
}
|
|
4674
5038
|
/** Whether there are pending bash messages waiting to be flushed */
|
|
4675
5039
|
get hasPendingBashMessages() {
|
|
@@ -4718,6 +5082,9 @@ export class AgentSession {
|
|
|
4718
5082
|
* @returns Result with editorText (if user message) and cancelled status
|
|
4719
5083
|
*/
|
|
4720
5084
|
async navigateTree(targetId, options = {}) {
|
|
5085
|
+
if (this.isStreaming) {
|
|
5086
|
+
throw new Error("Wait for the current response to finish before navigating the session tree.");
|
|
5087
|
+
}
|
|
4721
5088
|
const oldLeafId = this.sessionManager.getLeafId();
|
|
4722
5089
|
// No-op if already at target
|
|
4723
5090
|
if (targetId === oldLeafId) {
|