yepanywhere 0.6.2 → 0.8.0
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/README.md +63 -67
- package/bundled/@yep-anywhere/shared/dist/__tests__/relay-mux.test.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/relay-mux.test.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/relay-mux.test.js +43 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/relay-mux.test.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/server-capabilities.test.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/server-capabilities.test.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/server-capabilities.test.js +220 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/server-capabilities.test.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/agent-context.d.ts +1 -1
- package/bundled/@yep-anywhere/shared/dist/agent-context.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/agent-context.js +1 -1
- package/bundled/@yep-anywhere/shared/dist/agent-context.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts +88 -4
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.js +340 -2
- package/bundled/@yep-anywhere/shared/dist/app-types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/binary-framing.d.ts +36 -2
- package/bundled/@yep-anywhere/shared/dist/binary-framing.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/binary-framing.js +155 -4
- package/bundled/@yep-anywhere/shared/dist/binary-framing.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.d.ts +12 -0
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/capability-ids.d.ts +344 -0
- package/bundled/@yep-anywhere/shared/dist/capability-ids.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/capability-ids.js +368 -0
- package/bundled/@yep-anywhere/shared/dist/capability-ids.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.d.ts +19 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.js +58 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.d.ts +30 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.d.ts +9 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.js +16 -3
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts +57 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts +161 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js +53 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.d.ts +29 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.js +63 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts +513 -2
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js +3 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts +16 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-steering.d.ts +10 -0
- package/bundled/@yep-anywhere/shared/dist/claude-steering.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-steering.js +51 -0
- package/bundled/@yep-anywhere/shared/dist/claude-steering.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.d.ts +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.js +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts +189 -4
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js +66 -1
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.d.ts +3 -3
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.js +7 -3
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.js +1 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/git-status.d.ts +302 -7
- package/bundled/@yep-anywhere/shared/dist/git-status.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/git-status.js +1 -1
- package/bundled/@yep-anywhere/shared/dist/git-status.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/glossary/compiler.d.ts +3 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/compiler.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/compiler.js +308 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/compiler.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/index.d.ts +6 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/index.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/markdown.d.ts +16 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/markdown.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/markdown.js +434 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/markdown.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/matcher.d.ts +4 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/matcher.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/matcher.js +124 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/matcher.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/normalization.d.ts +10 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/normalization.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/normalization.js +155 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/normalization.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/types.d.ts +142 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/types.js +14 -0
- package/bundled/@yep-anywhere/shared/dist/glossary/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/heartbeat.d.ts +19 -0
- package/bundled/@yep-anywhere/shared/dist/heartbeat.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/heartbeat.js +5 -0
- package/bundled/@yep-anywhere/shared/dist/heartbeat.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-agent-processes.d.ts +36 -0
- package/bundled/@yep-anywhere/shared/dist/host-agent-processes.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-agent-processes.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/host-agent-processes.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.d.ts +27 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.js +19 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.d.ts +12 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.js +26 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/idle-reap.d.ts +8 -0
- package/bundled/@yep-anywhere/shared/dist/idle-reap.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/idle-reap.js +18 -0
- package/bundled/@yep-anywhere/shared/dist/idle-reap.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts +36 -10
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/index.js +33 -8
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.d.ts +17 -0
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.js +90 -0
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/linear-regex.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/linear-regex.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/linear-regex.js +362 -0
- package/bundled/@yep-anywhere/shared/dist/linear-regex.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/markdown-files.d.ts +5 -0
- package/bundled/@yep-anywhere/shared/dist/markdown-files.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/markdown-files.js +26 -0
- package/bundled/@yep-anywhere/shared/dist/markdown-files.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/nested-harness-launch.d.ts +29 -0
- package/bundled/@yep-anywhere/shared/dist/nested-harness-launch.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/nested-harness-launch.js +243 -0
- package/bundled/@yep-anywhere/shared/dist/nested-harness-launch.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.d.ts +41 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.js +14 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.d.ts +9 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/project-code-names.d.ts +15 -0
- package/bundled/@yep-anywhere/shared/dist/project-code-names.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/project-code-names.js +78 -0
- package/bundled/@yep-anywhere/shared/dist/project-code-names.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/project-path-links.d.ts +19 -0
- package/bundled/@yep-anywhere/shared/dist/project-path-links.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/project-path-links.js +50 -0
- package/bundled/@yep-anywhere/shared/dist/project-path-links.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/project-queue.d.ts +5 -1
- package/bundled/@yep-anywhere/shared/dist/project-queue.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/project-queue.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/provider-subscription-usage.d.ts +39 -0
- package/bundled/@yep-anywhere/shared/dist/provider-subscription-usage.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/provider-subscription-usage.js +21 -0
- package/bundled/@yep-anywhere/shared/dist/provider-subscription-usage.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/public-shares.d.ts +100 -2
- package/bundled/@yep-anywhere/shared/dist/public-shares.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/public-shares.js +94 -1
- package/bundled/@yep-anywhere/shared/dist/public-shares.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/relay-mux.d.ts +58 -0
- package/bundled/@yep-anywhere/shared/dist/relay-mux.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/relay-mux.js +116 -0
- package/bundled/@yep-anywhere/shared/dist/relay-mux.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/relay.d.ts +11 -3
- package/bundled/@yep-anywhere/shared/dist/relay.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/relay.js +7 -1
- package/bundled/@yep-anywhere/shared/dist/relay.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/review-comments.d.ts +355 -0
- package/bundled/@yep-anywhere/shared/dist/review-comments.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/review-comments.js +857 -0
- package/bundled/@yep-anywhere/shared/dist/review-comments.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/security-clients.d.ts +1070 -0
- package/bundled/@yep-anywhere/shared/dist/security-clients.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/security-clients.js +330 -0
- package/bundled/@yep-anywhere/shared/dist/security-clients.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts +1365 -1
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.js +1798 -57
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.d.ts +3 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.d.ts +56 -0
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.js +179 -0
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/subagent-depth.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/subagent-depth.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/subagent-depth.js +11 -0
- package/bundled/@yep-anywhere/shared/dist/subagent-depth.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/tool-result-media.d.ts +21 -0
- package/bundled/@yep-anywhere/shared/dist/tool-result-media.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/tool-result-media.js +8 -0
- package/bundled/@yep-anywhere/shared/dist/tool-result-media.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/toon.d.ts +22 -0
- package/bundled/@yep-anywhere/shared/dist/toon.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/toon.js +128 -0
- package/bundled/@yep-anywhere/shared/dist/toon.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts +178 -31
- package/bundled/@yep-anywhere/shared/dist/types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/types.js +38 -2
- package/bundled/@yep-anywhere/shared/dist/types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/user-message-metadata.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/user-message-metadata.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/package.json +1 -1
- package/client-dist/_headers +17 -0
- package/client-dist/assets/ActivityPage-B9q2bxQG.js +1 -0
- package/client-dist/assets/AgentsPage-BJQFd1Lq.css +1 -0
- package/client-dist/assets/AgentsPage-D2BeReoU.js +2 -0
- package/client-dist/assets/App-BCuhyupw.js +2 -0
- package/client-dist/assets/App-D0_8DZ_p.css +1 -0
- package/client-dist/assets/AttachmentChip-CXZaCUv_.css +1 -0
- package/client-dist/assets/AttachmentChip-DeFRfm3S.js +1 -0
- package/client-dist/assets/AuthContext-ttH_RHyv.js +1 -0
- package/client-dist/assets/BangCommandDisplayObject-Csd_4G38.js +2 -0
- package/client-dist/assets/BangCommandDisplayObject-DDvXHqkT.css +1 -0
- package/client-dist/assets/BangCommandsPage-4tAg1P-B.js +1 -0
- package/client-dist/assets/BangCommandsPage-Bo6q40bU.css +1 -0
- package/client-dist/assets/BrowserDebugToolbarButton-d5UWhDkL.js +1 -0
- package/client-dist/assets/CodexUpdatePrompt-C0NYRpC1.js +1 -0
- package/client-dist/assets/EmulatorPage-B_SHr-YK.css +1 -0
- package/client-dist/assets/EmulatorPage-CaGjOU02.js +1 -0
- package/client-dist/assets/FilePage-CFYA8Jmz.js +1 -0
- package/client-dist/assets/FileViewer-4aDxZNTu.js +326 -0
- package/client-dist/assets/FileViewer-CzrwiYp4.css +1 -0
- package/client-dist/assets/FilterDropdown-CB_tRt6g.css +1 -0
- package/client-dist/assets/FilterDropdown-DefBPgy4.js +1 -0
- package/client-dist/assets/FloatingActionButton-CPVF8aGh.js +1 -0
- package/client-dist/assets/GitStatusPage-BMAX1XtQ.js +15 -0
- package/client-dist/assets/GitStatusPage-DiqFcPhe.css +1 -0
- package/client-dist/assets/GlobalSessionsPage-1KH8bdTH.css +1 -0
- package/client-dist/assets/GlobalSessionsPage-BhQXZsnZ.js +1 -0
- package/client-dist/assets/GlossaryContext-C4ZqYUH9.css +1 -0
- package/client-dist/assets/GlossaryContext-Cp_4G9df.js +1 -0
- package/client-dist/assets/HeartbeatTextArea-CjOFU5D8.js +1 -0
- package/client-dist/assets/HeartbeatTextArea-Dr6VozUp.css +1 -0
- package/client-dist/assets/HostIdentityContext-BuhXEIrO.js +1 -0
- package/client-dist/assets/HostIdentityMarker-DKxUjPEf.js +1 -0
- package/client-dist/assets/HostsPage--bWNVMY2.js +1 -0
- package/client-dist/assets/HostsPage-Da-F6Wx_.css +1 -0
- package/client-dist/assets/InboxContext-BKyIY7qc.js +1 -0
- package/client-dist/assets/InboxPage-DafjmvUl.css +1 -0
- package/client-dist/assets/InboxPage-wbKwNVKg.js +1 -0
- package/client-dist/assets/KaTeX_Size3-Regular-gV2CO0n9.woff2 +0 -0
- package/client-dist/assets/LoginPage-GYi_XEnG.js +1 -0
- package/client-dist/assets/MarkdownPreview-AEv1dNzV.js +1 -0
- package/client-dist/assets/MarkdownPreview-D0wBwpSu.css +1 -0
- package/client-dist/assets/MessageInput-C2p_cEHF.css +1 -0
- package/client-dist/assets/MessageInput-COCoVatC.js +3 -0
- package/client-dist/assets/MessageList-BHFVgfnL.js +6 -0
- package/client-dist/assets/MessageList-C9Z7aFHx.css +1 -0
- package/client-dist/assets/Modal-C59BcdHD.js +15 -0
- package/client-dist/assets/Modal-DydQGLdZ.css +1 -0
- package/client-dist/assets/NavigationLayout-BNRJ1SpX.js +2 -0
- package/client-dist/assets/NavigationLayout-ChjNahB_.css +1 -0
- package/client-dist/assets/NewSessionPage-CNO3t_Zi.js +1 -0
- package/client-dist/assets/PageHeader-DLhedAPm.js +1 -0
- package/client-dist/assets/ProjectSessionDefaultsModal-C5tcoqx_.css +1 -0
- package/client-dist/assets/ProjectSessionDefaultsModal-D7s41P9z.js +1 -0
- package/client-dist/assets/ProjectsPage-8yEzRoSP.css +1 -0
- package/client-dist/assets/ProjectsPage-D2-mjMXS.js +1 -0
- package/client-dist/assets/ProviderBadge-C8td51kV.js +1 -0
- package/client-dist/assets/ProviderChildSessionDetail-B9xcZcb6.js +129 -0
- package/client-dist/assets/ProviderChildSessionDetail-rZPKSfqF.css +1 -0
- package/client-dist/assets/ProviderChildSessionPage-BjoskULT.css +1 -0
- package/client-dist/assets/ProviderChildSessionPage-DuJN7uHD.js +1 -0
- package/client-dist/assets/SchemaValidationContext-CiLezKRZ.css +1 -0
- package/client-dist/assets/SchemaValidationContext-oxtR_d_G.js +1 -0
- package/client-dist/assets/SessionPage-BVeMOC--.css +1 -0
- package/client-dist/assets/SessionPage-UUYKBNUl.js +36 -0
- package/client-dist/assets/SourceFileHeaderActions-czvC1JKL.js +1 -0
- package/client-dist/assets/ThinkingControls-CmOG-fOQ.css +1 -0
- package/client-dist/assets/ThinkingControls-Yv0aTXJC.js +1 -0
- package/client-dist/assets/VoiceInputButton-COdV4sNA.js +1 -0
- package/client-dist/assets/VoiceInputButton-CTd6zXtZ.css +1 -0
- package/client-dist/assets/WorkstreamsPage-BCC_7j6h.js +1 -0
- package/client-dist/assets/WorkstreamsPage-kESwpARF.css +1 -0
- package/client-dist/assets/YepAnywhereLogo-B15FCqEj.js +1 -0
- package/client-dist/assets/activityBus-VjgeGPMB.js +42 -0
- package/client-dist/assets/appHref-ByaEnJGJ.js +1 -0
- package/client-dist/assets/de-DKHK9Tu3.js +6 -0
- package/client-dist/assets/deviceDetection-BVPclkty.js +1 -0
- package/client-dist/assets/es-XSkBrKBg.js +6 -0
- package/client-dist/assets/fr-DKUJaPhN.js +6 -0
- package/client-dist/assets/frontendReload-t1MBqojn.js +1 -0
- package/client-dist/assets/index-8yMgG4-w.css +1 -0
- package/client-dist/assets/index-BlfKG1Oa.js +16 -0
- package/client-dist/assets/index-CRz1GJAq.css +1 -0
- package/client-dist/assets/index-CgkTqljR.js +2 -0
- package/client-dist/assets/index-D47M-JMk.js +33 -0
- package/client-dist/assets/index-DnwFOiB5.js +1 -0
- package/client-dist/assets/index-YFIFpYSg.js +1 -0
- package/client-dist/assets/ja-BDnQUlyD.js +6 -0
- package/client-dist/assets/newSessionPrefill-B03klTbN.js +1 -0
- package/client-dist/assets/react-runtime-Dw4bUKEF.js +41 -0
- package/client-dist/assets/registerServiceWorker-DkTc70d4.js +1 -0
- package/client-dist/assets/sessionHistorySearch.worker-3xcA03g5.js +60 -0
- package/client-dist/assets/sessionNavigationState-B0NurMU6.js +1 -0
- package/client-dist/assets/sourceControlNavigationState-w3TYNwib.js +1 -0
- package/client-dist/assets/sourceRuntime-Dzap6qZX.js +11 -0
- package/client-dist/assets/sourceTransportPaths-CbOCoJJb.js +1 -0
- package/client-dist/assets/speechDraftTransaction-B6k3bStO.js +1 -0
- package/client-dist/assets/text-BehwCDu9.js +1 -0
- package/client-dist/assets/types-Cm98CR-a.js +1 -0
- package/client-dist/assets/useActivityBusState-DemwlSNp.js +1 -0
- package/client-dist/assets/useCodexUpdateStatus-bHHkvK4K.js +1 -0
- package/client-dist/assets/useDocumentTitle-rx41kKWp.js +1 -0
- package/client-dist/assets/useEmulators-CpDUcdfL.js +1 -0
- package/client-dist/assets/useFileActivity-C70dzD5U.js +1 -0
- package/client-dist/assets/useFloatingActionButtonEnabled-sLWhUZYo.js +1 -0
- package/client-dist/assets/useKeepMobileKeyboardOpenAfterDelivery-BMDI-BSY.js +1 -0
- package/client-dist/assets/useProviders-BWp3tEXv.js +1 -0
- package/client-dist/assets/useRecentSessions-BeuekUHb.js +1 -0
- package/client-dist/assets/useRecentSessions-Bks9U2oh.css +1 -0
- package/client-dist/assets/useRelativeNow-B6kyvcmL.js +1 -0
- package/client-dist/assets/useReloadNotifications-B1Gip4qS.js +1 -0
- package/client-dist/assets/useSidebarWidth-CNuw7NNf.js +1 -0
- package/client-dist/assets/useSourceControlCleanLanding-BSY1vDSq.js +1 -0
- package/client-dist/assets/useStableToolPreviewRendering-BQc8-VNa.css +1 -0
- package/client-dist/assets/useStableToolPreviewRendering-RDapEGRz.js +9 -0
- package/client-dist/assets/useStreamingEnabled-CiYhaw0s.js +59 -0
- package/client-dist/assets/useStreamingEnabled-DkWnufW2.css +1 -0
- package/client-dist/assets/useWiderConversationActivityPreviews-D-57jNSG.js +1 -0
- package/client-dist/assets/zh-CN-D56LyPRG.js +7 -0
- package/client-dist/badge.svg +1 -0
- package/client-dist/debug-streaming.html +2 -2
- package/client-dist/icon.svg +1 -0
- package/client-dist/index.html +10 -4
- package/client-dist/manifest.json +13 -0
- package/client-dist/sw.js +245 -61
- package/dist/app.d.ts +58 -2
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +761 -132
- package/dist/app.js.map +1 -1
- package/dist/augments/augment-generator.d.ts +1 -1
- package/dist/augments/augment-generator.d.ts.map +1 -1
- package/dist/augments/augment-generator.js +12 -3
- package/dist/augments/augment-generator.js.map +1 -1
- package/dist/augments/edit-augments.d.ts +21 -1
- package/dist/augments/edit-augments.d.ts.map +1 -1
- package/dist/augments/edit-augments.js +222 -32
- package/dist/augments/edit-augments.js.map +1 -1
- package/dist/augments/edit-raw-patch.d.ts +6 -0
- package/dist/augments/edit-raw-patch.d.ts.map +1 -1
- package/dist/augments/edit-raw-patch.js +29 -1
- package/dist/augments/edit-raw-patch.js.map +1 -1
- package/dist/augments/finalized-message-augmenter.d.ts +18 -0
- package/dist/augments/finalized-message-augmenter.d.ts.map +1 -0
- package/dist/augments/finalized-message-augmenter.js +306 -0
- package/dist/augments/finalized-message-augmenter.js.map +1 -0
- package/dist/augments/index.d.ts +1 -1
- package/dist/augments/index.d.ts.map +1 -1
- package/dist/augments/index.js +1 -1
- package/dist/augments/index.js.map +1 -1
- package/dist/augments/markdown-augments.d.ts +6 -9
- package/dist/augments/markdown-augments.d.ts.map +1 -1
- package/dist/augments/markdown-augments.js +145 -4
- package/dist/augments/markdown-augments.js.map +1 -1
- package/dist/augments/markdown-file-preview.d.ts +16 -0
- package/dist/augments/markdown-file-preview.d.ts.map +1 -0
- package/dist/augments/markdown-file-preview.js +122 -0
- package/dist/augments/markdown-file-preview.js.map +1 -0
- package/dist/augments/message-utils.d.ts +0 -5
- package/dist/augments/message-utils.d.ts.map +1 -1
- package/dist/augments/message-utils.js +0 -20
- package/dist/augments/message-utils.js.map +1 -1
- package/dist/augments/project-path-links.d.ts +47 -0
- package/dist/augments/project-path-links.d.ts.map +1 -0
- package/dist/augments/project-path-links.js +478 -0
- package/dist/augments/project-path-links.js.map +1 -0
- package/dist/augments/read-augments.d.ts +1 -1
- package/dist/augments/read-augments.d.ts.map +1 -1
- package/dist/augments/read-augments.js +8 -4
- package/dist/augments/read-augments.js.map +1 -1
- package/dist/augments/safe-markdown.d.ts +39 -1
- package/dist/augments/safe-markdown.d.ts.map +1 -1
- package/dist/augments/safe-markdown.js +592 -158
- package/dist/augments/safe-markdown.js.map +1 -1
- package/dist/augments/stream-augmenter.d.ts +13 -3
- package/dist/augments/stream-augmenter.d.ts.map +1 -1
- package/dist/augments/stream-augmenter.js +39 -241
- package/dist/augments/stream-augmenter.js.map +1 -1
- package/dist/augments/task-list-augments.d.ts +8 -0
- package/dist/augments/task-list-augments.d.ts.map +1 -1
- package/dist/augments/task-list-augments.js +44 -2
- package/dist/augments/task-list-augments.js.map +1 -1
- package/dist/augments/write-augments.d.ts +1 -1
- package/dist/augments/write-augments.d.ts.map +1 -1
- package/dist/augments/write-augments.js +7 -4
- package/dist/augments/write-augments.js.map +1 -1
- package/dist/auth/AuthService.d.ts +5 -7
- package/dist/auth/AuthService.d.ts.map +1 -1
- package/dist/auth/AuthService.js +35 -25
- package/dist/auth/AuthService.js.map +1 -1
- package/dist/auth/routes.d.ts +5 -0
- package/dist/auth/routes.d.ts.map +1 -1
- package/dist/auth/routes.js +26 -3
- package/dist/auth/routes.js.map +1 -1
- package/dist/cli.js +212 -1
- package/dist/cli.js.map +1 -1
- package/dist/codex/normalization.d.ts +2 -0
- package/dist/codex/normalization.d.ts.map +1 -1
- package/dist/codex/normalization.js +76 -84
- package/dist/codex/normalization.js.map +1 -1
- package/dist/codex/subagentActivity.d.ts +3 -0
- package/dist/codex/subagentActivity.d.ts.map +1 -0
- package/dist/codex/subagentActivity.js +15 -0
- package/dist/codex/subagentActivity.js.map +1 -0
- package/dist/codex/webRun.d.ts.map +1 -1
- package/dist/codex/webRun.js +2 -4
- package/dist/codex/webRun.js.map +1 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +37 -2
- package/dist/config.js.map +1 -1
- package/dist/crypto/index.d.ts +1 -1
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js +1 -1
- package/dist/crypto/index.js.map +1 -1
- package/dist/crypto/nacl-wrapper.d.ts +2 -0
- package/dist/crypto/nacl-wrapper.d.ts.map +1 -1
- package/dist/crypto/nacl-wrapper.js +10 -19
- package/dist/crypto/nacl-wrapper.js.map +1 -1
- package/dist/crypto/srp-server.js +2 -2
- package/dist/defaults.d.ts.map +1 -1
- package/dist/defaults.js +1 -1
- package/dist/defaults.js.map +1 -1
- package/dist/desktop/DesktopBootstrapService.d.ts +43 -0
- package/dist/desktop/DesktopBootstrapService.d.ts.map +1 -0
- package/dist/desktop/DesktopBootstrapService.js +126 -0
- package/dist/desktop/DesktopBootstrapService.js.map +1 -0
- package/dist/desktop/providerDetection.d.ts +15 -0
- package/dist/desktop/providerDetection.d.ts.map +1 -0
- package/dist/desktop/providerDetection.js +54 -0
- package/dist/desktop/providerDetection.js.map +1 -0
- package/dist/desktop/startup.d.ts +3 -0
- package/dist/desktop/startup.d.ts.map +1 -0
- package/dist/desktop/startup.js +52 -0
- package/dist/desktop/startup.js.map +1 -0
- package/dist/dev-wrapper-client.d.ts +14 -0
- package/dist/dev-wrapper-client.d.ts.map +1 -0
- package/dist/dev-wrapper-client.js +87 -0
- package/dist/dev-wrapper-client.js.map +1 -0
- package/dist/envSettings.d.ts +5 -4
- package/dist/envSettings.d.ts.map +1 -1
- package/dist/envSettings.js +41 -7
- package/dist/envSettings.js.map +1 -1
- package/dist/frontend/static.d.ts +2 -0
- package/dist/frontend/static.d.ts.map +1 -1
- package/dist/frontend/static.js +25 -13
- package/dist/frontend/static.js.map +1 -1
- package/dist/git/authorPalette.d.ts +15 -0
- package/dist/git/authorPalette.d.ts.map +1 -0
- package/dist/git/authorPalette.js +222 -0
- package/dist/git/authorPalette.js.map +1 -0
- package/dist/git/authorPalette.test.d.ts +2 -0
- package/dist/git/authorPalette.test.d.ts.map +1 -0
- package/dist/git/authorPalette.test.js +127 -0
- package/dist/git/authorPalette.test.js.map +1 -0
- package/dist/git/binaryDiff.d.ts +10 -0
- package/dist/git/binaryDiff.d.ts.map +1 -0
- package/dist/git/binaryDiff.js +33 -0
- package/dist/git/binaryDiff.js.map +1 -0
- package/dist/git/blame.d.ts +14 -0
- package/dist/git/blame.d.ts.map +1 -0
- package/dist/git/blame.js +276 -0
- package/dist/git/blame.js.map +1 -0
- package/dist/git/diffPreviewGuards.d.ts +52 -0
- package/dist/git/diffPreviewGuards.d.ts.map +1 -0
- package/dist/git/diffPreviewGuards.js +116 -0
- package/dist/git/diffPreviewGuards.js.map +1 -0
- package/dist/git/diffResult.d.ts +32 -0
- package/dist/git/diffResult.d.ts.map +1 -0
- package/dist/git/diffResult.js +89 -0
- package/dist/git/diffResult.js.map +1 -0
- package/dist/git/fileChanges.d.ts +13 -0
- package/dist/git/fileChanges.d.ts.map +1 -0
- package/dist/git/fileChanges.js +95 -0
- package/dist/git/fileChanges.js.map +1 -0
- package/dist/git/gitExec.d.ts +42 -0
- package/dist/git/gitExec.d.ts.map +1 -0
- package/dist/git/gitExec.js +53 -0
- package/dist/git/gitExec.js.map +1 -0
- package/dist/highlighting/index.d.ts +17 -0
- package/dist/highlighting/index.d.ts.map +1 -1
- package/dist/highlighting/index.js +130 -9
- package/dist/highlighting/index.js.map +1 -1
- package/dist/highlighting/index.test.d.ts +2 -0
- package/dist/highlighting/index.test.d.ts.map +1 -0
- package/dist/highlighting/index.test.js +57 -0
- package/dist/highlighting/index.test.js.map +1 -0
- package/dist/index.js +383 -43
- package/dist/index.js.map +1 -1
- package/dist/indexes/SessionDiscoveryIndex.d.ts +11 -0
- package/dist/indexes/SessionDiscoveryIndex.d.ts.map +1 -1
- package/dist/indexes/SessionDiscoveryIndex.js +43 -11
- package/dist/indexes/SessionDiscoveryIndex.js.map +1 -1
- package/dist/indexes/SessionIndexService.d.ts +15 -3
- package/dist/indexes/SessionIndexService.d.ts.map +1 -1
- package/dist/indexes/SessionIndexService.js +100 -25
- package/dist/indexes/SessionIndexService.js.map +1 -1
- package/dist/indexes/index.d.ts +1 -1
- package/dist/indexes/index.d.ts.map +1 -1
- package/dist/indexes/index.js +1 -1
- package/dist/indexes/index.js.map +1 -1
- package/dist/lib/coalescingSaver.d.ts +32 -0
- package/dist/lib/coalescingSaver.d.ts.map +1 -0
- package/dist/lib/coalescingSaver.js +68 -0
- package/dist/lib/coalescingSaver.js.map +1 -0
- package/dist/lib/lruCollections.d.ts +14 -0
- package/dist/lib/lruCollections.d.ts.map +1 -0
- package/dist/lib/lruCollections.js +21 -0
- package/dist/lib/lruCollections.js.map +1 -0
- package/dist/lib/sourceVersionedSingleFlight.d.ts +90 -0
- package/dist/lib/sourceVersionedSingleFlight.d.ts.map +1 -0
- package/dist/lib/sourceVersionedSingleFlight.js +256 -0
- package/dist/lib/sourceVersionedSingleFlight.js.map +1 -0
- package/dist/logging/logger.d.ts.map +1 -1
- package/dist/logging/logger.js +23 -20
- package/dist/logging/logger.js.map +1 -1
- package/dist/maintenance/server.d.ts +2 -0
- package/dist/maintenance/server.d.ts.map +1 -1
- package/dist/maintenance/server.js +51 -8
- package/dist/maintenance/server.js.map +1 -1
- package/dist/media/ToolResultMediaMessageMaterializer.d.ts +11 -0
- package/dist/media/ToolResultMediaMessageMaterializer.d.ts.map +1 -0
- package/dist/media/ToolResultMediaMessageMaterializer.js +155 -0
- package/dist/media/ToolResultMediaMessageMaterializer.js.map +1 -0
- package/dist/media/ToolResultMediaStore.d.ts +64 -0
- package/dist/media/ToolResultMediaStore.d.ts.map +1 -0
- package/dist/media/ToolResultMediaStore.js +624 -0
- package/dist/media/ToolResultMediaStore.js.map +1 -0
- package/dist/media/inlineImageData.d.ts +24 -0
- package/dist/media/inlineImageData.d.ts.map +1 -0
- package/dist/media/inlineImageData.js +159 -0
- package/dist/media/inlineImageData.js.map +1 -0
- package/dist/metadata/ProjectCodeNameRegistry.d.ts +26 -0
- package/dist/metadata/ProjectCodeNameRegistry.d.ts.map +1 -0
- package/dist/metadata/ProjectCodeNameRegistry.js +156 -0
- package/dist/metadata/ProjectCodeNameRegistry.js.map +1 -0
- package/dist/metadata/ProjectMetadataService.d.ts +29 -6
- package/dist/metadata/ProjectMetadataService.d.ts.map +1 -1
- package/dist/metadata/ProjectMetadataService.js +205 -23
- package/dist/metadata/ProjectMetadataService.js.map +1 -1
- package/dist/metadata/SessionMetadataService.d.ts +105 -10
- package/dist/metadata/SessionMetadataService.d.ts.map +1 -1
- package/dist/metadata/SessionMetadataService.js +286 -41
- package/dist/metadata/SessionMetadataService.js.map +1 -1
- package/dist/metadata/index.d.ts +2 -2
- package/dist/metadata/index.d.ts.map +1 -1
- package/dist/metadata/index.js.map +1 -1
- package/dist/middleware/auth.d.ts +3 -0
- package/dist/middleware/auth.d.ts.map +1 -1
- package/dist/middleware/auth.js +15 -6
- package/dist/middleware/auth.js.map +1 -1
- package/dist/middleware/authenticated-transport.d.ts +21 -0
- package/dist/middleware/authenticated-transport.d.ts.map +1 -0
- package/dist/middleware/authenticated-transport.js +12 -0
- package/dist/middleware/authenticated-transport.js.map +1 -0
- package/dist/middleware/error-handler.d.ts +14 -0
- package/dist/middleware/error-handler.d.ts.map +1 -0
- package/dist/middleware/error-handler.js +40 -0
- package/dist/middleware/error-handler.js.map +1 -0
- package/dist/middleware/file-access.d.ts +5 -0
- package/dist/middleware/file-access.d.ts.map +1 -1
- package/dist/middleware/file-access.js +5 -2
- package/dist/middleware/file-access.js.map +1 -1
- package/dist/notifications/NotificationService.d.ts.map +1 -1
- package/dist/notifications/NotificationService.js +2 -1
- package/dist/notifications/NotificationService.js.map +1 -1
- package/dist/projects/codex-scanner.d.ts +1 -0
- package/dist/projects/codex-scanner.d.ts.map +1 -1
- package/dist/projects/codex-scanner.js +5 -2
- package/dist/projects/codex-scanner.js.map +1 -1
- package/dist/projects/gemini-project-map.d.ts +7 -1
- package/dist/projects/gemini-project-map.d.ts.map +1 -1
- package/dist/projects/gemini-project-map.js +68 -27
- package/dist/projects/gemini-project-map.js.map +1 -1
- package/dist/projects/gemini-scanner.d.ts.map +1 -1
- package/dist/projects/gemini-scanner.js.map +1 -1
- package/dist/projects/glossaryIndexService.d.ts +77 -0
- package/dist/projects/glossaryIndexService.d.ts.map +1 -0
- package/dist/projects/glossaryIndexService.js +547 -0
- package/dist/projects/glossaryIndexService.js.map +1 -0
- package/dist/projects/managedProjectDir.d.ts +25 -0
- package/dist/projects/managedProjectDir.d.ts.map +1 -0
- package/dist/projects/managedProjectDir.js +77 -0
- package/dist/projects/managedProjectDir.js.map +1 -0
- package/dist/projects/paths.d.ts +2 -0
- package/dist/projects/paths.d.ts.map +1 -1
- package/dist/projects/paths.js +9 -4
- package/dist/projects/paths.js.map +1 -1
- package/dist/projects/projectGlossarySubscriptionManager.d.ts +87 -0
- package/dist/projects/projectGlossarySubscriptionManager.d.ts.map +1 -0
- package/dist/projects/projectGlossarySubscriptionManager.js +622 -0
- package/dist/projects/projectGlossarySubscriptionManager.js.map +1 -0
- package/dist/projects/projectPathIndex.d.ts +224 -0
- package/dist/projects/projectPathIndex.d.ts.map +1 -0
- package/dist/projects/projectPathIndex.js +1087 -0
- package/dist/projects/projectPathIndex.js.map +1 -0
- package/dist/projects/projectStoragePolicy.d.ts +41 -0
- package/dist/projects/projectStoragePolicy.d.ts.map +1 -0
- package/dist/projects/projectStoragePolicy.js +285 -0
- package/dist/projects/projectStoragePolicy.js.map +1 -0
- package/dist/projects/projectWorktreeCoverage.d.ts +14 -0
- package/dist/projects/projectWorktreeCoverage.d.ts.map +1 -0
- package/dist/projects/projectWorktreeCoverage.js +94 -0
- package/dist/projects/projectWorktreeCoverage.js.map +1 -0
- package/dist/projects/projectWorktreeProjection.d.ts +46 -0
- package/dist/projects/projectWorktreeProjection.d.ts.map +1 -0
- package/dist/projects/projectWorktreeProjection.js +275 -0
- package/dist/projects/projectWorktreeProjection.js.map +1 -0
- package/dist/projects/projectWorktreeScan.d.ts +23 -0
- package/dist/projects/projectWorktreeScan.d.ts.map +1 -0
- package/dist/projects/projectWorktreeScan.js +378 -0
- package/dist/projects/projectWorktreeScan.js.map +1 -0
- package/dist/projects/projectWorktreeSubscriptionManager.d.ts +131 -0
- package/dist/projects/projectWorktreeSubscriptionManager.d.ts.map +1 -0
- package/dist/projects/projectWorktreeSubscriptionManager.js +1314 -0
- package/dist/projects/projectWorktreeSubscriptionManager.js.map +1 -0
- package/dist/projects/scanner.d.ts +16 -2
- package/dist/projects/scanner.d.ts.map +1 -1
- package/dist/projects/scanner.js +85 -24
- package/dist/projects/scanner.js.map +1 -1
- package/dist/push/InactivityPushNotifier.d.ts +0 -5
- package/dist/push/InactivityPushNotifier.d.ts.map +1 -1
- package/dist/push/InactivityPushNotifier.js +2 -17
- package/dist/push/InactivityPushNotifier.js.map +1 -1
- package/dist/push/PushNotifier.d.ts +0 -4
- package/dist/push/PushNotifier.d.ts.map +1 -1
- package/dist/push/PushNotifier.js +2 -17
- package/dist/push/PushNotifier.js.map +1 -1
- package/dist/push/PushService.d.ts +2 -8
- package/dist/push/PushService.d.ts.map +1 -1
- package/dist/push/PushService.js +8 -22
- package/dist/push/PushService.js.map +1 -1
- package/dist/push/routes.d.ts.map +1 -1
- package/dist/push/routes.js +8 -0
- package/dist/push/routes.js.map +1 -1
- package/dist/recents/RecentsService.d.ts +1 -6
- package/dist/recents/RecentsService.d.ts.map +1 -1
- package/dist/recents/RecentsService.js +2 -20
- package/dist/recents/RecentsService.js.map +1 -1
- package/dist/remote-access/RemoteAccessService.d.ts +1 -6
- package/dist/remote-access/RemoteAccessService.d.ts.map +1 -1
- package/dist/remote-access/RemoteAccessService.js +2 -18
- package/dist/remote-access/RemoteAccessService.js.map +1 -1
- package/dist/remote-access/RemoteSessionService.d.ts +12 -7
- package/dist/remote-access/RemoteSessionService.d.ts.map +1 -1
- package/dist/remote-access/RemoteSessionService.js +65 -40
- package/dist/remote-access/RemoteSessionService.js.map +1 -1
- package/dist/review/ReviewCaptureService.d.ts +20 -0
- package/dist/review/ReviewCaptureService.d.ts.map +1 -0
- package/dist/review/ReviewCaptureService.js +441 -0
- package/dist/review/ReviewCaptureService.js.map +1 -0
- package/dist/review/ReviewCommentService.d.ts +171 -0
- package/dist/review/ReviewCommentService.d.ts.map +1 -0
- package/dist/review/ReviewCommentService.js +1240 -0
- package/dist/review/ReviewCommentService.js.map +1 -0
- package/dist/review/ReviewResponseObserver.d.ts +21 -0
- package/dist/review/ReviewResponseObserver.d.ts.map +1 -0
- package/dist/review/ReviewResponseObserver.js +29 -0
- package/dist/review/ReviewResponseObserver.js.map +1 -0
- package/dist/review/composeReviewTurn.d.ts +37 -0
- package/dist/review/composeReviewTurn.d.ts.map +1 -0
- package/dist/review/composeReviewTurn.js +128 -0
- package/dist/review/composeReviewTurn.js.map +1 -0
- package/dist/review/relocateAnchors.d.ts +41 -0
- package/dist/review/relocateAnchors.d.ts.map +1 -0
- package/dist/review/relocateAnchors.js +136 -0
- package/dist/review/relocateAnchors.js.map +1 -0
- package/dist/review/repositoryPath.d.ts +7 -0
- package/dist/review/repositoryPath.d.ts.map +1 -0
- package/dist/review/repositoryPath.js +54 -0
- package/dist/review/repositoryPath.js.map +1 -0
- package/dist/review/reviewSessionLauncher.d.ts +43 -0
- package/dist/review/reviewSessionLauncher.d.ts.map +1 -0
- package/dist/review/reviewSessionLauncher.js +143 -0
- package/dist/review/reviewSessionLauncher.js.map +1 -0
- package/dist/routes/bang-commands.d.ts +33 -0
- package/dist/routes/bang-commands.d.ts.map +1 -0
- package/dist/routes/bang-commands.js +292 -0
- package/dist/routes/bang-commands.js.map +1 -0
- package/dist/routes/browser-debug.d.ts +5 -0
- package/dist/routes/browser-debug.d.ts.map +1 -0
- package/dist/routes/browser-debug.js +182 -0
- package/dist/routes/browser-debug.js.map +1 -0
- package/dist/routes/browser-settings-backup.d.ts +7 -0
- package/dist/routes/browser-settings-backup.d.ts.map +1 -0
- package/dist/routes/browser-settings-backup.js +35 -0
- package/dist/routes/browser-settings-backup.js.map +1 -0
- package/dist/routes/desktop-bootstrap.d.ts +11 -0
- package/dist/routes/desktop-bootstrap.d.ts.map +1 -0
- package/dist/routes/desktop-bootstrap.js +84 -0
- package/dist/routes/desktop-bootstrap.js.map +1 -0
- package/dist/routes/files.d.ts +5 -0
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/files.js +318 -305
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/git-browse.d.ts +21 -0
- package/dist/routes/git-browse.d.ts.map +1 -0
- package/dist/routes/git-browse.js +490 -0
- package/dist/routes/git-browse.js.map +1 -0
- package/dist/routes/git-file-projections.d.ts +21 -0
- package/dist/routes/git-file-projections.d.ts.map +1 -0
- package/dist/routes/git-file-projections.js +256 -0
- package/dist/routes/git-file-projections.js.map +1 -0
- package/dist/routes/git-file-revision.d.ts +10 -0
- package/dist/routes/git-file-revision.d.ts.map +1 -0
- package/dist/routes/git-file-revision.js +164 -0
- package/dist/routes/git-file-revision.js.map +1 -0
- package/dist/routes/git-inclusive-to-head.d.ts +5 -0
- package/dist/routes/git-inclusive-to-head.d.ts.map +1 -0
- package/dist/routes/git-inclusive-to-head.js +36 -0
- package/dist/routes/git-inclusive-to-head.js.map +1 -0
- package/dist/routes/git-incoming-commits.d.ts +13 -0
- package/dist/routes/git-incoming-commits.d.ts.map +1 -0
- package/dist/routes/git-incoming-commits.js +94 -0
- package/dist/routes/git-incoming-commits.js.map +1 -0
- package/dist/routes/git-projection-diff.d.ts +12 -0
- package/dist/routes/git-projection-diff.d.ts.map +1 -0
- package/dist/routes/git-projection-diff.js +158 -0
- package/dist/routes/git-projection-diff.js.map +1 -0
- package/dist/routes/git-projections.d.ts +5 -0
- package/dist/routes/git-projections.d.ts.map +1 -0
- package/dist/routes/git-projections.js +34 -0
- package/dist/routes/git-projections.js.map +1 -0
- package/dist/routes/git-status.d.ts +4 -0
- package/dist/routes/git-status.d.ts.map +1 -1
- package/dist/routes/git-status.js +267 -133
- package/dist/routes/git-status.js.map +1 -1
- package/dist/routes/git-working-tree-files.d.ts +22 -0
- package/dist/routes/git-working-tree-files.d.ts.map +1 -0
- package/dist/routes/git-working-tree-files.js +143 -0
- package/dist/routes/git-working-tree-files.js.map +1 -0
- package/dist/routes/global-sessions.d.ts +23 -2
- package/dist/routes/global-sessions.d.ts.map +1 -1
- package/dist/routes/global-sessions.js +129 -6
- package/dist/routes/global-sessions.js.map +1 -1
- package/dist/routes/glossary-artifacts.d.ts +9 -0
- package/dist/routes/glossary-artifacts.d.ts.map +1 -0
- package/dist/routes/glossary-artifacts.js +23 -0
- package/dist/routes/glossary-artifacts.js.map +1 -0
- package/dist/routes/host-agent-processes.d.ts +11 -0
- package/dist/routes/host-agent-processes.d.ts.map +1 -0
- package/dist/routes/host-agent-processes.js +44 -0
- package/dist/routes/host-agent-processes.js.map +1 -0
- package/dist/routes/inbox.d.ts +2 -0
- package/dist/routes/inbox.d.ts.map +1 -1
- package/dist/routes/inbox.js +62 -11
- package/dist/routes/inbox.js.map +1 -1
- package/dist/routes/limited-json-body.d.ts +7 -0
- package/dist/routes/limited-json-body.d.ts.map +1 -0
- package/dist/routes/limited-json-body.js +71 -0
- package/dist/routes/limited-json-body.js.map +1 -0
- package/dist/routes/local-file.d.ts +2 -0
- package/dist/routes/local-file.d.ts.map +1 -1
- package/dist/routes/local-file.js +225 -99
- package/dist/routes/local-file.js.map +1 -1
- package/dist/routes/local-image.d.ts +2 -0
- package/dist/routes/local-image.d.ts.map +1 -1
- package/dist/routes/local-image.js +34 -11
- package/dist/routes/local-image.js.map +1 -1
- package/dist/routes/local-resource-policy.d.ts +2 -0
- package/dist/routes/local-resource-policy.d.ts.map +1 -1
- package/dist/routes/local-resource-policy.js +0 -0
- package/dist/routes/local-resource-policy.js.map +1 -1
- package/dist/routes/mutable-file-cache.d.ts +28 -0
- package/dist/routes/mutable-file-cache.d.ts.map +1 -0
- package/dist/routes/mutable-file-cache.js +73 -0
- package/dist/routes/mutable-file-cache.js.map +1 -0
- package/dist/routes/onboarding.d.ts +1 -0
- package/dist/routes/onboarding.d.ts.map +1 -1
- package/dist/routes/onboarding.js +3 -0
- package/dist/routes/onboarding.js.map +1 -1
- package/dist/routes/processes.d.ts +10 -1
- package/dist/routes/processes.d.ts.map +1 -1
- package/dist/routes/processes.js +84 -14
- package/dist/routes/processes.js.map +1 -1
- package/dist/routes/project-queue-response.d.ts.map +1 -1
- package/dist/routes/project-queue-response.js +4 -3
- package/dist/routes/project-queue-response.js.map +1 -1
- package/dist/routes/project-queue.d.ts.map +1 -1
- package/dist/routes/project-queue.js +3 -0
- package/dist/routes/project-queue.js.map +1 -1
- package/dist/routes/project-session-defaults.d.ts +9 -0
- package/dist/routes/project-session-defaults.d.ts.map +1 -0
- package/dist/routes/project-session-defaults.js +104 -0
- package/dist/routes/project-session-defaults.js.map +1 -0
- package/dist/routes/projectParam.d.ts +9 -0
- package/dist/routes/projectParam.d.ts.map +1 -0
- package/dist/routes/projectParam.js +19 -0
- package/dist/routes/projectParam.js.map +1 -0
- package/dist/routes/projects.d.ts +4 -0
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +81 -2
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/provider-host.d.ts +12 -0
- package/dist/routes/provider-host.d.ts.map +1 -0
- package/dist/routes/provider-host.js +184 -0
- package/dist/routes/provider-host.js.map +1 -0
- package/dist/routes/providers.d.ts +10 -1
- package/dist/routes/providers.d.ts.map +1 -1
- package/dist/routes/providers.js +161 -42
- package/dist/routes/providers.js.map +1 -1
- package/dist/routes/public-file-shares.d.ts +18 -0
- package/dist/routes/public-file-shares.d.ts.map +1 -0
- package/dist/routes/public-file-shares.js +163 -0
- package/dist/routes/public-file-shares.js.map +1 -0
- package/dist/routes/public-share-json-stream.d.ts +5 -0
- package/dist/routes/public-share-json-stream.d.ts.map +1 -0
- package/dist/routes/public-share-json-stream.js +159 -0
- package/dist/routes/public-share-json-stream.js.map +1 -0
- package/dist/routes/public-share-management-freeze.d.ts +5 -0
- package/dist/routes/public-share-management-freeze.d.ts.map +1 -0
- package/dist/routes/public-share-management-freeze.js +89 -0
- package/dist/routes/public-share-management-freeze.js.map +1 -0
- package/dist/routes/public-share-management.d.ts +7 -0
- package/dist/routes/public-share-management.d.ts.map +1 -0
- package/dist/routes/public-share-management.js +136 -0
- package/dist/routes/public-share-management.js.map +1 -0
- package/dist/routes/public-shares.d.ts +15 -3
- package/dist/routes/public-shares.d.ts.map +1 -1
- package/dist/routes/public-shares.js +483 -143
- package/dist/routes/public-shares.js.map +1 -1
- package/dist/routes/recents.d.ts.map +1 -1
- package/dist/routes/recents.js +3 -3
- package/dist/routes/recents.js.map +1 -1
- package/dist/routes/review-comments.d.ts +27 -0
- package/dist/routes/review-comments.d.ts.map +1 -0
- package/dist/routes/review-comments.js +443 -0
- package/dist/routes/review-comments.js.map +1 -0
- package/dist/routes/review-inbox.d.ts +13 -0
- package/dist/routes/review-inbox.d.ts.map +1 -0
- package/dist/routes/review-inbox.js +102 -0
- package/dist/routes/review-inbox.js.map +1 -0
- package/dist/routes/review-submissions.d.ts +13 -0
- package/dist/routes/review-submissions.d.ts.map +1 -0
- package/dist/routes/review-submissions.js +248 -0
- package/dist/routes/review-submissions.js.map +1 -0
- package/dist/routes/security-clients.d.ts +4 -0
- package/dist/routes/security-clients.d.ts.map +1 -0
- package/dist/routes/security-clients.js +118 -0
- package/dist/routes/security-clients.js.map +1 -0
- package/dist/routes/server-admin.d.ts +2 -1
- package/dist/routes/server-admin.d.ts.map +1 -1
- package/dist/routes/server-admin.js +4 -1
- package/dist/routes/server-admin.js.map +1 -1
- package/dist/routes/server-info.d.ts +2 -1
- package/dist/routes/server-info.d.ts.map +1 -1
- package/dist/routes/server-info.js +2 -1
- package/dist/routes/server-info.js.map +1 -1
- package/dist/routes/session-archive.d.ts +13 -0
- package/dist/routes/session-archive.d.ts.map +1 -0
- package/dist/routes/session-archive.js +26 -0
- package/dist/routes/session-archive.js.map +1 -0
- package/dist/routes/session-claude-resume-guard.d.ts.map +1 -1
- package/dist/routes/session-claude-resume-guard.js +7 -4
- package/dist/routes/session-claude-resume-guard.js.map +1 -1
- package/dist/routes/session-done.d.ts +11 -0
- package/dist/routes/session-done.d.ts.map +1 -0
- package/dist/routes/session-done.js +20 -0
- package/dist/routes/session-done.js.map +1 -0
- package/dist/routes/session-existing-identity.d.ts +23 -0
- package/dist/routes/session-existing-identity.d.ts.map +1 -0
- package/dist/routes/session-existing-identity.js +73 -0
- package/dist/routes/session-existing-identity.js.map +1 -0
- package/dist/routes/session-index.d.ts.map +1 -1
- package/dist/routes/session-index.js.map +1 -1
- package/dist/routes/session-metadata-patch.d.ts +1 -0
- package/dist/routes/session-metadata-patch.d.ts.map +1 -1
- package/dist/routes/session-metadata-patch.js +9 -2
- package/dist/routes/session-metadata-patch.js.map +1 -1
- package/dist/routes/session-provider-resolution.d.ts +4 -2
- package/dist/routes/session-provider-resolution.d.ts.map +1 -1
- package/dist/routes/session-provider-resolution.js +3 -1
- package/dist/routes/session-provider-resolution.js.map +1 -1
- package/dist/routes/session-queue-summaries.d.ts +2 -0
- package/dist/routes/session-queue-summaries.d.ts.map +1 -1
- package/dist/routes/session-queue-summaries.js +24 -11
- package/dist/routes/session-queue-summaries.js.map +1 -1
- package/dist/routes/session-recovered-queue.d.ts +1 -1
- package/dist/routes/session-recovered-queue.d.ts.map +1 -1
- package/dist/routes/session-recovered-queue.js +1 -0
- package/dist/routes/session-recovered-queue.js.map +1 -1
- package/dist/routes/session-terminate.d.ts +13 -0
- package/dist/routes/session-terminate.d.ts.map +1 -0
- package/dist/routes/session-terminate.js +24 -0
- package/dist/routes/session-terminate.js.map +1 -0
- package/dist/routes/session-wake.d.ts +4 -0
- package/dist/routes/session-wake.d.ts.map +1 -0
- package/dist/routes/session-wake.js +54 -0
- package/dist/routes/session-wake.js.map +1 -0
- package/dist/routes/sessions.d.ts +11 -0
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +1566 -460
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/settings-parsers.d.ts +5 -1
- package/dist/routes/settings-parsers.d.ts.map +1 -1
- package/dist/routes/settings-parsers.js +193 -13
- package/dist/routes/settings-parsers.js.map +1 -1
- package/dist/routes/settings.d.ts +19 -0
- package/dist/routes/settings.d.ts.map +1 -1
- package/dist/routes/settings.js +284 -22
- package/dist/routes/settings.js.map +1 -1
- package/dist/routes/tool-result-media.d.ts +10 -0
- package/dist/routes/tool-result-media.d.ts.map +1 -0
- package/dist/routes/tool-result-media.js +40 -0
- package/dist/routes/tool-result-media.js.map +1 -0
- package/dist/routes/untrusted-file-response.d.ts +18 -0
- package/dist/routes/untrusted-file-response.d.ts.map +1 -0
- package/dist/routes/untrusted-file-response.js +95 -0
- package/dist/routes/untrusted-file-response.js.map +1 -0
- package/dist/routes/upload.d.ts +2 -0
- package/dist/routes/upload.d.ts.map +1 -1
- package/dist/routes/upload.js +63 -31
- package/dist/routes/upload.js.map +1 -1
- package/dist/routes/version.d.ts +45 -3
- package/dist/routes/version.d.ts.map +1 -1
- package/dist/routes/version.js +126 -13
- package/dist/routes/version.js.map +1 -1
- package/dist/routes/workstreams.d.ts.map +1 -1
- package/dist/routes/workstreams.js.map +1 -1
- package/dist/routes/ws-message-router.d.ts +2 -1
- package/dist/routes/ws-message-router.d.ts.map +1 -1
- package/dist/routes/ws-message-router.js +12 -9
- package/dist/routes/ws-message-router.js.map +1 -1
- package/dist/routes/ws-relay-handlers.d.ts +95 -17
- package/dist/routes/ws-relay-handlers.d.ts.map +1 -1
- package/dist/routes/ws-relay-handlers.js +813 -71
- package/dist/routes/ws-relay-handlers.js.map +1 -1
- package/dist/routes/ws-relay.d.ts +24 -0
- package/dist/routes/ws-relay.d.ts.map +1 -1
- package/dist/routes/ws-relay.js +27 -6
- package/dist/routes/ws-relay.js.map +1 -1
- package/dist/routes/ws-srp-handlers.d.ts +2 -1
- package/dist/routes/ws-srp-handlers.d.ts.map +1 -1
- package/dist/routes/ws-srp-handlers.js +45 -2
- package/dist/routes/ws-srp-handlers.js.map +1 -1
- package/dist/routes/ws-transport-auth.d.ts +7 -0
- package/dist/routes/ws-transport-auth.d.ts.map +1 -1
- package/dist/routes/ws-transport-auth.js +7 -0
- package/dist/routes/ws-transport-auth.js.map +1 -1
- package/dist/routes/ws-transport-message-auth.d.ts.map +1 -1
- package/dist/routes/ws-transport-message-auth.js +54 -19
- package/dist/routes/ws-transport-message-auth.js.map +1 -1
- package/dist/sdk/cli-detection.d.ts +34 -4
- package/dist/sdk/cli-detection.d.ts.map +1 -1
- package/dist/sdk/cli-detection.js +134 -31
- package/dist/sdk/cli-detection.js.map +1 -1
- package/dist/sdk/messageQueue.d.ts +22 -1
- package/dist/sdk/messageQueue.d.ts.map +1 -1
- package/dist/sdk/messageQueue.js +63 -3
- package/dist/sdk/messageQueue.js.map +1 -1
- package/dist/sdk/mock.d.ts +24 -1
- package/dist/sdk/mock.d.ts.map +1 -1
- package/dist/sdk/mock.js +71 -0
- package/dist/sdk/mock.js.map +1 -1
- package/dist/sdk/providers/__mocks__/claude.d.ts +6 -0
- package/dist/sdk/providers/__mocks__/claude.d.ts.map +1 -1
- package/dist/sdk/providers/__mocks__/claude.js +9 -0
- package/dist/sdk/providers/__mocks__/claude.js.map +1 -1
- package/dist/sdk/providers/__mocks__/factory.d.ts.map +1 -1
- package/dist/sdk/providers/__mocks__/factory.js +5 -1
- package/dist/sdk/providers/__mocks__/factory.js.map +1 -1
- package/dist/sdk/providers/__mocks__/index.d.ts +1 -1
- package/dist/sdk/providers/__mocks__/index.d.ts.map +1 -1
- package/dist/sdk/providers/__mocks__/index.js +1 -1
- package/dist/sdk/providers/__mocks__/index.js.map +1 -1
- package/dist/sdk/providers/acp/client.d.ts +26 -3
- package/dist/sdk/providers/acp/client.d.ts.map +1 -1
- package/dist/sdk/providers/acp/client.js +47 -8
- package/dist/sdk/providers/acp/client.js.map +1 -1
- package/dist/sdk/providers/agentctl-session-env.d.ts +3 -2
- package/dist/sdk/providers/agentctl-session-env.d.ts.map +1 -1
- package/dist/sdk/providers/agentctl-session-env.js +35 -9
- package/dist/sdk/providers/agentctl-session-env.js.map +1 -1
- package/dist/sdk/providers/claude-additional-models.d.ts +5 -0
- package/dist/sdk/providers/claude-additional-models.d.ts.map +1 -0
- package/dist/sdk/providers/claude-additional-models.js +55 -0
- package/dist/sdk/providers/claude-additional-models.js.map +1 -0
- package/dist/sdk/providers/claude-gateway-launcher.d.ts +74 -0
- package/dist/sdk/providers/claude-gateway-launcher.d.ts.map +1 -0
- package/dist/sdk/providers/claude-gateway-launcher.js +338 -0
- package/dist/sdk/providers/claude-gateway-launcher.js.map +1 -0
- package/dist/sdk/providers/claude-gateway.d.ts +67 -0
- package/dist/sdk/providers/claude-gateway.d.ts.map +1 -0
- package/dist/sdk/providers/claude-gateway.js +354 -0
- package/dist/sdk/providers/claude-gateway.js.map +1 -0
- package/dist/sdk/providers/claude-ollama.d.ts +3 -1
- package/dist/sdk/providers/claude-ollama.d.ts.map +1 -1
- package/dist/sdk/providers/claude-ollama.js +7 -4
- package/dist/sdk/providers/claude-ollama.js.map +1 -1
- package/dist/sdk/providers/claude-retention.d.ts +2 -0
- package/dist/sdk/providers/claude-retention.d.ts.map +1 -1
- package/dist/sdk/providers/claude-retention.js +55 -2
- package/dist/sdk/providers/claude-retention.js.map +1 -1
- package/dist/sdk/providers/claude-steer-background.d.ts +30 -0
- package/dist/sdk/providers/claude-steer-background.d.ts.map +1 -0
- package/dist/sdk/providers/claude-steer-background.js +102 -0
- package/dist/sdk/providers/claude-steer-background.js.map +1 -0
- package/dist/sdk/providers/claude.d.ts +53 -8
- package/dist/sdk/providers/claude.d.ts.map +1 -1
- package/dist/sdk/providers/claude.js +517 -111
- package/dist/sdk/providers/claude.js.map +1 -1
- package/dist/sdk/providers/codex-account-commands.d.ts +24 -0
- package/dist/sdk/providers/codex-account-commands.d.ts.map +1 -0
- package/dist/sdk/providers/codex-account-commands.js +261 -0
- package/dist/sdk/providers/codex-account-commands.js.map +1 -0
- package/dist/sdk/providers/codex-model-catalog.d.ts +4 -1
- package/dist/sdk/providers/codex-model-catalog.d.ts.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.js +149 -100
- package/dist/sdk/providers/codex-model-catalog.js.map +1 -1
- package/dist/sdk/providers/codex-notification-guards.d.ts +16 -1
- package/dist/sdk/providers/codex-notification-guards.d.ts.map +1 -1
- package/dist/sdk/providers/codex-notification-guards.js +50 -0
- package/dist/sdk/providers/codex-notification-guards.js.map +1 -1
- package/dist/sdk/providers/codex-oss.d.ts +5 -0
- package/dist/sdk/providers/codex-oss.d.ts.map +1 -1
- package/dist/sdk/providers/codex-oss.js +25 -3
- package/dist/sdk/providers/codex-oss.js.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ImageGenerationFailure.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/ImageGenerationFailure.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/ImageGenerationFailure.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/ImageGenerationFailure.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/ImageGenerationItem.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/ImageGenerationItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/LegacyAppPathString.d.ts +7 -6
- package/dist/sdk/providers/codex-protocol/generated/LegacyAppPathString.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ResponseItem.d.ts +19 -15
- package/dist/sdk/providers/codex-protocol/generated/ResponseItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.d.ts +8 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/WebSearchItem.d.ts +8 -0
- package/dist/sdk/providers/codex-protocol/generated/WebSearchItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/AgentMessageDelivery.d.ts +2 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/AgentMessageDelivery.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/AgentMessageDelivery.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/AgentMessageDelivery.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CodexErrorInfo.d.ts +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CodexErrorInfo.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CollabAgentTool.d.ts +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CollabAgentTool.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CollabAgentToolCallStatus.d.ts +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CollabAgentToolCallStatus.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandAction.d.ts +2 -2
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandAction.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandExecutionApprovalKind.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandExecutionApprovalKind.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandExecutionApprovalKind.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandExecutionApprovalKind.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandExecutionRequestApprovalParams.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CommandExecutionRequestApprovalParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/CyberAccessProgram.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CyberAccessProgram.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CyberAccessProgram.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/CyberAccessProgram.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/DynamicToolCallOutputContentItem.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/DynamicToolCallOutputContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/FileSystemSpecialPath.d.ts +3 -2
- package/dist/sdk/providers/codex-protocol/generated/v2/FileSystemSpecialPath.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpToolCallAppContext.d.ts +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpToolCallAppContext.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentErrorDetails.d.ts +16 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentErrorDetails.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentErrorDetails.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentErrorDetails.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentSteer.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentSteer.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentSteer.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/MisalignmentSteer.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillDependencies.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillDependencies.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillDependencies.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillDependencies.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillErrorInfo.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillErrorInfo.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillErrorInfo.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillErrorInfo.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillInterface.d.ts +18 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillInterface.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillInterface.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillInterface.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillMetadata.d.ts +22 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillMetadata.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillMetadata.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillMetadata.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillScope.d.ts +2 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillScope.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillScope.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillScope.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillToolDependency.d.ts +9 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillToolDependency.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillToolDependency.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillToolDependency.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListEntry.d.ts +8 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListEntry.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListEntry.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListEntry.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListParams.d.ts +11 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListParams.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListParams.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListParams.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListResponse.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListResponse.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListResponse.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SkillsListResponse.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/SubAgentActivityKind.d.ts +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/SubAgentActivityKind.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/Thread.d.ts +18 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/Thread.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkParams.d.ts +14 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts +20 -3
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadReadParams.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadReadParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeParams.d.ts +3 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeResponse.d.ts +14 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSection.d.ts +19 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSection.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSection.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSection.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSectionAppearance.d.ts +8 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSectionAppearance.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSectionAppearance.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadSectionAppearance.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartParams.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TokenUsageBreakdown.d.ts +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TokenUsageBreakdown.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ToolRequestUserInputParams.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ToolRequestUserInputParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnEnvironmentParams.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnEnvironmentParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnError.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnError.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStep.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStep.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStep.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStep.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStepStatus.d.ts +2 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStepStatus.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStepStatus.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanStepStatus.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanUpdatedNotification.d.ts +8 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanUpdatedNotification.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanUpdatedNotification.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnPlanUpdatedNotification.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateParams.d.ts +29 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateParams.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateParams.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateParams.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateResponse.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateResponse.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateResponse.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateResponse.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateStatus.d.ts +2 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateStatus.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateStatus.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnSettingsUpdateStatus.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts +19 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnToolOutput.d.ts +7 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnToolOutput.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnToolOutput.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnToolOutput.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/index.d.ts +7 -0
- package/dist/sdk/providers/codex-protocol/index.d.ts.map +1 -1
- package/dist/sdk/providers/codex-summary-helpers.d.ts.map +1 -1
- package/dist/sdk/providers/codex-summary-helpers.js +1 -1
- package/dist/sdk/providers/codex-summary-helpers.js.map +1 -1
- package/dist/sdk/providers/codex.d.ts +50 -3
- package/dist/sdk/providers/codex.d.ts.map +1 -1
- package/dist/sdk/providers/codex.js +1277 -230
- package/dist/sdk/providers/codex.js.map +1 -1
- package/dist/sdk/providers/env-filter.d.ts +7 -0
- package/dist/sdk/providers/env-filter.d.ts.map +1 -1
- package/dist/sdk/providers/env-filter.js +21 -0
- package/dist/sdk/providers/env-filter.js.map +1 -1
- package/dist/sdk/providers/gemini-acp.d.ts.map +1 -1
- package/dist/sdk/providers/gemini-acp.js +5 -4
- package/dist/sdk/providers/gemini-acp.js.map +1 -1
- package/dist/sdk/providers/gemini.d.ts.map +1 -1
- package/dist/sdk/providers/gemini.js +6 -7
- package/dist/sdk/providers/gemini.js.map +1 -1
- package/dist/sdk/providers/grok-acp.d.ts +57 -29
- package/dist/sdk/providers/grok-acp.d.ts.map +1 -1
- package/dist/sdk/providers/grok-acp.js +458 -214
- package/dist/sdk/providers/grok-acp.js.map +1 -1
- package/dist/sdk/providers/grok-interject-text.d.ts +19 -0
- package/dist/sdk/providers/grok-interject-text.d.ts.map +1 -0
- package/dist/sdk/providers/grok-interject-text.js +43 -0
- package/dist/sdk/providers/grok-interject-text.js.map +1 -0
- package/dist/sdk/providers/grok-tool-normalization.d.ts +38 -0
- package/dist/sdk/providers/grok-tool-normalization.d.ts.map +1 -0
- package/dist/sdk/providers/grok-tool-normalization.js +938 -0
- package/dist/sdk/providers/grok-tool-normalization.js.map +1 -0
- package/dist/sdk/providers/index.d.ts +26 -0
- package/dist/sdk/providers/index.d.ts.map +1 -1
- package/dist/sdk/providers/index.js +70 -3
- package/dist/sdk/providers/index.js.map +1 -1
- package/dist/sdk/providers/managed-codex-auth.d.ts +45 -0
- package/dist/sdk/providers/managed-codex-auth.d.ts.map +1 -0
- package/dist/sdk/providers/managed-codex-auth.js +407 -0
- package/dist/sdk/providers/managed-codex-auth.js.map +1 -0
- package/dist/sdk/providers/managed-codex-transcript-mirror.d.ts +84 -0
- package/dist/sdk/providers/managed-codex-transcript-mirror.d.ts.map +1 -0
- package/dist/sdk/providers/managed-codex-transcript-mirror.js +505 -0
- package/dist/sdk/providers/managed-codex-transcript-mirror.js.map +1 -0
- package/dist/sdk/providers/managed-runner-entry.d.ts +3 -0
- package/dist/sdk/providers/managed-runner-entry.d.ts.map +1 -0
- package/dist/sdk/providers/managed-runner-entry.js +222 -0
- package/dist/sdk/providers/managed-runner-entry.js.map +1 -0
- package/dist/sdk/providers/managed-ssh-agent-session.d.ts +36 -0
- package/dist/sdk/providers/managed-ssh-agent-session.d.ts.map +1 -0
- package/dist/sdk/providers/managed-ssh-agent-session.js +771 -0
- package/dist/sdk/providers/managed-ssh-agent-session.js.map +1 -0
- package/dist/sdk/providers/managed-ssh-diagnostic-provider.d.ts +29 -0
- package/dist/sdk/providers/managed-ssh-diagnostic-provider.d.ts.map +1 -0
- package/dist/sdk/providers/managed-ssh-diagnostic-provider.js +85 -0
- package/dist/sdk/providers/managed-ssh-diagnostic-provider.js.map +1 -0
- package/dist/sdk/providers/managed-ssh-target.d.ts +169 -0
- package/dist/sdk/providers/managed-ssh-target.d.ts.map +1 -0
- package/dist/sdk/providers/managed-ssh-target.js +1067 -0
- package/dist/sdk/providers/managed-ssh-target.js.map +1 -0
- package/dist/sdk/providers/managed-ssh-workspace.d.ts +63 -0
- package/dist/sdk/providers/managed-ssh-workspace.d.ts.map +1 -0
- package/dist/sdk/providers/managed-ssh-workspace.js +458 -0
- package/dist/sdk/providers/managed-ssh-workspace.js.map +1 -0
- package/dist/sdk/providers/opencode-binary-selection.d.ts +14 -0
- package/dist/sdk/providers/opencode-binary-selection.d.ts.map +1 -0
- package/dist/sdk/providers/opencode-binary-selection.js +37 -0
- package/dist/sdk/providers/opencode-binary-selection.js.map +1 -0
- package/dist/sdk/providers/opencode-models.d.ts +12 -4
- package/dist/sdk/providers/opencode-models.d.ts.map +1 -1
- package/dist/sdk/providers/opencode-models.js +21 -8
- package/dist/sdk/providers/opencode-models.js.map +1 -1
- package/dist/sdk/providers/opencode-tools.d.ts +10 -0
- package/dist/sdk/providers/opencode-tools.d.ts.map +1 -1
- package/dist/sdk/providers/opencode-tools.js +47 -18
- package/dist/sdk/providers/opencode-tools.js.map +1 -1
- package/dist/sdk/providers/opencode.d.ts +6 -4
- package/dist/sdk/providers/opencode.d.ts.map +1 -1
- package/dist/sdk/providers/opencode.js +94 -44
- package/dist/sdk/providers/opencode.js.map +1 -1
- package/dist/sdk/providers/pi-launch-target.d.ts +20 -0
- package/dist/sdk/providers/pi-launch-target.d.ts.map +1 -0
- package/dist/sdk/providers/pi-launch-target.js +68 -0
- package/dist/sdk/providers/pi-launch-target.js.map +1 -0
- package/dist/sdk/providers/pi-tools.d.ts.map +1 -1
- package/dist/sdk/providers/pi-tools.js +26 -0
- package/dist/sdk/providers/pi-tools.js.map +1 -1
- package/dist/sdk/providers/pi.d.ts +13 -6
- package/dist/sdk/providers/pi.d.ts.map +1 -1
- package/dist/sdk/providers/pi.js +84 -31
- package/dist/sdk/providers/pi.js.map +1 -1
- package/dist/sdk/providers/provider-runtime-fake.d.ts +10 -0
- package/dist/sdk/providers/provider-runtime-fake.d.ts.map +1 -0
- package/dist/sdk/providers/provider-runtime-fake.js +154 -0
- package/dist/sdk/providers/provider-runtime-fake.js.map +1 -0
- package/dist/sdk/providers/provider-runtime-host.d.ts +104 -0
- package/dist/sdk/providers/provider-runtime-host.d.ts.map +1 -0
- package/dist/sdk/providers/provider-runtime-host.js +888 -0
- package/dist/sdk/providers/provider-runtime-host.js.map +1 -0
- package/dist/sdk/providers/provider-runtime-socket-adapter.d.ts +15 -0
- package/dist/sdk/providers/provider-runtime-socket-adapter.d.ts.map +1 -0
- package/dist/sdk/providers/provider-runtime-socket-adapter.js +106 -0
- package/dist/sdk/providers/provider-runtime-socket-adapter.js.map +1 -0
- package/dist/sdk/providers/provider-runtime-stdio.d.ts +61 -0
- package/dist/sdk/providers/provider-runtime-stdio.d.ts.map +1 -0
- package/dist/sdk/providers/provider-runtime-stdio.js +527 -0
- package/dist/sdk/providers/provider-runtime-stdio.js.map +1 -0
- package/dist/sdk/providers/provider-runtime-worker.d.ts +2 -0
- package/dist/sdk/providers/provider-runtime-worker.d.ts.map +1 -0
- package/dist/sdk/providers/provider-runtime-worker.js +182 -0
- package/dist/sdk/providers/provider-runtime-worker.js.map +1 -0
- package/dist/sdk/providers/provider-session-owner.d.ts +126 -0
- package/dist/sdk/providers/provider-session-owner.d.ts.map +1 -0
- package/dist/sdk/providers/provider-session-owner.js +677 -0
- package/dist/sdk/providers/provider-session-owner.js.map +1 -0
- package/dist/sdk/providers/provider-subscription-usage.d.ts +4 -0
- package/dist/sdk/providers/provider-subscription-usage.d.ts.map +1 -0
- package/dist/sdk/providers/provider-subscription-usage.js +204 -0
- package/dist/sdk/providers/provider-subscription-usage.js.map +1 -0
- package/dist/sdk/providers/staticSlashCommands.d.ts.map +1 -1
- package/dist/sdk/providers/staticSlashCommands.js +13 -0
- package/dist/sdk/providers/staticSlashCommands.js.map +1 -1
- package/dist/sdk/providers/types.d.ts +168 -12
- package/dist/sdk/providers/types.d.ts.map +1 -1
- package/dist/sdk/providers/types.js +66 -1
- package/dist/sdk/providers/types.js.map +1 -1
- package/dist/sdk/remote-shell.d.ts +6 -0
- package/dist/sdk/remote-shell.d.ts.map +1 -0
- package/dist/sdk/remote-shell.js +15 -0
- package/dist/sdk/remote-shell.js.map +1 -0
- package/dist/sdk/remote-spawn.d.ts +22 -0
- package/dist/sdk/remote-spawn.d.ts.map +1 -1
- package/dist/sdk/remote-spawn.js +54 -27
- package/dist/sdk/remote-spawn.js.map +1 -1
- package/dist/sdk/session-sync.d.ts +5 -0
- package/dist/sdk/session-sync.d.ts.map +1 -1
- package/dist/sdk/session-sync.js +51 -12
- package/dist/sdk/session-sync.js.map +1 -1
- package/dist/sdk/slashCommandEmulation.d.ts +2 -6
- package/dist/sdk/slashCommandEmulation.d.ts.map +1 -1
- package/dist/sdk/slashCommandEmulation.js +12 -19
- package/dist/sdk/slashCommandEmulation.js.map +1 -1
- package/dist/sdk/types.d.ts +58 -7
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/security/approvalAuditLog.js.map +1 -1
- package/dist/services/BangCommandService.d.ts +86 -0
- package/dist/services/BangCommandService.d.ts.map +1 -0
- package/dist/services/BangCommandService.js +463 -0
- package/dist/services/BangCommandService.js.map +1 -0
- package/dist/services/BrowserDebugService.d.ts +71 -0
- package/dist/services/BrowserDebugService.d.ts.map +1 -0
- package/dist/services/BrowserDebugService.js +285 -0
- package/dist/services/BrowserDebugService.js.map +1 -0
- package/dist/services/BrowserProfileService.d.ts +1 -6
- package/dist/services/BrowserProfileService.d.ts.map +1 -1
- package/dist/services/BrowserProfileService.js +2 -18
- package/dist/services/BrowserProfileService.js.map +1 -1
- package/dist/services/BrowserSettingsBackupService.d.ts +30 -0
- package/dist/services/BrowserSettingsBackupService.d.ts.map +1 -0
- package/dist/services/BrowserSettingsBackupService.js +136 -0
- package/dist/services/BrowserSettingsBackupService.js.map +1 -0
- package/dist/services/CacheMissBillingMonitor.d.ts +4 -0
- package/dist/services/CacheMissBillingMonitor.d.ts.map +1 -1
- package/dist/services/CacheMissBillingMonitor.js +161 -24
- package/dist/services/CacheMissBillingMonitor.js.map +1 -1
- package/dist/services/CodexUpdateChecker.d.ts +22 -6
- package/dist/services/CodexUpdateChecker.d.ts.map +1 -1
- package/dist/services/CodexUpdateChecker.js +128 -15
- package/dist/services/CodexUpdateChecker.js.map +1 -1
- package/dist/services/ConnectedBrowsersService.d.ts +5 -1
- package/dist/services/ConnectedBrowsersService.d.ts.map +1 -1
- package/dist/services/ConnectedBrowsersService.js +18 -1
- package/dist/services/ConnectedBrowsersService.js.map +1 -1
- package/dist/services/DirtyFileEditorService.d.ts +47 -0
- package/dist/services/DirtyFileEditorService.d.ts.map +1 -0
- package/dist/services/DirtyFileEditorService.js +382 -0
- package/dist/services/DirtyFileEditorService.js.map +1 -0
- package/dist/services/GitUntrackedCacheService.d.ts +44 -0
- package/dist/services/GitUntrackedCacheService.d.ts.map +1 -0
- package/dist/services/GitUntrackedCacheService.js +420 -0
- package/dist/services/GitUntrackedCacheService.js.map +1 -0
- package/dist/services/HeartbeatCandidateRegistry.d.ts +114 -0
- package/dist/services/HeartbeatCandidateRegistry.d.ts.map +1 -0
- package/dist/services/HeartbeatCandidateRegistry.js +215 -0
- package/dist/services/HeartbeatCandidateRegistry.js.map +1 -0
- package/dist/services/HostAgentProcessService.d.ts +40 -0
- package/dist/services/HostAgentProcessService.d.ts.map +1 -0
- package/dist/services/HostAgentProcessService.js +392 -0
- package/dist/services/HostAgentProcessService.js.map +1 -0
- package/dist/services/InstallService.d.ts +13 -0
- package/dist/services/InstallService.d.ts.map +1 -1
- package/dist/services/InstallService.js +86 -12
- package/dist/services/InstallService.js.map +1 -1
- package/dist/services/LegacyPublicShareReader.d.ts +27 -0
- package/dist/services/LegacyPublicShareReader.d.ts.map +1 -0
- package/dist/services/LegacyPublicShareReader.js +684 -0
- package/dist/services/LegacyPublicShareReader.js.map +1 -0
- package/dist/services/ModelInfoService.d.ts +2 -3
- package/dist/services/ModelInfoService.d.ts.map +1 -1
- package/dist/services/ModelInfoService.js +7 -19
- package/dist/services/ModelInfoService.js.map +1 -1
- package/dist/services/NetworkBindingService.d.ts +1 -6
- package/dist/services/NetworkBindingService.d.ts.map +1 -1
- package/dist/services/NetworkBindingService.js +2 -18
- package/dist/services/NetworkBindingService.js.map +1 -1
- package/dist/services/ProjectQueueScheduler.d.ts +16 -4
- package/dist/services/ProjectQueueScheduler.d.ts.map +1 -1
- package/dist/services/ProjectQueueScheduler.js +183 -17
- package/dist/services/ProjectQueueScheduler.js.map +1 -1
- package/dist/services/ProjectQueueService.d.ts +3 -0
- package/dist/services/ProjectQueueService.d.ts.map +1 -1
- package/dist/services/ProjectQueueService.js +97 -5
- package/dist/services/ProjectQueueService.js.map +1 -1
- package/dist/services/ProviderInstallationCoordinator.d.ts +136 -0
- package/dist/services/ProviderInstallationCoordinator.d.ts.map +1 -0
- package/dist/services/ProviderInstallationCoordinator.js +636 -0
- package/dist/services/ProviderInstallationCoordinator.js.map +1 -0
- package/dist/services/PublicFileShareStore.d.ts +53 -0
- package/dist/services/PublicFileShareStore.d.ts.map +1 -0
- package/dist/services/PublicFileShareStore.js +297 -0
- package/dist/services/PublicFileShareStore.js.map +1 -0
- package/dist/services/PublicSharePrivateStorage.d.ts +15 -0
- package/dist/services/PublicSharePrivateStorage.d.ts.map +1 -0
- package/dist/services/PublicSharePrivateStorage.js +82 -0
- package/dist/services/PublicSharePrivateStorage.js.map +1 -0
- package/dist/services/PublicShareRevisionRepository.d.ts +87 -0
- package/dist/services/PublicShareRevisionRepository.d.ts.map +1 -0
- package/dist/services/PublicShareRevisionRepository.js +809 -0
- package/dist/services/PublicShareRevisionRepository.js.map +1 -0
- package/dist/services/PublicShareService.d.ts +93 -33
- package/dist/services/PublicShareService.d.ts.map +1 -1
- package/dist/services/PublicShareService.js +545 -296
- package/dist/services/PublicShareService.js.map +1 -1
- package/dist/services/PublicShareStore.d.ts +132 -0
- package/dist/services/PublicShareStore.d.ts.map +1 -0
- package/dist/services/PublicShareStore.js +973 -0
- package/dist/services/PublicShareStore.js.map +1 -0
- package/dist/services/RelayClientService.d.ts.map +1 -1
- package/dist/services/RelayClientService.js +24 -10
- package/dist/services/RelayClientService.js.map +1 -1
- package/dist/services/SecurityClientService.d.ts +88 -0
- package/dist/services/SecurityClientService.d.ts.map +1 -0
- package/dist/services/SecurityClientService.js +1036 -0
- package/dist/services/SecurityClientService.js.map +1 -0
- package/dist/services/ServerSettingsService.d.ts +78 -7
- package/dist/services/ServerSettingsService.d.ts.map +1 -1
- package/dist/services/ServerSettingsService.js +194 -35
- package/dist/services/ServerSettingsService.js.map +1 -1
- package/dist/services/SessionCatalogService.d.ts +203 -0
- package/dist/services/SessionCatalogService.d.ts.map +1 -0
- package/dist/services/SessionCatalogService.js +931 -0
- package/dist/services/SessionCatalogService.js.map +1 -0
- package/dist/services/SessionQueuePersistenceService.d.ts.map +1 -1
- package/dist/services/SessionQueuePersistenceService.js +1 -2
- package/dist/services/SessionQueuePersistenceService.js.map +1 -1
- package/dist/services/SessionWakeService.d.ts +55 -0
- package/dist/services/SessionWakeService.d.ts.map +1 -0
- package/dist/services/SessionWakeService.js +139 -0
- package/dist/services/SessionWakeService.js.map +1 -0
- package/dist/services/WorkstreamService.d.ts.map +1 -1
- package/dist/services/WorkstreamService.js +18 -4
- package/dist/services/WorkstreamService.js.map +1 -1
- package/dist/services/bangCompletions.d.ts +60 -0
- package/dist/services/bangCompletions.d.ts.map +1 -0
- package/dist/services/bangCompletions.js +253 -0
- package/dist/services/bangCompletions.js.map +1 -0
- package/dist/services/host-awake/HostAwakeBackend.d.ts +30 -0
- package/dist/services/host-awake/HostAwakeBackend.d.ts.map +1 -0
- package/dist/services/host-awake/HostAwakeBackend.js +12 -0
- package/dist/services/host-awake/HostAwakeBackend.js.map +1 -0
- package/dist/services/host-awake/HostAwakeService.d.ts +44 -0
- package/dist/services/host-awake/HostAwakeService.d.ts.map +1 -0
- package/dist/services/host-awake/HostAwakeService.js +288 -0
- package/dist/services/host-awake/HostAwakeService.js.map +1 -0
- package/dist/services/host-awake/MacHostAwakeBackend.d.ts +36 -0
- package/dist/services/host-awake/MacHostAwakeBackend.d.ts.map +1 -0
- package/dist/services/host-awake/MacHostAwakeBackend.js +279 -0
- package/dist/services/host-awake/MacHostAwakeBackend.js.map +1 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.d.ts +23 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.d.ts.map +1 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.js +496 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.js.map +1 -0
- package/dist/services/index.d.ts +6 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +6 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/installationOwnerProbe.d.ts +20 -0
- package/dist/services/installationOwnerProbe.d.ts.map +1 -0
- package/dist/services/installationOwnerProbe.js +67 -0
- package/dist/services/installationOwnerProbe.js.map +1 -0
- package/dist/services/projectWorkIdle.d.ts +10 -0
- package/dist/services/projectWorkIdle.d.ts.map +1 -1
- package/dist/services/projectWorkIdle.js +6 -1
- package/dist/services/projectWorkIdle.js.map +1 -1
- package/dist/services/providerProcessClassifier.d.ts +18 -0
- package/dist/services/providerProcessClassifier.d.ts.map +1 -0
- package/dist/services/providerProcessClassifier.js +64 -0
- package/dist/services/providerProcessClassifier.js.map +1 -0
- package/dist/services/sessionHeartbeatDefaults.d.ts +11 -0
- package/dist/services/sessionHeartbeatDefaults.d.ts.map +1 -0
- package/dist/services/sessionHeartbeatDefaults.js +29 -0
- package/dist/services/sessionHeartbeatDefaults.js.map +1 -0
- package/dist/session-sandbox-network-launcher.mjs +279 -0
- package/dist/session-sandbox.d.ts +81 -0
- package/dist/session-sandbox.d.ts.map +1 -0
- package/dist/session-sandbox.js +770 -0
- package/dist/session-sandbox.js.map +1 -0
- package/dist/sessions/agent-excerpt.d.ts.map +1 -1
- package/dist/sessions/agent-excerpt.js +5 -1
- package/dist/sessions/agent-excerpt.js.map +1 -1
- package/dist/sessions/catalog-adapters/grok-catalog-adapter.d.ts +19 -0
- package/dist/sessions/catalog-adapters/grok-catalog-adapter.d.ts.map +1 -0
- package/dist/sessions/catalog-adapters/grok-catalog-adapter.js +140 -0
- package/dist/sessions/catalog-adapters/grok-catalog-adapter.js.map +1 -0
- package/dist/sessions/catalog-adapters/opencode-catalog-adapter.d.ts +29 -0
- package/dist/sessions/catalog-adapters/opencode-catalog-adapter.d.ts.map +1 -0
- package/dist/sessions/catalog-adapters/opencode-catalog-adapter.js +168 -0
- package/dist/sessions/catalog-adapters/opencode-catalog-adapter.js.map +1 -0
- package/dist/sessions/catalog-adapters/pi-catalog-adapter.d.ts +24 -0
- package/dist/sessions/catalog-adapters/pi-catalog-adapter.d.ts.map +1 -0
- package/dist/sessions/catalog-adapters/pi-catalog-adapter.js +114 -0
- package/dist/sessions/catalog-adapters/pi-catalog-adapter.js.map +1 -0
- package/dist/sessions/catalog-adapters/row.d.ts +37 -0
- package/dist/sessions/catalog-adapters/row.d.ts.map +1 -0
- package/dist/sessions/catalog-adapters/row.js +39 -0
- package/dist/sessions/catalog-adapters/row.js.map +1 -0
- package/dist/sessions/catalog-types.d.ts +66 -0
- package/dist/sessions/catalog-types.d.ts.map +1 -0
- package/dist/sessions/catalog-types.js +4 -0
- package/dist/sessions/catalog-types.js.map +1 -0
- package/dist/sessions/claude-summary.d.ts +41 -1
- package/dist/sessions/claude-summary.d.ts.map +1 -1
- package/dist/sessions/claude-summary.js +54 -21
- package/dist/sessions/claude-summary.js.map +1 -1
- package/dist/sessions/claude-transcript-cache.d.ts +54 -0
- package/dist/sessions/claude-transcript-cache.d.ts.map +1 -0
- package/dist/sessions/claude-transcript-cache.js +359 -0
- package/dist/sessions/claude-transcript-cache.js.map +1 -0
- package/dist/sessions/codex-discovery.d.ts +2 -2
- package/dist/sessions/codex-discovery.d.ts.map +1 -1
- package/dist/sessions/codex-discovery.js +10 -6
- package/dist/sessions/codex-discovery.js.map +1 -1
- package/dist/sessions/codex-provider-child-projection.d.ts +47 -0
- package/dist/sessions/codex-provider-child-projection.d.ts.map +1 -0
- package/dist/sessions/codex-provider-child-projection.js +289 -0
- package/dist/sessions/codex-provider-child-projection.js.map +1 -0
- package/dist/sessions/codex-reader.d.ts +45 -3
- package/dist/sessions/codex-reader.d.ts.map +1 -1
- package/dist/sessions/codex-reader.js +586 -246
- package/dist/sessions/codex-reader.js.map +1 -1
- package/dist/sessions/codex-user-turn-provenance.d.ts +21 -2
- package/dist/sessions/codex-user-turn-provenance.d.ts.map +1 -1
- package/dist/sessions/codex-user-turn-provenance.js +55 -15
- package/dist/sessions/codex-user-turn-provenance.js.map +1 -1
- package/dist/sessions/dag.d.ts +0 -11
- package/dist/sessions/dag.d.ts.map +1 -1
- package/dist/sessions/dag.js +37 -36
- package/dist/sessions/dag.js.map +1 -1
- package/dist/sessions/gemini-reader.d.ts.map +1 -1
- package/dist/sessions/gemini-reader.js +2 -2
- package/dist/sessions/gemini-reader.js.map +1 -1
- package/dist/sessions/grok-reader.d.ts +11 -27
- package/dist/sessions/grok-reader.d.ts.map +1 -1
- package/dist/sessions/grok-reader.js +204 -417
- package/dist/sessions/grok-reader.js.map +1 -1
- package/dist/sessions/merged-reader.d.ts +46 -0
- package/dist/sessions/merged-reader.d.ts.map +1 -0
- package/dist/sessions/merged-reader.js +157 -0
- package/dist/sessions/merged-reader.js.map +1 -0
- package/dist/sessions/normalization.d.ts +14 -2
- package/dist/sessions/normalization.d.ts.map +1 -1
- package/dist/sessions/normalization.js +474 -75
- package/dist/sessions/normalization.js.map +1 -1
- package/dist/sessions/opencode-db-reader.d.ts +44 -0
- package/dist/sessions/opencode-db-reader.d.ts.map +1 -1
- package/dist/sessions/opencode-db-reader.js +158 -0
- package/dist/sessions/opencode-db-reader.js.map +1 -1
- package/dist/sessions/opencode-reader.d.ts +9 -11
- package/dist/sessions/opencode-reader.d.ts.map +1 -1
- package/dist/sessions/opencode-reader.js +196 -14
- package/dist/sessions/opencode-reader.js.map +1 -1
- package/dist/sessions/pagination.d.ts.map +1 -1
- package/dist/sessions/pagination.js.map +1 -1
- package/dist/sessions/persisted-augments.d.ts +12 -1
- package/dist/sessions/persisted-augments.d.ts.map +1 -1
- package/dist/sessions/persisted-augments.js +69 -190
- package/dist/sessions/persisted-augments.js.map +1 -1
- package/dist/sessions/pi-reader.d.ts +6 -1
- package/dist/sessions/pi-reader.d.ts.map +1 -1
- package/dist/sessions/pi-reader.js +22 -6
- package/dist/sessions/pi-reader.js.map +1 -1
- package/dist/sessions/provider-catalog-family.d.ts +7 -0
- package/dist/sessions/provider-catalog-family.d.ts.map +1 -0
- package/dist/sessions/provider-catalog-family.js +40 -0
- package/dist/sessions/provider-catalog-family.js.map +1 -0
- package/dist/sessions/provider-child-sessions.d.ts +15 -0
- package/dist/sessions/provider-child-sessions.d.ts.map +1 -0
- package/dist/sessions/provider-child-sessions.js +40 -0
- package/dist/sessions/provider-child-sessions.js.map +1 -0
- package/dist/sessions/provider-resolution.d.ts +15 -2
- package/dist/sessions/provider-resolution.d.ts.map +1 -1
- package/dist/sessions/provider-resolution.js +128 -1
- package/dist/sessions/provider-resolution.js.map +1 -1
- package/dist/sessions/reader.d.ts +31 -8
- package/dist/sessions/reader.d.ts.map +1 -1
- package/dist/sessions/reader.js +199 -91
- package/dist/sessions/reader.js.map +1 -1
- package/dist/sessions/recap-overlays.d.ts +13 -1
- package/dist/sessions/recap-overlays.d.ts.map +1 -1
- package/dist/sessions/recap-overlays.js +56 -0
- package/dist/sessions/recap-overlays.js.map +1 -1
- package/dist/sessions/resume-exemption.d.ts +31 -0
- package/dist/sessions/resume-exemption.d.ts.map +1 -0
- package/dist/sessions/resume-exemption.js +28 -0
- package/dist/sessions/resume-exemption.js.map +1 -0
- package/dist/sessions/sessionCollectionGeneration.d.ts +49 -0
- package/dist/sessions/sessionCollectionGeneration.d.ts.map +1 -0
- package/dist/sessions/sessionCollectionGeneration.js +64 -0
- package/dist/sessions/sessionCollectionGeneration.js.map +1 -0
- package/dist/sessions/summary-parser-worker-client.d.ts.map +1 -1
- package/dist/sessions/summary-parser-worker-client.js +4 -3
- package/dist/sessions/summary-parser-worker-client.js.map +1 -1
- package/dist/sessions/types.d.ts +67 -3
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/sessions/types.js +27 -1
- package/dist/sessions/types.js.map +1 -1
- package/dist/subscriptions.d.ts +7 -1
- package/dist/subscriptions.d.ts.map +1 -1
- package/dist/subscriptions.js +236 -46
- package/dist/subscriptions.js.map +1 -1
- package/dist/supervisor/ExternalSessionTracker.d.ts +12 -2
- package/dist/supervisor/ExternalSessionTracker.d.ts.map +1 -1
- package/dist/supervisor/ExternalSessionTracker.js +107 -93
- package/dist/supervisor/ExternalSessionTracker.js.map +1 -1
- package/dist/supervisor/Process.d.ts +220 -43
- package/dist/supervisor/Process.d.ts.map +1 -1
- package/dist/supervisor/Process.js +1169 -306
- package/dist/supervisor/Process.js.map +1 -1
- package/dist/supervisor/ProcessViewerLifecycle.d.ts +72 -0
- package/dist/supervisor/ProcessViewerLifecycle.d.ts.map +1 -0
- package/dist/supervisor/ProcessViewerLifecycle.js +358 -0
- package/dist/supervisor/ProcessViewerLifecycle.js.map +1 -0
- package/dist/supervisor/SessionActivationCoordinator.d.ts +132 -0
- package/dist/supervisor/SessionActivationCoordinator.d.ts.map +1 -0
- package/dist/supervisor/SessionActivationCoordinator.js +603 -0
- package/dist/supervisor/SessionActivationCoordinator.js.map +1 -0
- package/dist/supervisor/SessionDoneCoordinator.d.ts +43 -0
- package/dist/supervisor/SessionDoneCoordinator.d.ts.map +1 -0
- package/dist/supervisor/SessionDoneCoordinator.js +293 -0
- package/dist/supervisor/SessionDoneCoordinator.js.map +1 -0
- package/dist/supervisor/SessionViewerPresence.d.ts +19 -0
- package/dist/supervisor/SessionViewerPresence.d.ts.map +1 -0
- package/dist/supervisor/SessionViewerPresence.js +45 -0
- package/dist/supervisor/SessionViewerPresence.js.map +1 -0
- package/dist/supervisor/Supervisor.d.ts +182 -94
- package/dist/supervisor/Supervisor.d.ts.map +1 -1
- package/dist/supervisor/Supervisor.js +1333 -346
- package/dist/supervisor/Supervisor.js.map +1 -1
- package/dist/supervisor/WorkerQueue.d.ts +15 -0
- package/dist/supervisor/WorkerQueue.d.ts.map +1 -1
- package/dist/supervisor/WorkerQueue.js +18 -1
- package/dist/supervisor/WorkerQueue.js.map +1 -1
- package/dist/supervisor/composeTimeAnchor.d.ts +20 -4
- package/dist/supervisor/composeTimeAnchor.d.ts.map +1 -1
- package/dist/supervisor/composeTimeAnchor.js +35 -6
- package/dist/supervisor/composeTimeAnchor.js.map +1 -1
- package/dist/supervisor/deferredDeliverySettings.d.ts +7 -0
- package/dist/supervisor/deferredDeliverySettings.d.ts.map +1 -1
- package/dist/supervisor/deferredDeliverySettings.js +6 -0
- package/dist/supervisor/deferredDeliverySettings.js.map +1 -1
- package/dist/supervisor/heartbeatSchedule.d.ts +73 -0
- package/dist/supervisor/heartbeatSchedule.d.ts.map +1 -0
- package/dist/supervisor/heartbeatSchedule.js +134 -0
- package/dist/supervisor/heartbeatSchedule.js.map +1 -0
- package/dist/supervisor/sessionSandboxMetadata.d.ts +23 -0
- package/dist/supervisor/sessionSandboxMetadata.d.ts.map +1 -0
- package/dist/supervisor/sessionSandboxMetadata.js +11 -0
- package/dist/supervisor/sessionSandboxMetadata.js.map +1 -0
- package/dist/supervisor/types.d.ts +69 -9
- package/dist/supervisor/types.d.ts.map +1 -1
- package/dist/supervisor/types.js.map +1 -1
- package/dist/uploads/AttachmentStagingService.d.ts +3 -0
- package/dist/uploads/AttachmentStagingService.d.ts.map +1 -1
- package/dist/uploads/AttachmentStagingService.js +13 -2
- package/dist/uploads/AttachmentStagingService.js.map +1 -1
- package/dist/uploads/attachmentAccess.d.ts +8 -0
- package/dist/uploads/attachmentAccess.d.ts.map +1 -0
- package/dist/uploads/attachmentAccess.js +50 -0
- package/dist/uploads/attachmentAccess.js.map +1 -0
- package/dist/uploads/index.d.ts +1 -1
- package/dist/uploads/index.d.ts.map +1 -1
- package/dist/uploads/index.js +1 -1
- package/dist/uploads/index.js.map +1 -1
- package/dist/uploads/manager.d.ts +5 -1
- package/dist/uploads/manager.d.ts.map +1 -1
- package/dist/uploads/manager.js +16 -7
- package/dist/uploads/manager.js.map +1 -1
- package/dist/utils/codexRolloutFiles.d.ts +10 -0
- package/dist/utils/codexRolloutFiles.d.ts.map +1 -1
- package/dist/utils/codexRolloutFiles.js +14 -0
- package/dist/utils/codexRolloutFiles.js.map +1 -1
- package/dist/utils/filePermissions.d.ts +22 -1
- package/dist/utils/filePermissions.d.ts.map +1 -1
- package/dist/utils/filePermissions.js +186 -5
- package/dist/utils/filePermissions.js.map +1 -1
- package/dist/utils/npmCommand.d.ts +14 -0
- package/dist/utils/npmCommand.d.ts.map +1 -0
- package/dist/utils/npmCommand.js +19 -0
- package/dist/utils/npmCommand.js.map +1 -0
- package/dist/utils/posixShell.d.ts +10 -0
- package/dist/utils/posixShell.d.ts.map +1 -0
- package/dist/utils/posixShell.js +12 -0
- package/dist/utils/posixShell.js.map +1 -0
- package/dist/utils/projectFileAccess.d.ts +13 -0
- package/dist/utils/projectFileAccess.d.ts.map +1 -0
- package/dist/utils/projectFileAccess.js +89 -0
- package/dist/utils/projectFileAccess.js.map +1 -0
- package/dist/utils/utf8Text.d.ts +10 -0
- package/dist/utils/utf8Text.d.ts.map +1 -0
- package/dist/utils/utf8Text.js +52 -0
- package/dist/utils/utf8Text.js.map +1 -0
- package/dist/watcher/BatchProcessor.d.ts +55 -0
- package/dist/watcher/BatchProcessor.d.ts.map +1 -1
- package/dist/watcher/BatchProcessor.js +130 -16
- package/dist/watcher/BatchProcessor.js.map +1 -1
- package/dist/watcher/EventBus.d.ts +29 -4
- package/dist/watcher/EventBus.d.ts.map +1 -1
- package/dist/watcher/EventBus.js.map +1 -1
- package/dist/watcher/FileWatcher.d.ts +33 -4
- package/dist/watcher/FileWatcher.d.ts.map +1 -1
- package/dist/watcher/FileWatcher.js +278 -70
- package/dist/watcher/FileWatcher.js.map +1 -1
- package/dist/watcher/FocusedSessionWatchManager.d.ts +13 -1
- package/dist/watcher/FocusedSessionWatchManager.d.ts.map +1 -1
- package/dist/watcher/FocusedSessionWatchManager.js +110 -31
- package/dist/watcher/FocusedSessionWatchManager.js.map +1 -1
- package/dist/watcher/ProviderSessionWatcherRegistry.d.ts +52 -0
- package/dist/watcher/ProviderSessionWatcherRegistry.d.ts.map +1 -0
- package/dist/watcher/ProviderSessionWatcherRegistry.js +108 -0
- package/dist/watcher/ProviderSessionWatcherRegistry.js.map +1 -0
- package/dist/watcher/index.d.ts +4 -2
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js +1 -0
- package/dist/watcher/index.js.map +1 -1
- package/dist/websocketLimits.d.ts +4 -0
- package/dist/websocketLimits.d.ts.map +1 -0
- package/dist/websocketLimits.js +5 -0
- package/dist/websocketLimits.js.map +1 -0
- package/dist/yaModuleEnv.d.ts.map +1 -1
- package/dist/yaModuleEnv.js +7 -1
- package/dist/yaModuleEnv.js.map +1 -1
- package/package.json +7 -6
- package/client-dist/assets/de-BNhVdIq4.js +0 -6
- package/client-dist/assets/es-Csn9n24J.js +0 -6
- package/client-dist/assets/fr-DKx4tSpo.js +0 -6
- package/client-dist/assets/index-1y2h7U7U.js +0 -582
- package/client-dist/assets/index-Cn_ZDP6u.css +0 -1
- package/client-dist/assets/ja-DAkhkwQZ.js +0 -6
- package/client-dist/assets/zh-CN-B7lY0cc6.js +0 -6
|
@@ -6,19 +6,39 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { execFile, spawn } from "node:child_process";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
-
import { CODEX_TOOL_CORRELATION_FIELD, createCodexToolCorrelation, } from "../../../bundled/@yep-anywhere/shared/dist/index.js";
|
|
9
|
+
import { CODEX_TOOL_CORRELATION_FIELD, DEFAULT_CODEX_REASONING_SUMMARY, DEFAULT_SUBAGENT_MAX_DEPTH, canonicalInvocationName, canonicalizeSkillInvocations, createCodexToolCorrelation, hasInvocationCandidate, } from "../../../bundled/@yep-anywhere/shared/dist/index.js";
|
|
10
10
|
import { isCodexCorrelationDebugEnabled, logCodexCorrelationDebug, summarizeCodexNormalizedMessage, } from "../../codex/correlationDebugLogger.js";
|
|
11
11
|
import { canonicalizeCodexToolName, isCodexBackgroundProcessOutput, isCodexInterruptedToolOutput, normalizeCodexCommandExecutionOutput, normalizeCodexCustomToolInvocation, normalizeCodexToolInvocation, normalizeCodexToolOutputWithContext, parseCodexToolArguments, } from "../../codex/normalization.js";
|
|
12
|
+
import { formatCodexSubagentActivity } from "../../codex/subagentActivity.js";
|
|
12
13
|
import { getLogger } from "../../logging/logger.js";
|
|
14
|
+
import { attachToolResultMediaCandidates } from "../../media/inlineImageData.js";
|
|
15
|
+
import { CODEX_INSTALLATION_FAMILY, providerInstallationCoordinator, } from "../../services/ProviderInstallationCoordinator.js";
|
|
13
16
|
import { findCodexCliPath, getCodexCliVersion } from "../cli-detection.js";
|
|
14
17
|
import { logSDKMessage } from "../messageLogger.js";
|
|
15
18
|
import { MessageQueue } from "../messageQueue.js";
|
|
16
|
-
import {
|
|
19
|
+
import { stripYaControlPlaneCredentials } from "./env-filter.js";
|
|
20
|
+
import { createAgentctlSessionEnvBridge, } from "./agentctl-session-env.js";
|
|
21
|
+
import { formatCodexStatusCommand, formatCodexUsageCommand, isCodexChatGptAccount, parseCodexUsageView, } from "./codex-account-commands.js";
|
|
17
22
|
import { getFallbackCodexModelsForCliVersion, normalizeCodexModelList, normalizeSemver, } from "./codex-model-catalog.js";
|
|
18
|
-
import {
|
|
23
|
+
import { normalizeCodexSubscriptionUsage } from "./provider-subscription-usage.js";
|
|
24
|
+
import { asCodexAgentMessageDeltaNotification, asCodexCommandExecutionOutputDeltaNotification, asCodexErrorNotification, asCodexFileChangeOutputDeltaNotification, asCodexItemCompletedNotification, asCodexItemStartedNotification, asCodexPlanDeltaNotification, asCodexRawResponseItemCompletedNotification, asCodexReasoningSummaryTextDeltaNotification, asCodexThreadTokenUsageUpdatedNotification, asCodexTurnCompletedNotification, asCodexTurnPlanUpdatedNotification, isCodexLiveDeltaNotificationMethod, isCodexLiveDeltaSuppressionEnabled, readCodexTurnErrorDetail, } from "./codex-notification-guards.js";
|
|
19
25
|
import { captureCodexSummaryTextFromNotification, captureCodexSummaryTextFromTurnItems, cleanCodexRecapText, cleanCodexSummaryText, CODEX_RECAP_TIMEOUT_MS, CODEX_SUMMARY_TIMEOUT_MS, createCodexForkSummaryPrompt, createCodexForkSummaryThreadResumeParams, createCodexRecapPrompt, joinCodexSummaryText, resolveCodexRecapHelperModel, } from "./codex-summary-helpers.js";
|
|
20
26
|
import { CODEX_BUILTIN_COMMANDS } from "./staticSlashCommands.js";
|
|
21
|
-
|
|
27
|
+
import { inactiveProviderSessionOptionsResult } from "./types.js";
|
|
28
|
+
const log = {
|
|
29
|
+
debug(bindings, message) {
|
|
30
|
+
getLogger().debug({ component: "codex-provider", ...bindings }, message);
|
|
31
|
+
},
|
|
32
|
+
info(bindings, message) {
|
|
33
|
+
getLogger().info({ component: "codex-provider", ...bindings }, message);
|
|
34
|
+
},
|
|
35
|
+
warn(bindings, message) {
|
|
36
|
+
getLogger().warn({ component: "codex-provider", ...bindings }, message);
|
|
37
|
+
},
|
|
38
|
+
error(bindings, message) {
|
|
39
|
+
getLogger().error({ component: "codex-provider", ...bindings }, message);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
22
42
|
const CODEX_DESKTOP_BROWSER_SKILL_NAME = "browser:control-in-app-browser";
|
|
23
43
|
function logSdkCorrelationDebug(sessionId, message, metadata = {}) {
|
|
24
44
|
if (!isCodexCorrelationDebugEnabled())
|
|
@@ -55,14 +75,55 @@ function stringifyTraceValue(value) {
|
|
|
55
75
|
}
|
|
56
76
|
const MODEL_CACHE_TTL_MS = 60 * 60 * 1000;
|
|
57
77
|
const MODEL_LIST_TIMEOUT_MS = 8000;
|
|
78
|
+
const ACCOUNT_RATE_LIMITS_TIMEOUT_MS = 8000;
|
|
58
79
|
const APP_SERVER_INIT_REQUEST_ID = 1;
|
|
59
80
|
const APP_SERVER_MODEL_LIST_REQUEST_ID = 2;
|
|
60
81
|
const APP_SERVER_SHUTDOWN_GRACE_MS = 1500;
|
|
82
|
+
const APP_SERVER_FORCE_KILL_WAIT_MS = 1000;
|
|
83
|
+
const APP_SERVER_EXIT_POLL_MS = 25;
|
|
61
84
|
const CODEX_FAILURE_TRACE_LIMIT = 12;
|
|
62
85
|
const CODEX_FAILURE_PREVIEW_CHARS = 240;
|
|
86
|
+
const CODEX_SERVER_OVERLOAD_RETRY_LIMIT = 16;
|
|
87
|
+
const CODEX_SERVER_OVERLOAD_RETRY_SCALE_MS = 5000;
|
|
63
88
|
const CODEX_THINKING_OFF_MIN_REASONING_EFFORT_PREFIXES = [
|
|
64
89
|
"gpt-5.3-codex-spark",
|
|
65
90
|
];
|
|
91
|
+
function getCodexOverloadRetryDelayMs(attempt) {
|
|
92
|
+
return (attempt + 1) ** 2 * CODEX_SERVER_OVERLOAD_RETRY_SCALE_MS;
|
|
93
|
+
}
|
|
94
|
+
async function waitForCodexOverloadRetry(delayMs, signal) {
|
|
95
|
+
if (signal.aborted)
|
|
96
|
+
return false;
|
|
97
|
+
return await new Promise((resolve) => {
|
|
98
|
+
let settled = false;
|
|
99
|
+
const finish = (elapsed) => {
|
|
100
|
+
if (settled)
|
|
101
|
+
return;
|
|
102
|
+
settled = true;
|
|
103
|
+
clearTimeout(timeout);
|
|
104
|
+
signal.removeEventListener("abort", onAbort);
|
|
105
|
+
resolve(elapsed);
|
|
106
|
+
};
|
|
107
|
+
const onAbort = () => finish(false);
|
|
108
|
+
const timeout = setTimeout(() => finish(true), delayMs);
|
|
109
|
+
timeout.unref?.();
|
|
110
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async function withCodexTimeout(promise, timeoutMs, label) {
|
|
114
|
+
let timeout = null;
|
|
115
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
116
|
+
timeout = setTimeout(() => reject(new Error(`${label} timed out after ${timeoutMs}ms`)), timeoutMs);
|
|
117
|
+
timeout.unref?.();
|
|
118
|
+
});
|
|
119
|
+
try {
|
|
120
|
+
return await Promise.race([promise, timeoutPromise]);
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
if (timeout)
|
|
124
|
+
clearTimeout(timeout);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
66
127
|
/**
|
|
67
128
|
* Local debug knobs for Codex app-server policy behavior.
|
|
68
129
|
*
|
|
@@ -83,56 +144,136 @@ const CODEX_POLICY_OVERRIDES = {
|
|
|
83
144
|
const DECLARE_CODEX_ORIGINATOR = false;
|
|
84
145
|
const DECLARED_CODEX_ORIGINATOR = "Codex Desktop";
|
|
85
146
|
const YEP_ANYWHERE_ORIGINATOR = "yep-anywhere";
|
|
147
|
+
function getCodexNotificationTurnId(notification, threadId) {
|
|
148
|
+
if (!notification.params || typeof notification.params !== "object") {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
const params = notification.params;
|
|
152
|
+
if (params.threadId !== threadId)
|
|
153
|
+
return null;
|
|
154
|
+
if (notification.method === "turn/started" ||
|
|
155
|
+
notification.method === "turn/completed") {
|
|
156
|
+
const turn = params.turn && typeof params.turn === "object"
|
|
157
|
+
? params.turn
|
|
158
|
+
: null;
|
|
159
|
+
return typeof turn?.id === "string" ? turn.id : null;
|
|
160
|
+
}
|
|
161
|
+
// Any same-thread app-server notification carrying a top-level turnId was
|
|
162
|
+
// produced for that live turn. Keeping this structural avoids silently
|
|
163
|
+
// missing a newly added item/delta notification method.
|
|
164
|
+
return typeof params.turnId === "string" ? params.turnId : null;
|
|
165
|
+
}
|
|
166
|
+
function getCodexNotificationTurnStartedAt(notification) {
|
|
167
|
+
if ((notification.method !== "turn/started" &&
|
|
168
|
+
notification.method !== "turn/completed") ||
|
|
169
|
+
!notification.params ||
|
|
170
|
+
typeof notification.params !== "object") {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
const turn = notification.params.turn;
|
|
174
|
+
if (!turn || typeof turn !== "object")
|
|
175
|
+
return null;
|
|
176
|
+
const startedAt = turn.startedAt;
|
|
177
|
+
return typeof startedAt === "number" && Number.isFinite(startedAt)
|
|
178
|
+
? startedAt
|
|
179
|
+
: null;
|
|
180
|
+
}
|
|
181
|
+
function getCodexActiveTurnMismatchId(error) {
|
|
182
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
183
|
+
const quotedPrefix = "expected active turn id `";
|
|
184
|
+
const quotedSeparator = "` but found `";
|
|
185
|
+
if (message.startsWith(quotedPrefix)) {
|
|
186
|
+
const found = message.slice(quotedPrefix.length).split(quotedSeparator)[1];
|
|
187
|
+
if (found?.endsWith("`"))
|
|
188
|
+
return found.slice(0, -1) || null;
|
|
189
|
+
}
|
|
190
|
+
const plainPrefix = "expected active turn id ";
|
|
191
|
+
const plainSeparator = " but found ";
|
|
192
|
+
if (message.startsWith(plainPrefix)) {
|
|
193
|
+
return message.slice(plainPrefix.length).split(plainSeparator)[1] || null;
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
function isProcessTargetRunning(target) {
|
|
198
|
+
try {
|
|
199
|
+
process.kill(target, 0);
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
if (error.code === "ESRCH") {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
if (error.code === "EPERM") {
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
throw error;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
async function waitForProcessTargetExit(target, timeoutMs) {
|
|
213
|
+
const deadline = Date.now() + timeoutMs;
|
|
214
|
+
while (isProcessTargetRunning(target)) {
|
|
215
|
+
const remainingMs = deadline - Date.now();
|
|
216
|
+
if (remainingMs <= 0) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(APP_SERVER_EXIT_POLL_MS, remainingMs)));
|
|
220
|
+
}
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
86
223
|
async function terminateChildProcess(child, graceMs = APP_SERVER_SHUTDOWN_GRACE_MS) {
|
|
87
|
-
if (!child?.pid
|
|
224
|
+
if (!child?.pid) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const pid = child.pid;
|
|
228
|
+
const killTarget = process.platform === "win32" ? pid : -pid;
|
|
229
|
+
if (!isProcessTargetRunning(killTarget)) {
|
|
88
230
|
return;
|
|
89
231
|
}
|
|
90
|
-
const exited = new Promise((resolve) => {
|
|
91
|
-
child.once("exit", () => resolve());
|
|
92
|
-
});
|
|
93
232
|
if (process.platform === "win32") {
|
|
94
233
|
const taskkill = new Promise((resolve) => {
|
|
95
|
-
execFile("taskkill", ["/pid", String(
|
|
234
|
+
execFile("taskkill", ["/pid", String(pid), "/T", "/F"], () => resolve());
|
|
96
235
|
});
|
|
97
236
|
await Promise.race([
|
|
98
237
|
taskkill,
|
|
99
238
|
new Promise((resolve) => setTimeout(resolve, graceMs)),
|
|
100
239
|
]);
|
|
101
|
-
await
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
]);
|
|
240
|
+
if (!(await waitForProcessTargetExit(pid, APP_SERVER_FORCE_KILL_WAIT_MS))) {
|
|
241
|
+
throw new Error(`Failed to terminate Codex app-server PID ${pid}`);
|
|
242
|
+
}
|
|
105
243
|
return;
|
|
106
244
|
}
|
|
107
|
-
const killTarget = child.pid > 0 ? -child.pid : child.pid;
|
|
108
245
|
try {
|
|
109
246
|
process.kill(killTarget, "SIGTERM");
|
|
110
247
|
}
|
|
111
|
-
catch {
|
|
248
|
+
catch (error) {
|
|
249
|
+
if (error.code === "ESRCH") {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
throw error;
|
|
253
|
+
}
|
|
254
|
+
if (await waitForProcessTargetExit(killTarget, graceMs)) {
|
|
112
255
|
return;
|
|
113
256
|
}
|
|
114
|
-
|
|
115
|
-
|
|
257
|
+
try {
|
|
258
|
+
process.kill(killTarget, "SIGKILL");
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
if (error.code === "ESRCH") {
|
|
116
262
|
return;
|
|
117
263
|
}
|
|
118
|
-
|
|
119
|
-
process.kill(killTarget, "SIGKILL");
|
|
120
|
-
}
|
|
121
|
-
catch {
|
|
122
|
-
// Ignore escalation failures during shutdown.
|
|
123
|
-
}
|
|
124
|
-
}, graceMs);
|
|
125
|
-
try {
|
|
126
|
-
await exited;
|
|
264
|
+
throw error;
|
|
127
265
|
}
|
|
128
|
-
|
|
129
|
-
|
|
266
|
+
if (!(await waitForProcessTargetExit(killTarget, APP_SERVER_FORCE_KILL_WAIT_MS))) {
|
|
267
|
+
throw new Error(`Failed to terminate Codex app-server PID ${pid}`);
|
|
130
268
|
}
|
|
131
269
|
}
|
|
132
270
|
class AsyncQueue {
|
|
133
271
|
items = [];
|
|
134
272
|
waiters = [];
|
|
135
273
|
closedError = null;
|
|
274
|
+
get size() {
|
|
275
|
+
return this.items.length;
|
|
276
|
+
}
|
|
136
277
|
push(item) {
|
|
137
278
|
if (this.closedError)
|
|
138
279
|
return;
|
|
@@ -189,16 +330,22 @@ class CodexAppServerClient {
|
|
|
189
330
|
cwd;
|
|
190
331
|
env;
|
|
191
332
|
shouldSuppressNotification;
|
|
333
|
+
sessionSandbox;
|
|
192
334
|
process = null;
|
|
193
335
|
stdoutBuffer = "";
|
|
194
336
|
closePromise = null;
|
|
337
|
+
notificationReceiptSequence = 0;
|
|
338
|
+
notificationReceipts = new WeakMap();
|
|
195
339
|
/** OS PID of the spawned app-server child process */
|
|
196
340
|
get pid() {
|
|
197
341
|
return this.process?.pid;
|
|
198
342
|
}
|
|
199
343
|
isAlive() {
|
|
200
344
|
const child = this.process;
|
|
201
|
-
|
|
345
|
+
if (!child?.pid)
|
|
346
|
+
return false;
|
|
347
|
+
const target = process.platform === "win32" ? child.pid : -child.pid;
|
|
348
|
+
return isProcessTargetRunning(target);
|
|
202
349
|
}
|
|
203
350
|
nextRequestId = 1;
|
|
204
351
|
pendingRequests = new Map();
|
|
@@ -207,15 +354,22 @@ class CodexAppServerClient {
|
|
|
207
354
|
closed = false;
|
|
208
355
|
lastRawProviderEventAt = null;
|
|
209
356
|
lastRawProviderEventSource = null;
|
|
210
|
-
constructor(command, cwd, env, shouldSuppressNotification) {
|
|
357
|
+
constructor(command, cwd, env, shouldSuppressNotification, sessionSandbox) {
|
|
211
358
|
this.command = command;
|
|
212
359
|
this.cwd = cwd;
|
|
213
360
|
this.env = env;
|
|
214
361
|
this.shouldSuppressNotification = shouldSuppressNotification;
|
|
362
|
+
this.sessionSandbox = sessionSandbox;
|
|
215
363
|
}
|
|
216
364
|
get isClosed() {
|
|
217
365
|
return this.closed;
|
|
218
366
|
}
|
|
367
|
+
get lastNotificationReceiptSequence() {
|
|
368
|
+
return this.notificationReceiptSequence;
|
|
369
|
+
}
|
|
370
|
+
getNotificationReceipt(notification) {
|
|
371
|
+
return this.notificationReceipts.get(notification) ?? null;
|
|
372
|
+
}
|
|
219
373
|
setServerRequestHandler(handler) {
|
|
220
374
|
this.onServerRequest = handler;
|
|
221
375
|
}
|
|
@@ -229,13 +383,22 @@ class CodexAppServerClient {
|
|
|
229
383
|
if (this.process) {
|
|
230
384
|
throw new Error("Codex app-server already connected");
|
|
231
385
|
}
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
386
|
+
const commandArgs = ["app-server", "--listen", "stdio://"];
|
|
387
|
+
const sandboxed = this.sessionSandbox?.wrapSpawn(this.command, commandArgs, this.env);
|
|
388
|
+
const child = (() => {
|
|
389
|
+
try {
|
|
390
|
+
return spawn(sandboxed?.command ?? this.command, sandboxed?.args ?? commandArgs, {
|
|
391
|
+
cwd: sandboxed?.cwd ?? this.cwd,
|
|
392
|
+
detached: process.platform !== "win32",
|
|
393
|
+
stdio: sandboxed?.stdio ?? ["pipe", "pipe", "pipe"],
|
|
394
|
+
env: sandboxed?.env ?? this.env,
|
|
395
|
+
shell: sandboxed ? false : process.platform === "win32",
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
finally {
|
|
399
|
+
sandboxed?.release();
|
|
400
|
+
}
|
|
401
|
+
})();
|
|
239
402
|
this.process = child;
|
|
240
403
|
child.stdout?.on("data", (chunk) => {
|
|
241
404
|
this.stdoutBuffer += chunk.toString("utf-8");
|
|
@@ -301,7 +464,7 @@ class CodexAppServerClient {
|
|
|
301
464
|
return;
|
|
302
465
|
}
|
|
303
466
|
this.recordRawProviderEvent(`codex:notification:${method}`);
|
|
304
|
-
this.
|
|
467
|
+
this.enqueueNotification(notification, "provider");
|
|
305
468
|
return;
|
|
306
469
|
}
|
|
307
470
|
// Response to our request
|
|
@@ -387,11 +550,21 @@ class CodexAppServerClient {
|
|
|
387
550
|
this.lastRawProviderEventSource = source;
|
|
388
551
|
}
|
|
389
552
|
injectNotification(notification) {
|
|
390
|
-
this.
|
|
553
|
+
this.enqueueNotification(notification, "synthetic");
|
|
391
554
|
}
|
|
392
555
|
async nextNotification(signal) {
|
|
393
556
|
return await this.notifications.shift(signal);
|
|
394
557
|
}
|
|
558
|
+
enqueueNotification(notification, source) {
|
|
559
|
+
const receipt = {
|
|
560
|
+
sequence: ++this.notificationReceiptSequence,
|
|
561
|
+
receivedAtMs: Date.now(),
|
|
562
|
+
queuedAhead: this.notifications.size,
|
|
563
|
+
source,
|
|
564
|
+
};
|
|
565
|
+
this.notificationReceipts.set(notification, receipt);
|
|
566
|
+
this.notifications.push(notification);
|
|
567
|
+
}
|
|
395
568
|
async close() {
|
|
396
569
|
if (this.closePromise) {
|
|
397
570
|
return await this.closePromise;
|
|
@@ -419,22 +592,24 @@ class CodexAppServerClient {
|
|
|
419
592
|
}
|
|
420
593
|
this.pendingRequests.clear();
|
|
421
594
|
// Emit a terminal error notification so consumers can surface it.
|
|
422
|
-
this.
|
|
595
|
+
this.enqueueNotification({
|
|
423
596
|
method: "error",
|
|
424
597
|
params: {
|
|
425
598
|
error: { message: error.message },
|
|
426
599
|
willRetry: false,
|
|
427
600
|
codexProcessExit: true,
|
|
428
601
|
},
|
|
429
|
-
});
|
|
602
|
+
}, "synthetic");
|
|
430
603
|
this.notifications.close(error);
|
|
431
604
|
this.process = null;
|
|
432
605
|
}
|
|
433
606
|
sendRaw(payload) {
|
|
434
|
-
if (
|
|
607
|
+
if (this.closed) {
|
|
435
608
|
return;
|
|
436
609
|
}
|
|
437
610
|
try {
|
|
611
|
+
if (!this.process?.stdin)
|
|
612
|
+
return;
|
|
438
613
|
this.process.stdin.write(`${JSON.stringify(payload)}\n`);
|
|
439
614
|
}
|
|
440
615
|
catch (error) {
|
|
@@ -456,15 +631,33 @@ export class CodexProvider {
|
|
|
456
631
|
supportsSteering = true;
|
|
457
632
|
supportsRecaps = true;
|
|
458
633
|
supportsNativePromptSuggestions = false;
|
|
634
|
+
supportsNativeCompactThreshold = true;
|
|
459
635
|
config;
|
|
636
|
+
installationCoordinator;
|
|
460
637
|
modelCache = null;
|
|
638
|
+
getConfiguredReasoningSummary = () => DEFAULT_CODEX_REASONING_SUMMARY;
|
|
639
|
+
getConfiguredSubagentMaxDepth = () => DEFAULT_SUBAGENT_MAX_DEPTH;
|
|
461
640
|
constructor(config = {}) {
|
|
641
|
+
if (config.externalChatgptAuth && (config.apiKey || config.baseUrl)) {
|
|
642
|
+
throw new Error("Managed Codex external authentication cannot use API key or endpoint overrides");
|
|
643
|
+
}
|
|
462
644
|
this.config = config;
|
|
645
|
+
this.installationCoordinator =
|
|
646
|
+
config.installationCoordinator ?? providerInstallationCoordinator;
|
|
463
647
|
}
|
|
464
648
|
setCodexPath(codexPath) {
|
|
465
649
|
this.config.codexPath = codexPath;
|
|
466
650
|
this.modelCache = null;
|
|
467
651
|
}
|
|
652
|
+
setReasoningSummaryGetter(getter) {
|
|
653
|
+
this.getConfiguredReasoningSummary = getter;
|
|
654
|
+
}
|
|
655
|
+
setSubagentMaxDepthGetter(getter) {
|
|
656
|
+
this.getConfiguredSubagentMaxDepth = getter;
|
|
657
|
+
}
|
|
658
|
+
getModelCatalogCacheKey() {
|
|
659
|
+
return this.installationCoordinator.getSourceVersion(CODEX_INSTALLATION_FAMILY);
|
|
660
|
+
}
|
|
468
661
|
/**
|
|
469
662
|
* Check if the Codex CLI is installed.
|
|
470
663
|
*/
|
|
@@ -475,7 +668,7 @@ export class CodexProvider {
|
|
|
475
668
|
* Check if Codex CLI is installed by looking in PATH and common locations.
|
|
476
669
|
*/
|
|
477
670
|
async isCodexCliInstalled() {
|
|
478
|
-
return (await findCodexCliPath(this.config.codexPath)) !== null;
|
|
671
|
+
return ((await findCodexCliPath(this.config.codexPath, this.installationCoordinator)) !== null);
|
|
479
672
|
}
|
|
480
673
|
/**
|
|
481
674
|
* Resolve the codex command: explicit config, PATH, or common install locations.
|
|
@@ -483,7 +676,8 @@ export class CodexProvider {
|
|
|
483
676
|
async resolveCodexCommand() {
|
|
484
677
|
if (this.config.codexPath)
|
|
485
678
|
return this.config.codexPath;
|
|
486
|
-
return (await findCodexCliPath()) ??
|
|
679
|
+
return ((await findCodexCliPath(undefined, this.installationCoordinator)) ??
|
|
680
|
+
"codex");
|
|
487
681
|
}
|
|
488
682
|
getCodexClientName(overrideClientName) {
|
|
489
683
|
const normalizedClientName = typeof overrideClientName === "string" ? overrideClientName.trim() : "";
|
|
@@ -498,13 +692,24 @@ export class CodexProvider {
|
|
|
498
692
|
* Build environment overrides for Codex subprocesses.
|
|
499
693
|
*/
|
|
500
694
|
getCodexEnv() {
|
|
501
|
-
const env =
|
|
695
|
+
const env = stripYaControlPlaneCredentials(process.env);
|
|
696
|
+
delete env.YEP_SESSION_WAKE_TOKEN;
|
|
697
|
+
delete env.YEP_SESSION_WAKE_URL;
|
|
502
698
|
if (this.config.baseUrl) {
|
|
503
699
|
env.OPENAI_BASE_URL = this.config.baseUrl;
|
|
504
700
|
}
|
|
505
701
|
if (this.config.apiKey) {
|
|
506
702
|
env.OPENAI_API_KEY = this.config.apiKey;
|
|
507
703
|
}
|
|
704
|
+
if (this.config.externalChatgptAuth) {
|
|
705
|
+
delete env.OPENAI_API_KEY;
|
|
706
|
+
delete env.CODEX_API_KEY;
|
|
707
|
+
delete env.CODEX_ACCESS_TOKEN;
|
|
708
|
+
delete env.OPENAI_BASE_URL;
|
|
709
|
+
}
|
|
710
|
+
if (this.config.codexHome) {
|
|
711
|
+
env.CODEX_HOME = this.config.codexHome;
|
|
712
|
+
}
|
|
508
713
|
return env;
|
|
509
714
|
}
|
|
510
715
|
/**
|
|
@@ -531,8 +736,14 @@ export class CodexProvider {
|
|
|
531
736
|
* Queries Codex app-server's model/list endpoint with a static fallback.
|
|
532
737
|
*/
|
|
533
738
|
async getAvailableModels() {
|
|
739
|
+
return this.installationCoordinator.withReadLease(CODEX_INSTALLATION_FAMILY, () => this.getAvailableModelsWithLease());
|
|
740
|
+
}
|
|
741
|
+
async getAvailableModelsWithLease() {
|
|
534
742
|
const now = Date.now();
|
|
535
|
-
|
|
743
|
+
const installationSourceVersion = this.getModelCatalogCacheKey();
|
|
744
|
+
if (this.modelCache &&
|
|
745
|
+
this.modelCache.expiresAt > now &&
|
|
746
|
+
this.modelCache.installationSourceVersion === installationSourceVersion) {
|
|
536
747
|
return this.modelCache.models;
|
|
537
748
|
}
|
|
538
749
|
let models = [];
|
|
@@ -545,9 +756,25 @@ export class CodexProvider {
|
|
|
545
756
|
this.modelCache = {
|
|
546
757
|
models,
|
|
547
758
|
expiresAt: now + MODEL_CACHE_TTL_MS,
|
|
759
|
+
installationSourceVersion,
|
|
548
760
|
};
|
|
549
761
|
return models;
|
|
550
762
|
}
|
|
763
|
+
async getSubscriptionUsage(models) {
|
|
764
|
+
return this.installationCoordinator.withReadLease(CODEX_INSTALLATION_FAMILY, () => this.getSubscriptionUsageWithLease(models));
|
|
765
|
+
}
|
|
766
|
+
async getSubscriptionUsageWithLease(models) {
|
|
767
|
+
if (!(await this.isCodexCliInstalled()))
|
|
768
|
+
return null;
|
|
769
|
+
try {
|
|
770
|
+
const rawUsage = await this.requestAppServerRateLimits();
|
|
771
|
+
return normalizeCodexSubscriptionUsage(rawUsage, models);
|
|
772
|
+
}
|
|
773
|
+
catch (error) {
|
|
774
|
+
log.debug({ error }, "Codex account rate limits are unavailable");
|
|
775
|
+
return null;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
551
778
|
async getModelsFromAppServer() {
|
|
552
779
|
try {
|
|
553
780
|
const appServerModels = await this.requestAppServerModelList();
|
|
@@ -575,7 +802,9 @@ export class CodexProvider {
|
|
|
575
802
|
return;
|
|
576
803
|
settled = true;
|
|
577
804
|
clearTimeout(timeoutHandle);
|
|
578
|
-
void terminateChildProcess(child)
|
|
805
|
+
void terminateChildProcess(child).catch((error) => {
|
|
806
|
+
log.warn({ error, pid: child.pid }, "Failed to terminate Codex model-list app-server");
|
|
807
|
+
});
|
|
579
808
|
handler();
|
|
580
809
|
};
|
|
581
810
|
const parseAndHandleLine = (line) => {
|
|
@@ -666,6 +895,22 @@ export class CodexProvider {
|
|
|
666
895
|
})}\n`);
|
|
667
896
|
});
|
|
668
897
|
}
|
|
898
|
+
async requestAppServerRateLimits() {
|
|
899
|
+
const appServer = new CodexAppServerClient(await this.resolveCodexCommand(), homedir(), this.getCodexEnv());
|
|
900
|
+
try {
|
|
901
|
+
return await withCodexTimeout((async () => {
|
|
902
|
+
await appServer.connect();
|
|
903
|
+
await appServer.request("initialize", this.createInitializeParams(false));
|
|
904
|
+
appServer.notify("initialized");
|
|
905
|
+
return await appServer.request("account/rateLimits/read");
|
|
906
|
+
})(), ACCOUNT_RATE_LIMITS_TIMEOUT_MS, "Codex account rate-limit probe");
|
|
907
|
+
}
|
|
908
|
+
finally {
|
|
909
|
+
await appServer.close().catch((error) => {
|
|
910
|
+
log.debug({ error }, "Failed to close Codex rate-limit app-server");
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
}
|
|
669
914
|
async getFallbackCodexModels() {
|
|
670
915
|
const version = await this.getInstalledCodexCliVersion();
|
|
671
916
|
return getFallbackCodexModelsForCliVersion(version);
|
|
@@ -673,7 +918,7 @@ export class CodexProvider {
|
|
|
673
918
|
async getInstalledCodexCliVersion() {
|
|
674
919
|
try {
|
|
675
920
|
const codexCommand = await this.resolveCodexCommand();
|
|
676
|
-
const version = await getCodexCliVersion(codexCommand);
|
|
921
|
+
const version = await getCodexCliVersion(codexCommand, this.installationCoordinator);
|
|
677
922
|
return normalizeSemver(version);
|
|
678
923
|
}
|
|
679
924
|
catch {
|
|
@@ -726,15 +971,46 @@ export class CodexProvider {
|
|
|
726
971
|
sandbox: "workspace-write",
|
|
727
972
|
});
|
|
728
973
|
}
|
|
974
|
+
normalizePermissionMode(permissionMode) {
|
|
975
|
+
return permissionMode && permissionMode !== "auto"
|
|
976
|
+
? permissionMode
|
|
977
|
+
: "default";
|
|
978
|
+
}
|
|
979
|
+
mapThreadSandboxToTurnSandbox(sandbox, workspaceWriteSandboxPolicy = null) {
|
|
980
|
+
switch (sandbox) {
|
|
981
|
+
case "danger-full-access":
|
|
982
|
+
return { type: "dangerFullAccess" };
|
|
983
|
+
case "read-only":
|
|
984
|
+
return { type: "readOnly", networkAccess: false };
|
|
985
|
+
case "workspace-write":
|
|
986
|
+
if (workspaceWriteSandboxPolicy?.type === "workspaceWrite") {
|
|
987
|
+
return workspaceWriteSandboxPolicy;
|
|
988
|
+
}
|
|
989
|
+
return {
|
|
990
|
+
type: "workspaceWrite",
|
|
991
|
+
writableRoots: [],
|
|
992
|
+
networkAccess: false,
|
|
993
|
+
excludeTmpdirEnvVar: false,
|
|
994
|
+
excludeSlashTmp: false,
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
}
|
|
729
998
|
/**
|
|
730
999
|
* Start a new Codex session.
|
|
731
1000
|
*/
|
|
732
1001
|
async startSession(options) {
|
|
1002
|
+
const installationLease = await this.installationCoordinator.acquireRuntimeLease(CODEX_INSTALLATION_FAMILY);
|
|
733
1003
|
const queue = new MessageQueue();
|
|
734
1004
|
const abortController = new AbortController();
|
|
735
1005
|
const runtimeState = {
|
|
736
1006
|
threadId: options.resumeSessionId ?? "",
|
|
1007
|
+
resolvedModel: options.model ?? "default",
|
|
1008
|
+
turnModelOverride: options.model ?? null,
|
|
737
1009
|
activeTurnId: null,
|
|
1010
|
+
pendingTurnStart: null,
|
|
1011
|
+
activePermissionMode: this.normalizePermissionMode(options.permissionMode),
|
|
1012
|
+
turnEffortOverride: options.effort,
|
|
1013
|
+
workspaceWriteSandboxPolicy: null,
|
|
738
1014
|
activeToolCallIds: new Set(),
|
|
739
1015
|
backgroundToolCallIds: new Set(),
|
|
740
1016
|
};
|
|
@@ -743,15 +1019,70 @@ export class CodexProvider {
|
|
|
743
1019
|
queue.push(options.initialMessage);
|
|
744
1020
|
}
|
|
745
1021
|
let activeClient = null;
|
|
746
|
-
|
|
747
|
-
|
|
1022
|
+
let resolveInitialActiveClient = null;
|
|
1023
|
+
const initialActiveClient = new Promise((resolve) => {
|
|
1024
|
+
resolveInitialActiveClient = resolve;
|
|
748
1025
|
});
|
|
1026
|
+
const settleInitialActiveClient = (client) => {
|
|
1027
|
+
resolveInitialActiveClient?.(client);
|
|
1028
|
+
resolveInitialActiveClient = null;
|
|
1029
|
+
};
|
|
1030
|
+
let agentctlSessionEnvBridge = null;
|
|
1031
|
+
const skillInventory = {
|
|
1032
|
+
skills: [],
|
|
1033
|
+
stale: true,
|
|
1034
|
+
};
|
|
1035
|
+
const sessionIterator = this.runSession(options, queue, abortController.signal, runtimeState, (client) => {
|
|
1036
|
+
activeClient = client;
|
|
1037
|
+
settleInitialActiveClient(client);
|
|
1038
|
+
}, (bridge) => {
|
|
1039
|
+
agentctlSessionEnvBridge = bridge;
|
|
1040
|
+
}, skillInventory);
|
|
1041
|
+
const iterator = (async function* () {
|
|
1042
|
+
try {
|
|
1043
|
+
yield* sessionIterator;
|
|
1044
|
+
}
|
|
1045
|
+
finally {
|
|
1046
|
+
settleInitialActiveClient(null);
|
|
1047
|
+
await installationLease.release();
|
|
1048
|
+
}
|
|
1049
|
+
})();
|
|
1050
|
+
const updateActiveTurnSettings = async (settings) => {
|
|
1051
|
+
const client = activeClient;
|
|
1052
|
+
let turnId = runtimeState.activeTurnId;
|
|
1053
|
+
if (!turnId && runtimeState.pendingTurnStart) {
|
|
1054
|
+
turnId = await runtimeState.pendingTurnStart;
|
|
1055
|
+
}
|
|
1056
|
+
const threadId = runtimeState.threadId;
|
|
1057
|
+
if (!client || !threadId || !turnId)
|
|
1058
|
+
return;
|
|
1059
|
+
const response = await client.request("turn/settings/update", {
|
|
1060
|
+
threadId,
|
|
1061
|
+
turnId,
|
|
1062
|
+
...settings,
|
|
1063
|
+
});
|
|
1064
|
+
if (response.status === "targetUnavailable") {
|
|
1065
|
+
log.debug({ threadId, turnId, settings }, "Codex active turn ended before its settings update; retaining the selection for the next turn");
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
749
1068
|
return {
|
|
750
1069
|
iterator,
|
|
751
1070
|
queue,
|
|
752
|
-
abort: () => {
|
|
1071
|
+
abort: async () => {
|
|
1072
|
+
settleInitialActiveClient(null);
|
|
1073
|
+
if (activeClient &&
|
|
1074
|
+
runtimeState.threadId &&
|
|
1075
|
+
runtimeState.activeTurnId) {
|
|
1076
|
+
await withCodexTimeout(activeClient.request("turn/interrupt", {
|
|
1077
|
+
threadId: runtimeState.threadId,
|
|
1078
|
+
turnId: runtimeState.activeTurnId,
|
|
1079
|
+
}), 750, "Codex turn interrupt during shutdown").catch((error) => {
|
|
1080
|
+
log.debug({ error, sessionId: runtimeState.threadId }, "Codex turn interrupt did not complete before shutdown");
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
753
1083
|
abortController.abort();
|
|
754
|
-
activeClient?.close();
|
|
1084
|
+
await activeClient?.close();
|
|
1085
|
+
await installationLease.release();
|
|
755
1086
|
},
|
|
756
1087
|
isProcessAlive: () => activeClient?.isAlive() ?? false,
|
|
757
1088
|
getProviderActivity: () => activeClient?.getProviderActivity() ?? {
|
|
@@ -762,21 +1093,76 @@ export class CodexProvider {
|
|
|
762
1093
|
return activeClient?.pid;
|
|
763
1094
|
},
|
|
764
1095
|
probeLiveness: async () => this.probeCodexLiveness(activeClient, runtimeState),
|
|
765
|
-
|
|
1096
|
+
publishAgentctlSessionId: (sessionId, browserDebugEnvironment) => {
|
|
1097
|
+
agentctlSessionEnvBridge?.publishSessionId(sessionId, browserDebugEnvironment);
|
|
1098
|
+
},
|
|
1099
|
+
setEffort: async (effort) => {
|
|
1100
|
+
if (effort !== undefined) {
|
|
1101
|
+
await updateActiveTurnSettings({
|
|
1102
|
+
effort: this.mapEffortToReasoningEffort(effort, options.thinking, runtimeState.turnModelOverride ?? runtimeState.resolvedModel),
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
runtimeState.turnEffortOverride = effort ?? null;
|
|
1106
|
+
},
|
|
1107
|
+
effortUpdatesActiveTurn: true,
|
|
1108
|
+
setModel: async (model) => {
|
|
1109
|
+
if (model !== undefined) {
|
|
1110
|
+
await updateActiveTurnSettings({ model });
|
|
1111
|
+
}
|
|
1112
|
+
runtimeState.turnModelOverride = model ?? null;
|
|
1113
|
+
},
|
|
1114
|
+
setSessionOptions: async (requested) => inactiveProviderSessionOptionsResult(requested, "Codex app-server exposes explicit thread names but no automatic title, recap, progress-summary, or prompt-suggestion generator"),
|
|
1115
|
+
supportedCommands: async () => {
|
|
1116
|
+
if (activeClient) {
|
|
1117
|
+
await this.refreshCodexSkills(activeClient, options.cwd, skillInventory, skillInventory.stale);
|
|
1118
|
+
}
|
|
1119
|
+
return this.createCodexSlashCommands(skillInventory.skills, skillInventory.stale ? "stale" : "current");
|
|
1120
|
+
},
|
|
766
1121
|
steer: async (message) => {
|
|
767
1122
|
if (!activeClient)
|
|
768
1123
|
return false;
|
|
769
1124
|
if (!runtimeState.threadId || !runtimeState.activeTurnId)
|
|
770
1125
|
return false;
|
|
771
|
-
|
|
1126
|
+
let userPrompt = this.extractTextFromMessage(message);
|
|
772
1127
|
if (!userPrompt)
|
|
773
1128
|
return true;
|
|
774
1129
|
try {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
1130
|
+
if (hasInvocationCandidate(userPrompt)) {
|
|
1131
|
+
await this.refreshCodexSkills(activeClient, options.cwd, skillInventory, true);
|
|
1132
|
+
}
|
|
1133
|
+
const prepared = this.createCodexUserInputs(userPrompt, skillInventory.skills, skillInventory.stale ? "stale" : "current");
|
|
1134
|
+
userPrompt = prepared.text;
|
|
1135
|
+
let expectedTurnId = runtimeState.activeTurnId;
|
|
1136
|
+
let retriedAfterMismatch = false;
|
|
1137
|
+
let steerResult;
|
|
1138
|
+
while (true) {
|
|
1139
|
+
try {
|
|
1140
|
+
steerResult = await activeClient.request("turn/steer", {
|
|
1141
|
+
threadId: runtimeState.threadId,
|
|
1142
|
+
clientUserMessageId: message.uuid ?? null,
|
|
1143
|
+
input: prepared.input,
|
|
1144
|
+
expectedTurnId,
|
|
1145
|
+
});
|
|
1146
|
+
break;
|
|
1147
|
+
}
|
|
1148
|
+
catch (error) {
|
|
1149
|
+
const actualTurnId = getCodexActiveTurnMismatchId(error);
|
|
1150
|
+
if (actualTurnId && actualTurnId !== expectedTurnId) {
|
|
1151
|
+
runtimeState.activeTurnId = actualTurnId;
|
|
1152
|
+
if (!retriedAfterMismatch) {
|
|
1153
|
+
log.warn({
|
|
1154
|
+
threadId: runtimeState.threadId,
|
|
1155
|
+
expectedTurnId,
|
|
1156
|
+
actualTurnId,
|
|
1157
|
+
}, "Resynchronized Codex turn id after steer mismatch");
|
|
1158
|
+
expectedTurnId = actualTurnId;
|
|
1159
|
+
retriedAfterMismatch = true;
|
|
1160
|
+
continue;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
throw error;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
780
1166
|
if (steerResult.turnId) {
|
|
781
1167
|
runtimeState.activeTurnId = steerResult.turnId;
|
|
782
1168
|
}
|
|
@@ -796,16 +1182,108 @@ export class CodexProvider {
|
|
|
796
1182
|
return false;
|
|
797
1183
|
if (!runtimeState.threadId || !runtimeState.activeTurnId)
|
|
798
1184
|
return false;
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
1185
|
+
let turnId = runtimeState.activeTurnId;
|
|
1186
|
+
let retriedAfterMismatch = false;
|
|
1187
|
+
while (true) {
|
|
1188
|
+
try {
|
|
1189
|
+
await activeClient.request("turn/interrupt", {
|
|
1190
|
+
threadId: runtimeState.threadId,
|
|
1191
|
+
turnId,
|
|
1192
|
+
});
|
|
1193
|
+
break;
|
|
1194
|
+
}
|
|
1195
|
+
catch (error) {
|
|
1196
|
+
const actualTurnId = getCodexActiveTurnMismatchId(error);
|
|
1197
|
+
if (actualTurnId && actualTurnId !== turnId) {
|
|
1198
|
+
runtimeState.activeTurnId = actualTurnId;
|
|
1199
|
+
if (!retriedAfterMismatch) {
|
|
1200
|
+
log.warn({
|
|
1201
|
+
threadId: runtimeState.threadId,
|
|
1202
|
+
expectedTurnId: turnId,
|
|
1203
|
+
actualTurnId,
|
|
1204
|
+
}, "Resynchronized Codex turn id after interrupt mismatch");
|
|
1205
|
+
turnId = actualTurnId;
|
|
1206
|
+
retriedAfterMismatch = true;
|
|
1207
|
+
continue;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
throw error;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
803
1213
|
return true;
|
|
804
1214
|
},
|
|
805
|
-
runProviderCommand: async (command) => {
|
|
806
|
-
// Only `/compact` is dispatched natively; every other slash command
|
|
807
|
-
// falls through to ordinary turn delivery.
|
|
1215
|
+
runProviderCommand: async (command, argument) => {
|
|
808
1216
|
const name = command.trim().replace(/^\/+/, "").toLowerCase();
|
|
1217
|
+
if (name === "status" || name === "usage") {
|
|
1218
|
+
const client = activeClient ?? (await initialActiveClient);
|
|
1219
|
+
if (!client) {
|
|
1220
|
+
return {
|
|
1221
|
+
handled: true,
|
|
1222
|
+
output: {
|
|
1223
|
+
summary: `/${name}`,
|
|
1224
|
+
details: ["Codex session is not ready yet"],
|
|
1225
|
+
},
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
if (name === "status") {
|
|
1229
|
+
const [accountResult, rateLimitsResult] = await Promise.allSettled([
|
|
1230
|
+
withCodexTimeout(client.request("account/read", {
|
|
1231
|
+
refreshToken: false,
|
|
1232
|
+
}), ACCOUNT_RATE_LIMITS_TIMEOUT_MS, "Codex account status"),
|
|
1233
|
+
withCodexTimeout(client.request("account/rateLimits/read"), ACCOUNT_RATE_LIMITS_TIMEOUT_MS, "Codex account rate limits"),
|
|
1234
|
+
]);
|
|
1235
|
+
return {
|
|
1236
|
+
handled: true,
|
|
1237
|
+
output: formatCodexStatusCommand({
|
|
1238
|
+
model: runtimeState.resolvedModel,
|
|
1239
|
+
cwd: options.cwd,
|
|
1240
|
+
permissionMode: runtimeState.activePermissionMode,
|
|
1241
|
+
threadId: runtimeState.threadId,
|
|
1242
|
+
tokenUsage: runtimeState.latestTokenUsage,
|
|
1243
|
+
accountResponse: accountResult.status === "fulfilled"
|
|
1244
|
+
? accountResult.value
|
|
1245
|
+
: undefined,
|
|
1246
|
+
rateLimitsResponse: rateLimitsResult.status === "fulfilled"
|
|
1247
|
+
? rateLimitsResult.value
|
|
1248
|
+
: undefined,
|
|
1249
|
+
}),
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
const view = parseCodexUsageView(argument);
|
|
1253
|
+
if (!view) {
|
|
1254
|
+
return {
|
|
1255
|
+
handled: true,
|
|
1256
|
+
output: {
|
|
1257
|
+
summary: "Usage: /usage [daily|weekly|cumulative]",
|
|
1258
|
+
},
|
|
1259
|
+
};
|
|
1260
|
+
}
|
|
1261
|
+
try {
|
|
1262
|
+
const account = await withCodexTimeout(client.request("account/read", {
|
|
1263
|
+
refreshToken: false,
|
|
1264
|
+
}), ACCOUNT_RATE_LIMITS_TIMEOUT_MS, "Codex account status");
|
|
1265
|
+
if (!isCodexChatGptAccount(account)) {
|
|
1266
|
+
return {
|
|
1267
|
+
handled: true,
|
|
1268
|
+
output: {
|
|
1269
|
+
summary: "Sign in with ChatGPT to use /usage.",
|
|
1270
|
+
},
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
const usage = await withCodexTimeout(client.request("account/usage/read"), ACCOUNT_RATE_LIMITS_TIMEOUT_MS, "Codex account token usage");
|
|
1274
|
+
return {
|
|
1275
|
+
handled: true,
|
|
1276
|
+
output: formatCodexUsageCommand(usage, view),
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
catch (error) {
|
|
1280
|
+
log.debug({ error, threadId: runtimeState.threadId }, "Codex account token usage is unavailable");
|
|
1281
|
+
return {
|
|
1282
|
+
handled: true,
|
|
1283
|
+
output: { summary: "Token activity unavailable" },
|
|
1284
|
+
};
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
809
1287
|
if (name !== "compact") {
|
|
810
1288
|
return { handled: false };
|
|
811
1289
|
}
|
|
@@ -840,16 +1318,24 @@ export class CodexProvider {
|
|
|
840
1318
|
};
|
|
841
1319
|
}
|
|
842
1320
|
async forkSession(options) {
|
|
1321
|
+
return this.installationCoordinator.withReadLease(CODEX_INSTALLATION_FAMILY, () => this.forkSessionWithLease(options));
|
|
1322
|
+
}
|
|
1323
|
+
async forkSessionWithLease(options) {
|
|
1324
|
+
if (options.boundary && options.boundary.kind !== "turn") {
|
|
1325
|
+
throw new Error("Codex fork requires a turn boundary");
|
|
1326
|
+
}
|
|
843
1327
|
const codexCommand = await this.resolveCodexCommand();
|
|
844
|
-
const appServer = new CodexAppServerClient(codexCommand, options.cwd, this.getCodexEnv());
|
|
1328
|
+
const appServer = new CodexAppServerClient(codexCommand, options.cwd, this.getCodexEnv(), undefined, options.sessionSandbox);
|
|
845
1329
|
appServer.setServerRequestHandler((request) => this.handleForkServerRequest(request));
|
|
846
1330
|
try {
|
|
847
1331
|
await appServer.connect();
|
|
848
1332
|
const experimentalApiEnabled = await this.initializeAppServer(appServer);
|
|
849
1333
|
appServer.notify("initialized");
|
|
850
|
-
const rollbackCount = options.
|
|
851
|
-
?
|
|
852
|
-
:
|
|
1334
|
+
const rollbackCount = options.boundary
|
|
1335
|
+
? 0
|
|
1336
|
+
: options.upToMessageId
|
|
1337
|
+
? await this.resolveCodexForkRollbackCount(appServer, options.sessionId, options.upToMessageId)
|
|
1338
|
+
: 0;
|
|
853
1339
|
const policy = this.mapPermissionModeToThreadPolicy(undefined);
|
|
854
1340
|
const fork = await appServer.request("thread/fork", this.createThreadForkParams(options, policy, experimentalApiEnabled));
|
|
855
1341
|
const forkSessionId = fork.thread?.id;
|
|
@@ -865,6 +1351,7 @@ export class CodexProvider {
|
|
|
865
1351
|
log.info({
|
|
866
1352
|
sourceSessionId: options.sessionId,
|
|
867
1353
|
forkSessionId,
|
|
1354
|
+
boundaryTurnId: options.boundary?.kind === "turn" ? options.boundary.turnId : null,
|
|
868
1355
|
upToMessageId: options.upToMessageId ?? null,
|
|
869
1356
|
rollbackCount,
|
|
870
1357
|
}, "Forked Codex app-server thread");
|
|
@@ -967,9 +1454,10 @@ export class CodexProvider {
|
|
|
967
1454
|
/**
|
|
968
1455
|
* Main session loop using codex app-server.
|
|
969
1456
|
*/
|
|
970
|
-
async *runSession(options, queue, signal, runtimeState, setActiveClient) {
|
|
1457
|
+
async *runSession(options, queue, signal, runtimeState, setActiveClient, setAgentctlSessionEnvBridge, skillInventory) {
|
|
971
1458
|
const codexCommand = await this.resolveCodexCommand();
|
|
972
|
-
const agentctlSessionEnvBridge = createAgentctlSessionEnvBridge(options.resumeSessionId);
|
|
1459
|
+
const agentctlSessionEnvBridge = createAgentctlSessionEnvBridge(options.resumeSessionId, options.getSessionChildEnv);
|
|
1460
|
+
setAgentctlSessionEnvBridge(agentctlSessionEnvBridge);
|
|
973
1461
|
const codexEnv = agentctlSessionEnvBridge.extendEnv(this.getCodexEnv());
|
|
974
1462
|
if (options.resumeSessionId) {
|
|
975
1463
|
// The bridge only reaches bash tool shells that source BASH_ENV, which
|
|
@@ -978,8 +1466,9 @@ export class CodexProvider {
|
|
|
978
1466
|
// inherits it regardless of BASH_ENV. New sessions (id unknown until
|
|
979
1467
|
// thread/start) stay on the bridge alone.
|
|
980
1468
|
codexEnv.AGENTCTL_SESSION_ID = options.resumeSessionId;
|
|
1469
|
+
Object.assign(codexEnv, options.getSessionChildEnv?.(options.resumeSessionId));
|
|
981
1470
|
}
|
|
982
|
-
const appServer = new CodexAppServerClient(codexCommand, options.cwd, codexEnv, (notification) => this.shouldSuppressLiveDeltaNotification(notification, options));
|
|
1471
|
+
const appServer = new CodexAppServerClient(codexCommand, options.cwd, codexEnv, (notification) => this.shouldSuppressLiveDeltaNotification(notification, options), options.sessionSandbox);
|
|
983
1472
|
setActiveClient(appServer);
|
|
984
1473
|
let sessionId = options.resumeSessionId ?? "";
|
|
985
1474
|
const usageByTurnId = new Map();
|
|
@@ -992,23 +1481,34 @@ export class CodexProvider {
|
|
|
992
1481
|
this.logRawCodexNotification(sessionId || "unknown", notification);
|
|
993
1482
|
};
|
|
994
1483
|
appServer.setServerRequestHandler(async (request) => {
|
|
995
|
-
|
|
1484
|
+
if (request.method === "account/chatgptAuthTokens/refresh") {
|
|
1485
|
+
return await this.refreshExternalChatgptAuth(request);
|
|
1486
|
+
}
|
|
1487
|
+
return await this.handleServerRequestApproval(request, options, signal, runtimeState.activePermissionMode);
|
|
996
1488
|
});
|
|
997
1489
|
try {
|
|
998
1490
|
await appServer.connect();
|
|
999
|
-
const experimentalApiEnabled = await this.initializeAppServer(appServer, options.clientName);
|
|
1491
|
+
const experimentalApiEnabled = await this.initializeAppServer(appServer, options.clientName, Boolean(this.config.externalChatgptAuth));
|
|
1000
1492
|
appServer.notify("initialized");
|
|
1001
|
-
|
|
1493
|
+
await this.loginWithExternalChatgptAuth(appServer);
|
|
1494
|
+
await this.refreshCodexSkills(appServer, options.cwd, skillInventory, false);
|
|
1495
|
+
const initialPermissionMode = this.normalizePermissionMode(options.permissionMode);
|
|
1496
|
+
const policy = this.mapPermissionModeToThreadPolicy(initialPermissionMode);
|
|
1002
1497
|
const threadResumeParams = this.createThreadResumeParams(options, sessionId, policy, experimentalApiEnabled);
|
|
1003
1498
|
const threadStartParams = this.createThreadStartParams(options, policy);
|
|
1004
1499
|
const threadResult = await this.startOrResumeThread(appServer, options, threadStartParams, threadResumeParams);
|
|
1500
|
+
options.onPermissionModeApplied?.(initialPermissionMode);
|
|
1005
1501
|
sessionId = threadResult.thread.id;
|
|
1006
1502
|
agentctlSessionEnvBridge.publishSessionId(sessionId);
|
|
1007
1503
|
runtimeState.threadId = sessionId;
|
|
1504
|
+
runtimeState.resolvedModel = threadResult.model;
|
|
1505
|
+
if (threadResult.sandbox?.type === "workspaceWrite") {
|
|
1506
|
+
runtimeState.workspaceWriteSandboxPolicy = threadResult.sandbox;
|
|
1507
|
+
}
|
|
1008
1508
|
failureTrace.sessionId = sessionId;
|
|
1009
1509
|
log.info({
|
|
1010
1510
|
sessionId,
|
|
1011
|
-
permissionMode:
|
|
1511
|
+
permissionMode: initialPermissionMode,
|
|
1012
1512
|
approvalPolicy: policy.approvalPolicy,
|
|
1013
1513
|
sandbox: policy.sandbox,
|
|
1014
1514
|
policyOverrides: {
|
|
@@ -1023,135 +1523,338 @@ export class CodexProvider {
|
|
|
1023
1523
|
subtype: "init",
|
|
1024
1524
|
session_id: sessionId,
|
|
1025
1525
|
cwd: options.cwd,
|
|
1526
|
+
slash_command_inventory: this.createCodexSlashCommands(skillInventory.skills, skillInventory.stale ? "stale" : "current"),
|
|
1026
1527
|
});
|
|
1027
1528
|
const requestedReasoningEffort = this.mapEffortToReasoningEffort(options.effort, options.thinking);
|
|
1028
1529
|
const sessionConfigAck = this.createSessionConfigAckMessage(sessionId, threadResult.model, options.model, threadResult.reasoningEffort, requestedReasoningEffort);
|
|
1029
1530
|
if (sessionConfigAck) {
|
|
1030
1531
|
yield withCodexTimestamp(sessionConfigAck);
|
|
1031
1532
|
}
|
|
1032
|
-
const messageGen = queue;
|
|
1033
1533
|
const liveEventState = this.createLiveEventState();
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
if (signal.aborted) {
|
|
1037
|
-
break;
|
|
1038
|
-
}
|
|
1039
|
-
let userPrompt = this.extractTextFromMessage(message);
|
|
1040
|
-
if (!userPrompt) {
|
|
1041
|
-
continue;
|
|
1042
|
-
}
|
|
1043
|
-
// Prepend global instructions to the first message of new sessions
|
|
1044
|
-
if (isFirstMessage && options.globalInstructions) {
|
|
1045
|
-
userPrompt = `[Global context]\n${options.globalInstructions}\n\n---\n\n${userPrompt}`;
|
|
1046
|
-
isFirstMessage = false;
|
|
1047
|
-
}
|
|
1048
|
-
else {
|
|
1049
|
-
isFirstMessage = false;
|
|
1050
|
-
}
|
|
1051
|
-
// Emit user message with UUID from queue to enable deduplication.
|
|
1052
|
-
const userMessage = withCodexTimestamp({
|
|
1053
|
-
type: "user",
|
|
1054
|
-
uuid: message.uuid,
|
|
1055
|
-
session_id: sessionId,
|
|
1056
|
-
message: {
|
|
1057
|
-
role: "user",
|
|
1058
|
-
content: userPrompt,
|
|
1059
|
-
},
|
|
1060
|
-
});
|
|
1061
|
-
logSdkCorrelationDebug(sessionId, userMessage, {
|
|
1062
|
-
eventKind: "user_message",
|
|
1063
|
-
phase: "submitted",
|
|
1064
|
-
sourceEvent: "queued_input",
|
|
1065
|
-
});
|
|
1066
|
-
failureTrace.lastUserMessage = {
|
|
1067
|
-
uuid: message.uuid,
|
|
1068
|
-
chars: userPrompt.length,
|
|
1069
|
-
};
|
|
1070
|
-
yield userMessage;
|
|
1071
|
-
const messagePermissionMode = this.getPermissionModeFromMessage(message);
|
|
1072
|
-
const turnPolicy = messagePermissionMode
|
|
1073
|
-
? this.mapPermissionModeToThreadPolicy(messagePermissionMode)
|
|
1074
|
-
: null;
|
|
1075
|
-
const turnStartParams = this.createTurnStartParams(sessionId, userPrompt, options, turnPolicy);
|
|
1076
|
-
const turnResult = await appServer.request("turn/start", turnStartParams);
|
|
1077
|
-
const activeTurnId = turnResult.turn.id;
|
|
1534
|
+
const consumeTurn = async function* (provider, turn, notificationBarrierSequence) {
|
|
1535
|
+
const activeTurnId = turn.id;
|
|
1078
1536
|
runtimeState.activeTurnId = activeTurnId;
|
|
1079
1537
|
runtimeState.activeToolCallIds.clear();
|
|
1080
1538
|
runtimeState.backgroundToolCallIds.clear();
|
|
1081
1539
|
failureTrace.activeTurnId = activeTurnId;
|
|
1082
|
-
|
|
1083
|
-
sessionId,
|
|
1084
|
-
turnId: activeTurnId,
|
|
1085
|
-
turnStatus: turnResult.turn.status,
|
|
1086
|
-
}, "Started Codex app-server turn");
|
|
1087
|
-
let turnComplete = turnResult.turn.status !== "inProgress";
|
|
1540
|
+
let turnComplete = turn.status !== "inProgress";
|
|
1088
1541
|
let emittedTurnError = false;
|
|
1542
|
+
let overloadError = null;
|
|
1543
|
+
let suppressedPreTurnNotifications = null;
|
|
1544
|
+
const logSuppressedPreTurnNotifications = (reason) => {
|
|
1545
|
+
if (!suppressedPreTurnNotifications)
|
|
1546
|
+
return;
|
|
1547
|
+
log.warn({
|
|
1548
|
+
sessionId,
|
|
1549
|
+
expectedTurnId: runtimeState.activeTurnId ?? activeTurnId,
|
|
1550
|
+
expectedTurnStartedAt: turn.startedAt,
|
|
1551
|
+
notificationBarrierSequence,
|
|
1552
|
+
...suppressedPreTurnNotifications,
|
|
1553
|
+
reason,
|
|
1554
|
+
}, "Suppressed stale Codex notifications queued before turn start");
|
|
1555
|
+
suppressedPreTurnNotifications = null;
|
|
1556
|
+
};
|
|
1089
1557
|
while (!turnComplete && !signal.aborted) {
|
|
1090
1558
|
const notification = await appServer.nextNotification(signal);
|
|
1091
|
-
if (
|
|
1559
|
+
if (provider.shouldSuppressLiveDeltaNotification(notification, options)) {
|
|
1092
1560
|
continue;
|
|
1093
1561
|
}
|
|
1094
|
-
|
|
1562
|
+
const notificationReceipt = appServer.getNotificationReceipt(notification);
|
|
1095
1563
|
const currentActiveTurnId = runtimeState.activeTurnId ?? activeTurnId;
|
|
1564
|
+
const observedTurnId = getCodexNotificationTurnId(notification, runtimeState.threadId);
|
|
1565
|
+
const queuedBeforeTurnStart = notificationReceipt !== null &&
|
|
1566
|
+
notificationReceipt.sequence <= notificationBarrierSequence;
|
|
1567
|
+
if (observedTurnId &&
|
|
1568
|
+
observedTurnId !== currentActiveTurnId &&
|
|
1569
|
+
queuedBeforeTurnStart) {
|
|
1570
|
+
const queueAgeMs = Math.max(0, Date.now() - notificationReceipt.receivedAtMs);
|
|
1571
|
+
const startedAt = getCodexNotificationTurnStartedAt(notification);
|
|
1572
|
+
if (suppressedPreTurnNotifications) {
|
|
1573
|
+
suppressedPreTurnNotifications.count += 1;
|
|
1574
|
+
suppressedPreTurnNotifications.lastSequence =
|
|
1575
|
+
notificationReceipt.sequence;
|
|
1576
|
+
suppressedPreTurnNotifications.lastTurnId = observedTurnId;
|
|
1577
|
+
suppressedPreTurnNotifications.lastMethod = notification.method;
|
|
1578
|
+
suppressedPreTurnNotifications.lastStartedAt = startedAt;
|
|
1579
|
+
suppressedPreTurnNotifications.maxQueueAgeMs = Math.max(suppressedPreTurnNotifications.maxQueueAgeMs, queueAgeMs);
|
|
1580
|
+
suppressedPreTurnNotifications.maxQueuedAhead = Math.max(suppressedPreTurnNotifications.maxQueuedAhead, notificationReceipt.queuedAhead);
|
|
1581
|
+
}
|
|
1582
|
+
else {
|
|
1583
|
+
suppressedPreTurnNotifications = {
|
|
1584
|
+
count: 1,
|
|
1585
|
+
firstSequence: notificationReceipt.sequence,
|
|
1586
|
+
lastSequence: notificationReceipt.sequence,
|
|
1587
|
+
firstTurnId: observedTurnId,
|
|
1588
|
+
lastTurnId: observedTurnId,
|
|
1589
|
+
firstMethod: notification.method,
|
|
1590
|
+
lastMethod: notification.method,
|
|
1591
|
+
firstStartedAt: startedAt,
|
|
1592
|
+
lastStartedAt: startedAt,
|
|
1593
|
+
maxQueueAgeMs: queueAgeMs,
|
|
1594
|
+
maxQueuedAhead: notificationReceipt.queuedAhead,
|
|
1595
|
+
};
|
|
1596
|
+
}
|
|
1597
|
+
continue;
|
|
1598
|
+
}
|
|
1599
|
+
if (observedTurnId) {
|
|
1600
|
+
logSuppressedPreTurnNotifications("turn-scoped notification reached");
|
|
1601
|
+
}
|
|
1602
|
+
logRawNotification(notification);
|
|
1603
|
+
if (notification.method === "skills/changed") {
|
|
1604
|
+
skillInventory.stale = true;
|
|
1605
|
+
await provider.refreshCodexSkills(appServer, options.cwd, skillInventory, true);
|
|
1606
|
+
yield withCodexTimestamp({
|
|
1607
|
+
type: "system",
|
|
1608
|
+
subtype: "commands_changed",
|
|
1609
|
+
session_id: sessionId,
|
|
1610
|
+
slash_command_inventory: provider.createCodexSlashCommands(skillInventory.skills, skillInventory.stale ? "stale" : "current"),
|
|
1611
|
+
});
|
|
1612
|
+
continue;
|
|
1613
|
+
}
|
|
1096
1614
|
failureTrace.activeTurnId = currentActiveTurnId;
|
|
1097
1615
|
if (notification.method === "thread/tokenUsage/updated") {
|
|
1098
|
-
const usage =
|
|
1616
|
+
const usage = provider.extractTurnUsage(notification.params);
|
|
1099
1617
|
if (usage) {
|
|
1100
1618
|
usageByTurnId.set(usage.turnId, usage.snapshot);
|
|
1619
|
+
runtimeState.latestTokenUsage = usage.total;
|
|
1101
1620
|
}
|
|
1102
1621
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1622
|
+
provider.updateBackgroundProcessTracking(notification, runtimeState);
|
|
1623
|
+
provider.recordCodexFailureTraceEvent(failureTrace, provider.describeNotificationForFailureTrace(notification));
|
|
1624
|
+
if (observedTurnId && observedTurnId !== runtimeState.activeTurnId) {
|
|
1625
|
+
log.warn({
|
|
1626
|
+
sessionId,
|
|
1627
|
+
expectedTurnId: runtimeState.activeTurnId,
|
|
1628
|
+
actualTurnId: observedTurnId,
|
|
1629
|
+
notificationMethod: notification.method,
|
|
1630
|
+
notificationBarrierSequence,
|
|
1631
|
+
notificationReceiptSequence: notificationReceipt?.sequence ?? null,
|
|
1632
|
+
notificationQueueAgeMs: notificationReceipt
|
|
1633
|
+
? Math.max(0, Date.now() - notificationReceipt.receivedAtMs)
|
|
1634
|
+
: null,
|
|
1635
|
+
notificationQueuedAhead: notificationReceipt?.queuedAhead ?? null,
|
|
1636
|
+
notificationSource: notificationReceipt?.source ?? null,
|
|
1637
|
+
notificationTurnStartedAt: getCodexNotificationTurnStartedAt(notification),
|
|
1638
|
+
}, "Resynchronized Codex turn id from provider notification");
|
|
1639
|
+
runtimeState.activeTurnId = observedTurnId;
|
|
1640
|
+
}
|
|
1641
|
+
const effectiveActiveTurnId = runtimeState.activeTurnId ?? currentActiveTurnId;
|
|
1642
|
+
const messages = provider.convertNotificationToSDKMessages(notification, sessionId, usageByTurnId, liveEventState);
|
|
1643
|
+
const isServerOverload = provider.isCodexServerOverloadedNotification(notification, effectiveActiveTurnId);
|
|
1644
|
+
const suppressFailedOverloadCompletion = overloadError !== null &&
|
|
1645
|
+
notification.method === "turn/completed" &&
|
|
1646
|
+
provider.isTurnTerminalNotification(notification, effectiveActiveTurnId);
|
|
1106
1647
|
for (const rawMsg of messages) {
|
|
1107
1648
|
const msg = rawMsg.type === "error"
|
|
1108
1649
|
? {
|
|
1109
1650
|
...rawMsg,
|
|
1110
|
-
codexFailureTrace:
|
|
1111
|
-
codexFailureSummary:
|
|
1651
|
+
codexFailureTrace: provider.snapshotCodexFailureTrace(failureTrace),
|
|
1652
|
+
codexFailureSummary: provider.formatCodexFailureTrace(failureTrace),
|
|
1112
1653
|
}
|
|
1113
1654
|
: rawMsg;
|
|
1655
|
+
if (isServerOverload && msg.type === "error") {
|
|
1656
|
+
overloadError = msg;
|
|
1657
|
+
continue;
|
|
1658
|
+
}
|
|
1659
|
+
if (suppressFailedOverloadCompletion) {
|
|
1660
|
+
continue;
|
|
1661
|
+
}
|
|
1114
1662
|
failureTrace.lastEmittedMessage =
|
|
1115
|
-
|
|
1663
|
+
provider.describeSDKMessageForFailureTrace(msg);
|
|
1116
1664
|
yield msg;
|
|
1117
1665
|
}
|
|
1118
|
-
if (
|
|
1119
|
-
|
|
1666
|
+
if (isServerOverload) {
|
|
1667
|
+
continue;
|
|
1668
|
+
}
|
|
1669
|
+
if (provider.isTurnTerminalNotification(notification, effectiveActiveTurnId)) {
|
|
1670
|
+
if (notification.method === "error")
|
|
1120
1671
|
emittedTurnError = true;
|
|
1121
|
-
}
|
|
1122
1672
|
turnComplete = true;
|
|
1123
1673
|
}
|
|
1124
1674
|
}
|
|
1675
|
+
logSuppressedPreTurnNotifications("turn consumption ended");
|
|
1125
1676
|
runtimeState.activeTurnId = null;
|
|
1126
1677
|
failureTrace.activeTurnId = null;
|
|
1127
|
-
|
|
1678
|
+
if (signal.aborted) {
|
|
1679
|
+
return { overloadError: null };
|
|
1680
|
+
}
|
|
1128
1681
|
if (!emittedTurnError &&
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1682
|
+
turn.status === "failed" &&
|
|
1683
|
+
turn.error?.message) {
|
|
1684
|
+
const fallbackError = {
|
|
1132
1685
|
type: "error",
|
|
1133
|
-
uuid: `codex-error-${
|
|
1686
|
+
uuid: `codex-error-${turn.id}`,
|
|
1134
1687
|
session_id: sessionId,
|
|
1135
|
-
error:
|
|
1136
|
-
codexErrorInfo:
|
|
1137
|
-
codexAdditionalDetails:
|
|
1688
|
+
error: turn.error.message,
|
|
1689
|
+
codexErrorInfo: turn.error.codexErrorInfo ?? null,
|
|
1690
|
+
codexAdditionalDetails: readCodexTurnErrorDetail(turn.error),
|
|
1138
1691
|
codexWillRetry: false,
|
|
1139
|
-
codexTurnId:
|
|
1140
|
-
codexFailureTrace:
|
|
1141
|
-
codexFailureSummary:
|
|
1142
|
-
codexRequestId:
|
|
1692
|
+
codexTurnId: turn.id,
|
|
1693
|
+
codexFailureTrace: provider.snapshotCodexFailureTrace(failureTrace),
|
|
1694
|
+
codexFailureSummary: provider.formatCodexFailureTrace(failureTrace),
|
|
1695
|
+
codexRequestId: provider.extractOpenAIRequestId(turn.error, turn.error.additionalDetails, turn.error.message),
|
|
1143
1696
|
};
|
|
1697
|
+
if (turn.error.codexErrorInfo === "serverOverloaded") {
|
|
1698
|
+
return { overloadError: fallbackError };
|
|
1699
|
+
}
|
|
1700
|
+
yield fallbackError;
|
|
1701
|
+
}
|
|
1702
|
+
if (overloadError) {
|
|
1703
|
+
return { overloadError };
|
|
1144
1704
|
}
|
|
1145
1705
|
yield {
|
|
1146
1706
|
type: "result",
|
|
1147
1707
|
session_id: sessionId,
|
|
1148
1708
|
};
|
|
1709
|
+
return { overloadError: null };
|
|
1710
|
+
};
|
|
1711
|
+
const messageGen = queue[Symbol.asyncIterator]();
|
|
1712
|
+
const stopMessageWait = () => {
|
|
1713
|
+
void messageGen.return?.();
|
|
1714
|
+
};
|
|
1715
|
+
signal.addEventListener("abort", stopMessageWait, { once: true });
|
|
1716
|
+
let isFirstMessage = !options.resumeSessionId;
|
|
1717
|
+
try {
|
|
1718
|
+
for await (const message of messageGen) {
|
|
1719
|
+
if (signal.aborted) {
|
|
1720
|
+
break;
|
|
1721
|
+
}
|
|
1722
|
+
let userPrompt = this.extractTextFromMessage(message);
|
|
1723
|
+
if (!userPrompt) {
|
|
1724
|
+
continue;
|
|
1725
|
+
}
|
|
1726
|
+
// Prepend global instructions to the first message of new sessions
|
|
1727
|
+
if (isFirstMessage && options.globalInstructions) {
|
|
1728
|
+
userPrompt = `[Global context]\n${options.globalInstructions}\n\n---\n\n${userPrompt}`;
|
|
1729
|
+
isFirstMessage = false;
|
|
1730
|
+
}
|
|
1731
|
+
else {
|
|
1732
|
+
isFirstMessage = false;
|
|
1733
|
+
}
|
|
1734
|
+
if (hasInvocationCandidate(userPrompt)) {
|
|
1735
|
+
await this.refreshCodexSkills(appServer, options.cwd, skillInventory, true);
|
|
1736
|
+
}
|
|
1737
|
+
const preparedInput = this.createCodexUserInputs(userPrompt, skillInventory.skills, skillInventory.stale ? "stale" : "current");
|
|
1738
|
+
userPrompt = preparedInput.text;
|
|
1739
|
+
// Emit user message with UUID from queue to enable deduplication.
|
|
1740
|
+
const userMessage = withCodexTimestamp({
|
|
1741
|
+
type: "user",
|
|
1742
|
+
uuid: message.uuid,
|
|
1743
|
+
session_id: sessionId,
|
|
1744
|
+
message: {
|
|
1745
|
+
role: "user",
|
|
1746
|
+
content: userPrompt,
|
|
1747
|
+
},
|
|
1748
|
+
});
|
|
1749
|
+
logSdkCorrelationDebug(sessionId, userMessage, {
|
|
1750
|
+
eventKind: "user_message",
|
|
1751
|
+
phase: "submitted",
|
|
1752
|
+
sourceEvent: "queued_input",
|
|
1753
|
+
});
|
|
1754
|
+
failureTrace.lastUserMessage = {
|
|
1755
|
+
uuid: message.uuid,
|
|
1756
|
+
chars: userPrompt.length,
|
|
1757
|
+
};
|
|
1758
|
+
yield userMessage;
|
|
1759
|
+
const turnPermissionMode = this.normalizePermissionMode(this.getPermissionModeFromMessage(message) ??
|
|
1760
|
+
options.permissionMode);
|
|
1761
|
+
const turnPolicy = this.mapPermissionModeToThreadPolicy(turnPermissionMode);
|
|
1762
|
+
runtimeState.activePermissionMode = turnPermissionMode;
|
|
1763
|
+
const turnStartParams = this.createTurnStartParams(sessionId, preparedInput.input, options, turnPolicy, runtimeState.workspaceWriteSandboxPolicy, runtimeState.turnModelOverride, runtimeState.turnEffortOverride, message.uuid);
|
|
1764
|
+
let notificationBarrierSequence = appServer.lastNotificationReceiptSequence;
|
|
1765
|
+
let settlePendingTurnStart = () => { };
|
|
1766
|
+
const pendingTurnStart = new Promise((resolve) => {
|
|
1767
|
+
settlePendingTurnStart = resolve;
|
|
1768
|
+
});
|
|
1769
|
+
runtimeState.pendingTurnStart = pendingTurnStart;
|
|
1770
|
+
let turnResult;
|
|
1771
|
+
try {
|
|
1772
|
+
turnResult = await appServer.request("turn/start", turnStartParams);
|
|
1773
|
+
runtimeState.activeTurnId = turnResult.turn.id;
|
|
1774
|
+
settlePendingTurnStart(turnResult.turn.id);
|
|
1775
|
+
}
|
|
1776
|
+
catch (error) {
|
|
1777
|
+
settlePendingTurnStart(null);
|
|
1778
|
+
throw error;
|
|
1779
|
+
}
|
|
1780
|
+
finally {
|
|
1781
|
+
if (runtimeState.pendingTurnStart === pendingTurnStart) {
|
|
1782
|
+
runtimeState.pendingTurnStart = null;
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
options.onPermissionModeApplied?.(turnPermissionMode);
|
|
1786
|
+
log.info({
|
|
1787
|
+
sessionId,
|
|
1788
|
+
turnId: turnResult.turn.id,
|
|
1789
|
+
turnStatus: turnResult.turn.status,
|
|
1790
|
+
permissionMode: turnPermissionMode,
|
|
1791
|
+
approvalPolicy: turnPolicy.approvalPolicy,
|
|
1792
|
+
sandboxPolicy: turnStartParams.sandboxPolicy,
|
|
1793
|
+
}, "Started Codex app-server turn");
|
|
1794
|
+
let overloadRetryAttempt = 0;
|
|
1795
|
+
while (!signal.aborted) {
|
|
1796
|
+
const { overloadError } = yield* consumeTurn(this, turnResult.turn, notificationBarrierSequence);
|
|
1797
|
+
if (!overloadError)
|
|
1798
|
+
break;
|
|
1799
|
+
overloadRetryAttempt += 1;
|
|
1800
|
+
if (overloadRetryAttempt > CODEX_SERVER_OVERLOAD_RETRY_LIMIT) {
|
|
1801
|
+
yield {
|
|
1802
|
+
...overloadError,
|
|
1803
|
+
codexWillRetry: false,
|
|
1804
|
+
codexOverloadRetryExhausted: true,
|
|
1805
|
+
codexRetryAttempt: CODEX_SERVER_OVERLOAD_RETRY_LIMIT,
|
|
1806
|
+
codexRetryMaxRetries: CODEX_SERVER_OVERLOAD_RETRY_LIMIT,
|
|
1807
|
+
};
|
|
1808
|
+
yield {
|
|
1809
|
+
type: "result",
|
|
1810
|
+
session_id: sessionId,
|
|
1811
|
+
};
|
|
1812
|
+
break;
|
|
1813
|
+
}
|
|
1814
|
+
const retryDelayMs = getCodexOverloadRetryDelayMs(overloadRetryAttempt);
|
|
1815
|
+
yield {
|
|
1816
|
+
...overloadError,
|
|
1817
|
+
codexWillRetry: true,
|
|
1818
|
+
codexOverloadRetry: true,
|
|
1819
|
+
codexRetryDelayMs: retryDelayMs,
|
|
1820
|
+
codexRetryAttempt: overloadRetryAttempt,
|
|
1821
|
+
codexRetryMaxRetries: CODEX_SERVER_OVERLOAD_RETRY_LIMIT,
|
|
1822
|
+
};
|
|
1823
|
+
log.info({
|
|
1824
|
+
sessionId,
|
|
1825
|
+
turnId: overloadError.codexTurnId,
|
|
1826
|
+
model: turnStartParams.model ?? runtimeState.resolvedModel,
|
|
1827
|
+
retryAttempt: overloadRetryAttempt,
|
|
1828
|
+
retryDelayMs,
|
|
1829
|
+
}, "Codex model is overloaded; waiting to retry the turn");
|
|
1830
|
+
const retryReady = await (this.config.overloadRetryWait ?? waitForCodexOverloadRetry)(retryDelayMs, signal);
|
|
1831
|
+
if (!retryReady || signal.aborted)
|
|
1832
|
+
break;
|
|
1833
|
+
const retryTurnStartParams = this.createTurnStartParams(sessionId, [], options, turnPolicy, runtimeState.workspaceWriteSandboxPolicy, runtimeState.turnModelOverride, runtimeState.turnEffortOverride);
|
|
1834
|
+
notificationBarrierSequence =
|
|
1835
|
+
appServer.lastNotificationReceiptSequence;
|
|
1836
|
+
turnResult = await appServer.request("turn/start", retryTurnStartParams);
|
|
1837
|
+
log.info({
|
|
1838
|
+
sessionId,
|
|
1839
|
+
turnId: turnResult.turn.id,
|
|
1840
|
+
turnStatus: turnResult.turn.status,
|
|
1841
|
+
model: retryTurnStartParams.model ?? runtimeState.resolvedModel,
|
|
1842
|
+
retryAttempt: overloadRetryAttempt,
|
|
1843
|
+
approvalPolicy: turnPolicy.approvalPolicy,
|
|
1844
|
+
sandboxPolicy: retryTurnStartParams.sandboxPolicy,
|
|
1845
|
+
}, "Retried Codex overloaded turn without resending user input");
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
finally {
|
|
1850
|
+
signal.removeEventListener("abort", stopMessageWait);
|
|
1851
|
+
await messageGen.return?.();
|
|
1149
1852
|
}
|
|
1150
1853
|
}
|
|
1151
1854
|
catch (error) {
|
|
1152
1855
|
const codexFailureTrace = this.snapshotCodexFailureTrace(failureTrace);
|
|
1153
|
-
log.error({ error, codexFailureTrace }, "Error in codex app-server session");
|
|
1154
1856
|
if (!signal.aborted) {
|
|
1857
|
+
log.error({ error, codexFailureTrace }, "Error in codex app-server session");
|
|
1155
1858
|
const isProcessFailure = appServer.isClosed;
|
|
1156
1859
|
yield {
|
|
1157
1860
|
type: "error",
|
|
@@ -1171,8 +1874,13 @@ export class CodexProvider {
|
|
|
1171
1874
|
}
|
|
1172
1875
|
finally {
|
|
1173
1876
|
runtimeState.activeTurnId = null;
|
|
1174
|
-
|
|
1175
|
-
|
|
1877
|
+
try {
|
|
1878
|
+
await appServer.close();
|
|
1879
|
+
}
|
|
1880
|
+
finally {
|
|
1881
|
+
agentctlSessionEnvBridge.cleanup();
|
|
1882
|
+
setAgentctlSessionEnvBridge(null);
|
|
1883
|
+
}
|
|
1176
1884
|
}
|
|
1177
1885
|
yield {
|
|
1178
1886
|
type: "result",
|
|
@@ -1211,6 +1919,14 @@ export class CodexProvider {
|
|
|
1211
1919
|
}
|
|
1212
1920
|
return false;
|
|
1213
1921
|
}
|
|
1922
|
+
isCodexServerOverloadedNotification(notification, turnId) {
|
|
1923
|
+
if (notification.method !== "error")
|
|
1924
|
+
return false;
|
|
1925
|
+
const params = asCodexErrorNotification(notification.params);
|
|
1926
|
+
return (params?.turnId === turnId &&
|
|
1927
|
+
params.willRetry === false &&
|
|
1928
|
+
params.error.codexErrorInfo === "serverOverloaded");
|
|
1929
|
+
}
|
|
1214
1930
|
updateBackgroundProcessTracking(notification, runtimeState) {
|
|
1215
1931
|
if (notification.method === "rawResponseItem/completed") {
|
|
1216
1932
|
const params = asCodexRawResponseItemCompletedNotification(notification.params);
|
|
@@ -1271,17 +1987,79 @@ export class CodexProvider {
|
|
|
1271
1987
|
capabilities: experimentalApiEnabled ? { experimentalApi: true } : null,
|
|
1272
1988
|
};
|
|
1273
1989
|
}
|
|
1274
|
-
async initializeAppServer(appServer, clientName) {
|
|
1990
|
+
async initializeAppServer(appServer, clientName, requireExperimentalApi = false) {
|
|
1275
1991
|
try {
|
|
1276
1992
|
await appServer.request("initialize", this.createInitializeParams(true, clientName));
|
|
1277
1993
|
return true;
|
|
1278
1994
|
}
|
|
1279
1995
|
catch (error) {
|
|
1280
|
-
|
|
1996
|
+
if (requireExperimentalApi) {
|
|
1997
|
+
throw new Error("Target Codex external-token protocol is incompatible", { cause: error });
|
|
1998
|
+
}
|
|
1999
|
+
log.info({
|
|
2000
|
+
event: "codex_experimental_api_unavailable",
|
|
2001
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2002
|
+
}, "Codex initialize with experimentalApi failed; retrying without capabilities");
|
|
1281
2003
|
await appServer.request("initialize", this.createInitializeParams(false, clientName));
|
|
1282
2004
|
return false;
|
|
1283
2005
|
}
|
|
1284
2006
|
}
|
|
2007
|
+
async loginWithExternalChatgptAuth(appServer) {
|
|
2008
|
+
const externalAuth = this.config.externalChatgptAuth;
|
|
2009
|
+
if (!externalAuth)
|
|
2010
|
+
return;
|
|
2011
|
+
const projection = externalAuth.initialProjection;
|
|
2012
|
+
this.assertExternalChatgptAuthProjection(projection);
|
|
2013
|
+
try {
|
|
2014
|
+
await appServer.request("account/login/start", {
|
|
2015
|
+
type: "chatgptAuthTokens",
|
|
2016
|
+
accessToken: projection.accessToken,
|
|
2017
|
+
chatgptAccountId: projection.chatgptAccountId,
|
|
2018
|
+
chatgptPlanType: projection.chatgptPlanType,
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
catch (error) {
|
|
2022
|
+
throw new Error("Managed Codex external-token login failed", {
|
|
2023
|
+
cause: error,
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
async refreshExternalChatgptAuth(request) {
|
|
2028
|
+
const externalAuth = this.config.externalChatgptAuth;
|
|
2029
|
+
if (!externalAuth) {
|
|
2030
|
+
throw new Error("Managed Codex external authentication is unavailable");
|
|
2031
|
+
}
|
|
2032
|
+
const params = request.params && typeof request.params === "object"
|
|
2033
|
+
? request.params
|
|
2034
|
+
: {};
|
|
2035
|
+
const previousAccountId = typeof params.previousAccountId === "string"
|
|
2036
|
+
? params.previousAccountId
|
|
2037
|
+
: "";
|
|
2038
|
+
const expectedAccountId = externalAuth.initialProjection.chatgptAccountId;
|
|
2039
|
+
if (!previousAccountId || previousAccountId !== expectedAccountId) {
|
|
2040
|
+
throw new Error("Managed Codex refresh account mismatch");
|
|
2041
|
+
}
|
|
2042
|
+
const projection = await externalAuth.refresh({
|
|
2043
|
+
reason: typeof params.reason === "string" ? params.reason : "unauthorized",
|
|
2044
|
+
previousAccountId,
|
|
2045
|
+
});
|
|
2046
|
+
this.assertExternalChatgptAuthProjection(projection);
|
|
2047
|
+
if (projection.chatgptAccountId !== expectedAccountId) {
|
|
2048
|
+
throw new Error("Managed Codex refresh changed account");
|
|
2049
|
+
}
|
|
2050
|
+
return projection;
|
|
2051
|
+
}
|
|
2052
|
+
assertExternalChatgptAuthProjection(projection) {
|
|
2053
|
+
if (!projection ||
|
|
2054
|
+
typeof projection.accessToken !== "string" ||
|
|
2055
|
+
projection.accessToken.length === 0 ||
|
|
2056
|
+
typeof projection.chatgptAccountId !== "string" ||
|
|
2057
|
+
projection.chatgptAccountId.length === 0 ||
|
|
2058
|
+
!(projection.chatgptPlanType === null ||
|
|
2059
|
+
typeof projection.chatgptPlanType === "string")) {
|
|
2060
|
+
throw new Error("Managed Codex auth projection is invalid");
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
1285
2063
|
async startOrResumeThread(appServer, options, threadStartParams, threadResumeParams) {
|
|
1286
2064
|
return options.resumeSessionId
|
|
1287
2065
|
? await appServer.request("thread/resume", threadResumeParams)
|
|
@@ -1297,7 +2075,7 @@ export class CodexProvider {
|
|
|
1297
2075
|
experimentalRawEvents: false,
|
|
1298
2076
|
};
|
|
1299
2077
|
}
|
|
1300
|
-
createThreadResumeParams(options, sessionId, policy, experimentalApiEnabled = false) {
|
|
2078
|
+
createThreadResumeParams(options, sessionId, policy, experimentalApiEnabled = false, includeTurns = false) {
|
|
1301
2079
|
const params = {
|
|
1302
2080
|
threadId: options.resumeSessionId ?? sessionId,
|
|
1303
2081
|
model: options.model ?? null,
|
|
@@ -1306,7 +2084,7 @@ export class CodexProvider {
|
|
|
1306
2084
|
...this.buildThreadPermissionParams(policy),
|
|
1307
2085
|
config: this.buildThreadConfigOverrides(options),
|
|
1308
2086
|
};
|
|
1309
|
-
if (experimentalApiEnabled) {
|
|
2087
|
+
if (experimentalApiEnabled && !includeTurns) {
|
|
1310
2088
|
params.excludeTurns = true;
|
|
1311
2089
|
}
|
|
1312
2090
|
return params;
|
|
@@ -1314,6 +2092,9 @@ export class CodexProvider {
|
|
|
1314
2092
|
createThreadForkParams(options, policy, experimentalApiEnabled = false) {
|
|
1315
2093
|
const params = {
|
|
1316
2094
|
threadId: options.sessionId,
|
|
2095
|
+
...(options.boundary?.kind === "turn"
|
|
2096
|
+
? { lastTurnId: options.boundary.turnId }
|
|
2097
|
+
: {}),
|
|
1317
2098
|
cwd: options.cwd,
|
|
1318
2099
|
...this.buildThreadPermissionParams(policy),
|
|
1319
2100
|
config: this.buildThreadConfigOverrides({}),
|
|
@@ -1389,6 +2170,7 @@ export class CodexProvider {
|
|
|
1389
2170
|
// skill at thread scope so Codex follows YA's Playwright fallback instead
|
|
1390
2171
|
// of advertising a browser that fails during backend discovery.
|
|
1391
2172
|
const config = {
|
|
2173
|
+
model_reasoning_summary: this.getConfiguredReasoningSummary(),
|
|
1392
2174
|
skills: {
|
|
1393
2175
|
config: [
|
|
1394
2176
|
{
|
|
@@ -1398,27 +2180,121 @@ export class CodexProvider {
|
|
|
1398
2180
|
],
|
|
1399
2181
|
},
|
|
1400
2182
|
};
|
|
2183
|
+
const subagentMaxDepth = this.getConfiguredSubagentMaxDepth();
|
|
2184
|
+
if (subagentMaxDepth !== null) {
|
|
2185
|
+
config.agents = { max_depth: subagentMaxDepth };
|
|
2186
|
+
}
|
|
1401
2187
|
const reasoningEffort = this.mapEffortToReasoningEffort(options.effort, options.thinking, options.model);
|
|
1402
2188
|
if (reasoningEffort) {
|
|
1403
2189
|
config.model_reasoning_effort = reasoningEffort;
|
|
1404
2190
|
}
|
|
2191
|
+
if (options.compactAtContextTokenLimit !== undefined &&
|
|
2192
|
+
Number.isFinite(options.compactAtContextTokenLimit) &&
|
|
2193
|
+
options.compactAtContextTokenLimit > 0) {
|
|
2194
|
+
config.model_auto_compact_token_limit = Math.round(options.compactAtContextTokenLimit);
|
|
2195
|
+
// The YA setting is explicitly a percentage of the full active context.
|
|
2196
|
+
// Pin the scope so a user's Codex config cannot reinterpret it as growth
|
|
2197
|
+
// after the carried compaction prefix.
|
|
2198
|
+
config.model_auto_compact_token_limit_scope = "total";
|
|
2199
|
+
}
|
|
1405
2200
|
return config;
|
|
1406
2201
|
}
|
|
1407
|
-
|
|
2202
|
+
createCodexSlashCommands(skills, inventoryState = "current") {
|
|
2203
|
+
const commands = [...CODEX_BUILTIN_COMMANDS];
|
|
2204
|
+
// Dedup on the exact spelling: Codex recognizes case-distinct skill names
|
|
2205
|
+
// as distinct, so `Foo` and `foo` must both surface rather than collapse.
|
|
2206
|
+
const seenSkills = new Set();
|
|
2207
|
+
for (const skill of skills) {
|
|
2208
|
+
const name = skill.name.trim();
|
|
2209
|
+
if (!skill.enabled ||
|
|
2210
|
+
name === CODEX_DESKTOP_BROWSER_SKILL_NAME ||
|
|
2211
|
+
!name ||
|
|
2212
|
+
seenSkills.has(name)) {
|
|
2213
|
+
continue;
|
|
2214
|
+
}
|
|
2215
|
+
seenSkills.add(name);
|
|
2216
|
+
commands.push({
|
|
2217
|
+
name,
|
|
2218
|
+
description: skill.interface?.shortDescription ??
|
|
2219
|
+
skill.shortDescription ??
|
|
2220
|
+
skill.description,
|
|
2221
|
+
invocation: { kind: "skill", prefix: "$", inventoryState },
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
return commands;
|
|
2225
|
+
}
|
|
2226
|
+
async refreshCodexSkills(appServer, cwd, inventory, forceReload) {
|
|
2227
|
+
try {
|
|
2228
|
+
const result = await appServer.request("skills/list", {
|
|
2229
|
+
cwds: [cwd],
|
|
2230
|
+
forceReload,
|
|
2231
|
+
});
|
|
2232
|
+
inventory.skills = result.data.flatMap((entry) => entry.skills);
|
|
2233
|
+
inventory.stale = false;
|
|
2234
|
+
}
|
|
2235
|
+
catch (error) {
|
|
2236
|
+
inventory.stale = true;
|
|
2237
|
+
log.debug({
|
|
2238
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2239
|
+
cwd,
|
|
2240
|
+
}, "Codex skill inventory is unavailable");
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
createCodexUserInputs(text, skills, inventoryState) {
|
|
2244
|
+
const canonical = canonicalizeSkillInvocations(text, this.createCodexSlashCommands(skills, inventoryState));
|
|
2245
|
+
// Keyed by `canonicalInvocationName`, which preserves case unlike its
|
|
2246
|
+
// `normalize` sibling, so case-distinct skills keep their own paths.
|
|
2247
|
+
const skillByName = new Map();
|
|
2248
|
+
for (const skill of skills) {
|
|
2249
|
+
if (!skill.enabled || skill.name === CODEX_DESKTOP_BROWSER_SKILL_NAME) {
|
|
2250
|
+
continue;
|
|
2251
|
+
}
|
|
2252
|
+
const name = canonicalInvocationName(skill.name);
|
|
2253
|
+
if (name && !skillByName.has(name)) {
|
|
2254
|
+
skillByName.set(name, skill);
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
const structuredSkills = [];
|
|
2258
|
+
const seenPaths = new Set();
|
|
2259
|
+
for (const match of canonical.matches) {
|
|
2260
|
+
const skill = skillByName.get(canonicalInvocationName(match.command.name));
|
|
2261
|
+
if (!skill || seenPaths.has(skill.path))
|
|
2262
|
+
continue;
|
|
2263
|
+
seenPaths.add(skill.path);
|
|
2264
|
+
structuredSkills.push({
|
|
2265
|
+
type: "skill",
|
|
2266
|
+
name: skill.name,
|
|
2267
|
+
path: skill.path,
|
|
2268
|
+
});
|
|
2269
|
+
}
|
|
2270
|
+
return {
|
|
2271
|
+
text: canonical.text,
|
|
2272
|
+
input: [
|
|
2273
|
+
{ type: "text", text: canonical.text, text_elements: [] },
|
|
2274
|
+
...structuredSkills,
|
|
2275
|
+
],
|
|
2276
|
+
};
|
|
2277
|
+
}
|
|
2278
|
+
createTurnStartParams(threadId, input, options, turnPolicy = null, workspaceWriteSandboxPolicy = null, modelOverride = options.model ?? null, effortOverride = options.effort, clientUserMessageId) {
|
|
1408
2279
|
return {
|
|
1409
2280
|
threadId,
|
|
1410
|
-
|
|
2281
|
+
...(clientUserMessageId ? { clientUserMessageId } : {}),
|
|
2282
|
+
model: modelOverride,
|
|
1411
2283
|
...(options.serviceTier ? { serviceTier: options.serviceTier } : {}),
|
|
1412
|
-
input
|
|
1413
|
-
effort:
|
|
1414
|
-
|
|
1415
|
-
|
|
2284
|
+
input,
|
|
2285
|
+
effort: effortOverride === null
|
|
2286
|
+
? null
|
|
2287
|
+
: this.mapEffortToReasoningEffort(effortOverride, options.thinking, modelOverride ?? undefined),
|
|
2288
|
+
...this.buildTurnPermissionParams(turnPolicy, workspaceWriteSandboxPolicy),
|
|
1416
2289
|
};
|
|
1417
2290
|
}
|
|
1418
|
-
buildTurnPermissionParams(policy) {
|
|
2291
|
+
buildTurnPermissionParams(policy, workspaceWriteSandboxPolicy = null) {
|
|
1419
2292
|
if (!policy)
|
|
1420
2293
|
return {};
|
|
1421
|
-
return {
|
|
2294
|
+
return {
|
|
2295
|
+
approvalPolicy: policy.approvalPolicy,
|
|
2296
|
+
sandboxPolicy: this.mapThreadSandboxToTurnSandbox(policy.sandbox, workspaceWriteSandboxPolicy),
|
|
2297
|
+
};
|
|
1422
2298
|
}
|
|
1423
2299
|
/**
|
|
1424
2300
|
* Synthesize a short on-return recap through a separate ephemeral Codex
|
|
@@ -1427,14 +2303,16 @@ export class CodexProvider {
|
|
|
1427
2303
|
* simulated recap helper without mutating the parent session transcript.
|
|
1428
2304
|
*/
|
|
1429
2305
|
async generateSummary(request) {
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
2306
|
+
return this.installationCoordinator.withReadLease(CODEX_INSTALLATION_FAMILY, async () => {
|
|
2307
|
+
switch (request.strategy) {
|
|
2308
|
+
case "side-session": {
|
|
2309
|
+
const text = await this.generateSideSessionRecap(request.recentAssistantText, request.model);
|
|
2310
|
+
return { text };
|
|
2311
|
+
}
|
|
2312
|
+
case "fork":
|
|
2313
|
+
return await this.generateForkBackedSummary(request);
|
|
1434
2314
|
}
|
|
1435
|
-
|
|
1436
|
-
return await this.generateForkBackedSummary(request);
|
|
1437
|
-
}
|
|
2315
|
+
});
|
|
1438
2316
|
}
|
|
1439
2317
|
async generateSideSessionRecap(recentAssistantText, requestedModel) {
|
|
1440
2318
|
const userPrompt = createCodexRecapPrompt(recentAssistantText);
|
|
@@ -1512,7 +2390,7 @@ export class CodexProvider {
|
|
|
1512
2390
|
async generateForkBackedSummary(request) {
|
|
1513
2391
|
const userPrompt = createCodexForkSummaryPrompt(request);
|
|
1514
2392
|
const codexCommand = await this.resolveCodexCommand();
|
|
1515
|
-
const appServer = new CodexAppServerClient(codexCommand, request.cwd, this.getCodexEnv());
|
|
2393
|
+
const appServer = new CodexAppServerClient(codexCommand, request.cwd, this.getCodexEnv(), undefined, request.sessionSandbox);
|
|
1516
2394
|
const abortController = new AbortController();
|
|
1517
2395
|
let timedOut = false;
|
|
1518
2396
|
const abortFromRequest = () => {
|
|
@@ -1677,6 +2555,7 @@ export class CodexProvider {
|
|
|
1677
2555
|
streamingToolOutputByItemKey: new Map(),
|
|
1678
2556
|
toolCallContexts: new Map(),
|
|
1679
2557
|
resultBackedToolItemsByTurnId: new Map(),
|
|
2558
|
+
planUpdateCountByTurnId: new Map(),
|
|
1680
2559
|
};
|
|
1681
2560
|
}
|
|
1682
2561
|
recordCodexFailureTraceEvent(trace, event) {
|
|
@@ -1809,7 +2688,7 @@ export class CodexProvider {
|
|
|
1809
2688
|
phase: "completed",
|
|
1810
2689
|
errorMessage: params?.turn.error?.message,
|
|
1811
2690
|
codexErrorInfo: params?.turn.error?.codexErrorInfo ?? undefined,
|
|
1812
|
-
additionalDetails: params?.turn.error
|
|
2691
|
+
additionalDetails: readCodexTurnErrorDetail(params?.turn.error) ?? undefined,
|
|
1813
2692
|
openaiRequestId: this.extractOpenAIRequestId(params?.turn.error, params?.turn.error?.additionalDetails, params?.turn.error?.message),
|
|
1814
2693
|
});
|
|
1815
2694
|
}
|
|
@@ -1834,7 +2713,7 @@ export class CodexProvider {
|
|
|
1834
2713
|
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
1835
2714
|
fallbackError?.codexErrorInfo ??
|
|
1836
2715
|
undefined,
|
|
1837
|
-
additionalDetails: params?.error
|
|
2716
|
+
additionalDetails: readCodexTurnErrorDetail(params?.error) ??
|
|
1838
2717
|
this.getOptionalString(fallbackError?.additionalDetails) ??
|
|
1839
2718
|
undefined,
|
|
1840
2719
|
openaiRequestId: this.extractOpenAIRequestId(notification.params, fallbackError, errorMessage),
|
|
@@ -1986,6 +2865,7 @@ export class CodexProvider {
|
|
|
1986
2865
|
return {
|
|
1987
2866
|
turnId: notification.turnId,
|
|
1988
2867
|
snapshot: {
|
|
2868
|
+
totalTokens: notification.tokenUsage.last.totalTokens,
|
|
1989
2869
|
inputTokens: notification.tokenUsage.last.inputTokens,
|
|
1990
2870
|
outputTokens: notification.tokenUsage.last.outputTokens,
|
|
1991
2871
|
cachedInputTokens: notification.tokenUsage.last.cachedInputTokens,
|
|
@@ -1993,13 +2873,22 @@ export class CodexProvider {
|
|
|
1993
2873
|
? notification.tokenUsage.modelContextWindow
|
|
1994
2874
|
: undefined,
|
|
1995
2875
|
},
|
|
2876
|
+
total: {
|
|
2877
|
+
totalTokens: notification.tokenUsage.total.totalTokens,
|
|
2878
|
+
inputTokens: notification.tokenUsage.total.inputTokens,
|
|
2879
|
+
outputTokens: notification.tokenUsage.total.outputTokens,
|
|
2880
|
+
cachedInputTokens: notification.tokenUsage.total.cachedInputTokens,
|
|
2881
|
+
contextWindow: typeof notification.tokenUsage.modelContextWindow === "number"
|
|
2882
|
+
? notification.tokenUsage.modelContextWindow
|
|
2883
|
+
: undefined,
|
|
2884
|
+
},
|
|
1996
2885
|
};
|
|
1997
2886
|
}
|
|
1998
|
-
async handleServerRequestApproval(request, options, signal) {
|
|
2887
|
+
async handleServerRequestApproval(request, options, signal, permissionMode = this.normalizePermissionMode(options.permissionMode)) {
|
|
1999
2888
|
log.info({
|
|
2000
2889
|
method: request.method,
|
|
2001
2890
|
requestId: request.id,
|
|
2002
|
-
permissionMode
|
|
2891
|
+
permissionMode,
|
|
2003
2892
|
}, "Codex app-server sent server request");
|
|
2004
2893
|
const params = request.params && typeof request.params === "object"
|
|
2005
2894
|
? request.params
|
|
@@ -2033,7 +2922,7 @@ export class CodexProvider {
|
|
|
2033
2922
|
turnId: commandParams.turnId,
|
|
2034
2923
|
itemId: commandParams.itemId,
|
|
2035
2924
|
};
|
|
2036
|
-
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "accept", "decline");
|
|
2925
|
+
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "accept", "decline", permissionMode);
|
|
2037
2926
|
log.info({
|
|
2038
2927
|
method: request.method,
|
|
2039
2928
|
requestId: request.id,
|
|
@@ -2070,7 +2959,7 @@ export class CodexProvider {
|
|
|
2070
2959
|
turnId: fileParams.turnId,
|
|
2071
2960
|
itemId: fileParams.itemId,
|
|
2072
2961
|
};
|
|
2073
|
-
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "accept", "decline");
|
|
2962
|
+
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "accept", "decline", permissionMode);
|
|
2074
2963
|
log.info({
|
|
2075
2964
|
method: request.method,
|
|
2076
2965
|
requestId: request.id,
|
|
@@ -2093,7 +2982,7 @@ export class CodexProvider {
|
|
|
2093
2982
|
parsedCmd: Array.isArray(params.parsedCmd) ? params.parsedCmd : [],
|
|
2094
2983
|
callId: this.getOptionalString(params.callId),
|
|
2095
2984
|
};
|
|
2096
|
-
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "approved", "denied");
|
|
2985
|
+
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "approved", "denied", permissionMode);
|
|
2097
2986
|
log.info({
|
|
2098
2987
|
method: request.method,
|
|
2099
2988
|
requestId: request.id,
|
|
@@ -2114,7 +3003,7 @@ export class CodexProvider {
|
|
|
2114
3003
|
grantRoot: this.getOptionalString(params.grantRoot),
|
|
2115
3004
|
callId: this.getOptionalString(params.callId),
|
|
2116
3005
|
};
|
|
2117
|
-
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "approved", "denied");
|
|
3006
|
+
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "approved", "denied", permissionMode);
|
|
2118
3007
|
log.info({
|
|
2119
3008
|
method: request.method,
|
|
2120
3009
|
requestId: request.id,
|
|
@@ -2133,24 +3022,61 @@ export class CodexProvider {
|
|
|
2133
3022
|
}, "Codex permission approval params invalid; declining");
|
|
2134
3023
|
return this.createDeclinedPermissionResponse();
|
|
2135
3024
|
}
|
|
2136
|
-
return await this.resolvePermissionRequestApproval(options, permissionParams, signal);
|
|
3025
|
+
return await this.resolvePermissionRequestApproval(options, permissionParams, signal, permissionMode);
|
|
2137
3026
|
}
|
|
2138
3027
|
case "item/tool/requestUserInput": {
|
|
2139
3028
|
const requestInput = this.asToolRequestUserInputParams(request.params);
|
|
2140
|
-
|
|
2141
|
-
|
|
3029
|
+
if (!requestInput) {
|
|
3030
|
+
log.warn({
|
|
3031
|
+
method: request.method,
|
|
3032
|
+
requestId: request.id,
|
|
3033
|
+
}, "Codex tool user-input params invalid; returning no answers");
|
|
3034
|
+
return { answers: {} };
|
|
3035
|
+
}
|
|
3036
|
+
const toolInput = {
|
|
3037
|
+
questions: requestInput.questions.map((question) => ({
|
|
3038
|
+
id: question.id,
|
|
3039
|
+
header: question.header,
|
|
3040
|
+
question: question.question,
|
|
3041
|
+
options: question.options ?? [],
|
|
3042
|
+
multiSelect: false,
|
|
3043
|
+
isOther: question.isOther,
|
|
3044
|
+
isSecret: question.isSecret,
|
|
3045
|
+
})),
|
|
3046
|
+
isBlocking: requestInput.isBlocking,
|
|
3047
|
+
autoResolutionMs: requestInput.autoResolutionMs,
|
|
3048
|
+
threadId: requestInput.threadId,
|
|
3049
|
+
turnId: requestInput.turnId,
|
|
3050
|
+
itemId: requestInput.itemId,
|
|
3051
|
+
};
|
|
3052
|
+
const result = await this.resolveToolApprovalResult(options, "AskUserQuestion", toolInput, signal, permissionMode);
|
|
3053
|
+
const updatedInput = result.behavior === "allow" &&
|
|
3054
|
+
result.updatedInput &&
|
|
3055
|
+
typeof result.updatedInput === "object"
|
|
3056
|
+
? result.updatedInput
|
|
3057
|
+
: null;
|
|
3058
|
+
const submittedAnswers = updatedInput?.answers ?? {};
|
|
2142
3059
|
const answers = {};
|
|
2143
|
-
for (const question of questions) {
|
|
2144
|
-
|
|
3060
|
+
for (const question of requestInput.questions) {
|
|
3061
|
+
const submitted = submittedAnswers[question.id] ??
|
|
3062
|
+
submittedAnswers[question.question];
|
|
3063
|
+
answers[question.id] = {
|
|
3064
|
+
answers: Array.isArray(submitted)
|
|
3065
|
+
? submitted.filter((answer) => typeof answer === "string")
|
|
3066
|
+
: typeof submitted === "string"
|
|
3067
|
+
? [submitted]
|
|
3068
|
+
: [],
|
|
3069
|
+
};
|
|
2145
3070
|
}
|
|
2146
|
-
log.
|
|
3071
|
+
log.info({
|
|
2147
3072
|
method: request.method,
|
|
2148
3073
|
requestId: request.id,
|
|
2149
|
-
questionCount: questions.length,
|
|
2150
|
-
threadId: requestInput
|
|
2151
|
-
turnId: requestInput
|
|
2152
|
-
itemId: requestInput
|
|
2153
|
-
|
|
3074
|
+
questionCount: requestInput.questions.length,
|
|
3075
|
+
threadId: requestInput.threadId,
|
|
3076
|
+
turnId: requestInput.turnId,
|
|
3077
|
+
itemId: requestInput.itemId,
|
|
3078
|
+
behavior: result.behavior,
|
|
3079
|
+
}, "Resolved Codex tool user-input request");
|
|
2154
3080
|
const response = { answers };
|
|
2155
3081
|
return response;
|
|
2156
3082
|
}
|
|
@@ -2160,25 +3086,32 @@ export class CodexProvider {
|
|
|
2160
3086
|
}
|
|
2161
3087
|
}
|
|
2162
3088
|
}
|
|
2163
|
-
async resolveApprovalDecision(options, toolName, toolInput, signal, allowDecision, denyDecision) {
|
|
3089
|
+
async resolveApprovalDecision(options, toolName, toolInput, signal, allowDecision, denyDecision, permissionMode) {
|
|
3090
|
+
const result = await this.resolveToolApprovalResult(options, toolName, toolInput, signal, permissionMode);
|
|
3091
|
+
return result.behavior === "allow" ? allowDecision : denyDecision;
|
|
3092
|
+
}
|
|
3093
|
+
async resolveToolApprovalResult(options, toolName, toolInput, signal, permissionMode) {
|
|
2164
3094
|
if (!options.onToolApproval) {
|
|
2165
3095
|
log.warn({ toolName }, "No onToolApproval handler available; denying Codex approval request");
|
|
2166
|
-
return
|
|
3096
|
+
return { behavior: "deny" };
|
|
2167
3097
|
}
|
|
2168
3098
|
let result;
|
|
2169
3099
|
try {
|
|
2170
|
-
result = await options.onToolApproval(toolName, toolInput, {
|
|
3100
|
+
result = await options.onToolApproval(toolName, toolInput, {
|
|
3101
|
+
signal,
|
|
3102
|
+
permissionMode,
|
|
3103
|
+
});
|
|
2171
3104
|
}
|
|
2172
3105
|
catch (error) {
|
|
2173
3106
|
log.warn({ toolName, error }, "onToolApproval threw; denying Codex approval request");
|
|
2174
|
-
return
|
|
3107
|
+
return { behavior: "deny" };
|
|
2175
3108
|
}
|
|
2176
3109
|
log.info({ toolName, behavior: result.behavior }, "Resolved tool approval callback result");
|
|
2177
|
-
return result
|
|
3110
|
+
return result;
|
|
2178
3111
|
}
|
|
2179
|
-
async resolvePermissionRequestApproval(options, params, signal) {
|
|
2180
|
-
if (
|
|
2181
|
-
return this.createGrantedPermissionResponse(params, "
|
|
3112
|
+
async resolvePermissionRequestApproval(options, params, signal, permissionMode) {
|
|
3113
|
+
if (permissionMode === "bypassPermissions") {
|
|
3114
|
+
return this.createGrantedPermissionResponse(params, "turn");
|
|
2182
3115
|
}
|
|
2183
3116
|
const toolInput = {
|
|
2184
3117
|
cwd: params.cwd,
|
|
@@ -2188,9 +3121,9 @@ export class CodexProvider {
|
|
|
2188
3121
|
turnId: params.turnId,
|
|
2189
3122
|
itemId: params.itemId,
|
|
2190
3123
|
};
|
|
2191
|
-
const decision = await this.resolveApprovalDecision(options, "Permissions", toolInput, signal, "accept", "decline");
|
|
3124
|
+
const decision = await this.resolveApprovalDecision(options, "Permissions", toolInput, signal, "accept", "decline", permissionMode);
|
|
2192
3125
|
return decision === "accept"
|
|
2193
|
-
? this.createGrantedPermissionResponse(params, "
|
|
3126
|
+
? this.createGrantedPermissionResponse(params, "turn")
|
|
2194
3127
|
: this.createDeclinedPermissionResponse();
|
|
2195
3128
|
}
|
|
2196
3129
|
createGrantedPermissionResponse(params, scope) {
|
|
@@ -2236,6 +3169,73 @@ export class CodexProvider {
|
|
|
2236
3169
|
});
|
|
2237
3170
|
return [message];
|
|
2238
3171
|
}
|
|
3172
|
+
case "turn/plan/updated": {
|
|
3173
|
+
const params = asCodexTurnPlanUpdatedNotification(notification.params);
|
|
3174
|
+
if (!params)
|
|
3175
|
+
return [];
|
|
3176
|
+
const sequence = (liveEventState.planUpdateCountByTurnId.get(params.turnId) ?? 0) + 1;
|
|
3177
|
+
liveEventState.planUpdateCountByTurnId.set(params.turnId, sequence);
|
|
3178
|
+
const callId = `codex-plan-${params.turnId}-${sequence}`;
|
|
3179
|
+
const observedAt = new Date().toISOString();
|
|
3180
|
+
const input = {
|
|
3181
|
+
...(params.explanation ? { explanation: params.explanation } : {}),
|
|
3182
|
+
plan: params.plan.map(({ status, step }) => ({
|
|
3183
|
+
step,
|
|
3184
|
+
status: status === "inProgress" ? "in_progress" : status,
|
|
3185
|
+
})),
|
|
3186
|
+
};
|
|
3187
|
+
const toolUse = withCodexTimestamp({
|
|
3188
|
+
type: "assistant",
|
|
3189
|
+
session_id: sessionId,
|
|
3190
|
+
uuid: this.buildItemToolUuid(callId),
|
|
3191
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("plan_update", params.turnId, callId, observedAt),
|
|
3192
|
+
message: {
|
|
3193
|
+
role: "assistant",
|
|
3194
|
+
content: [
|
|
3195
|
+
{
|
|
3196
|
+
type: "tool_use",
|
|
3197
|
+
id: callId,
|
|
3198
|
+
name: "UpdatePlan",
|
|
3199
|
+
input,
|
|
3200
|
+
},
|
|
3201
|
+
],
|
|
3202
|
+
},
|
|
3203
|
+
}, observedAt);
|
|
3204
|
+
const toolResult = withCodexTimestamp({
|
|
3205
|
+
type: "user",
|
|
3206
|
+
session_id: sessionId,
|
|
3207
|
+
uuid: this.buildItemResultUuid(callId),
|
|
3208
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("plan_update", params.turnId, callId, observedAt),
|
|
3209
|
+
message: {
|
|
3210
|
+
role: "user",
|
|
3211
|
+
content: [
|
|
3212
|
+
{
|
|
3213
|
+
type: "tool_result",
|
|
3214
|
+
tool_use_id: callId,
|
|
3215
|
+
content: "Plan updated",
|
|
3216
|
+
},
|
|
3217
|
+
],
|
|
3218
|
+
},
|
|
3219
|
+
toolUseResult: { message: "Plan updated" },
|
|
3220
|
+
}, observedAt);
|
|
3221
|
+
logSdkCorrelationDebug(sessionId, toolUse, {
|
|
3222
|
+
eventKind: "plan_update",
|
|
3223
|
+
turnId: params.turnId,
|
|
3224
|
+
itemId: callId,
|
|
3225
|
+
callId,
|
|
3226
|
+
phase: "completed",
|
|
3227
|
+
sourceEvent: notification.method,
|
|
3228
|
+
});
|
|
3229
|
+
logSdkCorrelationDebug(sessionId, toolResult, {
|
|
3230
|
+
eventKind: "tool_result",
|
|
3231
|
+
turnId: params.turnId,
|
|
3232
|
+
itemId: callId,
|
|
3233
|
+
callId,
|
|
3234
|
+
phase: "completed",
|
|
3235
|
+
sourceEvent: notification.method,
|
|
3236
|
+
});
|
|
3237
|
+
return [toolUse, toolResult];
|
|
3238
|
+
}
|
|
2239
3239
|
case "turn/completed": {
|
|
2240
3240
|
const params = asCodexTurnCompletedNotification(notification.params);
|
|
2241
3241
|
const turnId = params?.turn.id ?? null;
|
|
@@ -2249,6 +3249,9 @@ export class CodexProvider {
|
|
|
2249
3249
|
}
|
|
2250
3250
|
: undefined;
|
|
2251
3251
|
const messages = [];
|
|
3252
|
+
if (turnId) {
|
|
3253
|
+
liveEventState.planUpdateCountByTurnId.delete(turnId);
|
|
3254
|
+
}
|
|
2252
3255
|
const orphanedToolUseIds = turnId
|
|
2253
3256
|
? this.consumeLiveResultBackedToolItems(liveEventState, turnId)
|
|
2254
3257
|
: [];
|
|
@@ -2340,7 +3343,7 @@ export class CodexProvider {
|
|
|
2340
3343
|
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
2341
3344
|
fallbackError?.codexErrorInfo ??
|
|
2342
3345
|
null,
|
|
2343
|
-
codexAdditionalDetails: params?.error
|
|
3346
|
+
codexAdditionalDetails: readCodexTurnErrorDetail(params?.error) ??
|
|
2344
3347
|
this.getOptionalString(fallbackError?.additionalDetails) ??
|
|
2345
3348
|
null,
|
|
2346
3349
|
codexWillRetry: willRetry,
|
|
@@ -2454,6 +3457,18 @@ export class CodexProvider {
|
|
|
2454
3457
|
const text = this.getOptionalString(itemRecord.text) ?? "";
|
|
2455
3458
|
return { id, type: "agent_message", text };
|
|
2456
3459
|
}
|
|
3460
|
+
case "function_call_output": {
|
|
3461
|
+
const name = this.getOptionalString(itemRecord.name);
|
|
3462
|
+
if (!name)
|
|
3463
|
+
return null;
|
|
3464
|
+
return {
|
|
3465
|
+
id,
|
|
3466
|
+
type: "function_call_output",
|
|
3467
|
+
name,
|
|
3468
|
+
namespace: this.getOptionalString(itemRecord.namespace),
|
|
3469
|
+
output: itemRecord.output,
|
|
3470
|
+
};
|
|
3471
|
+
}
|
|
2457
3472
|
case "command_execution": {
|
|
2458
3473
|
const commandActions = (Array.isArray(itemRecord.commandActions)
|
|
2459
3474
|
? itemRecord.commandActions
|
|
@@ -2593,7 +3608,7 @@ export class CodexProvider {
|
|
|
2593
3608
|
kind,
|
|
2594
3609
|
agentThreadId: this.getOptionalString(itemRecord.agentThreadId) ?? "",
|
|
2595
3610
|
agentPath,
|
|
2596
|
-
text:
|
|
3611
|
+
text: formatCodexSubagentActivity(kind, agentPath),
|
|
2597
3612
|
};
|
|
2598
3613
|
}
|
|
2599
3614
|
case "context_compaction":
|
|
@@ -2634,19 +3649,6 @@ export class CodexProvider {
|
|
|
2634
3649
|
}
|
|
2635
3650
|
return "";
|
|
2636
3651
|
}
|
|
2637
|
-
formatSubagentActivity(kind, agentPath) {
|
|
2638
|
-
const target = agentPath ? `: ${agentPath}` : "";
|
|
2639
|
-
switch (kind) {
|
|
2640
|
-
case "started":
|
|
2641
|
-
return `Subagent started${target}`;
|
|
2642
|
-
case "interacted":
|
|
2643
|
-
return `Subagent updated${target}`;
|
|
2644
|
-
case "interrupted":
|
|
2645
|
-
return `Subagent interrupted${target}`;
|
|
2646
|
-
default:
|
|
2647
|
-
return `Subagent ${kind}${target}`;
|
|
2648
|
-
}
|
|
2649
|
-
}
|
|
2650
3652
|
normalizeStatus(status) {
|
|
2651
3653
|
if (typeof status !== "string")
|
|
2652
3654
|
return "unknown";
|
|
@@ -2695,16 +3697,23 @@ export class CodexProvider {
|
|
|
2695
3697
|
if (typeof record.threadId !== "string" ||
|
|
2696
3698
|
typeof record.turnId !== "string" ||
|
|
2697
3699
|
typeof record.itemId !== "string" ||
|
|
2698
|
-
!Array.isArray(record.questions)
|
|
3700
|
+
!Array.isArray(record.questions) ||
|
|
3701
|
+
(record.isBlocking !== undefined &&
|
|
3702
|
+
typeof record.isBlocking !== "boolean")) {
|
|
2699
3703
|
return null;
|
|
2700
3704
|
}
|
|
2701
|
-
return
|
|
3705
|
+
return {
|
|
3706
|
+
...params,
|
|
3707
|
+
// Codex 0.147 made this field required. Older app-server releases omit
|
|
3708
|
+
// it and defined those requests as blocking.
|
|
3709
|
+
isBlocking: typeof record.isBlocking === "boolean" ? record.isBlocking : true,
|
|
3710
|
+
};
|
|
2702
3711
|
}
|
|
2703
3712
|
buildItemEventKey(turnId, itemId) {
|
|
2704
3713
|
return `${turnId}:${itemId}`;
|
|
2705
3714
|
}
|
|
2706
|
-
buildItemMessageUuid(
|
|
2707
|
-
return
|
|
3715
|
+
buildItemMessageUuid(itemId) {
|
|
3716
|
+
return itemId;
|
|
2708
3717
|
}
|
|
2709
3718
|
// Native tool thread items carry Codex's globally-unique call_id as item.id,
|
|
2710
3719
|
// so this uuid aligns directly with the durable response item. A code-mode
|
|
@@ -2758,7 +3767,7 @@ export class CodexProvider {
|
|
|
2758
3767
|
const message = withCodexTimestamp({
|
|
2759
3768
|
type: "assistant",
|
|
2760
3769
|
session_id: sessionId,
|
|
2761
|
-
uuid: this.buildItemMessageUuid(
|
|
3770
|
+
uuid: this.buildItemMessageUuid(itemId),
|
|
2762
3771
|
_isStreaming: true,
|
|
2763
3772
|
message: {
|
|
2764
3773
|
role: "assistant",
|
|
@@ -2783,7 +3792,7 @@ export class CodexProvider {
|
|
|
2783
3792
|
const message = withCodexTimestamp({
|
|
2784
3793
|
type: "assistant",
|
|
2785
3794
|
session_id: sessionId,
|
|
2786
|
-
uuid: this.buildItemMessageUuid(
|
|
3795
|
+
uuid: this.buildItemMessageUuid(itemId),
|
|
2787
3796
|
_isStreaming: true,
|
|
2788
3797
|
message: {
|
|
2789
3798
|
role: "assistant",
|
|
@@ -2920,6 +3929,7 @@ export class CodexProvider {
|
|
|
2920
3929
|
? { toolUseResult: normalized.structured }
|
|
2921
3930
|
: {}),
|
|
2922
3931
|
}, observedAt);
|
|
3932
|
+
attachToolResultMediaCandidates(message, normalized.mediaCandidates);
|
|
2923
3933
|
logSdkCorrelationDebug(sessionId, message, {
|
|
2924
3934
|
eventKind: "tool_result",
|
|
2925
3935
|
turnId: params.turnId,
|
|
@@ -3005,6 +4015,7 @@ export class CodexProvider {
|
|
|
3005
4015
|
? { toolUseResult: normalized.structured }
|
|
3006
4016
|
: {}),
|
|
3007
4017
|
}, observedAt);
|
|
4018
|
+
attachToolResultMediaCandidates(message, normalized.mediaCandidates);
|
|
3008
4019
|
logSdkCorrelationDebug(sessionId, message, {
|
|
3009
4020
|
eventKind: "tool_result",
|
|
3010
4021
|
turnId: params.turnId,
|
|
@@ -3042,13 +4053,17 @@ export class CodexProvider {
|
|
|
3042
4053
|
convertItemToSDKMessages(item, sessionId, turnId, sourceEvent) {
|
|
3043
4054
|
const isComplete = sourceEvent === "item/completed";
|
|
3044
4055
|
const observedAt = new Date().toISOString();
|
|
3045
|
-
// Native tool items key the uuid on call_id (item.id).
|
|
3046
|
-
//
|
|
3047
|
-
// metadata for adoption of the outer durable call_* id
|
|
3048
|
-
// Message/reasoning
|
|
4056
|
+
// Native tool items key the uuid on call_id (item.id). Nested code-mode
|
|
4057
|
+
// commands and image views temporarily key on their inner item id and
|
|
4058
|
+
// carry correlation metadata for adoption of the outer durable call_* id.
|
|
4059
|
+
// Message/reasoning item ids are the provider ids persisted in rollout.
|
|
3049
4060
|
const uuid = this.isToolBackedThreadItem(item)
|
|
3050
4061
|
? this.buildItemToolUuid(item.id)
|
|
3051
|
-
:
|
|
4062
|
+
: item.type === "agent_message" ||
|
|
4063
|
+
item.type === "reasoning" ||
|
|
4064
|
+
item.type === "function_call_output"
|
|
4065
|
+
? item.id
|
|
4066
|
+
: `${item.id}-${turnId}`;
|
|
3052
4067
|
switch (item.type) {
|
|
3053
4068
|
case "reasoning": {
|
|
3054
4069
|
const message = withCodexTimestamp({
|
|
@@ -3093,6 +4108,32 @@ export class CodexProvider {
|
|
|
3093
4108
|
});
|
|
3094
4109
|
return [message];
|
|
3095
4110
|
}
|
|
4111
|
+
case "function_call_output": {
|
|
4112
|
+
if (!isComplete)
|
|
4113
|
+
return [];
|
|
4114
|
+
const normalized = normalizeCodexToolOutputWithContext(item.output);
|
|
4115
|
+
const message = withCodexTimestamp({
|
|
4116
|
+
type: "system",
|
|
4117
|
+
subtype: "tool_output",
|
|
4118
|
+
session_id: sessionId,
|
|
4119
|
+
uuid,
|
|
4120
|
+
content: normalized.content,
|
|
4121
|
+
codexToolName: item.name,
|
|
4122
|
+
...(item.namespace ? { codexToolNamespace: item.namespace } : {}),
|
|
4123
|
+
...(normalized.structured !== undefined
|
|
4124
|
+
? { toolUseResult: normalized.structured }
|
|
4125
|
+
: {}),
|
|
4126
|
+
}, observedAt);
|
|
4127
|
+
attachToolResultMediaCandidates(message, normalized.mediaCandidates);
|
|
4128
|
+
logSdkCorrelationDebug(sessionId, message, {
|
|
4129
|
+
eventKind: "tool_result",
|
|
4130
|
+
turnId,
|
|
4131
|
+
itemId: item.id,
|
|
4132
|
+
phase: "completed",
|
|
4133
|
+
sourceEvent,
|
|
4134
|
+
});
|
|
4135
|
+
return [message];
|
|
4136
|
+
}
|
|
3096
4137
|
case "command_execution": {
|
|
3097
4138
|
const messages = [];
|
|
3098
4139
|
const correlationStartedAt = item.durationMs !== undefined
|
|
@@ -3228,6 +4269,7 @@ export class CodexProvider {
|
|
|
3228
4269
|
{
|
|
3229
4270
|
type: "tool_result",
|
|
3230
4271
|
tool_use_id: item.id,
|
|
4272
|
+
...(item.status !== "completed" ? { is_error: true } : {}),
|
|
3231
4273
|
content: item.status === "completed"
|
|
3232
4274
|
? `File changes applied:\n${changesSummary}`
|
|
3233
4275
|
: item.status === "declined"
|
|
@@ -3467,6 +4509,7 @@ export class CodexProvider {
|
|
|
3467
4509
|
type: "assistant",
|
|
3468
4510
|
session_id: sessionId,
|
|
3469
4511
|
uuid,
|
|
4512
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("image_view", turnId, item.id),
|
|
3470
4513
|
message: {
|
|
3471
4514
|
role: "assistant",
|
|
3472
4515
|
content: [
|
|
@@ -3492,6 +4535,7 @@ export class CodexProvider {
|
|
|
3492
4535
|
type: "user",
|
|
3493
4536
|
session_id: sessionId,
|
|
3494
4537
|
uuid: `${uuid}-result`,
|
|
4538
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("image_view", turnId, item.id),
|
|
3495
4539
|
message: {
|
|
3496
4540
|
role: "user",
|
|
3497
4541
|
content: [
|
|
@@ -3503,6 +4547,9 @@ export class CodexProvider {
|
|
|
3503
4547
|
],
|
|
3504
4548
|
},
|
|
3505
4549
|
}, observedAt);
|
|
4550
|
+
attachToolResultMediaCandidates(toolResultMessage, [
|
|
4551
|
+
{ originalPath: item.path },
|
|
4552
|
+
]);
|
|
3506
4553
|
logSdkCorrelationDebug(sessionId, toolResultMessage, {
|
|
3507
4554
|
eventKind: "tool_result",
|
|
3508
4555
|
turnId,
|