yepanywhere 0.7.0 → 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 +39 -3
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.js +327 -0
- 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/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 +4 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.js +16 -7
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts +1 -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 +1 -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 +2 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts.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 +180 -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 +62 -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-identity.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/host-identity.js +1 -2
- package/bundled/@yep-anywhere/shared/dist/host-identity.js.map +1 -1
- 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 +30 -11
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/index.js +27 -8
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.d.ts +1 -1
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.js +5 -2
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.js.map +1 -1
- 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 +3 -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 +1261 -2
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.js +1624 -18
- 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 +1 -1
- package/bundled/@yep-anywhere/shared/dist/toon.js +1 -1
- package/bundled/@yep-anywhere/shared/dist/types.d.ts +167 -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/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 +51 -2
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +685 -142
- package/dist/app.js.map +1 -1
- package/dist/augments/augment-generator.d.ts +1 -1
- package/dist/augments/augment-generator.js +2 -2
- 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 +211 -0
- 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 +1 -3
- 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 +358 -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 +84 -26
- 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 +96 -10
- package/dist/metadata/SessionMetadataService.d.ts.map +1 -1
- package/dist/metadata/SessionMetadataService.js +249 -35
- 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 +5 -0
- 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 +2 -1
- package/dist/routes/bang-commands.d.ts.map +1 -1
- package/dist/routes/bang-commands.js +35 -16
- package/dist/routes/bang-commands.js.map +1 -1
- 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/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 +60 -9
- 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 +1 -1
- package/dist/routes/processes.d.ts.map +1 -1
- package/dist/routes/processes.js +40 -11
- 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 +2 -1
- package/dist/routes/project-queue-response.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 +160 -50
- 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/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 +1521 -407
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/settings-parsers.d.ts +3 -0
- package/dist/routes/settings-parsers.d.ts.map +1 -1
- package/dist/routes/settings-parsers.js +154 -12
- package/dist/routes/settings-parsers.js.map +1 -1
- package/dist/routes/settings.d.ts +16 -0
- package/dist/routes/settings.d.ts.map +1 -1
- package/dist/routes/settings.js +220 -24
- 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 +43 -3
- package/dist/routes/version.d.ts.map +1 -1
- package/dist/routes/version.js +114 -7
- 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 -72
- 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 +12 -3
- package/dist/sdk/providers/acp/client.d.ts.map +1 -1
- package/dist/sdk/providers/acp/client.js +24 -6
- 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-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 +48 -8
- package/dist/sdk/providers/claude.d.ts.map +1 -1
- package/dist/sdk/providers/claude.js +470 -104
- 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.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.js +5 -2
- 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/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/ResponseItem.d.ts +4 -1
- package/dist/sdk/providers/codex-protocol/generated/ResponseItem.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/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 +13 -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 +3 -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 +18 -0
- 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 +4 -4
- 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/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/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/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 +1214 -201
- 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 +26 -19
- package/dist/sdk/providers/grok-acp.d.ts.map +1 -1
- package/dist/sdk/providers/grok-acp.js +145 -208
- 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 +24 -1
- package/dist/sdk/providers/index.d.ts.map +1 -1
- package/dist/sdk/providers/index.js +69 -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 +3 -2
- package/dist/sdk/providers/pi.d.ts.map +1 -1
- package/dist/sdk/providers/pi.js +35 -30
- 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 +152 -11
- 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 +52 -6
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/security/approvalAuditLog.js.map +1 -1
- 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/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 +15 -4
- package/dist/services/ProjectQueueScheduler.d.ts.map +1 -1
- package/dist/services/ProjectQueueScheduler.js +167 -10
- 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 +544 -295
- 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 +70 -7
- package/dist/services/ServerSettingsService.d.ts.map +1 -1
- package/dist/services/ServerSettingsService.js +186 -39
- 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 +25 -7
- package/dist/services/bangCompletions.d.ts.map +1 -1
- package/dist/services/bangCompletions.js +85 -18
- package/dist/services/bangCompletions.js.map +1 -1
- package/dist/services/host-awake/HostAwakeService.d.ts.map +1 -1
- package/dist/services/host-awake/HostAwakeService.js +8 -2
- package/dist/services/host-awake/HostAwakeService.js.map +1 -1
- package/dist/services/host-awake/MacHostAwakeBackend.d.ts.map +1 -1
- package/dist/services/host-awake/MacHostAwakeBackend.js +1 -1
- package/dist/services/host-awake/MacHostAwakeBackend.js.map +1 -1
- package/dist/services/host-awake/WindowsHostAwakeBackend.d.ts +2 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.d.ts.map +1 -1
- package/dist/services/host-awake/WindowsHostAwakeBackend.js +13 -4
- package/dist/services/host-awake/WindowsHostAwakeBackend.js.map +1 -1
- package/dist/services/index.d.ts +4 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +4 -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 +53 -20
- 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 +41 -1
- package/dist/sessions/codex-reader.d.ts.map +1 -1
- package/dist/sessions/codex-reader.js +562 -280
- 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 +8 -1
- package/dist/sessions/provider-resolution.d.ts.map +1 -1
- package/dist/sessions/provider-resolution.js +46 -1
- package/dist/sessions/provider-resolution.js.map +1 -1
- package/dist/sessions/reader.d.ts +8 -1
- package/dist/sessions/reader.d.ts.map +1 -1
- package/dist/sessions/reader.js +64 -19
- 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 +9 -6
- package/dist/sessions/resume-exemption.d.ts.map +1 -1
- package/dist/sessions/resume-exemption.js +12 -6
- package/dist/sessions/resume-exemption.js.map +1 -1
- 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 +38 -2
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/sessions/types.js +8 -0
- 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 +229 -46
- package/dist/subscriptions.js.map +1 -1
- package/dist/supervisor/ExternalSessionTracker.d.ts +5 -0
- package/dist/supervisor/ExternalSessionTracker.d.ts.map +1 -1
- package/dist/supervisor/ExternalSessionTracker.js +8 -2
- package/dist/supervisor/ExternalSessionTracker.js.map +1 -1
- package/dist/supervisor/Process.d.ts +178 -40
- package/dist/supervisor/Process.d.ts.map +1 -1
- package/dist/supervisor/Process.js +829 -265
- 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 +178 -88
- package/dist/supervisor/Supervisor.d.ts.map +1 -1
- package/dist/supervisor/Supervisor.js +1268 -342
- 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 +54 -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 +18 -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 +273 -67
- 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 +3 -1
- 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 +6 -5
- 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-7OpGawa_.css +0 -1
- package/client-dist/assets/index-CSJgXvUR.js +0 -593
- 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,6 +75,7 @@ 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;
|
|
@@ -62,9 +83,47 @@ const APP_SERVER_FORCE_KILL_WAIT_MS = 1000;
|
|
|
62
83
|
const APP_SERVER_EXIT_POLL_MS = 25;
|
|
63
84
|
const CODEX_FAILURE_TRACE_LIMIT = 12;
|
|
64
85
|
const CODEX_FAILURE_PREVIEW_CHARS = 240;
|
|
86
|
+
const CODEX_SERVER_OVERLOAD_RETRY_LIMIT = 16;
|
|
87
|
+
const CODEX_SERVER_OVERLOAD_RETRY_SCALE_MS = 5000;
|
|
65
88
|
const CODEX_THINKING_OFF_MIN_REASONING_EFFORT_PREFIXES = [
|
|
66
89
|
"gpt-5.3-codex-spark",
|
|
67
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
|
+
}
|
|
68
127
|
/**
|
|
69
128
|
* Local debug knobs for Codex app-server policy behavior.
|
|
70
129
|
*
|
|
@@ -85,6 +144,56 @@ const CODEX_POLICY_OVERRIDES = {
|
|
|
85
144
|
const DECLARE_CODEX_ORIGINATOR = false;
|
|
86
145
|
const DECLARED_CODEX_ORIGINATOR = "Codex Desktop";
|
|
87
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
|
+
}
|
|
88
197
|
function isProcessTargetRunning(target) {
|
|
89
198
|
try {
|
|
90
199
|
process.kill(target, 0);
|
|
@@ -162,6 +271,9 @@ class AsyncQueue {
|
|
|
162
271
|
items = [];
|
|
163
272
|
waiters = [];
|
|
164
273
|
closedError = null;
|
|
274
|
+
get size() {
|
|
275
|
+
return this.items.length;
|
|
276
|
+
}
|
|
165
277
|
push(item) {
|
|
166
278
|
if (this.closedError)
|
|
167
279
|
return;
|
|
@@ -218,9 +330,12 @@ class CodexAppServerClient {
|
|
|
218
330
|
cwd;
|
|
219
331
|
env;
|
|
220
332
|
shouldSuppressNotification;
|
|
333
|
+
sessionSandbox;
|
|
221
334
|
process = null;
|
|
222
335
|
stdoutBuffer = "";
|
|
223
336
|
closePromise = null;
|
|
337
|
+
notificationReceiptSequence = 0;
|
|
338
|
+
notificationReceipts = new WeakMap();
|
|
224
339
|
/** OS PID of the spawned app-server child process */
|
|
225
340
|
get pid() {
|
|
226
341
|
return this.process?.pid;
|
|
@@ -239,15 +354,22 @@ class CodexAppServerClient {
|
|
|
239
354
|
closed = false;
|
|
240
355
|
lastRawProviderEventAt = null;
|
|
241
356
|
lastRawProviderEventSource = null;
|
|
242
|
-
constructor(command, cwd, env, shouldSuppressNotification) {
|
|
357
|
+
constructor(command, cwd, env, shouldSuppressNotification, sessionSandbox) {
|
|
243
358
|
this.command = command;
|
|
244
359
|
this.cwd = cwd;
|
|
245
360
|
this.env = env;
|
|
246
361
|
this.shouldSuppressNotification = shouldSuppressNotification;
|
|
362
|
+
this.sessionSandbox = sessionSandbox;
|
|
247
363
|
}
|
|
248
364
|
get isClosed() {
|
|
249
365
|
return this.closed;
|
|
250
366
|
}
|
|
367
|
+
get lastNotificationReceiptSequence() {
|
|
368
|
+
return this.notificationReceiptSequence;
|
|
369
|
+
}
|
|
370
|
+
getNotificationReceipt(notification) {
|
|
371
|
+
return this.notificationReceipts.get(notification) ?? null;
|
|
372
|
+
}
|
|
251
373
|
setServerRequestHandler(handler) {
|
|
252
374
|
this.onServerRequest = handler;
|
|
253
375
|
}
|
|
@@ -261,13 +383,22 @@ class CodexAppServerClient {
|
|
|
261
383
|
if (this.process) {
|
|
262
384
|
throw new Error("Codex app-server already connected");
|
|
263
385
|
}
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
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
|
+
})();
|
|
271
402
|
this.process = child;
|
|
272
403
|
child.stdout?.on("data", (chunk) => {
|
|
273
404
|
this.stdoutBuffer += chunk.toString("utf-8");
|
|
@@ -333,7 +464,7 @@ class CodexAppServerClient {
|
|
|
333
464
|
return;
|
|
334
465
|
}
|
|
335
466
|
this.recordRawProviderEvent(`codex:notification:${method}`);
|
|
336
|
-
this.
|
|
467
|
+
this.enqueueNotification(notification, "provider");
|
|
337
468
|
return;
|
|
338
469
|
}
|
|
339
470
|
// Response to our request
|
|
@@ -419,11 +550,21 @@ class CodexAppServerClient {
|
|
|
419
550
|
this.lastRawProviderEventSource = source;
|
|
420
551
|
}
|
|
421
552
|
injectNotification(notification) {
|
|
422
|
-
this.
|
|
553
|
+
this.enqueueNotification(notification, "synthetic");
|
|
423
554
|
}
|
|
424
555
|
async nextNotification(signal) {
|
|
425
556
|
return await this.notifications.shift(signal);
|
|
426
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
|
+
}
|
|
427
568
|
async close() {
|
|
428
569
|
if (this.closePromise) {
|
|
429
570
|
return await this.closePromise;
|
|
@@ -451,22 +592,24 @@ class CodexAppServerClient {
|
|
|
451
592
|
}
|
|
452
593
|
this.pendingRequests.clear();
|
|
453
594
|
// Emit a terminal error notification so consumers can surface it.
|
|
454
|
-
this.
|
|
595
|
+
this.enqueueNotification({
|
|
455
596
|
method: "error",
|
|
456
597
|
params: {
|
|
457
598
|
error: { message: error.message },
|
|
458
599
|
willRetry: false,
|
|
459
600
|
codexProcessExit: true,
|
|
460
601
|
},
|
|
461
|
-
});
|
|
602
|
+
}, "synthetic");
|
|
462
603
|
this.notifications.close(error);
|
|
463
604
|
this.process = null;
|
|
464
605
|
}
|
|
465
606
|
sendRaw(payload) {
|
|
466
|
-
if (
|
|
607
|
+
if (this.closed) {
|
|
467
608
|
return;
|
|
468
609
|
}
|
|
469
610
|
try {
|
|
611
|
+
if (!this.process?.stdin)
|
|
612
|
+
return;
|
|
470
613
|
this.process.stdin.write(`${JSON.stringify(payload)}\n`);
|
|
471
614
|
}
|
|
472
615
|
catch (error) {
|
|
@@ -488,15 +631,33 @@ export class CodexProvider {
|
|
|
488
631
|
supportsSteering = true;
|
|
489
632
|
supportsRecaps = true;
|
|
490
633
|
supportsNativePromptSuggestions = false;
|
|
634
|
+
supportsNativeCompactThreshold = true;
|
|
491
635
|
config;
|
|
636
|
+
installationCoordinator;
|
|
492
637
|
modelCache = null;
|
|
638
|
+
getConfiguredReasoningSummary = () => DEFAULT_CODEX_REASONING_SUMMARY;
|
|
639
|
+
getConfiguredSubagentMaxDepth = () => DEFAULT_SUBAGENT_MAX_DEPTH;
|
|
493
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
|
+
}
|
|
494
644
|
this.config = config;
|
|
645
|
+
this.installationCoordinator =
|
|
646
|
+
config.installationCoordinator ?? providerInstallationCoordinator;
|
|
495
647
|
}
|
|
496
648
|
setCodexPath(codexPath) {
|
|
497
649
|
this.config.codexPath = codexPath;
|
|
498
650
|
this.modelCache = null;
|
|
499
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
|
+
}
|
|
500
661
|
/**
|
|
501
662
|
* Check if the Codex CLI is installed.
|
|
502
663
|
*/
|
|
@@ -507,7 +668,7 @@ export class CodexProvider {
|
|
|
507
668
|
* Check if Codex CLI is installed by looking in PATH and common locations.
|
|
508
669
|
*/
|
|
509
670
|
async isCodexCliInstalled() {
|
|
510
|
-
return (await findCodexCliPath(this.config.codexPath)) !== null;
|
|
671
|
+
return ((await findCodexCliPath(this.config.codexPath, this.installationCoordinator)) !== null);
|
|
511
672
|
}
|
|
512
673
|
/**
|
|
513
674
|
* Resolve the codex command: explicit config, PATH, or common install locations.
|
|
@@ -515,7 +676,8 @@ export class CodexProvider {
|
|
|
515
676
|
async resolveCodexCommand() {
|
|
516
677
|
if (this.config.codexPath)
|
|
517
678
|
return this.config.codexPath;
|
|
518
|
-
return (await findCodexCliPath()) ??
|
|
679
|
+
return ((await findCodexCliPath(undefined, this.installationCoordinator)) ??
|
|
680
|
+
"codex");
|
|
519
681
|
}
|
|
520
682
|
getCodexClientName(overrideClientName) {
|
|
521
683
|
const normalizedClientName = typeof overrideClientName === "string" ? overrideClientName.trim() : "";
|
|
@@ -530,13 +692,24 @@ export class CodexProvider {
|
|
|
530
692
|
* Build environment overrides for Codex subprocesses.
|
|
531
693
|
*/
|
|
532
694
|
getCodexEnv() {
|
|
533
|
-
const env =
|
|
695
|
+
const env = stripYaControlPlaneCredentials(process.env);
|
|
696
|
+
delete env.YEP_SESSION_WAKE_TOKEN;
|
|
697
|
+
delete env.YEP_SESSION_WAKE_URL;
|
|
534
698
|
if (this.config.baseUrl) {
|
|
535
699
|
env.OPENAI_BASE_URL = this.config.baseUrl;
|
|
536
700
|
}
|
|
537
701
|
if (this.config.apiKey) {
|
|
538
702
|
env.OPENAI_API_KEY = this.config.apiKey;
|
|
539
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
|
+
}
|
|
540
713
|
return env;
|
|
541
714
|
}
|
|
542
715
|
/**
|
|
@@ -563,8 +736,14 @@ export class CodexProvider {
|
|
|
563
736
|
* Queries Codex app-server's model/list endpoint with a static fallback.
|
|
564
737
|
*/
|
|
565
738
|
async getAvailableModels() {
|
|
739
|
+
return this.installationCoordinator.withReadLease(CODEX_INSTALLATION_FAMILY, () => this.getAvailableModelsWithLease());
|
|
740
|
+
}
|
|
741
|
+
async getAvailableModelsWithLease() {
|
|
566
742
|
const now = Date.now();
|
|
567
|
-
|
|
743
|
+
const installationSourceVersion = this.getModelCatalogCacheKey();
|
|
744
|
+
if (this.modelCache &&
|
|
745
|
+
this.modelCache.expiresAt > now &&
|
|
746
|
+
this.modelCache.installationSourceVersion === installationSourceVersion) {
|
|
568
747
|
return this.modelCache.models;
|
|
569
748
|
}
|
|
570
749
|
let models = [];
|
|
@@ -577,9 +756,25 @@ export class CodexProvider {
|
|
|
577
756
|
this.modelCache = {
|
|
578
757
|
models,
|
|
579
758
|
expiresAt: now + MODEL_CACHE_TTL_MS,
|
|
759
|
+
installationSourceVersion,
|
|
580
760
|
};
|
|
581
761
|
return models;
|
|
582
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
|
+
}
|
|
583
778
|
async getModelsFromAppServer() {
|
|
584
779
|
try {
|
|
585
780
|
const appServerModels = await this.requestAppServerModelList();
|
|
@@ -700,6 +895,22 @@ export class CodexProvider {
|
|
|
700
895
|
})}\n`);
|
|
701
896
|
});
|
|
702
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
|
+
}
|
|
703
914
|
async getFallbackCodexModels() {
|
|
704
915
|
const version = await this.getInstalledCodexCliVersion();
|
|
705
916
|
return getFallbackCodexModelsForCliVersion(version);
|
|
@@ -707,7 +918,7 @@ export class CodexProvider {
|
|
|
707
918
|
async getInstalledCodexCliVersion() {
|
|
708
919
|
try {
|
|
709
920
|
const codexCommand = await this.resolveCodexCommand();
|
|
710
|
-
const version = await getCodexCliVersion(codexCommand);
|
|
921
|
+
const version = await getCodexCliVersion(codexCommand, this.installationCoordinator);
|
|
711
922
|
return normalizeSemver(version);
|
|
712
923
|
}
|
|
713
924
|
catch {
|
|
@@ -760,15 +971,46 @@ export class CodexProvider {
|
|
|
760
971
|
sandbox: "workspace-write",
|
|
761
972
|
});
|
|
762
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
|
+
}
|
|
763
998
|
/**
|
|
764
999
|
* Start a new Codex session.
|
|
765
1000
|
*/
|
|
766
1001
|
async startSession(options) {
|
|
1002
|
+
const installationLease = await this.installationCoordinator.acquireRuntimeLease(CODEX_INSTALLATION_FAMILY);
|
|
767
1003
|
const queue = new MessageQueue();
|
|
768
1004
|
const abortController = new AbortController();
|
|
769
1005
|
const runtimeState = {
|
|
770
1006
|
threadId: options.resumeSessionId ?? "",
|
|
1007
|
+
resolvedModel: options.model ?? "default",
|
|
1008
|
+
turnModelOverride: options.model ?? null,
|
|
771
1009
|
activeTurnId: null,
|
|
1010
|
+
pendingTurnStart: null,
|
|
1011
|
+
activePermissionMode: this.normalizePermissionMode(options.permissionMode),
|
|
1012
|
+
turnEffortOverride: options.effort,
|
|
1013
|
+
workspaceWriteSandboxPolicy: null,
|
|
772
1014
|
activeToolCallIds: new Set(),
|
|
773
1015
|
backgroundToolCallIds: new Set(),
|
|
774
1016
|
};
|
|
@@ -777,15 +1019,70 @@ export class CodexProvider {
|
|
|
777
1019
|
queue.push(options.initialMessage);
|
|
778
1020
|
}
|
|
779
1021
|
let activeClient = null;
|
|
780
|
-
|
|
781
|
-
|
|
1022
|
+
let resolveInitialActiveClient = null;
|
|
1023
|
+
const initialActiveClient = new Promise((resolve) => {
|
|
1024
|
+
resolveInitialActiveClient = resolve;
|
|
782
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
|
+
};
|
|
783
1068
|
return {
|
|
784
1069
|
iterator,
|
|
785
1070
|
queue,
|
|
786
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
|
+
}
|
|
787
1083
|
abortController.abort();
|
|
788
1084
|
await activeClient?.close();
|
|
1085
|
+
await installationLease.release();
|
|
789
1086
|
},
|
|
790
1087
|
isProcessAlive: () => activeClient?.isAlive() ?? false,
|
|
791
1088
|
getProviderActivity: () => activeClient?.getProviderActivity() ?? {
|
|
@@ -796,21 +1093,76 @@ export class CodexProvider {
|
|
|
796
1093
|
return activeClient?.pid;
|
|
797
1094
|
},
|
|
798
1095
|
probeLiveness: async () => this.probeCodexLiveness(activeClient, runtimeState),
|
|
799
|
-
|
|
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
|
+
},
|
|
800
1121
|
steer: async (message) => {
|
|
801
1122
|
if (!activeClient)
|
|
802
1123
|
return false;
|
|
803
1124
|
if (!runtimeState.threadId || !runtimeState.activeTurnId)
|
|
804
1125
|
return false;
|
|
805
|
-
|
|
1126
|
+
let userPrompt = this.extractTextFromMessage(message);
|
|
806
1127
|
if (!userPrompt)
|
|
807
1128
|
return true;
|
|
808
1129
|
try {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
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
|
+
}
|
|
814
1166
|
if (steerResult.turnId) {
|
|
815
1167
|
runtimeState.activeTurnId = steerResult.turnId;
|
|
816
1168
|
}
|
|
@@ -830,16 +1182,108 @@ export class CodexProvider {
|
|
|
830
1182
|
return false;
|
|
831
1183
|
if (!runtimeState.threadId || !runtimeState.activeTurnId)
|
|
832
1184
|
return false;
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
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
|
+
}
|
|
837
1213
|
return true;
|
|
838
1214
|
},
|
|
839
|
-
runProviderCommand: async (command) => {
|
|
840
|
-
// Only `/compact` is dispatched natively; every other slash command
|
|
841
|
-
// falls through to ordinary turn delivery.
|
|
1215
|
+
runProviderCommand: async (command, argument) => {
|
|
842
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
|
+
}
|
|
843
1287
|
if (name !== "compact") {
|
|
844
1288
|
return { handled: false };
|
|
845
1289
|
}
|
|
@@ -874,16 +1318,24 @@ export class CodexProvider {
|
|
|
874
1318
|
};
|
|
875
1319
|
}
|
|
876
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
|
+
}
|
|
877
1327
|
const codexCommand = await this.resolveCodexCommand();
|
|
878
|
-
const appServer = new CodexAppServerClient(codexCommand, options.cwd, this.getCodexEnv());
|
|
1328
|
+
const appServer = new CodexAppServerClient(codexCommand, options.cwd, this.getCodexEnv(), undefined, options.sessionSandbox);
|
|
879
1329
|
appServer.setServerRequestHandler((request) => this.handleForkServerRequest(request));
|
|
880
1330
|
try {
|
|
881
1331
|
await appServer.connect();
|
|
882
1332
|
const experimentalApiEnabled = await this.initializeAppServer(appServer);
|
|
883
1333
|
appServer.notify("initialized");
|
|
884
|
-
const rollbackCount = options.
|
|
885
|
-
?
|
|
886
|
-
:
|
|
1334
|
+
const rollbackCount = options.boundary
|
|
1335
|
+
? 0
|
|
1336
|
+
: options.upToMessageId
|
|
1337
|
+
? await this.resolveCodexForkRollbackCount(appServer, options.sessionId, options.upToMessageId)
|
|
1338
|
+
: 0;
|
|
887
1339
|
const policy = this.mapPermissionModeToThreadPolicy(undefined);
|
|
888
1340
|
const fork = await appServer.request("thread/fork", this.createThreadForkParams(options, policy, experimentalApiEnabled));
|
|
889
1341
|
const forkSessionId = fork.thread?.id;
|
|
@@ -899,6 +1351,7 @@ export class CodexProvider {
|
|
|
899
1351
|
log.info({
|
|
900
1352
|
sourceSessionId: options.sessionId,
|
|
901
1353
|
forkSessionId,
|
|
1354
|
+
boundaryTurnId: options.boundary?.kind === "turn" ? options.boundary.turnId : null,
|
|
902
1355
|
upToMessageId: options.upToMessageId ?? null,
|
|
903
1356
|
rollbackCount,
|
|
904
1357
|
}, "Forked Codex app-server thread");
|
|
@@ -1001,9 +1454,10 @@ export class CodexProvider {
|
|
|
1001
1454
|
/**
|
|
1002
1455
|
* Main session loop using codex app-server.
|
|
1003
1456
|
*/
|
|
1004
|
-
async *runSession(options, queue, signal, runtimeState, setActiveClient) {
|
|
1457
|
+
async *runSession(options, queue, signal, runtimeState, setActiveClient, setAgentctlSessionEnvBridge, skillInventory) {
|
|
1005
1458
|
const codexCommand = await this.resolveCodexCommand();
|
|
1006
|
-
const agentctlSessionEnvBridge = createAgentctlSessionEnvBridge(options.resumeSessionId);
|
|
1459
|
+
const agentctlSessionEnvBridge = createAgentctlSessionEnvBridge(options.resumeSessionId, options.getSessionChildEnv);
|
|
1460
|
+
setAgentctlSessionEnvBridge(agentctlSessionEnvBridge);
|
|
1007
1461
|
const codexEnv = agentctlSessionEnvBridge.extendEnv(this.getCodexEnv());
|
|
1008
1462
|
if (options.resumeSessionId) {
|
|
1009
1463
|
// The bridge only reaches bash tool shells that source BASH_ENV, which
|
|
@@ -1012,8 +1466,9 @@ export class CodexProvider {
|
|
|
1012
1466
|
// inherits it regardless of BASH_ENV. New sessions (id unknown until
|
|
1013
1467
|
// thread/start) stay on the bridge alone.
|
|
1014
1468
|
codexEnv.AGENTCTL_SESSION_ID = options.resumeSessionId;
|
|
1469
|
+
Object.assign(codexEnv, options.getSessionChildEnv?.(options.resumeSessionId));
|
|
1015
1470
|
}
|
|
1016
|
-
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);
|
|
1017
1472
|
setActiveClient(appServer);
|
|
1018
1473
|
let sessionId = options.resumeSessionId ?? "";
|
|
1019
1474
|
const usageByTurnId = new Map();
|
|
@@ -1026,23 +1481,34 @@ export class CodexProvider {
|
|
|
1026
1481
|
this.logRawCodexNotification(sessionId || "unknown", notification);
|
|
1027
1482
|
};
|
|
1028
1483
|
appServer.setServerRequestHandler(async (request) => {
|
|
1029
|
-
|
|
1484
|
+
if (request.method === "account/chatgptAuthTokens/refresh") {
|
|
1485
|
+
return await this.refreshExternalChatgptAuth(request);
|
|
1486
|
+
}
|
|
1487
|
+
return await this.handleServerRequestApproval(request, options, signal, runtimeState.activePermissionMode);
|
|
1030
1488
|
});
|
|
1031
1489
|
try {
|
|
1032
1490
|
await appServer.connect();
|
|
1033
|
-
const experimentalApiEnabled = await this.initializeAppServer(appServer, options.clientName);
|
|
1491
|
+
const experimentalApiEnabled = await this.initializeAppServer(appServer, options.clientName, Boolean(this.config.externalChatgptAuth));
|
|
1034
1492
|
appServer.notify("initialized");
|
|
1035
|
-
|
|
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);
|
|
1036
1497
|
const threadResumeParams = this.createThreadResumeParams(options, sessionId, policy, experimentalApiEnabled);
|
|
1037
1498
|
const threadStartParams = this.createThreadStartParams(options, policy);
|
|
1038
1499
|
const threadResult = await this.startOrResumeThread(appServer, options, threadStartParams, threadResumeParams);
|
|
1500
|
+
options.onPermissionModeApplied?.(initialPermissionMode);
|
|
1039
1501
|
sessionId = threadResult.thread.id;
|
|
1040
1502
|
agentctlSessionEnvBridge.publishSessionId(sessionId);
|
|
1041
1503
|
runtimeState.threadId = sessionId;
|
|
1504
|
+
runtimeState.resolvedModel = threadResult.model;
|
|
1505
|
+
if (threadResult.sandbox?.type === "workspaceWrite") {
|
|
1506
|
+
runtimeState.workspaceWriteSandboxPolicy = threadResult.sandbox;
|
|
1507
|
+
}
|
|
1042
1508
|
failureTrace.sessionId = sessionId;
|
|
1043
1509
|
log.info({
|
|
1044
1510
|
sessionId,
|
|
1045
|
-
permissionMode:
|
|
1511
|
+
permissionMode: initialPermissionMode,
|
|
1046
1512
|
approvalPolicy: policy.approvalPolicy,
|
|
1047
1513
|
sandbox: policy.sandbox,
|
|
1048
1514
|
policyOverrides: {
|
|
@@ -1057,129 +1523,332 @@ export class CodexProvider {
|
|
|
1057
1523
|
subtype: "init",
|
|
1058
1524
|
session_id: sessionId,
|
|
1059
1525
|
cwd: options.cwd,
|
|
1526
|
+
slash_command_inventory: this.createCodexSlashCommands(skillInventory.skills, skillInventory.stale ? "stale" : "current"),
|
|
1060
1527
|
});
|
|
1061
1528
|
const requestedReasoningEffort = this.mapEffortToReasoningEffort(options.effort, options.thinking);
|
|
1062
1529
|
const sessionConfigAck = this.createSessionConfigAckMessage(sessionId, threadResult.model, options.model, threadResult.reasoningEffort, requestedReasoningEffort);
|
|
1063
1530
|
if (sessionConfigAck) {
|
|
1064
1531
|
yield withCodexTimestamp(sessionConfigAck);
|
|
1065
1532
|
}
|
|
1066
|
-
const messageGen = queue;
|
|
1067
1533
|
const liveEventState = this.createLiveEventState();
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
if (signal.aborted) {
|
|
1071
|
-
break;
|
|
1072
|
-
}
|
|
1073
|
-
let userPrompt = this.extractTextFromMessage(message);
|
|
1074
|
-
if (!userPrompt) {
|
|
1075
|
-
continue;
|
|
1076
|
-
}
|
|
1077
|
-
// Prepend global instructions to the first message of new sessions
|
|
1078
|
-
if (isFirstMessage && options.globalInstructions) {
|
|
1079
|
-
userPrompt = `[Global context]\n${options.globalInstructions}\n\n---\n\n${userPrompt}`;
|
|
1080
|
-
isFirstMessage = false;
|
|
1081
|
-
}
|
|
1082
|
-
else {
|
|
1083
|
-
isFirstMessage = false;
|
|
1084
|
-
}
|
|
1085
|
-
// Emit user message with UUID from queue to enable deduplication.
|
|
1086
|
-
const userMessage = withCodexTimestamp({
|
|
1087
|
-
type: "user",
|
|
1088
|
-
uuid: message.uuid,
|
|
1089
|
-
session_id: sessionId,
|
|
1090
|
-
message: {
|
|
1091
|
-
role: "user",
|
|
1092
|
-
content: userPrompt,
|
|
1093
|
-
},
|
|
1094
|
-
});
|
|
1095
|
-
logSdkCorrelationDebug(sessionId, userMessage, {
|
|
1096
|
-
eventKind: "user_message",
|
|
1097
|
-
phase: "submitted",
|
|
1098
|
-
sourceEvent: "queued_input",
|
|
1099
|
-
});
|
|
1100
|
-
failureTrace.lastUserMessage = {
|
|
1101
|
-
uuid: message.uuid,
|
|
1102
|
-
chars: userPrompt.length,
|
|
1103
|
-
};
|
|
1104
|
-
yield userMessage;
|
|
1105
|
-
const messagePermissionMode = this.getPermissionModeFromMessage(message);
|
|
1106
|
-
const turnPolicy = messagePermissionMode
|
|
1107
|
-
? this.mapPermissionModeToThreadPolicy(messagePermissionMode)
|
|
1108
|
-
: null;
|
|
1109
|
-
const turnStartParams = this.createTurnStartParams(sessionId, userPrompt, options, turnPolicy);
|
|
1110
|
-
const turnResult = await appServer.request("turn/start", turnStartParams);
|
|
1111
|
-
const activeTurnId = turnResult.turn.id;
|
|
1534
|
+
const consumeTurn = async function* (provider, turn, notificationBarrierSequence) {
|
|
1535
|
+
const activeTurnId = turn.id;
|
|
1112
1536
|
runtimeState.activeTurnId = activeTurnId;
|
|
1113
1537
|
runtimeState.activeToolCallIds.clear();
|
|
1114
1538
|
runtimeState.backgroundToolCallIds.clear();
|
|
1115
1539
|
failureTrace.activeTurnId = activeTurnId;
|
|
1116
|
-
|
|
1117
|
-
sessionId,
|
|
1118
|
-
turnId: activeTurnId,
|
|
1119
|
-
turnStatus: turnResult.turn.status,
|
|
1120
|
-
}, "Started Codex app-server turn");
|
|
1121
|
-
let turnComplete = turnResult.turn.status !== "inProgress";
|
|
1540
|
+
let turnComplete = turn.status !== "inProgress";
|
|
1122
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
|
+
};
|
|
1123
1557
|
while (!turnComplete && !signal.aborted) {
|
|
1124
1558
|
const notification = await appServer.nextNotification(signal);
|
|
1125
|
-
if (
|
|
1559
|
+
if (provider.shouldSuppressLiveDeltaNotification(notification, options)) {
|
|
1126
1560
|
continue;
|
|
1127
1561
|
}
|
|
1128
|
-
|
|
1562
|
+
const notificationReceipt = appServer.getNotificationReceipt(notification);
|
|
1129
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
|
+
}
|
|
1130
1614
|
failureTrace.activeTurnId = currentActiveTurnId;
|
|
1131
1615
|
if (notification.method === "thread/tokenUsage/updated") {
|
|
1132
|
-
const usage =
|
|
1616
|
+
const usage = provider.extractTurnUsage(notification.params);
|
|
1133
1617
|
if (usage) {
|
|
1134
1618
|
usageByTurnId.set(usage.turnId, usage.snapshot);
|
|
1619
|
+
runtimeState.latestTokenUsage = usage.total;
|
|
1135
1620
|
}
|
|
1136
1621
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
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);
|
|
1140
1647
|
for (const rawMsg of messages) {
|
|
1141
1648
|
const msg = rawMsg.type === "error"
|
|
1142
1649
|
? {
|
|
1143
1650
|
...rawMsg,
|
|
1144
|
-
codexFailureTrace:
|
|
1145
|
-
codexFailureSummary:
|
|
1651
|
+
codexFailureTrace: provider.snapshotCodexFailureTrace(failureTrace),
|
|
1652
|
+
codexFailureSummary: provider.formatCodexFailureTrace(failureTrace),
|
|
1146
1653
|
}
|
|
1147
1654
|
: rawMsg;
|
|
1655
|
+
if (isServerOverload && msg.type === "error") {
|
|
1656
|
+
overloadError = msg;
|
|
1657
|
+
continue;
|
|
1658
|
+
}
|
|
1659
|
+
if (suppressFailedOverloadCompletion) {
|
|
1660
|
+
continue;
|
|
1661
|
+
}
|
|
1148
1662
|
failureTrace.lastEmittedMessage =
|
|
1149
|
-
|
|
1663
|
+
provider.describeSDKMessageForFailureTrace(msg);
|
|
1150
1664
|
yield msg;
|
|
1151
1665
|
}
|
|
1152
|
-
if (
|
|
1153
|
-
|
|
1666
|
+
if (isServerOverload) {
|
|
1667
|
+
continue;
|
|
1668
|
+
}
|
|
1669
|
+
if (provider.isTurnTerminalNotification(notification, effectiveActiveTurnId)) {
|
|
1670
|
+
if (notification.method === "error")
|
|
1154
1671
|
emittedTurnError = true;
|
|
1155
|
-
}
|
|
1156
1672
|
turnComplete = true;
|
|
1157
1673
|
}
|
|
1158
1674
|
}
|
|
1675
|
+
logSuppressedPreTurnNotifications("turn consumption ended");
|
|
1159
1676
|
runtimeState.activeTurnId = null;
|
|
1160
1677
|
failureTrace.activeTurnId = null;
|
|
1161
|
-
|
|
1678
|
+
if (signal.aborted) {
|
|
1679
|
+
return { overloadError: null };
|
|
1680
|
+
}
|
|
1162
1681
|
if (!emittedTurnError &&
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1682
|
+
turn.status === "failed" &&
|
|
1683
|
+
turn.error?.message) {
|
|
1684
|
+
const fallbackError = {
|
|
1166
1685
|
type: "error",
|
|
1167
|
-
uuid: `codex-error-${
|
|
1686
|
+
uuid: `codex-error-${turn.id}`,
|
|
1168
1687
|
session_id: sessionId,
|
|
1169
|
-
error:
|
|
1170
|
-
codexErrorInfo:
|
|
1171
|
-
codexAdditionalDetails:
|
|
1688
|
+
error: turn.error.message,
|
|
1689
|
+
codexErrorInfo: turn.error.codexErrorInfo ?? null,
|
|
1690
|
+
codexAdditionalDetails: readCodexTurnErrorDetail(turn.error),
|
|
1172
1691
|
codexWillRetry: false,
|
|
1173
|
-
codexTurnId:
|
|
1174
|
-
codexFailureTrace:
|
|
1175
|
-
codexFailureSummary:
|
|
1176
|
-
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),
|
|
1177
1696
|
};
|
|
1697
|
+
if (turn.error.codexErrorInfo === "serverOverloaded") {
|
|
1698
|
+
return { overloadError: fallbackError };
|
|
1699
|
+
}
|
|
1700
|
+
yield fallbackError;
|
|
1701
|
+
}
|
|
1702
|
+
if (overloadError) {
|
|
1703
|
+
return { overloadError };
|
|
1178
1704
|
}
|
|
1179
1705
|
yield {
|
|
1180
1706
|
type: "result",
|
|
1181
1707
|
session_id: sessionId,
|
|
1182
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?.();
|
|
1183
1852
|
}
|
|
1184
1853
|
}
|
|
1185
1854
|
catch (error) {
|
|
@@ -1205,8 +1874,13 @@ export class CodexProvider {
|
|
|
1205
1874
|
}
|
|
1206
1875
|
finally {
|
|
1207
1876
|
runtimeState.activeTurnId = null;
|
|
1208
|
-
|
|
1209
|
-
|
|
1877
|
+
try {
|
|
1878
|
+
await appServer.close();
|
|
1879
|
+
}
|
|
1880
|
+
finally {
|
|
1881
|
+
agentctlSessionEnvBridge.cleanup();
|
|
1882
|
+
setAgentctlSessionEnvBridge(null);
|
|
1883
|
+
}
|
|
1210
1884
|
}
|
|
1211
1885
|
yield {
|
|
1212
1886
|
type: "result",
|
|
@@ -1245,6 +1919,14 @@ export class CodexProvider {
|
|
|
1245
1919
|
}
|
|
1246
1920
|
return false;
|
|
1247
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
|
+
}
|
|
1248
1930
|
updateBackgroundProcessTracking(notification, runtimeState) {
|
|
1249
1931
|
if (notification.method === "rawResponseItem/completed") {
|
|
1250
1932
|
const params = asCodexRawResponseItemCompletedNotification(notification.params);
|
|
@@ -1305,17 +1987,79 @@ export class CodexProvider {
|
|
|
1305
1987
|
capabilities: experimentalApiEnabled ? { experimentalApi: true } : null,
|
|
1306
1988
|
};
|
|
1307
1989
|
}
|
|
1308
|
-
async initializeAppServer(appServer, clientName) {
|
|
1990
|
+
async initializeAppServer(appServer, clientName, requireExperimentalApi = false) {
|
|
1309
1991
|
try {
|
|
1310
1992
|
await appServer.request("initialize", this.createInitializeParams(true, clientName));
|
|
1311
1993
|
return true;
|
|
1312
1994
|
}
|
|
1313
1995
|
catch (error) {
|
|
1314
|
-
|
|
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");
|
|
1315
2003
|
await appServer.request("initialize", this.createInitializeParams(false, clientName));
|
|
1316
2004
|
return false;
|
|
1317
2005
|
}
|
|
1318
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
|
+
}
|
|
1319
2063
|
async startOrResumeThread(appServer, options, threadStartParams, threadResumeParams) {
|
|
1320
2064
|
return options.resumeSessionId
|
|
1321
2065
|
? await appServer.request("thread/resume", threadResumeParams)
|
|
@@ -1331,7 +2075,7 @@ export class CodexProvider {
|
|
|
1331
2075
|
experimentalRawEvents: false,
|
|
1332
2076
|
};
|
|
1333
2077
|
}
|
|
1334
|
-
createThreadResumeParams(options, sessionId, policy, experimentalApiEnabled = false) {
|
|
2078
|
+
createThreadResumeParams(options, sessionId, policy, experimentalApiEnabled = false, includeTurns = false) {
|
|
1335
2079
|
const params = {
|
|
1336
2080
|
threadId: options.resumeSessionId ?? sessionId,
|
|
1337
2081
|
model: options.model ?? null,
|
|
@@ -1340,7 +2084,7 @@ export class CodexProvider {
|
|
|
1340
2084
|
...this.buildThreadPermissionParams(policy),
|
|
1341
2085
|
config: this.buildThreadConfigOverrides(options),
|
|
1342
2086
|
};
|
|
1343
|
-
if (experimentalApiEnabled) {
|
|
2087
|
+
if (experimentalApiEnabled && !includeTurns) {
|
|
1344
2088
|
params.excludeTurns = true;
|
|
1345
2089
|
}
|
|
1346
2090
|
return params;
|
|
@@ -1348,6 +2092,9 @@ export class CodexProvider {
|
|
|
1348
2092
|
createThreadForkParams(options, policy, experimentalApiEnabled = false) {
|
|
1349
2093
|
const params = {
|
|
1350
2094
|
threadId: options.sessionId,
|
|
2095
|
+
...(options.boundary?.kind === "turn"
|
|
2096
|
+
? { lastTurnId: options.boundary.turnId }
|
|
2097
|
+
: {}),
|
|
1351
2098
|
cwd: options.cwd,
|
|
1352
2099
|
...this.buildThreadPermissionParams(policy),
|
|
1353
2100
|
config: this.buildThreadConfigOverrides({}),
|
|
@@ -1423,6 +2170,7 @@ export class CodexProvider {
|
|
|
1423
2170
|
// skill at thread scope so Codex follows YA's Playwright fallback instead
|
|
1424
2171
|
// of advertising a browser that fails during backend discovery.
|
|
1425
2172
|
const config = {
|
|
2173
|
+
model_reasoning_summary: this.getConfiguredReasoningSummary(),
|
|
1426
2174
|
skills: {
|
|
1427
2175
|
config: [
|
|
1428
2176
|
{
|
|
@@ -1432,27 +2180,121 @@ export class CodexProvider {
|
|
|
1432
2180
|
],
|
|
1433
2181
|
},
|
|
1434
2182
|
};
|
|
2183
|
+
const subagentMaxDepth = this.getConfiguredSubagentMaxDepth();
|
|
2184
|
+
if (subagentMaxDepth !== null) {
|
|
2185
|
+
config.agents = { max_depth: subagentMaxDepth };
|
|
2186
|
+
}
|
|
1435
2187
|
const reasoningEffort = this.mapEffortToReasoningEffort(options.effort, options.thinking, options.model);
|
|
1436
2188
|
if (reasoningEffort) {
|
|
1437
2189
|
config.model_reasoning_effort = reasoningEffort;
|
|
1438
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
|
+
}
|
|
1439
2200
|
return config;
|
|
1440
2201
|
}
|
|
1441
|
-
|
|
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) {
|
|
1442
2279
|
return {
|
|
1443
2280
|
threadId,
|
|
1444
|
-
|
|
2281
|
+
...(clientUserMessageId ? { clientUserMessageId } : {}),
|
|
2282
|
+
model: modelOverride,
|
|
1445
2283
|
...(options.serviceTier ? { serviceTier: options.serviceTier } : {}),
|
|
1446
|
-
input
|
|
1447
|
-
effort:
|
|
1448
|
-
|
|
1449
|
-
|
|
2284
|
+
input,
|
|
2285
|
+
effort: effortOverride === null
|
|
2286
|
+
? null
|
|
2287
|
+
: this.mapEffortToReasoningEffort(effortOverride, options.thinking, modelOverride ?? undefined),
|
|
2288
|
+
...this.buildTurnPermissionParams(turnPolicy, workspaceWriteSandboxPolicy),
|
|
1450
2289
|
};
|
|
1451
2290
|
}
|
|
1452
|
-
buildTurnPermissionParams(policy) {
|
|
2291
|
+
buildTurnPermissionParams(policy, workspaceWriteSandboxPolicy = null) {
|
|
1453
2292
|
if (!policy)
|
|
1454
2293
|
return {};
|
|
1455
|
-
return {
|
|
2294
|
+
return {
|
|
2295
|
+
approvalPolicy: policy.approvalPolicy,
|
|
2296
|
+
sandboxPolicy: this.mapThreadSandboxToTurnSandbox(policy.sandbox, workspaceWriteSandboxPolicy),
|
|
2297
|
+
};
|
|
1456
2298
|
}
|
|
1457
2299
|
/**
|
|
1458
2300
|
* Synthesize a short on-return recap through a separate ephemeral Codex
|
|
@@ -1461,14 +2303,16 @@ export class CodexProvider {
|
|
|
1461
2303
|
* simulated recap helper without mutating the parent session transcript.
|
|
1462
2304
|
*/
|
|
1463
2305
|
async generateSummary(request) {
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
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);
|
|
1468
2314
|
}
|
|
1469
|
-
|
|
1470
|
-
return await this.generateForkBackedSummary(request);
|
|
1471
|
-
}
|
|
2315
|
+
});
|
|
1472
2316
|
}
|
|
1473
2317
|
async generateSideSessionRecap(recentAssistantText, requestedModel) {
|
|
1474
2318
|
const userPrompt = createCodexRecapPrompt(recentAssistantText);
|
|
@@ -1546,7 +2390,7 @@ export class CodexProvider {
|
|
|
1546
2390
|
async generateForkBackedSummary(request) {
|
|
1547
2391
|
const userPrompt = createCodexForkSummaryPrompt(request);
|
|
1548
2392
|
const codexCommand = await this.resolveCodexCommand();
|
|
1549
|
-
const appServer = new CodexAppServerClient(codexCommand, request.cwd, this.getCodexEnv());
|
|
2393
|
+
const appServer = new CodexAppServerClient(codexCommand, request.cwd, this.getCodexEnv(), undefined, request.sessionSandbox);
|
|
1550
2394
|
const abortController = new AbortController();
|
|
1551
2395
|
let timedOut = false;
|
|
1552
2396
|
const abortFromRequest = () => {
|
|
@@ -1711,6 +2555,7 @@ export class CodexProvider {
|
|
|
1711
2555
|
streamingToolOutputByItemKey: new Map(),
|
|
1712
2556
|
toolCallContexts: new Map(),
|
|
1713
2557
|
resultBackedToolItemsByTurnId: new Map(),
|
|
2558
|
+
planUpdateCountByTurnId: new Map(),
|
|
1714
2559
|
};
|
|
1715
2560
|
}
|
|
1716
2561
|
recordCodexFailureTraceEvent(trace, event) {
|
|
@@ -1843,7 +2688,7 @@ export class CodexProvider {
|
|
|
1843
2688
|
phase: "completed",
|
|
1844
2689
|
errorMessage: params?.turn.error?.message,
|
|
1845
2690
|
codexErrorInfo: params?.turn.error?.codexErrorInfo ?? undefined,
|
|
1846
|
-
additionalDetails: params?.turn.error
|
|
2691
|
+
additionalDetails: readCodexTurnErrorDetail(params?.turn.error) ?? undefined,
|
|
1847
2692
|
openaiRequestId: this.extractOpenAIRequestId(params?.turn.error, params?.turn.error?.additionalDetails, params?.turn.error?.message),
|
|
1848
2693
|
});
|
|
1849
2694
|
}
|
|
@@ -1868,7 +2713,7 @@ export class CodexProvider {
|
|
|
1868
2713
|
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
1869
2714
|
fallbackError?.codexErrorInfo ??
|
|
1870
2715
|
undefined,
|
|
1871
|
-
additionalDetails: params?.error
|
|
2716
|
+
additionalDetails: readCodexTurnErrorDetail(params?.error) ??
|
|
1872
2717
|
this.getOptionalString(fallbackError?.additionalDetails) ??
|
|
1873
2718
|
undefined,
|
|
1874
2719
|
openaiRequestId: this.extractOpenAIRequestId(notification.params, fallbackError, errorMessage),
|
|
@@ -2020,6 +2865,7 @@ export class CodexProvider {
|
|
|
2020
2865
|
return {
|
|
2021
2866
|
turnId: notification.turnId,
|
|
2022
2867
|
snapshot: {
|
|
2868
|
+
totalTokens: notification.tokenUsage.last.totalTokens,
|
|
2023
2869
|
inputTokens: notification.tokenUsage.last.inputTokens,
|
|
2024
2870
|
outputTokens: notification.tokenUsage.last.outputTokens,
|
|
2025
2871
|
cachedInputTokens: notification.tokenUsage.last.cachedInputTokens,
|
|
@@ -2027,13 +2873,22 @@ export class CodexProvider {
|
|
|
2027
2873
|
? notification.tokenUsage.modelContextWindow
|
|
2028
2874
|
: undefined,
|
|
2029
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
|
+
},
|
|
2030
2885
|
};
|
|
2031
2886
|
}
|
|
2032
|
-
async handleServerRequestApproval(request, options, signal) {
|
|
2887
|
+
async handleServerRequestApproval(request, options, signal, permissionMode = this.normalizePermissionMode(options.permissionMode)) {
|
|
2033
2888
|
log.info({
|
|
2034
2889
|
method: request.method,
|
|
2035
2890
|
requestId: request.id,
|
|
2036
|
-
permissionMode
|
|
2891
|
+
permissionMode,
|
|
2037
2892
|
}, "Codex app-server sent server request");
|
|
2038
2893
|
const params = request.params && typeof request.params === "object"
|
|
2039
2894
|
? request.params
|
|
@@ -2067,7 +2922,7 @@ export class CodexProvider {
|
|
|
2067
2922
|
turnId: commandParams.turnId,
|
|
2068
2923
|
itemId: commandParams.itemId,
|
|
2069
2924
|
};
|
|
2070
|
-
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "accept", "decline");
|
|
2925
|
+
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "accept", "decline", permissionMode);
|
|
2071
2926
|
log.info({
|
|
2072
2927
|
method: request.method,
|
|
2073
2928
|
requestId: request.id,
|
|
@@ -2104,7 +2959,7 @@ export class CodexProvider {
|
|
|
2104
2959
|
turnId: fileParams.turnId,
|
|
2105
2960
|
itemId: fileParams.itemId,
|
|
2106
2961
|
};
|
|
2107
|
-
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "accept", "decline");
|
|
2962
|
+
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "accept", "decline", permissionMode);
|
|
2108
2963
|
log.info({
|
|
2109
2964
|
method: request.method,
|
|
2110
2965
|
requestId: request.id,
|
|
@@ -2127,7 +2982,7 @@ export class CodexProvider {
|
|
|
2127
2982
|
parsedCmd: Array.isArray(params.parsedCmd) ? params.parsedCmd : [],
|
|
2128
2983
|
callId: this.getOptionalString(params.callId),
|
|
2129
2984
|
};
|
|
2130
|
-
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "approved", "denied");
|
|
2985
|
+
const decision = await this.resolveApprovalDecision(options, "Bash", toolInput, signal, "approved", "denied", permissionMode);
|
|
2131
2986
|
log.info({
|
|
2132
2987
|
method: request.method,
|
|
2133
2988
|
requestId: request.id,
|
|
@@ -2148,7 +3003,7 @@ export class CodexProvider {
|
|
|
2148
3003
|
grantRoot: this.getOptionalString(params.grantRoot),
|
|
2149
3004
|
callId: this.getOptionalString(params.callId),
|
|
2150
3005
|
};
|
|
2151
|
-
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "approved", "denied");
|
|
3006
|
+
const decision = await this.resolveApprovalDecision(options, "Edit", toolInput, signal, "approved", "denied", permissionMode);
|
|
2152
3007
|
log.info({
|
|
2153
3008
|
method: request.method,
|
|
2154
3009
|
requestId: request.id,
|
|
@@ -2167,24 +3022,61 @@ export class CodexProvider {
|
|
|
2167
3022
|
}, "Codex permission approval params invalid; declining");
|
|
2168
3023
|
return this.createDeclinedPermissionResponse();
|
|
2169
3024
|
}
|
|
2170
|
-
return await this.resolvePermissionRequestApproval(options, permissionParams, signal);
|
|
3025
|
+
return await this.resolvePermissionRequestApproval(options, permissionParams, signal, permissionMode);
|
|
2171
3026
|
}
|
|
2172
3027
|
case "item/tool/requestUserInput": {
|
|
2173
3028
|
const requestInput = this.asToolRequestUserInputParams(request.params);
|
|
2174
|
-
|
|
2175
|
-
|
|
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 ?? {};
|
|
2176
3059
|
const answers = {};
|
|
2177
|
-
for (const question of questions) {
|
|
2178
|
-
|
|
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
|
+
};
|
|
2179
3070
|
}
|
|
2180
|
-
log.
|
|
3071
|
+
log.info({
|
|
2181
3072
|
method: request.method,
|
|
2182
3073
|
requestId: request.id,
|
|
2183
|
-
questionCount: questions.length,
|
|
2184
|
-
threadId: requestInput
|
|
2185
|
-
turnId: requestInput
|
|
2186
|
-
itemId: requestInput
|
|
2187
|
-
|
|
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");
|
|
2188
3080
|
const response = { answers };
|
|
2189
3081
|
return response;
|
|
2190
3082
|
}
|
|
@@ -2194,25 +3086,32 @@ export class CodexProvider {
|
|
|
2194
3086
|
}
|
|
2195
3087
|
}
|
|
2196
3088
|
}
|
|
2197
|
-
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) {
|
|
2198
3094
|
if (!options.onToolApproval) {
|
|
2199
3095
|
log.warn({ toolName }, "No onToolApproval handler available; denying Codex approval request");
|
|
2200
|
-
return
|
|
3096
|
+
return { behavior: "deny" };
|
|
2201
3097
|
}
|
|
2202
3098
|
let result;
|
|
2203
3099
|
try {
|
|
2204
|
-
result = await options.onToolApproval(toolName, toolInput, {
|
|
3100
|
+
result = await options.onToolApproval(toolName, toolInput, {
|
|
3101
|
+
signal,
|
|
3102
|
+
permissionMode,
|
|
3103
|
+
});
|
|
2205
3104
|
}
|
|
2206
3105
|
catch (error) {
|
|
2207
3106
|
log.warn({ toolName, error }, "onToolApproval threw; denying Codex approval request");
|
|
2208
|
-
return
|
|
3107
|
+
return { behavior: "deny" };
|
|
2209
3108
|
}
|
|
2210
3109
|
log.info({ toolName, behavior: result.behavior }, "Resolved tool approval callback result");
|
|
2211
|
-
return result
|
|
3110
|
+
return result;
|
|
2212
3111
|
}
|
|
2213
|
-
async resolvePermissionRequestApproval(options, params, signal) {
|
|
2214
|
-
if (
|
|
2215
|
-
return this.createGrantedPermissionResponse(params, "
|
|
3112
|
+
async resolvePermissionRequestApproval(options, params, signal, permissionMode) {
|
|
3113
|
+
if (permissionMode === "bypassPermissions") {
|
|
3114
|
+
return this.createGrantedPermissionResponse(params, "turn");
|
|
2216
3115
|
}
|
|
2217
3116
|
const toolInput = {
|
|
2218
3117
|
cwd: params.cwd,
|
|
@@ -2222,9 +3121,9 @@ export class CodexProvider {
|
|
|
2222
3121
|
turnId: params.turnId,
|
|
2223
3122
|
itemId: params.itemId,
|
|
2224
3123
|
};
|
|
2225
|
-
const decision = await this.resolveApprovalDecision(options, "Permissions", toolInput, signal, "accept", "decline");
|
|
3124
|
+
const decision = await this.resolveApprovalDecision(options, "Permissions", toolInput, signal, "accept", "decline", permissionMode);
|
|
2226
3125
|
return decision === "accept"
|
|
2227
|
-
? this.createGrantedPermissionResponse(params, "
|
|
3126
|
+
? this.createGrantedPermissionResponse(params, "turn")
|
|
2228
3127
|
: this.createDeclinedPermissionResponse();
|
|
2229
3128
|
}
|
|
2230
3129
|
createGrantedPermissionResponse(params, scope) {
|
|
@@ -2270,6 +3169,73 @@ export class CodexProvider {
|
|
|
2270
3169
|
});
|
|
2271
3170
|
return [message];
|
|
2272
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
|
+
}
|
|
2273
3239
|
case "turn/completed": {
|
|
2274
3240
|
const params = asCodexTurnCompletedNotification(notification.params);
|
|
2275
3241
|
const turnId = params?.turn.id ?? null;
|
|
@@ -2283,6 +3249,9 @@ export class CodexProvider {
|
|
|
2283
3249
|
}
|
|
2284
3250
|
: undefined;
|
|
2285
3251
|
const messages = [];
|
|
3252
|
+
if (turnId) {
|
|
3253
|
+
liveEventState.planUpdateCountByTurnId.delete(turnId);
|
|
3254
|
+
}
|
|
2286
3255
|
const orphanedToolUseIds = turnId
|
|
2287
3256
|
? this.consumeLiveResultBackedToolItems(liveEventState, turnId)
|
|
2288
3257
|
: [];
|
|
@@ -2374,7 +3343,7 @@ export class CodexProvider {
|
|
|
2374
3343
|
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
2375
3344
|
fallbackError?.codexErrorInfo ??
|
|
2376
3345
|
null,
|
|
2377
|
-
codexAdditionalDetails: params?.error
|
|
3346
|
+
codexAdditionalDetails: readCodexTurnErrorDetail(params?.error) ??
|
|
2378
3347
|
this.getOptionalString(fallbackError?.additionalDetails) ??
|
|
2379
3348
|
null,
|
|
2380
3349
|
codexWillRetry: willRetry,
|
|
@@ -2488,6 +3457,18 @@ export class CodexProvider {
|
|
|
2488
3457
|
const text = this.getOptionalString(itemRecord.text) ?? "";
|
|
2489
3458
|
return { id, type: "agent_message", text };
|
|
2490
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
|
+
}
|
|
2491
3472
|
case "command_execution": {
|
|
2492
3473
|
const commandActions = (Array.isArray(itemRecord.commandActions)
|
|
2493
3474
|
? itemRecord.commandActions
|
|
@@ -2627,7 +3608,7 @@ export class CodexProvider {
|
|
|
2627
3608
|
kind,
|
|
2628
3609
|
agentThreadId: this.getOptionalString(itemRecord.agentThreadId) ?? "",
|
|
2629
3610
|
agentPath,
|
|
2630
|
-
text:
|
|
3611
|
+
text: formatCodexSubagentActivity(kind, agentPath),
|
|
2631
3612
|
};
|
|
2632
3613
|
}
|
|
2633
3614
|
case "context_compaction":
|
|
@@ -2668,19 +3649,6 @@ export class CodexProvider {
|
|
|
2668
3649
|
}
|
|
2669
3650
|
return "";
|
|
2670
3651
|
}
|
|
2671
|
-
formatSubagentActivity(kind, agentPath) {
|
|
2672
|
-
const target = agentPath ? `: ${agentPath}` : "";
|
|
2673
|
-
switch (kind) {
|
|
2674
|
-
case "started":
|
|
2675
|
-
return `Subagent started${target}`;
|
|
2676
|
-
case "interacted":
|
|
2677
|
-
return `Subagent updated${target}`;
|
|
2678
|
-
case "interrupted":
|
|
2679
|
-
return `Subagent interrupted${target}`;
|
|
2680
|
-
default:
|
|
2681
|
-
return `Subagent ${kind}${target}`;
|
|
2682
|
-
}
|
|
2683
|
-
}
|
|
2684
3652
|
normalizeStatus(status) {
|
|
2685
3653
|
if (typeof status !== "string")
|
|
2686
3654
|
return "unknown";
|
|
@@ -2729,16 +3697,23 @@ export class CodexProvider {
|
|
|
2729
3697
|
if (typeof record.threadId !== "string" ||
|
|
2730
3698
|
typeof record.turnId !== "string" ||
|
|
2731
3699
|
typeof record.itemId !== "string" ||
|
|
2732
|
-
!Array.isArray(record.questions)
|
|
3700
|
+
!Array.isArray(record.questions) ||
|
|
3701
|
+
(record.isBlocking !== undefined &&
|
|
3702
|
+
typeof record.isBlocking !== "boolean")) {
|
|
2733
3703
|
return null;
|
|
2734
3704
|
}
|
|
2735
|
-
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
|
+
};
|
|
2736
3711
|
}
|
|
2737
3712
|
buildItemEventKey(turnId, itemId) {
|
|
2738
3713
|
return `${turnId}:${itemId}`;
|
|
2739
3714
|
}
|
|
2740
|
-
buildItemMessageUuid(
|
|
2741
|
-
return
|
|
3715
|
+
buildItemMessageUuid(itemId) {
|
|
3716
|
+
return itemId;
|
|
2742
3717
|
}
|
|
2743
3718
|
// Native tool thread items carry Codex's globally-unique call_id as item.id,
|
|
2744
3719
|
// so this uuid aligns directly with the durable response item. A code-mode
|
|
@@ -2792,7 +3767,7 @@ export class CodexProvider {
|
|
|
2792
3767
|
const message = withCodexTimestamp({
|
|
2793
3768
|
type: "assistant",
|
|
2794
3769
|
session_id: sessionId,
|
|
2795
|
-
uuid: this.buildItemMessageUuid(
|
|
3770
|
+
uuid: this.buildItemMessageUuid(itemId),
|
|
2796
3771
|
_isStreaming: true,
|
|
2797
3772
|
message: {
|
|
2798
3773
|
role: "assistant",
|
|
@@ -2817,7 +3792,7 @@ export class CodexProvider {
|
|
|
2817
3792
|
const message = withCodexTimestamp({
|
|
2818
3793
|
type: "assistant",
|
|
2819
3794
|
session_id: sessionId,
|
|
2820
|
-
uuid: this.buildItemMessageUuid(
|
|
3795
|
+
uuid: this.buildItemMessageUuid(itemId),
|
|
2821
3796
|
_isStreaming: true,
|
|
2822
3797
|
message: {
|
|
2823
3798
|
role: "assistant",
|
|
@@ -2954,6 +3929,7 @@ export class CodexProvider {
|
|
|
2954
3929
|
? { toolUseResult: normalized.structured }
|
|
2955
3930
|
: {}),
|
|
2956
3931
|
}, observedAt);
|
|
3932
|
+
attachToolResultMediaCandidates(message, normalized.mediaCandidates);
|
|
2957
3933
|
logSdkCorrelationDebug(sessionId, message, {
|
|
2958
3934
|
eventKind: "tool_result",
|
|
2959
3935
|
turnId: params.turnId,
|
|
@@ -3039,6 +4015,7 @@ export class CodexProvider {
|
|
|
3039
4015
|
? { toolUseResult: normalized.structured }
|
|
3040
4016
|
: {}),
|
|
3041
4017
|
}, observedAt);
|
|
4018
|
+
attachToolResultMediaCandidates(message, normalized.mediaCandidates);
|
|
3042
4019
|
logSdkCorrelationDebug(sessionId, message, {
|
|
3043
4020
|
eventKind: "tool_result",
|
|
3044
4021
|
turnId: params.turnId,
|
|
@@ -3076,13 +4053,17 @@ export class CodexProvider {
|
|
|
3076
4053
|
convertItemToSDKMessages(item, sessionId, turnId, sourceEvent) {
|
|
3077
4054
|
const isComplete = sourceEvent === "item/completed";
|
|
3078
4055
|
const observedAt = new Date().toISOString();
|
|
3079
|
-
// Native tool items key the uuid on call_id (item.id).
|
|
3080
|
-
//
|
|
3081
|
-
// metadata for adoption of the outer durable call_* id
|
|
3082
|
-
// 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.
|
|
3083
4060
|
const uuid = this.isToolBackedThreadItem(item)
|
|
3084
4061
|
? this.buildItemToolUuid(item.id)
|
|
3085
|
-
:
|
|
4062
|
+
: item.type === "agent_message" ||
|
|
4063
|
+
item.type === "reasoning" ||
|
|
4064
|
+
item.type === "function_call_output"
|
|
4065
|
+
? item.id
|
|
4066
|
+
: `${item.id}-${turnId}`;
|
|
3086
4067
|
switch (item.type) {
|
|
3087
4068
|
case "reasoning": {
|
|
3088
4069
|
const message = withCodexTimestamp({
|
|
@@ -3127,6 +4108,32 @@ export class CodexProvider {
|
|
|
3127
4108
|
});
|
|
3128
4109
|
return [message];
|
|
3129
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
|
+
}
|
|
3130
4137
|
case "command_execution": {
|
|
3131
4138
|
const messages = [];
|
|
3132
4139
|
const correlationStartedAt = item.durationMs !== undefined
|
|
@@ -3262,6 +4269,7 @@ export class CodexProvider {
|
|
|
3262
4269
|
{
|
|
3263
4270
|
type: "tool_result",
|
|
3264
4271
|
tool_use_id: item.id,
|
|
4272
|
+
...(item.status !== "completed" ? { is_error: true } : {}),
|
|
3265
4273
|
content: item.status === "completed"
|
|
3266
4274
|
? `File changes applied:\n${changesSummary}`
|
|
3267
4275
|
: item.status === "declined"
|
|
@@ -3501,6 +4509,7 @@ export class CodexProvider {
|
|
|
3501
4509
|
type: "assistant",
|
|
3502
4510
|
session_id: sessionId,
|
|
3503
4511
|
uuid,
|
|
4512
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("image_view", turnId, item.id),
|
|
3504
4513
|
message: {
|
|
3505
4514
|
role: "assistant",
|
|
3506
4515
|
content: [
|
|
@@ -3526,6 +4535,7 @@ export class CodexProvider {
|
|
|
3526
4535
|
type: "user",
|
|
3527
4536
|
session_id: sessionId,
|
|
3528
4537
|
uuid: `${uuid}-result`,
|
|
4538
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("image_view", turnId, item.id),
|
|
3529
4539
|
message: {
|
|
3530
4540
|
role: "user",
|
|
3531
4541
|
content: [
|
|
@@ -3537,6 +4547,9 @@ export class CodexProvider {
|
|
|
3537
4547
|
],
|
|
3538
4548
|
},
|
|
3539
4549
|
}, observedAt);
|
|
4550
|
+
attachToolResultMediaCandidates(toolResultMessage, [
|
|
4551
|
+
{ originalPath: item.path },
|
|
4552
|
+
]);
|
|
3540
4553
|
logSdkCorrelationDebug(sessionId, toolResultMessage, {
|
|
3541
4554
|
eventKind: "tool_result",
|
|
3542
4555
|
turnId,
|