@code-yeongyu/senpi 2026.8.14 → 2026.8.17
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 +128 -0
- package/README.md +1 -0
- package/dist/bun/cli.js +1 -0
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-cursor-agent.d.ts +2 -0
- package/dist/bun/register-cursor-agent.d.ts.map +1 -0
- package/dist/bun/register-cursor-agent.js +4 -0
- package/dist/bun/register-cursor-agent.js.map +1 -0
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +14 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js +5 -4
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/core/agent-session-services.js +2 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +127 -13
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +420 -82
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +19 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/cursor-exec-bridge-session.d.ts +11 -0
- package/dist/core/cursor-exec-bridge-session.d.ts.map +1 -0
- package/dist/core/cursor-exec-bridge-session.js +17 -0
- package/dist/core/cursor-exec-bridge-session.js.map +1 -0
- package/dist/core/cursor-exec-bridge.d.ts +52 -0
- package/dist/core/cursor-exec-bridge.d.ts.map +1 -0
- package/dist/core/cursor-exec-bridge.js +196 -0
- package/dist/core/cursor-exec-bridge.js.map +1 -0
- package/dist/core/experimental.d.ts +4 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/template.js +31 -9
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.d.ts +4 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.js +30 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts +2 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js +13 -47
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts +18 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js +64 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js +27 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts +15 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js +45 -11
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +17 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +48 -6
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js +2 -0
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-retry.js +38 -4
- package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +2 -1
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.d.ts +33 -0
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.js +67 -0
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.js.map +1 -0
- package/dist/core/extensions/builtin/config-reload/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/index.js +31 -8
- package/dist/core/extensions/builtin/config-reload/index.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/routine-settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/routine-settings.js +11 -12
- package/dist/core/extensions/builtin/config-reload/routine-settings.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts +28 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js +278 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts +38 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js +75 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts +24 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js +64 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts +139 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js +362 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts +19 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js +122 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts +30 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js +117 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts +39 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js +155 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts +89 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js +147 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts +20 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js +99 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts +25 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.js +67 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts +27 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +242 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts +73 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js +330 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts +94 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js +248 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts +35 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js +186 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts +11 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js +17 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts +104 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js +301 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts +26 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js +587 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts +43 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js +196 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js.map +1 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts +9 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js +18 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js.map +1 -0
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +10 -9
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/terminal-provider-error.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/terminal-provider-error.js +16 -0
- package/dist/core/extensions/builtin/goal/terminal-provider-error.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +9 -2
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/detectors.js +21 -3
- package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/escalation.d.ts +24 -0
- package/dist/core/extensions/builtin/loop-guard/escalation.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/escalation.js +77 -0
- package/dist/core/extensions/builtin/loop-guard/escalation.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/index.js +98 -3
- package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts +9 -0
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/notice.js +17 -0
- package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts +4 -0
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/policy.js +4 -0
- package/dist/core/extensions/builtin/loop-guard/policy.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts +2 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/renderer.js +11 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts +1 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.js +3 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/process-tree.js +6 -1
- package/dist/core/extensions/builtin/mcp/process-tree.js.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.d.ts +6 -0
- package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.js +10 -0
- package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js +14 -0
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.js +91 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js +22 -2
- package/dist/core/extensions/builtin/prompt-preset/index.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 +25 -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 +2 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/reasoning/index.d.ts +3 -0
- package/dist/core/extensions/builtin/reasoning/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/reasoning/index.js +211 -0
- package/dist/core/extensions/builtin/reasoning/index.js.map +1 -0
- package/dist/core/extensions/builtin/service-tier.d.ts +44 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js +176 -24
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +4 -4
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +12 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +24 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/lockfile-policy.d.ts +15 -0
- package/dist/core/lockfile-policy.d.ts.map +1 -0
- package/dist/core/lockfile-policy.js +15 -0
- package/dist/core/lockfile-policy.js.map +1 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +1 -0
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +34 -7
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +116 -28
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +7 -2
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +19 -5
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +5 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +8 -9
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-api-key-auth.d.ts.map +1 -1
- package/dist/core/provider-api-key-auth.js +45 -2
- package/dist/core/provider-api-key-auth.js.map +1 -1
- package/dist/core/provider-composer.d.ts +12 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +2 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +13 -0
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +15 -0
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/retry-fallback/controller.d.ts +1 -1
- package/dist/core/retry-fallback/controller.d.ts.map +1 -1
- package/dist/core/retry-fallback/controller.js +5 -3
- package/dist/core/retry-fallback/controller.js.map +1 -1
- package/dist/core/sdk.d.ts +5 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +20 -8
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +20 -4
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +50 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +258 -15
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/thinking-levels.d.ts +22 -0
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js +29 -0
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +2 -0
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +2 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +2 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- 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 +18 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/model-favorites.d.ts +2 -1
- package/dist/modes/interactive/components/model-favorites.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-favorites.js +72 -6
- package/dist/modes/interactive/components/model-favorites.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +5 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +10 -6
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +10 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +22 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/editor-paste-transfer.d.ts +10 -0
- package/dist/modes/interactive/editor-paste-transfer.d.ts.map +1 -1
- package/dist/modes/interactive/editor-paste-transfer.js +16 -0
- package/dist/modes/interactive/editor-paste-transfer.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +14 -4
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +111 -52
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +36 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +2 -0
- package/dist/modes/interactive/theme/grok-day.json +2 -0
- package/dist/modes/interactive/theme/grok-night.json +2 -0
- package/dist/modes/interactive/theme/light.json +2 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +10 -2
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +23 -10
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +9 -1
- package/dist/modes/interactive/theme/theme.d.ts +5 -3
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +12 -2
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts +4 -1
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +5 -2
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts +10 -0
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +119 -46
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts +6 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +47 -14
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/multi-session-host.d.ts.map +1 -1
- package/dist/modes/rpc/multi-session-host.js +29 -7
- package/dist/modes/rpc/multi-session-host.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +26 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +25 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-invocation.d.ts +5 -0
- package/dist/modes/rpc/rpc-command-invocation.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-command-invocation.js +2 -0
- package/dist/modes/rpc/rpc-command-invocation.js.map +1 -0
- package/dist/modes/rpc/rpc-command-surface.d.ts +49 -0
- package/dist/modes/rpc/rpc-command-surface.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-command-surface.js +40 -0
- package/dist/modes/rpc/rpc-command-surface.js.map +1 -0
- package/dist/modes/rpc/rpc-input-validation.d.ts +4 -0
- package/dist/modes/rpc/rpc-input-validation.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-input-validation.js +20 -0
- package/dist/modes/rpc/rpc-input-validation.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +12 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +72 -12
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
- package/dist/modes/rpc/session-command-router.js +2 -14
- package/dist/modes/rpc/session-command-router.js.map +1 -1
- package/dist/modes/rpc/session-event-writer.d.ts +29 -10
- package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
- package/dist/modes/rpc/session-event-writer.js +229 -50
- package/dist/modes/rpc/session-event-writer.js.map +1 -1
- package/dist/server/create-harness.d.ts.map +1 -1
- package/dist/server/create-harness.js +2 -0
- package/dist/server/create-harness.js.map +1 -1
- package/dist/utils/shell.d.ts +27 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +79 -13
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +10 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +14 -19
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/compaction.md +3 -3
- package/docs/custom-provider.md +1 -1
- package/docs/environment-variables.md +8 -2
- package/docs/extensions.md +4 -0
- package/docs/json.md +6 -4
- package/docs/keybindings.md +8 -2
- package/docs/providers.md +56 -0
- package/docs/rpc.md +206 -12
- package/docs/sdk.md +9 -0
- package/docs/settings.md +93 -1
- package/docs/skills.md +14 -3
- package/docs/terminal-setup.md +23 -2
- package/docs/themes.md +24 -3
- package/docs/tui.md +2 -2
- package/docs/usage.md +24 -4
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +26 -3
- package/node_modules/@bufbuild/protobuf/README.md +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +259 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +247 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +739 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +268 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +546 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +945 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +391 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +156 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +268 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +530 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +34 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +61 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +322 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +256 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +241 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +731 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +262 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +541 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +939 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +386 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +268 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +525 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +313 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
- package/node_modules/@bufbuild/protobuf/package.json +147 -0
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +14 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/call-capture.ts +64 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-handler.ts +45 -61
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-execution-event.ts +201 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +43 -6
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +4 -0
- 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 +59 -17
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +14 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +14 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +25 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +77 -12
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +43 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +67 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +4 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +127 -88
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +5 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +9 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +12 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +88 -45
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +28 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -1
- 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 +7 -2
- 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/session/state.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +19 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +18 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +1 -1
- 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 +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +4 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +21 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +29 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +103 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +12 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/README.md +3 -0
- 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 +40 -14
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.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 +16 -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/cloudflare-gateway-binding.d.ts +69 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +159 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +125 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts +17 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js +33 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts +79 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js +360 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts +16797 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js +3828 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts +55 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js +76 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts +116 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +191 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +3316 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts +29 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js +33 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +7 -3
- 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 +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 -9
- 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.js +7 -3
- 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 +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 +208 -42
- 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.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +13 -4
- 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 +10 -7
- 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-responses-shared.d.ts +1 -0
- 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 +31 -7
- 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 +8 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.d.ts +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.js +234 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +44 -9
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/compat.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/compat.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts +11 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js +11 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -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 +2 -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 +6 -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/providers/all.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +65 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/alibaba-token-plan.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/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.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/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.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/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.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/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/types.d.ts +17 -4
- 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/block-symbols.d.ts +57 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js +57 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js.map +1 -0
- 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 +3 -2
- 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/retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +34 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +3 -2
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/README.md +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +26 -0
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +121 -0
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +21 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +23 -7
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts +9 -0
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js +82 -0
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +4 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +7 -1
- 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 +24 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.js +9 -2
- package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +8 -2
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +6 -2
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +6 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +18 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +21 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +243 -5
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +33 -8
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +11 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.d.ts +0 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.js +0 -41
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.js.map +0 -1
|
@@ -37,6 +37,7 @@ import { DEFAULT_THINKING_LEVEL } from "./defaults.js";
|
|
|
37
37
|
import { buildDynamicSystemPrompt } from "./dynamic-prompt/index.js";
|
|
38
38
|
import { exportSessionToHtml } from "./export-html/index.js";
|
|
39
39
|
import { createToolHtmlRenderer } from "./export-html/tool-renderer.js";
|
|
40
|
+
import { CODEX_RESPONSES_API } from "./extensions/builtin/service-tier.js";
|
|
40
41
|
import { deriveExtensionRegistrationId } from "./extensions/builtin/tool-search/engine/marker.js";
|
|
41
42
|
import { getToolSearchService } from "./extensions/builtin/tool-search/service.js";
|
|
42
43
|
import { ExecuteToolError, ExtensionRunner, wrapRegisteredTools, } from "./extensions/index.js";
|
|
@@ -47,7 +48,7 @@ import { filterContextExcludedMessages } from "./messages.js";
|
|
|
47
48
|
import { ModelRegistry } from "./model-registry.js";
|
|
48
49
|
import { getModelNarrowingPatterns, resolveModelScope } from "./model-resolver.js";
|
|
49
50
|
import { PROMPT_CACHE_SAFE_WAIT_ENV, resolvePromptCacheSafeWaitSeconds } from "./prompt-cache-budget.js";
|
|
50
|
-
import {
|
|
51
|
+
import { expandPromptTemplateWithMetadata } from "./prompt-templates.js";
|
|
51
52
|
import { createProviderTimeoutRetryPlan, runBoundedRetryContinuation } from "./provider-timeout-retry.js";
|
|
52
53
|
import { isBillingErrorMessage } from "./retry-fallback/billing.js";
|
|
53
54
|
import { formatSelector } from "./retry-fallback/chains.js";
|
|
@@ -70,21 +71,132 @@ import { createAllToolDefinitions } from "./tools/index.js";
|
|
|
70
71
|
import { createToolDefinitionFromAgentTool } from "./tools/tool-definition-wrapper.js";
|
|
71
72
|
import { addUsageToTotals, createUsageTotals } from "./usage-totals.js";
|
|
72
73
|
const TURN_RETRY_SUPPRESSION_PREFIX = "senpi:no-turn-retry:";
|
|
74
|
+
const DEFERRED_RETRY_QUEUE_OWNERS = new WeakSet();
|
|
75
|
+
/** Format the user-attributed payload for one or more explicit skill invocations. */
|
|
76
|
+
export function formatSkillInvocationPrompt(skills, userRequest) {
|
|
77
|
+
const skillBlocks = skills.map((skill) => `The user explicitly invoked the "${skill.name}" skill. Follow the instructions in <skill-instruction> as binding for this request, while respecting higher-priority instructions.\n\n<skill-instruction name="${skill.name}" location="${skill.filePath}">\nReferences are relative to ${skill.baseDir}.\n\n${skill.body}\n</skill-instruction>`);
|
|
78
|
+
const expandedSkills = skillBlocks.join("\n\n");
|
|
79
|
+
return userRequest && /\S/.test(userRequest)
|
|
80
|
+
? `${expandedSkills}\n\n<user-request>\n${userRequest}\n</user-request>`
|
|
81
|
+
: expandedSkills;
|
|
82
|
+
}
|
|
73
83
|
/**
|
|
74
84
|
* Parse a skill block from message text.
|
|
75
85
|
* Returns null if the text doesn't contain a skill block.
|
|
76
86
|
*/
|
|
77
87
|
export function parseSkillBlock(text) {
|
|
78
|
-
const
|
|
79
|
-
|
|
88
|
+
const instructionPattern = /^The user explicitly invoked the "([^"]+)" skill\. Follow the instructions in <skill-instruction> as binding for this request, while respecting higher-priority instructions\.\n\n<skill-instruction name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill-instruction>/;
|
|
89
|
+
const instructionMatch = text.match(instructionPattern);
|
|
90
|
+
if (instructionMatch) {
|
|
91
|
+
if (instructionMatch[1] !== instructionMatch[2])
|
|
92
|
+
return null;
|
|
93
|
+
let remainder = text.slice(instructionMatch[0].length);
|
|
94
|
+
while (remainder.startsWith("\n\nThe user explicitly invoked the ")) {
|
|
95
|
+
const chainedMatch = remainder.slice(2).match(instructionPattern);
|
|
96
|
+
if (!chainedMatch || chainedMatch[1] !== chainedMatch[2])
|
|
97
|
+
return null;
|
|
98
|
+
remainder = remainder.slice(chainedMatch[0].length + 2);
|
|
99
|
+
}
|
|
100
|
+
const requestMatch = remainder.match(/^\n\n<user-request>\n([\s\S]*?)\n<\/user-request>$/);
|
|
101
|
+
if (remainder && !requestMatch)
|
|
102
|
+
return null;
|
|
103
|
+
return {
|
|
104
|
+
name: instructionMatch[1],
|
|
105
|
+
location: instructionMatch[3],
|
|
106
|
+
content: instructionMatch[4],
|
|
107
|
+
userMessage: requestMatch?.[1].trim() || undefined,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
const legacyMatch = text.match(/^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/);
|
|
111
|
+
if (!legacyMatch)
|
|
80
112
|
return null;
|
|
81
113
|
return {
|
|
82
|
-
name:
|
|
83
|
-
location:
|
|
84
|
-
content:
|
|
85
|
-
userMessage:
|
|
114
|
+
name: legacyMatch[1],
|
|
115
|
+
location: legacyMatch[2],
|
|
116
|
+
content: legacyMatch[3],
|
|
117
|
+
userMessage: legacyMatch[4]?.trim() || undefined,
|
|
86
118
|
};
|
|
87
119
|
}
|
|
120
|
+
export const MAX_SKILL_INVOCATION_TOKENS_PER_PROMPT = 64;
|
|
121
|
+
const LEADING_SKILL_INVOCATION_PATTERN = /^(?:\/skill:([a-zA-Z][a-zA-Z0-9:_-]*)|\$([a-zA-Z][a-zA-Z0-9:_-]*))(?=\s|$)/;
|
|
122
|
+
const INLINE_DOLLAR_SKILL_INVOCATION_PATTERN = /(^|\s)\$skill:([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s|$)/g;
|
|
123
|
+
/**
|
|
124
|
+
* Find explicit skill invocation tokens without treating ordinary inline dollar
|
|
125
|
+
* prose (for example `$HOME`) as executable.
|
|
126
|
+
*
|
|
127
|
+
* Leading runs accept `/skill:name`, `$name`, and `$skill:name`. Outside the
|
|
128
|
+
* leading run only the desktop's explicit `$skill:name` token is executable.
|
|
129
|
+
*/
|
|
130
|
+
export function parseSkillInvocationTokens(text) {
|
|
131
|
+
const tokens = [];
|
|
132
|
+
let cursor = 0;
|
|
133
|
+
while (cursor < text.length) {
|
|
134
|
+
while (cursor < text.length && /\s/.test(text[cursor]))
|
|
135
|
+
cursor++;
|
|
136
|
+
const match = text.slice(cursor).match(LEADING_SKILL_INVOCATION_PATTERN);
|
|
137
|
+
if (!match)
|
|
138
|
+
break;
|
|
139
|
+
const syntax = match[1] ? "slash" : "dollar";
|
|
140
|
+
const dollarName = match[2];
|
|
141
|
+
const name = match[1] ?? (dollarName?.startsWith("skill:") ? dollarName.slice("skill:".length) : dollarName);
|
|
142
|
+
if (!name)
|
|
143
|
+
break;
|
|
144
|
+
tokens.push({
|
|
145
|
+
name,
|
|
146
|
+
syntax,
|
|
147
|
+
start: cursor,
|
|
148
|
+
end: cursor + match[0].length,
|
|
149
|
+
position: "leading",
|
|
150
|
+
});
|
|
151
|
+
if (tokens.length >= MAX_SKILL_INVOCATION_TOKENS_PER_PROMPT)
|
|
152
|
+
return tokens;
|
|
153
|
+
cursor += match[0].length;
|
|
154
|
+
}
|
|
155
|
+
INLINE_DOLLAR_SKILL_INVOCATION_PATTERN.lastIndex = cursor;
|
|
156
|
+
for (const match of text.matchAll(INLINE_DOLLAR_SKILL_INVOCATION_PATTERN)) {
|
|
157
|
+
const start = (match.index ?? 0) + match[1].length;
|
|
158
|
+
tokens.push({
|
|
159
|
+
name: match[2],
|
|
160
|
+
syntax: "dollar",
|
|
161
|
+
start,
|
|
162
|
+
end: start + `$skill:${match[2]}`.length,
|
|
163
|
+
position: "inline",
|
|
164
|
+
});
|
|
165
|
+
if (tokens.length >= MAX_SKILL_INVOCATION_TOKENS_PER_PROMPT)
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
return tokens;
|
|
169
|
+
}
|
|
170
|
+
function stripLeadingInvocationSeparators(text) {
|
|
171
|
+
let cursor = 0;
|
|
172
|
+
while (text[cursor] === " " || text[cursor] === "\t")
|
|
173
|
+
cursor++;
|
|
174
|
+
while (text[cursor] === "\n" || (text[cursor] === "\r" && text[cursor + 1] === "\n")) {
|
|
175
|
+
cursor += text[cursor] === "\r" ? 2 : 1;
|
|
176
|
+
const lineStart = cursor;
|
|
177
|
+
while (text[cursor] === " " || text[cursor] === "\t")
|
|
178
|
+
cursor++;
|
|
179
|
+
if (text[cursor] !== "\n" && !(text[cursor] === "\r" && text[cursor + 1] === "\n")) {
|
|
180
|
+
return text.slice(lineStart);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return text.slice(cursor);
|
|
184
|
+
}
|
|
185
|
+
function removeSkillInvocationTokens(text, tokens) {
|
|
186
|
+
let cursor = 0;
|
|
187
|
+
let result = "";
|
|
188
|
+
for (const token of tokens) {
|
|
189
|
+
result += text.slice(cursor, token.start);
|
|
190
|
+
cursor = token.end;
|
|
191
|
+
if (token.position === "inline" &&
|
|
192
|
+
(result.endsWith(" ") || result.endsWith("\t")) &&
|
|
193
|
+
(text[cursor] === " " || text[cursor] === "\t")) {
|
|
194
|
+
cursor++;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
result += text.slice(cursor);
|
|
198
|
+
return tokens.some((token) => token.position === "leading") ? stripLeadingInvocationSeparators(result) : result;
|
|
199
|
+
}
|
|
88
200
|
// ============================================================================
|
|
89
201
|
// Types
|
|
90
202
|
// ============================================================================
|
|
@@ -328,6 +440,9 @@ export class AgentSession {
|
|
|
328
440
|
this.agent = config.agent;
|
|
329
441
|
this.sessionManager = config.sessionManager;
|
|
330
442
|
this.settingsManager = config.settingsManager;
|
|
443
|
+
this._unsubscribeSettingsSource = this.settingsManager.subscribeToSourceSelection((source) => {
|
|
444
|
+
this._emit({ type: "settings_source_selected", ...source });
|
|
445
|
+
});
|
|
331
446
|
const noModelFallback = config.resourceLoader.getExtensions().runtime.flagValues.get("no-model-fallback") === true ||
|
|
332
447
|
envValue("NO_FALLBACK") === "1";
|
|
333
448
|
if (noModelFallback) {
|
|
@@ -381,6 +496,7 @@ export class AgentSession {
|
|
|
381
496
|
});
|
|
382
497
|
this._extensionRunnerRef = config.extensionRunnerRef;
|
|
383
498
|
this._initialActiveToolNames = config.initialActiveToolNames;
|
|
499
|
+
this._defaultToolNames = config.defaultToolNames ? new Set(config.defaultToolNames) : undefined;
|
|
384
500
|
this._allowedToolNames = config.allowedToolNames ? new Set(config.allowedToolNames) : undefined;
|
|
385
501
|
this._excludedToolNames = config.excludedToolNames ? new Set(config.excludedToolNames) : undefined;
|
|
386
502
|
this._baseToolsOverride = config.baseToolsOverride;
|
|
@@ -513,7 +629,7 @@ export class AgentSession {
|
|
|
513
629
|
this.agent.beforeToolCall = async ({ toolCall, args }) => {
|
|
514
630
|
this._toolExecutionDepth++;
|
|
515
631
|
try {
|
|
516
|
-
const result = await this.
|
|
632
|
+
const result = await this.preflightToolCall(toolCall, args);
|
|
517
633
|
if (result?.block) {
|
|
518
634
|
this._toolExecutionDepth--;
|
|
519
635
|
}
|
|
@@ -533,7 +649,7 @@ export class AgentSession {
|
|
|
533
649
|
}
|
|
534
650
|
};
|
|
535
651
|
}
|
|
536
|
-
async
|
|
652
|
+
async preflightToolCall(toolCall, args, options = {}) {
|
|
537
653
|
if (options.waitForEventQueue !== false) {
|
|
538
654
|
await this._agentEventQueue;
|
|
539
655
|
}
|
|
@@ -788,6 +904,13 @@ export class AgentSession {
|
|
|
788
904
|
get agentDir() {
|
|
789
905
|
return this._agentDir;
|
|
790
906
|
}
|
|
907
|
+
/**
|
|
908
|
+
* Working directory this session resolves settings against — the same value extensions
|
|
909
|
+
* receive as `ctx.cwd`, so a host surface (RPC) reads project settings identically.
|
|
910
|
+
*/
|
|
911
|
+
get cwd() {
|
|
912
|
+
return this._cwd;
|
|
913
|
+
}
|
|
791
914
|
async _waitForSettledSessionWork() {
|
|
792
915
|
await this._sessionWorkBarrier.waitForSettled(() => this._agentEventQueue);
|
|
793
916
|
}
|
|
@@ -1191,6 +1314,7 @@ export class AgentSession {
|
|
|
1191
1314
|
// Check auto-retry and auto-compaction after agent completes.
|
|
1192
1315
|
let launchedContinuation = false;
|
|
1193
1316
|
let retryContinuationBlocked = false;
|
|
1317
|
+
let retryExhaustionAllowsQueuedContinuation = false;
|
|
1194
1318
|
let allowsPostCompactionUsageExemptContinuation = false;
|
|
1195
1319
|
const userAbortSuppressedQueuedContinuation = event.type === "agent_end" && this._suppressQueuedContinuationAfterUserAbort;
|
|
1196
1320
|
if (userAbortSuppressedQueuedContinuation) {
|
|
@@ -1220,6 +1344,8 @@ export class AgentSession {
|
|
|
1220
1344
|
retryContinuationBlocked = !compactedBeforeRetry && !this._isCompactionDelegated();
|
|
1221
1345
|
}
|
|
1222
1346
|
let retryOutcome = "not-handled";
|
|
1347
|
+
const retryOwnedDeferredQueue = DEFERRED_RETRY_QUEUE_OWNERS.has(this);
|
|
1348
|
+
DEFERRED_RETRY_QUEUE_OWNERS.delete(this);
|
|
1223
1349
|
if (!retryContinuationBlocked && !userAbortSuppressedQueuedContinuation) {
|
|
1224
1350
|
if (retryableError) {
|
|
1225
1351
|
retryOutcome = await this._handleRetryableError(msg);
|
|
@@ -1232,6 +1358,16 @@ export class AgentSession {
|
|
|
1232
1358
|
this._abortProvenance.closeAgentEndBoundary();
|
|
1233
1359
|
return;
|
|
1234
1360
|
}
|
|
1361
|
+
// Provider-timeout retries deliberately skip their first queue poll so
|
|
1362
|
+
// steering cannot be consumed by another doomed retry request. Once the
|
|
1363
|
+
// managed retry owner exhausts its budget, hand that retained queue back
|
|
1364
|
+
// to the normal scheduled-continuation path instead of parking it until
|
|
1365
|
+
// an unrelated later prompt arrives.
|
|
1366
|
+
retryExhaustionAllowsQueuedContinuation =
|
|
1367
|
+
!userAbortSuppressedQueuedContinuation &&
|
|
1368
|
+
retryOwnedDeferredQueue &&
|
|
1369
|
+
retryOutcome === "not-handled" &&
|
|
1370
|
+
(msg.stopReason === "error" || msg.stopReason === "aborted");
|
|
1235
1371
|
if (retryOutcome === "not-handled" && this._retryAttempt > 0 && msg.errorMessage) {
|
|
1236
1372
|
const attempt = this._retryAttempt;
|
|
1237
1373
|
this._retryAttempt = 0;
|
|
@@ -1276,7 +1412,9 @@ export class AgentSession {
|
|
|
1276
1412
|
this._flushPendingBashMessages();
|
|
1277
1413
|
if (!launchedContinuation &&
|
|
1278
1414
|
!retryContinuationBlocked &&
|
|
1279
|
-
(allowsQueuedContinuation ||
|
|
1415
|
+
(allowsQueuedContinuation ||
|
|
1416
|
+
allowsPostCompactionUsageExemptContinuation ||
|
|
1417
|
+
retryExhaustionAllowsQueuedContinuation) &&
|
|
1280
1418
|
this.agent.hasQueuedMessages()) {
|
|
1281
1419
|
// A scheduled continuation owns the queue now; the stored admission
|
|
1282
1420
|
// rejection from a superseded required compaction must not surface.
|
|
@@ -1545,6 +1683,9 @@ export class AgentSession {
|
|
|
1545
1683
|
*/
|
|
1546
1684
|
subscribe(listener) {
|
|
1547
1685
|
this._eventListeners.push(listener);
|
|
1686
|
+
for (const source of this.settingsManager.getSelectedSettingsSources()) {
|
|
1687
|
+
listener({ type: "settings_source_selected", ...source });
|
|
1688
|
+
}
|
|
1548
1689
|
// Return unsubscribe function for this specific listener
|
|
1549
1690
|
return () => {
|
|
1550
1691
|
const index = this._eventListeners.indexOf(listener);
|
|
@@ -1592,6 +1733,8 @@ export class AgentSession {
|
|
|
1592
1733
|
}
|
|
1593
1734
|
this._extensionRunner.invalidate("This extension ctx is stale after session replacement or reload. Do not use a captured pi or command ctx after ctx.newSession(), ctx.fork(), ctx.switchSession(), or ctx.reload(). For newSession, fork, and switchSession, move post-replacement work into withSession and use the ctx passed to withSession. For reload, do not use the old ctx after await ctx.reload().");
|
|
1594
1735
|
this._disconnectFromAgent();
|
|
1736
|
+
this._unsubscribeSettingsSource?.();
|
|
1737
|
+
this._unsubscribeSettingsSource = undefined;
|
|
1595
1738
|
this._eventListeners = [];
|
|
1596
1739
|
cleanupSessionResources(this.sessionId);
|
|
1597
1740
|
}
|
|
@@ -1625,13 +1768,54 @@ export class AgentSession {
|
|
|
1625
1768
|
isFastModeActive() {
|
|
1626
1769
|
return this._sessionFastMode || this._currentServiceTier === "priority";
|
|
1627
1770
|
}
|
|
1628
|
-
/**
|
|
1771
|
+
/**
|
|
1772
|
+
* The tier a request would carry right now: `serviceTier`, promoted to `"priority"` while
|
|
1773
|
+
* session fast mode is on (which is exactly what the service-tier extension puts on the
|
|
1774
|
+
* wire). Reported to clients so `serviceTier` and `fastMode` can never disagree.
|
|
1775
|
+
*/
|
|
1776
|
+
get effectiveServiceTier() {
|
|
1777
|
+
return this.isFastModeActive() ? "priority" : this._currentServiceTier;
|
|
1778
|
+
}
|
|
1779
|
+
/**
|
|
1780
|
+
* Session-scoped fast-mode indicator; never persisted, reset on session start.
|
|
1781
|
+
*
|
|
1782
|
+
* Turning fast OFF also clears the cached priority tier: `/fast off` writes a remembered
|
|
1783
|
+
* `"auto"` that must override an inherited catalog-priority tier immediately (display and
|
|
1784
|
+
* request side), not only on the next session. Only codex-response models are touched, and
|
|
1785
|
+
* never when an explicit scoped/favorite `:priority` pin is in force — those are pinned by
|
|
1786
|
+
* the user's model selection, not by `/fast`.
|
|
1787
|
+
*/
|
|
1629
1788
|
setSessionFastMode(enabled) {
|
|
1789
|
+
const previousFastMode = this.isFastModeActive();
|
|
1790
|
+
const previousTier = this._currentServiceTier;
|
|
1630
1791
|
this._sessionFastMode = enabled;
|
|
1792
|
+
if (!enabled && this._currentServiceTier === "priority" && this.model?.api === CODEX_RESPONSES_API) {
|
|
1793
|
+
// Only an INHERITED (catalog) priority is cleared. A priority the catalog does not
|
|
1794
|
+
// explain came from an explicit scoped/favorite `:priority` pin, which `/fast` must not undo.
|
|
1795
|
+
if (this._modelRuntime.getCompatibilityRequestConfig(this.model).serviceTier === "priority") {
|
|
1796
|
+
this._currentServiceTier = undefined;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
this._emitServiceTierChangeIfNeeded(previousTier, previousFastMode);
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Emit `service_tier_changed` when the effective tier or the fast-mode indicator actually
|
|
1803
|
+
* moved. Both are observable state for RPC clients (`get_state.serviceTier` / `.fastMode`),
|
|
1804
|
+
* and they can move independently: a session fast-mode toggle need not change the resolved
|
|
1805
|
+
* tier, and a model switch can change the tier with fast mode untouched.
|
|
1806
|
+
*/
|
|
1807
|
+
_emitServiceTierChangeIfNeeded(previousTier, previousFastMode) {
|
|
1808
|
+
const fastMode = this.isFastModeActive();
|
|
1809
|
+
if (previousTier === this._currentServiceTier && previousFastMode === fastMode)
|
|
1810
|
+
return;
|
|
1811
|
+
this._emit({ type: "service_tier_changed", tier: this.effectiveServiceTier, fastMode });
|
|
1631
1812
|
}
|
|
1632
1813
|
/**
|
|
1633
1814
|
* Explicit scoped/favorite tiers win; otherwise fall back to the model's
|
|
1634
|
-
* configured serviceTier from models.json/extension compatibility config.
|
|
1815
|
+
* configured serviceTier from models.json/extension compatibility config. The per-model
|
|
1816
|
+
* `/fast` memory is honored by the service-tier extension (`liveMemoryTier` + the session
|
|
1817
|
+
* flag in `before_provider_request`), not cached here: caching it would survive a same-session
|
|
1818
|
+
* `/fast off` (no model switch to re-resolve) and leak an inherited priority onto the wire.
|
|
1635
1819
|
*/
|
|
1636
1820
|
_resolveServiceTier(model, explicit) {
|
|
1637
1821
|
if (explicit)
|
|
@@ -1711,7 +1895,7 @@ export class AgentSession {
|
|
|
1711
1895
|
catch (err) {
|
|
1712
1896
|
throw new ExecuteToolError("invalid_params", toolName, err instanceof Error ? err.message : String(err), activeTools);
|
|
1713
1897
|
}
|
|
1714
|
-
const beforeResult = await this.
|
|
1898
|
+
const beforeResult = await this.preflightToolCall(prepared.toolCall, prepared.args, {
|
|
1715
1899
|
waitForEventQueue: this._toolExecutionDepth === 0,
|
|
1716
1900
|
});
|
|
1717
1901
|
if (beforeResult?.block) {
|
|
@@ -1758,6 +1942,15 @@ export class AgentSession {
|
|
|
1758
1942
|
* Also rebuilds the system prompt to reflect the new tool set.
|
|
1759
1943
|
* Changes take effect on the next agent turn.
|
|
1760
1944
|
*/
|
|
1945
|
+
/**
|
|
1946
|
+
* Resolve an executable tool from the full registry (builtin + extension
|
|
1947
|
+
* tools), independent of the active set. The Cursor exec bridge uses this:
|
|
1948
|
+
* Cursor drives its native tools (read/bash/grep/ls/write) over the exec
|
|
1949
|
+
* channel regardless of which tools the request advertised.
|
|
1950
|
+
*/
|
|
1951
|
+
getRegisteredTool(name) {
|
|
1952
|
+
return this._toolRegistry.get(name);
|
|
1953
|
+
}
|
|
1761
1954
|
setActiveToolsByName(toolNames) {
|
|
1762
1955
|
const tools = [];
|
|
1763
1956
|
const validToolNames = [];
|
|
@@ -1913,6 +2106,8 @@ export class AgentSession {
|
|
|
1913
2106
|
selectedTools: validToolNames,
|
|
1914
2107
|
toolSnippets,
|
|
1915
2108
|
promptGuidelines,
|
|
2109
|
+
customPrompt: loaderSystemPrompt,
|
|
2110
|
+
appendSystemPrompt: loaderAppendSystemPrompt.length > 0 ? loaderAppendSystemPrompt.join("\n\n") : undefined,
|
|
1916
2111
|
};
|
|
1917
2112
|
const basePrompt = loaderSystemPrompt ?? buildDynamicSystemPrompt(this._baseSystemPromptOptions);
|
|
1918
2113
|
return loaderAppendSystemPrompt.length > 0
|
|
@@ -2018,6 +2213,13 @@ export class AgentSession {
|
|
|
2018
2213
|
let titlePrompt;
|
|
2019
2214
|
let consumedNextTurnMessages;
|
|
2020
2215
|
let inputId;
|
|
2216
|
+
let pendingCommandInvocation;
|
|
2217
|
+
const emitPendingCommandInvocation = () => {
|
|
2218
|
+
if (!pendingCommandInvocation)
|
|
2219
|
+
return;
|
|
2220
|
+
this._emit({ type: "command_invocation", command: pendingCommandInvocation });
|
|
2221
|
+
pendingCommandInvocation = undefined;
|
|
2222
|
+
};
|
|
2021
2223
|
const emitInputDisposition = async (disposition) => {
|
|
2022
2224
|
if (inputId === undefined)
|
|
2023
2225
|
return;
|
|
@@ -2046,7 +2248,16 @@ export class AgentSession {
|
|
|
2046
2248
|
let expandedText = currentText;
|
|
2047
2249
|
if (expandPromptTemplates) {
|
|
2048
2250
|
expandedText = this._expandSkillCommand(expandedText);
|
|
2049
|
-
|
|
2251
|
+
const templateExpansion = expandPromptTemplateWithMetadata(expandedText, [...this.promptTemplates]);
|
|
2252
|
+
expandedText = templateExpansion.text;
|
|
2253
|
+
if (templateExpansion.template) {
|
|
2254
|
+
pendingCommandInvocation = {
|
|
2255
|
+
name: templateExpansion.template.name,
|
|
2256
|
+
source: "prompt",
|
|
2257
|
+
sourceInfo: templateExpansion.template.sourceInfo,
|
|
2258
|
+
syntax: "slash",
|
|
2259
|
+
};
|
|
2260
|
+
}
|
|
2050
2261
|
}
|
|
2051
2262
|
titlePrompt = options?.sessionTitlePrompt === false ? undefined : (options?.sessionTitlePrompt ?? text);
|
|
2052
2263
|
// If streaming, queue via steer() or followUp() based on option
|
|
@@ -2063,6 +2274,7 @@ export class AgentSession {
|
|
|
2063
2274
|
else {
|
|
2064
2275
|
await this._queueSteer(expandedText, currentImages);
|
|
2065
2276
|
}
|
|
2277
|
+
emitPendingCommandInvocation();
|
|
2066
2278
|
await emitInputDisposition("queued");
|
|
2067
2279
|
promptDisposition?.("queued");
|
|
2068
2280
|
preflightResult?.(true);
|
|
@@ -2081,6 +2293,7 @@ export class AgentSession {
|
|
|
2081
2293
|
else {
|
|
2082
2294
|
await this._queueSteer(expandedText, currentImages);
|
|
2083
2295
|
}
|
|
2296
|
+
emitPendingCommandInvocation();
|
|
2084
2297
|
await emitInputDisposition("queued");
|
|
2085
2298
|
promptDisposition?.("queued");
|
|
2086
2299
|
preflightResult?.(true);
|
|
@@ -2105,6 +2318,7 @@ export class AgentSession {
|
|
|
2105
2318
|
else {
|
|
2106
2319
|
await this._queueSteer(expandedText, currentImages);
|
|
2107
2320
|
}
|
|
2321
|
+
emitPendingCommandInvocation();
|
|
2108
2322
|
await emitInputDisposition("queued");
|
|
2109
2323
|
promptDisposition?.("queued");
|
|
2110
2324
|
preflightResult?.(true);
|
|
@@ -2126,6 +2340,7 @@ export class AgentSession {
|
|
|
2126
2340
|
else {
|
|
2127
2341
|
await this._queueSteer(expandedText, currentImages);
|
|
2128
2342
|
}
|
|
2343
|
+
emitPendingCommandInvocation();
|
|
2129
2344
|
await emitInputDisposition("queued");
|
|
2130
2345
|
promptDisposition?.("queued");
|
|
2131
2346
|
preflightResult?.(true);
|
|
@@ -2219,6 +2434,7 @@ export class AgentSession {
|
|
|
2219
2434
|
return;
|
|
2220
2435
|
}
|
|
2221
2436
|
promptDisposition?.("started");
|
|
2437
|
+
emitPendingCommandInvocation();
|
|
2222
2438
|
preflightResult?.(true);
|
|
2223
2439
|
if (options?.thinkingLevel !== undefined) {
|
|
2224
2440
|
this.setSessionThinkingLevel(options.thinkingLevel);
|
|
@@ -2254,6 +2470,15 @@ export class AgentSession {
|
|
|
2254
2470
|
const command = this._extensionRunner.getCommand(commandName);
|
|
2255
2471
|
if (!command)
|
|
2256
2472
|
return false;
|
|
2473
|
+
this._emit({
|
|
2474
|
+
type: "command_invocation",
|
|
2475
|
+
command: {
|
|
2476
|
+
name: commandName,
|
|
2477
|
+
source: "extension",
|
|
2478
|
+
sourceInfo: command.sourceInfo,
|
|
2479
|
+
syntax: "slash",
|
|
2480
|
+
},
|
|
2481
|
+
});
|
|
2257
2482
|
// Get command context from extension runner (includes session control methods)
|
|
2258
2483
|
const ctx = this._extensionRunner.createCommandContext();
|
|
2259
2484
|
try {
|
|
@@ -2271,63 +2496,73 @@ export class AgentSession {
|
|
|
2271
2496
|
}
|
|
2272
2497
|
}
|
|
2273
2498
|
/**
|
|
2274
|
-
* Expand
|
|
2275
|
-
*
|
|
2276
|
-
*
|
|
2499
|
+
* Expand explicit skill invocations to their full content.
|
|
2500
|
+
* Leading runs accept slash and dollar syntax; inline expansion is limited to
|
|
2501
|
+
* the desktop's explicit `$skill:name` token so ordinary dollar prose stays literal.
|
|
2277
2502
|
*/
|
|
2278
2503
|
_expandSkillCommand(text) {
|
|
2279
|
-
|
|
2504
|
+
const invocationTokens = parseSkillInvocationTokens(text);
|
|
2505
|
+
if (invocationTokens.length === 0)
|
|
2280
2506
|
return text;
|
|
2281
2507
|
const skills = this.resourceLoader.getSkills().skills;
|
|
2282
2508
|
const expandedSkillNames = new Set();
|
|
2283
2509
|
const skillBlocks = [];
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
const token = text.slice(tokenStart, tokenEnd);
|
|
2291
|
-
if (!token.startsWith("/skill:"))
|
|
2292
|
-
break;
|
|
2293
|
-
const skillName = token.slice(7);
|
|
2294
|
-
const skill = skills.find((candidate) => candidate.name === skillName);
|
|
2295
|
-
if (!skill)
|
|
2296
|
-
break; // Unknown skills and everything after them remain literal text.
|
|
2297
|
-
if (!expandedSkillNames.has(skill.name)) {
|
|
2298
|
-
if (skillBlocks.length >= MAX_SKILL_EXPANSIONS_PER_PROMPT) {
|
|
2299
|
-
this._extensionRunner.emitError({
|
|
2300
|
-
extensionPath: "skill:expansion",
|
|
2301
|
-
event: "skill_expansion",
|
|
2302
|
-
error: `Expanded at most ${MAX_SKILL_EXPANSIONS_PER_PROMPT} skills; remaining skill commands were left as literal text.`,
|
|
2303
|
-
});
|
|
2510
|
+
const invocationMetadata = [];
|
|
2511
|
+
const removedTokens = [];
|
|
2512
|
+
for (const token of invocationTokens) {
|
|
2513
|
+
const skill = skills.find((candidate) => candidate.name === token.name);
|
|
2514
|
+
if (!skill) {
|
|
2515
|
+
if (token.position === "leading")
|
|
2304
2516
|
break;
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
extensionPath: skill.filePath,
|
|
2315
|
-
event: "skill_expansion",
|
|
2316
|
-
error: err instanceof Error ? err.message : String(err),
|
|
2317
|
-
});
|
|
2318
|
-
return text; // Return the original prompt when any skill file cannot be read.
|
|
2319
|
-
}
|
|
2517
|
+
continue;
|
|
2518
|
+
}
|
|
2519
|
+
if (skillBlocks.length >= MAX_SKILL_EXPANSIONS_PER_PROMPT) {
|
|
2520
|
+
this._extensionRunner.emitError({
|
|
2521
|
+
extensionPath: "skill:expansion",
|
|
2522
|
+
event: "skill_expansion",
|
|
2523
|
+
error: `Expanded at most ${MAX_SKILL_EXPANSIONS_PER_PROMPT} skills; remaining skill commands were left as literal text.`,
|
|
2524
|
+
});
|
|
2525
|
+
break;
|
|
2320
2526
|
}
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2527
|
+
removedTokens.push(token);
|
|
2528
|
+
if (expandedSkillNames.has(skill.name)) {
|
|
2529
|
+
this._extensionRunner.emitError({
|
|
2530
|
+
extensionPath: skill.filePath,
|
|
2531
|
+
event: "skill_expansion",
|
|
2532
|
+
error: `Skipped duplicate skill invocation: ${skill.name}`,
|
|
2533
|
+
});
|
|
2534
|
+
continue;
|
|
2535
|
+
}
|
|
2536
|
+
try {
|
|
2537
|
+
const content = readFileSync(skill.filePath, "utf-8");
|
|
2538
|
+
const body = stripFrontmatter(content).trim();
|
|
2539
|
+
skillBlocks.push({
|
|
2540
|
+
name: skill.name,
|
|
2541
|
+
filePath: skill.filePath,
|
|
2542
|
+
baseDir: skill.baseDir,
|
|
2543
|
+
body,
|
|
2544
|
+
});
|
|
2545
|
+
expandedSkillNames.add(skill.name);
|
|
2546
|
+
invocationMetadata.push({
|
|
2547
|
+
name: skill.name,
|
|
2548
|
+
path: skill.filePath,
|
|
2549
|
+
syntax: token.syntax,
|
|
2550
|
+
});
|
|
2551
|
+
}
|
|
2552
|
+
catch (err) {
|
|
2553
|
+
this._extensionRunner.emitError({
|
|
2554
|
+
extensionPath: skill.filePath,
|
|
2555
|
+
event: "skill_expansion",
|
|
2556
|
+
error: err instanceof Error ? err.message : String(err),
|
|
2557
|
+
});
|
|
2558
|
+
return text; // Return the original prompt when any skill file cannot be read.
|
|
2324
2559
|
}
|
|
2325
2560
|
}
|
|
2326
2561
|
if (skillBlocks.length === 0)
|
|
2327
2562
|
return text;
|
|
2328
|
-
const
|
|
2329
|
-
|
|
2330
|
-
return
|
|
2563
|
+
const userRequest = removeSkillInvocationTokens(text, removedTokens);
|
|
2564
|
+
this._emit({ type: "skill_invocation", skills: invocationMetadata });
|
|
2565
|
+
return formatSkillInvocationPrompt(skillBlocks, userRequest);
|
|
2331
2566
|
}
|
|
2332
2567
|
/**
|
|
2333
2568
|
* Queue a steering message while the agent is running.
|
|
@@ -2344,8 +2579,20 @@ export class AgentSession {
|
|
|
2344
2579
|
}
|
|
2345
2580
|
// Expand skill commands and prompt templates
|
|
2346
2581
|
let expandedText = this._expandSkillCommand(text);
|
|
2347
|
-
|
|
2582
|
+
const templateExpansion = expandPromptTemplateWithMetadata(expandedText, [...this.promptTemplates]);
|
|
2583
|
+
expandedText = templateExpansion.text;
|
|
2348
2584
|
await this._queueSteer(expandedText, images, recovery?.enqueueOrder);
|
|
2585
|
+
if (templateExpansion.template) {
|
|
2586
|
+
this._emit({
|
|
2587
|
+
type: "command_invocation",
|
|
2588
|
+
command: {
|
|
2589
|
+
name: templateExpansion.template.name,
|
|
2590
|
+
source: "prompt",
|
|
2591
|
+
sourceInfo: templateExpansion.template.sourceInfo,
|
|
2592
|
+
syntax: "slash",
|
|
2593
|
+
},
|
|
2594
|
+
});
|
|
2595
|
+
}
|
|
2349
2596
|
}
|
|
2350
2597
|
/**
|
|
2351
2598
|
* Queue a follow-up message to be processed after the agent finishes.
|
|
@@ -2361,8 +2608,20 @@ export class AgentSession {
|
|
|
2361
2608
|
}
|
|
2362
2609
|
// Expand skill commands and prompt templates
|
|
2363
2610
|
let expandedText = this._expandSkillCommand(text);
|
|
2364
|
-
|
|
2611
|
+
const templateExpansion = expandPromptTemplateWithMetadata(expandedText, [...this.promptTemplates]);
|
|
2612
|
+
expandedText = templateExpansion.text;
|
|
2365
2613
|
await this._queueFollowUp(expandedText, images, recovery?.enqueueOrder);
|
|
2614
|
+
if (templateExpansion.template) {
|
|
2615
|
+
this._emit({
|
|
2616
|
+
type: "command_invocation",
|
|
2617
|
+
command: {
|
|
2618
|
+
name: templateExpansion.template.name,
|
|
2619
|
+
source: "prompt",
|
|
2620
|
+
sourceInfo: templateExpansion.template.sourceInfo,
|
|
2621
|
+
syntax: "slash",
|
|
2622
|
+
},
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2366
2625
|
}
|
|
2367
2626
|
_startSessionTitleGeneration(firstPrompt) {
|
|
2368
2627
|
if (!this._autoTitleSessions || this.sessionManager.getSessionName() || shouldSkipSessionTitle(firstPrompt)) {
|
|
@@ -2532,7 +2791,7 @@ export class AgentSession {
|
|
|
2532
2791
|
if (options?.deliverAs === "nextTurn") {
|
|
2533
2792
|
this._pendingNextTurnMessages.push(appMessage);
|
|
2534
2793
|
}
|
|
2535
|
-
else if (this.isStreaming) {
|
|
2794
|
+
else if (this.isStreaming && options?.triggerTurn !== false) {
|
|
2536
2795
|
if (options?.deliverAs === "followUp") {
|
|
2537
2796
|
this.agent.followUp(appMessage);
|
|
2538
2797
|
}
|
|
@@ -2593,6 +2852,7 @@ export class AgentSession {
|
|
|
2593
2852
|
*
|
|
2594
2853
|
* @param content User message content (string or content array)
|
|
2595
2854
|
* @param options.deliverAs Delivery mode when streaming: "steer" or "followUp"
|
|
2855
|
+
* @param options.expandPromptTemplates Whether to dispatch extension commands and expand skill commands and prompt templates. Default: false.
|
|
2596
2856
|
*/
|
|
2597
2857
|
async sendUserMessage(content, options) {
|
|
2598
2858
|
const bindingPromptReadiness = this._extensionBindingPromptReadiness;
|
|
@@ -2631,9 +2891,8 @@ export class AgentSession {
|
|
|
2631
2891
|
let finishSessionWork;
|
|
2632
2892
|
let disposition;
|
|
2633
2893
|
try {
|
|
2634
|
-
// Use prompt() with expandPromptTemplates: false to skip command handling and template expansion
|
|
2635
2894
|
await this.prompt(text, {
|
|
2636
|
-
expandPromptTemplates: false,
|
|
2895
|
+
expandPromptTemplates: options?.expandPromptTemplates ?? false,
|
|
2637
2896
|
streamingBehavior: options?.deliverAs,
|
|
2638
2897
|
images,
|
|
2639
2898
|
source: "extension",
|
|
@@ -2840,7 +3099,7 @@ export class AgentSession {
|
|
|
2840
3099
|
if (opts.invalidateCompaction && this._modelSelectionChangesContext(previousModel, model)) {
|
|
2841
3100
|
this._invalidateCompactionForModelSelection();
|
|
2842
3101
|
}
|
|
2843
|
-
const thinkingLevel = this._getThinkingLevelForModelSwitch(opts.ephemeralThinkingLevel);
|
|
3102
|
+
const thinkingLevel = this._getThinkingLevelForModelSwitch(model, opts.ephemeralThinkingLevel);
|
|
2844
3103
|
this.agent.state.model = model;
|
|
2845
3104
|
this.agent.abortServerSideFallback =
|
|
2846
3105
|
this.settingsManager.getAbortServerSideFallback() && this._retryFallback.hasConfiguredChain();
|
|
@@ -2851,6 +3110,8 @@ export class AgentSession {
|
|
|
2851
3110
|
this.settingsManager.setDefaultModelAndProvider(model.provider, model.id);
|
|
2852
3111
|
}
|
|
2853
3112
|
const scopedMatch = this._scopedModels.find((sm) => modelsAreEqual(sm.model, model));
|
|
3113
|
+
const previousTier = this._currentServiceTier;
|
|
3114
|
+
const previousFastMode = this.isFastModeActive();
|
|
2854
3115
|
this._currentServiceTier = this._resolveServiceTier(model, scopedMatch?.serviceTier);
|
|
2855
3116
|
if (opts.ephemeralThinkingLevel !== undefined) {
|
|
2856
3117
|
this._applyEphemeralThinkingLevel(thinkingLevel);
|
|
@@ -2859,6 +3120,15 @@ export class AgentSession {
|
|
|
2859
3120
|
this.setSessionThinkingLevel(thinkingLevel);
|
|
2860
3121
|
}
|
|
2861
3122
|
this._emitHighReasoningWarningIfNeeded();
|
|
3123
|
+
// Post-switch: the level reported here is the one actually in force (clamped, or restored
|
|
3124
|
+
// from this model's memory), not the level requested for the previous model.
|
|
3125
|
+
this._emit({
|
|
3126
|
+
type: "model_changed",
|
|
3127
|
+
model,
|
|
3128
|
+
thinkingLevel: this.thinkingLevel,
|
|
3129
|
+
source: opts.modelSelectSource,
|
|
3130
|
+
});
|
|
3131
|
+
this._emitServiceTierChangeIfNeeded(previousTier, previousFastMode);
|
|
2862
3132
|
if (!opts.emitModelSelect)
|
|
2863
3133
|
return undefined;
|
|
2864
3134
|
return await this._emitModelSelect(model, previousModel, opts.modelSelectSource);
|
|
@@ -2903,16 +3173,26 @@ export class AgentSession {
|
|
|
2903
3173
|
}
|
|
2904
3174
|
this._probeBackScheduler.cancel("manual-model-change");
|
|
2905
3175
|
this._retryFallback.clearForManualModelChange(next.model);
|
|
2906
|
-
const thinkingLevel = this._getThinkingLevelForModelSwitch(next.thinkingLevel);
|
|
3176
|
+
const thinkingLevel = this._getThinkingLevelForModelSwitch(next.model, next.thinkingLevel);
|
|
2907
3177
|
this.agent.state.model = next.model;
|
|
2908
3178
|
this.sessionManager.appendModelChange(next.model.provider, next.model.id);
|
|
2909
3179
|
this.settingsManager.setDefaultModelAndProvider(next.model.provider, next.model.id);
|
|
3180
|
+
const previousTier = this._currentServiceTier;
|
|
3181
|
+
const previousFastMode = this.isFastModeActive();
|
|
2910
3182
|
this._currentServiceTier = this._resolveServiceTier(next.model, next.serviceTier);
|
|
2911
3183
|
// Apply thinking level.
|
|
2912
3184
|
// - Explicit favorite model thinking level overrides the effective session level
|
|
2913
3185
|
// - Undefined favorite model thinking level restores the remembered user preference
|
|
2914
3186
|
// setSessionThinkingLevel clamps without replacing that preference.
|
|
2915
3187
|
this.setSessionThinkingLevel(thinkingLevel);
|
|
3188
|
+
// Post-switch, same contract as _switchActiveModel: the level in force AFTER the cycle.
|
|
3189
|
+
this._emit({
|
|
3190
|
+
type: "model_changed",
|
|
3191
|
+
model: next.model,
|
|
3192
|
+
thinkingLevel: this.thinkingLevel,
|
|
3193
|
+
source: "cycle",
|
|
3194
|
+
});
|
|
3195
|
+
this._emitServiceTierChangeIfNeeded(previousTier, previousFastMode);
|
|
2916
3196
|
const systemPromptChange = await this._emitModelSelect(next.model, currentModel, "cycle");
|
|
2917
3197
|
const cycleResult = { model: next.model, thinkingLevel: this.thinkingLevel, isScoped: true };
|
|
2918
3198
|
if (systemPromptChange) {
|
|
@@ -2926,7 +3206,7 @@ export class AgentSession {
|
|
|
2926
3206
|
/**
|
|
2927
3207
|
* Set thinking level.
|
|
2928
3208
|
* Clamps to model capabilities based on available thinking levels.
|
|
2929
|
-
*
|
|
3209
|
+
* Persistent calls refresh per-model memory; session entries and events are emitted only on change.
|
|
2930
3210
|
*/
|
|
2931
3211
|
setThinkingLevel(level) {
|
|
2932
3212
|
this._setThinkingLevel(level, true);
|
|
@@ -2948,6 +3228,12 @@ export class AgentSession {
|
|
|
2948
3228
|
this._retryFallback.noteManualThinkingLevel();
|
|
2949
3229
|
}
|
|
2950
3230
|
this.agent.state.thinkingLevel = effectiveLevel;
|
|
3231
|
+
if (updateGlobalDefault) {
|
|
3232
|
+
const model = this.model;
|
|
3233
|
+
if (model) {
|
|
3234
|
+
this.settingsManager.setModelThinkingLevel(model.provider, model.id, effectiveLevel);
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
2951
3237
|
if (isChanging) {
|
|
2952
3238
|
this.sessionManager.appendThinkingLevelChange(effectiveLevel);
|
|
2953
3239
|
if (updateGlobalDefault && (this.supportsThinking() || effectiveLevel !== "off")) {
|
|
@@ -3019,11 +3305,12 @@ export class AgentSession {
|
|
|
3019
3305
|
supportsThinking() {
|
|
3020
3306
|
return !!this.model?.reasoning;
|
|
3021
3307
|
}
|
|
3022
|
-
_getThinkingLevelForModelSwitch(explicitLevel) {
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3308
|
+
_getThinkingLevelForModelSwitch(model, explicitLevel) {
|
|
3309
|
+
const requestedLevel = explicitLevel ??
|
|
3310
|
+
this.settingsManager.getModelThinkingLevel(model.provider, model.id) ??
|
|
3311
|
+
this.settingsManager.getDefaultThinkingLevel() ??
|
|
3312
|
+
DEFAULT_THINKING_LEVEL;
|
|
3313
|
+
return this._clampThinkingLevel(requestedLevel, getSupportedThinkingLevels(model));
|
|
3027
3314
|
}
|
|
3028
3315
|
_clampThinkingLevel(level, availableLevels) {
|
|
3029
3316
|
const available = new Set(availableLevels);
|
|
@@ -3687,8 +3974,9 @@ export class AgentSession {
|
|
|
3687
3974
|
if (compacted)
|
|
3688
3975
|
return true;
|
|
3689
3976
|
}
|
|
3690
|
-
if (this._isCompactionOnCooldown() || this._isCompactionDelegated())
|
|
3977
|
+
if (this._isCompactionOnCooldown() || this._isCompactionDelegated() || this._hasSupersedingCompactionClaim()) {
|
|
3691
3978
|
return false;
|
|
3979
|
+
}
|
|
3692
3980
|
throw new RequiredCompactionError();
|
|
3693
3981
|
}
|
|
3694
3982
|
/**
|
|
@@ -3729,6 +4017,8 @@ export class AgentSession {
|
|
|
3729
4017
|
const compacted = await this._runPrePromptCompaction(lastAssistantMessage, false, "pre_prompt");
|
|
3730
4018
|
if (!compacted && this._isCompactionDelegated())
|
|
3731
4019
|
return;
|
|
4020
|
+
if (!compacted && this._hasSupersedingCompactionClaim())
|
|
4021
|
+
return;
|
|
3732
4022
|
if (!compacted && !isOversized() && this._isCompactionOnCooldown())
|
|
3733
4023
|
return;
|
|
3734
4024
|
if (!compacted || isOversized()) {
|
|
@@ -3819,7 +4109,7 @@ export class AgentSession {
|
|
|
3819
4109
|
this._restoreAgentMessagesFromSession();
|
|
3820
4110
|
this._incrementMessageRevision();
|
|
3821
4111
|
}
|
|
3822
|
-
if (!compacted && inlineReason && !this._isCompactionDelegated()) {
|
|
4112
|
+
if (!compacted && inlineReason && !this._isCompactionDelegated() && !this._hasSupersedingCompactionClaim()) {
|
|
3823
4113
|
throw new RequiredCompactionError();
|
|
3824
4114
|
}
|
|
3825
4115
|
return compacted;
|
|
@@ -3888,6 +4178,17 @@ export class AgentSession {
|
|
|
3888
4178
|
const state = this._compactionLifecycle.state;
|
|
3889
4179
|
return state.status === "failed" && state.rejectionCause === "circuit-breaker";
|
|
3890
4180
|
}
|
|
4181
|
+
/**
|
|
4182
|
+
* Compaction claims are last-writer-wins: a newer admission aborts the
|
|
4183
|
+
* incumbent controller (_claimCompactionController). When the failed attempt
|
|
4184
|
+
* lost that race, a live claimant now owns the route and re-gates admission
|
|
4185
|
+
* itself, so the loser must not surface RequiredCompactionError (issue #886).
|
|
4186
|
+
* A user abort leaves no live claimant behind and keeps throwing.
|
|
4187
|
+
*/
|
|
4188
|
+
_hasSupersedingCompactionClaim() {
|
|
4189
|
+
const claimant = this._compactionAbortController ?? this._autoCompactionAbortController;
|
|
4190
|
+
return claimant !== undefined && !claimant.signal.aborted;
|
|
4191
|
+
}
|
|
3891
4192
|
_isCompactionDelegated() {
|
|
3892
4193
|
const state = this._compactionLifecycle.state;
|
|
3893
4194
|
const model = this.model;
|
|
@@ -3961,8 +4262,9 @@ export class AgentSession {
|
|
|
3961
4262
|
return;
|
|
3962
4263
|
const compacted = await this._runPrePromptCompaction(this._findLastAssistantMessage(), true, "pre_prompt");
|
|
3963
4264
|
if (!compacted) {
|
|
3964
|
-
if (this._isCompactionOnCooldown() || this._isCompactionDelegated())
|
|
4265
|
+
if (this._isCompactionOnCooldown() || this._isCompactionDelegated() || this._hasSupersedingCompactionClaim()) {
|
|
3965
4266
|
return;
|
|
4267
|
+
}
|
|
3966
4268
|
throw new RequiredCompactionError();
|
|
3967
4269
|
}
|
|
3968
4270
|
this._scheduledContinuationRecompacted = true;
|
|
@@ -4028,9 +4330,15 @@ export class AgentSession {
|
|
|
4028
4330
|
const finishContinuationWork = this._sessionWorkBarrier.begin();
|
|
4029
4331
|
const continueAfterEvent = async () => {
|
|
4030
4332
|
try {
|
|
4031
|
-
await this._continueAgentAfterCurrentRun(options, retryTimeoutMs);
|
|
4333
|
+
const outcome = await this._continueAgentAfterCurrentRun(options, retryTimeoutMs);
|
|
4334
|
+
if (retryContinuation && outcome === "taken-over") {
|
|
4335
|
+
DEFERRED_RETRY_QUEUE_OWNERS.delete(this);
|
|
4336
|
+
}
|
|
4032
4337
|
}
|
|
4033
4338
|
catch (error) {
|
|
4339
|
+
if (retryContinuation) {
|
|
4340
|
+
DEFERRED_RETRY_QUEUE_OWNERS.delete(this);
|
|
4341
|
+
}
|
|
4034
4342
|
const message = error instanceof Error ? error.message : String(error);
|
|
4035
4343
|
this._emit({
|
|
4036
4344
|
type: "continuation_error",
|
|
@@ -4208,6 +4516,7 @@ export class AgentSession {
|
|
|
4208
4516
|
this._applyExtensionBindings(this._extensionRunner);
|
|
4209
4517
|
this.syncPromptCacheSafeWaitEnv();
|
|
4210
4518
|
await this._extensionRunner.emit(this._sessionStartEvent);
|
|
4519
|
+
this._enforceConfiguredDefaultTools();
|
|
4211
4520
|
await this.extendResourcesFromExtensions(this._sessionStartEvent.reason === "reload" ? "reload" : "startup");
|
|
4212
4521
|
}
|
|
4213
4522
|
finally {
|
|
@@ -4541,6 +4850,22 @@ export class AgentSession {
|
|
|
4541
4850
|
get fallbackValidationWarnings() {
|
|
4542
4851
|
return this._fallbackValidationWarnings;
|
|
4543
4852
|
}
|
|
4853
|
+
_isBuiltinExtensionPath(path) {
|
|
4854
|
+
return path.startsWith("<builtin:") || /[\\/]senpi-codemode[\\/]/u.test(path);
|
|
4855
|
+
}
|
|
4856
|
+
_enforceConfiguredDefaultTools() {
|
|
4857
|
+
const defaultToolNames = this._defaultToolNames;
|
|
4858
|
+
if (defaultToolNames === undefined)
|
|
4859
|
+
return;
|
|
4860
|
+
this.setActiveToolsByName(this.getActiveToolNames().filter((name) => {
|
|
4861
|
+
if (defaultToolNames.has(name))
|
|
4862
|
+
return true;
|
|
4863
|
+
const entry = this._toolDefinitions.get(name);
|
|
4864
|
+
return (entry !== undefined &&
|
|
4865
|
+
!this._isBuiltinExtensionPath(entry.sourceInfo.path) &&
|
|
4866
|
+
entry.sourceInfo.source !== "builtin");
|
|
4867
|
+
}));
|
|
4868
|
+
}
|
|
4544
4869
|
_refreshToolRegistry(options) {
|
|
4545
4870
|
const previousRegistryNames = new Set(this._toolRegistry.keys());
|
|
4546
4871
|
const previousActiveToolNames = this.getActiveToolNames();
|
|
@@ -4548,8 +4873,12 @@ export class AgentSession {
|
|
|
4548
4873
|
const excludedToolNames = this._excludedToolNames;
|
|
4549
4874
|
const isAllowedTool = (name) => (!allowedToolNames || allowedToolNames.has(name)) && !excludedToolNames?.has(name);
|
|
4550
4875
|
const registeredTools = this._extensionRunner.getAllRegisteredTools();
|
|
4876
|
+
const defaultToolNames = this._defaultToolNames;
|
|
4877
|
+
const isConfiguredBuiltinTool = (tool) => (tool.sourceInfo.source !== "builtin" && !this._isBuiltinExtensionPath(tool.sourceInfo.path)) ||
|
|
4878
|
+
defaultToolNames === undefined ||
|
|
4879
|
+
defaultToolNames.has(tool.definition.name);
|
|
4551
4880
|
const allCustomTools = [
|
|
4552
|
-
...registeredTools,
|
|
4881
|
+
...registeredTools.filter(isConfiguredBuiltinTool),
|
|
4553
4882
|
...this._customTools.map((definition) => ({
|
|
4554
4883
|
definition,
|
|
4555
4884
|
sourceInfo: createSyntheticSourceInfo(`<sdk:${definition.name}>`, { source: "sdk" }),
|
|
@@ -5176,7 +5505,7 @@ export class AgentSession {
|
|
|
5176
5505
|
finalError: "Retry cancelled",
|
|
5177
5506
|
});
|
|
5178
5507
|
this._resolveRetry();
|
|
5179
|
-
return "
|
|
5508
|
+
return "cancelled";
|
|
5180
5509
|
}
|
|
5181
5510
|
this._retryAbortController = undefined;
|
|
5182
5511
|
// Turn boundary: a suppression that expired during the backoff sleep lets
|
|
@@ -5192,7 +5521,10 @@ export class AgentSession {
|
|
|
5192
5521
|
model &&
|
|
5193
5522
|
shouldCompact(contextTokens, model.contextWindow, compactionSettings)) {
|
|
5194
5523
|
const preRetryCompaction = await this._runPrePromptCompaction(message, true, "threshold", true, true);
|
|
5195
|
-
if (!preRetryCompaction &&
|
|
5524
|
+
if (!preRetryCompaction &&
|
|
5525
|
+
!this._isCompactionOnCooldown() &&
|
|
5526
|
+
!this._isCompactionDelegated() &&
|
|
5527
|
+
!this._hasSupersedingCompactionClaim()) {
|
|
5196
5528
|
const attempt = this._retryAttempt;
|
|
5197
5529
|
this._retryAttempt = 0;
|
|
5198
5530
|
this._resetHintTierState();
|
|
@@ -5219,6 +5551,12 @@ export class AgentSession {
|
|
|
5219
5551
|
timeoutMs: this.agent.timeoutMs,
|
|
5220
5552
|
streamStartTimeoutMs: this.agent.streamStartTimeoutMs,
|
|
5221
5553
|
});
|
|
5554
|
+
if (continuation.options.deferQueuedMessages === true) {
|
|
5555
|
+
DEFERRED_RETRY_QUEUE_OWNERS.add(this);
|
|
5556
|
+
}
|
|
5557
|
+
else {
|
|
5558
|
+
DEFERRED_RETRY_QUEUE_OWNERS.delete(this);
|
|
5559
|
+
}
|
|
5222
5560
|
this.agent.suppressQueuedMessageDrain();
|
|
5223
5561
|
this._scheduleContinuationAfterCurrentEvent(continuation.options, true, continuation.watchdogTimeoutMs);
|
|
5224
5562
|
return "continued";
|
|
@@ -5681,11 +6019,11 @@ export class AgentSession {
|
|
|
5681
6019
|
/**
|
|
5682
6020
|
* Export session to HTML.
|
|
5683
6021
|
* @param outputPath Optional output path (defaults to session directory)
|
|
6022
|
+
* @param options Optional export presentation settings
|
|
5684
6023
|
* @returns Path to exported file
|
|
5685
6024
|
*/
|
|
5686
|
-
async exportToHtml(outputPath) {
|
|
5687
|
-
const
|
|
5688
|
-
const themeName = configuredThemeName && getThemeByName(configuredThemeName) ? configuredThemeName : undefined;
|
|
6025
|
+
async exportToHtml(outputPath, options = {}) {
|
|
6026
|
+
const themeName = [options.themeName, this.settingsManager.getTheme()].find((candidate) => candidate !== undefined && getThemeByName(candidate) !== undefined);
|
|
5689
6027
|
// Create tool renderer if we have an extension runner (for custom tool HTML rendering)
|
|
5690
6028
|
const toolRenderer = createToolHtmlRenderer({
|
|
5691
6029
|
getToolDefinition: (name) => this.getToolDefinition(name),
|