yepanywhere 0.9.0 → 0.9.2
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/bundled/@yep-anywhere/shared/dist/__tests__/long-context-effort-warning.test.js +19 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/long-context-effort-warning.test.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/__tests__/model-prices.test.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/__tests__/model-prices.test.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts +2 -2
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.js +5 -5
- package/bundled/@yep-anywhere/shared/dist/app-types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.d.ts +21 -0
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.js +22 -1
- package/bundled/@yep-anywhere/shared/dist/artifact-viewer.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/capability-ids.d.ts +6 -0
- package/bundled/@yep-anywhere/shared/dist/capability-ids.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/capability-ids.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/capability-ids.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.d.ts +2 -2
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.d.ts +41 -0
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.js +280 -0
- package/bundled/@yep-anywhere/shared/dist/find/documentFind.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.js +5 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.generated.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.js +59 -0
- package/bundled/@yep-anywhere/shared/dist/find/frameFindAgent.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.d.ts +46 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.js +45 -0
- package/bundled/@yep-anywhere/shared/dist/find/protocol.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts +4 -2
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/index.js +3 -1
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/long-context-effort-warning.d.ts +11 -11
- package/bundled/@yep-anywhere/shared/dist/long-context-effort-warning.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/long-context-effort-warning.js +26 -9
- package/bundled/@yep-anywhere/shared/dist/long-context-effort-warning.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/model-prices.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/model-prices.js +9 -2
- package/bundled/@yep-anywhere/shared/dist/model-prices.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/pdfjs.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/pdfjs.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/pdfjs.js +7 -0
- package/bundled/@yep-anywhere/shared/dist/pdfjs.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts +20 -0
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.js +22 -0
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.js +7 -10
- package/bundled/@yep-anywhere/shared/dist/skill-invocations.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/types.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/package.json +1 -1
- package/client-dist/assets/AboutSettings-CCzudbSj.js +1 -0
- package/client-dist/assets/{ActivityPage-FgSG_9Sl.js → ActivityPage-Bn0LbMgE.js} +1 -1
- package/client-dist/assets/{AgentContextSettings-BfTCI7qG.js → AgentContextSettings-DI8jQVIx.js} +3 -3
- package/client-dist/assets/AgentsPage-Ci_iJt8T.js +2 -0
- package/client-dist/assets/App-rFnK5pnF.js +2 -0
- package/client-dist/assets/AppearanceSettings-DTYVt0W5.js +2 -0
- package/client-dist/assets/AppsSettings-hbh_sguk.js +1 -0
- package/client-dist/assets/AttachmentChip-BFve3lTD.js +1 -0
- package/client-dist/assets/{AuthContext-CVsoMulX.js → AuthContext-DmXjW0be.js} +1 -1
- package/client-dist/assets/{BangCommandDisplayObject-B8KrHDzH.js → BangCommandDisplayObject-BH2KRGnc.js} +1 -1
- package/client-dist/assets/BangCommandsPage-MfkuL8yS.js +1 -0
- package/client-dist/assets/BrowserDebugToolbarButton-BPghQu17.js +1 -0
- package/client-dist/assets/{CacheMissBillingSettings-Bfqlk9rA.js → CacheMissBillingSettings-rUgC-_DD.js} +2 -2
- package/client-dist/assets/{CodexUpdatePrompt-ChHtbla-.js → CodexUpdatePrompt-mT9K-f1e.js} +1 -1
- package/client-dist/assets/{CommittedRangeInput-C3Z7YUlS.js → CommittedRangeInput-BwuV6Q6c.js} +1 -1
- package/client-dist/assets/{CommittedRangeNumberInput-D497_5ff.js → CommittedRangeNumberInput-C5YSVltB.js} +1 -1
- package/client-dist/assets/ComputerControlSettings-MWIdP7SS.js +1 -0
- package/client-dist/assets/{ConversationPreviewPage-CTWx9N3v.js → ConversationPreviewPage-B47r7mUF.js} +2 -2
- package/client-dist/assets/DevelopmentSettings-BEAy_xq-.js +1 -0
- package/client-dist/assets/DevicesSettings-DKQOZkRN.js +1 -0
- package/client-dist/assets/EmulatorPage-DlsPq3nR.js +1 -0
- package/client-dist/assets/EmulatorSettings-C6Ye1k_Y.js +1 -0
- package/client-dist/assets/EnvironmentSettings-ou8UNqTa.js +1 -0
- package/client-dist/assets/FilePage-Cw2PaO5H.js +1 -0
- package/client-dist/assets/FilterDropdown-CACc6ysA.js +1 -0
- package/client-dist/assets/FilterDropdown-D11gXriH.css +1 -0
- package/client-dist/assets/FloatingActionButton-Bl1Eumxh.js +1 -0
- package/client-dist/assets/{GitStatusPage-879aktqc.js → GitStatusPage-CLTkgnDI.js} +3 -3
- package/client-dist/assets/GlobalSessionsPage-Bvzs4zmW.js +2 -0
- package/client-dist/assets/GlobalSessionsPage-dlTB6crv.css +1 -0
- package/client-dist/assets/{HeartbeatTextArea-CKxL-bdJ.js → HeartbeatTextArea-CtP5kx9R.js} +1 -1
- package/client-dist/assets/HostIdentityContext-DA7dMF-y.js +1 -0
- package/client-dist/assets/HostsPage-CBOYGC2-.js +1 -0
- package/client-dist/assets/{InboxContext-opkOiXDB.js → InboxContext-8PXoTbK1.js} +1 -1
- package/client-dist/assets/InboxPage-DWl7uzdw.js +1 -0
- package/client-dist/assets/IssueSettings-BVljRpuD.js +1 -0
- package/client-dist/assets/IssuesPage-BFxgsMkf.js +1 -0
- package/client-dist/assets/LifecycleWebhooksSettings-Qw_dN3F3.js +1 -0
- package/client-dist/assets/{LocalAccessSettings-BpmNC9pI.js → LocalAccessSettings-SWirs75o.js} +3 -3
- package/client-dist/assets/LocalMediaModal-B3KXtyEB.css +1 -0
- package/client-dist/assets/LocalMediaModal-B9eHVx6y.js +14 -0
- package/client-dist/assets/{LoginPage-Cu7cX9wS.js → LoginPage-CYWqVJ95.js} +1 -1
- package/client-dist/assets/{MessageAge-Cd1C0-Kr.js → MessageAge-CaPpa1nH.js} +1 -1
- package/client-dist/assets/{MessageDeliverySettings-B_9VqCMP.js → MessageDeliverySettings-BUSuGKlc.js} +2 -2
- package/client-dist/assets/MessageInput-a13ZPAHv.js +3 -0
- package/client-dist/assets/MessageInputToolbar-BIL_6i7G.css +1 -0
- package/client-dist/assets/MessageInputToolbar-CQGTnVea.js +58 -0
- package/client-dist/assets/MessageList-C7kAuWKg.js +4 -0
- package/client-dist/assets/MessageList-rD5OPsAJ.css +1 -0
- package/client-dist/assets/Modal-ClSjJagX.js +15 -0
- package/client-dist/assets/ModelSettings-Dnd4yzmI.js +1 -0
- package/client-dist/assets/NavigationLayout-BTFsWVtE.js +2 -0
- package/client-dist/assets/NewSessionPage-BfiAS-Mo.js +1 -0
- package/client-dist/assets/NotificationsSettings-B1ugQIp-.js +1 -0
- package/client-dist/assets/PageHeader-BjwH2pWD.js +1 -0
- package/client-dist/assets/PerformanceSettings-jJYF9SPY.js +1 -0
- package/client-dist/assets/{ProjectSessionDefaultsModal-Dq2_xDka.js → ProjectSessionDefaultsModal-G_0uxJEv.js} +1 -1
- package/client-dist/assets/ProjectTemplatesSettings-BQTCV3-3.js +1 -0
- package/client-dist/assets/ProjectsPage-suTd8s9l.js +1 -0
- package/client-dist/assets/ProviderBadge-P0VTI71n.js +1 -0
- package/client-dist/assets/{ProviderChildSessionDetail-tWrpaB_X.js → ProviderChildSessionDetail-D0472EW8.js} +35 -35
- package/client-dist/assets/ProviderChildSessionPage-9__sgY14.js +1 -0
- package/client-dist/assets/ProvidersSettings-Bwzy73Rk.js +1 -0
- package/client-dist/assets/{RecapAfterSecondsControl-qU0RMrUX.js → RecapAfterSecondsControl-CxuXyFSr.js} +1 -1
- package/client-dist/assets/{RelayProtocol-DjpPJk64.js → RelayProtocol-BpdH0COG.js} +1 -1
- package/client-dist/assets/RemoteAccessSettings-Dn7KB5nK.js +1 -0
- package/client-dist/assets/RemoteExecutorsSettings-Cjl4Y2rB.js +1 -0
- package/client-dist/assets/SchemaValidationContext-57RCj4c4.js +1 -0
- package/client-dist/assets/{SearchPreview-B25ksFLA.js → SearchPreview-OzVFWPJZ.js} +1 -1
- package/client-dist/assets/{SessionHeader.module-Co9s-JR3.js → SessionHeader.module-BpaFAQ-S.js} +1 -1
- package/client-dist/assets/SessionPage-BYthaEfZ.js +50 -0
- package/client-dist/assets/SessionPage-CXXEAwu2.css +1 -0
- package/client-dist/assets/{SettingsItem-B_rM9Vhi.js → SettingsItem-C9Vh5p7F.js} +1 -1
- package/client-dist/assets/{SettingsSection-DOwc_RwX.js → SettingsSection-BaPzETK6.js} +1 -1
- package/client-dist/assets/SourceControlSettings-DnqLg0db.js +1 -0
- package/client-dist/assets/{SourceFileHeaderActions-3_76js_o.js → SourceFileHeaderActions-PjhUGnn6.js} +1 -1
- package/client-dist/assets/SpeechControlMenu-BYVdEa3C.js +2 -0
- package/client-dist/assets/{SpeechSettings-BT4TnSgr.js → SpeechSettings-B6LkqfSK.js} +2 -2
- package/client-dist/assets/{SpeechSmartTurnControls-vIZ8a7Lb.js → SpeechSmartTurnControls-LPq9wBaM.js} +1 -1
- package/client-dist/assets/StorageSettings-DtsJnYaz.js +1 -0
- package/client-dist/assets/{ThinkingControls-CbZcYobp.js → ThinkingControls-DXbxdJRi.js} +1 -1
- package/client-dist/assets/ToolbarSettings-Nb2BKpnk.js +1 -0
- package/client-dist/assets/UsersSettings-BdvqmyqK.js +1 -0
- package/client-dist/assets/ViewerModePage-CfJJA5GL.css +1 -0
- package/client-dist/assets/ViewerModePage-DzRIpuYF.js +1 -0
- package/client-dist/assets/{VoiceInputButton-japn0Kx_.js → VoiceInputButton-CCgovfyf.js} +1 -1
- package/client-dist/assets/WorkstreamsPage-dlEUllSL.js +1 -0
- package/client-dist/assets/{YaServerProvider-OSxrnpr9.js → YaServerProvider-CN3tC5UL.js} +1 -1
- package/client-dist/assets/{YepAnywhereLogo-OH70DoR4.js → YepAnywhereLogo-5zFKWjQq.js} +1 -1
- package/client-dist/assets/{abnfDiagram-VCTEODGH-BK2byNq2.js → abnfDiagram-VCTEODGH-BWHUBcV3.js} +1 -1
- package/client-dist/assets/{arc-BZ7613Gf.js → arc-DKsIJWGD.js} +1 -1
- package/client-dist/assets/{architectureDiagram-5GKGNRK7-WEjy-r-z.js → architectureDiagram-5GKGNRK7-BuLImqW3.js} +1 -1
- package/client-dist/assets/{attachmentFileNames-BfFUuufi.js → attachmentFileNames-CBV_5g65.js} +1 -1
- package/client-dist/assets/{blockDiagram-I7D4REHJ-BOsYYXyW.js → blockDiagram-I7D4REHJ-CJ4Gh6sL.js} +1 -1
- package/client-dist/assets/{c4Diagram-7LVT6UL2-BRrAUZLE.js → c4Diagram-7LVT6UL2-WR43XvCI.js} +1 -1
- package/client-dist/assets/channel-PV8AAsuo.js +1 -0
- package/client-dist/assets/{chunk-2Q5K7J3B-ikUS9MZO.js → chunk-2Q5K7J3B-CiP4m_EA.js} +1 -1
- package/client-dist/assets/{chunk-5VM5RSS4-DqxRtuTQ.js → chunk-5VM5RSS4-BUAhj1h9.js} +1 -1
- package/client-dist/assets/{chunk-F27PBJKO-DQAhMVEw.js → chunk-F27PBJKO-BUZNwiGx.js} +1 -1
- package/client-dist/assets/{chunk-IMKFNOWR-B2QXI9W-.js → chunk-IMKFNOWR-CX1a0BCE.js} +1 -1
- package/client-dist/assets/{chunk-JWPE2WC7-Px4jgxzE.js → chunk-JWPE2WC7-C6tL-mLF.js} +1 -1
- package/client-dist/assets/{chunk-POPQ4Y6H-BTrXHY42.js → chunk-POPQ4Y6H-BzijGGWv.js} +1 -1
- package/client-dist/assets/{chunk-SVP7TREG-DufcbLSM.js → chunk-SVP7TREG-CsZImJKI.js} +1 -1
- package/client-dist/assets/{chunk-TICWLB2K-C6xArrXi.js → chunk-TICWLB2K-TwCtuDc1.js} +1 -1
- package/client-dist/assets/{chunk-XXDRQBXY-CtTuQMK6.js → chunk-XXDRQBXY-C-2EoNns.js} +1 -1
- package/client-dist/assets/classDiagram-ZZMXUADV-DvtSxfma.js +1 -0
- package/client-dist/assets/classDiagram-v2-VYDZK3BY-DvtSxfma.js +1 -0
- package/client-dist/assets/{client-sN_tbfxh.js → client-Ci_HPGfl.js} +2 -2
- package/client-dist/assets/{compactSettingsControls-BjKplkgf.js → compactSettingsControls-C9mLZh5H.js} +1 -1
- package/client-dist/assets/{cose-bilkent-JH36ORCC-Cn15YJGj.js → cose-bilkent-JH36ORCC-CmbEx2jT.js} +1 -1
- package/client-dist/assets/{cynefin-OW5HDTMX-CJkFJ0DX.js → cynefin-OW5HDTMX-BSQHHXFU.js} +1 -1
- package/client-dist/assets/{cynefinDiagram-5FMLGOSQ-CVX2L_eF.js → cynefinDiagram-5FMLGOSQ-C-62JZJD.js} +1 -1
- package/client-dist/assets/{dagre-GXQ25YYZ-BMbYVbaU.js → dagre-GXQ25YYZ-BBERQe_A.js} +1 -1
- package/client-dist/assets/de-Cgdxe5vX.js +6 -0
- package/client-dist/assets/{diagram-S7CK7UJ4-DTZ_P_Fh.js → diagram-S7CK7UJ4-muw11lmG.js} +1 -1
- package/client-dist/assets/{diagram-UQ7AKVKN-C6cgxro0.js → diagram-UQ7AKVKN-DpePWzAe.js} +1 -1
- package/client-dist/assets/{diagram-VSXAHHWV-MzNPAr2n.js → diagram-VSXAHHWV-DHX6AHUY.js} +1 -1
- package/client-dist/assets/{diagram-VX7I27RA-BZN6iloV.js → diagram-VX7I27RA-DYmR6NH_.js} +1 -1
- package/client-dist/assets/{diagram-Z3DM3KII-CtTiorxp.js → diagram-Z3DM3KII-BC1SenHB.js} +1 -1
- package/client-dist/assets/{ebnfDiagram-PWID7BFC-B28XYdqt.js → ebnfDiagram-PWID7BFC-EVpri6Ma.js} +1 -1
- package/client-dist/assets/{erDiagram-RLTQ6QDP-DlMmHWyy.js → erDiagram-RLTQ6QDP-DthztUaa.js} +1 -1
- package/client-dist/assets/es-gyRk85dY.js +6 -0
- package/client-dist/assets/{flowDiagram-HODETNUW-C5mVciwL.js → flowDiagram-HODETNUW-DEpC5nMx.js} +1 -1
- package/client-dist/assets/fr-Dx9lA8u-.js +6 -0
- package/client-dist/assets/{frontendReload-DT6MOpjg.js → frontendReload-CBdyvvdy.js} +1 -1
- package/client-dist/assets/{ganttDiagram-EL5Y4UJY-BTl7ZRTR.js → ganttDiagram-EL5Y4UJY-Csqji8t1.js} +1 -1
- package/client-dist/assets/{gitGraphDiagram-WWUBYQGX-BsG6KEKe.js → gitGraphDiagram-WWUBYQGX-DVX1SDIE.js} +1 -1
- package/client-dist/assets/{hostStorage-BoEdRarg.js → hostStorage-D1KAm3U1.js} +1 -1
- package/client-dist/assets/{index-D7q51uJV.js → index-BESqiBDI.js} +1 -1
- package/client-dist/assets/index-BkOdUxq4.js +2 -0
- package/client-dist/assets/index-CPb-36gi.css +1 -0
- package/client-dist/assets/index-CoR-vzsb.js +2 -0
- package/client-dist/assets/index-Cv3tQXyE.js +1 -0
- package/client-dist/assets/{index-CkZXrIi5.js → index-DSFMItgO.js} +1 -1
- package/client-dist/assets/index-umZg0LZ6.js +81 -0
- package/client-dist/assets/{infoDiagram-27XIBGKW-CkZcthz-.js → infoDiagram-27XIBGKW-CHm3qsd2.js} +1 -1
- package/client-dist/assets/{ishikawaDiagram-5VMMS53U-Cvqitz5U.js → ishikawaDiagram-5VMMS53U-tBRZwz-_.js} +1 -1
- package/client-dist/assets/ja-BOj7smkY.js +6 -0
- package/client-dist/assets/{journeyDiagram-3NMN7TZE-vCw00Cqy.js → journeyDiagram-3NMN7TZE-EJic7nqD.js} +1 -1
- package/client-dist/assets/{kanban-definition-UXKFOSKX-BZGCo-wX.js → kanban-definition-UXKFOSKX-DtzL6eeO.js} +1 -1
- package/client-dist/assets/{layout-D7JRfual.js → layout-gb-Axsoq.js} +1 -1
- package/client-dist/assets/{linear-O9cHRsA5.js → linear-CAe4xGbR.js} +1 -1
- package/client-dist/assets/long-context-effort-warning-C6XHizE1.js +1 -0
- package/client-dist/assets/{mermaid.core-CdC8AeOx.js → mermaid.core-BCu1nv8H.js} +5 -5
- package/client-dist/assets/{mindmap-definition-YA3MSWOX-CczC57z0.js → mindmap-definition-YA3MSWOX-C7-KSPtJ.js} +1 -1
- package/client-dist/assets/newSessionPrefill-DKcy0abh.js +1 -0
- package/client-dist/assets/{pegDiagram-XKGWAZYB-jTm4iBWK.js → pegDiagram-XKGWAZYB-iWVH9rbY.js} +1 -1
- package/client-dist/assets/{pieDiagram-E7YTZNPT-DfkDPuJg.js → pieDiagram-E7YTZNPT-VKD6PLHa.js} +1 -1
- package/client-dist/assets/providerChildSessions-Cd7oK6KQ.css +1 -0
- package/client-dist/assets/providerChildSessions-DbLFSybt.js +77 -0
- package/client-dist/assets/{quadrantDiagram-AXDQQJYC--bBZSIt1.js → quadrantDiagram-AXDQQJYC-AXFugcFl.js} +1 -1
- package/client-dist/assets/{railroadDiagram-O6MQD6OU-gbkMdGN6.js → railroadDiagram-O6MQD6OU-D6oZy6Al.js} +1 -1
- package/client-dist/assets/{recentProjectPathLinks-Ba20jx5b.js → recentProjectPathLinks-D0Dx6YXT.js} +2 -2
- package/client-dist/assets/{registerServiceWorker-CGxgV4Yi.js → registerServiceWorker-B8K2KVOY.js} +1 -1
- package/client-dist/assets/{relayEndpoints-0oIbn4eU.js → relayEndpoints-BTq9xppf.js} +1 -1
- package/client-dist/assets/{remoteRoutePaths-CiDZeM2I.js → remoteRoutePaths-D8htA0xa.js} +1 -1
- package/client-dist/assets/{requirementDiagram-BXWQKSXE-WfLCTewk.js → requirementDiagram-BXWQKSXE-Eqtb74It.js} +1 -1
- package/client-dist/assets/{sankeyDiagram-P5KCCOFB-BhJkx_M1.js → sankeyDiagram-P5KCCOFB-CxvDiZ1R.js} +1 -1
- package/client-dist/assets/{sequenceDiagram-WJ2MYXX4-_S-ZN-hK.js → sequenceDiagram-WJ2MYXX4-BbpkgW2L.js} +1 -1
- package/client-dist/assets/sessionHistorySearch.worker-DCkPlfGO.js +61 -0
- package/client-dist/assets/{sessionNavigationState-DKXD1sTS.js → sessionNavigationState-BXejf2ZW.js} +1 -1
- package/client-dist/assets/sessionRouteLayer-D9T2QT8G.js +1 -0
- package/client-dist/assets/{sizeCapture-INFHLROL-YfaR_7-Y.js → sizeCapture-INFHLROL-DcuwWD5r.js} +1 -1
- package/client-dist/assets/{sourceControlNavigationState-lyZ29oaF.js → sourceControlNavigationState-BJbTzWTE.js} +1 -1
- package/client-dist/assets/{speechDraftTransaction-zyWVCYTF.js → speechDraftTransaction-WhqFE1h9.js} +1 -1
- package/client-dist/assets/{stateDiagram-D77RDMKH-_N9FdD6m.js → stateDiagram-D77RDMKH-Cidpq73w.js} +1 -1
- package/client-dist/assets/stateDiagram-v2-MP3YSRHH-DFqKXxjz.js +1 -0
- package/client-dist/assets/{swimlanes-42K2YHIH-DUl5jFZz.js → swimlanes-42K2YHIH-Ba8C7MwG.js} +1 -1
- package/client-dist/assets/swimlanesDiagram-VR7AAH4N-3pW2TcAt.js +8 -0
- package/client-dist/assets/{timeline-definition-24CTP7MA-DtYzRl63.js → timeline-definition-24CTP7MA-CKefGvUK.js} +1 -1
- package/client-dist/assets/useAcliCommentarySetting-CBKAl7qr.js +9 -0
- package/client-dist/assets/useActivityBusState-C0dor9p7.js +1 -0
- package/client-dist/assets/{useBackgroundRevalidation-CULom4_W.js → useBackgroundRevalidation-C79HAUP3.js} +1 -1
- package/client-dist/assets/{useCodexUpdateStatus-BIDehnvt.js → useCodexUpdateStatus-CEZO_f2Y.js} +1 -1
- package/client-dist/assets/{useConnectedDevices-kBo43kbz.js → useConnectedDevices-Ds-DuUDc.js} +1 -1
- package/client-dist/assets/{useDocumentTitle-C06qawRj.js → useDocumentTitle-Xz5t-nlB.js} +1 -1
- package/client-dist/assets/{useEmulators-Bz8194e3.js → useEmulators-qS_cCZ3I.js} +1 -1
- package/client-dist/assets/{useFileActivity-CwkGwsQt.js → useFileActivity-BoW4X3DY.js} +1 -1
- package/client-dist/assets/{useFloatingActionButtonEnabled-C31rfHtR.js → useFloatingActionButtonEnabled-2_hw7nSa.js} +1 -1
- package/client-dist/assets/{useForkSummaryAutoOpen-D_SvtmbE.js → useForkSummaryAutoOpen-CS33Irpf.js} +1 -1
- package/client-dist/assets/{useGeneratedTitleLength-Cu-SoQ6T.js → useGeneratedTitleLength-D856ktVg.js} +1 -1
- package/client-dist/assets/{useKeepMobileKeyboardOpenAfterDelivery-C-cYLaEU.js → useKeepMobileKeyboardOpenAfterDelivery-Ba77SbWF.js} +1 -1
- package/client-dist/assets/useModelSettings-BdlYk1DT.js +1 -0
- package/client-dist/assets/{useNotifyInApp-BcLZ8ie_.js → useNotifyInApp-DcWe3dh4.js} +1 -1
- package/client-dist/assets/{useOnboarding-CYgE-Xsg.js → useOnboarding-CoE3WF8a.js} +1 -1
- package/client-dist/assets/{useProviders-C6kBPWYX.js → useProviders-CeN1PclA.js} +1 -1
- package/client-dist/assets/{useQuestionAsideSetting-6Excl6Pm.js → useQuestionAsideSetting-CPFw1u0y.js} +1 -1
- package/client-dist/assets/{useRecentSessions-CsmsGemq.js → useRecentSessions-ieTzzJu4.js} +2 -2
- package/client-dist/assets/{useRelativeNow-BdLaPgKO.js → useRelativeNow-Ca6QGcPa.js} +1 -1
- package/client-dist/assets/{useReloadNotifications-B0egr2ys.js → useReloadNotifications-Dm1jmdIb.js} +1 -1
- package/client-dist/assets/{useRemoteExecutors-Bgjgzif1.js → useRemoteExecutors-zBAQnQXH.js} +1 -1
- package/client-dist/assets/{useSidebarWidth-ut6NNk5Y.js → useSidebarWidth-CBCcbSLg.js} +1 -1
- package/client-dist/assets/{useSourceControlCleanLanding-DxrwogwF.js → useSourceControlCleanLanding-VDlft5tr.js} +1 -1
- package/client-dist/assets/{useStableToolPreviewRendering-CcrkchTG.js → useStableToolPreviewRendering-hbVp38Jd.js} +1 -1
- package/client-dist/assets/{useStreamingEnabled-EdvW04Vz.js → useStreamingEnabled-hU1g8i7_.js} +1 -1
- package/client-dist/assets/{useTabTitleActivityPreference-B0suFUHK.js → useTabTitleActivityPreference-DhREY7m2.js} +1 -1
- package/client-dist/assets/{useVhostAccess-2ZKr0Lcl.js → useVhostAccess-DUtn_sH1.js} +1 -1
- package/client-dist/assets/{useWorkflowTags-_4F_41YI.js → useWorkflowTags-DxbEBqtf.js} +1 -1
- package/client-dist/assets/{vennDiagram-4TSXK5OY-26XZDUe6.js → vennDiagram-4TSXK5OY-CSGBq-Ur.js} +1 -1
- package/client-dist/assets/{wardleyDiagram-VM6X3IG4-YvZ37BJ7.js → wardleyDiagram-VM6X3IG4-DIMvcaMb.js} +1 -1
- package/client-dist/assets/{xychartDiagram-S5SC5T6Z-BMT0MEGz.js → xychartDiagram-S5SC5T6Z-TYXSqT3w.js} +1 -1
- package/client-dist/assets/zh-CN-DadySLj9.js +7 -0
- package/client-dist/index.html +3 -3
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +29 -10
- package/dist/app.js.map +1 -1
- package/dist/artifacts/ArtifactServer.d.ts +2 -0
- package/dist/artifacts/ArtifactServer.d.ts.map +1 -1
- package/dist/artifacts/ArtifactServer.js +79 -1
- package/dist/artifacts/ArtifactServer.js.map +1 -1
- package/dist/auth/limitedUserPolicy.d.ts +9 -5
- package/dist/auth/limitedUserPolicy.d.ts.map +1 -1
- package/dist/auth/limitedUserPolicy.js +64 -35
- package/dist/auth/limitedUserPolicy.js.map +1 -1
- package/dist/auth/principal.d.ts +6 -0
- package/dist/auth/principal.d.ts.map +1 -1
- package/dist/auth/principal.js +6 -0
- package/dist/auth/principal.js.map +1 -1
- package/dist/frontend/static.d.ts.map +1 -1
- package/dist/frontend/static.js +2 -1
- package/dist/frontend/static.js.map +1 -1
- package/dist/middleware/authenticated-transport.d.ts +13 -0
- package/dist/middleware/authenticated-transport.d.ts.map +1 -1
- package/dist/middleware/authenticated-transport.js +12 -0
- package/dist/middleware/authenticated-transport.js.map +1 -1
- package/dist/middleware/limited-users.d.ts +9 -5
- package/dist/middleware/limited-users.d.ts.map +1 -1
- package/dist/middleware/limited-users.js +37 -23
- package/dist/middleware/limited-users.js.map +1 -1
- package/dist/routes/file-edit.d.ts +18 -0
- package/dist/routes/file-edit.d.ts.map +1 -0
- package/dist/routes/file-edit.js +244 -0
- package/dist/routes/file-edit.js.map +1 -0
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/files.js +34 -9
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/pdfjs.d.ts +9 -0
- package/dist/routes/pdfjs.d.ts.map +1 -0
- package/dist/routes/pdfjs.js +34 -0
- package/dist/routes/pdfjs.js.map +1 -0
- package/dist/routes/public-file-shares.d.ts +6 -0
- package/dist/routes/public-file-shares.d.ts.map +1 -1
- package/dist/routes/public-file-shares.js +22 -10
- package/dist/routes/public-file-shares.js.map +1 -1
- package/dist/routes/public-shares.d.ts.map +1 -1
- package/dist/routes/public-shares.js +18 -1
- package/dist/routes/public-shares.js.map +1 -1
- package/dist/routes/recents.d.ts +4 -1
- package/dist/routes/recents.d.ts.map +1 -1
- package/dist/routes/recents.js +7 -0
- package/dist/routes/recents.js.map +1 -1
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +4 -0
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/settings.d.ts +7 -2
- package/dist/routes/settings.d.ts.map +1 -1
- package/dist/routes/settings.js +43 -1
- package/dist/routes/settings.js.map +1 -1
- package/dist/routes/version.d.ts.map +1 -1
- package/dist/routes/version.js +1 -0
- package/dist/routes/version.js.map +1 -1
- package/dist/routes/ws-relay-handlers.d.ts +12 -0
- package/dist/routes/ws-relay-handlers.d.ts.map +1 -1
- package/dist/routes/ws-relay-handlers.js +25 -4
- package/dist/routes/ws-relay-handlers.js.map +1 -1
- package/dist/routes/ws-relay.d.ts.map +1 -1
- package/dist/routes/ws-relay.js +8 -0
- package/dist/routes/ws-relay.js.map +1 -1
- package/dist/sdk/providers/agent-self.js +1 -1
- package/dist/sdk/providers/agent-self.js.map +1 -1
- package/dist/sdk/providers/claude.d.ts +1 -0
- package/dist/sdk/providers/claude.d.ts.map +1 -1
- package/dist/sdk/providers/claude.js +7 -0
- package/dist/sdk/providers/claude.js.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.d.ts.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.js +5 -3
- package/dist/sdk/providers/codex-model-catalog.js.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts +4 -1
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts +4 -1
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/Personality.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/Personality.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppDisplayMode.d.ts +2 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppDisplayMode.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/{ThreadRollbackParams.js → McpAppDisplayMode.js} +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppDisplayMode.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppUi.d.ts +9 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppUi.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/{ThreadRollbackResponse.js → McpAppUi.js} +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpAppUi.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/Thread.d.ts +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkResponse.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts +6 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeParams.d.ts +4 -0
- 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 +9 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartParams.d.ts +9 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartResponse.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadStartResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts +7 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnStartParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/index.d.ts +0 -2
- package/dist/sdk/providers/codex-protocol/index.d.ts.map +1 -1
- package/dist/sdk/providers/codex.d.ts +23 -2
- package/dist/sdk/providers/codex.d.ts.map +1 -1
- package/dist/sdk/providers/codex.js +55 -22
- package/dist/sdk/providers/codex.js.map +1 -1
- package/dist/sdk/providers/index.d.ts.map +1 -1
- package/dist/sdk/providers/index.js +4 -1
- package/dist/sdk/providers/index.js.map +1 -1
- package/dist/sdk/providers/opencode.d.ts +9 -0
- package/dist/sdk/providers/opencode.d.ts.map +1 -1
- package/dist/sdk/providers/opencode.js +129 -76
- package/dist/sdk/providers/opencode.js.map +1 -1
- package/dist/sdk/providers/provider-session-owner.d.ts +9 -0
- package/dist/sdk/providers/provider-session-owner.d.ts.map +1 -1
- package/dist/sdk/providers/provider-session-owner.js +39 -3
- package/dist/sdk/providers/provider-session-owner.js.map +1 -1
- package/dist/sdk/providers/types.d.ts +13 -0
- package/dist/sdk/providers/types.d.ts.map +1 -1
- package/dist/sdk/providers/types.js.map +1 -1
- package/dist/services/ArtifactRebuildService.d.ts +67 -0
- package/dist/services/ArtifactRebuildService.d.ts.map +1 -0
- package/dist/services/ArtifactRebuildService.js +229 -0
- package/dist/services/ArtifactRebuildService.js.map +1 -0
- package/dist/services/DirtyFileEditorService.d.ts +2 -0
- package/dist/services/DirtyFileEditorService.d.ts.map +1 -1
- package/dist/services/DirtyFileEditorService.js +20 -1
- package/dist/services/DirtyFileEditorService.js.map +1 -1
- package/dist/services/PdfjsAssetCache.d.ts +20 -0
- package/dist/services/PdfjsAssetCache.d.ts.map +1 -0
- package/dist/services/PdfjsAssetCache.js +131 -0
- package/dist/services/PdfjsAssetCache.js.map +1 -0
- package/dist/services/SessionCatalogService.d.ts +27 -0
- package/dist/services/SessionCatalogService.d.ts.map +1 -1
- package/dist/services/SessionCatalogService.js +129 -34
- package/dist/services/SessionCatalogService.js.map +1 -1
- package/dist/sessions/opencode-reader.d.ts +2 -1
- package/dist/sessions/opencode-reader.d.ts.map +1 -1
- package/dist/sessions/opencode-reader.js +30 -1
- package/dist/sessions/opencode-reader.js.map +1 -1
- package/dist/sessions/types.d.ts +6 -0
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/supervisor/Process.d.ts +7 -0
- package/dist/supervisor/Process.d.ts.map +1 -1
- package/dist/supervisor/Process.js +48 -3
- package/dist/supervisor/Process.js.map +1 -1
- package/dist/supervisor/Supervisor.d.ts.map +1 -1
- package/dist/supervisor/Supervisor.js +11 -0
- package/dist/supervisor/Supervisor.js.map +1 -1
- package/dist/supervisor/types.d.ts +3 -1
- package/dist/supervisor/types.d.ts.map +1 -1
- package/dist/supervisor/types.js.map +1 -1
- package/package.json +3 -3
- package/client-dist/assets/AboutSettings-BlEONE7w.js +0 -1
- package/client-dist/assets/AgentsPage-CBku9RWz.js +0 -2
- package/client-dist/assets/App-DWHvFKob.js +0 -2
- package/client-dist/assets/AppearanceSettings-BSEBjSjr.js +0 -2
- package/client-dist/assets/AppsSettings-iDL6Xuaa.js +0 -1
- package/client-dist/assets/AttachmentChip-DHKr4EfG.js +0 -1
- package/client-dist/assets/BangCommandsPage-yX8grXp9.js +0 -1
- package/client-dist/assets/BrowserDebugToolbarButton-B-b7N4cr.js +0 -1
- package/client-dist/assets/ComputerControlSettings-DzRDwfJ1.js +0 -1
- package/client-dist/assets/DevelopmentSettings-Bf9gyeU0.js +0 -1
- package/client-dist/assets/DevicesSettings-dbZHFEEc.js +0 -1
- package/client-dist/assets/EmulatorPage-CKJwVTFq.js +0 -1
- package/client-dist/assets/EmulatorSettings-BV9Bg3Xk.js +0 -1
- package/client-dist/assets/EnvironmentSettings-DmOTuSwm.js +0 -1
- package/client-dist/assets/FilePage-DnPW5Pbc.js +0 -1
- package/client-dist/assets/FilterDropdown-CB_tRt6g.css +0 -1
- package/client-dist/assets/FilterDropdown-DpS1eMEf.js +0 -1
- package/client-dist/assets/FloatingActionButton-DBIoFwff.js +0 -1
- package/client-dist/assets/GlobalSessionsPage-Dbnuis89.css +0 -1
- package/client-dist/assets/GlobalSessionsPage-DcmQcX7q.js +0 -2
- package/client-dist/assets/HostIdentityContext-D5aBdejC.js +0 -1
- package/client-dist/assets/HostsPage-C1ZTrhJv.js +0 -1
- package/client-dist/assets/InboxPage-Cepu8VGM.js +0 -1
- package/client-dist/assets/IssueSettings-xRU8E-xR.js +0 -1
- package/client-dist/assets/IssuesPage-c6PUStFT.js +0 -1
- package/client-dist/assets/LifecycleWebhooksSettings-CZcZATjJ.js +0 -1
- package/client-dist/assets/MessageInput-B0t6b_Hd.js +0 -3
- package/client-dist/assets/MessageInputToolbar-DdP4tB2S.css +0 -1
- package/client-dist/assets/MessageInputToolbar-rhYW1xGJ.js +0 -58
- package/client-dist/assets/MessageList-Dcvfxbeq.css +0 -1
- package/client-dist/assets/MessageList-dH63bflu.js +0 -4
- package/client-dist/assets/Modal-QUinFhBP.js +0 -16
- package/client-dist/assets/ModelSettings-CcWkVSEK.js +0 -1
- package/client-dist/assets/NavigationLayout-BkOsag-J.js +0 -2
- package/client-dist/assets/NewSessionPage-DcZ9YjmC.js +0 -1
- package/client-dist/assets/NotificationsSettings-DoVzfeME.js +0 -1
- package/client-dist/assets/PageHeader-BaYMLVHI.js +0 -1
- package/client-dist/assets/PerformanceSettings-dwoVtUlX.js +0 -1
- package/client-dist/assets/ProjectTemplatesSettings-BlMWq1wb.js +0 -1
- package/client-dist/assets/ProjectsPage-B5VBairc.js +0 -1
- package/client-dist/assets/ProviderChildSessionPage-B3eTTTjF.js +0 -1
- package/client-dist/assets/ProvidersSettings-OUKp5-Hb.js +0 -1
- package/client-dist/assets/RemoteAccessSettings-Bn0ng7s4.js +0 -1
- package/client-dist/assets/RemoteExecutorsSettings-2Qh-9Qv_.js +0 -1
- package/client-dist/assets/SchemaValidationContext-CIAd7icg.js +0 -1
- package/client-dist/assets/SessionPage-B1g1UFEV.js +0 -49
- package/client-dist/assets/SessionPage-BiV0X3n1.css +0 -1
- package/client-dist/assets/SourceControlSettings-BQfC1KbV.js +0 -1
- package/client-dist/assets/SpeechControlMenu-BIv0O1la.js +0 -2
- package/client-dist/assets/StorageSettings-DQcG9Mbq.js +0 -1
- package/client-dist/assets/ToolbarSettings-CmHVAejU.js +0 -1
- package/client-dist/assets/UsersSettings-COgiiV9D.js +0 -1
- package/client-dist/assets/WorkstreamsPage-DKLRDEAp.js +0 -1
- package/client-dist/assets/channel-C-7AVqtf.js +0 -1
- package/client-dist/assets/classDiagram-ZZMXUADV-DkRr8VcO.js +0 -1
- package/client-dist/assets/classDiagram-v2-VYDZK3BY-DkRr8VcO.js +0 -1
- package/client-dist/assets/de-DKHK9Tu3.js +0 -6
- package/client-dist/assets/es-XSkBrKBg.js +0 -6
- package/client-dist/assets/fr-DKUJaPhN.js +0 -6
- package/client-dist/assets/index-BBpZzMBa.js +0 -2
- package/client-dist/assets/index-BUrcmRdN.js +0 -76
- package/client-dist/assets/index-CA-BRFYh.js +0 -1
- package/client-dist/assets/index-wA2zlxt-.css +0 -1
- package/client-dist/assets/ja-BDnQUlyD.js +0 -6
- package/client-dist/assets/long-context-effort-warning-BGls6uvf.js +0 -1
- package/client-dist/assets/newSessionPrefill-DkkSfnYR.js +0 -1
- package/client-dist/assets/providerChildSessions-ClrSXOQr.js +0 -80
- package/client-dist/assets/providerChildSessions-D2O1SLei.css +0 -1
- package/client-dist/assets/sessionHistorySearch.worker-BGlVvPYq.js +0 -60
- package/client-dist/assets/stateDiagram-v2-MP3YSRHH-CBvcZngO.js +0 -1
- package/client-dist/assets/swimlanesDiagram-VR7AAH4N-DKVyQBDp.js +0 -8
- package/client-dist/assets/useAcliCommentarySetting-DxndlmkH.js +0 -9
- package/client-dist/assets/useActivityBusState-CINl9yjP.js +0 -1
- package/client-dist/assets/useModelSettings-DoDJRymT.js +0 -1
- package/client-dist/assets/zh-CN-FVXKSeP_.js +0 -7
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackParams.d.ts +0 -14
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackParams.d.ts.map +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackParams.js.map +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackResponse.d.ts +0 -12
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackResponse.d.ts.map +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadRollbackResponse.js.map +0 -1
- /package/client-dist/assets/{Modal-EC-u4IZ7.css → index-EC-u4IZ7.css} +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
(function(){"use strict";function Qe(e){if(e==null)return null;const t=typeof e=="number"?e:new Date(e).getTime();return Number.isFinite(t)?t:null}function R(e){let t=null;for(const n of e){const o=Qe(n.timestamp);o!==null&&(t=t===null?o:Math.max(t,o))}return t}function Mo(e){let t=null;for(const n of e){const o=Qe(n.timestamp);o!==null&&(t=t===null?o:Math.min(t,o))}return t}const Ro="This session is being continued after compaction (Yep Anywhere replay).";function No(e){return e?e.trimStart().startsWith(Ro):!1}const $o=/<ide_(opened_file|selection)>[\s\S]*?<\/ide_\1>/g,Do=/<ide_opened_file>([\s\S]*?)<\/ide_opened_file>/g;function Zo(e){return e.replace($o,"").trim()}function Lo(e){const t=e.match(/(?:user opened the file|opened the file)\s+(.+?)\s+in the IDE/i);return(t==null?void 0:t[1])??null}function Go(e){const t=[];for(const n of e.matchAll(Do)){const o=n[1];if(o){const s=Lo(o);s&&t.push(s)}}return t}function f(e,t,n){function o(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);const d=i.prototype,u=Object.keys(d);for(let m=0;m<u.length;m++){const y=u[m];y in a||(a[y]=d[y].bind(a))}}const s=(n==null?void 0:n.Parent)??Object;class r extends s{}Object.defineProperty(r,"name",{value:e});function i(a){var l;const d=n!=null&&n.Parent?new r:this;o(d,a),(l=d._zod).deferred??(l.deferred=[]);for(const u of d._zod.deferred)u();return d}return Object.defineProperty(i,"init",{value:o}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>{var l,d;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(d=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:d.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class pe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ct extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Et={};function ne(e){return Et}function jt(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function Ye(e,t){return typeof t=="bigint"?t.toString():t}function Ce(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Xe(e){return e==null}function et(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Uo(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let s=(o.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(o)){const l=o.match(/\d?e-(\d?)/);l!=null&&l[1]&&(s=Number.parseInt(l[1]))}const r=n>s?n:s,i=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return i%a/10**r}const Pt=Symbol("evaluating");function E(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Pt)return o===void 0&&(o=Pt,o=n()),o},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function le(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function oe(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function At(e){return JSON.stringify(e)}function qo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ot="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ho=Ce(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function me(e){if(_e(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(_e(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ft(e){return me(e)?{...e}:Array.isArray(e)?[...e]:e}const Bo=new Set(["string","number","symbol"]);function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function se(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(o._zod.parent=e),o}function b(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Wo(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Vo={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Jo(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const r=oe(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=n.shape[a])}return le(this,"shape",i),i},checks:[]});return se(e,r)}function Ko(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=oe(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return le(this,"shape",i),i},checks:[]});return se(e,r)}function Qo(e,t){if(!me(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const r=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(r,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=oe(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return le(this,"shape",r),r}});return se(e,s)}function Yo(e,t){if(!me(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=oe(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return le(this,"shape",o),o}});return se(e,n)}function Xo(e,t){const n=oe(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return le(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return se(e,n)}function es(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=oe(t._zod.def,{get shape(){const a=t._zod.def.shape,l={...a};if(n)for(const d in n){if(!(d in a))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(l[d]=e?new e({type:"optional",innerType:a[d]}):a[d])}else for(const d in a)l[d]=e?new e({type:"optional",innerType:a[d]}):a[d];return le(this,"shape",l),l},checks:[]});return se(t,i)}function ts(e,t,n){const o=oe(t._zod.def,{get shape(){const s=t._zod.def.shape,r={...s};if(n)for(const i in n){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(r[i]=new e({type:"nonoptional",innerType:s[i]}))}else for(const i in s)r[i]=new e({type:"nonoptional",innerType:s[i]});return le(this,"shape",r),r}});return se(t,o)}function he(e,t=0){var n;if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(((n=e.issues[o])==null?void 0:n.continue)!==!0)return!0;return!1}function ge(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Ee(e){return typeof e=="string"?e:e==null?void 0:e.message}function re(e,t,n){var s,r,i,a,l,d;const o={...e,path:e.path??[]};if(!e.message){const u=Ee((i=(r=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:r.error)==null?void 0:i.call(r,e))??Ee((a=t==null?void 0:t.error)==null?void 0:a.call(t,e))??Ee((l=n.customError)==null?void 0:l.call(n,e))??Ee((d=n.localeError)==null?void 0:d.call(n,e))??"Invalid input";o.message=u}return delete o.inst,delete o.continue,t!=null&&t.reportInput||delete o.input,o}function tt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Se(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const zt=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ye,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Mt=f("$ZodError",zt),Rt=f("$ZodError",zt,{Parent:Error});function ns(e,t=n=>n.message){const n={},o=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):o.push(t(s));return{formErrors:o,fieldErrors:n}}function os(e,t=n=>n.message){const n={_errors:[]},o=s=>{for(const r of s.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(i=>o({issues:i}));else if(r.code==="invalid_key")o({issues:r.issues});else if(r.code==="invalid_element")o({issues:r.issues});else if(r.path.length===0)n._errors.push(t(r));else{let i=n,a=0;for(;a<r.path.length;){const l=r.path[a];a===r.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(t(r))):i[l]=i[l]||{_errors:[]},i=i[l],a++}}};return o(e),n}const nt=e=>(t,n,o,s)=>{const r=o?Object.assign(o,{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new pe;if(i.issues.length){const a=new((s==null?void 0:s.Err)??e)(i.issues.map(l=>re(l,r,ne())));throw Ot(a,s==null?void 0:s.callee),a}return i.value},ot=e=>async(t,n,o,s)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new((s==null?void 0:s.Err)??e)(i.issues.map(l=>re(l,r,ne())));throw Ot(a,s==null?void 0:s.callee),a}return i.value},je=e=>(t,n,o)=>{const s=o?{...o,async:!1}:{async:!1},r=t._zod.run({value:n,issues:[]},s);if(r instanceof Promise)throw new pe;return r.issues.length?{success:!1,error:new(e??Mt)(r.issues.map(i=>re(i,s,ne())))}:{success:!0,data:r.value}},ss=je(Rt),Pe=e=>async(t,n,o)=>{const s=o?Object.assign(o,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},s);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new e(r.issues.map(i=>re(i,s,ne())))}:{success:!0,data:r.value}},rs=Pe(Rt),is=e=>(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return nt(e)(t,n,s)},as=e=>(t,n,o)=>nt(e)(t,n,o),cs=e=>async(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ot(e)(t,n,s)},ls=e=>async(t,n,o)=>ot(e)(t,n,o),ds=e=>(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return je(e)(t,n,s)},us=e=>(t,n,o)=>je(e)(t,n,o),ps=e=>async(t,n,o)=>{const s=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Pe(e)(t,n,s)},ms=e=>async(t,n,o)=>Pe(e)(t,n,o),fs=/^[cC][^\s-]{8,}$/,hs=/^[0-9a-z]+$/,gs=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,vs=/^[0-9a-vA-V]{20}$/,ys=/^[A-Za-z0-9]{27}$/,ks=/^[a-zA-Z0-9_-]{21}$/,bs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_s=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Nt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ss=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ws="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ts(){return new RegExp(ws,"u")}const Is=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Cs=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Es=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,js=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$t=/^[A-Za-z0-9_-]*$/,Ps=/^\+[1-9]\d{6,14}$/,Dt="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",As=new RegExp(`^${Dt}$`);function Zt(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Os(e){return new RegExp(`^${Zt(e)}$`)}function Fs(e){const t=Zt({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Dt}T(?:${o})$`)}const zs=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ms=/^-?\d+$/,Lt=/^-?\d+(?:\.\d+)?$/,Rs=/^(?:true|false)$/i,Ns=/^[^A-Z]*$/,$s=/^[^a-z]*$/,H=f("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Gt={number:"number",bigint:"bigint",object:"date"},Ut=f("$ZodCheckLessThan",(e,t)=>{H.init(e,t);const n=Gt[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,r=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qt=f("$ZodCheckGreaterThan",(e,t)=>{H.init(e,t);const n=Gt[typeof t.value];e._zod.onattach.push(o=>{const s=o._zod.bag,r=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ds=f("$ZodCheckMultipleOf",(e,t)=>{H.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Uo(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Zs=f("$ZodCheckNumberFormat",(e,t)=>{var i;H.init(e,t),t.format=t.format||"float64";const n=(i=t.format)==null?void 0:i.includes("int"),o=n?"int":"number",[s,r]=Vo[t.format];e._zod.onattach.push(a=>{const l=a._zod.bag;l.format=t.format,l.minimum=s,l.maximum=r,n&&(l.pattern=Ms)}),e._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}l<s&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>r&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Ls=f("$ZodCheckMaxLength",(e,t)=>{var n;H.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Xe(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const s=o.value;if(s.length<=t.maximum)return;const i=tt(s);o.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Gs=f("$ZodCheckMinLength",(e,t)=>{var n;H.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Xe(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const s=o.value;if(s.length>=t.minimum)return;const i=tt(s);o.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Us=f("$ZodCheckLengthEquals",(e,t)=>{var n;H.init(e,t),(n=e._zod.def).when??(n.when=o=>{const s=o.value;return!Xe(s)&&s.length!==void 0}),e._zod.onattach.push(o=>{const s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=o=>{const s=o.value,r=s.length;if(r===t.length)return;const i=tt(s),a=r>t.length;o.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Ae=f("$ZodCheckStringFormat",(e,t)=>{var n,o;H.init(e,t),e._zod.onattach.push(s=>{const r=s._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),qs=f("$ZodCheckRegex",(e,t)=>{Ae.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Hs=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ns),Ae.init(e,t)}),Bs=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=$s),Ae.init(e,t)}),Ws=f("$ZodCheckIncludes",(e,t)=>{H.init(e,t);const n=fe(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(s=>{const r=s._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Vs=f("$ZodCheckStartsWith",(e,t)=>{H.init(e,t);const n=new RegExp(`^${fe(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Js=f("$ZodCheckEndsWith",(e,t)=>{H.init(e,t);const n=new RegExp(`.*${fe(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Ks=f("$ZodCheckOverwrite",(e,t)=>{H.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Qs{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
|
|
2
|
+
`).filter(i=>i),s=Math.min(...o.map(i=>i.length-i.trimStart().length)),r=o.map(i=>i.slice(s)).map(i=>" ".repeat(this.indent*2)+i);for(const i of r)this.content.push(i)}compile(){const t=Function,n=this==null?void 0:this.args,s=[...((this==null?void 0:this.content)??[""]).map(r=>` ${r}`)];return new t(...n,s.join(`
|
|
3
|
+
`))}}const Ys={major:4,minor:3,patch:6},O=f("$ZodType",(e,t)=>{var s;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ys;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const r of o)for(const i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const r=(a,l,d)=>{let u=he(a),m;for(const y of l){if(y._zod.def.when){if(!y._zod.def.when(a))continue}else if(u)continue;const k=a.issues.length,I=y._zod.check(a);if(I instanceof Promise&&(d==null?void 0:d.async)===!1)throw new pe;if(m||I instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await I,a.issues.length!==k&&(u||(u=he(a,k)))});else{if(a.issues.length===k)continue;u||(u=he(a,k))}}return m?m.then(()=>a):a},i=(a,l,d)=>{if(he(a))return a.aborted=!0,a;const u=r(l,o,d);if(u instanceof Promise){if(d.async===!1)throw new pe;return u.then(m=>e._zod.parse(m,d))}return e._zod.parse(u,d)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){const u=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(m=>i(m,a,l)):i(u,a,l)}const d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new pe;return d.then(u=>r(u,o,l))}return r(d,o,l)}}E(e,"~standard",()=>({validate:r=>{var i;try{const a=ss(e,r);return a.success?{value:a.data}:{issues:(i=a.error)==null?void 0:i.issues}}catch{return rs(e,r).then(l=>{var d;return l.success?{value:l.data}:{issues:(d=l.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),st=f("$ZodString",(e,t)=>{var n;O.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??zs(e._zod.bag),e._zod.parse=(o,s)=>{if(t.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),A=f("$ZodStringFormat",(e,t)=>{Ae.init(e,t),st.init(e,t)}),Xs=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_s),A.init(e,t)}),er=f("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Nt(o))}else t.pattern??(t.pattern=Nt());A.init(e,t)}),tr=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ss),A.init(e,t)}),nr=f("$ZodURL",(e,t)=>{A.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),or=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ts()),A.init(e,t)}),sr=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ks),A.init(e,t)}),rr=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=fs),A.init(e,t)}),ir=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=hs),A.init(e,t)}),ar=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=gs),A.init(e,t)}),cr=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=vs),A.init(e,t)}),lr=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ys),A.init(e,t)}),dr=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Fs(t)),A.init(e,t)}),ur=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=As),A.init(e,t)}),pr=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Os(t)),A.init(e,t)}),mr=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=bs),A.init(e,t)}),fr=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Is),A.init(e,t),e._zod.bag.format="ipv4"}),hr=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xs),A.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),gr=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Cs),A.init(e,t)}),vr=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Es),A.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(o.length!==2)throw new Error;const[s,r]=o;if(!r)throw new Error;const i=Number(r);if(`${i}`!==r)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Ht(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const yr=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=js),A.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Ht(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function kr(e){if(!$t.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ht(n)}const br=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$t),A.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{kr(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_r=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ps),A.init(e,t)});function Sr(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[o]=n;if(!o)return!1;const s=JSON.parse(atob(o));return!("typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const wr=f("$ZodJWT",(e,t)=>{A.init(e,t),e._zod.check=n=>{Sr(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Bt=f("$ZodNumber",(e,t)=>{O.init(e,t),e._zod.pattern=e._zod.bag.pattern??Lt,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const r=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...r?{received:r}:{}}),n}}),Tr=f("$ZodNumberFormat",(e,t)=>{Zs.init(e,t),Bt.init(e,t)}),Ir=f("$ZodBoolean",(e,t)=>{O.init(e,t),e._zod.pattern=Rs,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),xr=f("$ZodUnknown",(e,t)=>{O.init(e,t),e._zod.parse=n=>n}),Cr=f("$ZodNever",(e,t)=>{O.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Wt(e,t,n){e.issues.length&&t.issues.push(...ge(n,e.issues)),t.value[n]=e.value}const Er=f("$ZodArray",(e,t)=>{O.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const r=[];for(let i=0;i<s.length;i++){const a=s[i],l=t.element._zod.run({value:a,issues:[]},o);l instanceof Promise?r.push(l.then(d=>Wt(d,n,i))):Wt(l,n,i)}return r.length?Promise.all(r).then(()=>n):n}});function Oe(e,t,n,o,s){if(e.issues.length){if(s&&!(n in o))return;t.issues.push(...ge(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Vt(e){var o,s,r,i;const t=Object.keys(e.shape);for(const a of t)if(!((i=(r=(s=(o=e.shape)==null?void 0:o[a])==null?void 0:s._zod)==null?void 0:r.traits)!=null&&i.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=Wo(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Jt(e,t,n,o,s,r){const i=[],a=s.keySet,l=s.catchall._zod,d=l.def.type,u=l.optout==="optional";for(const m in t){if(a.has(m))continue;if(d==="never"){i.push(m);continue}const y=l.run({value:t[m],issues:[]},o);y instanceof Promise?e.push(y.then(k=>Oe(k,n,m,t,u))):Oe(y,n,m,t,u)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:r}),e.length?Promise.all(e).then(()=>n):n}const jr=f("$ZodObject",(e,t)=>{O.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...a};return Object.defineProperty(t,"shape",{value:l}),l}})}const o=Ce(()=>Vt(t));E(e._zod,"propValues",()=>{const a=t.shape,l={};for(const d in a){const u=a[d]._zod;if(u.values){l[d]??(l[d]=new Set);for(const m of u.values)l[d].add(m)}}return l});const s=_e,r=t.catchall;let i;e._zod.parse=(a,l)=>{i??(i=o.value);const d=a.value;if(!s(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};const u=[],m=i.shape;for(const y of i.keys){const k=m[y],I=k._zod.optout==="optional",w=k._zod.run({value:d[y],issues:[]},l);w instanceof Promise?u.push(w.then(x=>Oe(x,a,y,d,I))):Oe(w,a,y,d,I)}return r?Jt(u,d,a,l,o.value,e):u.length?Promise.all(u).then(()=>a):a}}),Pr=f("$ZodObjectJIT",(e,t)=>{jr.init(e,t);const n=e._zod.parse,o=Ce(()=>Vt(t)),s=y=>{var ue;const k=new Qs(["shape","payload","ctx"]),I=o.value,w=V=>{const L=At(V);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};k.write("const input = payload.value;");const x=Object.create(null);let q=0;for(const V of I.keys)x[V]=`key_${q++}`;k.write("const newResult = {};");for(const V of I.keys){const L=x[V],B=At(V),_=y[V],T=((ue=_==null?void 0:_._zod)==null?void 0:ue.optout)==="optional";k.write(`const ${L} = ${w(V)};`),T?k.write(`
|
|
4
|
+
if (${L}.issues.length) {
|
|
5
|
+
if (${B} in input) {
|
|
6
|
+
payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
|
|
7
|
+
...iss,
|
|
8
|
+
path: iss.path ? [${B}, ...iss.path] : [${B}]
|
|
9
|
+
})));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (${L}.value === undefined) {
|
|
14
|
+
if (${B} in input) {
|
|
15
|
+
newResult[${B}] = undefined;
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
newResult[${B}] = ${L}.value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
`):k.write(`
|
|
22
|
+
if (${L}.issues.length) {
|
|
23
|
+
payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
|
|
24
|
+
...iss,
|
|
25
|
+
path: iss.path ? [${B}, ...iss.path] : [${B}]
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (${L}.value === undefined) {
|
|
30
|
+
if (${B} in input) {
|
|
31
|
+
newResult[${B}] = undefined;
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
newResult[${B}] = ${L}.value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
`)}k.write("payload.value = newResult;"),k.write("return payload;");const C=k.compile();return(V,L)=>C(y,V,L)};let r;const i=_e,a=!Et.jitless,d=a&&Ho.value,u=t.catchall;let m;e._zod.parse=(y,k)=>{m??(m=o.value);const I=y.value;return i(I)?a&&d&&(k==null?void 0:k.async)===!1&&k.jitless!==!0?(r||(r=s(t.shape)),y=r(y,k),u?Jt([],I,y,k,m,e):y):n(y,k):(y.issues.push({expected:"object",code:"invalid_type",input:I,inst:e}),y)}});function Kt(e,t,n,o){for(const r of e)if(r.issues.length===0)return t.value=r.value,t;const s=e.filter(r=>!he(r));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(r=>r.issues.map(i=>re(i,o,ne())))}),t)}const Qt=f("$ZodUnion",(e,t)=>{O.init(e,t),E(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),E(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),E(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),E(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${s.map(r=>et(r.source)).join("|")})$`)}});const n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(s,r)=>{if(n)return o(s,r);let i=!1;const a=[];for(const l of t.options){const d=l._zod.run({value:s.value,issues:[]},r);if(d instanceof Promise)a.push(d),i=!0;else{if(d.issues.length===0)return d;a.push(d)}}return i?Promise.all(a).then(l=>Kt(l,s,e,r)):Kt(a,s,e,r)}}),Ar=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Qt.init(e,t);const n=e._zod.parse;E(e._zod,"propValues",()=>{const s={};for(const r of t.options){const i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const[a,l]of Object.entries(i)){s[a]||(s[a]=new Set);for(const d of l)s[a].add(d)}}return s});const o=Ce(()=>{var i;const s=t.options,r=new Map;for(const a of s){const l=(i=a._zod.propValues)==null?void 0:i[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const d of l){if(r.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);r.set(d,a)}}return r});e._zod.parse=(s,r)=>{const i=s.value;if(!_e(i))return s.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),s;const a=o.value.get(i==null?void 0:i[t.discriminator]);return a?a._zod.run(s,r):t.unionFallback?n(s,r):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:i,path:[t.discriminator],inst:e}),s)}}),Or=f("$ZodIntersection",(e,t)=>{O.init(e,t),e._zod.parse=(n,o)=>{const s=n.value,r=t.left._zod.run({value:s,issues:[]},o),i=t.right._zod.run({value:s,issues:[]},o);return r instanceof Promise||i instanceof Promise?Promise.all([r,i]).then(([l,d])=>Yt(n,l,d)):Yt(n,r,i)}});function rt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(me(e)&&me(t)){const n=Object.keys(t),o=Object.keys(e).filter(r=>n.indexOf(r)!==-1),s={...e,...t};for(const r of o){const i=rt(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};s[r]=i.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const s=e[o],r=t[o],i=rt(s,r);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Yt(e,t,n){const o=new Map;let s;for(const a of t.issues)if(a.code==="unrecognized_keys"){s??(s=a);for(const l of a.keys)o.has(l)||o.set(l,{}),o.get(l).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)o.has(l)||o.set(l,{}),o.get(l).r=!0;else e.issues.push(a);const r=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(r.length&&s&&e.issues.push({...s,keys:r}),he(e))return e;const i=rt(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const Fr=f("$ZodRecord",(e,t)=>{O.init(e,t),e._zod.parse=(n,o)=>{const s=n.value;if(!me(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const r=[],i=t.keyType._zod.values;if(i){n.value={};const a=new Set;for(const d of i)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){a.add(typeof d=="number"?d.toString():d);const u=t.valueType._zod.run({value:s[d],issues:[]},o);u instanceof Promise?r.push(u.then(m=>{m.issues.length&&n.issues.push(...ge(d,m.issues)),n.value[d]=m.value})):(u.issues.length&&n.issues.push(...ge(d,u.issues)),n.value[d]=u.value)}let l;for(const d in s)a.has(d)||(l=l??[],l.push(d));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(s)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Lt.test(a)&&l.issues.length){const m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(l=m)}if(l.issues.length){t.mode==="loose"?n.value[a]=s[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>re(m,o,ne())),input:a,path:[a],inst:e});continue}const u=t.valueType._zod.run({value:s[a],issues:[]},o);u instanceof Promise?r.push(u.then(m=>{m.issues.length&&n.issues.push(...ge(a,m.issues)),n.value[l.value]=m.value})):(u.issues.length&&n.issues.push(...ge(a,u.issues)),n.value[l.value]=u.value)}}return r.length?Promise.all(r).then(()=>n):n}}),zr=f("$ZodEnum",(e,t)=>{O.init(e,t);const n=jt(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(s=>Bo.has(typeof s)).map(s=>typeof s=="string"?fe(s):s.toString()).join("|")})$`),e._zod.parse=(s,r)=>{const i=s.value;return o.has(i)||s.issues.push({code:"invalid_value",values:n,input:i,inst:e}),s}}),Mr=f("$ZodLiteral",(e,t)=>{if(O.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?fe(o):o?fe(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{const r=o.value;return n.has(r)||o.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),o}}),Rr=f("$ZodTransform",(e,t)=>{O.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ct(e.constructor.name);const s=t.transform(n.value,n);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(i=>(n.value=i,n));if(s instanceof Promise)throw new pe;return n.value=s,n}});function Xt(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const en=f("$ZodOptional",(e,t)=>{O.init(e,t),e._zod.optin="optional",e._zod.optout="optional",E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),E(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${et(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(r=>Xt(r,n.value)):Xt(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),Nr=f("$ZodExactOptional",(e,t)=>{en.init(e,t),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),$r=f("$ZodNullable",(e,t)=>{O.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${et(n.source)}|null)$`):void 0}),E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Dr=f("$ZodDefault",(e,t)=>{O.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(r=>tn(r,t)):tn(s,t)}});function tn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Zr=f("$ZodPrefault",(e,t)=>{O.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),Lr=f("$ZodNonOptional",(e,t)=>{O.init(e,t),E(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(r=>nn(r,e)):nn(s,e)}});function nn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Gr=f("$ZodCatch",(e,t)=>{O.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(r=>(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>re(i,o,ne()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(r=>re(r,o,ne()))},input:n.value}),n.issues=[]),n)}}),Ur=f("$ZodPipe",(e,t)=>{O.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){const r=t.out._zod.run(n,o);return r instanceof Promise?r.then(i=>Fe(i,t.in,o)):Fe(r,t.in,o)}const s=t.in._zod.run(n,o);return s instanceof Promise?s.then(r=>Fe(r,t.out,o)):Fe(s,t.out,o)}});function Fe(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const qr=f("$ZodReadonly",(e,t)=>{O.init(e,t),E(e._zod,"propValues",()=>t.innerType._zod.propValues),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"optin",()=>{var n,o;return(o=(n=t.innerType)==null?void 0:n._zod)==null?void 0:o.optin}),E(e._zod,"optout",()=>{var n,o;return(o=(n=t.innerType)==null?void 0:n._zod)==null?void 0:o.optout}),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);const s=t.innerType._zod.run(n,o);return s instanceof Promise?s.then(on):on(s)}});function on(e){return e.value=Object.freeze(e.value),e}const Hr=f("$ZodCustom",(e,t)=>{H.init(e,t),O.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{const o=n.value,s=t.fn(o);if(s instanceof Promise)return s.then(r=>sn(r,n,o,e));sn(s,n,o,e)}});function sn(e,t,n,o){if(!e){const s={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(s.params=o._zod.def.params),t.issues.push(Se(s))}}var rn;class Br{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const o={...this.get(n)??{}};delete o.id;const s={...o,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Wr(){return new Br}(rn=globalThis).__zod_globalRegistry??(rn.__zod_globalRegistry=Wr());const we=globalThis.__zod_globalRegistry;function Vr(e,t){return new e({type:"string",...b(t)})}function Jr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...b(t)})}function an(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...b(t)})}function cn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...b(t)})}function Kr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...b(t)})}function Qr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...b(t)})}function Yr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...b(t)})}function ln(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...b(t)})}function Xr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...b(t)})}function ei(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...b(t)})}function ti(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...b(t)})}function ni(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...b(t)})}function oi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...b(t)})}function si(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...b(t)})}function ri(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...b(t)})}function ii(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...b(t)})}function ai(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...b(t)})}function ci(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...b(t)})}function li(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...b(t)})}function di(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...b(t)})}function ui(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...b(t)})}function pi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...b(t)})}function mi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...b(t)})}function fi(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...b(t)})}function hi(e,t){return new e({type:"string",format:"date",check:"string_format",...b(t)})}function gi(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...b(t)})}function vi(e,t){return new e({type:"string",format:"duration",check:"string_format",...b(t)})}function yi(e,t){return new e({type:"number",checks:[],...b(t)})}function ki(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...b(t)})}function bi(e,t){return new e({type:"boolean",...b(t)})}function _i(e){return new e({type:"unknown"})}function Si(e,t){return new e({type:"never",...b(t)})}function dn(e,t){return new Ut({check:"less_than",...b(t),value:e,inclusive:!1})}function it(e,t){return new Ut({check:"less_than",...b(t),value:e,inclusive:!0})}function un(e,t){return new qt({check:"greater_than",...b(t),value:e,inclusive:!1})}function at(e,t){return new qt({check:"greater_than",...b(t),value:e,inclusive:!0})}function pn(e,t){return new Ds({check:"multiple_of",...b(t),value:e})}function mn(e,t){return new Ls({check:"max_length",...b(t),maximum:e})}function ze(e,t){return new Gs({check:"min_length",...b(t),minimum:e})}function fn(e,t){return new Us({check:"length_equals",...b(t),length:e})}function wi(e,t){return new qs({check:"string_format",format:"regex",...b(t),pattern:e})}function Ti(e){return new Hs({check:"string_format",format:"lowercase",...b(e)})}function Ii(e){return new Bs({check:"string_format",format:"uppercase",...b(e)})}function xi(e,t){return new Ws({check:"string_format",format:"includes",...b(t),includes:e})}function Ci(e,t){return new Vs({check:"string_format",format:"starts_with",...b(t),prefix:e})}function Ei(e,t){return new Js({check:"string_format",format:"ends_with",...b(t),suffix:e})}function ve(e){return new Ks({check:"overwrite",tx:e})}function ji(e){return ve(t=>t.normalize(e))}function Pi(){return ve(e=>e.trim())}function Ai(){return ve(e=>e.toLowerCase())}function Oi(){return ve(e=>e.toUpperCase())}function Fi(){return ve(e=>qo(e))}function zi(e,t,n){return new e({type:"array",element:t,...b(n)})}function Mi(e,t,n){return new e({type:"custom",check:"custom",fn:t,...b(n)})}function Ri(e){const t=Ni(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Se(o,n.value,t._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(Se(s))}},e(n.value,n)));return t}function Ni(e,t){const n=new H({check:"custom",...b(t)});return n._zod.check=e,n}function hn(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??we,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function N(e,t,n={path:[],schemaPath:[]}){var u,m;var o;const s=e._zod.def,r=t.seen.get(e);if(r)return r.count++,n.schemaPath.includes(e)&&(r.cycle=n.path),r.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const a=(m=(u=e._zod).toJSONSchema)==null?void 0:m.call(u);if(a)i.schema=a;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,y);else{const I=i.schema,w=t.processors[s.type];if(!w)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);w(e,t,I,y)}const k=e._zod.parent;k&&(i.ref||(i.ref=k),N(k,t,y),t.seen.get(k).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(i.schema,l),t.io==="input"&&U(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((o=i.schema).default??(o.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function gn(e,t){var i,a,l,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const u of e.seen.entries()){const m=(i=e.metadataRegistry.get(u[0]))==null?void 0:i.id;if(m){const y=o.get(m);if(y&&y!==u[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(m,u[0])}}const s=u=>{var w;const m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const x=(w=e.external.registry.get(u[0]))==null?void 0:w.id,q=e.external.uri??(ue=>ue);if(x)return{ref:q(x)};const C=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=C,{defId:C,ref:`${q("__shared")}#/${m}/${C}`}}if(u[1]===n)return{ref:"#"};const k=`#/${m}/`,I=u[1].schema.id??`__schema${e.counter++}`;return{defId:I,ref:k+I}},r=u=>{if(u[1].schema.$ref)return;const m=u[1],{ref:y,defId:k}=s(u);m.def={...m.schema},k&&(m.defId=k);const I=m.schema;for(const w in I)delete I[w];I.$ref=y};if(e.cycles==="throw")for(const u of e.seen.entries()){const m=u[1];if(m.cycle)throw new Error(`Cycle detected: #/${(a=m.cycle)==null?void 0:a.join("/")}/<root>
|
|
38
|
+
|
|
39
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const m=u[1];if(t===u[0]){r(u);continue}if(e.external){const k=(l=e.external.registry.get(u[0]))==null?void 0:l.id;if(t!==u[0]&&k){r(u);continue}}if((d=e.metadataRegistry.get(u[0]))==null?void 0:d.id){r(u);continue}if(m.cycle){r(u);continue}if(m.count>1&&e.reused==="ref"){r(u);continue}}}function vn(e,t){var i,a,l;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=d=>{const u=e.seen.get(d);if(u.ref===null)return;const m=u.def??u.schema,y={...m},k=u.ref;if(u.ref=null,k){o(k);const w=e.seen.get(k),x=w.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(x)):Object.assign(m,x),Object.assign(m,y),d._zod.parent===k)for(const C in m)C==="$ref"||C==="allOf"||C in y||delete m[C];if(x.$ref&&w.def)for(const C in m)C==="$ref"||C==="allOf"||C in w.def&&JSON.stringify(m[C])===JSON.stringify(w.def[C])&&delete m[C]}const I=d._zod.parent;if(I&&I!==k){o(I);const w=e.seen.get(I);if(w!=null&&w.schema.$ref&&(m.$ref=w.schema.$ref,w.def))for(const x in m)x==="$ref"||x==="allOf"||x in w.def&&JSON.stringify(m[x])===JSON.stringify(w.def[x])&&delete m[x]}e.override({zodSchema:d,jsonSchema:m,path:u.path??[]})};for(const d of[...e.seen.entries()].reverse())o(d[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,(i=e.external)!=null&&i.uri){const d=(a=e.external.registry.get(t))==null?void 0:a.id;if(!d)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(d)}Object.assign(s,n.def??n.schema);const r=((l=e.external)==null?void 0:l.defs)??{};for(const d of e.seen.entries()){const u=d[1];u.def&&u.defId&&(r[u.defId]=u.def)}e.external||Object.keys(r).length>0&&(e.target==="draft-2020-12"?s.$defs=r:s.definitions=r);try{const d=JSON.parse(JSON.stringify(s));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:Me(t,"input",e.processors),output:Me(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function U(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return U(o.element,n);if(o.type==="set")return U(o.valueType,n);if(o.type==="lazy")return U(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return U(o.innerType,n);if(o.type==="intersection")return U(o.left,n)||U(o.right,n);if(o.type==="record"||o.type==="map")return U(o.keyType,n)||U(o.valueType,n);if(o.type==="pipe")return U(o.in,n)||U(o.out,n);if(o.type==="object"){for(const s in o.shape)if(U(o.shape[s],n))return!0;return!1}if(o.type==="union"){for(const s of o.options)if(U(s,n))return!0;return!1}if(o.type==="tuple"){for(const s of o.items)if(U(s,n))return!0;return!!(o.rest&&U(o.rest,n))}return!1}const $i=(e,t={})=>n=>{const o=hn({...n,processors:t});return N(e,o),gn(o,e),vn(o,e)},Me=(e,t,n={})=>o=>{const{libraryOptions:s,target:r}=o??{},i=hn({...s??{},target:r,io:t,processors:n});return N(e,i),gn(i,e),vn(i,e)},Di={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zi=(e,t,n,o)=>{const s=n;s.type="string";const{minimum:r,maximum:i,format:a,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof r=="number"&&(s.minLength=r),typeof i=="number"&&(s.maxLength=i),a&&(s.format=Di[a]??a,s.format===""&&delete s.format,a==="time"&&delete s.format),d&&(s.contentEncoding=d),l&&l.size>0){const u=[...l];u.length===1?s.pattern=u[0].source:u.length>1&&(s.allOf=[...u.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Li=(e,t,n,o)=>{const s=n,{minimum:r,maximum:i,format:a,multipleOf:l,exclusiveMaximum:d,exclusiveMinimum:u}=e._zod.bag;typeof a=="string"&&a.includes("int")?s.type="integer":s.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u),typeof r=="number"&&(s.minimum=r,typeof u=="number"&&t.target!=="draft-04"&&(u>=r?delete s.minimum:delete s.exclusiveMinimum)),typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=d,s.exclusiveMaximum=!0):s.exclusiveMaximum=d),typeof i=="number"&&(s.maximum=i,typeof d=="number"&&t.target!=="draft-04"&&(d<=i?delete s.maximum:delete s.exclusiveMaximum)),typeof l=="number"&&(s.multipleOf=l)},Gi=(e,t,n,o)=>{n.type="boolean"},Ui=(e,t,n,o)=>{n.not={}},qi=(e,t,n,o)=>{},Hi=(e,t,n,o)=>{const s=e._zod.def,r=jt(s.entries);r.every(i=>typeof i=="number")&&(n.type="number"),r.every(i=>typeof i=="string")&&(n.type="string"),n.enum=r},Bi=(e,t,n,o)=>{const s=e._zod.def,r=[];for(const i of s.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(i))}else r.push(i);if(r.length!==0)if(r.length===1){const i=r[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else r.every(i=>typeof i=="number")&&(n.type="number"),r.every(i=>typeof i=="string")&&(n.type="string"),r.every(i=>typeof i=="boolean")&&(n.type="boolean"),r.every(i=>i===null)&&(n.type="null"),n.enum=r},Wi=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Vi=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ji=(e,t,n,o)=>{const s=n,r=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(s.minItems=i),typeof a=="number"&&(s.maxItems=a),s.type="array",s.items=N(r.element,t,{...o,path:[...o.path,"items"]})},Ki=(e,t,n,o)=>{var d;const s=n,r=e._zod.def;s.type="object",s.properties={};const i=r.shape;for(const u in i)s.properties[u]=N(i[u],t,{...o,path:[...o.path,"properties",u]});const a=new Set(Object.keys(i)),l=new Set([...a].filter(u=>{const m=r.shape[u]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));l.size>0&&(s.required=Array.from(l)),((d=r.catchall)==null?void 0:d._zod.def.type)==="never"?s.additionalProperties=!1:r.catchall?r.catchall&&(s.additionalProperties=N(r.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},Qi=(e,t,n,o)=>{const s=e._zod.def,r=s.inclusive===!1,i=s.options.map((a,l)=>N(a,t,{...o,path:[...o.path,r?"oneOf":"anyOf",l]}));r?n.oneOf=i:n.anyOf=i},Yi=(e,t,n,o)=>{const s=e._zod.def,r=N(s.left,t,{...o,path:[...o.path,"allOf",0]}),i=N(s.right,t,{...o,path:[...o.path,"allOf",1]}),a=d=>"allOf"in d&&Object.keys(d).length===1,l=[...a(r)?r.allOf:[r],...a(i)?i.allOf:[i]];n.allOf=l},Xi=(e,t,n,o)=>{const s=n,r=e._zod.def;s.type="object";const i=r.keyType,a=i._zod.bag,l=a==null?void 0:a.patterns;if(r.mode==="loose"&&l&&l.size>0){const u=N(r.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(const m of l)s.patternProperties[m.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=N(r.keyType,t,{...o,path:[...o.path,"propertyNames"]})),s.additionalProperties=N(r.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const d=i._zod.values;if(d){const u=[...d].filter(m=>typeof m=="string"||typeof m=="number");u.length>0&&(s.required=u)}},ea=(e,t,n,o)=>{const s=e._zod.def,r=N(s.innerType,t,o),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=s.innerType,n.nullable=!0):n.anyOf=[r,{type:"null"}]},ta=(e,t,n,o)=>{const s=e._zod.def;N(s.innerType,t,o);const r=t.seen.get(e);r.ref=s.innerType},na=(e,t,n,o)=>{const s=e._zod.def;N(s.innerType,t,o);const r=t.seen.get(e);r.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},oa=(e,t,n,o)=>{const s=e._zod.def;N(s.innerType,t,o);const r=t.seen.get(e);r.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},sa=(e,t,n,o)=>{const s=e._zod.def;N(s.innerType,t,o);const r=t.seen.get(e);r.ref=s.innerType;let i;try{i=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},ra=(e,t,n,o)=>{const s=e._zod.def,r=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;N(r,t,o);const i=t.seen.get(e);i.ref=r},ia=(e,t,n,o)=>{const s=e._zod.def;N(s.innerType,t,o);const r=t.seen.get(e);r.ref=s.innerType,n.readOnly=!0},yn=(e,t,n,o)=>{const s=e._zod.def;N(s.innerType,t,o);const r=t.seen.get(e);r.ref=s.innerType},aa=f("ZodISODateTime",(e,t)=>{dr.init(e,t),z.init(e,t)});function kn(e){return fi(aa,e)}const ca=f("ZodISODate",(e,t)=>{ur.init(e,t),z.init(e,t)});function la(e){return hi(ca,e)}const da=f("ZodISOTime",(e,t)=>{pr.init(e,t),z.init(e,t)});function ua(e){return gi(da,e)}const pa=f("ZodISODuration",(e,t)=>{mr.init(e,t),z.init(e,t)});function ma(e){return vi(pa,e)}const K=f("ZodError",(e,t)=>{Mt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>os(e,n)},flatten:{value:n=>ns(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ye,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ye,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),fa=nt(K),ha=ot(K),ga=je(K),va=Pe(K),ya=is(K),ka=as(K),ba=cs(K),_a=ls(K),Sa=ds(K),wa=us(K),Ta=ps(K),Ia=ms(K),F=f("ZodType",(e,t)=>(O.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Me(e,"input"),output:Me(e,"output")}}),e.toJSONSchema=$i(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(oe(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>se(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>fa(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>ga(e,n,o),e.parseAsync=async(n,o)=>ha(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>va(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>ya(e,n,o),e.decode=(n,o)=>ka(e,n,o),e.encodeAsync=async(n,o)=>ba(e,n,o),e.decodeAsync=async(n,o)=>_a(e,n,o),e.safeEncode=(n,o)=>Sa(e,n,o),e.safeDecode=(n,o)=>wa(e,n,o),e.safeEncodeAsync=async(n,o)=>Ta(e,n,o),e.safeDecodeAsync=async(n,o)=>Ia(e,n,o),e.refine=(n,o)=>e.check(kc(n,o)),e.superRefine=n=>e.check(bc(n)),e.overwrite=n=>e.check(ve(n)),e.optional=()=>Cn(e),e.exactOptional=()=>ic(e),e.nullable=()=>En(e),e.nullish=()=>Cn(En(e)),e.nonoptional=n=>pc(e,n),e.array=()=>S(e),e.or=n=>X([e,n]),e.and=n=>ec(e,n),e.transform=n=>Pn(e,sc(n)),e.default=n=>lc(e,n),e.prefault=n=>uc(e,n),e.catch=n=>fc(e,n),e.pipe=n=>Pn(e,n),e.readonly=()=>vc(e),e.describe=n=>{const o=e.clone();return we.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){var n;return(n=we.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return we.get(e);const o=e.clone();return we.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),bn=f("_ZodString",(e,t)=>{st.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,s,r)=>Zi(e,o,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(wi(...o)),e.includes=(...o)=>e.check(xi(...o)),e.startsWith=(...o)=>e.check(Ci(...o)),e.endsWith=(...o)=>e.check(Ei(...o)),e.min=(...o)=>e.check(ze(...o)),e.max=(...o)=>e.check(mn(...o)),e.length=(...o)=>e.check(fn(...o)),e.nonempty=(...o)=>e.check(ze(1,...o)),e.lowercase=o=>e.check(Ti(o)),e.uppercase=o=>e.check(Ii(o)),e.trim=()=>e.check(Pi()),e.normalize=(...o)=>e.check(ji(...o)),e.toLowerCase=()=>e.check(Ai()),e.toUpperCase=()=>e.check(Oi()),e.slugify=()=>e.check(Fi())}),xa=f("ZodString",(e,t)=>{st.init(e,t),bn.init(e,t),e.email=n=>e.check(Jr(Ca,n)),e.url=n=>e.check(ln(Sn,n)),e.jwt=n=>e.check(mi(qa,n)),e.emoji=n=>e.check(Xr(Pa,n)),e.guid=n=>e.check(an(_n,n)),e.uuid=n=>e.check(cn(Te,n)),e.uuidv4=n=>e.check(Kr(Te,n)),e.uuidv6=n=>e.check(Qr(Te,n)),e.uuidv7=n=>e.check(Yr(Te,n)),e.nanoid=n=>e.check(ei(Aa,n)),e.guid=n=>e.check(an(_n,n)),e.cuid=n=>e.check(ti(Oa,n)),e.cuid2=n=>e.check(ni(Fa,n)),e.ulid=n=>e.check(oi(za,n)),e.base64=n=>e.check(di(La,n)),e.base64url=n=>e.check(ui(Ga,n)),e.xid=n=>e.check(si(Ma,n)),e.ksuid=n=>e.check(ri(Ra,n)),e.ipv4=n=>e.check(ii(Na,n)),e.ipv6=n=>e.check(ai($a,n)),e.cidrv4=n=>e.check(ci(Da,n)),e.cidrv6=n=>e.check(li(Za,n)),e.e164=n=>e.check(pi(Ua,n)),e.datetime=n=>e.check(kn(n)),e.date=n=>e.check(la(n)),e.time=n=>e.check(ua(n)),e.duration=n=>e.check(ma(n))});function c(e){return Vr(xa,e)}const z=f("ZodStringFormat",(e,t)=>{A.init(e,t),bn.init(e,t)}),Ca=f("ZodEmail",(e,t)=>{tr.init(e,t),z.init(e,t)}),_n=f("ZodGUID",(e,t)=>{Xs.init(e,t),z.init(e,t)}),Te=f("ZodUUID",(e,t)=>{er.init(e,t),z.init(e,t)});function Ea(e){return cn(Te,e)}const Sn=f("ZodURL",(e,t)=>{nr.init(e,t),z.init(e,t)});function ja(e){return ln(Sn,e)}const Pa=f("ZodEmoji",(e,t)=>{or.init(e,t),z.init(e,t)}),Aa=f("ZodNanoID",(e,t)=>{sr.init(e,t),z.init(e,t)}),Oa=f("ZodCUID",(e,t)=>{rr.init(e,t),z.init(e,t)}),Fa=f("ZodCUID2",(e,t)=>{ir.init(e,t),z.init(e,t)}),za=f("ZodULID",(e,t)=>{ar.init(e,t),z.init(e,t)}),Ma=f("ZodXID",(e,t)=>{cr.init(e,t),z.init(e,t)}),Ra=f("ZodKSUID",(e,t)=>{lr.init(e,t),z.init(e,t)}),Na=f("ZodIPv4",(e,t)=>{fr.init(e,t),z.init(e,t)}),$a=f("ZodIPv6",(e,t)=>{hr.init(e,t),z.init(e,t)}),Da=f("ZodCIDRv4",(e,t)=>{gr.init(e,t),z.init(e,t)}),Za=f("ZodCIDRv6",(e,t)=>{vr.init(e,t),z.init(e,t)}),La=f("ZodBase64",(e,t)=>{yr.init(e,t),z.init(e,t)}),Ga=f("ZodBase64URL",(e,t)=>{br.init(e,t),z.init(e,t)}),Ua=f("ZodE164",(e,t)=>{_r.init(e,t),z.init(e,t)}),qa=f("ZodJWT",(e,t)=>{wr.init(e,t),z.init(e,t)}),wn=f("ZodNumber",(e,t)=>{Bt.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,s,r)=>Li(e,o,s),e.gt=(o,s)=>e.check(un(o,s)),e.gte=(o,s)=>e.check(at(o,s)),e.min=(o,s)=>e.check(at(o,s)),e.lt=(o,s)=>e.check(dn(o,s)),e.lte=(o,s)=>e.check(it(o,s)),e.max=(o,s)=>e.check(it(o,s)),e.int=o=>e.check(Tn(o)),e.safe=o=>e.check(Tn(o)),e.positive=o=>e.check(un(0,o)),e.nonnegative=o=>e.check(at(0,o)),e.negative=o=>e.check(dn(0,o)),e.nonpositive=o=>e.check(it(0,o)),e.multipleOf=(o,s)=>e.check(pn(o,s)),e.step=(o,s)=>e.check(pn(o,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function h(e){return yi(wn,e)}const Ha=f("ZodNumberFormat",(e,t)=>{Tr.init(e,t),wn.init(e,t)});function Tn(e){return ki(Ha,e)}const Ba=f("ZodBoolean",(e,t)=>{Ir.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Gi(e,n,o)});function M(e){return bi(Ba,e)}const Wa=f("ZodUnknown",(e,t)=>{xr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>qi()});function j(){return _i(Wa)}const Va=f("ZodNever",(e,t)=>{Cr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Ui(e,n,o)});function Ja(e){return Si(Va,e)}const Ka=f("ZodArray",(e,t)=>{Er.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Ji(e,n,o,s),e.element=t.element,e.min=(n,o)=>e.check(ze(n,o)),e.nonempty=n=>e.check(ze(1,n)),e.max=(n,o)=>e.check(mn(n,o)),e.length=(n,o)=>e.check(fn(n,o)),e.unwrap=()=>e.element});function S(e,t){return zi(Ka,e,t)}const Qa=f("ZodObject",(e,t)=>{Pr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Ki(e,n,o,s),E(e,"shape",()=>t.shape),e.keyof=()=>P(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:j()}),e.loose=()=>e.clone({...e._zod.def,catchall:j()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ja()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Qo(e,n),e.safeExtend=n=>Yo(e,n),e.merge=n=>Xo(e,n),e.pick=n=>Jo(e,n),e.omit=n=>Ko(e,n),e.partial=(...n)=>es(xn,e,n[0]),e.required=(...n)=>ts(jn,e,n[0])});function p(e,t){const n={type:"object",shape:e??{},...b(t)};return new Qa(n)}const In=f("ZodUnion",(e,t)=>{Qt.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Qi(e,n,o,s),e.options=t.options});function X(e,t){return new In({type:"union",options:e,...b(t)})}const Ya=f("ZodDiscriminatedUnion",(e,t)=>{In.init(e,t),Ar.init(e,t)});function ie(e,t,n){return new Ya({type:"union",options:t,discriminator:e,...b(n)})}const Xa=f("ZodIntersection",(e,t)=>{Or.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Yi(e,n,o,s)});function ec(e,t){return new Xa({type:"intersection",left:e,right:t})}const tc=f("ZodRecord",(e,t)=>{Fr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Xi(e,n,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function Ie(e,t,n){return new tc({type:"record",keyType:e,valueType:t,...b(n)})}const ct=f("ZodEnum",(e,t)=>{zr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,s,r)=>Hi(e,o,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(o,s)=>{const r={};for(const i of o)if(n.has(i))r[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ct({...t,checks:[],...b(s),entries:r})},e.exclude=(o,s)=>{const r={...t.entries};for(const i of o)if(n.has(i))delete r[i];else throw new Error(`Key ${i} not found in enum`);return new ct({...t,checks:[],...b(s),entries:r})}});function P(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ct({type:"enum",entries:n,...b(t)})}const nc=f("ZodLiteral",(e,t)=>{Mr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Bi(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function v(e,t){return new nc({type:"literal",values:Array.isArray(e)?e:[e],...b(t)})}const oc=f("ZodTransform",(e,t)=>{Rr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Vi(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ct(e.constructor.name);n.addIssue=r=>{if(typeof r=="string")n.issues.push(Se(r,n.value,t));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Se(i))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(r=>(n.value=r,n)):(n.value=s,n)}});function sc(e){return new oc({type:"transform",transform:e})}const xn=f("ZodOptional",(e,t)=>{en.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>yn(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function Cn(e){return new xn({type:"optional",innerType:e})}const rc=f("ZodExactOptional",(e,t)=>{Nr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>yn(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function ic(e){return new rc({type:"optional",innerType:e})}const ac=f("ZodNullable",(e,t)=>{$r.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>ea(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function En(e){return new ac({type:"nullable",innerType:e})}const cc=f("ZodDefault",(e,t)=>{Dr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>na(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lc(e,t){return new cc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ft(t)}})}const dc=f("ZodPrefault",(e,t)=>{Zr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>oa(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function uc(e,t){return new dc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ft(t)}})}const jn=f("ZodNonOptional",(e,t)=>{Lr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>ta(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function pc(e,t){return new jn({type:"nonoptional",innerType:e,...b(t)})}const mc=f("ZodCatch",(e,t)=>{Gr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>sa(e,n,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fc(e,t){return new mc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const hc=f("ZodPipe",(e,t)=>{Ur.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>ra(e,n,o,s),e.in=t.in,e.out=t.out});function Pn(e,t){return new hc({type:"pipe",in:e,out:t})}const gc=f("ZodReadonly",(e,t)=>{qr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>ia(e,n,o,s),e.unwrap=()=>e._zod.def.innerType});function vc(e){return new gc({type:"readonly",innerType:e})}const yc=f("ZodCustom",(e,t)=>{Hr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Wi(e,n)});function kc(e,t={}){return Mi(yc,e,t)}function bc(e){return Ri(e)}const _c="security-client-audit-v1",An=1,Sc="client-key-p256-v1",$=e=>c().trim().min(1).max(e),D=e=>$(e).optional(),lt=e=>c().min(1).max(e).regex(/^[A-Za-z0-9_-]+$/),Re=c().regex(/^[A-Za-z0-9_-]{43}$/),On=kn({offset:!0});P(["android-native","web","desktop-macos","desktop-windows","desktop-linux","ios-native"]);const wc=P(["phone","tablet","foldable","desktop","laptop","browser","tv","wearable","automotive","virtual","unknown"]),Tc=P(["continuity-key","android-key-attestation","play-integrity","webauthn","platform-keystore"]),Ne={installationId:$(128),deviceClass:wc,deviceName:D(160),appName:$(128),appVersion:$(128),appBuild:h().int().min(0).max(Number.MAX_SAFE_INTEGER).optional(),buildChannel:D(128),locale:D(64),languages:S($(64)).max(16).optional(),timeZone:D(128),supportedProofs:S(Tc).max(8)},Fn=p({...Ne,manufacturer:D(128),brand:D(128),model:D(160),product:D(160),androidIdDigest:Re.optional(),osName:v("Android"),osVersion:$(128),osApiLevel:h().int().min(1).max(1e4),osBuildFingerprint:D(1024),securityPatch:D(64),packageName:$(256),installerSource:D(256),signingCertificateDigest:Re.optional(),firstInstallAt:On.optional(),lastUpdateAt:On.optional()}).strict(),Ic=p({brand:$(128),version:$(64)}).strict(),zn=p({...Ne,origin:ja().max(2048),userAgent:$(1024),browserBrands:S(Ic).max(16).optional(),platform:D(256),platformVersion:D(128),architecture:D(64),bitness:D(32),mobile:M().optional(),screenWidth:h().int().min(1).max(1e5).optional(),screenHeight:h().int().min(1).max(1e5).optional(),devicePixelRatio:h().positive().max(100).optional(),maxTouchPoints:h().int().min(0).max(100).optional(),hardwareConcurrency:h().int().min(1).max(4096).optional(),deviceMemoryGiB:h().positive().max(4096).optional()}).strict(),$e=p({...Ne,osName:$(64),osVersion:$(128),osArchitecture:D(64),packageName:D(256),signingCertificateDigest:Re.optional()}).strict(),Mn=p({...Ne,manufacturer:v("Apple"),model:D(160),systemName:P(["iOS","iPadOS"]),osVersion:$(128),packageName:$(256),signingCertificateDigest:Re.optional()}).strict(),xc=X([Fn,zn,$e,Mn]),Cc=p({protocol:v(Sc),publicKeySpki:lt(1024),signature:lt(512),reportedStorage:P(["android-keystore","webcrypto-indexeddb","tauri-webcrypto","ios-keychain","platform-keystore"])}).strict(),ye={requestId:Ea(),label:$(160),descriptorVersion:v(An),key:Cc};ie("kind",[p({...ye,kind:v("android-native"),descriptor:Fn}).strict(),p({...ye,kind:v("web"),descriptor:zn}).strict(),p({...ye,kind:v("desktop-macos"),descriptor:$e}).strict(),p({...ye,kind:v("desktop-windows"),descriptor:$e}).strict(),p({...ye,kind:v("desktop-linux"),descriptor:$e}).strict(),p({...ye,kind:v("ios-native"),descriptor:Mn}).strict()]),p({descriptorVersion:v(An),descriptor:xc,signature:lt(512)}).strict(),p({ownerLabel:$(160).nullable()}).strict(),P(["authenticated-session","client-key-verified","hardware-attested","platform-attested"]),p({subscriptionId:$(256),sendSecret:$(512),privacyMode:v("generic")}).strict();const Ec=new Set(["ts","tsx","js","jsx","mjs","cjs","mts","cts","html","htm","css","scss","sass","less","vue","svelte","json","yaml","yml","toml","xml","csv","env","md","mdx","qmd","txt","rst","py","pyi","pyx","ipynb","rb","erb","rake","go","mod","sum","rs","toml","java","kt","kts","gradle","c","h","cpp","hpp","cc","cxx","hxx","sh","bash","zsh","fish","sql","graphql","gql","proto","swift","php","lua","vim","el","ex","exs","erl","hrl","hs","lhs","ml","mli","fs","fsx","fsi","clj","cljs","cljc","edn","scala","sbt","r","R","rmd","jl","pl","pm","t","dart","zig","nim","cr","v","tf","tfvars","dockerfile","makefile","cmake","lock","log"]),jc=new Set(["Dockerfile","Makefile","CMakeLists.txt","Rakefile","Gemfile","Procfile","Vagrantfile",".gitignore",".gitattributes",".npmrc",".nvmrc",".prettierrc",".eslintrc",".editorconfig","package.json","tsconfig.json","jsconfig.json","biome.json","vitest.config.ts","vite.config.ts","webpack.config.js","rollup.config.js","babel.config.js","jest.config.js","tailwind.config.js","postcss.config.js","next.config.js","nuxt.config.js","svelte.config.js","astro.config.mjs","README.md","CLAUDE.md","LICENSE","CHANGELOG.md","CONTRIBUTING.md","pnpm-lock.yaml","yarn.lock","package-lock.json","Cargo.toml","Cargo.lock","go.mod","go.sum","requirements.txt","setup.py","pyproject.toml","poetry.lock","Pipfile","Pipfile.lock"]),Pc=new RegExp("(?<!\\S)(?:\\.{0,2}\\/)?(?:[a-zA-Z0-9_@-]+\\/)*[a-zA-Z0-9_.-]+\\.[a-zA-Z0-9]+(?::\\d+(?::\\d+)?)?(?!\\S)|(?<!\\S)\\/(?:[a-zA-Z0-9_@.-]+\\/)+[a-zA-Z0-9_.-]+(?::\\d+(?::\\d+)?)?(?!\\S)","g");function Ac(e){return/^(?:https?|file|ftp|mailto|tel|data):/.test(e.toLowerCase())}function Oc(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Fc(e){if(Ac(e)||Oc(e)||e.includes("://"))return!1;const n=e.replace(/:\d+(?::\d+)?$/,"").split("/"),o=n[n.length-1]??"";if(o&&jc.has(o))return!0;const s=o.match(/\.([a-zA-Z0-9]+)$/);if(s!=null&&s[1]){const r=s[1].toLowerCase();if(Ec.has(r))return!0}if(n.length>=2&&o&&/^[a-zA-Z0-9_.-]+$/.test(o)){const r=["src","lib","test","tests","spec","app","components","pages","api","routes","utils","hooks","styles","assets","public","static","dist","build","node_modules","packages"];if(n.some(i=>r.includes(i)))return!0}return!1}function zc(e){const t=e.match(/^(.+?):(\d+)(?::(\d+))?$/);return t!=null&&t[1]&&t[2]?{path:t[1],line:Number.parseInt(t[2],10),column:t[3]?Number.parseInt(t[3],10):void 0}:{path:e}}function Mc(e){const t=[],n=new RegExp(Pc.source,"g");for(let o=n.exec(e);o!==null;o=n.exec(e)){const s=o[0];if(!Fc(s))continue;const{path:r,line:i,column:a}=zc(s);t.push({match:s,filePath:r,lineNumber:i,columnNumber:a,startIndex:o.index,endIndex:o.index+s.length})}return t}const De=/(?:https?:\/\/|www\.)[^\s<>]+/gi,Rc=new Set([".",",",":",";","!","?","'",'"',"`","*","_","~"]),Nc={")":"(","]":"[","}":"{"};function Rn(e,t){let n=0;for(const o of e)o===t&&(n+=1);return n}function $c(e){let t=e;for(;;){const n=t[t.length-1];if(n===void 0)break;if(Rc.has(n)){t=t.slice(0,-1);continue}const o=Nc[n];if(o){const s=t.slice(0,-1);if(Rn(s,o)>Rn(s,n))break;t=t.slice(0,-1);continue}break}return t}function Dc(e){const t=e.startsWith("www.")?`https://${e}`:e;try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"||!n.hostname.includes(".")?null:t}catch{return null}}function Zc(e,t){const n=[];let o=0;De.lastIndex=0;for(let s=De.exec(e);s!==null;s=De.exec(e)){const r=$c(s[0]),i=Dc(r),a=s.index+r.length,l=(t==null?void 0:t.suppressTrailingUrl)===!0;!i||l||(s.index>o&&n.push({type:"text",text:e.slice(o,s.index)}),n.push({type:"url",text:r,href:i}),o=a,De.lastIndex=a)}return o<e.length&&n.push({type:"text",text:e.slice(o)}),n}const Lc=["claude"];new Set(Lc);const g={voiceInput:{id:0},deviceBridgeAvailable:{id:1},deviceBridge:{id:2},deviceBridgeDownload:{id:3},deviceBridgeUpdate:{id:4},browserSettingsBackup:{id:5},securityClientAudit:{id:6},reloadSafeCodexRuntime:{id:7},sessionSandboxing:{id:8},publicShareManagement:{id:9},glossaryTooltips:{id:10},progressiveSessionCatalog:{id:11},projectDirectoryStoragePolicy:{id:12},idleReapHoursSetting:{id:13},toolResultMediaPreservationPolicy:{id:14},gitDirtyFileEditor:{id:15},gitSourceReview:{id:16},gitSourceReviewSubmissions:{id:17},gitSourceReviewProjections:{id:18},claudeGateway:{id:19},claudeGatewayAutostart:{id:20},claudeGatewayDisableAgent:{id:21},providerSubscriptionUsage:{id:22},reloadSafeCodexRuntimeSettings:{id:23},hostAgentProcessObservability:{id:24},sessionSandboxingStatus:{id:25},projectSessionDefaults:{id:26},sidebarSessionResume:{id:27},sessionForkTurnIntents:{id:28},gitFileDiffProjections:{id:29},providerHostControl:{id:30},remoteBrowserDiagnostics:{id:31},publicShareManagementFreeze:{id:32},syntheticDoneCommand:{id:33},subagentMaxDepthSetting:{id:34},codexReasoningSummarySetting:{id:35},claudeGatewayDisablePlanMode:{id:36},syntheticArchiveCommand:{id:37},gitWorkingTreeFiles:{id:38},gitIncomingCommits:{id:39},gitInclusiveToHead:{id:40},gitWorkingTreeSections:{id:41},gitWorkingTreeCompleteScan:{id:42},cacheMissBillingIgnoreAfter:{id:43},gitLiveWorktreeSetting:{id:44},syntheticTerminateCommand:{id:45},projectCodeNames:{id:46},gitFileRevision:{id:47},codexStreamDurableIdAlignment:{id:48},cacheMissBillingExpectedExpiry:{id:49},attachmentOnlySessionMessages:{id:50},publicFileShares:{id:51},sessionSandboxNetworkFirewall:{id:52},codexPlanToolSetting:{id:53},codexPaginatedRolloutLineage:{id:54},projectQueueAttachmentEditing:{id:55},projectFileCompletion:{id:56},sessionConversationContext:{id:57},turnEffortModifiers:{id:58},artifactViewer:{id:59},sessionAsyncQuestions:{id:60},nonHumanUserTurn:{id:72},sessionContentSearch:{id:73},speechBackendSetup:{id:74},vhostAppControl:{id:75},vhostBearerAccess:{id:76},projectQueueReadinessCheck:{id:61},acliCommentaryRendering:{id:62},retainedSessionCollections:{id:63},localSpeechModelSelection:{id:64},speechVocabulary:{id:65},speechVocabularySessionTerms:{id:66},experimentalConversation:{id:69},issueSessionAssociations:{id:68},computerControl:{id:70},computerControlReleases:{id:71},codexCyberAccessProgramSetting:{id:67},claudeGatewayServices:{id:77},sessionRewind:{id:78},projectCaptions:{id:79},projectNames:{id:80},projectTemplateSources:{id:81},fileSourceEditing:{id:82}},Gc="public-share-session-chunks-v1",Q={voiceInput:{index:g.voiceInput.id},deviceBridgeAvailable:{index:g.deviceBridgeAvailable.id},deviceBridge:{index:g.deviceBridge.id},deviceBridgeDownload:{index:g.deviceBridgeDownload.id},deviceBridgeUpdate:{index:g.deviceBridgeUpdate.id},browserSettingsBackup:{index:g.browserSettingsBackup.id},securityClientAudit:{index:g.securityClientAudit.id},reloadSafeCodexRuntime:{index:g.reloadSafeCodexRuntime.id},sessionSandboxing:{index:g.sessionSandboxing.id},providerHostControl:{index:g.providerHostControl.id},gitWorkingTreeSections:{index:g.gitWorkingTreeSections.id},gitWorkingTreeCompleteScan:{index:g.gitWorkingTreeCompleteScan.id}},Uc={fileSourceEditing:{id:g.fileSourceEditing.id,name:"file-source-editing",kind:"permanent",area:"localAccess",introducedIn:"0.9.1",advertisement:{kind:"version-implied"},description:"Read bounded original sources, save explicit revision-checked edits, including artifact source references, and run an artifact's approved rebuild hook.",clientFallback:"Hide Edit and make no file-edit requests; retain read and comment views.",serverContract:{routes:["GET /api/file-edit","PUT /api/file-edit","POST /api/file-edit/rebuild"],routeModules:["packages/server/src/routes/file-edit.ts"]},lifecycle:{kind:"permanent",reason:"Older servers do not provide conditional source writes."}},projectTemplateSources:{id:g.projectTemplateSources.id,name:"project-template-sources",kind:"permanent",area:"settings",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Configure ordered GitHub and local template sources, retrieve pinned content, and inspect combined inventory without running setup.",clientFallback:"Hide Project templates settings and send no template-source requests.",serverContract:{routes:["GET /api/project-template-source","PUT /api/project-template-source"],routeModules:["packages/server/src/routes/project-template-source.ts"]},lifecycle:{kind:"permanent",reason:"Older servers have no template source retrieval or configuration surface."}},speechBackendSetup:{id:g.speechBackendSetup.id,name:"speech-backend-setup",kind:"permanent",area:"speech",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Persist local STT backends in server settings, install pixi runtimes and model weights, and request a safe YA restart.",clientFallback:"Hide the Speech backends enable/install table and make no setup, install, or speech-restart requests.",serverContract:{routes:["GET /api/settings","PUT /api/settings","GET /api/speech/backends","POST /api/speech/backends/:id/install","POST /api/speech/backends/restart"],requestFields:["speechVoiceBackends"],responseFields:["settings.speechVoiceBackends"]},lifecycle:{kind:"permanent",reason:"Older servers only enable local STT from YEP_VOICE_BACKENDS and have no install or settings-union routes."}},sessionContentSearch:{id:g.sessionContentSearch.id,name:"session-content-search",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Bounded, progressive search of visible session turn text.",clientFallback:"Keep title-only search; disable turn fields with upgrade guidance and send no content-search requests.",serverContract:{routes:["POST /api/sessions/content-search"],routeModules:["packages/server/src/routes/session-content-search.ts"],requestFields:["sessionId","query","roles","after","before","cursor"],responseFields:["matches","cursor","done","partial","unavailable","bytesRead"]},lifecycle:{kind:"permanent",reason:"Older servers have no bounded transcript-search endpoint."}},computerControlReleases:{id:g.computerControlReleases.id,name:"computer-control-releases",kind:"permanent",area:"settings",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.computerControlReleases.id},description:"Verified Machine Control release downloads and managed updates.",clientFallback:"Show server-update guidance; send no release-management requests.",serverContract:{routes:["POST /api/computer-control/releases/check","POST /api/computer-control/releases/update","PUT /api/computer-control/releases/enabled","PUT /api/computer-control/releases/automatic"],routeModules:["packages/server/src/routes/computer-control-releases.ts"],responseFields:["release"]},lifecycle:{kind:"permanent",reason:"Optional managed Windows component."}},computerControl:{id:g.computerControl.id,name:"optional-computer-control",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.computerControl.id},description:"Operator-managed signed Windows preview and explicit local Codex session grants.",clientFallback:"Hide computer controls and send no computer-control requests or launch fields.",serverContract:{routes:["GET /api/computer-control","PUT /api/computer-control/settings","POST /api/computer-control/install","POST /api/computer-control/stop","DELETE /api/computer-control/installation","DELETE /api/computer-control/sessions/:sessionId"],routeModules:["packages/server/src/routes/computer-control.ts"],requestFields:["computerControl"]},lifecycle:{kind:"permanent",reason:"Experimental Windows-only optional component."}},experimentalConversation:{id:g.experimentalConversation.id,name:"experimental-simple-client-conversation",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.experimentalConversation.id},description:"Experimental bounded Conversation reads and snapshot subscriptions with an exact schema revision.",clientFallback:"Show this source as update-required and offer its existing full client; send no experimental requests.",serverContract:{routes:["GET /api/experimental/conversation","GET /api/experimental/conversation/subscribe"],requestFields:["apiRevision","subscriptionId","sessionId","maxMessages","anchorMessageId","query"],responseFields:["experimentalSimpleClientApiRevision"],events:["snapshot","closed"]},lifecycle:{kind:"permanent",reason:"The allocation remains reserved when the experimental API is promoted or retired."}},issueSessionAssociations:{id:g.issueSessionAssociations.id,name:"issue-session-associations-v1",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.issueSessionAssociations.id},description:"Opt-in automatic issue/PR discovery, scoped search, durable evidence and corrections with ready SQLite.",clientFallback:"Hide issue controls and send no issue requests.",serverContract:{routes:["GET /api/issues","GET /api/issues/settings","PUT /api/issues/settings","GET /api/issues/credentials","PUT /api/issues/credentials","GET /api/issues/evidence","GET /api/issues/sessions","POST /api/issues/confirm","POST /api/issues/decision","POST /api/issues/resolve","PATCH /api/issues/item","DELETE /api/issues/item"],routeModules:["packages/server/src/routes/issues.ts"]},lifecycle:{kind:"permanent",reason:"Experimental feature depends on optional SQLite availability."}},speechVocabularySessionTerms:{id:g.speechVocabularySessionTerms.id,name:"speech-vocabulary-session-terms",kind:"permanent",area:"speech",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.speechVocabularySessionTerms.id},description:"Bias learned speech keyterms toward a supplied active-session term set when SQLite is ready.",clientFallback:"Omit context.sessionTerms and preserve existing speech recognition.",serverContract:{routes:["POST /api/speech/transcribe","GET /api/speech/ws"],requestFields:["context.sessionTerms"]},lifecycle:{kind:"permanent",reason:"Learned vocabulary depends on ready SQLite storage."}},speechVocabulary:{id:g.speechVocabulary.id,name:"speech-vocabulary",kind:"permanent",area:"speech",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.speechVocabulary.id},description:"Persistent opt-in speech vocabulary learning and Grok biasing when SQLite is ready.",clientFallback:"Hide vocabulary controls and make no vocabulary requests.",serverContract:{routes:["GET /api/speech/vocabulary","PUT /api/speech/vocabulary","POST /api/speech/vocabulary/scan","POST /api/speech/vocabulary/reset"],routeModules:["packages/server/src/routes/speech-vocabulary.ts"]},lifecycle:{kind:"permanent",reason:"Vocabulary availability depends on server storage configuration and readiness."}},localSpeechModelSelection:{id:g.localSpeechModelSelection.id,name:"local-speech-model-selection",kind:"permanent",area:"speech",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Per-request Whisper model selection and unified English Parakeet on NeMo.",clientFallback:"Hide Whisper and recent Parakeet choices; retain older Parakeet requests without modifying saved preferences.",serverContract:{requestFields:["model"]},lifecycle:{kind:"permanent",reason:"Older servers ignore Whisper model overrides and lack the recent NeMo runtime."}},acliCommentaryRendering:{id:g.acliCommentaryRendering.id,name:"acli-commentary-rendering",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Bounded tool commentary rendering through the assistant Markdown path.",clientFallback:"Keep ordinary raw tool output and make no commentary rendering request.",serverContract:{routes:["POST /api/projects/:projectId/tool-commentary/render"],routeModules:["packages/server/src/routes/tool-commentary.ts"],requestFields:["texts"],responseFields:["html"]},lifecycle:{kind:"permanent",reason:"Older servers lack the commentary rendering endpoint."}},nonHumanUserTurn:{id:g.nonHumanUserTurn.id,name:"non-human-user-turn",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Durable cross-session user-turn attention and exact-turn acknowledgement.",clientFallback:"Hide delivery flags and make no delivery acknowledgement request.",serverContract:{requestFields:["messageMetadata.sourceSessionId","nonHumanUserTurnMessageId"],responseFields:["session.nonHumanUserTurn","inboxItem.nonHumanUserTurn"],events:["session-metadata-changed"]},lifecycle:{kind:"permanent",reason:"Older servers do not retain cross-session delivery provenance."}},sessionRewind:{id:g.sessionRewind.id,name:"session-rewind",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Same-session rewind (/clear N), turn-menu Clear entries, rewound-group history, /clearloop with its patience controls, and queued /clear and /clearloop Project Queue items.",clientFallback:"Hide the Clear menu entries, mark /clear N, /fork N, and /clearloop unavailable, make no rewind or clearloop request, and queue no YA-command Project Queue item.",serverContract:{routes:["POST /api/projects/:projectId/sessions/:sessionId/rewind","POST /api/projects/:projectId/sessions/:sessionId/clearloop","PATCH /api/projects/:projectId/sessions/:sessionId/clearloop","DELETE /api/projects/:projectId/sessions/:sessionId/clearloop"],responseFields:["deferredMessages[].clearloop","message.rewoundGroupId","settings.clearloopInactivitySeconds","projectQueue.items[].message.yaCommand"]},lifecycle:{kind:"permanent",reason:"In-place rewind is a server-owned provider operation with durable rewind records."}},sessionAsyncQuestions:{id:g.sessionAsyncQuestions.id,name:"session-async-questions",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Bounded recent async question previews on session collections and activity updates.",clientFallback:"Keep transcript question controls; omit cross-session counts and menus and make no new request.",serverContract:{responseFields:["session.asyncQuestions","inboxItem.asyncQuestions"],events:["session-updated"]},lifecycle:{kind:"permanent",reason:"Question discovery across sessions requires server-owned previews without loading every transcript in the browser."}},artifactViewer:{id:g.artifactViewer.id,name:"artifact-viewer",kind:"permanent",area:"remoteAccess",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.artifactViewer.id},description:"An explicitly configured isolated listener serves authorized interactive HTML directories.",clientFallback:"Retain source and scriptless preview; make no artifact grant request. Configuration is separately gated by version.artifactViewer metadata.",serverContract:{routes:["POST /api/artifacts","DELETE /api/artifacts/:id","PUT /api/artifacts/config"],routeModules:["packages/server/src/routes/artifacts.ts"],responseFields:["version.artifactViewer"]},lifecycle:{kind:"permanent",reason:"Artifact listener availability depends on explicit operator configuration."}},vhostBearerAccess:{id:g.vhostBearerAccess.id,name:"vhost-bearer-access",kind:"permanent",area:"remoteAccess",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.vhostBearerAccess.id},description:"Durable app-scoped bearer access with explicit public visibility and revocation.",clientFallback:"Show protection unavailable; omit public/revoke controls and make no app-link management request.",serverContract:{routes:["GET /api/artifacts/vhosts/links","POST /api/artifacts/vhosts/:name/revoke"],routeModules:["packages/server/src/routes/vhostAccess.ts"],responseFields:["version.artifactViewer.vhosts[].public"]},lifecycle:{kind:"permanent",reason:"Bearer enforcement and management must roll out together."}},vhostAppControl:{id:g.vhostAppControl.id,name:"vhost-app-control",kind:"permanent",area:"remoteAccess",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.vhostAppControl.id},description:"Identify and stop a configured local app listener on supported hosts.",clientFallback:"Hide Kill; keep viewer dismissal and links; make no listener or stop requests.",serverContract:{routes:["GET /api/artifacts/vhosts/:name/listener","POST /api/artifacts/vhosts/:name/stop"],routeModules:["packages/server/src/routes/vhostApps.ts"]},lifecycle:{kind:"permanent",reason:"Local listener identification varies by host support."}},publicShareSessionChunks:{name:Gc,kind:"permanent",area:"remoteAccess",introducedIn:"0.7.1",advertisement:{kind:"scoped"},description:"Secret-authorized metadata selects sequential pull transfer for one immutable frozen session: at most 256 chunks of 256 KiB, with 64 MiB compressed and decompressed ceilings.",clientFallback:"Use the existing one-response raw-json transfer through its 8 MiB relay cap for marked links, make no chunk request, and keep the combined response for unmarked links.",serverContract:{routes:["GET /public-api/shares/:secret/metadata","GET /public-api/shares/:secret/session-chunks"],responseFields:["publicShareMetadata.capabilities","publicShareMetadata.sessionChunks"]},lifecycle:{kind:"permanent",reason:"Hosted public viewers can outpace installed servers, and frozen sessions need a bounded relay path without changing legacy response semantics."}},publicShareManagement:{id:g.publicShareManagement.id,name:"public-share-management",kind:"permanent",area:"remoteAccess",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server exposes compact authenticated inventory and bearer-link revocation independently from public-share creation readiness.",clientFallback:"Hide global and direct management entries, preserve the browser context menu, and make no management request.",serverContract:{routes:["GET /api/public-shares","DELETE /api/public-shares/:shareId","POST /api/public-shares/revoke-all"],routeModules:["packages/server/src/routes/public-share-management.ts"],responseFields:["publicShares.items","publicShares.nextCursor","publicShares.totalCount"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers that lack compact inventory and one-link revocation routes."}},publicShareManagementFreeze:{id:g.publicShareManagementFreeze.id,name:"public-share-management-freeze",kind:"permanent",area:"remoteAccess",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server selectively converts an exact reviewed set of live public-link grants to frozen snapshots.",clientFallback:"Hide management freeze controls, retain inventory/copy/revocation, and make no selective-freeze request.",serverContract:{routes:["POST /api/public-shares/freeze-live"],routeModules:["packages/server/src/routes/public-share-management-freeze.ts"],requestFields:["publicShareManagementFreeze.shareIds","publicShareManagementFreeze.confirmation"],responseFields:["publicShareManagementFreeze.convertedCount","publicShareManagementFreeze.cleanupPending"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace source and installed servers whose management surface supports revocation but not exact live-link freezing."}},publicFileShares:{id:g.publicFileShares.id,name:"public-file-shares",kind:"permanent",area:"remoteAccess",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server creates, lists, and revokes live bearer-link grants for one project file and its bounded render assets.",clientFallback:"Hide file-share controls and make no public-file-share request.",serverContract:{routes:["GET /api/public-file-shares","POST /api/public-file-shares","DELETE /api/public-file-shares/:shareId"],routeModules:["packages/server/src/routes/public-file-shares.ts"],requestFields:["publicFileShare.projectId","publicFileShare.path","publicFileShare.title"],responseFields:["publicFileShares.items","publicFileShare.url","publicFileShare.shareId"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers that have session shares but no standalone file-grant registry."}},glossaryTooltips:{id:g.glossaryTooltips.id,name:"glossary-tooltips",kind:"permanent",area:"rendering",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server resolves governing project glossaries, returns compiled phrase automata, and streams project glossary-path changes.",clientFallback:"Hide Glossary hints, make no artifact request or subscription, and render ordinary Markdown.",serverContract:{routes:["GET /api/projects/:projectId/glossary-artifact"],routeModules:["packages/server/src/routes/glossary-artifacts.ts"],requestFields:["glossaryArtifact.sourcePath"],responseFields:["glossaryArtifact.status","glossaryArtifact.governingPath","glossaryArtifact.sourceVersion","glossaryArtifact.dependencies","glossaryArtifact.artifact","glossaryArtifact.diagnostics"],events:["glossary-paths-snapshot","glossary-path-changed"]},lifecycle:{kind:"permanent",reason:"Hosted clients may outpace installed servers, and glossary discovery must remain server-owned."}},progressiveSessionCatalog:{id:g.progressiveSessionCatalog.id,name:"progressive-session-catalog",kind:"permanent",area:"sessions",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server reports a session-collection generation and answers a conditional global session read with no-change instead of re-walking every project.",clientFallback:"Send no known generation, ignore any reported one, and keep the complete-request enumeration.",serverContract:{routes:["GET /api/sessions"],requestFields:["knownGeneration"],responseFields:["generation","unchanged"]},lifecycle:{kind:"permanent",reason:"YA is self-hosted with no forced upgrade, so the population of servers without the conditional read never converges and the client's enumeration fallback never becomes removable."}},retainedSessionCollections:{id:g.retainedSessionCollections.id,name:"retained-session-collections",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Session collections serve durable compact rows while catalog and optional badges refresh independently.",clientFallback:"Omit summaryMode and use the existing complete-request collection paths.",serverContract:{routes:["GET /api/sessions","GET /api/inbox"],requestFields:["summaryMode"],responseFields:["catalog"],events:["session-catalog-updated"]},lifecycle:{kind:"permanent",reason:"Independently updated clients and servers retain the complete-list fallback."}},projectDirectoryStoragePolicy:{id:g.projectDirectoryStoragePolicy.id,name:"project-directory-storage-policy",kind:"permanent",area:"settings",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server defaults project-scoped YA state to its data directory, supports explicit project-local opt-in, and reconciles revisioned mutable state before changing modes.",clientFallback:"Show the storage location as unavailable and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.projectDirectoryStorage"],responseFields:["settings.projectDirectoryStorage"]},lifecycle:{kind:"permanent",reason:"Older servers may write YA-managed state into project directories without an opt-in."}},idleReapHoursSetting:{id:g.idleReapHoursSetting.id,name:"idle-reap-hours-setting",kind:"permanent",area:"settings",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server exposes a live-configurable best-effort grace before unviewed, verified-idle provider processes may be reaped.",clientFallback:"Hide the idle-reap control and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.idleReapHours"],responseFields:["settings.idleReapHours"]},lifecycle:{kind:"permanent",reason:"Hosted clients may outpace installed servers, and older servers do not expose a persisted idle-reap policy."}},subagentMaxDepthSetting:{id:g.subagentMaxDepthSetting.id,name:"subagent-max-depth-setting",kind:"permanent",area:"settings",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server persists a process-launch limit for supported providers' native subagent nesting depth.",clientFallback:"Hide the subagent-depth control and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.subagentMaxDepth"],responseFields:["settings.subagentMaxDepth"]},lifecycle:{kind:"permanent",reason:"Hosted clients may outpace installed servers, and older servers do not expose a process-launch subagent-depth policy."}},codexReasoningSummarySetting:{id:g.codexReasoningSummarySetting.id,name:"codex-reasoning-summary-setting",kind:"permanent",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server persists the reasoning-summary mode applied when Codex app-server sessions start, resume, or fork.",clientFallback:"Hide the Codex reasoning-summary control and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.codexReasoningSummary"],responseFields:["settings.codexReasoningSummary"]},lifecycle:{kind:"permanent",reason:"Hosted clients may outpace installed servers, and older servers do not expose the Codex reasoning-summary policy."}},codexPlanToolSetting:{id:g.codexPlanToolSetting.id,name:"codex-plan-tool-setting",kind:"permanent",area:"providers",introducedIn:"0.8.1",advertisement:{kind:"version-implied"},description:"Server persists the Codex plan-tool mode applied when app-server sessions start, resume, or fork.",clientFallback:"Hide the Codex plan-tool control and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.codexPlanToolMode"],responseFields:["settings.codexPlanToolMode"]},lifecycle:{kind:"permanent",reason:"Hosted clients may outpace installed servers, and older servers do not expose the Codex plan-tool policy."}},codexCyberAccessProgramSetting:{id:g.codexCyberAccessProgramSetting.id,name:"codex-cyber-access-program-setting",kind:"permanent",area:"providers",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Server persists the Codex cyber access program requested on each app-server turn.",clientFallback:"Hide the Codex cyber access program control and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.codexCyberAccessProgram"],responseFields:["settings.codexCyberAccessProgram"]},lifecycle:{kind:"permanent",reason:"Hosted clients may outpace installed servers, and older servers do not expose the Codex cyber access program policy."}},codexStreamDurableIdAlignment:{id:g.codexStreamDurableIdAlignment.id,name:"codex-stream-durable-id-alignment",kind:"permanent",area:"providers",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server aligns Codex live and durable transcript rows on provider or client message identity when that identity exists.",clientFallback:"Use the legacy Codex non-tool content/timestamp reconciliation, steer pairing, and timestamp-watermark replay suppression.",serverContract:{responseFields:["sessionDetail.messages[].uuid","sessionMessage.message.uuid"],events:["session-message"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers whose Codex stream and durable transcript ids do not align."}},codexPaginatedRolloutLineage:{id:g.codexPaginatedRolloutLineage.id,name:"codex-paginated-rollout-lineage",kind:"transitional",area:"sessions",introducedIn:"0.8.1",advertisement:{kind:"version-implied"},description:"Server reconstructs reference-backed paginated Codex rollout history for session reads and native fork products.",clientFallback:"Disable Codex Clone and Fork with update guidance and make no fork request; other providers remain available.",serverContract:{routes:["GET /api/sessions","GET /api/projects/:projectId/sessions/:sessionId","POST /api/projects/:projectId/sessions/:sessionId/fork"],responseFields:["sessionDetail.messages","sessionSummary.messageCount","sessionSummary.forkedFromSessionId"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-01",removeClientGateWhen:"The optional hosted-client support corpus contains no server without reference-backed Codex rollout reads and the Maintainer approves removal.",removeServerAdvertisementWhen:"No maintained client still branches on codex-paginated-rollout-lineage."}},toolResultMediaPreservationPolicy:{id:g.toolResultMediaPreservationPolicy.id,name:"tool-result-media-preservation-policy",kind:"permanent",area:"settings",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server loads tool-result images on demand by default and can preserve new live results when explicitly enabled.",clientFallback:"Show media preservation as unavailable and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.toolResultMediaPreservation"],responseFields:["settings.toolResultMediaPreservation"]},lifecycle:{kind:"permanent",reason:"Older and development servers may use different tool-media storage semantics."}},gitStatus:{name:"git-status",kind:"permanent",area:"gitStatus",introducedIn:"0.6.0",advertisement:{kind:"version-implied"},description:"Server supports project source-control status summaries for the Source Control page and sidebar entry.",clientFallback:"Hide Source Control entry points.",serverContract:{routes:["GET /api/projects/:projectId/git"]},lifecycle:{kind:"permanent",reason:"Source Control availability is a server feature boundary for older servers and environments without the route."}},gitStatusEnhanced:{name:"git-status-enhanced",kind:"permanent",area:"gitStatus",introducedIn:"0.6.0",advertisement:{kind:"version-implied"},description:"Server supports the enhanced Source Control page, including file summaries, branch metadata, and recent commits.",clientFallback:"Show the Source Control upgrade/unsupported state.",serverContract:{routes:["GET /api/projects/:projectId/git","GET /api/projects/:projectId/git/untracked-folder","POST /api/projects/:projectId/git/diff"]},lifecycle:{kind:"permanent",reason:"The enhanced Source Control UI must stay hidden against older servers with only legacy status support."}},gitStatusRemoteCheck:{name:"git-status-remote-check",kind:"permanent",area:"gitStatus",introducedIn:"0.6.0",advertisement:{kind:"version-implied"},description:"Server supports explicit remote fetch/check for Source Control status.",clientFallback:"Hide remote-check controls.",serverContract:{routes:["POST /api/projects/:projectId/git/check-remote"]},lifecycle:{kind:"permanent",reason:"Remote checking depends on a server-side git operation endpoint and may be unavailable on older servers."}},gitStatusPull:{name:"git-status-pull",kind:"permanent",area:"gitStatus",introducedIn:"0.6.0",advertisement:{kind:"version-implied"},description:"Server supports Source Control pull actions.",clientFallback:"Hide pull controls.",serverContract:{routes:["POST /api/projects/:projectId/git/pull"]},lifecycle:{kind:"permanent",reason:"Pull is a mutating server-side git operation and must only be offered when the server advertises it."}},gitStatusPush:{name:"git-status-push",kind:"permanent",area:"gitStatus",introducedIn:"0.6.0",advertisement:{kind:"version-implied"},description:"Server supports Source Control push/publish actions.",clientFallback:"Hide push controls.",serverContract:{routes:["POST /api/projects/:projectId/git/push"]},lifecycle:{kind:"permanent",reason:"Push is a mutating server-side git operation and must only be offered when the server advertises it."}},gitStatusIntegrationOptions:{name:"git-status-integration-options",kind:"permanent",area:"gitStatus",introducedIn:"0.6.0",advertisement:{kind:"version-implied"},description:"Server supports read-only Source Control integration-option analysis for diverged branches.",clientFallback:"Hide automatic integration-option controls.",serverContract:{routes:["GET /api/projects/:projectId/git/integration-options"]},lifecycle:{kind:"permanent",reason:"Integration-option analysis depends on server-side route behavior older servers may not expose."}},gitDirtyFileEditor:{id:g.gitDirtyFileEditor.id,name:"git-dirty-file-editor",kind:"permanent",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server reports the last YA session observed editing each still-dirty Source Control path.",clientFallback:"Hide dirty-file session links and make no additional request.",serverContract:{routes:["GET /api/projects/:projectId/git","GET /api/projects/:projectId/git/untracked-folder"],responseFields:["files[].lastEditor","lastEditors"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, and older status responses do not carry editor attribution."}},gitSourceReview:{id:g.gitSourceReview.id,name:"git-source-review",kind:"permanent",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server supports the commit/file browser and server-owned source-review workflow.",clientFallback:"Keep basic Source Control status and individually capability-gated remote actions; explain that browsing and review require a server update.",serverContract:{routes:["GET /api/projects/:projectId/git/commits","GET /api/projects/:projectId/git/commit-search-manifest","POST /api/projects/:projectId/git/commit-search-records","GET /api/projects/:projectId/git/commit/:sha","POST /api/projects/:projectId/git/commit-diff","GET /api/projects/:projectId/git/blame","GET /api/projects/:projectId/git/files","GET /api/projects/:projectId/git/search","GET /api/projects/:projectId/review/comments","POST /api/projects/:projectId/review/comments","PATCH /api/projects/:projectId/review/comments/:commentId","DELETE /api/projects/:projectId/review/comments/:commentId","POST /api/projects/:projectId/review/preview","POST /api/projects/:projectId/review/submit"],routeModules:["packages/server/src/routes/git-browse.ts","packages/server/src/routes/review-comments.ts"],requestFields:["gitDiff.againstHead","gitDiff.origPath"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, while Source Control must retain its released basic status and synchronization path."}},gitSourceReviewSubmissions:{id:g.gitSourceReviewSubmissions.id,name:"git-source-review-submissions",kind:"permanent",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server supports captured source-review sites, durable submissions, outcomes, and unread review responses.",clientFallback:"Retain the version-1 source-review comments and submit flow; hide Reviews and make no capture, submission, site, response, or acknowledgement request.",serverContract:{routes:["GET /api/projects/:projectId/review/submissions","GET /api/projects/:projectId/review/submissions/:submissionId","POST /api/projects/:projectId/review/submissions/:submissionId/acknowledge","POST /api/projects/:projectId/review/submissions/:submissionId/refresh-response","POST /api/projects/:projectId/review/sites/:siteId/follow-ups","POST /api/projects/:projectId/review/sites/:siteId/resolve","GET /api/review/inbox"],routeModules:["packages/server/src/routes/review-submissions.ts","packages/server/src/routes/review-inbox.ts"],requestFields:["reviewComment.anchor.projection","reviewSubmit.submissionId","reviewSubmit.name","settings.sourceReviewSubmissionsEnabled","settings.sourceReviewResponseTurns"],responseFields:["gitDiff.reviewProjections","settings.sourceReviewSubmissionsEnabled","settings.sourceReviewResponseTurns"],events:["review-response-changed"]},lifecycle:{kind:"permanent",reason:"The hosted client may outpace servers that expose version-1 source review but cannot preserve captures, submissions, sites, or response state."}},gitSourceReviewProjections:{id:g.gitSourceReviewProjections.id,name:"git-source-review-projections",kind:"transitional",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server supports ignore-whitespace rendering and direct selected-revision-to-HEAD comparisons in Source Control.",clientFallback:"Keep ordinary working-tree and commit review available; make no projection request and explain that the server must be updated or restarted.",serverContract:{routes:["GET /api/projects/:projectId/git/compare/:sha","POST /api/projects/:projectId/git/compare-diff"],routeModules:["packages/server/src/routes/git-projections.ts"],requestFields:["gitDiff.ignoreWhitespace","gitCommitDiff.ignoreWhitespace","gitCompareDiff.baseSha","gitCompareDiff.headSha","gitCompareDiff.ignoreWhitespace"],responseFields:["gitRevisionComparison.baseSha","gitRevisionComparison.headSha","gitRevisionComparison.files"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-28",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the Source Control projection contract.",removeServerAdvertisementWhen:"No maintained client still branches on git-source-review-projections."}},gitInclusiveToHead:{id:g.gitInclusiveToHead.id,name:"git-inclusive-to-head",kind:"permanent",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server compares an inclusive selected-commit range from the selected commit's first parent, or the empty tree for a root commit, through pinned HEAD.",clientFallback:"Hide inclusive To HEAD and make no range request; retain separately gated direct per-file selected-tree-to-HEAD comparison.",serverContract:{routes:["GET /api/projects/:projectId/git/range-to-head/:sha","POST /api/projects/:projectId/git/range-to-head-diff"],routeModules:["packages/server/src/routes/git-inclusive-to-head.ts"],requestFields:["gitInclusiveComparisonDiff.baseSha","gitInclusiveComparisonDiff.headSha","gitInclusiveComparisonDiff.path","gitInclusiveComparisonDiff.status","gitInclusiveComparisonDiff.origPath","gitInclusiveComparisonDiff.fullContext","gitInclusiveComparisonDiff.ignoreWhitespace"],responseFields:["gitInclusiveRevisionComparison.selectedSha","gitInclusiveRevisionComparison.baseSha","gitInclusiveRevisionComparison.headSha","gitInclusiveRevisionComparison.files"]},lifecycle:{kind:"permanent",reason:"The existing projection capability permanently means direct selected-tree-to-HEAD comparison, and older servers have no inclusive-range route."}},gitFileDiffProjections:{id:g.gitFileDiffProjections.id,name:"git-file-diff-projections",kind:"permanent",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server exposes exact per-file HEAD-to-worktree and first-parent-to-worktree diff projections for the shared file viewer.",clientFallback:"Hide file-viewer diff selectors, retain ordinary file viewing and Source Control, and make no file-projection request.",serverContract:{routes:["GET /api/projects/:projectId/git/file-projections","POST /api/projects/:projectId/git/file-projection-diff"],routeModules:["packages/server/src/routes/git-file-projections.ts"],requestFields:["gitFileProjectionDiff.mode","gitFileProjectionDiff.path","gitFileProjectionDiff.fullContext"],responseFields:["gitFileProjections.headSha","gitFileProjections.baseSha","gitFileProjections.worktreeFiles","gitFileProjections.cumulativeFiles"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace self-hosted servers, and the exact cumulative projection has no safe older-server request fallback."}},gitFileRevision:{id:g.gitFileRevision.id,name:"git-file-revision",kind:"permanent",area:"gitStatus",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server resolves a file's last content revision and whether live filesystem content differs from the committed blob.",clientFallback:"Omit file-revision provenance and make no metadata request.",serverContract:{routes:["GET /api/projects/:projectId/git/file-revision"],routeModules:["packages/server/src/routes/git-file-revision.ts"],requestFields:["gitFileRevision.path","gitFileRevision.rev","gitFileRevision.origPath"],responseFields:["gitFileRevision.isGitRepo","gitFileRevision.commit","gitFileRevision.dirty"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, and older servers have no per-file revision metadata route."}},sessionConversationContext:{id:g.sessionConversationContext.id,name:"session-conversation-context",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Deliver ordered user/assistant text turns through native history insertion or an attributed user message.",clientFallback:"Use existing fork/send/read routes for question cards and send imported context as a normal user message; never call the missing context route.",serverContract:{routes:["POST /api/projects/:projectId/sessions/:sessionId/conversation-context"],routeModules:["packages/server/src/routes/conversation-context.ts"],requestFields:["conversationContext.requestId","conversationContext.turns"],responseFields:["conversationContext.delivery"]},lifecycle:{kind:"permanent",reason:"Older servers cannot append role-preserving history without a new turn."}},turnEffortModifiers:{id:g.turnEffortModifiers.id,name:"turn-effort-modifiers",kind:"permanent",area:"sessions",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Apply model-aware effort modifiers to one turn without changing normal session settings.",clientFallback:"Hide modifier commands and reject typed modifiers with update guidance; send no turnEffort metadata.",serverContract:{requestFields:["messageMetadata.turnEffort"],responseFields:["deferredMessages.metadata.turnEffort"]},lifecycle:{kind:"permanent",reason:"Older servers cannot preserve one-turn effort through queue delivery."}},projectFileCompletion:{id:g.projectFileCompletion.id,name:"project-file-completion",kind:"permanent",area:"localAccess",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Requested project path completion with progressive, ignore-filtered inventory and mention ordering.",clientFallback:"Leave @ text literal and make no completion request when the server cannot verify path eligibility.",serverContract:{routes:["GET /api/projects/:projectId/file-completion"],routeModules:["packages/server/src/routes/project-file-completion.ts"],responseFields:["fileCompletion.entries","fileCompletion.pending","fileCompletion.truncated"]},lifecycle:{kind:"permanent",reason:"Older servers lack ignore-filtered completion for filesystem-only projects."}},gitWorkingTreeFiles:{id:g.gitWorkingTreeFiles.id,name:"git-working-tree-files",kind:"permanent",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server exposes current-content inventory plus a persistent, searchable non-ignored untracked cache outside the project.",clientFallback:"Keep the tracked-only Files browser and legacy compact untracked expansion, making no working-tree or cache request.",serverContract:{routes:["GET /api/projects/:projectId/git/working-tree-files","GET /api/projects/:projectId/git/untracked-files"],routeModules:["packages/server/src/routes/git-working-tree-files.ts"],responseFields:["gitWorkingTreeFiles.files[].path","gitWorkingTreeFiles.files[].tracked","gitWorkingTreeFiles.truncated","gitWorkingTreeFiles.limit","gitUntrackedFiles.files","gitUntrackedFiles.folders","gitUntrackedFiles.total","gitUntrackedFiles.refreshedAt","gitUntrackedFiles.truncated","gitUntrackedFiles.limit"]},lifecycle:{kind:"permanent",reason:"Older servers expose only tracked paths, so the hosted client must not infer an incomplete current-content inventory from that route."}},gitWorkingTreeSections:{id:g.gitWorkingTreeSections.id,name:"git-working-tree-sections",kind:"permanent",area:"gitStatus",introducedIn:"0.7.2",advertisement:{kind:"optional-bit",index:Q.gitWorkingTreeSections.index},description:"Server maintains one project-keyed, lease-owned Working Tree snapshot with requested tracked, untracked, ignored, and filesystem-directory coverage, lazy filesystem-only inventory outside Git repositories, embedded Git facts when available, and sequenced live deltas.",clientFallback:"Use the released static working-tree inventory and cache-backed status paths without section controls, ignored enumeration, or a worktree subscription.",serverContract:{routes:["GET /api/projects/:projectId/git/working-tree-files"],requestFields:["gitWorkingTreeFiles.tracked","gitWorkingTreeFiles.untracked","gitWorkingTreeFiles.ignored","relaySubscribe.channel=worktree","relaySubscribe.projectId","relaySubscribe.coverage","relaySubscribe.coverage.expandedPrefixes"],responseFields:["gitWorkingTreeFiles.files[].kind","gitWorktreeSnapshot.generation","gitWorktreeSnapshot.coverage","gitWorktreeSnapshot.headSha","gitWorktreeSnapshot.baseSha","gitWorktreeSnapshot.files[].tracked","gitWorktreeSnapshot.files[].kind","gitWorktreeSnapshot.files[].present","gitWorktreeSnapshot.files[].worktreeChanges","gitWorktreeSnapshot.files[].cumulativeChange","gitWorktreeSnapshot.directories[].path","gitWorktreeSnapshot.directories[].pending","gitWorktreeSnapshot.directories[].truncated","gitWorktreeDelta.generation","gitWorktreeDelta.changes","gitWorktreeDelta.directoryChanges","gitWorktreeDelta.truncated"],events:["git-worktree-snapshot","git-worktree-delta"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace self-hosted servers, and the released inventory route provides neither sectioned ignored coverage nor a resident live snapshot and delta contract."}},gitWorkingTreeCompleteScan:{id:g.gitWorkingTreeCompleteScan.id,name:"git-working-tree-complete-scan",kind:"permanent",area:"gitStatus",introducedIn:"0.7.2",advertisement:{kind:"optional-bit",index:Q.gitWorkingTreeCompleteScan.index},description:"Server reports total filesystem inventory sizes and accepts an explicit complete-scan worktree lease that removes the bounded client projection.",clientFallback:"Keep the bounded filesystem inventory and truncation notice without sending a complete-scan request or showing a Show all action.",serverContract:{requestFields:["relaySubscribe.coverage.filesystemScan"],responseFields:["gitWorktreeSnapshot.totalFiles","gitWorktreeSnapshot.directories[].totalFiles","gitWorktreeDelta.totalFiles","gitWorktreeDelta.directoryChanges[].directory.totalFiles"],events:["git-worktree-snapshot","git-worktree-delta"]},lifecycle:{kind:"permanent",reason:"Older servers ignore the new request field and cannot honor a visible request to replace a bounded filesystem listing with its complete contents."}},cacheMissBillingIgnoreAfter:{id:g.cacheMissBillingIgnoreAfter.id,name:"cache-miss-billing-ignore-after",kind:"permanent",area:"settings",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server separates the cache-billing upper idle cutoff from the legacy recent-activity no-alert window.",clientFallback:"Keep the legacy recent-activity control and omit the ignore-after field and control.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.cacheMissBilling.ignoreAfterMinutes"],responseFields:["settings.cacheMissBilling.ignoreAfterMinutes"]},lifecycle:{kind:"permanent",reason:"Older servers interpret recentActivityMinutes as a lower no-alert window, so the upper cutoff requires an additive field and permanent client gate."}},cacheMissBillingExpectedExpiry:{id:g.cacheMissBillingExpectedExpiry.id,name:"cache-miss-billing-expected-expiry",kind:"permanent",area:"settings",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server records post-freshness cache reads and input costs as expected expiry evidence behind an opt-in query and live event.",clientFallback:"Hide the expected-expiry evidence toggle, omit the query field, and listen only for ordinary cache-billing events.",serverContract:{routes:["GET /api/settings/cache-miss-billing/events"],requestFields:["includeExpectedExpiry"],responseFields:["events[].expectedInputCost.freshEnough","events[].outcome"],events:["cache-miss-billing-expected-expiry"]},lifecycle:{kind:"permanent",reason:"Older clients must not receive expected long-idle evidence through the legacy response or alert-oriented live event."}},attachmentOnlySessionMessages:{id:g.attachmentOnlySessionMessages.id,name:"attachment-only-session-messages",kind:"permanent",area:"sessions",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Direct session start, resume, and queue routes accept an empty text field when the submitted message contains an uploaded attachment.",clientFallback:"Keep the attachment draft and require text instead of sending an empty-message request to an older server.",serverContract:{routes:["POST /api/projects/:projectId/sessions","POST /api/sessions","POST /api/projects/:projectId/sessions/:sessionId/resume","POST /api/sessions/:sessionId/messages"],requestFields:["message","attachments"]},lifecycle:{kind:"permanent",reason:"Older servers reject an empty message before inspecting attachments, so current clients need a permanent gate for attachment-only submission."}},gitLiveWorktreeSetting:{id:g.gitLiveWorktreeSetting.id,name:"git-live-worktree-setting",kind:"permanent",area:"settings",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server persists the default-off live worktree monitoring setting independently of whether the live protocol is active.",clientFallback:"Hide and omit the setting, use static working-tree paths, and do not activate a worktree subscription.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.liveWorktreeMonitoringEnabled"],responseFields:["settings.liveWorktreeMonitoringEnabled"]},lifecycle:{kind:"permanent",reason:"Older servers lack the safety setting, so a current client must not interpret their source-ahead live capability as operator opt-in."}},gitIncomingCommits:{id:g.gitIncomingCommits.id,name:"git-incoming-commits",kind:"permanent",area:"gitStatus",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server lists commits on the configured upstream tracking ref but not local HEAD without contacting the remote.",clientFallback:"Keep the upstream name as inert status text and make no incoming-commit request.",serverContract:{routes:["GET /api/projects/:projectId/git/incoming-commits"],routeModules:["packages/server/src/routes/git-incoming-commits.ts"],responseFields:["gitIncomingCommits.upstream","gitIncomingCommits.headSha","gitIncomingCommits.upstreamSha","gitIncomingCommits.commits","gitIncomingCommits.truncated","gitIncomingCommits.limit"]},lifecycle:{kind:"permanent",reason:"Older servers have no read-only incoming-commit preview, and the client must not trigger an unsupported request or hidden fetch."}},approvalAuditLog:{name:"approvalAuditLog",kind:"permanent",area:"localAccess",introducedIn:"0.6.0",advertisement:{kind:"version-implied"},description:"Server supports configuring approval audit-log persistence from Local Access settings.",clientFallback:"Treat approval audit logging as a legacy read-only enabled setting.",serverContract:{routes:["GET /api/settings","PATCH /api/settings"],responseFields:["settings.approvalAuditLogEnabled"]},lifecycle:{kind:"permanent",reason:"Older servers lack the configurable approval audit-log setting and should not receive writes for it."}},securityClientAudit:{id:g.securityClientAudit.id,name:_c,kind:"permanent",area:"security",introducedIn:"0.7.1",advertisement:{kind:"optional-bit",index:Q.securityClientAudit.index},description:"Server supports signed security-client continuity, bounded audit history, and revocation.",clientFallback:"Do not call security-client routes; native clients may still use ordinary SRP but cannot establish registered-device continuity.",serverContract:{routes:["POST /api/security/clients/register","POST /api/security/clients/:clientId/check-in","GET /api/security/clients","GET /api/security/events","GET /api/security/clients/:clientId","GET /api/security/clients/:clientId/events","PATCH /api/security/clients/:clientId","DELETE /api/security/clients/:clientId"],routeModules:["packages/server/src/routes/security-clients.ts"]},lifecycle:{kind:"permanent",reason:"Installed servers may permanently predate the registered-client audit surface, and clients must never probe proof-bearing routes without an exact gate."}},browserSettingsBackup:{id:g.browserSettingsBackup.id,name:"browser-settings-backup",kind:"permanent",area:"settings",introducedIn:"0.6.3",advertisement:{kind:"optional-bit",index:Q.browserSettingsBackup.index},description:"Server stores one explicit backup of portable browser settings for save/load controls.",clientFallback:"Hide browser settings save/load controls.",serverContract:{routes:["GET /api/settings/browser-backup","PUT /api/settings/browser-backup"]},lifecycle:{kind:"permanent",reason:"Hosted clients must not offer server-backed browser settings controls to older servers without the storage route."}},claudeAdditionalModels:{name:"claude-additional-models",kind:"transitional",area:"providers",introducedIn:"0.6.3",advertisement:{kind:"version-implied"},description:"Server persists opt-in previous/custom Claude model ids and exposes the maintained optional catalog.",clientFallback:"Hide the Additional models provider setting.",serverContract:{routes:["GET /api/settings","PUT /api/settings","GET /api/providers","GET /api/processes/:processId/models"],responseFields:["settings.claudeAdditionalModels","providers[].additionalModelOptions","providers[].models[].catalogGroup"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-25",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the additional-model settings/catalog API.",removeServerAdvertisementWhen:"No maintained client still branches on claude-additional-models."}},claudeGateway:{id:g.claudeGateway.id,name:"claude-gateway",kind:"transitional",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server can persist a Claude LLM-gateway URL and expose its models as an isolated Claude Gateway provider.",clientFallback:"Hide Claude Gateway configuration and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings","GET /api/providers"],requestFields:["settings.claudeGatewayUrl"],responseFields:["settings.claudeGatewayUrl","providers[].name"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-27",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the Claude Gateway settings/provider contract.",removeServerAdvertisementWhen:"No maintained client still branches on claude-gateway."}},claudeGatewayServices:{id:g.claudeGatewayServices.id,name:"claude-gateway-services",kind:"transitional",area:"providers",introducedIn:"0.8.2",advertisement:{kind:"optional-bit",index:g.claudeGatewayServices.id},description:"Server stores a list of model-serving endpoints with per-entry lifecycle commands, declared context and output sizes, harness-narrowing overrides, and CodexOSS opt-in, and mirrors its default entry through the older single-gateway settings.",clientFallback:"Show the single Claude Gateway URL and start-command form, writing only the older claudeGateway* settings.",serverContract:{routes:["GET /api/settings","PUT /api/settings","GET /api/providers"],requestFields:["settings.gatewayServices","settings.defaultGatewayServiceId"],responseFields:["settings.gatewayServices","settings.defaultGatewayServiceId"]},lifecycle:{kind:"transitional",reviewAfter:"2027-03-16",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the gateway services list.",removeServerAdvertisementWhen:"No maintained client still branches on claude-gateway-services."}},claudeGatewayAutostart:{id:g.claudeGatewayAutostart.id,name:"claude-gateway-autostart",kind:"transitional",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server can persist and run an explicit shell command when a configured loopback Claude Gateway has no TCP listener.",clientFallback:"Hide the Gateway start-command field and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings","GET /api/providers"],requestFields:["settings.claudeGatewayStartCommand"],responseFields:["settings.claudeGatewayStartCommand"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-28",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the Gateway autostart setting and provider-refresh behavior.",removeServerAdvertisementWhen:"No maintained client still branches on claude-gateway-autostart."}},claudeGatewayDisableAgent:{id:g.claudeGatewayDisableAgent.id,name:"claude-gateway-disable-agent",kind:"transitional",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server can persist whether Claude Gateway launches deny Claude Code's Agent tool.",clientFallback:"Hide the Gateway Agent-tool setting and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.claudeGatewayDisableAgent"],responseFields:["settings.claudeGatewayDisableAgent"]},lifecycle:{kind:"transitional",reviewAfter:"2026-11-09",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the Gateway Agent-tool setting.",removeServerAdvertisementWhen:"No maintained client still branches on claude-gateway-disable-agent."}},claudeGatewayDisablePlanMode:{id:g.claudeGatewayDisablePlanMode.id,name:"claude-gateway-disable-plan-mode",kind:"transitional",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server can persist whether Claude Gateway launches remove Claude Code's plan-mode tools from model context.",clientFallback:"Hide the Gateway plan-mode setting and make no unsupported settings write.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.claudeGatewayDisablePlanMode"],responseFields:["settings.claudeGatewayDisablePlanMode"]},lifecycle:{kind:"transitional",reviewAfter:"2026-11-17",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the Gateway plan-mode setting.",removeServerAdvertisementWhen:"No maintained client still branches on claude-gateway-disable-plan-mode."}},providerSubscriptionUsage:{id:g.providerSubscriptionUsage.id,name:"provider-subscription-usage",kind:"transitional",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server exposes normalized read-only provider subscription and rate-limit windows.",clientFallback:"Make no subscription-usage request and hide model usage badges and context usage detail.",serverContract:{routes:["GET /api/providers/:name/subscription-usage"],responseFields:["usage"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-29",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the subscription-usage route.",removeServerAdvertisementWhen:"No maintained client still branches on provider-subscription-usage."}},providerHostControl:{id:g.providerHostControl.id,name:"provider-host-control",kind:"permanent",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"optional-bit",index:Q.providerHostControl.index},description:"Server adapts authenticated remote session-turn requests to an incumbent same-user provider host without becoming a second provider owner.",clientFallback:"Hide provider-host control and make no status, inventory, turn, receipt, or interruption request.",serverContract:{routes:["GET /api/provider-host/status","GET /api/provider-host/runtimes","POST /api/provider-host/session-turn","GET /api/provider-host/session-turn/:submissionId","POST /api/provider-host/session-turn/:submissionId/interrupt"],routeModules:["packages/server/src/routes/provider-host.ts"],requestFields:["providerHostTurn.submissionId","providerHostTurn.target","providerHostTurn.message","providerHostTurn.timeoutMs"],responseFields:["providerHostStatus.available","providerHostInventory.runtimes","providerHostTurnStatus"],events:["providerHostTurn.accepted","providerHostTurn.providerEvent","providerHostTurn.approvalRequired","providerHostTurn.terminal","providerHostTurn.error"]},lifecycle:{kind:"permanent",reason:"Host availability is launch- and platform-dependent, while hosted clients can outpace installed servers that lack the adapter routes."}},remoteBrowserDiagnostics:{id:g.remoteBrowserDiagnostics.id,name:"remote-browser-diagnostics-v1",kind:"permanent",area:"security",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server brokers one short-lived, per-tab full-JavaScript diagnostic lease between an explicitly enabled browser tab and a YA-launched agent shell.",clientFallback:"Hide the toolbar setting and control, create no lease, and make no browser-diagnostics request.",serverContract:{routes:["POST /api/browser-debug/leases","POST /api/browser-debug/leases/:leaseId/poll","POST /api/browser-debug/leases/:leaseId/results","POST /api/browser-debug/leases/:leaseId/events","DELETE /api/browser-debug/leases/:leaseId","GET /browser-debug/v1/leases/:leaseId","GET /browser-debug/v1/leases/:leaseId/events","POST /browser-debug/v1/leases/:leaseId/eval"],routeModules:["packages/server/src/routes/browser-debug.ts"],requestFields:["browserDebugLease.sessionId","browserDebugLease.tabId","browserDebugEval.code"],responseFields:["browserDebugLease.leaseId","browserDebugLease.controllerToken","browserDebugLease.grantUrl","browserDebugLease.expiresAt","browserDebugEvents.events","browserDebugEval.result"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, and the privileged broker routes must never be probed without an explicit compatibility contract."}},reloadSafeCodexRuntimeSettings:{id:g.reloadSafeCodexRuntimeSettings.id,name:"reload-safe-codex-runtime-settings",kind:"permanent",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server persists the default-off Codex reload-safe-session setting and exposes the restart action used to apply it.",clientFallback:"Hide the setting, omit its field from writes, and retain ordinary restart behavior.",serverContract:{routes:["GET /api/settings","PUT /api/settings","POST /api/server/restart"],requestFields:["settings.codexReloadSafeSessions"],responseFields:["settings.codexReloadSafeSessions"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers that do not understand the setting or reload-safe restart contract."}},reloadSafeCodexRuntime:{id:g.reloadSafeCodexRuntime.id,name:"reload-safe-codex-runtime",kind:"permanent",area:"providers",introducedIn:"0.7.1",advertisement:{kind:"optional-bit",index:Q.reloadSafeCodexRuntime.index},description:"This Linux server is running under a usable lifecycle host that can retain eligible Codex runtimes across a Hono reload.",clientFallback:"Show the supported setting as unavailable and keep Codex runtimes under ordinary server ownership.",serverContract:{routes:["GET /api/version"]},lifecycle:{kind:"permanent",reason:"Runtime support depends on the current host, launch mode, and successful lifecycle-host registration."}},bangCommands:{name:"bang-commands",kind:"permanent",area:"localAccess",introducedIn:"0.6.3",advertisement:{kind:"version-implied"},description:"Server supports always-on local `!!` shell commands, completions, and persisted bang-command history; the top-level history view stays behind an explicit default-off setting.",clientFallback:"Hide bang-command entry points and composer routing.",serverContract:{routes:["GET /api/settings","PUT /api/settings","POST /api/projects/:projectId/sessions/:sessionId/bang-commands","POST /api/projects/:projectId/sessions/:sessionId/bang-commands/:objectId/kill","GET /api/projects/:projectId/sessions/:sessionId/bang-commands/:objectId/output","DELETE /api/projects/:projectId/sessions/:sessionId/bang-commands/:objectId","GET /api/projects/:projectId/bang-completions","GET /api/bang-commands"],responseFields:["settings.clientDefaults.bangCommandsEnabled"]},lifecycle:{kind:"permanent",reason:"Local command execution is an explicit server security boundary and older servers may not expose the routes or setting."}},hostIdentity:{name:"host-identity",kind:"permanent",area:"remoteAccess",introducedIn:"0.6.3",advertisement:{kind:"version-implied"},description:"Server persists an optional visual marker identifying the current YA host.",clientFallback:"Hide host identity settings and render no host marker.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],responseFields:["settings.hostIdentity"]},lifecycle:{kind:"permanent",reason:"Hosted clients may remain compatible with older servers that cannot persist host identity."}},hostAwakeControl:{name:"host-awake-control",kind:"transitional",area:"remoteAccess",introducedIn:"0.6.3",advertisement:{kind:"version-implied"},description:"Server supports process-lifetime host-awake settings and status discovery.",clientFallback:"Hide host-awake settings.",serverContract:{routes:["GET /api/settings","PUT /api/settings","GET /api/settings/host-awake/status"],responseFields:["settings.hostAwakeMode","settings.hostAwakeBatteryFloorPercent"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-21",removeClientGateWhen:"The hosted-client compatibility floor excludes servers older than the host-awake settings/status API.",removeServerAdvertisementWhen:"No maintained client still branches on host-awake-control."}},hostAgentProcessObservability:{id:g.hostAgentProcessObservability.id,name:"host-agent-process-observability",kind:"permanent",area:"localAccess",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server can report minimized host metrics for YA-owned and independently launched provider process trees.",clientFallback:"Keep the existing Agents inventory, hide host metrics and external rows, and make no host-process request.",serverContract:{routes:["GET /api/host-agent-processes","GET /api/settings","PUT /api/settings"],requestFields:["settings.hostProcessObservabilityEnabled"],responseFields:["settings.hostProcessObservabilityEnabled","hostAgentProcesses.enabled","hostAgentProcesses.supported","hostAgentProcesses.sampledAt","hostAgentProcesses.observations"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, and older servers do not expose the minimized host process route or setting."}},sessionSandboxing:{id:g.sessionSandboxing.id,name:"session-sandboxing",kind:"permanent",area:"localAccess",introducedIn:"0.7.1",advertisement:{kind:"optional-bit",index:Q.sessionSandboxing.index},description:"Server currently has a usable local backend for accepting, persisting, enforcing, and reporting the default-off YA session filesystem sandbox selection.",clientFallback:"Hide session sandbox controls, omit sandbox fields, and preserve unsandboxed session behavior.",serverContract:{routes:["GET /api/settings","PUT /api/settings","POST /api/projects/:projectId/sessions","POST /api/projects/:projectId/sessions/create","POST /api/projects/:projectId/queue","POST /api/projects/:projectId/sessions/:sessionId/resume","POST /api/projects/:projectId/sessions/:sessionId/reactivate","POST /api/projects/:projectId/sessions/:sessionId/recap","POST /api/projects/:projectId/sessions/:sessionId/restart","POST /api/projects/:projectId/sessions/:sessionId/fork","POST /api/projects/:projectId/sessions/:sessionId/retitle","POST /api/projects/:projectId/sessions/:sessionId/fork-summary","POST /api/sessions","POST /api/sessions/create"],requestFields:["settings.newSessionDefaults.sandboxLevel","sessionStart.sandboxLevel","sessionCreate.sandboxLevel","projectQueue.target.sandboxLevel","sessionRestart.sandboxLevel"],responseFields:["settings.newSessionDefaults.sandboxLevel","sessionStart.sandboxEnforcement","sessionResume.sandboxEnforcement","sessionReactivate.sandboxEnforcement","sessionRestart.sandboxEnforcement","process.sandboxEnforcement"]},lifecycle:{kind:"permanent",reason:"Older servers and unsupported hosts cannot preserve and enforce the launch boundary, so clients must never imply or request it without a dynamically advertised usable backend."}},sessionSandboxingStatus:{id:g.sessionSandboxingStatus.id,name:"session-sandboxing-status",kind:"permanent",area:"localAccess",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server reports the local session-sandbox backend preflight state independently from launch-time enforcement.",clientFallback:"Hide session sandbox controls and make no unsupported sandbox requests.",serverContract:{routes:["GET /api/version"],responseFields:["version.sessionSandboxing"]},lifecycle:{kind:"permanent",reason:"Hosted clients need to distinguish protocol-aware but unsupported hosts and intermediate development servers from hosts with a verified usable backend."}},sessionSandboxNetworkFirewall:{id:g.sessionSandboxNetworkFirewall.id,name:"session-sandbox-network-firewall",kind:"permanent",area:"localAccess",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server accepts, persists, inherits, enforces, and reports the project-write session network firewall selection.",clientFallback:"Hide all session sandbox controls and omit both sandbox launch fields.",serverContract:{routes:["GET /api/settings","PUT /api/settings","POST /api/projects/:projectId/sessions","POST /api/projects/:projectId/sessions/create","POST /api/projects/:projectId/queue","POST /api/projects/:projectId/sessions/:sessionId/resume","POST /api/projects/:projectId/sessions/:sessionId/reactivate","POST /api/projects/:projectId/sessions/:sessionId/recap","POST /api/projects/:projectId/sessions/:sessionId/restart","POST /api/projects/:projectId/sessions/:sessionId/fork","POST /api/projects/:projectId/sessions/:sessionId/retitle","POST /api/projects/:projectId/sessions/:sessionId/fork-summary","POST /api/sessions","POST /api/sessions/create"],requestFields:["settings.newSessionDefaults.sandboxNetworkFirewall","sessionStart.sandboxNetworkFirewall","sessionCreate.sandboxNetworkFirewall","projectQueue.target.sandboxNetworkFirewall","sessionRestart.sandboxNetworkFirewall"],responseFields:["settings.newSessionDefaults.sandboxNetworkFirewall","sessionStart.sandboxEnforcement.networkFirewall","sessionResume.sandboxEnforcement.networkFirewall","sessionReactivate.sandboxEnforcement.networkFirewall","sessionRestart.sandboxEnforcement.networkFirewall","process.sandboxEnforcement.networkFirewall"]},lifecycle:{kind:"permanent",reason:"Self-hosted clients and servers can remain version-skewed indefinitely, and omission on older servers cannot prove this security boundary."}},projectQueue:{name:"projectQueue",kind:"permanent",area:"projectQueue",introducedIn:"0.5.0",advertisement:{kind:"version-implied"},description:"Server supports durable project-scoped queue creation, listing, mutation, dispatch pause/resume, and promotion.",clientFallback:"Hide Project Queue entry points.",serverContract:{routes:["GET /api/project-queue","POST /api/project-queue/pause","POST /api/project-queue/resume","POST /api/project-queue/:projectId/promote-now","GET /api/projects/:projectId/queue","POST /api/projects/:projectId/queue","PATCH /api/projects/:projectId/queue/:itemId","DELETE /api/projects/:projectId/queue/:itemId","POST /api/projects/:projectId/queue/:itemId/retry","POST /api/projects/:projectId/queue/:itemId/move-to-top"],events:["project-queue-changed"]},lifecycle:{kind:"permanent",reason:"Project Queue availability remains a server feature boundary for older servers and hosted remote clients."}},projectQueueReadinessCheck:{id:g.projectQueueReadinessCheck.id,name:"project-queue-readiness-check",kind:"permanent",area:"projectQueue",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Server persists an optional global executable that gates Project Queue readiness, with bounded polling and Force start bypass.",clientFallback:"Hide the readiness executable setting and omit its field from settings updates.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],requestFields:["settings.projectQueueReadinessCheck"],responseFields:["settings.projectQueueReadinessCheck"]},lifecycle:{kind:"permanent",reason:"Older servers cannot persist or execute an external Project Queue readiness command."}},projectQueueAttachmentEditing:{id:g.projectQueueAttachmentEditing.id,name:"project-queue-attachment-editing",kind:"permanent",area:"projectQueue",introducedIn:"0.8.1",advertisement:{kind:"version-implied"},description:"Server atomically updates queued-message attachment sets containing retained queue-owned refs and newly uploaded draft refs.",clientFallback:"Keep Project Queue inline editing text-only and make no attachment upload or attachment mutation request.",serverContract:{routes:["PATCH /api/projects/:projectId/queue/:itemId"],requestFields:["projectQueue.message.attachments","projectQueue.message.stagedAttachments"]},lifecycle:{kind:"permanent",reason:"Hosted clients may outpace installed servers that cannot combine queue-owned and draft-owned attachment refs in one update."}},projectSessionDefaults:{id:g.projectSessionDefaults.id,name:"project-session-defaults",kind:"permanent",area:"settings",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server persists project-scoped heartbeat defaults and recent heartbeat messages, then seeds new session metadata from the effective project-to-global values.",clientFallback:"Hide Project Settings heartbeat entry points, make no project-default requests, and retain global plus per-session heartbeat behavior.",serverContract:{routes:["GET /api/projects/:projectId/session-defaults","PATCH /api/projects/:projectId/session-defaults"],routeModules:["packages/server/src/routes/project-session-defaults.ts"],requestFields:["projectSessionDefaults.heartbeatTurnsAfterMinutes","projectSessionDefaults.heartbeatTurnText"],responseFields:["projectSessionDefaults.projectId","projectSessionDefaults.overrides","projectSessionDefaults.recentHeartbeatTurnTexts"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, and project settings must never issue unsupported reads or writes to older servers."}},projectCodeNames:{id:g.projectCodeNames.id,name:"project-code-names",kind:"permanent",area:"settings",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server allocates, persists, and atomically edits unique project code names for compact project identity in browser titles and session lists.",clientFallback:"Use full project names, keep legacy tab-title activity frames, hide code-name editing, and make no code-name request.",serverContract:{routes:["GET /api/projects","GET /api/projects/:projectId","POST /api/projects","PATCH /api/projects/:projectId/code-name"],requestFields:["projectCodeName.codeName"],responseFields:["projects[].codeName","project.codeName","projectCodeName.assignments"],events:["project-code-names-changed"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, which neither return durable code names nor support conflict-safe edits."}},projectCaptions:{id:g.projectCaptions.id,name:"project-captions",kind:"permanent",area:"settings",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Server derives a short project caption from README or manifest text, accepts a per-project override in app data, and reports the caption with its source on project responses.",clientFallback:"Show no caption on project cards or the session breadcrumb tooltip, hide caption editing, and make no caption request.",serverContract:{routes:["GET /api/projects","GET /api/projects/:projectId","POST /api/projects","PATCH /api/projects/:projectId/caption"],requestFields:["projectCaption.caption"],responseFields:["projects[].caption","project.caption","projectCaption.caption"],events:["project-captions-changed"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, which neither derive captions nor accept caption overrides."}},projectNames:{id:g.projectNames.id,name:"project-names",kind:"permanent",area:"settings",introducedIn:"0.8.2",advertisement:{kind:"version-implied"},description:"Server accepts a chosen project name and code name when a project is added, stores a name override in app data, applies it wherever the project is named, and announces project list changes.",clientFallback:"Add projects by path alone, show the path's last component as the name, and make no name request.",serverContract:{routes:["GET /api/projects","GET /api/projects/:projectId","POST /api/projects","PATCH /api/projects/:projectId/name"],requestFields:["addProject.name","addProject.codeName","projectName.name"],responseFields:["projects[].name","project.name"],events:["projects-changed"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, which ignore a chosen name and would silently add the project under its path name."}},sidebarSessionResume:{id:g.sidebarSessionResume.id,name:"sidebar-session-resume",kind:"permanent",area:"sessions",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server session summaries identify manual resume exemptions so recent interrupted sessions can expose a safe message-less Resume action.",clientFallback:"Hide sidebar Resume controls and make no reactivate request.",serverContract:{routes:["GET /api/sessions","POST /api/projects/:projectId/sessions/:sessionId/reactivate","POST /api/processes/:processId/abort"],requestFields:["processAbort.blockResume"],responseFields:["globalSessions.sessions[].autoResumeDisabled"]},lifecycle:{kind:"permanent",reason:"Older servers do not expose the durable manual-termination marker in sidebar session summaries."}},syntheticDoneCommand:{id:g.syntheticDoneCommand.id,name:"synthetic-done-command",kind:"permanent",area:"sessions",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server persists a YA-only /done transcript row, pauses automatic session-waking work until the next real user turn, and verifies that the owned provider process stopped.",clientFallback:"Hide the toolbar setting and action, treat typed /done as an ordinary provider command, and make no done request.",serverContract:{routes:["POST /api/sessions/:sessionId/done"],routeModules:["packages/server/src/routes/session-done.ts"],responseFields:["message","paused","termination","settings.clientDefaults.sessionToolbarPresence.syntheticDone"]},lifecycle:{kind:"permanent",reason:"Hosted clients can outpace installed servers, and older servers neither persist the overlay nor enforce the automation pause."}},syntheticArchiveCommand:{id:g.syntheticArchiveCommand.id,name:"synthetic-archive-command",kind:"permanent",area:"sessions",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server archives a session, applies the same durable stop boundary as /done, and preserves /archive in the queued and transcript projections.",clientFallback:"Translate typed /archive to the established synthetic /done operation before queue projection and make no archive request.",serverContract:{routes:["POST /api/sessions/:sessionId/archive"],routeModules:["packages/server/src/routes/session-archive.ts"],responseFields:["message","paused","termination"]},lifecycle:{kind:"permanent",reason:"Older servers cannot atomically archive with the durable session boundary, but can preserve the user's done intent through the established /done route."}},syntheticTerminateCommand:{id:g.syntheticTerminateCommand.id,name:"synthetic-terminate-command",kind:"permanent",area:"sessions",introducedIn:"0.7.2",advertisement:{kind:"version-implied"},description:"Server archives a session, persists a /terminate boundary, blocks automatic resume, and verifies that the owned provider process stopped.",clientFallback:"Hide the command, treat typed /terminate as an ordinary provider command, and make no terminate request.",serverContract:{routes:["POST /api/sessions/:sessionId/terminate"],routeModules:["packages/server/src/routes/session-terminate.ts"],responseFields:["message","paused","termination","resumeExemption"]},lifecycle:{kind:"permanent",reason:"Older servers do not combine archival, durable resume exemption, and verified process termination."}},projectQueueNewSessionShortcutSetting:{name:"project-queue-new-session-shortcut-setting",kind:"permanent",area:"projectQueue",introducedIn:"0.6.3",advertisement:{kind:"version-implied"},description:"Server accepts and persists the active-composer new-session Project Queue shortcut presence setting.",clientFallback:"Hide the active-composer new-session shortcut and its Toolbar setting.",serverContract:{routes:["GET /api/settings","PUT /api/settings"],responseFields:["settings.clientDefaults.sessionToolbarPresence.projectQueueNewSessionShortcut"]},lifecycle:{kind:"permanent",reason:"Hosted clients must not save the new toolbar presence key to older servers that reject it."}},voiceInput:{id:g.voiceInput.id,name:"voiceInput",kind:"permanent",area:"speech",introducedIn:"0.6.0",advertisement:{kind:"optional-bit",index:Q.voiceInput.index},description:"Server permits voice input features and may expose server-routed speech backends.",clientFallback:"When absent from a capabilities-bearing response, hide or disable voice input controls.",serverContract:{routes:["POST /api/speech/transcribe","POST /api/speech/prewarm","GET /api/speech/ws","POST /api/speech/xai-client-key","POST /api/speech/xai-client-secret"],responseFields:["voiceBackends","voiceBackendStatuses","voiceBackendCapabilities"]},lifecycle:{kind:"permanent",reason:"Voice input can be disabled by server configuration and older clients preserve fallback behavior when version data is absent."}},deviceBridgeAvailable:{id:g.deviceBridgeAvailable.id,name:"deviceBridge-available",kind:"permanent",area:"deviceBridge",introducedIn:"0.6.0",advertisement:{kind:"optional-bit",index:Q.deviceBridgeAvailable.index},description:"Server recognizes the device bridge feature and can surface device settings or setup state.",clientFallback:"Hide device bridge settings and navigation.",serverContract:{responseFields:["deviceBridgeState"]},lifecycle:{kind:"permanent",reason:"Device bridge availability varies by server environment and installation state."}},deviceBridge:{id:g.deviceBridge.id,name:"deviceBridge",kind:"permanent",area:"deviceBridge",introducedIn:"0.6.0",advertisement:{kind:"optional-bit",index:Q.deviceBridge.index},description:"Server has an installed device bridge runtime and device routes can be used.",clientFallback:"Hide live device controls.",serverContract:{routes:["GET /api/devices","POST /api/devices/:id/start","POST /api/devices/:id/stop","GET /api/devices/:id/screenshot"],responseFields:["deviceBridgeState"]},lifecycle:{kind:"permanent",reason:"The installed bridge runtime is environment-dependent and can change without a protocol-version change."}},deviceBridgeDownload:{id:g.deviceBridgeDownload.id,name:"deviceBridge-download",kind:"permanent",area:"deviceBridge",introducedIn:"0.6.0",advertisement:{kind:"optional-bit",index:Q.deviceBridgeDownload.index},description:"Server can download or update managed device bridge runtime dependencies.",clientFallback:"Hide device bridge download/update prompts.",serverContract:{routes:["POST /api/devices/bridge/download"],responseFields:["deviceBridgeState"]},lifecycle:{kind:"permanent",reason:"Download support depends on server environment and is advertised separately from installed runtime availability."}},deviceBridgeUpdate:{id:g.deviceBridgeUpdate.id,name:"deviceBridge-update",kind:"permanent",area:"deviceBridge",introducedIn:"0.6.0",advertisement:{kind:"optional-bit",index:Q.deviceBridgeUpdate.index},description:"Server reports an available update for managed device bridge runtime dependencies.",clientFallback:"Show download/setup state without an update-specific prompt.",serverContract:{routes:["POST /api/devices/bridge/download"],responseFields:["deviceBridgeState","latestDeviceBridgeVersion"]},lifecycle:{kind:"permanent",reason:"Update availability is dynamic state advertised for older clients that branch on capability strings."}},sessionForkTurnIntents:{id:g.sessionForkTurnIntents.id,name:"session-fork-turn-intents",kind:"transitional",area:"sessions",introducedIn:"0.7.1",advertisement:{kind:"version-implied"},description:"Server resolves Clone and direct Fork requests at real completed user-turn boundaries.",clientFallback:"Hide unified Clone and direct Fork actions and make no fork request.",serverContract:{routes:["POST /api/projects/:projectId/sessions/:sessionId/fork"],requestFields:["forkKind","sourceMessageId"]},lifecycle:{kind:"transitional",reviewAfter:"2026-10-01",removeClientGateWhen:"The optional hosted-client support corpus contains no server without server-resolved fork intents and the Maintainer approves removal.",removeServerAdvertisementWhen:"No maintained client still branches on session-fork-turn-intents."}}};new Map(Object.values(Uc).map(e=>[e.name,e]));const qc="<synthetic>",Hc="Continue from where you left off.",Bc="No response requested.";function Nn(e){const t=e.message&&typeof e.message=="object"?e.message:void 0,n=(t==null?void 0:t.content)??e.content;return typeof n=="string"?n.trim():Array.isArray(n)&&n.filter(s=>!!s&&typeof s=="object"&&s.type==="text"&&typeof s.text=="string").map(s=>s.text).join("").trim()||void 0}function Wc(e){var n;if(!e||typeof e!="object")return!1;const t=(n=e.message)==null?void 0:n.role;return e.type!=="user"&&t!=="user"||e.isMeta!==!0?!1:Nn(e)===Hc}function Vc(e){if(!e||typeof e!="object")return!1;const t=e.message&&typeof e.message=="object"?e.message:void 0;return e.type!=="assistant"&&(t==null?void 0:t.role)!=="assistant"||(t==null?void 0:t.model)!==qc?!1:Nn(e)===Bc}const dt=/[^\s"'`<>&,:;()[\]{}=|]+/g,ut=/(?:^|\s)((?:\/(?!\/)|[A-Za-z]:[\\/])\S+)/g,Jc=/[.!?]+$/;function Kc(e){const t=[];ut.lastIndex=0;let n=ut.exec(e);for(;n!==null;){const i=n[1];if(i){const a=n.index+n[0].length-i.length;t.push({end:a+i.length,kind:"absolute",start:a,text:i})}n=ut.exec(e)}const o=[...t];let s=0;dt.lastIndex=0;let r=dt.exec(e);for(;r!==null;){const a=r[0].replace(Jc,""),l=r.index,d=l+a.length;for(;t[s]&&t[s].end<=l;)s+=1;const u=t[s],m=!!u&&l<u.end&&d>u.start;a&&!a.startsWith("/")&&!m&&o.push({end:d,kind:"relative",start:l,text:a}),r=dt.exec(e)}return o.sort((i,a)=>i.start-a.start)}function Z(e){return X([e,c()])}const Qc=p({type:P(["text","thinking","tool_use","tool_result"]),text:c().optional(),thinking:c().optional(),signature:c().optional(),id:c().optional(),name:c().optional(),input:j().optional(),tool_use_id:c().optional(),content:c().optional(),is_error:M().optional()}),Yc=p({status:P(["completed","failed","timeout","async_launched"]).optional(),prompt:c().optional(),agentId:c().optional(),content:S(Qc).optional(),totalDurationMs:h().optional(),totalTokens:h().optional(),totalToolUseCount:h().optional(),isAsync:M().optional(),description:c().optional(),outputFile:c().optional()});Z(Yc);const Xc=p({stdout:c().optional(),stderr:c().optional(),interrupted:M().optional(),isImage:M().optional(),backgroundTaskId:c().optional(),exitCode:h().optional()});Z(Xc);const el=p({filePath:c().optional(),content:c().optional(),numLines:h().optional(),startLine:h().optional(),totalLines:h().optional()}),tl=p({originalWidth:h().optional(),originalHeight:h().optional(),displayWidth:h().optional(),displayHeight:h().optional()}),nl=p({base64:c().optional(),type:c().optional(),originalSize:h().optional(),dimensions:tl.optional()}),ol=p({type:P(["text","image","pdf"]).optional(),file:X([el,nl]).optional()});Z(ol);const sl=p({oldStart:h().optional(),oldLines:h().optional(),newStart:h().optional(),newLines:h().optional(),lines:S(c()).optional()}),rl=p({type:P(["create","edit","update"]).optional(),filePath:c().optional(),oldString:c().optional(),newString:c().optional(),originalFile:c().nullable().optional(),replaceAll:M().optional(),userModified:M().optional(),structuredPatch:S(sl).optional()});Z(rl);const il=p({type:v("text").optional(),file:p({filePath:c().optional(),content:c().optional(),numLines:h().optional(),startLine:h().optional(),totalLines:h().optional()}).optional()});Z(il);const al=p({filenames:S(c()).optional(),durationMs:h().optional(),numFiles:h().optional(),truncated:M().optional()});Z(al);const cl=p({start:h(),end:h()}),ll=p({filePath:c(),lineNumber:h(),columnNumber:h().optional(),text:c(),ranges:S(cl).optional()}),dl=p({mode:P(["files_with_matches","content","count"]).optional(),filenames:S(c()).optional(),numFiles:h().optional(),content:c().optional(),numLines:h().optional(),appliedLimit:h().optional(),matches:S(ll).optional()});Z(dl);const $n=p({content:c().optional(),status:P(["pending","in_progress","completed"]).optional(),activeForm:c().optional()}),ul=p({oldTodos:S($n).optional(),newTodos:S($n).optional()});Z(ul);const pl=p({tool_use_id:c().optional(),content:S(p({title:c().optional(),url:c().optional()})).optional()}),ml=p({query:c().optional(),results:S(X([pl,c()])).optional(),durationSeconds:h().optional()});Z(ml);const fl=p({bytes:h().optional(),code:h().optional(),codeText:c().optional(),result:c().optional(),durationMs:h().optional(),url:c().optional()});Z(fl);const hl=p({label:c().optional(),description:c().optional(),preview:c().optional()}),gl=p({question:c().optional(),header:c().optional(),options:S(hl).optional(),multiSelect:M().optional()}),vl=p({questions:S(gl).optional(),answers:Ie(c(),X([c(),S(c())])).optional()});Z(vl);const yl=p({shellId:c().optional(),command:c().optional(),status:P(["running","completed","failed"]).optional(),exitCode:h().nullable().optional(),stdout:c().optional(),stderr:c().optional(),stdoutLines:h().optional(),stderrLines:h().optional(),timestamp:c().optional()});Z(yl);const kl=p({retrieval_status:P(["completed","success","not_ready","timeout","running"]).optional(),task:p({task_id:c().optional(),task_type:P(["local_bash","local_agent","agent"]).optional(),status:P(["running","completed","failed"]).optional(),description:c().optional(),output:c().optional(),exitCode:h().nullable().optional()}).optional()});Z(kl);const bl=p({message:c().optional(),shell_id:c().optional()});Z(bl);const _l=p({message:c().optional(),task_id:c().optional(),task_type:c().optional(),command:c().optional()});Z(_l);const Sl=p({matches:S(c()).optional(),query:c().optional(),total_deferred_tools:h().optional(),pending_mcp_servers:S(c()).optional()});Z(Sl);const wl=p({message:c().optional()});Z(wl);const Tl=p({message:c().optional(),plan:c().nullable().optional(),isAgent:M().optional(),filePath:c().optional()});Z(Tl);const ae={ordinal:h().int().nonnegative().optional()},Il=P(["legacy","paginated"]),xl=p({thread_id:c(),end_ordinal_exclusive:h().int().nonnegative(),end_byte_offset:h().int().nonnegative()}),Cl=X([c(),p({subagent:p({thread_spawn:p({parent_thread_id:c().optional(),depth:h().optional(),agent_path:c().nullable().optional(),agent_nickname:c().nullable().optional(),agent_role:c().nullable().optional()}).passthrough().optional()}).passthrough().optional()}).passthrough()]),El=p({id:c(),timestamp:c(),cwd:c(),forked_from_id:c().optional(),forked_from_ordinal_exclusive:h().int().nonnegative().optional(),history_mode:Il.optional(),history_base:xl.optional(),session_id:c().optional(),parent_thread_id:c().optional(),originator:c().optional(),cli_version:c().optional(),instructions:c().optional(),source:Cl.optional(),thread_source:c().optional(),agent_nickname:c().optional(),agent_role:c().optional(),agent_path:c().optional(),multi_agent_version:c().optional(),model_provider:c().optional()}),jl=p({...ae,timestamp:c(),type:v("session_meta"),payload:El}),Dn=p({type:v("input_text"),text:c()}),Pl=p({type:v("output_text"),text:c()}),Zn=p({type:v("input_image"),image_url:c().optional(),file_path:c().optional(),mime_type:c().optional()}).passthrough(),Ze={id:c().optional(),internal_chat_message_metadata_passthrough:p({turn_id:c().optional()}).passthrough().optional()},Al=p({...Ze,type:v("message"),role:P(["user","assistant","developer"]),content:S(X([Dn,Pl,Zn]))}),Ol=p({type:v("summary_text"),text:c()}),Fl=p({...Ze,type:v("reasoning"),summary:S(Ol).optional(),content:j().nullable().optional(),encrypted_content:c().optional()}),zl=p({type:v("agent_message"),author:c().optional(),recipient:c().optional(),content:j().optional()}).passthrough(),Ml=p({...Ze,type:v("function_call"),name:c(),arguments:c(),call_id:c()}),Rl=p({type:v("input_audio"),audio_url:c().optional()}).passthrough(),Nl=p({type:v("encrypted_content"),encrypted_content:c().optional()}).passthrough(),$l=X([Dn,Zn,Rl,Nl]),Dl=p({...Ze,type:v("function_call_output"),call_id:c().optional(),name:c().optional(),namespace:c().optional(),output:X([c(),S($l)])}),Zl=p({type:v("custom_tool_call"),call_id:c().optional(),id:c().optional(),name:c().optional(),arguments:c().optional(),input:j().optional()}).passthrough(),Ll=p({type:v("custom_tool_call_output"),call_id:c().optional(),output:j().optional()}).passthrough(),Gl=p({type:v("tool_search_call"),call_id:c().nullable().optional(),status:c().optional(),execution:c().optional(),arguments:j().optional()}).passthrough(),Ul=p({type:v("tool_search_output"),call_id:c().nullable().optional(),status:c().optional(),execution:c().optional(),tools:S(j()).optional()}).passthrough(),ql=p({type:v("web_search_call"),call_id:c().optional(),id:c().optional(),name:c().optional(),query:c().optional(),arguments:c().optional(),input:j().optional(),action:j().optional()}).passthrough(),Hl=p({type:v("configuration_update"),reasoning:p({effort:c().optional()}).passthrough().optional()}).passthrough(),Bl=p({type:v("ghost_snapshot"),ghost_commit:p({id:c(),parent:c(),preexisting_untracked_files:S(c()).optional(),preexisting_untracked_dirs:S(c()).optional()})}),Wl=ie("type",[Al,zl,Fl,Ml,Dl,Zl,Ll,Gl,Ul,ql,Hl,Bl]),Vl=p({...ae,timestamp:c(),type:v("response_item"),payload:Wl}),Jl=p({primary:p({used_percent:h(),window_minutes:h(),resets_at:h()}).nullable().optional(),secondary:p({used_percent:h(),window_minutes:h(),resets_at:h()}).nullable().optional(),credits:p({has_credits:M(),unlimited:M(),balance:j().nullable()}).nullable().optional(),plan_type:c().nullable().optional()}),Kl=p({total_token_usage:p({input_tokens:h(),cached_input_tokens:h().optional(),cache_write_input_tokens:h().optional(),output_tokens:h(),reasoning_output_tokens:h().optional(),total_tokens:h()}).optional(),last_token_usage:p({input_tokens:h(),cached_input_tokens:h().optional(),cache_write_input_tokens:h().optional(),output_tokens:h(),reasoning_output_tokens:h().optional(),total_tokens:h()}).optional(),model_context_window:h().optional()}),Ql=p({type:v("user_message"),message:c(),client_id:c().nullable().optional(),images:S(j()).optional()}),Yl=p({title:c(),options:S(c()).nullable()}).passthrough(),Xl=p({type:v("agent_message"),message:c(),phase:c().nullable().optional(),memory_citation:j().nullable().optional(),delivery:c().optional(),questions:S(Yl).optional()}).passthrough(),ed=p({type:v("agent_reasoning"),text:c()}),td=p({type:v("token_count"),info:Kl.nullable(),rate_limits:Jl.nullable().optional()}),nd=p({type:v("context_compacted")}),od=p({type:v("item_completed"),thread_id:c().optional(),turn_id:c().optional(),item:j().optional()}).passthrough(),sd=p({type:v("turn_aborted"),reason:c().optional(),message:c().optional()}).passthrough(),rd=p({type:v("task_started"),turn_id:c(),model_context_window:h(),collaboration_mode_kind:c()}),id=p({type:v("task_complete"),turn_id:c(),last_agent_message:c().nullable()}),ad=p({type:v("patch_apply_end"),call_id:c(),turn_id:c().optional(),stdout:c().optional(),stderr:c().optional(),success:M(),changes:Ie(c(),j()).optional(),status:c().optional()}).passthrough(),cd=p({type:v("thread_settings_applied"),thread_settings:j()}).passthrough(),ld=p({type:v("exec_command_end"),call_id:c()}).passthrough(),dd=p({type:v("web_search_end")}).passthrough(),ud=p({type:v("thread_goal_updated")}).passthrough(),pd=p({type:v("mcp_tool_call_end")}).passthrough(),md=p({type:v("thread_name_updated")}).passthrough(),fd=p({type:v("thread_rolled_back"),num_turns:h()}).passthrough(),hd=p({type:v("error")}).passthrough(),gd=p({type:v("view_image_tool_call")}).passthrough(),vd=p({type:v("sub_agent_activity"),event_id:c(),occurred_at_ms:h().optional(),agent_thread_id:c(),agent_path:c(),kind:P(["started","interacted","interrupted"])}).passthrough(),yd=ie("type",[Ql,Xl,ed,td,nd,od,sd,rd,id,ad,cd,ld,dd,ud,pd,md,fd,hd,gd,vd]),kd=p({...ae,timestamp:c(),type:v("event_msg"),payload:yd}),pt=p({input_tokens:h(),cached_input_tokens:h(),cache_write_input_tokens:h(),output_tokens:h(),reasoning_output_tokens:h(),total_tokens:h()}).passthrough(),bd=p({...ae,timestamp:c(),type:v("token_usage_record"),payload:p({thread_id:c(),turn_id:c(),session_id:c(),root_turn_id:c(),response_id:c(),usage:pt,turn_token_usage:pt,thread_token_usage:pt}).passthrough()}).passthrough(),_d=p({message:c().optional(),replacement_history:S(j()).optional()}).passthrough(),Sd=p({...ae,timestamp:c(),type:v("compacted"),payload:_d}),wd=p({type:c(),network_access:M().optional(),exclude_tmpdir_env_var:M().optional(),exclude_slash_tmp:M().optional()}),Td=p({cwd:c(),approval_policy:c(),sandbox_policy:wd.optional(),model:c().optional(),effort:c().optional(),summary:c().optional(),turn_id:c().optional(),root_turn_id:c().optional()}).passthrough(),Id=p({...ae,timestamp:c(),type:v("turn_context"),payload:Td}),xd=p({...ae,timestamp:c(),type:v("world_state"),payload:p({full:M().optional(),state:j()}).passthrough()}).passthrough(),Cd=p({...ae,timestamp:c(),type:v("inter_agent_communication_metadata"),payload:p({trigger_turn:M()}).passthrough()}).passthrough();ie("type",[jl,Vl,kd,Sd,Id,xd,Cd,bd]);const Ed=p({total_tokens:h().optional(),input_tokens:h().optional(),output_tokens:h().optional(),cached:h().optional(),input:h().optional(),duration_ms:h().optional(),tool_calls:h().optional()}),jd=p({type:v("init"),timestamp:c().optional(),session_id:c(),model:c().optional()}),Pd=p({type:v("message"),timestamp:c().optional(),role:P(["user","assistant"]),content:c(),delta:M().optional()}),Ad=p({type:v("tool_use"),timestamp:c().optional(),tool_name:c(),tool_id:c(),parameters:Ie(c(),j()).optional()}),Od=p({type:v("tool_result"),timestamp:c().optional(),tool_id:c(),status:P(["success","error"]),output:c().optional(),error:c().optional()}),Fd=p({type:v("result"),timestamp:c().optional(),status:P(["success","error","cancelled"]),stats:Ed.optional(),error:c().optional()}),zd=p({type:v("error"),timestamp:c().optional(),error:c().optional(),message:c().optional(),code:c().optional()});ie("type",[jd,Pd,Ad,Od,Fd,zd]);const Md=p({id:c(),name:c(),response:p({output:c()})}),Rd=p({functionResponse:Md}),Nd=p({id:c(),name:c(),args:Ie(c(),j()),result:S(Rd).optional(),status:P(["success","error","pending"]).optional(),timestamp:c().optional(),resultDisplay:c().optional(),displayName:c().optional(),description:c().optional(),renderOutputAsMarkdown:M().optional()}),$d=p({subject:c(),description:c(),timestamp:c().optional()}),Dd=p({input:h().optional(),output:h().optional(),cached:h().optional(),thoughts:h().optional(),tool:h().optional(),total:h().optional()}),Zd=p({text:c()}),Ld=p({id:c(),timestamp:c(),type:v("user"),content:X([c(),S(Zd)])}),Gd=p({id:c(),timestamp:c(),type:v("gemini"),content:c(),thoughts:S($d).optional(),toolCalls:S(Nd).optional(),tokens:Dd.optional(),model:c().optional()}),Ud=ie("type",[Ld,Gd]);p({sessionId:c(),projectHash:c(),startTime:c(),lastUpdated:c(),messages:S(Ud)});const qd=ie("type",[p({type:v("idle")}),p({type:v("busy")}),p({type:v("retry"),attempt:h(),message:c(),next:h()})]),Ln=p({input:h().optional(),output:h().optional(),reasoning:h().optional(),cache:p({read:h().optional(),write:h().optional()}).optional()}),mt=p({start:h().optional(),end:h().optional(),created:h().optional(),updated:h().optional(),completed:h().optional()}),Hd=p({type:c(),mime:c().optional(),url:c().optional(),filename:c().optional(),id:c().optional(),sessionID:c().optional(),messageID:c().optional()}),Bd=p({id:c(),sessionID:c(),messageID:c(),type:c(),text:c().optional(),time:mt.optional(),reason:c().optional(),snapshot:c().optional(),cost:h().optional(),tokens:Ln.optional(),callID:c().optional(),state:p({status:c().optional(),input:j().optional(),output:j().optional(),error:c().optional(),title:c().optional(),metadata:j().optional(),attachments:S(Hd).optional(),time:p({start:h().optional(),end:h().optional()}).optional()}).optional(),tool:c().optional(),input:j().optional(),output:j().optional(),error:c().optional()}),Wd=p({id:c(),sessionID:c(),role:P(["user","assistant"]),time:mt.optional(),parentID:c().optional(),modelID:c().optional(),providerID:c().optional(),mode:c().optional(),agent:c().optional(),path:p({cwd:c().optional(),root:c().optional()}).optional(),cost:h().optional(),tokens:Ln.optional(),finish:c().optional(),summary:p({title:c().optional(),diffs:S(j()).optional()}).optional(),model:p({providerID:c().optional(),modelID:c().optional()}).optional()}),Vd=p({id:c(),version:c().optional(),projectID:c().optional(),directory:c().optional(),title:c().optional(),time:mt.optional(),summary:p({additions:h().optional(),deletions:h().optional(),files:h().optional()}).optional()}),Jd=p({type:v("server.connected"),properties:p({}).optional()}),Kd=p({type:v("session.status"),properties:p({sessionID:c(),status:qd})}),Qd=p({type:v("session.updated"),properties:p({info:Vd})}),Yd=p({type:v("session.idle"),properties:p({sessionID:c()})}),Xd=p({type:v("session.diff"),properties:p({sessionID:c(),diff:S(j())})}),eu=p({type:v("message.updated"),properties:p({info:Wd})}),tu=p({type:v("message.part.updated"),properties:p({part:Bd,delta:c().optional()})}),nu=p({type:v("message.part.delta"),properties:p({sessionID:c(),messageID:c().optional(),partID:c(),field:c(),delta:c()})}),ou=p({id:c(),sessionID:c(),permission:c(),patterns:S(c()).optional(),metadata:Ie(c(),j()).optional(),always:S(c()).optional(),tool:p({messageID:c(),callID:c()}).partial().optional()}),su=p({type:v("permission.asked"),properties:ou}),ru=p({question:c(),header:c(),options:S(p({label:c(),description:c().optional()})),multiple:M().optional(),custom:M().optional()}),iu=p({type:v("question.asked"),properties:p({id:c(),sessionID:c(),questions:S(ru)})});ie("type",[Jd,Kd,Qd,Yd,Xd,eu,tu,nu,su,iu]);const au=["ya-whisper","ya-parakeet","ya-nemo","ya-granite","ya-qwen"];new Set(au);const cu=/^(?:-{2,}\s*)?\((?:\d+\w* (?:ago|later)(?:, had seen: "[^"\n]*")?|had seen: "[^"\n]*")\)\s*/,lu=/^\[sent [^\]\n]+\]\s*/,du=/\s*\[sent [^\]\n]+\]\s*$/;function uu(e){return e.replace(cu,"").replace(lu,"").replace(du,"")}function Gn(e){var r;const t=e.trim(),n=t.match(/^(\d+(?:\.\d+)?)\s*([KMGT]?B)$/i);if(!n)return t;const o=Number(n[1]);if(!Number.isFinite(o))return t;const s=(n[2]??"").toUpperCase();return s==="B"?`${Math.round(o)} b`:s==="KB"?`${Math.round(o)} kb`:`${Math.round(o*10)/10} ${((r=s[0])==null?void 0:r.toLowerCase())??""}b`}function pu(e){const t=[],n=[`
|
|
40
|
+
|
|
41
|
+
User uploaded files in .attachments:
|
|
42
|
+
`,`
|
|
43
|
+
|
|
44
|
+
User uploaded files:
|
|
45
|
+
`],o=n.map(d=>e.indexOf(d)).filter(d=>d!==-1).sort((d,u)=>d-u)[0];if(o===void 0)return{textWithoutUploads:e,uploadedFiles:[]};const s=n.find(d=>e.startsWith(d,o));if(!s)return{textWithoutUploads:e,uploadedFiles:[]};const r=e.slice(0,o),i=e.slice(o+s.length),a=/^- \[(.+?)\]\((?:<(.+?)>|(.+?))\) \(([^,]+), ([^,()]+?)(?:, (\d+)x(\d+))?\)$/,l=/^- (.+?) \(([^,]+), ([^)]+)\): (.+)$/;for(const d of i.split(`
|
|
46
|
+
`)){const u=d.match(a);if(u){t.push({originalName:u[1]??"",path:u[2]??u[3]??"",size:Gn(u[4]??""),mimeType:u[5]??"",width:u[6]?Number(u[6]):void 0,height:u[7]?Number(u[7]):void 0});continue}const m=d.match(l);m&&t.push({originalName:m[1]??"",size:Gn(m[2]??""),mimeType:m[3]??"",path:m[4]??""})}return{textWithoutUploads:r,uploadedFiles:t}}function mu(e){const t=uu(e),{textWithoutUploads:n,uploadedFiles:o}=pu(t);return{text:Zo(n),openedFiles:Go(n),uploadedFiles:o}}const fu=[/^<recommended_plugins>[\s\S]*?<\/recommended_plugins>/iu,/^# AGENTS\.md instructions[^\r\n]*(?:\r?\n)+\s*<INSTRUCTIONS>[\s\S]*?<\/INSTRUCTIONS>/iu,/^<environment_context>[\s\S]*?<\/environment_context>/iu];function hu(e){return e.some(t=>typeof t.codexUserTurnProvenance=="string")}function gu(e){return e.some(t=>t._source==="sdk")}function vu(e){let t=e.trim(),n=!1;for(;t;){const o=fu.map(s=>s.exec(t)).find(s=>(s==null?void 0:s.index)===0);if(!(o!=null&&o[0]))return!1;n=!0,t=t.slice(o[0].length).trimStart()}return n}function ft(e,t=[]){return hu(t)||gu(t)?!1:vu(e)}function yu(e,t=[]){return ft(e,t)?e.trimStart().startsWith("<environment_context>"):!1}function Le(e){if(!Array.isArray(e))return;const t=e.filter(n=>!!n&&typeof n=="object"&&typeof n.text=="string"&&typeof n.filePath=="string");return t.length>0?t:void 0}const ku=/^[a-zA-Z]:\//,Un=/^([a-zA-Z]):/;function Ge(e){return e.replace(/\\/g,"/").replace(/^\/([a-zA-Z]:\/)/,"$1")}function bu(e){const t=Ge(e);return t==="/"||/^[a-zA-Z]:\/$/.test(t)?t.replace(Un,(n,o)=>`${o.toUpperCase()}:`):t.replace(Un,(n,o)=>`${o.toUpperCase()}:`).replace(/\/+$/,"")}function _u(e){const t=Ge(e);return t.startsWith("/")||t.startsWith("//")||ku.test(t)}function Su(e){return Ge(e).replace(/^\.\/+/,"")}function wu(e,t){return null}function ht(e){const t=bu(e);if(!t)return e;if(/^[a-zA-Z]:\/$/.test(t)||t==="/")return t;const n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return n>=0&&t.slice(n+1)||t}function Tu(e){const t=Ge(e),n=[/^\/home\/[^/]+/,/^\/Users\/[^/]+/,/^[a-zA-Z]:\/Users\/[^/]+/];for(const o of n)if(o.test(t))return t.replace(o,"~");return _u(e)?e:Su(e)}function qn(e,t){const n=wu();return n!==null?n:Tu(e)}const Hn={shell_command:"Bash",exec_command:"Bash",write_stdin:"WriteStdin",wait:"WriteStdin",update_plan:"UpdatePlan",apply_patch:"Edit",web_search_call:"WebSearch",search_query:"WebSearch",Agent:"Task",view_image:"ViewImage",imageView:"ViewImage"};function Ue(e){return Hn[e]??Hn[e.toLowerCase()]??e}const Iu={read:"read",grep:"search",search:"search",grepsearch:"search",grep_search:"search",glob:"list",ls:"list",list:"list",listdir:"list",list_dir:"list","list-dir":"list"};function qe(e){return Iu[Ue(e).toLowerCase()]??null}const xu=300*1e3;function Bn(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function He(e,t){if(!Bn(e))return"";for(const n of t){const o=e[n];if(typeof o=="string"&&o.trim())return o.trim()}return""}function gt(e,t){if(Bn(e))for(const n of t){const o=e[n];if(typeof o=="number"&&Number.isInteger(o)&&o>0)return o}}function Wn(e,t){return`${e}:${t}`}function Cu(e,t,n){const o={id:Wn(e,n),parentId:e,sourceIndex:n};switch(t.kind){case"read":return!t.path||!t.name?null:{...o,kind:"read",path:t.path,...t.absolutePath?{absolutePath:t.absolutePath}:{},name:t.name,...t.startLine!==void 0?{startLine:t.startLine}:{},...t.endLine!==void 0?{endLine:t.endLine}:{}};case"search":return t.query?{...o,kind:"search",query:t.query,...t.path?{path:t.path}:{}}:null;case"list":return{...o,kind:"list",...t.path?{path:t.path}:{}};default:return null}}function Eu(e){if(!e.displayActions||e.displayActions.length===0)return null;const t=e.displayActions.map((n,o)=>Cu(e.id,n,o));return t.every(n=>n!==null)?t:null}function ju(e){const t=qe(e.toolName);if(!t)return null;const n={id:Wn(e.id,0),parentId:e.id,sourceIndex:0,kind:t};if(t==="read"){const s=He(e.toolInput,["file_path","target_file","path"]),r=gt(e.toolInput,["start_line","startLine","offset"]),i=gt(e.toolInput,["end_line","endLine"]),a=gt(e.toolInput,["limit"]),l=i??(r!==void 0&&a!==void 0?r+a-1:void 0);return{...n,...s?{path:s,name:ht(s)}:{},...r!==void 0?{startLine:r}:{},...l!==void 0?{endLine:l}:{}}}if(t==="search"){const s=He(e.toolInput,["pattern","query"]),r=He(e.toolInput,["path","target_directory","directory","glob"]);return{...n,...s?{query:s}:{},...r?{path:r}:{}}}const o=He(e.toolInput,["path","target_directory","directory"]);return{...n,...o?{path:o}:{}}}function Pu(e){const t=Eu(e);if(t)return{item:e,entries:t};const n=ju(e);return n?{item:e,entries:[n]}:null}function Au(e,t){const n=R(e.item.sourceMessages),o=R(t.item.sourceMessages);return n===null||o===null?!1:Math.abs(o-n)>xu}function Ou(e){var o,s;const t=((o=e[0])==null?void 0:o.item.id)??"start",n=((s=e[e.length-1])==null?void 0:s.item.id)??"end";return{id:`explored-${t}-${n}`,disclosureOwnerId:t,parents:[...e],entries:e.flatMap(r=>r.entries)}}function Fu(e){const t=[];let n=[];const o=()=>{var s;n.length>=2||n.length===1&&(((s=n[0])==null?void 0:s.entries.length)??0)>=2?t.push({kind:"explored",projection:Ou(n)}):n[0]&&t.push({kind:"item",item:n[0].item}),n=[]};for(const s of e){const r=s.type==="tool_call"?Pu(s):null;if(!r){o(),t.push({kind:"item",item:s});continue}const i=n[n.length-1];i&&Au(i,r)&&o(),n.push(r)}return o(),t}function Vn(e){return Fu(e).map(t=>t.kind==="item"?t:{kind:"explored",id:t.projection.id,items:t.projection.parents.map(n=>n.item),projection:t.projection})}function vt(e){const t=qe(e);return t==="search"?Ue(e)==="Grep"?"Grep":"Search":t==="list"?"List":"Read"}function zu(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Y(e,t){if(!zu(e))return"";const n=e[t];return typeof n=="string"?n.trim():""}function yt(e,t){return qn(e)}function Mu(e,t){const n=Y(e,"pattern")||Y(e,"query"),o=Y(e,"path")||Y(e,"target_directory")||Y(e,"directory"),s=Y(e,"glob"),r=o||s;return n&&r?`${n} in ${o?yt(o):s}`:n||r||"search"}function Ru(e,t){const n=Y(e,"pattern"),o=Y(e,"path")||Y(e,"target_directory")||Y(e,"directory");return n&&o?`${n} in ${yt(o)}`:o?yt(o):n||"files"}function Jn(e,t){const n=qe(e.toolName);if(n==="search")return Mu(e.toolInput);if(n==="list")return Ru(e.toolInput);const o=Y(e.toolInput,"file_path")||Y(e.toolInput,"target_file");return o?ht(qn(o)):"file"}function Nu(e,t){const n=Jn(e);return n?`${vt(e.toolName)}: ${n}`:vt(e.toolName)}function $u(e,t){var o;const n=[vt(e.toolName),Jn(e),(o=e.toolResult)==null?void 0:o.content];return Array.from(new Set(n.filter(s=>typeof s=="string").map(s=>s.trim()).filter(Boolean))).join(`
|
|
47
|
+
`)}function Kn(e,t){return e.entries.length===1&&qe(e.item.toolName)===t.kind}function Qn(e,t){return Kn(e,t)?t.kind==="search"&&Ue(e.item.toolName)==="Grep"?"Grep":t.kind==="list"?"List":t.kind==="search"?"Search":"Read":t.kind==="search"?"Search":t.kind==="list"?"List":"Read"}function Yn(e){return e.startLine===void 0?"":e.endLine!==void 0&&e.endLine!==e.startLine?`lines ${e.startLine}-${e.endLine}`:`line ${e.startLine}`}function Xn(e){return e.kind==="read"?[e.path??e.absolutePath??e.name??"file",Yn(e)].filter(Boolean).join(" "):e.kind==="search"?e.path?`${e.query??"search"} in ${e.path}`:e.query??"search":e.path??"files"}function Du(e,t){return Array.from(new Set([Qn(e,t),Xn(t),t.path,t.absolutePath,t.name,t.query,Yn(t)].filter(n=>!!(n!=null&&n.trim())))).join(`
|
|
48
|
+
`)}function eo(e){return e.type==="system"&&e.subtype==="compact_boundary"}function Zu(e){return e.sourceMessages.some(t=>t.type==="system"&&t.subtype==="compact_boundary")}function Lu(e){const t=[],n=[];for(const o of e)typeof o=="string"&&o.startsWith("compactMetadata:")?t.push(o):n.push(o);return[...n,...t]}function Gu(e){const t=e[0];if(!t)throw new Error("Cannot merge an empty compact boundary run");const n=e.find(Zu)??t,o=e.flatMap(r=>r.sourceMessages),s=Lu(e.flatMap(r=>r.details??[]));return{type:"system",id:n.id,subtype:"compact_boundary",content:n.content,status:n.status,configChanged:n.configChanged,isSubagent:n.isSubagent,sourceMessages:o,details:s.length>0?s:void 0}}function Uu(e){const t=[];let n=0;for(;n<e.length;){const o=e[n];if(!o||!eo(o)){o&&t.push(o),n+=1;continue}const s=[o];let r=n+1;for(;r<e.length;){const i=e[r];if(!i||!eo(i))break;s.push(i),r+=1}t.push(Gu(s)),n=r}return t}const qu=/<command-name>([\s\S]*?)<\/command-name>/,Hu=/<command-message>[\s\S]*?<\/command-message>/g,Bu=/<command-args>([\s\S]*?)<\/command-args>/,Wu=/<command-name>[\s\S]*?<\/command-name>/g,Vu=/<command-args>[\s\S]*?<\/command-args>/g,Ju=/<local-command-caveat>[\s\S]*?<\/local-command-caveat>/g,Ku=/^(?:\s*<local-command-caveat>[\s\S]*?<\/local-command-caveat>\s*)+$/,Qu=/^\s*<local-command-stdout>([\s\S]*?)<\/local-command-stdout>\s*$/,Yu=new RegExp("\x1B\\[[\\d;:? ]*[ -/]*[@-~]","g");function to(e){var s,r,i,a;const t=(r=(s=e.match(qu))==null?void 0:s[1])==null?void 0:r.trim();if(!t||e.replace(Ju,"").replace(Wu,"").replace(Hu,"").replace(Vu,"").trim())return null;const o=((a=(i=e.match(Bu))==null?void 0:i[1])==null?void 0:a.trim())??"";return{command:t,args:o}}function no(e){return e.args?`${e.command} ${e.args}`:e.command}function oo(e){return Ku.test(e)}function so(e){var n;const t=e.match(Qu);return((n=t==null?void 0:t[1])==null?void 0:n.replace(Yu,"").trim())??null}function ro(e){const t=e.replace(/\s+/g," ").trim().toLowerCase();return t==="compacted"||t.startsWith("compacted (")}function Be(e){return e.uuid??e.id??""}const Xu="<task-notification>",ep="</task-notification>";function tp(e){var n;const t=((n=e.message)==null?void 0:n.content)??e.content;return typeof t=="string"?t:void 0}function np(e){const t=e.trim();return t.startsWith(Xu)&&t.endsWith(ep)}function op(e){const t=e.origin;if((t==null?void 0:t.kind)==="task-notification")return!0;const n=tp(e);return n!==void 0&&np(n)}function ke(e,t){var s;const n=new RegExp(`<${t}>([\\s\\S]*?)</${t}>`).exec(e),o=(s=n==null?void 0:n[1])==null?void 0:s.trim();return o||void 0}function sp(e){return{taskId:ke(e,"task-id"),toolUseId:ke(e,"tool-use-id"),outputFile:ke(e,"output-file"),status:ke(e,"status"),summary:ke(e,"summary"),event:ke(e,"event")}}function rp(e){const t=e.match(/(?:^|\n)\s*(?:Error:\s*)?(?:Process exited with code|Exit code:?)\s*(-?\d+)\b/i);if(t!=null&&t[1])return Number.parseInt(t[1],10)}function ip(e){const t=e.match(/(?:^|\n)\s*Wall time:?\s+([^\n]+)\s*(?:\n|$)/i);if(t!=null&&t[1])return t[1].trim()}const ap=/(?:^|\n)\s*Script\s+running\s+with\s+cell\s+ID\s+(\w+)\b/i;function io(e){var t;return(t=ap.exec(e))==null?void 0:t[1]}function ao(e,t={}){const n=e.match(/(?:^|\n)\s*Output:\s*\n([\s\S]*)$/i),o=t.bareExitCodeIsEnvelope?e.match(/^\s*(?:Error:\s*)?(?:Process exited with code|Exit code:?)\s*(-?\d+)\b[^\n]*(?:\n|$)/i):null,s=!!n||!!o,r=((n==null?void 0:n[1])??(o?e.slice(o[0].length):e)).trimEnd(),i=n?rp(e):o!=null&&o[1]?Number.parseInt(o[1],10):void 0;return{output:r,exitCode:i,wallTime:ip(e),hasEnvelope:s}}function co(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function cp(e){if(!e||typeof e!="object")return{};const t=e,n=co(t.exitCode??t.exit_code),o=co(t.durationSeconds??t.wall_time_seconds);return{...n!==void 0?{exitCode:n}:{},...o!==void 0?{durationSeconds:o}:{}}}function lp(e){const t=[];if(typeof e.content=="string")t.push(e.content);else if(Array.isArray(e.content))for(const a of e.content)a.type==="text"&&a.text&&t.push(a.text);const n=t.join(`
|
|
49
|
+
`);if(!n)return;const o=dp(e),s=n.match(/^agentId:\s*(\S+)/m);if(!s)return;const r={agentId:s[1],status:"completed"};o&&o.length>0&&(r.content=o);const i=n.match(/<usage>([\s\S]*?)<\/usage>/);if(i!=null&&i[1]){const a=i[1],l=a.match(/total_tokens:\s*(\d+)/),d=a.match(/tool_uses:\s*(\d+)/),u=a.match(/duration_ms:\s*(\d+)/);l!=null&&l[1]&&(r.totalTokens=Number(l[1])),d!=null&&d[1]&&(r.totalToolUseCount=Number(d[1])),u!=null&&u[1]&&(r.totalDurationMs=Number(u[1]))}return r}function lo(e){return e.replace(/^agentId:\s*\S+.*$/gm,"").replace(/<usage>[\s\S]*?<\/usage>/g,"").trim()}function dp(e){if(typeof e.content=="string"){const n=lo(e.content);return n?[{type:"text",text:n}]:void 0}if(!Array.isArray(e.content))return;const t=[];for(const n of e.content)if(!(!n||typeof n!="object")){if(n.type==="text"&&typeof n.text=="string"){const o=lo(n.text);if(!o)continue;t.push({...n,text:o});continue}t.push(n)}return t.length>0?t:void 0}function kt(e){return typeof e=="string"?e:e.map(t=>t.type==="text"&&typeof t.text=="string"?t.text:"").filter(Boolean).join(`
|
|
50
|
+
`)}function up(e){return e.type==="system"&&e.subtype==="local_command"}function pp(e){return e.type!=="user_prompt"||!e.sourceMessages.some(t=>t.isMeta===!0)?!1:kt(e.content).trimStart().startsWith("Base directory for this skill:")}function uo(e){const t=e.promptId;return typeof t=="string"&&t?t:null}function mp(e,t){const n=new Set(e.sourceMessages.map(Be).filter(Boolean)),o=t.sourceMessages.map(i=>typeof i.parentUuid=="string"?i.parentUuid:null).filter(i=>i!==null);if(o.length>0&&n.size>0)return o.some(i=>n.has(i));const s=new Set(e.sourceMessages.map(uo).filter(i=>i!==null)),r=t.sourceMessages.map(uo).filter(i=>i!==null);return r.length>0&&s.size>0?r.some(i=>s.has(i)):!0}function fp(e,t){return{...e,sourceMessages:[...e.sourceMessages,...t.sourceMessages],details:[...e.details??[],t.content]}}function hp(e){const t=[];let n=0;for(;n<e.length;){const o=e[n],s=e[n+1];if(o&&s&&up(o)&&pp(s)&&mp(o,s)){t.push(fp(o,s)),n+=2;continue}o&&t.push(o),n+=1}return t}const gp=/\s*\(disable recaps in \/config\)\s*$/u;function vp(e){return e.replace(gp,"")}function yp(e,t,n){const o=[],s=new Map,r=new Map,i={lastSignature:null},a=kp(e);for(const l of e)Ep(l,o,s,r,a,i,t,n);return o}function kp(e,t){const n=new Set;e.length;for(let o=0;o<e.length;o++){const s=e[o];if(s!=null&&s.orphanedToolUseIds)for(const r of s.orphanedToolUseIds)n.add(r)}return n}const bp="Reasoning [internal]";function po(e){var t;return((t=e.message)==null?void 0:t.content)??e.content}const _p="This session is being continued from a previous conversation that ran out of context";function Sp(e){var s;const t=po(e);if(t===void 0)return!1;const n=typeof t=="string"?t:kt(t);if(!No(n))return!1;const o=((s=e.message)==null?void 0:s.role)??e.role;return e.type==="user"||o==="user"}function mo(e){var r;if(e.isCompactSummary===!0)return!0;const t=po(e);if(t===void 0||!(typeof t=="string"?t:kt(t)).trimStart().startsWith(_p))return!1;const s=((r=e.message)==null?void 0:r.role)??e.role;return e.type==="user"||s==="user"}function fo(e){const t=e.trim().replace(/^\/+/,"").toLowerCase();return t==="compact"||t==="compress"}function wp(e){if(typeof e!="string"||oo(e))return null;const t=to(e);if(t)return fo(t.command)?null:no(t);const n=so(e);if(n!==null)return n?ro(n)?null:n:null;const o=e.trim();return o||null}function Tp(e){const t=e.details;if(!Array.isArray(t))return;const n=t.filter(o=>typeof o=="string"&&!!o.trim());return n.length>0?n:void 0}function Ip(e){const t=e.compactMetadata;return Mp(t)?`compactMetadata:
|
|
51
|
+
${JSON.stringify(t,null,2)}`:null}function xp(e){const t=[],n=e.compactSummaryText;typeof n=="string"&&n.trim()&&t.push(n.trim());const o=Ip(e);return o&&t.push(o),t}function ho(e){return e===void 0?[]:[e]}function Cp(e){const t=e==null?void 0:e.trim();return!!t&&t!==bp}function go(e){var t;for(let n=e.length-1;n>=0;n--){const o=e[n];if((o==null?void 0:o.type)==="text"&&((t=o.text)!=null&&t.trim()))return n}return-1}function Ep(e,t,n,o,s,r,i,a){var w,x,q,C,ue,V,L,B;const l=Be(e);if(Wc(e)||Sp(e))return;if(Vc(e)){t.push({type:"system",id:l,subtype:"no_model_turn",content:"Session continued without running a turn",sourceMessages:[e],isSubagent:e.isSubagent});return}if(e.type==="error"){const _=typeof e.error=="string"&&e.error||typeof e.content=="string"&&e.content||"Agent error",T={type:"system",id:l||`error-${e.timestamp??Date.now()}`,subtype:e.codexWillRetry===!0?"warning":"error",content:_,sourceMessages:[e]};t.push(T);return}if(e.type==="system"){const _=e.subtype??"unknown";if(_==="informational"){typeof e.content=="string"&&e.content.trim()&&t.push({type:"system",id:l,subtype:e.level==="warning"?"warning":"informational",content:e.content,sourceMessages:[e],isSubagent:e.isSubagent});return}if(_==="local_command"){const T=wp(e.content);T!==null&&t.push({type:"system",id:l,subtype:_,content:T,details:Tp(e),sourceMessages:[e],isSubagent:e.isSubagent});return}if(_==="rewound_group"){t.push({type:"system",id:l,subtype:_,content:typeof e.content=="string"?e.content:"",sourceMessages:[e]});return}if(_==="tool_output"){const T=typeof e.codexToolName=="string"?e.codexToolName:"",J=[typeof e.codexToolNamespace=="string"?e.codexToolNamespace:"",T].filter(Boolean).join("."),Ke=typeof e.content=="string"?e.content:"";t.push({type:"system",id:l,subtype:_,content:J,details:Ke?[Ke]:[],sourceMessages:[e],isSubagent:e.isSubagent});return}if(_==="compact_boundary"||_==="turn_aborted"||_==="config_ack"||_==="away_summary"||_==="subagent_activity"){const T=_==="config_ack"?jp(e):null,ce=typeof e.content=="string"?e.content:_==="turn_aborted"?"Turn aborted":_==="config_ack"?"Configuration updated":_==="away_summary"?"Recap unavailable":_==="subagent_activity"?"Subagent updated":"Context compacted",J={type:"system",id:l,subtype:_,content:_==="away_summary"?vp(ce):ce,sourceMessages:[e],..._==="compact_boundary"?{details:xp(e)}:{},..._==="config_ack"?{configChanged:e.configMismatch===!0&&T!==null&&T!==r.lastSignature}:{}};t.push(J),_==="config_ack"&&T!==null&&(r.lastSignature=T)}return}e.type==="assistant"&&((w=a==null?void 0:a.onAssistantMessage)==null||w.call(a,{msgId:l,uuid:e.uuid,id:e.id,_isStreaming:e._isStreaming}));const d=((x=e.message)==null?void 0:x.content)??e.content,u=((q=e.message)==null?void 0:q.role)??e.role,m=e.type==="user"||u==="user";if(typeof d=="string"){if(m){if(mo(e)){t.push({type:"system",id:l,subtype:"compact_boundary",content:"Context compacted",details:ho(d),sourceMessages:[e],isSubagent:e.isSubagent});return}if(e.isMeta===!0&&oo(d))return;const _=to(d);if(_){if(fo(_.command))return;t.push({type:"system",id:l,subtype:"local_command",content:no(_),sourceMessages:[e],isSubagent:e.isSubagent});return}const T=so(d);if(T!==null){if(!T||ro(T))return;t.push({type:"system",id:l,subtype:"local_command",content:T,sourceMessages:[e],isSubagent:e.isSubagent});return}if(op(e)){const ce=sp(d);t.push({type:"task_notification",id:l,raw:d,sourceMessages:[e],isSubagent:e.isSubagent,...ce});return}t.push({type:"user_prompt",id:l,content:d,projectPathLinks:Le(e._projectPathLinks),sourceMessages:[e],isSubagent:e.isSubagent});return}if(d.trim()){const _=e._html;t.push({type:"text",id:l,text:d,sourceBlockIndex:0,sourceMessages:[e],isSubagent:e.isSubagent,augmentHtml:_??((ue=(C=i==null?void 0:i.markdown)==null?void 0:C[l])==null?void 0:ue.html)})}return}if(!Array.isArray(d))return;if(m&&d.every(_=>_.type==="tool_result")){for(const _ of d)_.type==="tool_result"&&_.tool_use_id&&Ap(_,e,t,o,a);return}if(m){if(mo(e)){t.push({type:"system",id:l,subtype:"compact_boundary",content:"Context compacted",details:ho(d),sourceMessages:[e],isSubagent:e.isSubagent});return}t.push({type:"user_prompt",id:l,content:d,sourceMessages:[e],isSubagent:e.isSubagent});return}const k=e._isStreaming?go(d):-1,I=e.isAbortedMidStream===!0&&!e._isStreaming?go(d):-1;for(let _=0;_<d.length;_++){const T=d[_];if(!T)continue;const ce=`${l}-${_}`;if(T.type==="text"){if((V=T.text)!=null&&V.trim()){const J=T._html;t.push({type:"text",id:ce,text:T.text,sourceBlockIndex:_,sourceMessages:[e],isSubagent:e.isSubagent,isStreaming:e._isStreaming&&_===k,augmentHtml:J??((B=(L=i==null?void 0:i.markdown)==null?void 0:L[l])==null?void 0:B.html),..._===I?{abortedMidStream:!0}:{}})}}else if(T.type==="thinking"){const J=T.thinking;Cp(J)&&t.push({type:"thinking",id:ce,thinking:J,sourceBlockIndex:_,signature:void 0,status:e._isStreaming?"streaming":"complete",sourceMessages:[e],isSubagent:e.isSubagent})}else if(T.type==="tool_use"&&T.id&&T.name){const J=n.get(T.id);if(J!==void 0){const xe=t[J];(xe==null?void 0:xe.type)==="tool_call"&&(t[J]=Pp(xe,e,T.input,T._displayActions),xe.status==="pending"&&o.set(T.id,J));continue}const Ke=s.has(T.id),Fm={type:"tool_call",id:T.id,toolName:T.name,toolInput:T.input,...T._displayActions?{displayActions:T._displayActions}:{},toolResult:void 0,status:Ke?"incomplete":"pending",sourceMessages:[e],isSubagent:e.isSubagent},zo=t.length;n.set(T.id,zo),o.set(T.id,zo),t.push(Fm)}}}function jp(e){const t=typeof e.configModel=="string"?e.configModel.trim():"",n=typeof e.configThinking=="string"?e.configThinking.trim():"";return t||n?`${t}::${n}`:typeof e.content=="string"?e.content.trim():null}function vo(e,t){const n=Be(t);return e.sourceMessages.some(o=>Be(o)===n)?e:{...e,sourceMessages:[...e.sourceMessages,t]}}function Pp(e,t,n,o){return{...vo(e,t),toolInput:n,displayActions:o}}function Ap(e,t,n,o,s){var w;const r=e.tool_use_id;if(!r)return;const i=o.get(r);if(i===void 0){s!=null&&s.onUnmatchedToolResult?s.onUnmatchedToolResult({toolUseId:r,message:t}):console.warn(`Tool result for unknown tool_use: ${r}`);return}const a=n[i];if((a==null?void 0:a.type)!=="tool_call")return;let l=t.toolUseResult??t.tool_use_result;!l&&(a.toolName==="Agent"||a.toolName==="Task")&&(l=lp(e)),l=Op(a,e,l);const d=Le(e._projectPathLinks),u={content:typeof e.content=="string"?e.content:"",isError:e.is_error||!1,structured:l,...d?{projectPathLinks:d}:{},...(w=t.toolResultMedia)!=null&&w.some(x=>x.toolCallId===e.tool_use_id)?{media:t.toolResultMedia.filter(x=>x.toolCallId===e.tool_use_id)}:{}},m=Fp(e,a.toolName),y=zp(e,u,a.toolName);let k="complete";y||a.status==="aborted"?k="aborted":m?k=a.status==="incomplete"?"incomplete":"pending":e.is_error&&(k="error");const I={type:"tool_call",id:a.id,toolName:a.toolName,toolInput:a.toolInput,...a.displayActions?{displayActions:a.displayActions}:{},toolResult:u,status:k,sourceMessages:vo(a,t).sourceMessages,isSubagent:a.isSubagent};n[i]=I,!m&&!y&&o.delete(r)}function Op(e,t,n){if(e.toolName!=="Bash"||t.is_error!==!0)return n;const o=typeof n=="string"?n:typeof t.content=="string"?t.content:"",s=ao(o,{bareExitCodeIsEnvelope:!0});return!s.hasEnvelope||s.exitCode===void 0?n:{stdout:s.output,stderr:"",interrupted:!1,isImage:!1,exitCode:s.exitCode}}function Fp(e,t){if(t!=="Bash")return!1;const n=typeof e.content=="string"?e.content:"";return n?/(?:^|\n)\s*(?:Process\s+running\s+with\s+session\s+ID|session(?:\s+id)?)\s*:?\s*\d+\b/i.test(n)&&!/(?:^|\n)\s*(?:Exit code:|Process exited with code)\s*-?\d+\b/i.test(n):!1}function zp(e,t,n){if(n!=="Bash")return!1;if(t.structured&&typeof t.structured=="object"&&t.structured.interrupted===!0)return!0;const o=typeof e.content=="string"?e.content:"";return/(?:^|\n)\s*(?:aborted by user|interrupted by user)(?:\s|$)/i.test(o)}function Mp(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}const Rp=5e3;function yo(e){return typeof e=="string"?e:e.filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(`
|
|
52
|
+
`)}function bt(e){const t=yo(e.content).trimStart();return ft(t,e.sourceMessages)}function Np(e){return yu(yo(e.content),e.sourceMessages)}function ko(e){const t=e.sourceMessages.map(n=>typeof n.timestamp=="string"?Date.parse(n.timestamp):NaN).find(Number.isFinite);return t===void 0?null:t}function $p(e,t){if(!Np(e)||(t==null?void 0:t.type)!=="user_prompt"||bt(t))return!1;const n=ko(e),o=ko(t);if(n===null||o===null)return!1;const s=o-n;return s>=0&&s<=Rp}function Dp(e){const t=[];let n=0;for(;n<e.length;){const o=e[n];if((o==null?void 0:o.type)!=="user_prompt"||!bt(o)){t.push(o),n+=1;continue}const s=[];let r=n;for(;r<e.length;){const l=e[r];if((l==null?void 0:l.type)!=="user_prompt"||!bt(l))break;s.push(l),r+=1}const i=s.length===1?s[0]:void 0;if(i!==void 0&&$p(i,e[r])){n=r;continue}if(s.length>1||n===0){const l=s[0];if(!l){n=r;continue}const d={type:"session_setup",id:`session-setup-${l.id}`,title:"Session setup",prompts:s.map(u=>u.content),sourceMessages:s.flatMap(u=>u.sourceMessages)};t.push(d)}else{const l=s[0];l&&t.push(l)}n=r}return t}function ee(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Zp(e){if(ee(e)){if(typeof e.command=="string"&&e.command.trim().length>0)return e.command;if(typeof e.cmd=="string"&&e.cmd.trim().length>0)return e.cmd}}function de(e){if(typeof e=="number"&&Number.isFinite(e))return String(Math.trunc(e));if(typeof e=="string"&&e.trim().length>0)return e.trim()}function bo(e){if(ee(e))return de(e.session_id??e.sessionId)}function _o(e){var r,i;const t=(r=e.toolResult)==null?void 0:r.structured;if(ee(t)){const a=de(t.session_id??t.sessionId);if(a)return a}const n=((i=e.toolResult)==null?void 0:i.content)??"",s=(typeof n=="string"?n:"").match(/(?:^|\n)\s*(?:Process\s+running\s+with\s+session\s+ID|session[_\s]?id|session)\s*[:=]?\s*(\d+)\b/i);if(s!=null&&s[1])return s[1]}function _t(e){if(ee(e))return de(e.cell_id??e.cellId)}function We(e){var n;const t=((n=e.toolResult)==null?void 0:n.content)??"";return io(typeof t=="string"?t:"")}function Lp(e,t){return!ee(e)||typeof e.linked_command=="string"&&e.linked_command.trim()?e:{...e,linked_command:t}}function Gp(e,t){return!ee(e)||typeof e.linked_file_path=="string"&&e.linked_file_path.trim()?e:{...e,linked_file_path:t}}function Up(e,t){return!ee(e)||typeof e.linked_tool_name=="string"&&e.linked_tool_name.trim()?e:{...e,linked_tool_name:t}}function St(e){const t=e.toLowerCase();return t==="bash"||t==="exec_command"||t==="shell_command"}function So(e){const t=e.toLowerCase();return t==="read"||t==="write"||t==="edit"}function qp(e){if(!ee(e)||typeof e.file_path!="string")return;const t=e.file_path.trim();return t.length>0?t:void 0}const Hp=/(?:Command|Process)\s+running\s+(?:in\s+background\s+with\s+ID|with\s+session\s+ID)\s*:?\s*([\w-]+)/i,Bp=/(?:^|\n)\s*Process exited with code \d+/i,Wp=/^(completed|failed|killed|stopped|success|error|done)/i;function G(e,t){return ee(e)?e[t]:void 0}function Vp(e){return e==="taskoutput"||e==="task_output"||e==="get_command_or_subagent_output"}function Jp(e){return e==="killshell"||e==="kill_shell"||e==="kill_command_or_subagent"}function Kp(e){return e==="completed"||e==="failed"||e==="cancelled"}function wo(e){var n;const t=(n=e.toolResult)==null?void 0:n.content;return typeof t=="string"?t:""}function Qp(e){var o;const t=new Set,n=(...s)=>{for(const r of s)r&&t.add(r)};for(const s of e){if(s.type==="task_notification"){s.status&&Wp.test(s.status)&&n(s.taskId,s.toolUseId&&`tool:${s.toolUseId}`);continue}if(s.type!=="tool_call")continue;const r=s.toolName.toLowerCase(),i=s.toolInput,a=(o=s.toolResult)==null?void 0:o.structured;if(r==="bashoutput"||r==="bash_output"){const l=de(G(a,"shellId")??G(i,"bash_id")),d=G(a,"status"),u=typeof G(a,"exitCode")=="number";l&&(u||d==="completed"||d==="failed")&&n(l)}else if(Vp(r)){const l=G(a,"tasks"),d=Array.isArray(l)?l:[G(a,"task")];for(const u of d)Kp(G(u,"status"))&&n(de(G(u,"task_id")??G(i,"task_id")))}else if(Jp(r))n(de(G(a,"shell_id")??G(a,"task_id")??G(i,"shell_id")??G(i,"task_id")));else if((r==="writestdin"||r==="write_stdin"||r==="wait")&&(typeof G(a,"exit_code")=="number"||Bp.test(wo(s)))){const d=bo(i),u=_t(i);n(d&&`session:${d}`,u&&`cell:${u}`)}}return e.map(s=>{var k;if(s.type!=="tool_call"||s.status!=="complete"||!St(s.toolName))return s;const r=wo(s),i=[`tool:${s.id}`];let a=G(s.toolInput,"run_in_background")===!0;const l=de(G((k=s.toolResult)==null?void 0:k.structured,"backgroundTaskId"));l&&(a=!0,i.push(l,`session:${l}`));const d=r.match(Hp);d!=null&&d[1]&&(a=!0,i.push(d[1]),/session\s+ID/i.test(d[0])&&i.push(`session:${d[1]}`));const u=io(r);if(u&&(a=!0,i.push(`cell:${u}`)),!a)return s;const m=i.some(I=>t.has(I)),y=ee(s.toolInput)?s.toolInput:{};return{...s,toolInput:{...y,_backgroundTaskStatus:m?"completed":"running"}}})}function Yp(e){const t=new Map,n=new Map;return e.map(o=>{if(o.type!=="tool_call")return o;if(St(o.toolName)||So(o.toolName)){const m=_o(o),y=We(o);if(!m&&!y)return o;const k=St(o.toolName)?Zp(o.toolInput):void 0,I=So(o.toolName)?qp(o.toolInput):void 0;for(const[w,x]of[[m,t],[y,n]]){if(!w)continue;const q=x.get(w)??{};x.set(w,{command:k??q.command,filePath:I??q.filePath,toolName:o.toolName??q.toolName})}return o}const s=o.toolName.toLowerCase();if(s!=="writestdin"&&s!=="write_stdin"&&s!=="wait")return o;const r=bo(o.toolInput),i=_t(o.toolInput),a=(r?t.get(r):void 0)??(i?n.get(i):void 0),l=We(o);if(l&&a){const m=n.get(l)??{};n.set(l,{command:a.command??m.command,filePath:a.filePath??m.filePath,toolName:a.toolName??m.toolName})}const d=_o(o);if(d&&a){const m=t.get(d)??{};t.set(d,{command:a.command??m.command,filePath:a.filePath??m.filePath,toolName:a.toolName??m.toolName})}if(!a)return o;let u=o.toolInput;return a.command&&(u=Lp(u,a.command)),a.filePath&&(u=Gp(u,a.filePath)),a.toolName&&(u=Up(u,a.toolName)),u===o.toolInput?o:{...o,toolInput:u}})}function To(e){const t=e.toLowerCase();return t==="writestdin"||t==="write_stdin"||t==="wait"}function Xp(e){const t=new Map;for(let r=0;r<e.length;r++){const i=e[r];if((i==null?void 0:i.type)!=="tool_call"||!To(i.toolName))continue;const a=_t(i.toolInput);if(!a)continue;const l=t.get(a);l?l.push(r):t.set(a,[r])}if(t.size===0)return e;const n=new Set,o=(r,i)=>{const a=t.get(r);if(!a)return-1;for(const l of a)if(l>i&&!n.has(l))return l;return-1},s=[];for(let r=0;r<e.length;r++){if(n.has(r))continue;let i=e[r];if(i!==void 0){if(i.type==="tool_call"&&To(i.toolName)){let a=We(i),l=r;for(;a;){const d=o(a,l);if(d<0)break;const u=e[d];if((u==null?void 0:u.type)!=="tool_call")break;n.add(d),l=d,i={...i,status:u.status,toolResult:u.toolResult},a=u.toolResult!==void 0?We(u):void 0}}s.push(i)}}return s}function em(e){return e.filter(t=>{var d,u,m;if(t.type!=="tool_call"||t.status!=="complete")return!0;const n=t.toolName.toLowerCase();if(n!=="writestdin"&&n!=="write_stdin"&&n!=="wait"||(d=t.toolResult)!=null&&d.isError)return!0;const o=ee(t.toolInput)?t.toolInput:{};if((typeof o.chars=="string"?o.chars:"").length>0||[o.linked_command,o.linked_file_path,o.linked_tool_name].some(y=>typeof y=="string"&&y.trim().length>0))return!0;const i=((u=t.toolResult)==null?void 0:u.content)??"",a=ao(i),l=cp((m=t.toolResult)==null?void 0:m.structured).exitCode??a.exitCode;return a.output.trim().length>0||l!==void 0})}function tm(e,t,n){const s=yp(e,t,n),r=Uu(s),i=hp(r),a=Yp(i),l=Xp(a),d=Qp(l),u=em(d);return Dp(u)}function nm(e){return typeof e=="string"?e:e.filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(`
|
|
53
|
+
`)}function om(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;return typeof t.command=="string"?t.command:typeof t.cmd=="string"?t.cmd:null}function sm(e){if(!(e!=null&&e.includes('data-ya-resource="project-file"'))||typeof document>"u")return[];const t=document.createElement("template");return t.innerHTML=e,Array.from(t.content.querySelectorAll('a[data-ya-resource="project-file"][data-ya-path]')).flatMap(n=>{var r;const o=(r=n.textContent)==null?void 0:r.trim(),s=n.dataset.yaPath;return o&&s?[{filePath:s,text:o}]:[]})}function Io(e,t){if(t.size===0)return[];const n=new Map;for(const o of Kc(e)){const s=t.get(o.text);s&&n.set(o.text,{filePath:s,text:o.text})}return Array.from(n.values())}function xo(e,t){if(e)for(const n of e){if(!n.text.includes("/")&&!n.text.includes("\\"))continue;const o=ht(n.filePath);o&&o!==n.text&&t.set(o,n.filePath)}}function wt(e,t,n){const o=Io(e,n);if(xo(t,n),o.length===0)return t?[...t]:void 0;const s=new Map;for(const r of t??[])s.set(r.text,r);for(const r of o)s.set(r.text,r);return Array.from(s.values())}function Tt(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((n,o)=>{var s,r;return n.text===((s=t[o])==null?void 0:s.text)&&n.filePath===((r=t[o])==null?void 0:r.filePath)})}function rm(e){const t=new Map;return e.map(n=>{if(n.type==="text"){const i=Io(n.text,t);return xo(sm(n.augmentHtml),t),i.length>0?{...n,projectPathLinks:i}:n}if(n.type==="user_prompt"){const i=wt(nm(n.content),n.projectPathLinks,t);return Tt(i,n.projectPathLinks)?n:{...n,projectPathLinks:i}}if(n.type!=="tool_call")return n;let o=n.toolInput;const s=om(n.toolInput);if(s&&n.toolInput&&typeof n.toolInput=="object"){const i=n.toolInput,a=Le(i._projectPathLinks),l=wt(s,a,t);Tt(l,a)||(o={...i,_projectPathLinks:l})}let r=n.toolResult;if(r){const i=wt(r.content,r.projectPathLinks,t);Tt(i,r.projectPathLinks)||(r={...r,projectPathLinks:i})}return o===n.toolInput&&r===n.toolResult?n:{...n,toolInput:o,toolResult:r}})}const im={onAssistantMessage(e){console.log("[preprocessMessages] Processing assistant message:",e)}};function Co(e,t){const n=typeof window<"u"&&window.__STREAMING_DEBUG__?im:void 0;return tm(e,t,n)}function am(e,t){return rm(Co(e,t))}function cm(e,t,n=!1){return n?am(e,t):Co(e,t)}function lm(e,t,n=!1){if(t.length===0)return e;const o=t.flatMap((r,i)=>{var l;if(r.placementAfterMessageId==="")return[{itemIndex:-1,object:r,order:i}];let a=Number.NEGATIVE_INFINITY;for(let d=0;d<e.length;d+=1){const u=e[d];u!=null&&u.sourceMessages.some(m=>(m.uuid??m.id)===r.placementAfterMessageId)&&(a=d)}if(a===Number.NEGATIVE_INFINITY&&n&&r.kind==="bang-command"){const d=Qe(r.createdAt);if(d!==null)for(let u=0;u<e.length;u+=1){const m=Mo(((l=e[u])==null?void 0:l.sourceMessages)??[]);m!==null&&m<=d&&(a=u)}}return a===Number.NEGATIVE_INFINITY?[]:[{itemIndex:a,object:r,order:i}]});if(o.sort((r,i)=>i.itemIndex-r.itemIndex||i.order-r.order),o.length===0)return e;const s=[...e];for(const r of o)s.splice(r.itemIndex+1,0,{type:"transcript_display_object",id:r.object.id,object:r.object,sourceMessages:[]});return s}function Eo(e){const t=[];let n=[];for(const o of e)o.type==="transcript_display_object"?(n.length>0&&(t.push({isUserPrompt:!1,items:n}),n=[]),t.push({isUserPrompt:!1,isStandalone:!0,items:[o]})):o.type==="user_prompt"||o.type==="session_setup"?(n.length>0&&(t.push({isUserPrompt:!1,items:n}),n=[]),t.push({isUserPrompt:!0,items:[o]})):n.push(o);return n.length>0&&t.push({isUserPrompt:!1,items:n}),t}function dm(e){let t=null;for(const n of e){const o=R(n.sourceMessages);o!==null&&(t=t===null?o:Math.max(t,o))}return t}function It(e){const t=typeof e=="string"?e:e.filter(n=>n.type==="text"&&typeof n.text=="string").map(n=>n.text).join(`
|
|
54
|
+
`);return mu(t).text.trim()}function W(e){const t=e.replace(/\s+/g," ").trim();return t.length<=180?t:`${t.slice(0,177).trimEnd()}...`}function Ve(e,t=!1){const n=e.replace(/\s+/g," ").trim();return t?n:n.toLowerCase()}function um({allAnchors:e,fullAnchors:t,linkAnchors:n,scope:o,userAnchors:s}){return o==="links"?n:o==="full"?t:o==="all"?e:s}function pm(e,t,n=!1){const o=e.replace(/\s+/g," ").trim(),s=Ve(o,n),r=Ve(t,n),i=o.length>420?`${o.slice(0,417).trimEnd()}...`:o;if(!r)return i;const a=[];let l=0;for(;a.length<3;){const d=s.indexOf(r,l);if(d===-1)break;a.push(d),l=d+r.length}return a.length===0?i:a.map(d=>{const u=Math.max(0,d-96),m=Math.min(o.length,d+r.length+180),y=u>0?"...":"",k=m<o.length?"...":"";return`${y}${o.slice(u,m).trim()}${k}`}).join(" ... ")}function mm({anchors:e,caseSensitive:t=!1,query:n,searchReady:o}){const s=[],r=new Set,i=new Set,a=new Map;{const l=Ve(n,t);for(const d of e){const u=d.searchText??d.preview;Ve(u,t).includes(l)&&(s.push(d),r.add(d.id),i.add(d.targetId??d.id),a.set(d.id,pm(u,n,t)))}}return{matchIds:r,matchTargetIds:i,matches:s,previewsById:a}}function fm(e,t=[]){return ft(e,t)}function be(e){const t=new WeakSet,n=o=>o==null?"":typeof o=="string"?o:typeof o=="number"||typeof o=="boolean"||typeof o=="bigint"||typeof o!="object"?String(o):t.has(o)?"[Circular]":(t.add(o),Array.isArray(o)?o.map(n).filter(Boolean).join(`
|
|
55
|
+
`):Object.entries(o).map(([s,r])=>{const i=n(r);return i?`${s}: ${i}`:s}).filter(Boolean).join(`
|
|
56
|
+
`));return n(e)}function jo(e){return typeof e=="string"?e:e.map(t=>t.type==="text"&&typeof t.text=="string"?t.text:t.type==="thinking"&&typeof t.thinking=="string"?t.thinking:t.type==="tool_use"?[t.name,t.id,be(t.input)].join(`
|
|
57
|
+
`):t.type==="tool_result"?[t.tool_use_id,typeof t.content=="string"?t.content:be(t.content)].join(`
|
|
58
|
+
`):be(t)).filter(Boolean).join(`
|
|
59
|
+
`)}function te(e){return e.map(t=>(t==null?void 0:t.trim())??"").filter(Boolean).join(`
|
|
60
|
+
`)}function hm(e){var t,n,o;return e.type!=="tool_call"?"":te([e.toolName,e.id,e.status,be(e.toolInput),(t=e.toolResult)!=null&&t.isError?"error":null,(n=e.toolResult)==null?void 0:n.content,be((o=e.toolResult)==null?void 0:o.structured)])}function gm(e){const t=be(e.toolInput).replace(/\s+/g," "),n=t?`: ${W(t)}`:"";return`${e.toolName}${n}`}function Po(e){return e.type!=="system"||e.subtype==="history_search_gap"?"":te([e.content,...(e.details??[]).map(jo)])}function Ao(e){const t=It(e.content);if(fm(t,e.sourceMessages))return null;const n=W(t);return n?{id:e.id,preview:n,searchText:t,timestampMs:R(e.sourceMessages)}:null}function vm(e){const t=[];for(const n of e){if(n.type!=="user_prompt"||n.isSubagent)continue;const o=Ao(n);o&&t.push(o)}return t}function ym(e){const t=[];for(const n of e){if(n.type==="user_prompt"){const o=Ao(n);o&&t.push(o);continue}if(n.type==="text"){const o=W(n.text);o&&t.push({id:n.id,preview:o,searchText:n.text,timestampMs:R(n.sourceMessages)});continue}if(n.type==="system"){const o=Po(n),s=W(o);s&&t.push({id:n.id,preview:s,searchText:o,timestampMs:R(n.sourceMessages)})}}return t}function Je(e){var t;switch(e.type){case"user_prompt":{const n=It(e.content),o=W(n);return o?{id:e.id,preview:o,searchText:n,timestampMs:R(e.sourceMessages)}:null}case"session_setup":{const n=te([e.title,...e.prompts.map(jo)]);return n?{id:e.id,preview:e.title||W(n),searchText:n,timestampMs:R(e.sourceMessages)}:null}case"transcript_display_object":{const n=e.object;if(n.kind==="bang-command"){const s=te([n.command,n.stdoutPreview,n.status,n.error]);return s?{id:e.id,preview:`!!${n.command}`,searchText:s,timestampMs:R(e.sourceMessages)}:null}const o=te([n.title,n.status,n.error]);return o?{id:e.id,preview:n.title??W(n.error??n.status),searchText:o,timestampMs:R(e.sourceMessages)}:null}case"text":return e.text?{id:e.id,preview:W(e.text),searchText:e.text,timestampMs:R(e.sourceMessages)}:null;case"thinking":return e.thinking?{id:e.id,preview:`Thinking: ${W(e.thinking)}`,searchText:te(["Thinking",e.thinking]),timestampMs:R(e.sourceMessages)}:null;case"system":{const n=Po(e);return n?{id:e.id,preview:W(n),searchText:n,timestampMs:R(e.sourceMessages)}:null}case"task_notification":{const n=e.summary??e.raw;return n?{id:e.id,preview:W(n),searchText:n,timestampMs:R(e.sourceMessages)}:null}case"tool_call":{const n=hm(e);return n?{id:e.id,preview:gm(e),searchText:n,timestampMs:R(e.sourceMessages)}:null}case"conversation_activity":{const n=te(((t=e.thinkingPreviews)==null?void 0:t.map(o=>o.thinking))??[]);return n?{id:e.id,preview:`Thinking: ${W(n)}`,searchText:te(["Thinking",n]),timestampMs:R(e.sourceMessages)}:null}}}const km=/<a\b[^>]*>([\s\S]*?)<\/a>/gi,bm=/!?\[([^\]\n]+)\]\([^)\s]+(?:\s+"[^"]*")?\)/g,_m={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'","#x27":"'",nbsp:" "};function Sm(e){return e.replace(/<[^>]*>/g,"").replace(/&(#?\w+);/g,(t,n)=>_m[n.toLowerCase()]??t)}function Oo(e,t){const n=[];for(const o of Zc(e))o.type==="url"&&n.push(o.text);for(const o of Mc(e))n.push(o.match);for(const o of t??[])n.push(o.text);return n}function wm(e){const t=[];if(e.augmentHtml)for(const n of e.augmentHtml.matchAll(km))t.push(Sm(n[1]??""));else{const n=e.text.replace(bm,(o,s)=>(t.push(s)," "));t.push(...Oo(n,void 0))}for(const n of e.projectPathLinks??[])t.push(n.text);return t}function Tm(e){var o;let t;switch(e.type){case"user_prompt":t=Oo(It(e.content),e.projectPathLinks);break;case"text":t=wm(e);break;case"tool_call":{const s=e.toolInput&&typeof e.toolInput=="object"?e.toolInput._projectPathLinks:void 0;t=[...Le(s)??[],...((o=e.toolResult)==null?void 0:o.projectPathLinks)??[]].map(r=>r.text);break}default:t=[]}const n=new Set;for(const s of t){const r=s.replace(/\s+/g," ").trim();r&&n.add(r)}return[...n]}function Im(e){const t=Tm(e);return t.length===0?null:{id:e.id,preview:W(t.join(" · ")),searchText:t.join(`
|
|
61
|
+
`),timestampMs:R(e.sourceMessages)}}function xm(e){const t=[],n=o=>{const s=o?Im(o):null;s&&t.push(s)};for(const o of e){if(o.isUserPrompt){n(o.items[0]);continue}for(const s of Vn(o.items))s.kind==="item"&&n(s.item)}return t}function Cm(e){if(e.kind==="item"){const s=Je(e.item);return s?[s]:[]}const t=e.projection.entries.length,n=e.projection.parents.flatMap(s=>{if(s.entries.length<2)return[];const r=Je(s.item);return r!=null&&r.searchText?[r.searchText]:[]}),o=[{id:e.id,preview:`Explored: ${t} ${t===1?"item":"items"}`,searchText:te(["Explored","Exploring",`${t} ${t===1?"item":"items"}`,...n]),timestampMs:dm(e.items)}];for(const s of e.projection.parents){const r=Je(s.item);for(const i of s.entries){const a=Kn(s,i),l=Xn(i),d=a?Nu(s.item):`${Qn(s,i)}: ${l}`,u=a?$u(s.item):Du(s,i),m=s.entries.length===1;o.push({id:a?`${e.id}:${s.item.id}`:`${e.id}:entry:${i.id}`,preview:`Explored / ${d}`,searchText:te([u,m?r==null?void 0:r.searchText:void 0]),targetId:e.id,timestampMs:(r==null?void 0:r.timestampMs)??R(s.item.sourceMessages)})}}return o}function Em(e){const t=[];for(const n of e){if(n.isUserPrompt){const o=n.items[0],s=o?Je(o):null;s&&t.push(s);continue}for(const o of Vn(n.items))t.push(...Cm(o))}return t}const jm=200;function xt(e){var t,n,o;if(e.type==="thinking")return!0;if(e.type==="task_notification"){const s=(t=e.status)==null?void 0:t.toLowerCase();return s!=="failed"&&s!=="error"}return e.type==="system"?e.subtype==="subagent_activity":e.type!=="tool_call"?!1:Ue(e.toolName)!=="UpdatePlan"&&(((o=(n=e.toolResult)==null?void 0:n.media)==null?void 0:o.length)??0)===0&&e.status!=="error"&&e.status!=="incomplete"}function Pm(e){var s;let t=-1;for(let r=e.length-1;r>=0;r-=1)if(((s=e[r])==null?void 0:s.type)==="thinking"){t=r;break}const n=e[t];if((n==null?void 0:n.type)!=="thinking")return[];const o=[{id:n.id,kind:n.status==="streaming"?"current":"latest",slot:"latest",thinking:n.thinking,status:n.status,endedAtMs:R(n.sourceMessages)}];if(n.status!=="streaming")return o;for(let r=t-1;r>=0;r-=1){const i=e[r];if(!((i==null?void 0:i.type)!=="thinking"||i.status!=="complete")){o.push({id:i.id,kind:"previous",slot:"previous",thinking:i.thinking,status:i.status,endedAtMs:R(i.sourceMessages)});break}}return o}function Am(e){const t=Eo(e);let n=-1;const o=t.map((r,i)=>{const a=r.items.find(xt);return a?(n=i,`conversation-activity-${a.id}`):null}),s=Pm(e);return t.flatMap((r,i)=>{var d;if(r.isUserPrompt||r.isStandalone)return r.items;const a=r.items.filter(xt);if(a.length===0)return r.items;const l={type:"conversation_activity",id:o[i]??`conversation-activity-${((d=a[0])==null?void 0:d.id)??i}`,activityCount:a.reduce((u,m)=>{var y;return u+(m.type==="tool_call"?Math.max(1,((y=m.displayActions)==null?void 0:y.length)??0):1)},0),active:!1,expanded:!1,thinkingPreviews:i===n&&s.length>0?s:void 0,startedAtMs:null,endedAtMs:null,sourceMessages:a.flatMap(u=>u.sourceMessages)};return[...r.items.filter(u=>!xt(u)),l]})}function Om({caseSensitive:e,conversationViewEnabled:t,messages:n,provider:o,query:s,recentProjectPathLinksEnabled:r=!1,scope:i,thinkingItemsVisible:a,transcriptDisplayObjects:l=[]}){const d=cm(n,void 0,r),u=o==="claude-gateway"?d.filter(C=>C.type!=="thinking"||C.thinking!=="Thinking..."):d,m=lm(u,l),y=a?m:m.filter(C=>C.type!=="thinking"),k=t?Am(y):y,I=i==="full"||i==="links"?Eo(k):[],w=um({allAnchors:ym(k),fullAnchors:i==="full"?Em(I):[],linkAnchors:i==="links"?xm(I):[],scope:i,userAnchors:vm(k)}),x=mm({anchors:w,caseSensitive:e,query:s,searchReady:!0}),q=Math.max(0,x.matches.length-jm);return{matches:x.matches.slice(q).map(C=>({id:C.id,preview:x.previewsById.get(C.id)??C.preview,...C.targetId?{targetId:C.targetId}:{},...C.timestampMs!==void 0?{timestampMs:C.timestampMs}:{}})),matchesTruncated:q>0}}const Fo=self;Fo.addEventListener("message",e=>{const{requestId:t,...n}=e.data,o={requestId:t,...Om(n)};Fo.postMessage(o)})})();
|