@code-yeongyu/senpi 2026.7.31 → 2026.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +270 -0
- package/README.md +1 -0
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +27 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/credential-print.d.ts +23 -0
- package/dist/cli/credential-print.d.ts.map +1 -0
- package/dist/cli/credential-print.js +116 -0
- package/dist/cli/credential-print.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/remote-session.d.ts +53 -0
- package/dist/client/remote-session.d.ts.map +1 -0
- package/dist/client/remote-session.js +340 -0
- package/dist/client/remote-session.js.map +1 -0
- package/dist/client/transcript.d.ts +12 -0
- package/dist/client/transcript.d.ts.map +1 -0
- package/dist/client/transcript.js +98 -0
- package/dist/client/transcript.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +3 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +85 -14
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +445 -78
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +5 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +72 -11
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/dynamic-prompt/build.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.js +4 -0
- package/dist/core/dynamic-prompt/build.js.map +1 -1
- package/dist/core/dynamic-prompt/verification.d.ts +2 -2
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.js +2 -2
- package/dist/core/dynamic-prompt/verification.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.d.ts +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.js +25 -25
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-command.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.js +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-management.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.d.ts +9 -9
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.js +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/accounts.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.js +3 -3
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/affinity.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.d.ts +21 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.js +30 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/auth-lane.d.ts +8 -4
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/auth-lane.js +34 -25
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts +17 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js +56 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.js +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/errors.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.js +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts +14 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/guidance.js +37 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts +4 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/index.js +12 -10
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.d.ts +3 -3
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/oauth-login.js +2 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.d.ts +18 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/options.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/options.js +70 -10
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.js +32 -19
- package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.d.ts +2 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts +32 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js +43 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts +18 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js +46 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +81 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +127 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts +10 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js +34 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts +56 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js +174 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts +24 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js +34 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +34 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +85 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts +19 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js +176 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts +18 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.js +33 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +76 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts +87 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js +259 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts +19 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +192 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts +20 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +132 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts +14 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js +42 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts +32 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js +8 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts +28 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js +107 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts +16 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js +92 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts +2 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js +10 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream.d.ts +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +208 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.js +25 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.d.ts +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.d.ts.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.js +2 -2
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tool-watch.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tools.d.ts +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/tools.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts +18 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js +32 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts +18 -0
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.js +73 -0
- package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.d.ts +21 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.js +24 -0
- package/dist/core/extensions/builtin/compaction/idle-retry.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +119 -15
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts +71 -0
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/lane-policy.js +94 -0
- package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js +1 -0
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts +59 -0
- package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/overflow-retry.js +155 -0
- package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative.d.ts +4 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +39 -115
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/task-intent.d.ts +2 -6
- package/dist/core/extensions/builtin/compaction/task-intent.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/task-intent.js +10 -9
- package/dist/core/extensions/builtin/compaction/task-intent.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/transient-failure.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/transient-failure.js +3 -0
- package/dist/core/extensions/builtin/compaction/transient-failure.js.map +1 -1
- package/dist/core/extensions/builtin/goal/continuation-recovery.d.ts +6 -0
- package/dist/core/extensions/builtin/goal/continuation-recovery.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/continuation-recovery.js +20 -0
- package/dist/core/extensions/builtin/goal/continuation-recovery.js.map +1 -0
- package/dist/core/extensions/builtin/goal/continuation.d.ts +2 -4
- package/dist/core/extensions/builtin/goal/continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/continuation.js +2 -8
- package/dist/core/extensions/builtin/goal/continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts +19 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js +48 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js.map +1 -0
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +17 -15
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js +12 -10
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +5 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +94 -52
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/persistence.d.ts +16 -0
- package/dist/core/extensions/builtin/goal/persistence.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/persistence.js +185 -11
- package/dist/core/extensions/builtin/goal/persistence.js.map +1 -1
- package/dist/core/extensions/builtin/goal/ui.d.ts +1 -0
- package/dist/core/extensions/builtin/goal/ui.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/ui.js +11 -2
- package/dist/core/extensions/builtin/goal/ui.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js +13 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +15 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.js +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js +53 -8
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +5 -2
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/detectors.d.ts +31 -0
- package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/detectors.js +152 -0
- package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/index.d.ts +3 -0
- package/dist/core/extensions/builtin/loop-guard/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/index.js +31 -0
- package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts +5 -0
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/notice.js +42 -0
- package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts +30 -0
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/policy.js +30 -0
- package/dist/core/extensions/builtin/loop-guard/policy.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts +4 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.js +50 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.d.ts +13 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.js +51 -0
- package/dist/core/extensions/builtin/loop-guard/similarity.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts +13 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.js +39 -0
- package/dist/core/extensions/builtin/loop-guard/tracker.js.map +1 -0
- package/dist/core/extensions/builtin/mcp/health.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/health.js +2 -1
- package/dist/core/extensions/builtin/mcp/health.js.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.d.ts +10 -0
- package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.js +10 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash-0731.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.js +10 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-flash.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.js +11 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-pro.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.d.ts +13 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.js +60 -0
- package/dist/core/extensions/builtin/prompt-preset/deepseek-v4.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +5 -3
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js +8 -4
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +8 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js +42 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js +3 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/recommended-models/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/recommended-models/index.js +2 -1
- package/dist/core/extensions/builtin/recommended-models/index.js.map +1 -1
- package/dist/core/extensions/builtin/rules/index.js +4 -3
- package/dist/core/extensions/builtin/rules/index.js.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/constants.d.ts +11 -0
- package/dist/core/extensions/builtin/rules/rules/constants.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/constants.js +11 -0
- package/dist/core/extensions/builtin/rules/rules/constants.js.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/formatter.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/formatter.js +15 -1
- package/dist/core/extensions/builtin/rules/rules/formatter.js.map +1 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js +23 -21
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.js +21 -7
- package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-notify.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-notify.js +42 -5
- package/dist/core/extensions/builtin/terminal/monitor-notify.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts +2 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-registry.js +2 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.d.ts +37 -0
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.d.ts.map +1 -0
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.js +61 -0
- package/dist/core/extensions/builtin/terminal/monitor-status-ticker.js.map +1 -0
- package/dist/core/extensions/builtin/terminal/monitor-status.d.ts +9 -1
- package/dist/core/extensions/builtin/terminal/monitor-status.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-status.js +35 -2
- package/dist/core/extensions/builtin/terminal/monitor-status.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.d.ts +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor.js +2 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/commands.d.ts +2 -2
- package/dist/core/extensions/builtin/todotools/commands.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/commands.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js +6 -3
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.js +1 -1
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/todo-widget-component.d.ts +19 -0
- package/dist/core/extensions/builtin/todotools/todo-widget-component.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/todo-widget-component.js +78 -0
- package/dist/core/extensions/builtin/todotools/todo-widget-component.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/todo-widget.d.ts +13 -1
- package/dist/core/extensions/builtin/todotools/todo-widget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/todo-widget.js +32 -14
- package/dist/core/extensions/builtin/todotools/todo-widget.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.d.ts +2 -2
- package/dist/core/extensions/builtin/todotools/tools/todo.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.js +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/tps.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tps.js +5 -2
- package/dist/core/extensions/builtin/tps.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/builtin-rules.d.ts +4 -0
- package/dist/core/extensions/builtin/ttsr/builtin-rules.d.ts.map +1 -0
- package/dist/core/extensions/builtin/ttsr/builtin-rules.js +20 -0
- package/dist/core/extensions/builtin/ttsr/builtin-rules.js.map +1 -0
- package/dist/core/extensions/builtin/ttsr/commands.js +9 -1
- package/dist/core/extensions/builtin/ttsr/commands.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ttsr/index.js +4 -3
- package/dist/core/extensions/builtin/ttsr/index.js.map +1 -1
- package/dist/core/extensions/builtin/ttsr/manager.js +1 -1
- package/dist/core/extensions/builtin/ttsr/manager.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/config.js +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/config.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/native.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/native.js +16 -5
- package/dist/core/extensions/builtin/websearch/websearch/native.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/provider-endpoints.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.d.ts +4 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.js +44 -37
- package/dist/core/extensions/builtin/websearch/websearch/providers/anthropic.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.d.ts +3 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.d.ts.map +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.js +12 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers/deepseek.js.map +1 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/providers.js +2 -0
- package/dist/core/extensions/builtin/websearch/websearch/providers.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/renderers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/renderers.js +3 -3
- package/dist/core/extensions/builtin/websearch/websearch/renderers.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/search.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/search.js +1 -3
- package/dist/core/extensions/builtin/websearch/websearch/search.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/tool.js +2 -2
- package/dist/core/extensions/builtin/websearch/websearch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/types.d.ts +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/websearch/websearch/types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +19 -18
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +5 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +21 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +38 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +10 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/keybindings.d.ts +24 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/model-registry.d.ts +2 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +3 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.js +2 -2
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +2 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +0 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +18 -34
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts +9 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +25 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/resource-loader.d.ts +15 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +55 -6
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/retry-fallback/hint-policy.d.ts +29 -0
- package/dist/core/retry-fallback/hint-policy.d.ts.map +1 -0
- package/dist/core/retry-fallback/hint-policy.js +54 -0
- package/dist/core/retry-fallback/hint-policy.js.map +1 -0
- package/dist/core/retry-fallback/probe-scheduler.d.ts +60 -0
- package/dist/core/retry-fallback/probe-scheduler.d.ts.map +1 -0
- package/dist/core/retry-fallback/probe-scheduler.js +206 -0
- package/dist/core/retry-fallback/probe-scheduler.js.map +1 -0
- package/dist/core/retry-fallback/settings.d.ts +9 -0
- package/dist/core/retry-fallback/settings.d.ts.map +1 -1
- package/dist/core/retry-fallback/settings.js +14 -0
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/settings-manager.d.ts +10 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +21 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/thinking-levels.d.ts +5 -0
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js +9 -39
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/extensions/llama/provider.js +1 -1
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +44 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/app-server/server/account.d.ts +1 -1
- package/dist/modes/app-server/server/account.js +1 -1
- package/dist/modes/app-server/server/account.js.map +1 -1
- package/dist/modes/app-server/server/server-core.js +1 -1
- package/dist/modes/app-server/server/server-core.js.map +1 -1
- package/dist/modes/interactive/compaction-queue-transfer.d.ts +2 -0
- package/dist/modes/interactive/compaction-queue-transfer.d.ts.map +1 -1
- package/dist/modes/interactive/compaction-queue-transfer.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +5 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +16 -4
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/continuity-notice.d.ts +21 -0
- package/dist/modes/interactive/components/continuity-notice.d.ts.map +1 -0
- package/dist/modes/interactive/components/continuity-notice.js +58 -0
- package/dist/modes/interactive/components/continuity-notice.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +9 -5
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +4 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +6 -2
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +8 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/help-content.d.ts.map +1 -1
- package/dist/modes/interactive/help-content.js +1 -0
- package/dist/modes/interactive/help-content.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +21 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +189 -62
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/risky-main-model-warning.d.ts +1 -1
- package/dist/modes/interactive/risky-main-model-warning.d.ts.map +1 -1
- package/dist/modes/interactive/risky-main-model-warning.js +1 -1
- package/dist/modes/interactive/risky-main-model-warning.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -0
- package/dist/modes/interactive/theme/grok-day.json +1 -0
- package/dist/modes/interactive/theme/grok-night.json +1 -0
- package/dist/modes/interactive/theme/light.json +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +5 -1
- package/dist/modes/interactive/theme/theme.d.ts +2 -2
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +13 -3
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +16 -3
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +22 -2
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/AGENTS.md +1 -6
- package/docs/custom-provider.md +10 -3
- package/docs/development.md +1 -2
- package/docs/extensions.md +34 -1
- package/docs/keybindings.md +13 -0
- package/docs/mcp.md +63 -4
- package/docs/models.md +1 -0
- package/docs/providers.md +41 -5
- package/docs/release-guide.md +7 -5
- package/docs/session-format.md +2 -0
- package/docs/settings.md +3 -1
- package/docs/skills.md +29 -0
- package/docs/themes.md +5 -3
- package/docs/usage.md +5 -0
- package/examples/extensions/custom-compaction.ts +1 -2
- package/examples/extensions/custom-provider-anthropic/index.ts +8 -2
- package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
- package/examples/extensions/handoff.ts +2 -3
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/qna.ts +2 -2
- package/examples/rpc-extension-ui.ts +11 -2
- package/examples/sdk/02-custom-model.ts +1 -2
- package/examples/sdk/12-full-control.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +6 -3
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +3 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-status-ticker.ts +79 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-status.ts +36 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +26 -12
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-execution.ts +146 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-handler.ts +21 -119
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +157 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +62 -208
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-notification.ts +98 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-snapshot.ts +81 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-state.ts +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-eval-result.ts +140 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-notification-queue.ts +53 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-request.ts +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +20 -342
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +14 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +156 -67
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js +70 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/array-session-reader.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +22 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts +13 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js +304 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-store.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts +17 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js +60 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/keyed-operation-queue.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts +6 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js +107 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-store.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts +28 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js +61 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repository.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js +22 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search-backend.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -10
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +154 -77
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +49 -23
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +6 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
- package/node_modules/@earendil-works/pi-ai/README.md +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +56 -25
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js +134 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-tool-pairs.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +64 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +12 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +13 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +12 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.d.ts +24 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.js +70 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +2 -16
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +94 -105
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +19 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +11 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +9 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +81 -26
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +16 -8
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +95 -19
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +18 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +23 -4
- package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +10 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +13 -12
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts +24 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js +233 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-hint.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.js +36 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/unavailable-tool-text.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/package.json +10 -6
- package/node_modules/@earendil-works/pi-client/CHANGELOG.md +7 -0
- package/node_modules/@earendil-works/pi-client/README.md +64 -0
- package/node_modules/@earendil-works/pi-client/dist/client.d.ts +25 -0
- package/node_modules/@earendil-works/pi-client/dist/client.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/client.js +386 -0
- package/node_modules/@earendil-works/pi-client/dist/client.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.d.ts +25 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.js +204 -0
- package/node_modules/@earendil-works/pi-client/dist/connection.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.d.ts +23 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.js +42 -0
- package/node_modules/@earendil-works/pi-client/dist/errors.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/index.d.ts +6 -0
- package/node_modules/@earendil-works/pi-client/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/index.js +3 -0
- package/node_modules/@earendil-works/pi-client/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.d.ts +8 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.js +11 -0
- package/node_modules/@earendil-works/pi-client/dist/promise.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts +54 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.js +50 -0
- package/node_modules/@earendil-works/pi-client/dist/session-handle.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/state.d.ts +22 -0
- package/node_modules/@earendil-works/pi-client/dist/state.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/state.js +149 -0
- package/node_modules/@earendil-works/pi-client/dist/state.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.d.ts +17 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.js +2 -0
- package/node_modules/@earendil-works/pi-client/dist/transport.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/types.d.ts +23 -0
- package/node_modules/@earendil-works/pi-client/dist/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/types.js +2 -0
- package/node_modules/@earendil-works/pi-client/dist/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.d.ts +8 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.js +151 -0
- package/node_modules/@earendil-works/pi-client/dist/unix.js.map +1 -0
- package/node_modules/@earendil-works/pi-client/package.json +56 -0
- package/node_modules/@earendil-works/pi-protocol/README.md +68 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js +163 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js +199 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js +4 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts +26 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js +29 -0
- package/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts +29 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.js +140 -0
- package/node_modules/@earendil-works/pi-protocol/dist/codec.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts +29 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.js +152 -0
- package/node_modules/@earendil-works/pi-protocol/dist/framing.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.d.ts +5 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.js +5 -0
- package/node_modules/@earendil-works/pi-protocol/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts +13818 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.js +382 -0
- package/node_modules/@earendil-works/pi-protocol/dist/schemas.js.map +1 -0
- package/node_modules/@earendil-works/pi-protocol/package.json +48 -0
- package/node_modules/@earendil-works/pi-pty/package.json +2 -2
- package/node_modules/@earendil-works/pi-tui/README.md +77 -14
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts +83 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js +687 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiAltScreen.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/TuiMainScreen.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts +13 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js +36 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +7 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js +43 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +3 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +51 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +163 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +3 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +32 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.js +109 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/stack.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +8 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js +21 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +10 -4
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +10 -4
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +30 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +18 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +40 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.js +6 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout-node.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +40 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.js +315 -0
- package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/mux.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/mux.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +10 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +61 -3
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js +12 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal-text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +37 -16
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +89 -21
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +10 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +95 -4
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/node_modules/typebox/build/compile/validator.d.mts +3 -11
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +5 -9
- package/node_modules/typebox/build/guard/guard.mjs +10 -15
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.mjs +3 -0
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +86 -98
- package/node_modules/typebox/build/type/script/mapping.mjs +95 -92
- package/node_modules/typebox/build/type/script/parser.d.mts +42 -40
- package/node_modules/typebox/build/type/script/parser.mjs +23 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +3 -7
- package/node_modules/typebox/build/typebox.mjs +3 -7
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +33 -33
- package/node_modules/typebox/readme.md +117 -103
- package/package.json +20 -10
- package/dist/core/extensions/builtin/claude-agent-sdk/auth-lane.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/auth-lane.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/guidance.d.ts +0 -6
- package/dist/core/extensions/builtin/claude-agent-sdk/guidance.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/guidance.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/index.d.ts +0 -4
- package/dist/core/extensions/builtin/claude-agent-sdk/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/index.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/oauth-login.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/options.d.ts +0 -16
- package/dist/core/extensions/builtin/claude-agent-sdk/options.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/prompt-bridge.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/sdk-boundary.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.d.ts +0 -15
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.js +0 -41
- package/dist/core/extensions/builtin/claude-agent-sdk/settings.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/stream.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/stream.js +0 -229
- package/dist/core/extensions/builtin/claude-agent-sdk/stream.js.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/tools.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-agent-sdk/tools.js.map +0 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts +0 -3
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +0 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js +0 -75
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -100
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -42
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -286
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -44
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts +0 -33
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -163
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -39
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +0 -1
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/account-events.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools-schema.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/custom-tools.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/executable.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/failover.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/prompt-bridge.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/sdk-boundary.js +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-agent-sdk → claude-sdk-oauth}/stream-protocol.js +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -50,7 +50,7 @@ type T = Type.Static<typeof T> // type T = {
|
|
|
50
50
|
|
|
51
51
|
[Documentation](https://sinclairzx81.github.io/typebox/)
|
|
52
52
|
|
|
53
|
-
TypeBox is a runtime type system that creates in-memory JSON Schema objects that infer as TypeScript types. The schematics produced by this library are designed to match the static type checking rules of the TypeScript compiler. TypeBox offers a unified type
|
|
53
|
+
TypeBox is a runtime type system that creates in-memory JSON Schema objects that infer as TypeScript types. The schematics produced by this library are designed to match the static type checking rules of the TypeScript compiler. TypeBox offers a unified type that can be statically checked by TypeScript and runtime checked using standard JSON Schema validation.
|
|
54
54
|
|
|
55
55
|
This library is designed to allow JSON Schema to compose similar to how types compose within TypeScript's type system. It can be used as a simple tool to build up complex schematics or integrated into REST and RPC services to help validate data received over the wire.
|
|
56
56
|
|
|
@@ -73,7 +73,7 @@ License: MIT
|
|
|
73
73
|
|
|
74
74
|
TypeBox types are JSON Schema fragments that compose into more complex types. The library offers a set of types used to construct JSON Schema compliant schematics as well as a set of extended types used to model constructs native to the JavaScript language. The schematics produced by TypeBox can be passed directly to any JSON Schema compliant validator.
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
### Example
|
|
77
77
|
|
|
78
78
|
The following creates a User type and infers with Static.
|
|
79
79
|
|
|
@@ -111,113 +111,127 @@ type User = Type.Static<typeof User> // type User = {
|
|
|
111
111
|
|
|
112
112
|
## Script
|
|
113
113
|
|
|
114
|
-
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play
|
|
114
|
+
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play/?target=99&module=7#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFkIATAVwBtVKBjCAOwDO8BgEMYACzgBeREQB0AZW5RgYGAAoABpThxCaOADVU3GNABM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cADu+ztJqZTJ1HRwACKoaNzMqNzwTGyclDlj+rAqs2sCwqCiUkEEwBgwC0XkkMisEyMUCm4XS3GgIF47FhUmkCPyUAKqKUrAAbjj4YiTFc0j94ABxVA4VAwKBIQE+YFLUFwUnBKHiQT7ACCUCgvCQzj+MBUEXSwGewEFIrFEuccwOrVCaUudMYUmCwCxHPm5W56X4xGArxgFLxVORxLgzGAGAwrEEqDt+MmjvSwgMHF4UG9DqmNO+o3eQlkFg1XJcPIA5kyBKytozmemnZiZVAjdj9XmCxHaPQAEqsN6gdDl1AYTiGaHcSgMGNWMDYNCwa2CKwprNsjtd-m9qx8nuCqyQ1AgPudiDdqFCDsQCFQrTDxejldkVvthdLscDtNDw87vsTgUrmdzrdHlfoqCY9j3i9WPdtwR4889lcnlkzxHP9L1HKdb3nYDlz7Mk3xAj992-ODoKsXNDSxZCxxdN0PVKX8UM-A8oLHND8ww-Cx0ta03kw3dEJ-YiV1IgtaL7ANRCDKBWIQss4AAZRgKQlTgABJbgMGCV5xEod1uCbLQ4CgV4XhCARv32AShNEAAeQg0AgDBGBjAA+PoeTUvEAPTccwKEABtAAGABdVd12bBClAs-tU0ApAbMneznKsJ8Xw8uAvKsocryVQKXNgvdPPbZiMOw91PTCrzktfKibQypKDTI192M4hDkiAA) | [Challenge](test/typescript/readme.md)
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
TypeBox includes a runtime scripting engine that can transform TypeScript definitions into JSON Schema. The engine is implemented symmetrically at runtime and inside TypeScript's type system. It supports many programmable type-level constructs such as Conditional, Mapped, Indexed, Generic, Distributive Conditional, and more. The engine is designed for TypeScript 7 but is supported in TypeScript 5 and above.
|
|
117
117
|
|
|
118
118
|
### Example
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
Syntax highlighting is available via the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sinclairzx81.typebox-script)
|
|
121
121
|
|
|
122
122
|
```typescript
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
// Module
|
|
124
|
+
const Math = Type.Script(`
|
|
125
|
+
type Vector2 = { x: number, y: number }
|
|
126
|
+
type Vector3 = { x: number, y: number, z: number }
|
|
127
|
+
type Vector4 = { x: number, y: number, z: number, w: number }
|
|
128
|
+
`)
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
// Dependent Module
|
|
131
|
+
const { Mesh } = Type.Script(Math, `
|
|
132
|
+
type Vertex = {
|
|
133
|
+
position: Vector4,
|
|
134
|
+
normal: Vector3,
|
|
135
|
+
uv: Vector2
|
|
131
136
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
type Geometry = {
|
|
138
|
+
vertices: Vertex[],
|
|
139
|
+
indices: number[]
|
|
140
|
+
}
|
|
141
|
+
type Material = {
|
|
142
|
+
ambient: Vector4,
|
|
143
|
+
diffuse: Vector4,
|
|
144
|
+
specular: Vector4
|
|
145
|
+
}
|
|
146
|
+
type Mesh = {
|
|
147
|
+
geometry: Geometry,
|
|
148
|
+
material: Material
|
|
136
149
|
}
|
|
137
|
-
|
|
138
|
-
type UserUpdate = Evaluate<
|
|
139
|
-
Pick<User, keyof Entity> &
|
|
140
|
-
Partial<Omit<User, keyof Entity>>
|
|
141
|
-
>
|
|
142
|
-
|
|
143
150
|
`)
|
|
144
151
|
|
|
145
|
-
//
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
// type: 'object',
|
|
163
|
-
// properties: {
|
|
164
|
-
// id: { type: 'string' },
|
|
165
|
-
// name: { type: 'string' },
|
|
166
|
-
// email: { type: 'string' }
|
|
167
|
-
// },
|
|
168
|
-
// required: ['id']
|
|
169
|
-
// }
|
|
170
|
-
|
|
171
|
-
// Static
|
|
172
|
-
|
|
173
|
-
type User = Type.Static<typeof User> // type User = {
|
|
174
|
-
// id: string,
|
|
175
|
-
// name: string,
|
|
176
|
-
// email: string
|
|
177
|
-
// }
|
|
178
|
-
|
|
179
|
-
type UserUpdate = Type.Static<typeof UserUpdate> // type UserUpdate = {
|
|
180
|
-
// id: string,
|
|
181
|
-
// name?: string,
|
|
182
|
-
// email?: string
|
|
183
|
-
// }
|
|
184
|
-
|
|
185
|
-
|
|
152
|
+
// Runtime Reflection
|
|
153
|
+
Mesh.properties.geometry.properties.vertices.items.properties.position.properties.x
|
|
154
|
+
Mesh.properties.geometry.properties.vertices.items.properties.normal.properties.x
|
|
155
|
+
Mesh.properties.geometry.properties.vertices.items.properties.uv.properties.x
|
|
156
|
+
Mesh.properties.material.properties.diffuse.properties.x
|
|
157
|
+
Mesh.properties.material.properties.ambient.properties.x
|
|
158
|
+
Mesh.properties.material.properties.specular.properties.x
|
|
159
|
+
|
|
160
|
+
// Static Inference
|
|
161
|
+
function render(mesh: Type.Static<typeof Mesh>) {
|
|
162
|
+
mesh.geometry.vertices[0].position.x
|
|
163
|
+
mesh.geometry.vertices[0].normal.x
|
|
164
|
+
mesh.geometry.vertices[0].uv.x
|
|
165
|
+
mesh.material.diffuse.x
|
|
166
|
+
mesh.material.ambient.x
|
|
167
|
+
mesh.material.specular.x
|
|
168
|
+
}
|
|
186
169
|
```
|
|
187
170
|
|
|
188
171
|
<a name="Schema"></a>
|
|
189
172
|
|
|
190
173
|
## Schema
|
|
191
174
|
|
|
192
|
-
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/schema/overview) | [Example 1](https://www.typescriptlang.org/play
|
|
193
|
-
|
|
194
|
-
TypeBox includes a high-performance JSON Schema compiler with support for drafts 3 through to 2020-12. The compiler is designed to be a lightweight industry-grade alternative to Ajv and offers improved compilation and validation performance. The compiler also offers automatic fallback to dynamic checking in JIT-restricted environments such as Cloudflare Workers.
|
|
175
|
+
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/schema/overview) | [Example 1](https://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAZQMYAsCmICGcBmUIhwDkMAnmGgEYQAeA9AM6oaZEBQbddcAtH-wMFDhI0WPESenbgGECYYABs003pPUbNW-hyQQAdg3gBVBmihwAvImZYAdHPBK0ACgDebOHDIUAXMQhKACs0JBgiABpPODB8ClhgNAZ-Dy8vYAATFO9yNH8iIyhgfQBzIjgAXyi0uH1MEDy4Nxy-YkLissrqtJYlbJ9Ggpgi0sjcaCwYfN7FcoroquioNABHAFdgZay4AG1oryJMsf3iOobjmqIZ9i8AXTYKgEoOLjVtd4+P1QAFTCgzVSfIHAyS6AxGOBrMwWaymcx2X7-VzNGqotHouCvPSGeBQ8wpaKZfIANgArDgAIyYABMlAAzEgACwZUloYk4ADsmAAHJQAJxIAAMGQpYwx6Ne6W27VK3TOgzxUDF4pVqq8ktq9UaMpK3Rm+UVAAEMgRMMU7HoQOU1SqNfq4DqHo8bS7XajXhUrHA7D6gA) | [Example 2](https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAZQMYAsCmICGcBmUIhwDkMAnmGgEYQAeA9AM6oaZEBQokscAKuWrnyES-ajXZs6dOAFo58hYqXKVqteo0zJ0gMIEwwADZptszeYuWr8tmyQQAdg3gBVBmihwAvImZYAdHrgRmgAFHwU-gDylABWaEgwoQDebHBwwAAmAFy8-P4IMFDADgDmoQCUADRpcA6YIGi5EWgFRSXl1bUsRs35hcVlKbjQWDC5RD2GRHAAvhVs8wum1qtr61pScAAKmFDuKxtHx6q29k7wAK7unj5uHv67+2HJ6W-vH5-vW+fOcNceXKpdJZCYANgArDgAIyYABMlAAzEgACyZCFoME4ADsmAAHJQAJxIAAMmWhRCqX2pcC2IJycGcg1KNXS9UaEwBUEpNN5fO+0jZDSajPaZVZcCmnJuAAFMgRMCV-PYQDN+by6ZKsL1RczFhV1YajR8trNvHB-JagA)
|
|
195
176
|
|
|
196
|
-
|
|
177
|
+
TypeBox includes a high-performance JIT compiler that supports JSON Schema Draft 3 through to 2020-12. It is designed to be a lightweight industry-grade alternative to Ajv and offers improved compilation and validation performance. It also provides automatic fallback to dynamic validation in JIT restricted environments such as Cloudflare Workers.
|
|
197
178
|
|
|
198
|
-
The
|
|
179
|
+
The compiler is available via optional sub module import.
|
|
199
180
|
|
|
200
181
|
```typescript
|
|
201
182
|
import Schema from 'typebox/schema'
|
|
183
|
+
```
|
|
202
184
|
|
|
203
|
-
|
|
185
|
+
### Compile
|
|
204
186
|
|
|
205
|
-
|
|
206
|
-
id: Type.String(), // id: Type.TString;
|
|
207
|
-
name: Type.String(), // name: Type.TString;
|
|
208
|
-
email: Type.String({ format: 'email' }) // email: Type.TString;
|
|
209
|
-
})) // }>, { ... }>
|
|
187
|
+
The compiler accepts JSON Schema and returns Validator instances.
|
|
210
188
|
|
|
211
|
-
|
|
189
|
+
```typescript
|
|
190
|
+
const Vector = Schema.Compile(Type.Object({ // const Vector: Validator<TObject<{
|
|
191
|
+
x: Type.Number(), // x: TNumber
|
|
192
|
+
y: Type.Number(), // y: TNumber
|
|
193
|
+
z: Type.Number() // z: TNumber
|
|
194
|
+
})) // }>>
|
|
195
|
+
```
|
|
196
|
+
With JSON Schema
|
|
197
|
+
```typescript
|
|
198
|
+
const Vector = Schema.Compile({ // const Vector: Validator<{
|
|
199
|
+
type: 'object', // type: "object";
|
|
200
|
+
required: ['x', 'y', 'z'], // required: ["x", "y", "z"];
|
|
201
|
+
properties: { // properties: { ... };
|
|
202
|
+
x: { type: 'number' }, // }, { ... }>
|
|
203
|
+
y: { type: 'number' },
|
|
204
|
+
z: { type: 'number' }
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Validate
|
|
212
210
|
|
|
213
|
-
|
|
214
|
-
id: '65f1a2b3c4d5e6f7a8b9c0d1', // id: string,
|
|
215
|
-
name: 'user', // name: string,
|
|
216
|
-
email: 'user@domain.com' // email: string
|
|
217
|
-
}) // } = ...
|
|
211
|
+
Validator instances provide functions to Check and Parse values.
|
|
218
212
|
|
|
213
|
+
```typescript
|
|
214
|
+
const Vector = Schema.Compile(Type.Script(`{
|
|
215
|
+
x: number
|
|
216
|
+
y: number
|
|
217
|
+
z: number
|
|
218
|
+
}`))
|
|
219
|
+
|
|
220
|
+
const valid = Vector.Check({ // const valid: boolean
|
|
221
|
+
x: 1,
|
|
222
|
+
y: 0,
|
|
223
|
+
z: 0
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
const value = Vector.Parse({ // const value: {
|
|
227
|
+
x: 1, // x: number
|
|
228
|
+
y: 0, // y: number
|
|
229
|
+
z: 0 // z: number
|
|
230
|
+
}) // }
|
|
219
231
|
```
|
|
220
232
|
|
|
233
|
+
|
|
234
|
+
|
|
221
235
|
### Coverage
|
|
222
236
|
|
|
223
237
|
The following table shows specification coverage implemented by TypeBox.
|
|
@@ -281,29 +295,29 @@ The following table shows compile performance for various JSON Schema structures
|
|
|
281
295
|
┌──────────────────────┬─────────────┬─────────────┐
|
|
282
296
|
│ Compile │ TB1X │ AJV8 │
|
|
283
297
|
├──────────────────────┼─────────────┼─────────────┤
|
|
284
|
-
│ Boolean │
|
|
285
|
-
│ Number │
|
|
286
|
-
│ String │
|
|
287
|
-
│ Null │
|
|
288
|
-
│ Literal_String │
|
|
289
|
-
│ Literal_Number │
|
|
290
|
-
│ Literal_Boolean │
|
|
291
|
-
│ Pattern │
|
|
292
|
-
│ Object_Open │
|
|
293
|
-
│ Object_Close │
|
|
294
|
-
│ Object_Vector3 │
|
|
295
|
-
│ Object_Basis3 │
|
|
296
|
-
│ Intersect_And │
|
|
297
|
-
│ Intersect_Structural │
|
|
298
|
-
│ Union_Or │
|
|
299
|
-
│ Union_Structural │
|
|
300
|
-
│ Tuple_Values │
|
|
301
|
-
│ Tuple_Objects │
|
|
302
|
-
│ Array_Numbers_4 │
|
|
303
|
-
│ Array_Numbers_8 │
|
|
304
|
-
│ Array_Numbers_16 │
|
|
305
|
-
│ Array_Objects_Open │
|
|
306
|
-
│ Array_Objects_Close │
|
|
298
|
+
│ Boolean │ 39.7K ops/s │ 6.8K ops/s │
|
|
299
|
+
│ Number │ 86.2K ops/s │ 7.5K ops/s │
|
|
300
|
+
│ String │ 82.6K ops/s │ 8.2K ops/s │
|
|
301
|
+
│ Null │ 62K ops/s │ 7.3K ops/s │
|
|
302
|
+
│ Literal_String │ 72.1K ops/s │ 5.7K ops/s │
|
|
303
|
+
│ Literal_Number │ 72.7K ops/s │ 6.9K ops/s │
|
|
304
|
+
│ Literal_Boolean │ 80.9K ops/s │ 7K ops/s │
|
|
305
|
+
│ Pattern │ 38.7K ops/s │ 5.7K ops/s │
|
|
306
|
+
│ Object_Open │ 16.3K ops/s │ 1.3K ops/s │
|
|
307
|
+
│ Object_Close │ 15.7K ops/s │ 952 ops/s │
|
|
308
|
+
│ Object_Vector3 │ 40.2K ops/s │ 3.2K ops/s │
|
|
309
|
+
│ Object_Basis3 │ 16.1K ops/s │ 834 ops/s │
|
|
310
|
+
│ Intersect_And │ 45.7K ops/s │ 3.5K ops/s │
|
|
311
|
+
│ Intersect_Structural │ 21K ops/s │ 1.6K ops/s │
|
|
312
|
+
│ Union_Or │ 45.1K ops/s │ 3.4K ops/s │
|
|
313
|
+
│ Union_Structural │ 27.6K ops/s │ 2K ops/s │
|
|
314
|
+
│ Tuple_Values │ 14.7K ops/s │ 2K ops/s │
|
|
315
|
+
│ Tuple_Objects │ 3.7K ops/s │ 380 ops/s │
|
|
316
|
+
│ Array_Numbers_4 │ 73.6K ops/s │ 4.3K ops/s │
|
|
317
|
+
│ Array_Numbers_8 │ 50.9K ops/s │ 3.8K ops/s │
|
|
318
|
+
│ Array_Numbers_16 │ 85K ops/s │ 3.9K ops/s │
|
|
319
|
+
│ Array_Objects_Open │ 18.9K ops/s │ 789 ops/s │
|
|
320
|
+
│ Array_Objects_Close │ 17.9K ops/s │ 909 ops/s │
|
|
307
321
|
└──────────────────────┴─────────────┴─────────────┘
|
|
308
322
|
```
|
|
309
323
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/senpi",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.8.3",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
},
|
|
20
20
|
"./rpc-entry": {
|
|
21
21
|
"import": "./dist/rpc-entry.js"
|
|
22
|
+
},
|
|
23
|
+
"./client": {
|
|
24
|
+
"types": "./dist/client/index.d.ts",
|
|
25
|
+
"import": "./dist/client/index.js"
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
"files": [
|
|
@@ -30,9 +34,9 @@
|
|
|
30
34
|
],
|
|
31
35
|
"scripts": {
|
|
32
36
|
"clean": "shx rm -rf dist",
|
|
33
|
-
"dev": "
|
|
34
|
-
"build": "
|
|
35
|
-
"build:binary": "npm --prefix ../tui run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm run build && bun build --compile --compile-autoload-package-json --external=css-tree --no-compile-autoload-dotenv --minify --keep-names ./dist/bun/cli.js ./src/utils/image-resize-worker.ts --outfile dist/pi && npm run copy-binary-assets",
|
|
37
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
38
|
+
"build": "tsc -p tsconfig.build.json && npm run copy-assets && shx chmod +x dist/cli.js dist/rpc-entry.js && shx cp dist/cli.js dist/senpi && shx chmod +x dist/senpi",
|
|
39
|
+
"build:binary": "npm --prefix ../tui run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm --prefix ../protocol run build && npm --prefix ../client run build && npm run build && bun build --compile --compile-autoload-package-json --external=css-tree --no-compile-autoload-dotenv --minify --keep-names ./dist/bun/cli.js ./src/utils/image-resize-worker.ts --outfile dist/pi && npm run copy-binary-assets",
|
|
36
40
|
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
|
|
37
41
|
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/export-html/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx mkdir -p dist/node_modules && shx cp -r ../../node_modules/css-tree ../../node_modules/mdn-data ../../node_modules/source-map-js dist/node_modules/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/ && shx mkdir -p dist/native/darwin dist/native/win32 && shx cp -r ../../packages/tui/native/darwin/prebuilds dist/native/darwin/ && shx cp -r ../../packages/tui/native/win32/prebuilds dist/native/win32/ && node ../../scripts/copy-pty-native.mjs",
|
|
38
42
|
"qa:app-server": "node scripts/qa-app-server/run-all.mjs",
|
|
@@ -43,11 +47,13 @@
|
|
|
43
47
|
"dependencies": {
|
|
44
48
|
"@anthropic-ai/sdk": "0.91.1",
|
|
45
49
|
"@aws-sdk/client-bedrock-runtime": "3.1095.0",
|
|
46
|
-
"@code-yeongyu/senpi-codemode": "^2026.
|
|
47
|
-
"@earendil-works/pi-agent-core": "npm:@code-yeongyu/senpi-agent-core@^2026.
|
|
48
|
-
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@^2026.
|
|
49
|
-
"@earendil-works/pi-
|
|
50
|
-
"@earendil-works/pi-
|
|
50
|
+
"@code-yeongyu/senpi-codemode": "^2026.8.3",
|
|
51
|
+
"@earendil-works/pi-agent-core": "npm:@code-yeongyu/senpi-agent-core@^2026.8.3",
|
|
52
|
+
"@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@^2026.8.3",
|
|
53
|
+
"@earendil-works/pi-client": "^2026.8.3",
|
|
54
|
+
"@earendil-works/pi-protocol": "^2026.8.3",
|
|
55
|
+
"@earendil-works/pi-pty": "npm:@code-yeongyu/senpi-pty@^2026.8.3",
|
|
56
|
+
"@earendil-works/pi-tui": "npm:@code-yeongyu/senpi-tui@^2026.8.3",
|
|
51
57
|
"@mistralai/mistralai": "2.5.0",
|
|
52
58
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
53
59
|
"@mozilla/readability": "0.6.0",
|
|
@@ -129,6 +135,8 @@
|
|
|
129
135
|
"@csstools/css-tokenizer",
|
|
130
136
|
"@earendil-works/pi-agent-core",
|
|
131
137
|
"@earendil-works/pi-ai",
|
|
138
|
+
"@earendil-works/pi-client",
|
|
139
|
+
"@earendil-works/pi-protocol",
|
|
132
140
|
"@earendil-works/pi-pty",
|
|
133
141
|
"@earendil-works/pi-tui",
|
|
134
142
|
"@exodus/bytes",
|
|
@@ -375,7 +383,7 @@
|
|
|
375
383
|
"@types/turndown": "5.0.6",
|
|
376
384
|
"@types/ws": "8.18.1",
|
|
377
385
|
"shx": "0.4.0",
|
|
378
|
-
"typescript": "
|
|
386
|
+
"typescript": "7.0.2",
|
|
379
387
|
"vitest": "4.1.10"
|
|
380
388
|
},
|
|
381
389
|
"keywords": [
|
|
@@ -442,6 +450,8 @@
|
|
|
442
450
|
"@csstools/css-tokenizer",
|
|
443
451
|
"@earendil-works/pi-agent-core",
|
|
444
452
|
"@earendil-works/pi-ai",
|
|
453
|
+
"@earendil-works/pi-client",
|
|
454
|
+
"@earendil-works/pi-protocol",
|
|
445
455
|
"@earendil-works/pi-pty",
|
|
446
456
|
"@earendil-works/pi-tui",
|
|
447
457
|
"@exodus/bytes",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-lane.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/auth-lane.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAM7D,OAAO,EAQN,KAAK,aAAa,EAClB,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,8BAA8B,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAYvE,KAAK,gBAAgB,GAAG;IACvB,WAAW,EAAE,MAAM,eAAe,CAAC;IACnC,GAAG,EAAE,MAAM,MAAM,CAAC,UAAU,CAAC;IAC7B,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,SAAS,EAAE,aAAa,CAAC;CACzB,CAAC;AAiBF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAElF;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,MAAM,MAAM,uBAAuB,GAAG;IACrC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1C,KAAK,EAAE,QAAQ,CAAC;IAChB,YAAY,EAAE,CAAC,IAAI,EAAE,4BAA4B,KAAK,OAAO,CAAC;IAC9D,gBAAgB,EAAE,8BAA8B,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC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I,EAAE,IAAI,CAAC,CAAC;YAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;YAC7D,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;YACvB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;QACD,QAAQ,EAAE,gBAAgB;QAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,UAAU,EAAE,4BAA4B;QACxC,GAAG,EAAE,cAAc,CAAC,GAAG;QACvB,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,iBAAiB;QACjC,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,EAAE,EAAE;YACxD,2BAA2B,CAAC,4BAA4B,CAAC,CAAC;YAC1D,IAAI,WAAW,EAAE,CAAC;gBACjB,2BAA2B,CAC1B,4BAA4B,EAC5B,OAAO,CAAC,IAAI,EACZ,WAAW,CAAC,IAAI,EAChB,cAAc,CAAC,IAAI,CACnB,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { chmodSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { CredentialStore } from \"@earendil-works/pi-ai\";\nimport { loadAnthropicOAuth } from \"@earendil-works/pi-ai/oauth\";\nimport { getAgentDir } from \"../../../../config.ts\";\nimport { AuthStorage } from \"../../../auth-storage.ts\";\nimport { emitProviderAccountFailover, emitProviderAccountsChanged } from \"./account-events.ts\";\nimport { CLAUDE_AGENT_SDK_PROVIDER_ID } from \"./account-management.ts\";\nimport {\n\ttype AccountSlot,\n\tassertValidAccountName,\n\ttype ClaudeAgentSdkCredential,\n\temptyCredential,\n\tenvSlotToken,\n\tlistAccounts,\n\trefreshSlot,\n\ttype SlotRefresher,\n} from \"./accounts.ts\";\nimport { selectAccount } from \"./affinity.ts\";\nimport { classifySdkError } from \"./errors.ts\";\nimport { runFailover } from \"./failover.ts\";\nimport type { Options, SDKMessage, SdkQuery } from \"./sdk-boundary.ts\";\nimport type { ClaudeAgentSdkProviderSettings, ClaudeAgentSdkTokenInjection } from \"./settings.ts\";\n\nexport { CLAUDE_AGENT_SDK_PROVIDER_ID } from \"./account-management.ts\";\n\nconst EXPIRING_WITHIN_MS = 5 * 60_000;\nconst CLI_OAUTH_SCOPES = [\n\t\"org:create_api_key\",\n\t\"user:profile\",\n\t\"user:inference\",\n\t\"user:sessions:claude_code\",\n\t\"user:mcp_servers\",\n\t\"user:file_upload\",\n] as const;\n\ntype AuthLaneBoundary = {\n\tcreateStore: () => CredentialStore;\n\tenv: () => NodeJS.ProcessEnv;\n\tgetAgentDir: () => string;\n\tnow: () => number;\n\trefresher: SlotRefresher;\n};\n\nasync function refreshWithAnthropicOAuth(refresh: string) {\n\tconst oauth = await loadAnthropicOAuth();\n\tconst credential = await oauth.refresh({ type: \"oauth\", access: \"\", refresh, expires: 0 });\n\treturn { access: credential.access, refresh: credential.refresh, expires: credential.expires };\n}\n\nconst defaultBoundary: AuthLaneBoundary = {\n\tcreateStore: () => AuthStorage.create(),\n\tenv: () => process.env,\n\tgetAgentDir,\n\tnow: () => Date.now(),\n\trefresher: refreshWithAnthropicOAuth,\n};\nlet activeBoundary = defaultBoundary;\n\nexport function overrideAuthLaneBoundary(override: Partial<AuthLaneBoundary>): void {\n\tactiveBoundary = { ...activeBoundary, ...override };\n}\n\nexport function resetAuthLaneBoundary(): void {\n\tactiveBoundary = defaultBoundary;\n}\n\nexport type AuthenticatedQueryInput = {\n\tprompt: Parameters<SdkQuery>[0][\"prompt\"];\n\tquery: SdkQuery;\n\tbuildOptions: (lane: ClaudeAgentSdkTokenInjection) => Options;\n\tproviderSettings: ClaudeAgentSdkProviderSettings;\n\tsessionId?: string;\n\t/** Request-scoped CLI pin; takes precedence over persistent settings and account pins. */\n\tpinnedAccount?: string;\n\tonQuery?: (query: ReturnType<SdkQuery>) => void;\n};\n\ntype ManagedPool = {\n\taccounts: AccountSlot[];\n\tlane: Exclude<ClaudeAgentSdkTokenInjection, \"ambient\">;\n\tpinnedAccount?: string;\n\tstore: CredentialStore;\n};\n\nfunction managedEnvironment(parent: NodeJS.ProcessEnv): Record<string, string | undefined> {\n\tconst {\n\t\tANTHROPIC_API_KEY: _apiKey,\n\t\tANTHROPIC_AUTH_TOKEN: _authToken,\n\t\tANTHROPIC_BASE_URL: _gateway,\n\t\tANTHROPIC_CUSTOM_HEADERS: _customHeaders,\n\t\tCLAUDE_CODE_OAUTH_TOKEN: _oauthToken,\n\t\tCLAUDE_CODE_USE_BEDROCK: _bedrock,\n\t\tCLAUDE_CODE_USE_FOUNDRY: _foundry,\n\t\tCLAUDE_CODE_USE_GATEWAY: _gatewayMode,\n\t\tCLAUDE_CODE_USE_VERTEX: _vertex,\n\t\t...environment\n\t} = parent;\n\tfor (const name of Object.keys(environment)) {\n\t\tif (/^CLAUDE_CODE_OAUTH_TOKEN_\\d+$/.test(name)) delete environment[name];\n\t}\n\treturn environment;\n}\n\nfunction configDirectory(slot: AccountSlot): string {\n\tassertValidAccountName(slot.name);\n\treturn join(activeBoundary.getAgentDir(), \"claude-agent-sdk-accounts\", slot.name);\n}\n\nfunction writeConfigCredentials(directory: string, slot: AccountSlot, access: string): void {\n\tmkdirSync(directory, { recursive: true, mode: 0o700 });\n\tchmodSync(directory, 0o700);\n\twriteFileSync(\n\t\tjoin(directory, \".credentials.json\"),\n\t\tJSON.stringify({\n\t\t\tclaudeAiOauth: {\n\t\t\t\taccessToken: access,\n\t\t\t\trefreshToken: slot.refresh,\n\t\t\t\texpiresAt: slot.expires,\n\t\t\t\tscopes: CLI_OAUTH_SCOPES,\n\t\t\t},\n\t\t}),\n\t\t{ encoding: \"utf8\", mode: 0o600 },\n\t);\n}\n\nasync function managedPool(settings: ClaudeAgentSdkProviderSettings): Promise<ManagedPool | undefined> {\n\tconst lane = settings.tokenInjection ?? \"ambient\";\n\tif (lane === \"ambient\") return undefined;\n\tconst store = activeBoundary.createStore();\n\tlet credential = await store.read(CLAUDE_AGENT_SDK_PROVIDER_ID);\n\tconst environment = activeBoundary.env();\n\tlet accounts = listAccounts(\n\t\t(credential as ClaudeAgentSdkCredential | undefined) ?? emptyCredential(),\n\t\t(name) => environment[name],\n\t);\n\tif (!credential && accounts.length > 0) {\n\t\tcredential = await store.modify(CLAUDE_AGENT_SDK_PROVIDER_ID, async () => emptyCredential());\n\t\taccounts = listAccounts(\n\t\t\t(credential as ClaudeAgentSdkCredential) ?? emptyCredential(),\n\t\t\t(name) => environment[name],\n\t\t);\n\t}\n\tif (accounts.length === 0) return undefined;\n\tconst stored = credential?.type === \"oauth\" ? (credential as ClaudeAgentSdkCredential) : undefined;\n\treturn { accounts, lane, pinnedAccount: settings.pinnedAccount ?? stored?.pinned, store };\n}\n\nasync function prepareSlot(pool: ManagedPool, selected: AccountSlot): Promise<Record<string, string | undefined>> {\n\tconst environment = activeBoundary.env();\n\tconst slot = selected;\n\tif (slot.source !== \"env\" && activeBoundary.now() >= slot.expires - EXPIRING_WITHIN_MS) {\n\t\ttry {\n\t\t\tconst refreshed = await refreshSlot(\n\t\t\t\tpool.store,\n\t\t\t\tCLAUDE_AGENT_SDK_PROVIDER_ID,\n\t\t\t\tslot.name,\n\t\t\t\tactiveBoundary.refresher,\n\t\t\t\t(expires) => activeBoundary.now() >= expires - EXPIRING_WITHIN_MS,\n\t\t\t);\n\t\t\tconst credential = refreshed?.type === \"oauth\" ? (refreshed as ClaudeAgentSdkCredential) : undefined;\n\t\t\tconst updated = listAccounts(credential ?? emptyCredential(), (name) => environment[name]).find(\n\t\t\t\t(candidate) => candidate.name === slot.name,\n\t\t\t);\n\t\t\tif (!updated) throw new Error(\"selected account disappeared during refresh\");\n\t\t\tObject.assign(slot, updated);\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tthrow new Error(`authentication_failed: ${detail}`);\n\t\t}\n\t}\n\tconst access = slot.source === \"env\" ? envSlotToken((name) => environment[name], slot.name) : slot.access;\n\tif (!access) throw new Error(\"authentication_failed: selected OAuth token is unavailable\");\n\tconst childEnvironment = managedEnvironment(environment);\n\tif (pool.lane === \"oauth-slots\") return { ...childEnvironment, CLAUDE_CODE_OAUTH_TOKEN: access };\n\tconst directory = configDirectory(slot);\n\twriteConfigCredentials(directory, slot, access);\n\treturn { ...childEnvironment, CLAUDE_CONFIG_DIR: directory };\n}\n\nfunction sdkFailure(message: SDKMessage): unknown | undefined {\n\tif (message.type === \"assistant\" && message.error) return message.error;\n\tif (message.type === \"result\" && message.subtype !== \"success\") {\n\t\tconst errors = \"errors\" in message && Array.isArray(message.errors) ? (message.errors as unknown[]) : [];\n\t\tif (errors.length > 0) return new Error(String(errors[0]));\n\t\t// `subtype` alone is too coarse to classify: a subscription limit and an\n\t\t// ordinary tool failure both arrive as \"error_during_execution\". The SDK\n\t\t// carries the real cause in `terminal_reason` (e.g. \"blocking_limit\"), so\n\t\t// append it — otherwise classifySdkError() scores every result error as\n\t\t// non-retryable \"other\", the exhausted account is never blocked, and a\n\t\t// multi-account pool never rotates past it.\n\t\tconst reason =\n\t\t\t\"terminal_reason\" in message && typeof message.terminal_reason === \"string\" ? message.terminal_reason : \"\";\n\t\treturn new Error(reason ? `Claude Code ${message.subtype}: ${reason}` : `Claude Code ${message.subtype}`);\n\t}\n\treturn undefined;\n}\n\nfunction visibleSdkMessage(message: SDKMessage): boolean {\n\tif (message.type !== \"stream_event\") return false;\n\treturn /^(?:content_block_start|content_block_delta|content_block_stop)$/.test(message.event.type);\n}\n\nasync function* messagesFrom(query: ReturnType<SdkQuery>): AsyncGenerator<SDKMessage> {\n\ttry {\n\t\tfor await (const message of query) yield message;\n\t} finally {\n\t\tquery.close();\n\t}\n}\n\n/** Resolves managed OAuth immediately before each subprocess spawn and retries only pre-delta failures. */\nexport async function* queryWithAuthLane(input: AuthenticatedQueryInput): AsyncGenerator<SDKMessage> {\n\tconst pool = await managedPool(input.providerSettings);\n\tif (!pool) {\n\t\tconst query = input.query({ prompt: input.prompt, options: input.buildOptions(\"ambient\") });\n\t\tinput.onQuery?.(query);\n\t\tyield* messagesFrom(query);\n\t\treturn;\n\t}\n\tyield* runFailover({\n\t\taccounts: pool.accounts,\n\t\tselectFn: (accounts) =>\n\t\t\tselectAccount(accounts, {\n\t\t\t\tsessionId: input.sessionId,\n\t\t\t\tpinnedAccount: input.pinnedAccount ?? pool.pinnedAccount,\n\t\t\t\tnow: activeBoundary.now(),\n\t\t\t}),\n\t\trunAttempt: async (slot) => {\n\t\t\tconst options = input.buildOptions(pool.lane);\n\t\t\toptions.env = await prepareSlot(pool, slot);\n\t\t\tconst query = input.query({ prompt: input.prompt, options });\n\t\t\tinput.onQuery?.(query);\n\t\t\treturn messagesFrom(query);\n\t\t},\n\t\tclassify: classifySdkError,\n\t\tstore: pool.store,\n\t\tproviderId: CLAUDE_AGENT_SDK_PROVIDER_ID,\n\t\tnow: activeBoundary.now,\n\t\terrorFromEvent: sdkFailure,\n\t\tisVisibleDelta: visibleSdkMessage,\n\t\tonFailover: ({ account, nextAccount, classification }) => {\n\t\t\temitProviderAccountsChanged(CLAUDE_AGENT_SDK_PROVIDER_ID);\n\t\t\tif (nextAccount) {\n\t\t\t\temitProviderAccountFailover(\n\t\t\t\t\tCLAUDE_AGENT_SDK_PROVIDER_ID,\n\t\t\t\t\taccount.name,\n\t\t\t\t\tnextAccount.name,\n\t\t\t\t\tclassification.kind,\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t});\n}\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SdkErrorKind } from "./errors.ts";
|
|
2
|
-
export declare function noAccountGuidance(hasAnthropicCredential: boolean): string;
|
|
3
|
-
export declare function allAccountsBlockedGuidance(soonestUnblockAt: number | undefined): string;
|
|
4
|
-
export declare function sdkErrorGuidance(kind: SdkErrorKind): string | undefined;
|
|
5
|
-
export declare function missingBinaryGuidance(platform: string, arch: string): string;
|
|
6
|
-
//# sourceMappingURL=guidance.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/guidance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,wBAAgB,iBAAiB,CAAC,sBAAsB,EAAE,OAAO,GAAG,MAAM,CAazE;AAED,wBAAgB,0BAA0B,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAWvF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAWvE;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAK5E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guidance.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/guidance.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAEpC,MAAM,UAAU,iBAAiB,CAAC,sBAA+B;IAChE,MAAM,KAAK,GAAG;QACb,oCAAoC,QAAQ,GAAG;QAC/C,YAAY,QAAQ,mDAAmD;KACvE,CAAC;IACF,IAAI,sBAAsB,EAAE,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;IACpF,CAAC;IACD,KAAK,CAAC,IAAI,CACT,kEAAkE,EAClE,mDAAmD,CACnD,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,gBAAoC;IAC9E,MAAM,GAAG,GACR,gBAAgB,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAClE,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE;QAC1C,CAAC,CAAC,gBAAgB,CAAC;IACrB,OAAO;QACN,2BAA2B,QAAQ,qDAAqD;QACxF,8BAA8B,GAAG,GAAG;QACpC,kDAAkD;QAClD,YAAY,QAAQ,yBAAyB;KAC7C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAkB;IAClD,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,iBAAiB;YACrB,OAAO,kJAAkJ,CAAC;QAC3J,KAAK,SAAS;YACb,OAAO,qIAAqI,CAAC;QAC9I,KAAK,YAAY;YAChB,OAAO,yDAAyD,QAAQ,2EAA2E,CAAC;QACrJ;YACC,OAAO,SAAS,CAAC;IACnB,CAAC;AACF,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,QAAgB,EAAE,IAAY;IACnE,OAAO;QACN,sCAAsC,QAAQ,IAAI,IAAI,GAAG;QACzD,kGAAkG;KAClG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC","sourcesContent":["import type { SdkErrorKind } from \"./errors.ts\";\n\nconst PROVIDER = \"claude-agent-sdk\";\n\nexport function noAccountGuidance(hasAnthropicCredential: boolean): string {\n\tconst lines = [\n\t\t`No Claude account configured for ${PROVIDER}.`,\n\t\t` /login ${PROVIDER} - sign in with your Claude Pro/Max subscription`,\n\t];\n\tif (hasAnthropicCredential) {\n\t\tlines.push(\" (your existing Anthropic OAuth login will be offered as an import)\");\n\t}\n\tlines.push(\n\t\t\" Or set CLAUDE_CODE_OAUTH_TOKEN (and _2.._N for more accounts),\",\n\t\t\" or log in with the claude CLI for ambient auth.\",\n\t);\n\treturn lines.join(\"\\n\");\n}\n\nexport function allAccountsBlockedGuidance(soonestUnblockAt: number | undefined): string {\n\tconst eta =\n\t\tsoonestUnblockAt !== undefined && Number.isFinite(soonestUnblockAt)\n\t\t\t? new Date(soonestUnblockAt).toISOString()\n\t\t\t: \"after re-login\";\n\treturn [\n\t\t`All Claude accounts for ${PROVIDER} are currently blocked (rate limit or auth errors).`,\n\t\t` Soonest automatic retry: ${eta}.`,\n\t\t` /claude-account list - inspect account states`,\n\t\t` /login ${PROVIDER} - add another account`,\n\t].join(\"\\n\");\n}\n\nexport function sdkErrorGuidance(kind: SdkErrorKind): string | undefined {\n\tswitch (kind) {\n\t\tcase \"org_not_allowed\":\n\t\t\treturn \"This organization's policy disallows subscription OAuth use here. Use an API key (ANTHROPIC_API_KEY) or an account from an allowed organization.\";\n\t\tcase \"billing\":\n\t\t\treturn \"The selected Claude account has a billing problem. Check the plan at claude.com or switch accounts with /claude-account pin <name>.\";\n\t\tcase \"auth_error\":\n\t\t\treturn `The account's OAuth token was rejected. Re-run /login ${PROVIDER} to refresh it, or remove the account with /claude-account remove <name>.`;\n\t\tdefault:\n\t\t\treturn undefined;\n\t}\n}\n\nexport function missingBinaryGuidance(platform: string, arch: string): string {\n\treturn [\n\t\t`Claude native binary not found for ${platform}-${arch}.`,\n\t\t\"Reinstall @anthropic-ai/claude-agent-sdk without --omit=optional, or set CLAUDE_CODE_EXECUTABLE.\",\n\t].join(\"\\n\");\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AA2BvE,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAkBtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,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,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAAgB;IAC/D,4BAA4B,CAAC,EAAE,CAAC,CAAC;IACjC,EAAE,CAAC,gBAAgB,CAAC,4BAA4B,EAAE;QACjD,OAAO,EAAE,4BAA4B;QACrC,GAAG,EAAE,4BAA4B;QACjC,MAAM,EAAE,0BAA0B;QAClC,MAAM,EAAE,MAAM;QACd,YAAY,EAAE,oBAAoB;QAClC,KAAK,EAAE,iBAAiB,CAAC;YACxB,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,oBAAoB,CAAC,4BAA4B,CAAC;YAC3E,uBAAuB,EAAE,KAAK,IAAI,EAAE;gBACnC,MAAM,UAAU,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;gBACrD,OAAO,UAAU,IAAI,OAAO,UAAU,CAAC,MAAM,KAAK,QAAQ;oBACzD,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE;oBACzF,CAAC,CAAC,SAAS,CAAC;YACd,CAAC;SACD,CAAC;KACF,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { getModels } from \"@earendil-works/pi-ai/compat\";\nimport { getAgentDir } from \"../../../../config.ts\";\nimport type { ExtensionAPI } from \"../../types.ts\";\nimport { registerClaudeAccountCommand } from \"./account-command.ts\";\nimport { CLAUDE_AGENT_SDK_PROVIDER_ID } from \"./account-management.ts\";\nimport type { ClaudeAgentSdkCredential } from \"./accounts.ts\";\nimport { createOAuthConfig } from \"./oauth-login.ts\";\nimport { streamClaudeAgentSdk } from \"./stream.ts\";\n\nexport { CLAUDE_AGENT_SDK_PROVIDER_ID } from \"./account-management.ts\";\n\nconst MODELS = getModels(\"anthropic\").map((model) => ({\n\tid: model.id,\n\tname: model.name,\n\treasoning: model.reasoning,\n\tinput: model.input,\n\tcost: model.cost,\n\tcontextWindow: model.contextWindow,\n\tmaxTokens: model.maxTokens,\n\tthinkingLevelMap: {\n\t\t...model.thinkingLevelMap,\n\t\tminimal: null,\n\t},\n}));\n\nfunction readStoredCredential(providerId: string): ClaudeAgentSdkCredential | undefined {\n\tconst authPath = join(getAgentDir(), \"auth.json\");\n\tif (!existsSync(authPath)) return undefined;\n\ttry {\n\t\tconst data = JSON.parse(readFileSync(authPath, \"utf8\")) as Record<string, ClaudeAgentSdkCredential>;\n\t\treturn data[providerId];\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nexport default function claudeAgentSdkExtension(pi: ExtensionAPI): void {\n\tregisterClaudeAccountCommand(pi);\n\tpi.registerProvider(CLAUDE_AGENT_SDK_PROVIDER_ID, {\n\t\tbaseUrl: CLAUDE_AGENT_SDK_PROVIDER_ID,\n\t\tapi: CLAUDE_AGENT_SDK_PROVIDER_ID,\n\t\tapiKey: \"claude-agent-sdk-managed\",\n\t\tmodels: MODELS,\n\t\tstreamSimple: streamClaudeAgentSdk,\n\t\toauth: createOAuthConfig({\n\t\t\treadCurrent: async () => readStoredCredential(CLAUDE_AGENT_SDK_PROVIDER_ID),\n\t\t\treadAnthropicCredential: async () => {\n\t\t\t\tconst credential = readStoredCredential(\"anthropic\");\n\t\t\t\treturn credential && typeof credential.access === \"string\"\n\t\t\t\t\t? { access: credential.access, refresh: credential.refresh, expires: credential.expires }\n\t\t\t\t\t: undefined;\n\t\t\t},\n\t\t}),\n\t});\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-login.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/oauth-login.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAEN,U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CAAC;aACD,CAAC;YACF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,kBAAkB,EAAE,CAAC,CAAC;YAC5D,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAEjD,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;YAC5C,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;YAC/D,OAAO,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QAC/D,CAAC;QAED,KAAK,CAAC,YAAY,CAAC,WAAW;YAC7B,OAAO,WAAW,CAAC;QACpB,CAAC;QAED,SAAS,CAAC,YAAY;YACrB,OAAO,qBAAqB,CAAC,MAAM,CAAC;QACrC,CAAC;KACD,CAAC;AACH,CAAC","sourcesContent":["import type { AuthInteraction, OAuthAuth, OAuthCredentials } from \"@earendil-works/pi-ai\";\nimport { loadAnthropicOAuth } from \"@earendil-works/pi-ai/oauth\";\nimport {\n\ttype AccountSlot,\n\taddAccount,\n\ttype ClaudeAgentSdkCredential,\n\temptyCredential,\n\tlistAccounts,\n\tSENTINEL_OAUTH_FIELDS,\n} from \"./accounts.ts\";\n\nexport type OAuthLoginCallbacks = {\n\tsignal?: AbortSignal;\n\tonAuth?: (event: { url: string }) => void | Promise<void>;\n\tonPrompt?: (prompt: { message: string; placeholder?: string }) => Promise<string>;\n\tonManualCodeInput?: () => Promise<string>;\n\tonProgress?: (message: string) => void;\n};\n\nexport type CurrentCredentialReader = () => Promise<ClaudeAgentSdkCredential | undefined>;\n\nexport type OAuthConfigShape = {\n\tname: string;\n\tlogin(callbacks: OAuthLoginCallbacks): Promise<OAuthCredentials>;\n\trefreshToken(credentials: OAuthCredentials): Promise<OAuthCredentials>;\n\tgetApiKey(credentials: OAuthCredentials): string;\n};\n\nexport const CLAUDE_AGENT_SDK_OAUTH_NAME = \"Claude Agent SDK (Claude Pro/Max)\";\n\nfunction toSlot(\n\tcredential: { access: string; refresh: string; expires: number },\n\tname: string,\n\tsource: AccountSlot[\"source\"],\n): AccountSlot {\n\treturn { name, access: credential.access, refresh: credential.refresh, expires: credential.expires, source };\n}\n\nasync function promptAccountName(callbacks: OAuthLoginCallbacks, existing: AccountSlot[]): Promise<string> {\n\tif (existing.length === 0) return \"default\";\n\tif (!callbacks.onPrompt) return `account-${existing.length + 1}`;\n\tconst answer = (\n\t\tawait callbacks.onPrompt({\n\t\t\tmessage: `Name for this account (existing: ${existing.map((slot) => slot.name).join(\", \")})`,\n\t\t\tplaceholder: `account-${existing.length + 1}`,\n\t\t})\n\t).trim();\n\treturn answer || `account-${existing.length + 1}`;\n}\n\nexport function createOAuthConfig(deps: {\n\treadCurrent: CurrentCredentialReader;\n\treadAnthropicCredential?: () => Promise<{ access: string; refresh: string; expires: number } | undefined>;\n\tloginFlow?: OAuthAuth;\n}): OAuthConfigShape {\n\treturn {\n\t\tname: CLAUDE_AGENT_SDK_OAUTH_NAME,\n\n\t\tasync login(callbacks) {\n\t\t\tconst current = (await deps.readCurrent()) ?? emptyCredential();\n\t\t\tconst existing = listAccounts(current);\n\t\t\tif (existing.length === 0 && deps.readAnthropicCredential && callbacks.onPrompt) {\n\t\t\t\tconst imported = await deps.readAnthropicCredential();\n\t\t\t\tif (imported) {\n\t\t\t\t\tconst answer = (\n\t\t\t\t\t\tawait callbacks.onPrompt({\n\t\t\t\t\t\t\tmessage: \"An Anthropic OAuth login already exists. Import it instead of a new login? [y/N]\",\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t.toLowerCase();\n\t\t\t\t\tif (answer === \"y\" || answer === \"yes\") {\n\t\t\t\t\t\treturn addAccount(current, toSlot(imported, \"imported-anthropic\", \"import\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst interaction: AuthInteraction = {\n\t\t\t\tsignal: callbacks.signal,\n\t\t\t\tprompt: async (prompt) => {\n\t\t\t\t\tif (prompt.type === \"select\") return \"\";\n\t\t\t\t\treturn callbacks.onPrompt ? callbacks.onPrompt({ message: prompt.message }) : \"\";\n\t\t\t\t},\n\t\t\t\tnotify: (event) => {\n\t\t\t\t\tif (event.type === \"auth_url\" && callbacks.onAuth) void callbacks.onAuth({ url: event.url });\n\t\t\t\t\tif (event.type === \"progress\" && callbacks.onProgress) callbacks.onProgress(event.message);\n\t\t\t\t},\n\t\t\t};\n\t\t\tconst flow = deps.loginFlow ?? (await loadAnthropicOAuth());\n\t\t\tconst credential = await flow.login(interaction);\n\n\t\t\tconst existingAfter = listAccounts(current);\n\t\t\tconst name = await promptAccountName(callbacks, existingAfter);\n\t\t\treturn addAccount(current, toSlot(credential, name, \"login\"));\n\t\t},\n\n\t\tasync refreshToken(credentials) {\n\t\t\treturn credentials;\n\t\t},\n\n\t\tgetApiKey(_credentials) {\n\t\t\treturn SENTINEL_OAUTH_FIELDS.access;\n\t\t},\n\t};\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Api, Context, Model, SimpleStreamOptions } from "@earendil-works/pi-ai";
|
|
2
|
-
import type { Options } from "./sdk-boundary.ts";
|
|
3
|
-
import { type ClaudeAgentSdkProviderSettings, type ClaudeAgentSdkTokenInjection } from "./settings.ts";
|
|
4
|
-
export type ClaudeAgentSdkAuthLane = ClaudeAgentSdkTokenInjection;
|
|
5
|
-
export interface ClaudeAgentSdkQueryOptionsInput {
|
|
6
|
-
readonly model: Model<Api>;
|
|
7
|
-
readonly context: Context;
|
|
8
|
-
readonly streamOptions?: SimpleStreamOptions;
|
|
9
|
-
readonly cwd?: string;
|
|
10
|
-
readonly providerSettings?: ClaudeAgentSdkProviderSettings;
|
|
11
|
-
readonly authLane?: ClaudeAgentSdkAuthLane;
|
|
12
|
-
readonly tools?: readonly string[];
|
|
13
|
-
readonly pathToClaudeCodeExecutable?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare function buildClaudeAgentSdkQueryOptions(input: ClaudeAgentSdkQueryOptionsInput): Options;
|
|
16
|
-
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAGN,0CAA0C,GAC1C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAenF,MAAM,+BAA+B,GAAG;IACvC,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,SAAS;IACT,UAAU;CACD,CAAC;AAEX,MAAM,iCAAiC,GAAG;IACzC,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,SAAS;IACT,UAAU;CACD,CAAC;AAEX,MAAM,wBAAwB,GAA8B;IAC3D,OAAO,EAAE,IAAI;IACb,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,KAAK;CACV,CAAC;AAEF,SAAS,mBAAmB,CAAC,KAAiB,EAAE,OAA0B;IACzE,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC;IAClC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,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KAAK,CAAC,aAAa,EAAE,SAAS,CAAC;IACjD,IAAI,SAAS,IAAI,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACxD,YAAY,CAAC,QAAQ,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAA2B,CAAC;QAC7F,YAAY,CAAC,MAAM,GAAG,wBAAwB,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACxE,CAAC;SAAM,IAAI,SAAS,EAAE,CAAC;QACtB,YAAY,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;IACrG,CAAC;IACD,OAAO,YAAY,CAAC;AACrB,CAAC","sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport { dirname, join, relative, resolve } from \"node:path\";\nimport type { Api, Context, Model, SimpleStreamOptions, ThinkingBudgets, ThinkingLevel } from \"@earendil-works/pi-ai\";\nimport { CONFIG_DIR_NAME, getAgentDir } from \"../../../../config.ts\";\nimport type { EffortLevel, Options, SettingSource, ThinkingConfig } from \"./sdk-boundary.ts\";\nimport {\n\ttype ClaudeAgentSdkProviderSettings,\n\ttype ClaudeAgentSdkTokenInjection,\n\tloadClaudeAgentSdkProviderSettingsFromDisk,\n} from \"./settings.ts\";\nimport { BUILTIN_SDK_TOOLS, canUseTool, HOST_TOOL_DENIAL_HOOKS } from \"./tools.ts\";\n\nexport type ClaudeAgentSdkAuthLane = ClaudeAgentSdkTokenInjection;\n\nexport interface ClaudeAgentSdkQueryOptionsInput {\n\treadonly model: Model<Api>;\n\treadonly context: Context;\n\treadonly streamOptions?: SimpleStreamOptions;\n\treadonly cwd?: string;\n\treadonly providerSettings?: ClaudeAgentSdkProviderSettings;\n\treadonly authLane?: ClaudeAgentSdkAuthLane;\n\treadonly tools?: readonly string[];\n\treadonly pathToClaudeCodeExecutable?: string;\n}\n\nconst ADAPTIVE_THINKING_MODEL_MARKERS = [\n\t\"opus-4-6\",\n\t\"opus-4.6\",\n\t\"opus-4-7\",\n\t\"opus-4.7\",\n\t\"opus-4-8\",\n\t\"opus-4.8\",\n\t\"opus-5\",\n\t\"sonnet-4-6\",\n\t\"sonnet-4.6\",\n\t\"sonnet-5\",\n\t\"fable-5\",\n\t\"mythos-5\",\n] as const;\n\nconst NATIVE_XHIGH_EFFORT_MODEL_MARKERS = [\n\t\"opus-4-7\",\n\t\"opus-4-8\",\n\t\"opus-5\",\n\t\"sonnet-5\",\n\t\"fable-5\",\n\t\"mythos-5\",\n] as const;\n\nconst DEFAULT_THINKING_BUDGETS: Required<ThinkingBudgets> = {\n\tminimal: 2048,\n\tlow: 8192,\n\tmedium: 16384,\n\thigh: 31999,\n\tmax: 63999,\n};\n\nfunction includesModelMarker(model: Model<Api>, markers: readonly string[]): boolean {\n\tconst id = model.id.toLowerCase();\n\treturn markers.some((marker) => id.includes(marker));\n}\n\nfunction forcedAdaptiveThinking(model: Model<Api>): boolean | undefined {\n\tconst compat = model.compat;\n\tif (!compat || !(\"forceAdaptiveThinking\" in compat)) return undefined;\n\treturn typeof compat.forceAdaptiveThinking === \"boolean\" ? compat.forceAdaptiveThinking : undefined;\n}\n\nfunction supportsAdaptiveThinking(model: Model<Api>): boolean {\n\treturn forcedAdaptiveThinking(model) ?? includesModelMarker(model, ADAPTIVE_THINKING_MODEL_MARKERS);\n}\n\nfunction supportsNativeXhighEffort(model: Model<Api>): boolean {\n\treturn includesModelMarker(model, NATIVE_XHIGH_EFFORT_MODEL_MARKERS);\n}\n\nfunction isEffortLevel(value: string): value is EffortLevel {\n\treturn value === \"low\" || value === \"medium\" || value === \"high\" || value === \"xhigh\" || value === \"max\";\n}\n\nfunction mapThinkingLevelToEffort(model: Model<Api>, level: ThinkingLevel): EffortLevel {\n\tconst mapped = model.thinkingLevelMap?.[level];\n\tif (typeof mapped === \"string\" && isEffortLevel(mapped)) return mapped;\n\tswitch (level) {\n\t\tcase \"minimal\":\n\t\tcase \"low\":\n\t\t\treturn \"low\";\n\t\tcase \"medium\":\n\t\t\treturn \"medium\";\n\t\tcase \"high\":\n\t\t\treturn \"high\";\n\t\tcase \"xhigh\":\n\t\t\treturn supportsNativeXhighEffort(model) ? \"xhigh\" : \"max\";\n\t\tcase \"max\":\n\t\t\treturn \"max\";\n\t}\n}\n\nfunction mapThinkingTokens(reasoning: ThinkingLevel, thinkingBudgets: ThinkingBudgets | undefined): number {\n\tconst budgetLevel = reasoning === \"xhigh\" ? \"high\" : reasoning;\n\tconst customBudget = thinkingBudgets?.[budgetLevel];\n\treturn typeof customBudget === \"number\" && Number.isFinite(customBudget) && customBudget > 0\n\t\t? customBudget\n\t\t: DEFAULT_THINKING_BUDGETS[budgetLevel];\n}\n\nfunction findAgentsMdInParents(cwd: string): string | undefined {\n\tlet current = resolve(cwd);\n\twhile (true) {\n\t\tconst candidate = join(current, \"AGENTS.md\");\n\t\tif (existsSync(candidate)) return candidate;\n\t\tconst parent = dirname(current);\n\t\tif (parent === current) return undefined;\n\t\tcurrent = parent;\n\t}\n}\n\nfunction sanitizeAgentsContent(content: string): string {\n\tconst configDirectory = CONFIG_DIR_NAME.replace(/^\\./, \"\");\n\tconst escapedConfigDirectory = configDirectory.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\treturn content\n\t\t.replace(new RegExp(`~/${escapedConfigDirectory}\\\\b`, \"gi\"), \"~/.claude\")\n\t\t.replace(new RegExp(`(^|[\\\\s'\"\\`])\\\\.${escapedConfigDirectory}/`, \"g\"), \"$1.claude/\")\n\t\t.replace(new RegExp(`\\\\b${escapedConfigDirectory}\\\\b`, \"gi\"), \"environment\");\n}\n\nfunction extractAgentsAppend(cwd: string): string | undefined {\n\tconst agentsPath = findAgentsMdInParents(cwd) ?? join(getAgentDir(), \"AGENTS.md\");\n\tif (!existsSync(agentsPath)) return undefined;\n\ttry {\n\t\tconst content = sanitizeAgentsContent(readFileSync(agentsPath, \"utf-8\").trim());\n\t\treturn content.length > 0 ? `# CLAUDE.md\\n\\n${content}` : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nfunction rewriteSkillsLocations(skillsBlock: string, cwd: string): string {\n\tconst globalSkillsRoot = join(getAgentDir(), \"skills\");\n\tconst projectSkillsRoot = join(cwd, CONFIG_DIR_NAME, \"skills\");\n\treturn skillsBlock.replace(/<location>([^<]+)<\\/location>/g, (_match, location: string) => {\n\t\tif (location.startsWith(globalSkillsRoot)) {\n\t\t\treturn `<location>~/.claude/skills/${relative(globalSkillsRoot, location).replace(/^\\.+/, \"\")}</location>`;\n\t\t}\n\t\tif (location.startsWith(projectSkillsRoot)) {\n\t\t\treturn `<location>.claude/skills/${relative(projectSkillsRoot, location).replace(/^\\.+/, \"\")}</location>`;\n\t\t}\n\t\treturn `<location>${location}</location>`;\n\t});\n}\n\nfunction extractSkillsAppend(systemPrompt: string | undefined, cwd: string): string | undefined {\n\tif (!systemPrompt) return undefined;\n\tconst marker = \"The following skills provide specialized instructions for specific tasks.\";\n\tconst start = systemPrompt.indexOf(marker);\n\tconst end = start === -1 ? -1 : systemPrompt.indexOf(\"</available_skills>\", start);\n\tif (end === -1) return undefined;\n\treturn rewriteSkillsLocations(systemPrompt.slice(start, end + \"</available_skills>\".length).trim(), cwd);\n}\n\nfunction resolveSettingSources(\n\tproviderSettings: ClaudeAgentSdkProviderSettings,\n\tappendSystemPrompt: boolean,\n\tauthLane: ClaudeAgentSdkAuthLane,\n): SettingSource[] {\n\tif (authLane !== \"ambient\") return [];\n\treturn providerSettings.settingSources ?? (appendSystemPrompt ? [] : [\"user\", \"project\"]);\n}\n\nexport function buildClaudeAgentSdkQueryOptions(input: ClaudeAgentSdkQueryOptionsInput): Options {\n\tconst cwd = input.cwd ?? process.cwd();\n\tconst providerSettings = input.providerSettings ?? loadClaudeAgentSdkProviderSettingsFromDisk(cwd);\n\tconst appendSystemPrompt = providerSettings.appendSystemPrompt !== false;\n\tconst authLane = input.authLane ?? providerSettings.tokenInjection ?? \"oauth-slots\";\n\tconst append = appendSystemPrompt\n\t\t? [extractAgentsAppend(cwd), extractSkillsAppend(input.context.systemPrompt, cwd)].filter(\n\t\t\t\t(part): part is string => part !== undefined,\n\t\t\t)\n\t\t: [];\n\tconst strictMcpConfig = providerSettings.strictMcpConfig ?? !appendSystemPrompt;\n\tconst queryOptions: Options = {\n\t\tcwd,\n\t\tmodel: input.model.id,\n\t\ttools: input.tools ? [...input.tools] : [...BUILTIN_SDK_TOOLS],\n\t\tpermissionMode: \"dontAsk\",\n\t\tincludePartialMessages: true,\n\t\tcanUseTool,\n\t\thooks: HOST_TOOL_DENIAL_HOOKS,\n\t\tsystemPrompt: { type: \"preset\", preset: \"claude_code\", append: append.join(\"\\n\\n\") || undefined },\n\t\tsettingSources: resolveSettingSources(providerSettings, appendSystemPrompt, authLane),\n\t};\n\tif (input.pathToClaudeCodeExecutable) queryOptions.pathToClaudeCodeExecutable = input.pathToClaudeCodeExecutable;\n\tif (strictMcpConfig) queryOptions.extraArgs = { \"strict-mcp-config\": null };\n\n\tconst reasoning = input.streamOptions?.reasoning;\n\tif (reasoning && supportsAdaptiveThinking(input.model)) {\n\t\tqueryOptions.thinking = { type: \"adaptive\", display: \"summarized\" } satisfies ThinkingConfig;\n\t\tqueryOptions.effort = mapThinkingLevelToEffort(input.model, reasoning);\n\t} else if (reasoning) {\n\t\tqueryOptions.maxThinkingTokens = mapThinkingTokens(reasoning, input.streamOptions?.thinkingBudgets);\n\t}\n\treturn queryOptions;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-bridge.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/prompt-bridge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD,MAAM,UAAU,aAAa,CAC5B,OAAoC,EACpC,mBAA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,CAAC;QACD,UAAU,CACT,2BAA2B,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,OAAO,CAAC,UAAU,IAAI,CAClH,CAAC;QACF,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC;YAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IACrF,CAAC;IAED,IAAI,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC;QAC3B,UAAU,CAAC,yBAAyB,CAAC,CAAC;QACtC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,YAAiC;IAClE,OAAO,CAAC,KAAK,SAAS,CAAC;QACtB,MAAM;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAA+B;YAC7E,kBAAkB,EAAE,IAAI;YACxB,UAAU,EAAE,QAAQ;SACpB,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;AACN,CAAC","sourcesContent":["import type { AssistantMessage, Context, ImageContent, TextContent } from \"@earendil-works/pi-ai\";\nimport type { Base64ImageSource, ContentBlockParam, SDKUserMessage } from \"./sdk-boundary.ts\";\nimport { mapPiToolNameToSdk } from \"./tools.ts\";\n\nexport { mapPiToolNameToSdk } from \"./tools.ts\";\n\ntype PromptContent = string | readonly (TextContent | ImageContent)[];\n\nexport function contentToText(\n\tcontent: AssistantMessage[\"content\"],\n\tcustomToolNameToSdk?: ReadonlyMap<string, string>,\n): string {\n\treturn content\n\t\t.map((block) => {\n\t\t\tif (block.type === \"text\") return block.text;\n\t\t\tif (block.type === \"thinking\") return block.thinking;\n\t\t\tif (block.type === \"toolCall\") {\n\t\t\t\treturn `Historical tool call (non-executable): ${mapPiToolNameToSdk(block.name, customToolNameToSdk)} args=${JSON.stringify(block.arguments)}`;\n\t\t\t}\n\t\t\treturn `[${block.type}]`;\n\t\t})\n\t\t.join(\"\\n\");\n}\n\nfunction appendContentBlocks(blocks: ContentBlockParam[], content: PromptContent): boolean {\n\tif (typeof content === \"string\") {\n\t\tif (content.length > 0) blocks.push({ type: \"text\", text: content });\n\t\treturn content.trim().length > 0;\n\t}\n\n\tlet hasText = false;\n\tfor (const block of content) {\n\t\tif (block.type === \"text\") {\n\t\t\tblocks.push({ type: \"text\", text: block.text });\n\t\t\thasText ||= block.text.trim().length > 0;\n\t\t} else {\n\t\t\tblocks.push({\n\t\t\t\ttype: \"image\",\n\t\t\t\tsource: {\n\t\t\t\t\ttype: \"base64\",\n\t\t\t\t\tmedia_type: block.mimeType as Base64ImageSource[\"media_type\"],\n\t\t\t\t\tdata: block.data,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\treturn hasText;\n}\n\nexport function buildPromptBlocks(\n\tcontext: Context,\n\tcustomToolNameToSdk?: ReadonlyMap<string, string>,\n\ttoolWatchNote?: string,\n): ContentBlockParam[] {\n\tconst blocks: ContentBlockParam[] = [];\n\tconst pushText = (text: string): void => {\n\t\tblocks.push({ type: \"text\", text });\n\t};\n\tconst pushPrefix = (label: string): void => {\n\t\tpushText(`${blocks.length ? \"\\n\\n\" : \"\"}${label}\\n`);\n\t};\n\n\tfor (const message of context.messages) {\n\t\tif (message.role === \"user\") {\n\t\t\tpushPrefix(\"USER:\");\n\t\t\tif (!appendContentBlocks(blocks, message.content)) pushText(\"(see attached image)\");\n\t\t\tcontinue;\n\t\t}\n\t\tif (message.role === \"assistant\") {\n\t\t\tpushPrefix(\"ASSISTANT:\");\n\t\t\tconst text = contentToText(message.content, customToolNameToSdk);\n\t\t\tif (text.length > 0) pushText(text);\n\t\t\tcontinue;\n\t\t}\n\t\tpushPrefix(\n\t\t\t`TOOL RESULT (historical ${mapPiToolNameToSdk(message.toolName, customToolNameToSdk)}, id=${message.toolCallId}):`,\n\t\t);\n\t\tif (!appendContentBlocks(blocks, message.content)) pushText(\"(see attached image)\");\n\t}\n\n\tif (toolWatchNote?.trim()) {\n\t\tpushPrefix(\"RECOVERED TOOL RESULTS:\");\n\t\tpushText(toolWatchNote.trim());\n\t}\n\treturn blocks.length > 0 ? blocks : [{ type: \"text\", text: \"\" }];\n}\n\nexport function buildPromptStream(promptBlocks: ContentBlockParam[]): AsyncIterable<SDKUserMessage> {\n\treturn (async function* () {\n\t\tyield {\n\t\t\ttype: \"user\",\n\t\t\tmessage: { role: \"user\", content: promptBlocks } as SDKUserMessage[\"message\"],\n\t\t\tparent_tool_use_id: null,\n\t\t\tsession_id: \"prompt\",\n\t\t};\n\t})();\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-boundary.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/sdk-boundary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,OAAO,EACP,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAExF,YAAY,EACX,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,GACd,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG;IACxD,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,KAAK,IAAI,IAAI,CAAC;CACd,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,cAAc,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,QAAQ,CAAC;IAChB,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;CAC9C,CAAC;AAEF,QAAA,MAAM,kBAAkB,EAAE,WAA2C,CAAC;AAGtE,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAExE;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;eAEc,kBAAkB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SettingsManager } from "../../../settings-manager.ts";
|
|
2
|
-
import type { SettingSource } from "./sdk-boundary.ts";
|
|
3
|
-
export type ClaudeAgentSdkTokenInjection = "oauth-slots" | "config-dir" | "ambient";
|
|
4
|
-
export interface ClaudeAgentSdkProviderSettings {
|
|
5
|
-
readonly appendSystemPrompt?: boolean;
|
|
6
|
-
readonly settingSources?: SettingSource[];
|
|
7
|
-
readonly strictMcpConfig?: boolean;
|
|
8
|
-
readonly pinnedAccount?: string;
|
|
9
|
-
readonly tokenInjection?: ClaudeAgentSdkTokenInjection;
|
|
10
|
-
}
|
|
11
|
-
/** Load the provider block with project values taking precedence over global values. */
|
|
12
|
-
export declare function loadClaudeAgentSdkProviderSettings(settingsManager: SettingsManager): ClaudeAgentSdkProviderSettings;
|
|
13
|
-
/** Load settings from Senpi's configured global and project settings.json paths. */
|
|
14
|
-
export declare function loadClaudeAgentSdkProviderSettingsFromDisk(cwd: string): ClaudeAgentSdkProviderSettings;
|
|
15
|
-
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/claude-agent-sdk/settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,MAAM,4BAA4B,GAAG,aAAa,GAAG,YAAY,GAAG,SAAS,CAAC;AAEpF,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,4BAA4B,CAAC;CACvD;AAkCD,wFAAwF;AACxF,wBAAgB,kCAAkC,CAAC,eAAe,EAAE,eAAe,GAAG,8BAA8B,CAOnH;AAED,oFAAoF;AACpF,wBAAgB,0CAA0C,CAAC,GAAG,EAAE,MAAM,GAAG,8BAA8B,CAEtG"}
|