@code-yeongyu/senpi 2026.9.22-2 → 2026.9.22-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 +37 -17
- package/dist/bundle/chunks/{anthropic-messages-2P7APOOQ.js → anthropic-messages-V4CUY3UU.js} +1 -1
- package/dist/bundle/chunks/{app-server-command-PRNA6QQU.js → app-server-command-P5WP2YVC.js} +2 -2
- package/dist/bundle/chunks/azure-openai-responses-SBCCU4KI.js +2 -0
- package/dist/bundle/chunks/chatgpt-subscription.js +75 -0
- package/dist/bundle/chunks/chunk-2VZJTDUX.js +2 -0
- package/dist/bundle/chunks/{chunk-BOZ37BOT.js → chunk-3KLWJIXM.js} +3 -4
- package/dist/bundle/chunks/{chunk-M2HSO7MH.js → chunk-3UO3QYMZ.js} +1 -1
- package/dist/bundle/chunks/{chunk-6OD4TT33.js → chunk-5T3V75HH.js} +113 -111
- package/dist/bundle/chunks/chunk-6KXIFAMC.js +11 -0
- package/dist/bundle/chunks/{chunk-UCPWK6TZ.js → chunk-6MIPLTQG.js} +1 -1
- package/dist/bundle/chunks/{chunk-JZ6YQU3A.js → chunk-7ZPFQY76.js} +3 -3
- package/dist/bundle/chunks/{chunk-MUYK27UR.js → chunk-AEJUOQ7U.js} +1 -1
- package/dist/bundle/chunks/{chunk-F3DXL5MX.js → chunk-AJ722VIQ.js} +1 -1
- package/dist/bundle/chunks/{chunk-VYIJQQ5I.js → chunk-DTD3QN3S.js} +1 -1
- package/dist/bundle/chunks/chunk-DY6FUAWH.js +2 -0
- package/dist/bundle/chunks/{chunk-5XC2FNJ5.js → chunk-GLDP7LH2.js} +1 -1
- package/dist/bundle/chunks/{chunk-OPNVT7BU.js → chunk-KB3DR2ZH.js} +1 -1
- package/dist/bundle/chunks/{chunk-JR4X6ECO.js → chunk-M4NQKQUK.js} +1 -1
- package/dist/bundle/chunks/{chunk-GXUYWMN2.js → chunk-PODQ2IEB.js} +1 -1
- package/dist/bundle/chunks/{chunk-ARJJU3MS.js → chunk-PU7UDZ5F.js} +1 -1
- package/dist/bundle/chunks/{chunk-64JQFFHH.js → chunk-SSJ5OP3B.js} +2 -2
- package/dist/bundle/chunks/{chunk-X63BXA24.js → chunk-TAFYWUE4.js} +1 -1
- package/dist/bundle/chunks/{chunk-KICRBRVS.js → chunk-TU37KLCN.js} +2 -2
- package/dist/bundle/chunks/{chunk-R6LVC7SP.js → chunk-TWTHGDQS.js} +4 -4
- package/dist/bundle/chunks/chunk-WS7QGU5H.js +8 -0
- package/dist/bundle/chunks/{chunk-IPRJIKLL.js → chunk-WSQMYWLV.js} +1 -1
- package/dist/bundle/chunks/chunk-ZBHRTH5C.js +2 -0
- package/dist/bundle/chunks/cli-main-O4CFWDWV.js +3 -0
- package/dist/bundle/chunks/{google-generative-ai-Y2IYMUVC.js → google-generative-ai-UJIX64UU.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-TKBBMPHV.js → google-vertex-KJEY5SZY.js} +1 -1
- package/dist/bundle/chunks/help-fast-path-KFMAFECE.js +2 -0
- package/dist/bundle/chunks/host-command-JEBCPKMK.js +2 -0
- package/dist/bundle/chunks/host-lifecycle-FWIB56UI.js +3 -0
- package/dist/bundle/chunks/host-lifecycle.js +2 -2
- package/dist/bundle/chunks/{interactive-host-runtime-F5L4USLR.js → interactive-host-runtime-HBK4XNHJ.js} +1 -1
- package/dist/bundle/chunks/interactive-mode-WKFWOHXN.js +2 -0
- package/dist/bundle/chunks/{mistral-conversations-ZYDVFRYF.js → mistral-conversations-PNYVN6YU.js} +1 -1
- package/dist/bundle/chunks/{multi-session-host-EUTEGVLS.js → multi-session-host-DWBOLTS7.js} +2 -2
- package/dist/bundle/chunks/openai-codex-responses-TBF5EMKG.js +10 -0
- package/dist/bundle/chunks/{openai-completions-4V76L5ZJ.js → openai-completions-IJIBZB2G.js} +1 -1
- package/dist/bundle/chunks/{openai-images-4XAZQLDT.js → openai-images-JA5N5DUU.js} +1 -1
- package/dist/bundle/chunks/openai-responses-3XYO7ROE.js +2 -0
- package/dist/bundle/chunks/{openrouter-images-Z3WQ5BDR.js → openrouter-images-T4GY3JYM.js} +1 -1
- package/dist/bundle/chunks/{package-manager-cli-JPUWMUEJ.js → package-manager-cli-JUKHAT7U.js} +1 -1
- package/dist/bundle/chunks/{rotation-stream-S56Y7WMM.js → rotation-stream-67OZ4U6R.js} +1 -1
- package/dist/bundle/chunks/rpc-mode-746KEL7Z.js +2 -0
- package/dist/bundle/chunks/{session-picker-PFPJVVIC.js → session-picker-TO42QRV2.js} +1 -1
- package/dist/bundle/chunks/session-worker.js +399 -398
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +10 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -1
- package/dist/core/agent-session.js +8 -8
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-provider-key-migration.d.ts +27 -0
- package/dist/core/auth-provider-key-migration.d.ts.map +1 -0
- package/dist/core/auth-provider-key-migration.js +40 -0
- package/dist/core/auth-provider-key-migration.js.map +1 -0
- package/dist/core/auth-storage.d.ts +26 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +93 -20
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/credential-accounts.d.ts +1 -1
- package/dist/core/credential-accounts.d.ts.map +1 -1
- package/dist/core/credential-accounts.js +8 -5
- package/dist/core/credential-accounts.js.map +1 -1
- package/dist/core/credential-pool/env-slots.d.ts.map +1 -1
- package/dist/core/credential-pool/env-slots.js +5 -2
- package/dist/core/credential-pool/env-slots.js.map +1 -1
- package/dist/core/dynamic-prompt/build.js +1 -1
- package/dist/core/dynamic-prompt/build.js.map +1 -1
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/account-command.d.ts +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/account-command.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/account-command.js +24 -24
- package/dist/core/extensions/builtin/anthropic-subscription/account-command.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/account-events.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/account-events.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/account-management.d.ts +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/account-management.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/account-management.js +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/account-management.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/accounts.d.ts +8 -8
- package/dist/core/extensions/builtin/anthropic-subscription/accounts.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/accounts.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/affinity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/affinity.js +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/affinity.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/api-id.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/api-id.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/auth-attempt.d.ts +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/auth-attempt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/auth-attempt.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/auth-environment.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/auth-environment.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/auth-lane.d.ts +5 -5
- package/dist/core/extensions/builtin/anthropic-subscription/auth-lane.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/auth-lane.js +10 -10
- package/dist/core/extensions/builtin/anthropic-subscription/auth-lane.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/availability.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/availability.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/bounded-queue.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/bounded-queue.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/bounded-queue.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/config-dir-credentials.d.ts +18 -0
- package/dist/core/extensions/builtin/anthropic-subscription/config-dir-credentials.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/config-dir-credentials.js +81 -0
- package/dist/core/extensions/builtin/anthropic-subscription/config-dir-credentials.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/content-blocks.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/content-blocks.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/custom-tools-schema.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/custom-tools-schema.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/custom-tools.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/custom-tools.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/errors.d.ts +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/errors.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/errors.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/errors.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/executable-path-lookup.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/executable-path-lookup.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/executable.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/executable.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/failover.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/failover.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/failover.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/guidance.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/guidance.js +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/guidance.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/index.d.ts +11 -0
- package/dist/core/extensions/builtin/anthropic-subscription/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/index.js +19 -13
- package/dist/core/extensions/builtin/anthropic-subscription/index.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/oauth-login.d.ts +3 -3
- package/dist/core/extensions/builtin/anthropic-subscription/oauth-login.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/oauth-login.js +3 -3
- package/dist/core/extensions/builtin/anthropic-subscription/oauth-login.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/options.d.ts +18 -0
- package/dist/core/extensions/builtin/anthropic-subscription/options.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/options.js +3 -3
- package/dist/core/extensions/builtin/anthropic-subscription/options.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/prompt-bridge.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/prompt-bridge.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/prompt-directive-dedupe.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/prompt-directive-dedupe.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/refusal.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/refusal.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/sdk-boundary.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/sdk-boundary.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/sdk-boundary.lazy.d.ts +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/sdk-boundary.lazy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/sdk-boundary.lazy.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-binding-store.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-binding-store.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-binding.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-binding.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-commit-boundary.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-commit-boundary.js +4 -3
- package/dist/core/extensions/builtin/anthropic-subscription/session-commit-boundary.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-continuity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-continuity.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-entry-annotations.d.ts +3 -3
- package/dist/core/extensions/builtin/anthropic-subscription/session-entry-annotations.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-entry-annotations.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-observability.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-observability.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-observability.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-reaper.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-reaper.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-reattach.d.ts +5 -5
- package/dist/core/extensions/builtin/anthropic-subscription/session-reattach.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-reattach.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-reattach.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry-pump.d.ts +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-pump.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry-pump.js +6 -6
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-pump.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry-state.d.ts +3 -3
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-state.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-state.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-wiring.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry-wiring.js +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-wiring.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry.d.ts +12 -12
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry.js +4 -4
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-restored-admission.d.ts +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/session-restored-admission.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-restored-admission.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-stream.d.ts +2 -2
- package/dist/core/extensions/builtin/anthropic-subscription/session-stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-stream.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-stream.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-sync.d.ts +5 -5
- package/dist/core/extensions/builtin/anthropic-subscription/session-sync.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-sync.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-attempt.d.ts +11 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-attempt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-attempt.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-claim.d.ts +14 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-claim.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-turn-claim.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-claim.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-types.js.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/settings.d.ts +11 -11
- package/dist/core/extensions/builtin/anthropic-subscription/settings.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/settings.js +9 -9
- package/dist/core/extensions/builtin/anthropic-subscription/settings.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream-events.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream-events.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream-guidance.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream-guidance.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream-protocol.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream-protocol.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream.d.ts +3 -0
- package/dist/core/extensions/builtin/anthropic-subscription/stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/stream.js +5 -5
- package/dist/core/extensions/builtin/anthropic-subscription/stream.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/system-prompt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/system-prompt.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/tool-watch.d.ts.map +1 -0
- package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/tool-watch.js +6 -2
- package/dist/core/extensions/builtin/anthropic-subscription/tool-watch.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/tools.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/tools.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/index.js +2 -2
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts +5 -5
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.js +9 -9
- package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote-model.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote-model.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote-model.js +6 -6
- package/dist/core/extensions/builtin/compaction/openai-remote-model.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative-summary.js +2 -2
- package/dist/core/extensions/builtin/compaction/speculative-summary.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js.map +1 -1
- package/dist/core/extensions/builtin/goal/terminal-provider-error.js +1 -1
- package/dist/core/extensions/builtin/goal/terminal-provider-error.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-account.js +18 -18
- package/dist/core/extensions/builtin/gpt-account.js.map +1 -1
- package/dist/core/extensions/builtin/index.js +2 -2
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/oauth-login-interaction.d.ts +2 -2
- package/dist/core/extensions/builtin/oauth-login-interaction.d.ts.map +1 -1
- package/dist/core/extensions/builtin/oauth-login-interaction.js +1 -1
- package/dist/core/extensions/builtin/oauth-login-interaction.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts +9 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js +60 -17
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js +7 -3
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js +7 -3
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js +7 -3
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js +7 -3
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.js +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/grok-4.5.js +2 -2
- package/dist/core/extensions/builtin/prompt-preset/grok-4.5.js.map +1 -1
- package/dist/core/extensions/builtin/rules/rules/constants.d.ts +1 -1
- package/dist/core/extensions/builtin/rules/rules/constants.js +1 -1
- package/dist/core/extensions/builtin/rules/rules/constants.js.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js +3 -3
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/model-config.d.ts +3 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +26 -3
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- 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 +10 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +2 -1
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/retry-fallback/expansion.js +1 -1
- package/dist/core/retry-fallback/expansion.js.map +1 -1
- package/dist/core/retry-fallback/settings.d.ts +1 -1
- package/dist/core/retry-fallback/settings.js +1 -1
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +16 -4
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +5 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +68 -2
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/app-server/server/account.d.ts +1 -1
- package/dist/modes/app-server/server/account.d.ts.map +1 -1
- package/dist/modes/app-server/server/account.js +6 -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/components/progressive-transcript-container.d.ts +12 -0
- package/dist/modes/interactive/components/progressive-transcript-container.d.ts.map +1 -1
- package/dist/modes/interactive/components/progressive-transcript-container.js +17 -2
- package/dist/modes/interactive/components/progressive-transcript-container.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +14 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/connection-handler.js +3 -3
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/host-process-metrics.d.ts.map +1 -1
- package/dist/modes/rpc/host-process-metrics.js +24 -31
- package/dist/modes/rpc/host-process-metrics.js.map +1 -1
- package/dist/modes/rpc/host-process-table.d.ts +36 -0
- package/dist/modes/rpc/host-process-table.d.ts.map +1 -0
- package/dist/modes/rpc/host-process-table.js +162 -0
- package/dist/modes/rpc/host-process-table.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +1 -1
- package/dist/modes/rpc/rpc-client.js +1 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/worker-session-registry.js +30 -0
- package/dist/modes/rpc/worker-session-registry.js.map +1 -1
- package/docs/providers.md +9 -9
- package/docs/release-guide.md +1 -1
- package/docs/rpc.md +4 -4
- package/docs/settings.md +5 -5
- package/docs/usage.md +2 -2
- package/examples/extensions/AGENTS.md +1 -1
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/{openai-codex-usage → chatgpt-subscription-usage}/codex-usage.ts +1 -1
- package/examples/extensions/{openai-codex-usage → chatgpt-subscription-usage}/index.ts +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/README.md +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
- 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/openai-codex-responses/fallback-state.d.ts +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses/fallback-state.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +5 -5
- 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 +10 -10
- 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-prompt-cache.d.ts +1 -1
- 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 +1 -1
- 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.js +1 -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.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/{openai-codex.d.ts → chatgpt-subscription.d.ts} +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/chatgpt-subscription.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/{openai-codex.js → chatgpt-subscription.js} +35 -35
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/chatgpt-subscription.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.d.ts +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.js +20 -2
- package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +2 -2
- 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 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/legacy-provider-ids.d.ts +20 -0
- package/node_modules/@earendil-works/pi-ai/dist/legacy-provider-ids.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/legacy-provider-ids.js +56 -0
- package/node_modules/@earendil-works/pi-ai/dist/legacy-provider-ids.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.models.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.models.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.models.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/chatgpt-subscription.models.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/chatgpt-subscription.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +1 -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/{openai-codex-auth.d.ts → chatgpt-subscription-auth.d.ts} +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/utils/chatgpt-subscription-auth.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/{openai-codex-auth.js → chatgpt-subscription-auth.js} +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/utils/chatgpt-subscription-auth.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +7 -7
- package/dist/bundle/chunks/azure-openai-responses-3AH7MJWF.js +0 -2
- package/dist/bundle/chunks/chunk-56TWFZ2C.js +0 -2
- package/dist/bundle/chunks/chunk-JEFYJDHP.js +0 -8
- package/dist/bundle/chunks/chunk-K3HEWWSS.js +0 -2
- package/dist/bundle/chunks/chunk-NK2RNX25.js +0 -11
- package/dist/bundle/chunks/chunk-NMB4C6ZZ.js +0 -2
- package/dist/bundle/chunks/cli-main-AFJNXUSL.js +0 -3
- package/dist/bundle/chunks/help-fast-path-4KYBVD2Z.js +0 -2
- package/dist/bundle/chunks/host-command-OVA6GEWC.js +0 -2
- package/dist/bundle/chunks/host-lifecycle-IDQPLYEA.js +0 -3
- package/dist/bundle/chunks/interactive-mode-UFBSCOP7.js +0 -2
- package/dist/bundle/chunks/openai-codex-responses-MEIUNROM.js +0 -10
- package/dist/bundle/chunks/openai-codex.js +0 -75
- package/dist/bundle/chunks/openai-responses-YR7WRBG3.js +0 -2
- package/dist/bundle/chunks/rpc-mode-JDVHUBZY.js +0 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-command.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-command.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-events.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-events.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-management.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/account-management.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/accounts.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/accounts.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/affinity.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/affinity.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/api-id.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/api-id.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-attempt.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/bounded-queue.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts +0 -3
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js +0 -27
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/content-blocks.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/content-blocks.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools-schema.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools-schema.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/errors.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/errors.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable-path-lookup.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable-path-lookup.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/failover.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/failover.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/guidance.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts +0 -11
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.d.ts +0 -18
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-bridge.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-directive-dedupe.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/prompt-directive-dedupe.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/refusal.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/refusal.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.lazy.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.lazy.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding-store.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding-store.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-entry-annotations.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reaper.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-pump.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-state.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-restored-admission.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-restored-admission.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.d.ts +0 -11
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts +0 -14
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-claim.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-types.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-events.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-guidance.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-protocol.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream-protocol.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts +0 -3
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/system-prompt.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/tool-watch.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/tool-watch.js.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/tools.d.ts.map +0 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/tools.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.d.ts +0 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js +0 -22
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts +0 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/openai-codex-auth.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/openai-codex-auth.js.map +0 -1
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/account-events.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/account-events.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/accounts.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/affinity.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/api-id.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/api-id.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/auth-attempt.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/auth-environment.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/auth-environment.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/availability.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/availability.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/bounded-queue.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/content-blocks.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/content-blocks.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/custom-tools-schema.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/custom-tools-schema.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/custom-tools.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/custom-tools.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/executable-path-lookup.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/executable-path-lookup.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/executable.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/executable.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/failover.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/guidance.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/prompt-bridge.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/prompt-bridge.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/prompt-directive-dedupe.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/prompt-directive-dedupe.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/refusal.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/refusal.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/sdk-boundary.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/sdk-boundary.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/sdk-boundary.lazy.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-binding-store.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-binding-store.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-binding.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-binding.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-commit-boundary.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-continuity.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-continuity.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-entry-annotations.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-observability.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-reaper.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-reaper.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry-state.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-registry-wiring.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-restored-admission.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-sync.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-turn-attempt.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-turn-types.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/session-turn-types.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/stream-events.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/stream-events.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/stream-guidance.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/stream-guidance.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/stream-protocol.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/stream-protocol.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/system-prompt.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/system-prompt.js +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/tool-watch.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/tools.d.ts +0 -0
- /package/dist/core/extensions/builtin/{claude-sdk-oauth → anthropic-subscription}/tools.js +0 -0
- /package/examples/extensions/{openai-codex-usage → chatgpt-subscription-usage}/README.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,43 @@
|
|
|
12
12
|
|
|
13
13
|
### Removed
|
|
14
14
|
|
|
15
|
+
## [2026.9.22-3] - 2026-09-22
|
|
16
|
+
|
|
17
|
+
### Breaking Changes
|
|
18
|
+
|
|
19
|
+
- Typing a renamed provider id now tells you the new one: `/login openai-codex` and `--provider claude-sdk-oauth` fail with the new id named, instead of a generic error or an empty selector. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- The "File operations" section of the system prompt now names the editing tool your session actually has. It was written from the model preset rather than the live toolset, so a Grok 4.5 session - where `apply_patch` can never activate - was told to route every file edit through it, and so was any GPT model served over an API that cannot carry the tool. Sessions that do have `apply_patch` still get it as the single edit verb, the guard against editing files through `cat >`, `sed -i`, `awk -i` or inline `python` stays in both cases, and the instruction is direct again instead of asking the model to work out which tools it has ([#1968](https://github.com/code-yeongyu/senpi/issues/1968)).
|
|
24
|
+
|
|
25
|
+
- Reusing a transcript container after teardown re-arms progressive hydration instead of leaving it permanently halted, so `clear()` and `detachAll()` reset the hydration halt alongside the watermark rather than only the watermark. Teardown still halts hydration; only reuse re-arms it. Latent today, since the chat container is constructed once and never disposed ([#2002](https://github.com/code-yeongyu/senpi/pull/2002)).
|
|
26
|
+
- Daemon status reads no longer spawn a `ps` process per request. `senpi host status` and the generations rows now read the process table through the kernel (`sysctl` on macOS, `/proc` on Linux), so a client polling daemon status costs zero child processes and nothing can accumulate as unreaped `<defunct>` children on a runtime whose `execFile` does not reap them - the leak class that filled the macOS process table from a long-lived RPC host ([code-yeongyu/omo-desktop-app#594](https://github.com/code-yeongyu/omo-desktop-app/issues/594), [#1507](https://github.com/code-yeongyu/senpi/issues/1507)). On runtimes without the kernel bindings (plain Node) the memory, descriptor and zombie fields report `null` instead of spawning a probe.
|
|
27
|
+
- RPC `open_session.durableSessionId` is now enforced on the worker-backed multi-session host too: a duplicate live id is refused with `session_id_in_use` and a malformed id with `invalid_session_id` at the registry boundary. A session created under a caller-chosen id writes its header at open, so reopening that path before the first assistant message keeps the chosen identity. ([#2010](https://github.com/code-yeongyu/senpi/issues/2010))
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Internal code names now follow the subscription provider rename: TypeScript symbols, module files and the builtin extension directory read `anthropic-subscription` instead of `claude-sdk-oauth`, and `chatgpt-subscription` instead of `openai-codex` in `@earendil-works/pi-ai`. Nothing you can observe changes — provider ids, the wire api id, stored files, diagnostics ids and env-var names stay byte-identical. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
34
|
+
|
|
35
|
+
- Upgrading across the subscription provider rename is now covered end to end: an agent directory written by an older senpi keeps its logins, settings, custom models and saved accounts, and is migrated exactly once. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
36
|
+
|
|
37
|
+
- Settings, credentials, sessions and `models.json` written before the subscription provider rename keep working: the old provider ids are resolved on read everywhere they are stored, and senpi tells you once which ids to update in `models.json`. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
- Your saved settings survive the subscription provider rename: `defaultProvider`, `defaultModel`, favourites, per-model thinking/tier maps and fallback chains written under `openai-codex`/`claude-sdk-oauth` are rewritten once to `chatgpt-subscription`/`anthropic-subscription` on first load. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
41
|
+
|
|
42
|
+
- Your saved Claude subscription accounts survive the provider rename: the per-account directory is moved once from the old name to `anthropic-subscription-accounts`, preserving each account's stored login. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
43
|
+
|
|
44
|
+
- The Claude subscription provider is now `anthropic-subscription`, shown as **Anthropic Subscription**, instead of `claude-sdk-oauth` / "Claude SDK OAuth" — the id named an SDK integration detail, not the thing you are signing in with. The wire api id stays `claude-sdk-oauth`, and nothing persisted moves: stored accounts, the binding sidecar, `CLAUDE_CODE_OAUTH_TOKEN*` env vars, and session diagnostics keep their exact names, so existing installs keep working without re-login. The subscription lane also keeps its first rung in the fallback precedence table. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
45
|
+
|
|
46
|
+
- Stored logins survive the subscription provider rename: an `auth.json` credential saved under `openai-codex` or `claude-sdk-oauth` is rewritten once under `chatgpt-subscription` / `anthropic-subscription`, with a timestamped `0600` backup taken first and pooled accounts, slot names and the pinned account preserved exactly. You stay logged in across the upgrade. ([#1989](https://github.com/code-yeongyu/senpi/issues/1989))
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
### Removed
|
|
51
|
+
|
|
15
52
|
## [2026.9.22-2] - 2026-09-22
|
|
16
53
|
|
|
17
54
|
### Breaking Changes
|
|
@@ -36,7 +73,6 @@
|
|
|
36
73
|
- Opening a second terminal on a live Claude SDK session no longer throws away the resumable binding. The startup notice it appends is an append-only entry, but it retired the binding and the next turn re-sent the entire conversation as `registry_miss`. Append-only entries after the committed assistant - notices, user messages and tool results - now keep the binding, while a later assistant message, a compaction, a branch summary and an explicit invalidation still discard it. A restart whose SDK transcript already carries a user frame after that anchor still cold-seeds, so a turn interrupted between send and commit is never sent twice. ([#1964](https://github.com/code-yeongyu/senpi/issues/1964))
|
|
37
74
|
|
|
38
75
|
- A Claude SDK fork point that Claude Code reports missing is no longer handed back to the next turn. The lane recognized a missing session id but not a missing message id, so it republished the rejected UUID, asked for it again, and re-sent the whole conversation every turn until the session ended. The rejected UUID is now dropped, so the dead id is never requested twice; the earlier mapped boundaries stay recorded so a later change can fork at one of them instead of re-sending ([#1973](https://github.com/code-yeongyu/senpi/issues/1973)). ([#1958](https://github.com/code-yeongyu/senpi/issues/1958))
|
|
39
|
-
|
|
40
76
|
- A shared RPC host that dies now leaves a durable record instead of vanishing. The supervisor already told a clean idle exit apart from a crash, but reported the crash only to stderr - and the daemon's stderr log is truncated by the very restart that replaces the dead host, so a host dying hourly was indistinguishable from one that had never died. A crash-classified exit now appends its timestamp, signal or exit code, and the child's uptime to `<daemonDir>/crashes.jsonl`, which survives restarts and is bounded so a crash loop cannot grow it forever. A clean idle exit still writes nothing, so the line count is a crash count. ([#1950](https://github.com/code-yeongyu/senpi/issues/1950))
|
|
41
77
|
|
|
42
78
|
- Shared RPC hosts no longer grow by one permanent copy of the extension module graph per session. Extension sources are compiled once per process and recompiled only when a source file changes, which cuts per-session retained memory on a long-lived host from tens of megabytes to well under one ([#1948](https://github.com/code-yeongyu/senpi/issues/1948)).
|
|
@@ -265,14 +301,12 @@
|
|
|
265
301
|
|
|
266
302
|
- `senpi host ensure|handoff --launch-spec <file>` states what a daemon should be started with — `{ spec_version: 1, core: { session_runtime, multi_session, extensions }, tunables: { idleExitMs, coldStart }, env }` — with extension paths resolved against the SPEC FILE's own directory. The spec decides which code a long-lived machine-wide daemon loads, so it is a file rather than stdin or an argv blob (neither has an owner to check) and four properties are proven before anything is started, each with exit 2 and a typed reason: `launch_spec_insecure` (not owned by this user, or group/world writable), `launch_spec_path_escape` (an extension path leaves the spec directory, lexically or through a symlink), `launch_spec_env_denied` (an `env` key outside `^(SENPI|OMO|PI)_[A-Z0-9_]+$`) and `launch_spec_missing_extension` (a listed extension does not exist — a daemon never boots with half a profile). The daemon itself no longer inherits the ensuring process's environment: it receives an allowlist of NAMES (`PATH`, `HOME`, `USER`, `LOGNAME`, `SHELL`, `TMPDIR`, `TERM`, `LANG`, `LC_*`, `XDG_*`, `SENPI_*`/`OMO_*`/`PI_*`, the proxy variables, `*_API_KEY` and the provider prefixes) plus whatever the spec's `env` states, with the win32 system wiring allowed there as well — so a token exported in one terminal is no longer held for hours by a process serving every other client. ([#1782](https://github.com/code-yeongyu/senpi/issues/1782))
|
|
267
303
|
|
|
268
|
-
|
|
269
304
|
### Changed
|
|
270
305
|
|
|
271
306
|
### Fixed
|
|
272
307
|
|
|
273
308
|
- **Devin and Cursor login work again on the bundled CLI.** Since 2026.9.17-3 both failed with `Cannot find module .../dist/bundle/chunks/devin.js`. The bundle resolves each provider's login flow through a relative import the bundler cannot see, so it ships those flows as sibling files next to the chunk that loads them; the Devin and Cursor flows, and their two provider streams, were missing from that list. They are emitted now, and the bundle smoke test starts a login for six providers under Node and Bun to keep it that way. ([#1810](https://github.com/code-yeongyu/senpi/issues/1810))
|
|
274
309
|
|
|
275
|
-
|
|
276
310
|
### Removed
|
|
277
311
|
|
|
278
312
|
## [2026.9.18] - 2026-09-18
|
|
@@ -301,7 +335,6 @@
|
|
|
301
335
|
### Fixed
|
|
302
336
|
- The published bundle no longer breaks a consumer that has `ws`'s optional native accelerators installed. `bufferutil` and `utf-8-validate` load their binding through `node-gyp-build`, whose computed require esbuild cannot analyse, so bundling them left an unresolvable external and the bundle build failed with `Bundle left unexpected external imports: <runtime>`. senpi's own CI never hit it because neither package is installed there; a consumer that has them - omo's desktop runtime build - could not build at all. Both are now external, the way the other native and runtime-guarded dependencies already were.
|
|
303
337
|
|
|
304
|
-
|
|
305
338
|
### Removed
|
|
306
339
|
|
|
307
340
|
## [2026.9.17-3] - 2026-09-17
|
|
@@ -339,7 +372,6 @@
|
|
|
339
372
|
|
|
340
373
|
- The published package now ships `@earendil-works/pi-agent-core`'s tree-sitter assets. Its `dist` reaches those grammars through compile-time `type: "file"` imports, but publish staging copied only `dist`, `native` and the manifest files, so the tarball carried specifiers pointing five directories above the package at files that were never published. Any consumer bundling senpi with `bun build --compile` failed to resolve them. Staging now copies a bundled workspace's `assets` as well, and the pack gate requires those two grammar files so a future drop fails the release instead of the consumer. ([#1800](https://github.com/code-yeongyu/senpi/issues/1800))
|
|
341
374
|
|
|
342
|
-
|
|
343
375
|
- A shared RPC host started under its lifecycle supervisor no longer hangs when it decides to exit on its own. The host watches an inherited pipe to notice its supervisor dying, and reading that pipe through a file stream parked a thread-pool worker in a blocking read for the process's whole life — which `process.exit()` waits for, so a self-exit never completed and the host only died when something killed it. The same pipe is now watched on the event loop, so an idle exit (and the drain of a generation handoff) ends the process immediately. ([#1782](https://github.com/code-yeongyu/senpi/issues/1782))
|
|
344
376
|
|
|
345
377
|
- An `ensureHost` for a second socket in one agent directory no longer stops the daemon serving the first. The daemon directory holds one pidfile per agent directory, and a record naming another endpoint was read as "our host is not answering" and stopped; the pidfile now records which socket it is about, and a record for a different endpoint is left alone. ([#1782](https://github.com/code-yeongyu/senpi/issues/1782))
|
|
@@ -369,7 +401,6 @@
|
|
|
369
401
|
|
|
370
402
|
- Agent-session services build the model runtime and load resources concurrently instead of one after the other. The two are independent - the resource loader is constructed from cwd, agent dir and settings and never touches the model runtime - so they are joined with a deterministic settle that keeps today's behavior: a model-runtime failure is still reported first when both fail, and neither branch can leave an unhandled rejection behind. Measured (median of 5, warm): `createAgentSessionRuntime` 277 ms to 180 ms; a cold run is unchanged, since overlapping two CPU-bound phases on one thread only buys the I/O wait they share. ([#1781](https://github.com/code-yeongyu/senpi/issues/1781))
|
|
371
403
|
|
|
372
|
-
|
|
373
404
|
### Fixed
|
|
374
405
|
- Compaction summarization retries once without the reasoning-effort override after an empty stop. Some providers return an empty summary with `stopReason: "stop"` when the override suppresses thinking; the retry lets the provider use its default reasoning and still falls through to the terminal `empty-summary` path if that also returns nothing. ([#1773](https://github.com/code-yeongyu/senpi/issues/1773))
|
|
375
406
|
|
|
@@ -381,7 +412,6 @@
|
|
|
381
412
|
|
|
382
413
|
- An `auto` theme no longer repaints on every launch. Making theme detection non-blocking meant the first frame is painted from a guess, and for `light/dark` that guess came from `COLORFGBG` alone - unset by most terminals - while the detected answer was never remembered. A user on a light terminal therefore got a dark first frame on every start, corrected one OSC round trip later. The detected terminal background is now remembered in `<agentDir>/cache/terminal-theme.json` and seeds the next launch, so the repaint happens at most once after install; the file is written atomically and a missing or malformed one simply falls back to the environment guess. ([#1781](https://github.com/code-yeongyu/senpi/issues/1781))
|
|
383
414
|
|
|
384
|
-
|
|
385
415
|
- Reopening a session path right after it was closed no longer fails on a shared RPC host. `open_session { sessionPath }` was refused with `session_path_in_use` while the previous session was still being disposed, so "close this session, then open its file again" — and the same reopen after the last client of a closed session dropped — succeeded or failed depending on how long that disposal happened to take, which no client can time (measured on a loaded host: the path stayed refused for 300 ms to 1 s after the close). This is a long-standing behaviour of shared hosts, present since multi-session hosts shipped, not something introduced this release. The open now waits for a teardown already in flight and then opens the file fresh, bounded by the same close-grace window that bounds the teardown, so a wedged disposal still ends in the old refusal instead of an open that never answers. Attaching to a live session, retained sessions, parked sessions and the duplicate-open refusal while a session is still opening are all unchanged. ([#1782](https://github.com/code-yeongyu/senpi/issues/1782))
|
|
386
416
|
|
|
387
417
|
- A shared RPC host no longer lets one client close a session it never opened. Routing handles are published to every client through `list_sessions`, and `close_session` released an attachment for whoever asked — so a client that had never attached could release another client's attachment and tear down a single-client session it did not own. Such a close is now refused with `unknown_session` and leaves the session untouched; a connection that opened or attached to the session closes it exactly as before. ([#1782](https://github.com/code-yeongyu/senpi/issues/1782))
|
|
@@ -421,7 +451,6 @@
|
|
|
421
451
|
|
|
422
452
|
- Skill discovery reads only the YAML frontmatter prefix of each `SKILL.md` (the first 8 KiB, falling back to the rest of the file when the closing `---` is not in that prefix) and skips `node_modules` and `.git` while walking. Discovered skill names, descriptions and order are unchanged. ([#1781](https://github.com/code-yeongyu/senpi/issues/1781))
|
|
423
453
|
|
|
424
|
-
|
|
425
454
|
- `ExtensionContext.kernelTools` is typed as the shipped kernel-tools surface: `invoke(request, options?)` accepts `{ signal?, scope? }` (a bare `AbortSignal` still works) and `capabilities.invokeScope` is present. Coding-agent owns `ExtensionKernelTools`, `KernelToolInvokeOptions`, and `KernelToolInvokeScope`; senpi-codemode binds its implementation to those types so they cannot drift ([#1731](https://github.com/code-yeongyu/senpi/issues/1731)).
|
|
426
455
|
|
|
427
456
|
### Fixed
|
|
@@ -429,7 +458,6 @@
|
|
|
429
458
|
|
|
430
459
|
- The published package now contains the bundled CLI its `pi` command points at. `bin.pi` resolves to `dist/bundle/cli.js`, but no build produced that file - only a test script did - so a release tarball packed a `pi` entry with no target (`bin.senpi`, on the unbundled `dist/cli.js`, was unaffected). The coding-agent build now runs the esbuild bundler as its last step, so every build that ships the package emits `dist/bundle/`, and the smoke exercises that bundle under both Node and Bun: `--version`, `--help`, an external TypeScript extension loaded with `--extension`, and an RPC `--multi-session` session lifecycle. The bundled entry also starts faster than the unbundled one: `--version` 19.5ms against 23.6ms on Bun and 47.1ms against 52.5ms on Node, and a full startup through model resolution 295ms against 946ms on Bun and 360ms against 877ms on Node (median of 5). ([#1781](https://github.com/code-yeongyu/senpi/issues/1781))
|
|
431
460
|
|
|
432
|
-
|
|
433
461
|
- A shared RPC host no longer disconnects a client that is merely busy. The host used to return a session worker's output credit only after every connected client had drained that record to the kernel, so the slowest client paced the producing session and the stall cut had to fire before the worker's 5-second credit deadline: a client that stopped reading its socket for 4 seconds with as little as 16 KB pending was treated as dead, cut, and had all of its sessions released (observed 12 times in 35 minutes against one desktop client on a loaded machine). Credit is now returned as soon as each connection has accepted the record into its own 64 MiB queue, the dead-peer cut is a 30-second transport liveness budget that no longer depends on the worker deadline, and a cut connection is half-closed instead of destroyed, so a client that resumes reading within 5 seconds finally receives the `overflow` notice - and the records already queued for it - before EOF. A client that outruns its own reading still overflows its queue and is cut, and a client that never reads again is still disconnected. ([#1774](https://github.com/code-yeongyu/senpi/issues/1774))
|
|
434
462
|
- Compaction no longer gives up on a summarizer that answers with a normal stop and no text when the request had pinned a reasoning override. Some OpenAI-completions relays answer a summarization request that carries an explicit reasoning effort with an empty 200 stream (seen on z-ai/glm-5.3-flash behind a custom relay: only the role prelude, 7 completion tokens), while the same model answers ordinary agent traffic without the pin. Each empty answer used to throw the terminal "summarization response contained no text (stopReason: stop)" error at once, so every route that re-triggered compaction (the pre-prompt check before each turn, the idle warm-up and its retries, the breaker reopening after its cooldown) paid a full summarization request for nothing, and on routes without the deterministic checkpoint the session kept reporting "Compaction rejected". An empty stop now earns one retry of the same request without the reasoning override before the terminal error, and only when the first attempt carried one: a non-reasoning model still fails on the first empty answer instead of replaying an identical prompt. Persistent emptiness keeps the deterministic fallback contract.
|
|
435
463
|
|
|
@@ -520,7 +548,6 @@
|
|
|
520
548
|
|
|
521
549
|
- Long, compaction-trimmed sessions no longer re-parse the entire session file every time the working/retry status animation cadence is decided (which periodically froze the UI on multi-day sessions): the cadence reads an O(1) maintained entry count, `SessionManager#getEntryCount()`; explicit full-history retrieval is unchanged ([#1699](https://github.com/code-yeongyu/senpi/issues/1699)).
|
|
522
550
|
|
|
523
|
-
|
|
524
551
|
- The Cursor CLI OAuth lane no longer spawns `cursor-agent models` on every senpi start. The startup catalog probe runs only when the lane is usable (not disabled, `cursor-agent` installed, at least one account bound), inside that account's HOME, and every `cursor-agent` spawn (turn, `models`, `--version`) now receives the same explicit environment allowlist instead of the inherited `process.env`. Hermetic or SSH-launched senpi processes therefore never trigger the CLI's macOS keychain preflight, which used to surface as a blocking "Keychain Not Found" dialog for `cursor-keychain-probe` on the logged-in console ([#1722](https://github.com/code-yeongyu/senpi/issues/1722)).
|
|
525
552
|
|
|
526
553
|
### Removed
|
|
@@ -553,7 +580,6 @@
|
|
|
553
580
|
|
|
554
581
|
- Compiled Bun binaries load TypeScript extensions through native runtime modules instead of embedding jiti, preserving host-module identity and fresh dependency graphs on reload. Computed imports and requires share their generation, unused graphs can be reclaimed, native data imports keep Bun's loaders, and parser errors retain source locations. Node runtimes retain their existing jiti options and load only their own importer when needed ([#1656](https://github.com/code-yeongyu/senpi/issues/1656)).
|
|
555
582
|
|
|
556
|
-
|
|
557
583
|
### Fixed
|
|
558
584
|
|
|
559
585
|
- Fixed background processes surviving shutdown when the shell that started them exited first: the bash tool now keeps owning a command's process group until its last descendant is gone, so `sleep 30 &` or `nohup server &` is killed by shutdown cleanup instead of being orphaned. Tracked groups that have drained are pruned, and a group whose leader already exited is never re-signalled by bare pid ([#1697](https://github.com/code-yeongyu/senpi/issues/1697)).
|
|
@@ -584,11 +610,8 @@
|
|
|
584
610
|
|
|
585
611
|
### Added
|
|
586
612
|
|
|
587
|
-
|
|
588
613
|
- Added `PI_SESSION_CWD` and `PI_GOAL_STORE_FILE` to the extension session environment, exposing the session working directory and authoritative goal-store file to kernels and shell children while clearing inherited stale values (fixes #1663).
|
|
589
614
|
|
|
590
|
-
|
|
591
|
-
|
|
592
615
|
- Added a pending-question queue in the interactive TUI: concurrent async questions stay open instead of superseding one another, the widget shows the pending count with `+N more`, `alt+down` cycles requests from an empty composer, and each request keeps its own draft and idle deadline ([#1645](https://github.com/code-yeongyu/senpi/issues/1645)).
|
|
593
616
|
|
|
594
617
|
- Added a faster answer path: a valid digit on an empty composer answers the shown question (a single-question single-select request submits immediately), `alt+up` joins `alt+a` for opening it, `/answer` lists or opens a specific request, and typed or pasted text binds to one request with a `↳ reply to <header>` composer label ([#1645](https://github.com/code-yeongyu/senpi/issues/1645)).
|
|
@@ -597,7 +620,6 @@
|
|
|
597
620
|
|
|
598
621
|
- Added compact answered-question chips in the transcript: an answered, commented, dismissed or timed-out question renders as `↳ <header>: <answer>` and expands to the original message on click ([#1645](https://github.com/code-yeongyu/senpi/issues/1645)).
|
|
599
622
|
|
|
600
|
-
|
|
601
623
|
- Added the TUI foundation for host-leased regular-mode mouse clicks, with fail-closed frame anchoring and private cursor-position calibration; native selection and scrollback remain unchanged when no lease is active ([#1645](https://github.com/code-yeongyu/senpi/issues/1645)).
|
|
602
624
|
|
|
603
625
|
- Added `@code-yeongyu/senpi/bun-runtime` with synchronous, once-per-isolate provider and OAuth registration for standalone Bun consumers; later provider overrides survive repeated registration ([#1656](https://github.com/code-yeongyu/senpi/issues/1656)).
|
|
@@ -854,8 +876,6 @@
|
|
|
854
876
|
|
|
855
877
|
- The Claude SDK OAuth lane no longer hands the Claude Agent SDK an executable path it has not verified is spawnable. `CLAUDE_CODE_EXECUTABLE`, the compiled-Bun extraction, the platform sidecar packages (resolved from the same `@anthropic-ai/claude-agent-sdk` instance senpi imports, walking parents so a sidecar hoisted above it is found) and finally `claude` on `PATH` (honouring `PATHEXT` on Windows, files only, no shell) are each accepted only when the exact string passed to the SDK is an absolute path to a regular file in this process; on Windows that string carries the `\?\` namespace prefix so a path Explorer can see but `CreateProcess` rejects still launches. When nothing is spawnable the turn fails with senpi's own error naming every candidate tried instead of the SDK's generic `Claude Code native binary not found`, and `describeClaudeLane()` reports the same resolution plus the Bun/Node runtime for doctor surfaces ([#1541](https://github.com/code-yeongyu/senpi/issues/1541)).
|
|
856
878
|
|
|
857
|
-
|
|
858
|
-
|
|
859
879
|
- OpenAI Codex multi-account: a login started with `/gpt-account add` is no longer bound to the streaming turn's abort signal, so Esc, steering or a timeout on the response cannot kill the browser or device-code login; the login is cancelled only by dismissing its own dialog or re-issuing the command. Cancelling a `/login` or API-key dialog now prints a neutral `Login cancelled` status instead of `Failed to login to <provider>: This operation was aborted`, and only a genuine provider, network or OAuth error is rendered as a failure. The `auth.json` lock is no longer held across the OAuth token exchange: the refresh runs outside the lock and is compare-and-swapped on the slot's refresh token, so several accounts refreshing at once no longer fail with `CredentialStoreBusyError`, and a catalog refresh for the same provider joins an in-flight token refresh instead of aborting it ([#1542](https://github.com/code-yeongyu/senpi/issues/1542)).
|
|
860
880
|
|
|
861
881
|
- The published package is Bun-compile-safe on its own: publish staging inlines css-tree's `data/patch.json`, mdn-data dictionaries and version, which css-tree otherwise resolves through `createRequire(import.meta.url)` at module scope. A binary compiled from the tarball previously died on the first `webfetch` markdown or text conversion with `Cannot find module '../data/patch.json'`; jsdom's binary-only worker rewrite deliberately stays out of the tarball so a plain Bun consumer keeps jsdom's own lookup ([#1540](https://github.com/code-yeongyu/senpi/pull/1540)).
|
package/dist/bundle/chunks/{anthropic-messages-2P7APOOQ.js → anthropic-messages-V4CUY3UU.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url); { const __piWorkerThreads = require("node:worker_threads"); if (typeof __piWorkerThreads.markAsUncloneable !== "function") { __piWorkerThreads.markAsUncloneable = () => {}; } }
|
|
2
|
-
import{
|
|
2
|
+
import{normalizeToolCallId}from"./chunk-M4NQKQUK.js";import{isForcedToolChoiceUnsupportedError,omitToolChoiceParam}from"./chunk-NQAVM5XL.js";import{resolveCloudflareBaseUrl}from"./chunk-7JUSTYYH.js";import{buildCopilotDynamicHeaders,hasCopilotVisionInput}from"./chunk-PUWVIQW6.js";import{getPiUserAgent}from"./chunk-QTG7MY2X.js";import{retryProviderRequest}from"./chunk-ZTVQY5V6.js";import{combineAbortSignals}from"./chunk-SJ5DSOBX.js";import{splitDeferredTools}from"./chunk-HK46JMSC.js";import{ANTHROPIC_RESERVED_BODY_KEYS,adjustMaxTokensForThinking,buildBaseOptions,clampMaxTokensToContext}from"./chunk-AJ722VIQ.js";import{applyServerFallbackAbort,applyServerFallbackContinuation,parseServerFallbackReceipt,parseStickyFallbackReceipt,sanitizeAnthropicToolPairs}from"./chunk-X4Q5YSTE.js";import{resolveRootObjectSchema}from"./chunk-IXAUDPOK.js";import{getAnthropicCompat,isAnthropicApiBaseUrl}from"./chunk-VJRKO7IM.js";import{registerSessionResourceCleanup}from"./chunk-WVGCQOLJ.js";import{appendRetryAfterMsMarker,extract429RetryAfterMs}from"./chunk-BPX6QWPD.js";import{calculateCost,getJsonSchemaToolParameters,isVideoMimeType,resolveJsonSchemaStrictSampling,transformMessages}from"./chunk-DY6FUAWH.js";import{sanitizeSurrogates}from"./chunk-WDTJ6JKE.js";import{getProviderEnvValue}from"./chunk-5ROMKDLK.js";import{parseJsonWithRepair,parseStreamingJson}from"./chunk-3W47LTXQ.js";import{AssistantMessageEventStream,appendAssistantMessageDiagnostic}from"./chunk-DMI55M2N.js";import{headersToRecord,providerHeadersToRecord}from"./chunk-BQVVQ2LQ.js";import{Anthropic}from"./chunk-PUTWVHNH.js";import"./chunk-IKOFCODM.js";var MAX_MESSAGE_CHARS=500,QUOTA_WORDING_PATTERN=/exceeded_current_quota_error|insufficient\s+balance|credits?_required|quota|billing/i,IMAGE_FORMAT_PATTERN=/unsupported image format|unsupported media type for base64 image|invalid data url for image/i;function sdkErrorClassName(error){if(!(error instanceof Error))return;let name=error.constructor?.name;return typeof name=="string"&&name.length>0?name:void 0}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}function toShaped(error){return error instanceof Error?error:void 0}function numericStatus(shaped){let status=shaped?.status;return typeof status=="number"&&Number.isFinite(status)?status:void 0}function headerObject(shaped){return shaped?.headers instanceof Headers?shaped.headers:void 0}function nestedProviderCodes(body){if(!isRecord(body))return;let inner=body.error;if(!isRecord(inner))return;let codes=[];for(let key of["type","code"]){let value=inner[key];typeof value=="string"&&value.length>0&&codes.push(value)}return codes.length>0?codes:void 0}function parseLeadingJson(text){let candidate=text.slice(text.indexOf("{"),text.lastIndexOf("}")+1);if(!(!candidate.startsWith("{")||!candidate.endsWith("}")))try{return JSON.parse(candidate)}catch{return}}function quotaWording(shaped,bodyText){return[shaped?.message,bodyText].some(text=>typeof text=="string"&"A_WORDING_PATTERN.test(text))}function normalizeAnthropicRetryFailure(error,context){let message=error instanceof Error?error.message:String(error),shaped=toShaped(error),status=numericStatus(shaped),headers=headerObject(shaped),bodyText=context?.bodyText??message,kind,providerCodes;if(error instanceof Error&&error.name==="AbortError")kind="abort";else if(sdkErrorClassName(error)==="APIConnectionTimeoutError")kind="timeout";else if(sdkErrorClassName(error)==="APIConnectionError")kind="connection";else if(typeof message=="string"&&IMAGE_FORMAT_PATTERN.test(message))kind="image-format";else if(status!==void 0)kind=status===429&"aWording(shaped,bodyText)?"quota-exhausted":"http-status",providerCodes=nestedProviderCodes(shaped?.error);else{let parsed=parseLeadingJson(bodyText);providerCodes=nestedProviderCodes(parsed),kind=providerCodes!==void 0?"provider":"unknown"}let retryAfterMs=extract429RetryAfterMs({status,headers,bodyText}),shouldRetryHeader=headers?.get("x-should-retry"),shouldRetry=shouldRetryHeader==="true"?!0:shouldRetryHeader==="false"?!1:void 0;return{origin:"anthropic-messages",kind,message:message.slice(0,MAX_MESSAGE_CHARS),...status!==void 0?{statusCode:status}:{},...providerCodes!==void 0?{providerCodes}:{},...retryAfterMs!==void 0?{retryAfterMs}:{},...shouldRetry!==void 0?{shouldRetry}:{}}}function escapeXmlAttribute(value){return value.replaceAll("&","&").replaceAll('"',""").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">")}function availableToolGuidance(availableToolNames){if(availableToolNames.length===0)return"To edit files, call only tools available in this request.";let listed=availableToolNames.slice(0,8).join(", "),omitted=availableToolNames.length-8,suffix=omitted>0?` (and ${omitted} more)`:"";return`To edit files, call your own tools: ${listed}${suffix}.`}function demotedToolCallText(name,availableToolNames,firstOccurrence){let escapedName=escapeXmlAttribute(name);return firstOccurrence?[`<unavailable-tool-call name="${escapedName}">`,"Transcript record, not an action available to you. An earlier model in this session",`called "${escapedName}"; that tool does not exist for you and its input is omitted.`,availableToolGuidance(availableToolNames),"</unavailable-tool-call>"].join(`
|
|
3
3
|
`):`<unavailable-tool-call name="${escapedName}"/>`}function demotedToolResultText(name,content){let escapedName=escapeXmlAttribute(name),safeContent=content.replace(/<\/unavailable-tool-result/gi,match=>`<${match.slice(1)}`);return`<unavailable-tool-result name="${escapedName}">${safeContent}</unavailable-tool-result>`}function isRecord2(value){return typeof value=="object"&&value!==null}var GATEWAY_TOOL_NAMESPACE=/^mcp__[^_]+__(.+)$/;function foldToolNameKey(name){return name.toLowerCase().replaceAll(/[-_]/g,"")}function collectAvailableToolNames(tools){let defined=new Set;if(Array.isArray(tools))for(let tool of tools)isRecord2(tool)&&typeof tool.name=="string"&&defined.add(tool.name);let folded=new Map,ambiguous=new Set;for(let name of defined){let key=foldToolNameKey(name);folded.has(key)?ambiguous.add(key):folded.set(key,name)}for(let key of ambiguous)folded.delete(key);return{defined,folded}}function resolveAvailableToolName(name,available){let suffix=GATEWAY_TOOL_NAMESPACE.exec(name)?.[1],candidates=suffix===void 0?[name]:[name,suffix];for(let candidate of candidates)if(available.defined.has(candidate))return candidate;for(let candidate of candidates){let folded=available.folded.get(foldToolNameKey(candidate));if(folded!==void 0)return folded}}function isNativeToolSearchResultBlock(block){return isRecord2(block)&&block.type==="tool_search_tool_result"&&typeof block.tool_use_id=="string"&&isRecord2(block.content)&&Array.isArray(block.content.tool_references)}function demoteUnavailableToolReferences(params){let messages=params.messages;if(!Array.isArray(messages)||messages.length===0)return params;let available=collectAvailableToolNames(params.tools),resolve=name=>resolveAvailableToolName(name,available),demotedCallNames=new Map,renamedCallNames=new Map;for(let message of messages)if(!(message.role!=="assistant"||!Array.isArray(message.content)))for(let block of message.content){if(!isRecord2(block)||block.type!=="tool_use"||typeof block.name!="string")continue;let resolved=resolve(block.name);resolved===void 0?demotedCallNames.set(block.id,block.name):resolved!==block.name&&renamedCallNames.set(block.id,resolved)}let changed=!1,availableToolNames=[...available.defined],seenDemotedCallNames=new Set,rewrittenMessages=[];for(let message of messages){if(!Array.isArray(message.content)){rewrittenMessages.push(message);continue}let messageChanged=!1,droppedSearchUseIds=new Set,droppedSearchNames=new Map;if(message.role==="assistant")for(let block of message.content){if(!isNativeToolSearchResultBlock(block))continue;let names=block.content.tool_references.filter(item=>isRecord2(item)&&item.type==="tool_reference").map(item=>typeof item.tool_name=="string"?item.tool_name:"");names.length>0&&names.every(name=>resolve(name)===void 0)&&(droppedSearchUseIds.add(block.tool_use_id),droppedSearchNames.set(block.tool_use_id,names))}let content=[];for(let block of message.content){if(message.role==="assistant"&&isRecord2(block)&&block.type==="tool_use"){let demotedName=demotedCallNames.get(block.id);if(demotedName!==void 0){messageChanged=!0;let firstOccurrence=!seenDemotedCallNames.has(demotedName);seenDemotedCallNames.add(demotedName),content.push({type:"text",text:demotedToolCallText(demotedName,availableToolNames,firstOccurrence)});continue}let renamedName=renamedCallNames.get(block.id);if(renamedName!==void 0){messageChanged=!0,content.push({...block,name:renamedName});continue}}if(message.role==="assistant"&&isRecord2(block)&&block.type==="server_tool_use"&&typeof block.id=="string"&&droppedSearchUseIds.has(block.id)){messageChanged=!0;continue}if(message.role==="assistant"&&isNativeToolSearchResultBlock(block)){let omitted=droppedSearchNames.get(block.tool_use_id);if(omitted!==void 0){messageChanged=!0,content.push({type:"text",text:`Tool reference unavailable: ${[...new Set(omitted)].join(", ")}`});continue}let rewritten=rewriteToolReferenceItems(block.content.tool_references,resolve);if(rewritten!==void 0){messageChanged=!0,content.push({...block,content:{...block.content,tool_references:rewritten.kept}});continue}}if(isRecord2(block)&&block.type==="tool_result"){let demotedName=demotedCallNames.get(block.tool_use_id);if(demotedName!==void 0){messageChanged=!0,content.push({type:"text",text:demotedToolResultText(demotedName,toolResultText(block.content))});continue}if(Array.isArray(block.content)){let rewritten=rewriteToolReferenceItems(block.content,resolve);if(rewritten!==void 0){messageChanged=!0;let nextContent=rewritten.kept.length>0?rewritten.kept:[{type:"text",text:`Tool reference unavailable: ${[...new Set(rewritten.omitted)].join(", ")}`}];content.push({...block,content:nextContent});continue}}}content.push(block)}if(content.length===0){changed=!0;continue}if(messageChanged){changed=!0,rewrittenMessages.push({...message,content});continue}rewrittenMessages.push(message)}return changed?{...params,messages:rewrittenMessages}:params}function rewriteToolReferenceItems(items,resolve){let kept=[],omitted=[],rewritten=!1;for(let item of items){if(!isRecord2(item)||item.type!=="tool_reference"||typeof item.tool_name!="string"){kept.push(item);continue}let resolved=resolve(item.tool_name);if(resolved===void 0){omitted.push(item.tool_name),rewritten=!0;continue}if(resolved!==item.tool_name){kept.push({...item,tool_name:resolved}),rewritten=!0;continue}kept.push(item)}return rewritten?{kept,omitted}:void 0}function toolResultText(content){if(typeof content=="string")return content;if(Array.isArray(content)){let parts=[];for(let item of content)isRecord2(item)&&(item.type==="text"&&typeof item.text=="string"?parts.push(item.text):typeof item.type=="string"&&parts.push(`[${item.type}]`));if(parts.length>0)return parts.join(`
|
|
4
4
|
`)}return"Tool output unavailable."}function resolveCacheRetention(cacheRetention,env,fallback="short"){return cacheRetention||(getProviderEnvValue("PI_CACHE_RETENTION",env)==="long"?"long":typeof process<"u"&&process.env.PI_CACHE_RETENTION!==void 0?"short":fallback)}function getCacheControl(model,cacheRetention,env){let retention=resolveCacheRetention(cacheRetention,env,"short");if(retention==="none")return{retention};let ttl=retention==="long"&&isAnthropicApiBaseUrl(model.baseUrl)&&getAnthropicCompat(model).supportsLongCacheRetention?"1h":void 0;return{retention,cacheControl:{type:"ephemeral",...ttl&&{ttl}}}}var claudeCodeVersion="2.1.251",claudeCodeTools=["Read","Write","Edit","Bash","Grep","Glob","AskUserQuestion","EnterPlanMode","ExitPlanMode","KillShell","NotebookEdit","Skill","Task","TaskOutput","TodoWrite","WebFetch","WebSearch"],ccToolLookup=new Map(claudeCodeTools.map(t=>[t.toLowerCase(),t])),ccToolAliases=new Map([["ask_user_question","AskUserQuestion"]]),toClaudeCodeName=name=>ccToolAliases.get(name)??ccToolLookup.get(name.toLowerCase())??name,fromClaudeCodeName=(name,tools)=>{if(tools&&tools.length>0){let alias=[...ccToolAliases].find(([,wireName])=>wireName===name);if(alias&&tools.some(tool=>tool.name===alias[0]))return alias[0];let lowerName=name.toLowerCase(),matchedTool=tools.find(tool=>tool.name.toLowerCase()===lowerName);if(matchedTool)return matchedTool.name}return name};function convertContentBlocks(content){if(!content.some(c=>c.type==="image"))return sanitizeSurrogates(content.map(c=>c.text).join(`
|
|
5
5
|
`));let blocks=content.map(block=>block.type==="text"?{type:"text",text:sanitizeSurrogates(block.text)}:isVideoMimeType(block.mimeType)?{type:"video",source:{type:"base64",media_type:block.mimeType,data:block.data}}:{type:"image",source:{type:"base64",media_type:block.mimeType,data:block.data}});return blocks.some(b=>b.type==="text")||blocks.unshift({type:"text",text:"(see attached image)"}),blocks}var FINE_GRAINED_TOOL_STREAMING_BETA="fine-grained-tool-streaming-2025-05-14",INTERLEAVED_THINKING_BETA="interleaved-thinking-2025-05-14",COMPUTER_USE_BETA_PREFIX="computer-use-",NATIVE_COMPUTER_TOOL_TYPE="computer_20250124",ADAPTIVE_THINKING_MODEL_MARKERS=["opus-4-6","opus-4-7","opus-4-8","opus-5","sonnet-4-6","sonnet-5","fable-5","mythos-5"],NATIVE_XHIGH_EFFORT_MODEL_MARKERS=["opus-4-7","opus-4-8","opus-5","sonnet-5","fable-5","mythos-5"],DISABLED_THINKING_REJECTING_MODEL_MARKERS=["fable-5","mythos-5"],UNSUPPORTED_NATIVE_COMPUTER_TOOL_MODEL_MARKERS=["opus-4-6","opus-4.6","opus-4-7","opus-4.7","opus-4-8","opus-4.8"],SERVER_SIDE_FALLBACK_BETA="server-side-fallback-2026-07-01";function shouldUseServerSideFallbackBeta(model){return(model.compat?.allowedFallbackModels?.length??0)>0}var MID_CONVERSATION_OUTPUT_CONFIG_BETA="mid-conversation-output-config-2026-07-01",THINKING_BINDING_CONTROLS_BETA="thinking-binding-controls-2026-08-01",unsignedThinkingTextReplayFallbacks=new Set;registerSessionResourceCleanup(sessionId=>{if(sessionId===void 0){unsignedThinkingTextReplayFallbacks.clear();return}let prefix=`${sessionId}\0`;for(let key of unsignedThinkingTextReplayFallbacks)key.startsWith(prefix)&&unsignedThinkingTextReplayFallbacks.delete(key)});function unsignedThinkingFallbackKey(model,sessionId){return sessionId===void 0?void 0:`${sessionId}\0${model.baseUrl}\0${model.id}`}function isInvalidUnsignedThinkingSignatureError(error){return typeof error=="object"&&error!==null&&"status"in error&&error.status===400&&error instanceof Error&&/Invalid signature in thinking block/i.test(error.message)}function mergeHeaders(...headerSources){let merged={};for(let headers of headerSources)headers&&Object.assign(merged,headers);return merged}function mergeClientHeaders(_model,...headerSources){return mergeHeaders({"User-Agent":getPiUserAgent()},...headerSources)}function hasHeader(headers,name){if(!headers)return!1;let expected=name.toLowerCase();for(let[key,value]of Object.entries(headers))if(key.toLowerCase()===expected&&value!==null&&value.trim().length>0)return!0;return!1}function assertRequestAuth(provider,apiKey,headers){if(!apiKey&&!(hasHeader(headers,"authorization")||hasHeader(headers,"x-api-key")||hasHeader(headers,"cf-aig-authorization")))throw new Error(`No API key for provider: ${provider}`)}function isRecord3(value){return typeof value=="object"&&value!==null}var REPLAYABLE_ANTHROPIC_PROVIDER_NATIVE_TYPES=new Set(["server_tool_use","web_search_tool_result","web_fetch_tool_result","code_execution_tool_result","bash_code_execution_tool_result","text_editor_code_execution_tool_result","tool_search_tool_result","container_upload"]);function isReplayableAnthropicProviderNativeBlock(raw){return isRecord3(raw)&&typeof raw.type=="string"&&REPLAYABLE_ANTHROPIC_PROVIDER_NATIVE_TYPES.has(raw.type)}function isSameAnthropicModel(message,model){return message.provider===model.provider&&message.api===model.api&&message.model===model.id}function isAnthropicFallbackMarkerBlock(block){return block.type==="providerNative"&&block.subtype==="fallback"&&isRecord3(block.raw)&&block.raw.type==="fallback"}function lastAnthropicFallbackBoundary(content){let boundary=-1;for(let index=0;index<content.length;index++)isAnthropicFallbackMarkerBlock(content[index])&&(boundary=index);return boundary}function isAnthropicServerToolUseBlock(raw){return isRecord3(raw)&&raw.type==="server_tool_use"&&typeof raw.id=="string"}function isProviderNativeToolUseBlock(raw){return isRecord3(raw)&&(raw.type==="server_tool_use"||raw.type==="mcp_tool_use")}function isAnthropicWebSearchReplayBlock(raw){return isRecord3(raw)?raw.type==="web_search_tool_result"?!0:raw.type==="server_tool_use"&&raw.name==="web_search":!1}function userMessageClosesServerTurn(message){return typeof message.content=="string"?message.content.trim().length>0:message.content.some(block=>block.type==="text"&&block.text.trim().length>0||block.type==="image")}function collectProviderNativeToolPairing(messages,model,deferredToolNames,normalizeToolName,discardedFallbackToolCallIds){let resolvedUseIds=new Set,validResultIds=new Set,pendingUseIds=new Set,loadedReferenceNames=new Set;for(let message of messages){if(message.role==="assistant"){let priorUseIds=pendingUseIds;if(pendingUseIds=new Set,!isSameAnthropicModel(message,model))continue;for(let block of message.content){if(block.type!=="providerNative"||!isRecord3(block.raw))continue;let raw=block.raw;typeof raw.type!="string"||!REPLAYABLE_ANTHROPIC_PROVIDER_NATIVE_TYPES.has(raw.type)||isProviderNativeToolUseBlock(raw)&&typeof raw.id=="string"&&pendingUseIds.add(raw.id)}for(let block of message.content){if(block.type!=="providerNative"||!isRecord3(block.raw))continue;let raw=block.raw;if(typeof raw.type!="string"||!REPLAYABLE_ANTHROPIC_PROVIDER_NATIVE_TYPES.has(raw.type))continue;let toolUseId=raw.tool_use_id;typeof toolUseId=="string"&&(priorUseIds.has(toolUseId)||pendingUseIds.has(toolUseId))&&(resolvedUseIds.add(toolUseId),validResultIds.add(toolUseId))}continue}if(message.role==="toolResult"){if(discardedFallbackToolCallIds.has(message.toolCallId))continue;let emitsReferences=!1;for(let name of message.addedToolNames??[]){let normalizedName=normalizeToolName(name);!deferredToolNames.has(normalizedName)||loadedReferenceNames.has(normalizedName)||(loadedReferenceNames.add(normalizedName),emitsReferences=!0)}emitsReferences&&(pendingUseIds=new Set);continue}message.role==="user"&&userMessageClosesServerTurn(message)&&(pendingUseIds=new Set)}return{resolvedUseIds,liveUseIds:pendingUseIds,validResultIds}}function isUnpairedProviderNativeToolBlock(raw,pairing){if(!isRecord3(raw))return!1;if(isProviderNativeToolUseBlock(raw))return typeof raw.id!="string"||!(pairing.resolvedUseIds.has(raw.id)||pairing.liveUseIds.has(raw.id));let toolUseId=raw.tool_use_id;return typeof toolUseId=="string"&&!pairing.validResultIds.has(toolUseId)}function pairedServerToolUseIdsBeforeBoundary(content,boundary){let paired=new Set;for(let index=0;index<boundary;index++){let block=content[index];if(block.type!=="providerNative"||!isRecord3(block.raw))continue;let toolUseId=block.raw.tool_use_id;typeof toolUseId=="string"&&paired.add(toolUseId)}return paired}function collectDiscardedFallbackToolCallIds(messages,model){let discarded=new Set;for(let message of messages){if(message.role!=="assistant"||!isSameAnthropicModel(message,model))continue;let boundary=lastAnthropicFallbackBoundary(message.content);if(!(boundary<0))for(let index=0;index<boundary;index++){let block=message.content[index];block.type==="toolCall"&&discarded.add(block.id)}}return discarded}function stringRecord(value){if(!isRecord3(value))return;let entries=Object.entries(value);if(!entries.some(([,item])=>typeof item!="string"))return Object.fromEntries(entries)}function isForcedAnthropicToolChoice(toolChoice){return isRecord3(toolChoice)&&(toolChoice.type==="any"||toolChoice.type==="tool")}function extractPayloadRequestMetadata(params){let payload=params,headers=stringRecord(payload.headers);if(!("headers"in payload)&&!("extra_body"in payload))return headers?{params,headers}:{params};let stripped={...payload};return delete stripped.headers,delete stripped.extra_body,headers?{params:stripped,headers}:{params:stripped}}function removeAnthropicBetaHeaders(headers,shouldRemoveBeta){if(!headers)return{changed:!1};let nextHeaders={},changed=!1;for(let[key,value]of Object.entries(headers)){if(key.toLowerCase()!=="anthropic-beta"||value===null){nextHeaders[key]=value;continue}let betas=value.split(",").map(beta=>beta.trim()).filter(beta=>beta.length>0),supportedBetas=betas.filter(beta=>!shouldRemoveBeta(beta));changed=changed||supportedBetas.length!==betas.length,supportedBetas.length>0&&(nextHeaders[key]=supportedBetas.join(", "))}return changed?{changed:!0,headers:Object.keys(nextHeaders).length>0?nextHeaders:void 0}:{changed:!1,headers}}function removeComputerUseBetaHeader(headers){return removeAnthropicBetaHeaders(headers,beta=>beta.startsWith(COMPUTER_USE_BETA_PREFIX))}function sanitizeAdaptiveThinkingHeaders(model,headers){if(!supportsAdaptiveThinking(model))return headers;let headerSanitization=removeAnthropicBetaHeaders(headers,beta=>beta===INTERLEAVED_THINKING_BETA);return headerSanitization.changed?headerSanitization.headers??{}:headers}function rejectsNativeComputerTool(model,toolType){return model.provider==="cloudflare-ai-gateway"&&model.baseUrl.includes("anthropic")?toolType.startsWith("computer_"):matchesModelMarker(model,UNSUPPORTED_NATIVE_COMPUTER_TOOL_MODEL_MARKERS)&&toolType===NATIVE_COMPUTER_TOOL_TYPE}function rejectsComputerUseBeta(model){return model.provider==="cloudflare-ai-gateway"&&model.baseUrl.includes("anthropic")||matchesModelMarker(model,UNSUPPORTED_NATIVE_COMPUTER_TOOL_MODEL_MARKERS)}function isAnthropicWebSearchToolType(toolType){return toolType.startsWith("web_search_")}function sanitizeUnsupportedNativeTools(model,params){let payload=params,headers=stringRecord(payload.headers),headerSanitization=rejectsComputerUseBeta(model)?removeComputerUseBetaHeader(headers):{changed:!1},rejectsNativeWebSearch=!getAnthropicCompat(model).supportsWebSearch,tools=payload.tools,sanitized={...payload},changed=!1;if(Array.isArray(tools)){let supportedTools=[];for(let tool of tools){let hookTool=tool;if(isRecord3(hookTool)&&typeof hookTool.type=="string"&&(rejectsNativeComputerTool(model,hookTool.type)||rejectsNativeWebSearch&&isAnthropicWebSearchToolType(hookTool.type))){changed=!0;continue}supportedTools.push(tool)}changed&&(supportedTools.length>0?sanitized.tools=supportedTools:delete sanitized.tools)}if(headerSanitization.changed&&(changed=!0,headerSanitization.headers?sanitized.headers=headerSanitization.headers:delete sanitized.headers),changed&&isRecord3(sanitized.tool_choice)){let toolChoiceName=sanitized.tool_choice.name,hasSelectedTool=typeof toolChoiceName=="string"&&Array.isArray(sanitized.tools)&&sanitized.tools.some(tool=>isRecord3(tool)&&tool.name===toolChoiceName);(sanitized.tools===void 0||typeof toolChoiceName=="string"&&!hasSelectedTool)&&delete sanitized.tool_choice}return changed?sanitized:params}function httpStatusOfError(error){if(!isRecord3(error))return;let status=error.status;return typeof status=="number"&&Number.isInteger(status)&&status>=100&&status<600?status:void 0}function sanitizeAdaptiveThinkingPayload(model,params,options){if(!supportsAdaptiveThinking(model))return params;let payload=params,headers=stringRecord(payload.headers),headerSanitization=removeAnthropicBetaHeaders(headers,beta=>beta===INTERLEAVED_THINKING_BETA),sanitized={...payload},changed=!1,thinking=isRecord3(payload.thinking)?payload.thinking:void 0;if(thinking?.type==="enabled"){let display=thinking.display==="omitted"||thinking.display==="summarized"?thinking.display:options?.thinkingDisplay??"summarized";sanitized.thinking={type:"adaptive",display},options?.effort!==void 0&&!isRecord3(payload.output_config)&&(sanitized.output_config={effort:options.effort}),changed=!0}return headerSanitization.changed&&(changed=!0,headerSanitization.headers?sanitized.headers=headerSanitization.headers:delete sanitized.headers),changed?sanitized:params}function isCacheableUserContentBlock(block){return block?.type==="text"||block?.type==="image"||block?.type==="tool_result"}function appendUserBlocks(params,newBlocks){if(newBlocks.length===0)return;let lastParam=params[params.length-1];lastParam?.role==="user"?typeof lastParam.content=="string"?lastParam.content=[{type:"text",text:lastParam.content},...newBlocks]:Array.isArray(lastParam.content)&&lastParam.content.push(...newBlocks):params.push({role:"user",content:newBlocks})}function isToolLoopContinuation(messages){let tail=messages[messages.length-1],preceding=messages[messages.length-2];return tail?.role==="user"&&Array.isArray(tail.content)&&tail.content.some(block=>block.type==="tool_result")&&preceding?.role==="assistant"&&Array.isArray(preceding.content)&&preceding.content.some(block=>block.type==="tool_use")}function markUserMessageCacheCheckpoint(message,cacheControl){if(message.role!=="user")return!1;if(Array.isArray(message.content)){let lastBlock=message.content[message.content.length-1];return isCacheableUserContentBlock(lastBlock)?(lastBlock.cache_control=cacheControl,!0):!1}return typeof message.content=="string"?(message.content=[{type:"text",text:message.content,cache_control:cacheControl}],!0):!1}var ANTHROPIC_MESSAGE_EVENTS=new Set(["message_start","message_delta","message_stop","content_block_start","content_block_delta","content_block_stop"]);function flushSseEvent(state){if(!state.event&&state.data.length===0)return null;let event={event:state.event,data:state.data.join(`
|