@nervekit/desktop 0.42.0 → 0.43.1
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/THIRD-PARTY-LICENSES.txt +210 -16
- package/dist/builtin/configure-nerve/SKILL.md +19 -10
- package/dist/builtin/configure-nerve/reference/agent-preferences.md +9 -0
- package/dist/builtin/configure-nerve/reference/agent-profiles.md +2 -6
- package/dist/builtin/configure-nerve/reference/agents-md.md +1 -1
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-api/artifacts.d.ts +10 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-api/text.d.ts +4 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/components.d.ts +2 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/collections/match-terms.d.ts +8 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/callout/callout.svelte.d.ts +1 -1
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/index.d.ts +3 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/log-source.d.ts +43 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/log-view.svelte.d.ts +22 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/log-window.d.ts +77 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/terminal-text.svelte.d.ts +6 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/display/status.d.ts +3 -0
- package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/terminal/ansi.d.ts +4 -0
- package/dist/builtin/configure-nerve/{guide/extensions.md → reference/extensions/build.md} +4 -4
- package/dist/builtin/configure-nerve/reference/extensions/components.md +2 -1
- package/dist/builtin/configure-nerve/reference/extensions/manifest.md +1 -1
- package/dist/builtin/configure-nerve/reference/extensions/overview.md +2 -2
- package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/lib.mjs +2 -2
- package/dist/builtin/configure-nerve/reference/extensions/scripts/nerve-version.json +1 -0
- package/dist/builtin/configure-nerve/reference/extensions/sharing.md +2 -2
- package/dist/builtin/configure-nerve/reference/extensions/themes.md +1 -1
- package/dist/builtin/configure-nerve/reference/permissions.md +2 -2
- package/dist/builtin/configure-nerve/reference/prompt-suggestions.md +2 -2
- package/dist/builtin/configure-nerve/reference/skills.md +9 -9
- package/dist/{chunk-QFK2SWD2.js → chunk-34SYO66C.js} +11 -11
- package/dist/{chunk-6ZS7TA6E.js → chunk-35O66NLU.js} +2 -2
- package/dist/{chunk-DHIDYKXJ.js → chunk-3LWB5SGT.js} +1781 -1719
- package/dist/{chunk-7FSH3ABG.js → chunk-57A5HFXL.js} +4 -4
- package/dist/{chunk-EF7ZZKA3.js → chunk-5K7U6UXA.js} +3 -3
- package/dist/{chunk-WIQEPAUG.js → chunk-5S5O3V5G.js} +11 -10
- package/dist/{chunk-MTHLTFG4.js → chunk-5VLAJMQQ.js} +97 -105
- package/dist/{chunk-MI6L5CEA.js → chunk-5WMHGTVL.js} +2 -2
- package/dist/{chunk-NVVW3MWJ.js → chunk-6IJORN3N.js} +9 -9
- package/dist/{chunk-OMCM3MHS.js → chunk-7GSR2AW5.js} +10 -9
- package/dist/{chunk-WG62RHZ2.js → chunk-7MJT6LHU.js} +14 -4
- package/dist/{chunk-DDBE2VLT.js → chunk-A3OFIREH.js} +2 -2
- package/dist/{chunk-ZGWXLG5X.js → chunk-BNBEFI2M.js} +66 -76
- package/dist/{chunk-7RPHIJT3.js → chunk-C7L4BBGD.js} +4 -4
- package/dist/{chunk-2ICPO4UM.js → chunk-CZXRZEV4.js} +16 -14
- package/dist/{chunk-PVPJAGWR.js → chunk-EOZLBW5E.js} +2 -2
- package/dist/{chunk-U5KGV63C.js → chunk-EZJH7ED5.js} +1 -1
- package/dist/{chunk-RL52LSTV.js → chunk-F3X2KHP4.js} +1 -1
- package/dist/{chunk-Q3C7TQ2M.js → chunk-FNWUCFVO.js} +3 -3
- package/dist/chunk-FQVIQOV5.js +163 -0
- package/dist/{chunk-LP4APBBQ.js → chunk-FZ7U3GZI.js} +1 -1
- package/dist/{chunk-MBMZEIOG.js → chunk-G5SVCJCT.js} +38 -51
- package/dist/{chunk-62DQXVPO.js → chunk-HDTS5AS5.js} +26 -7
- package/dist/{chunk-WC5HHPPM.js → chunk-HRJJKZGM.js} +1 -1
- package/dist/chunk-I7OMW4RJ.js +87 -0
- package/dist/{chunk-TQURLRHD.js → chunk-IL67WXRA.js} +1 -1
- package/dist/{chunk-QDEH776O.js → chunk-KBBBQCYV.js} +179 -20
- package/dist/{chunk-KUFIFCB4.js → chunk-KDGUQYYY.js} +1 -1
- package/dist/{chunk-IRRR3PWN.js → chunk-KQD4DYEP.js} +68 -35
- package/dist/{chunk-JBEWFFOK.js → chunk-LIIGX2XX.js} +1 -1
- package/dist/{chunk-IVBMHEPK.js → chunk-LX33FMTS.js} +23 -36
- package/dist/{chunk-HPINJGBO.js → chunk-METH7J6V.js} +13 -12
- package/dist/{chunk-N6BUYKF3.js → chunk-MLE6MKPY.js} +7 -7
- package/dist/{chunk-3CZXUKLG.js → chunk-MRDORR5Z.js} +8 -1
- package/dist/{chunk-6IHXVT5H.js → chunk-NSISYP6D.js} +1 -1
- package/dist/{chunk-P72Y5ZBH.js → chunk-O2IYZBX6.js} +15 -26
- package/dist/{chunk-TSAUBRRU.js → chunk-P7GPT4XL.js} +1 -1
- package/dist/{chunk-F5XCJ6UV.js → chunk-PA37GH3T.js} +33 -58
- package/dist/{chunk-BACYVEE6.js → chunk-QC6DSC4D.js} +2 -2
- package/dist/{chunk-ZVH6EB7S.js → chunk-QKRWXA5W.js} +1 -1
- package/dist/{chunk-D6C32XHS.js → chunk-QQPLW3ZX.js} +17359 -12634
- package/dist/chunk-QQPLW3ZX.js.LEGAL.txt +59 -0
- package/dist/{chunk-N4OXAS3A.js → chunk-R22FWLXU.js} +1 -1
- package/dist/{chunk-7HGFEQSD.js → chunk-R7UJIPJA.js} +5 -5
- package/dist/{chunk-NW3DH7IK.js → chunk-RAHBWFWV.js} +8457 -2726
- package/dist/{chunk-O5JHHRFN.js → chunk-RMV6IZ2C.js} +32 -116
- package/dist/{chunk-Z6AY5VOZ.js → chunk-RQIN5JYO.js} +9 -6
- package/dist/{chunk-Q5E4ZL2R.js → chunk-S2UG5HD6.js} +1 -1
- package/dist/{chunk-U3TEC52G.js → chunk-S637DPAG.js} +1 -1
- package/dist/chunk-S6KM4DOB.js +37 -0
- package/dist/{chunk-MPDKZVHT.js → chunk-SVX46YXY.js} +1 -3
- package/dist/{chunk-XTUSLUQ7.js → chunk-TLDULBKV.js} +70 -24
- package/dist/{chunk-L5WGVYXM.js → chunk-UFE7IMKQ.js} +2 -2
- package/dist/{chunk-ZUWBEV2O.js → chunk-UQHUYEFW.js} +1 -1
- package/dist/{chunk-XM27UVWN.js → chunk-V7WOX4O7.js} +3 -3
- package/dist/{chunk-W7LEYYFH.js → chunk-WJAHXDL4.js} +41 -32
- package/dist/{chunk-6GUJQURI.js → chunk-WLTE6OJM.js} +2 -2
- package/dist/{chunk-BG2KGLIA.js → chunk-WMZAJ7XA.js} +2 -2
- package/dist/chunk-WOLKTL4F.js +32 -0
- package/dist/{chunk-H5CAHDII.js → chunk-WQHOXPLV.js} +51929 -50256
- package/dist/{chunk-EUT45AKW.js → chunk-YODV42KQ.js} +25 -32
- package/dist/{chunk-FCAIYPDJ.js → chunk-ZFFWWZIA.js} +2 -2
- package/dist/{chunk-376GN4PB.js → chunk-ZTG7VIGB.js} +173 -79
- package/dist/{chunk-O6FDXE54.js → chunk-ZVUAJ7UV.js} +25 -36
- package/dist/daemon.js +15 -15
- package/dist/ext-frame/base.css +1 -1
- package/dist/extension-assets/atlassian/docs/confluence-writing.md +5 -5
- package/dist/extension-assets/diagram/bundle.js +3 -0
- package/dist/git-isolated-reader-helper.js +1 -1
- package/dist/main.js +57 -128
- package/dist/quick-script-docs/runtime/artifacts.md +11 -0
- package/dist/quick-script-docs/runtime/documents.md +21 -12
- package/dist/quick-script-docs/runtime/editing.md +44 -0
- package/dist/quick-script-docs/runtime/images.md +1 -1
- package/dist/sandbox-libraries/credential-runtime.js +3 -0
- package/dist/sandbox-libraries/extension-runtime.js +3 -0
- package/dist/web/assets/AsyncBashCenterHost-BlxXoXd6.js +2 -0
- package/dist/web/assets/{ConversationListItem-CCaGnyA1.js → ConversationListItem-DfSMoYfe.js} +3 -3
- package/dist/web/assets/{ConversationsWorkbenchPanel-DLM3saY5.js → ConversationsWorkbenchPanel-BOIMwRZx.js} +1 -1
- package/dist/web/assets/{DiscoverCenterHost-DVNL8uZQ.js → DiscoverCenterHost-Bi6audxE.js} +1 -1
- package/dist/web/assets/{ExtensionPageCenterHost-CHKg6c3M.js → ExtensionPageCenterHost-DEg-LHcU.js} +1 -1
- package/dist/web/assets/FileCenterComposedHost-CPwzMZI9.js +1 -0
- package/dist/web/assets/FilesWorkbenchPanel-DnKQd6QC.js +12 -0
- package/dist/web/assets/{GitDiffCenterHost-DmtKqHer.js → GitDiffCenterHost-DtsFPa1z.js} +1 -1
- package/dist/web/assets/{GitWorkbenchPanel-BmyMyvL8.js → GitWorkbenchPanel-BfJKdIkE.js} +1 -1
- package/dist/web/assets/LaunchCenterHost-C5Bd9ELF.js +1 -0
- package/dist/web/assets/LaunchConfigurationNotice-Dp3rBKil.js +1 -0
- package/dist/web/assets/LaunchOutputPane-BuCSQcxg.js +2 -0
- package/dist/web/assets/LaunchesWorkbenchPanel-CMd3Xcbp.js +1 -0
- package/dist/web/assets/{LogsCenterHost-CdqD6zH8.js → LogsCenterHost-Be6EbsrZ.js} +1 -1
- package/dist/web/assets/{MermaidCenterHost-BjwJLU-2.js → MermaidCenterHost-BdQ8CGeb.js} +1 -1
- package/dist/web/assets/MobileFilesBody-C1q-YRaD.js +1 -0
- package/dist/web/assets/MobileFilesHost-DK769osZ.js +1 -0
- package/dist/web/assets/MobileLaunchOutputHost-BLDX3-Tn.js +1 -0
- package/dist/web/assets/MobileLaunchesHost-Dv2gfOEY.js +2 -0
- package/dist/web/assets/{MobileNoteEditorHost-lfAeMVH9.js → MobileNoteEditorHost-ZRzzwCYD.js} +1 -1
- package/dist/web/assets/{MobileNotesHost-DOi0goPc.js → MobileNotesHost-COOtVfAp.js} +2 -2
- package/dist/web/assets/MobileSettingsHost-BU2lCcG2.js +2 -0
- package/dist/web/assets/{MobileSettingsPageHost-CtpUzfVG.js → MobileSettingsPageHost-BC5LOq7Y.js} +1 -1
- package/dist/web/assets/{NotesWorkbenchPanel-CsbMYHAw.js → NotesWorkbenchPanel-BiTDbfjj.js} +1 -1
- package/dist/web/assets/{PullRequestCenterHost-B22Ua7bA.js → PullRequestCenterHost-DV3V3yxm.js} +1 -1
- package/dist/web/assets/{PullRequestsWorkbenchPanel-DOIHvZ6H.js → PullRequestsWorkbenchPanel-Dpvt9W-q.js} +1 -1
- package/dist/web/assets/SearchWorkbenchPanel-Bfj8fwPg.js +1 -0
- package/dist/web/assets/SettingsCenterHost-sHWZehrB.js +1 -0
- package/dist/web/assets/SystemPromptCenterHost-CA9i8UbB.js +2 -0
- package/dist/web/assets/{ThemePreviewPicker-B_DTUsui.js → ThemePreviewPicker-PySjP6aS.js} +1 -1
- package/dist/web/assets/adapters-fVomUv3-.js +1 -0
- package/dist/web/assets/agent-profiles.svelte-CenutfXA.js +1 -0
- package/dist/web/assets/appearance.svelte-BKxiMJ3c.js +1 -0
- package/dist/web/assets/center-tabs.svelte-i0d5hUO3.js +2 -0
- package/dist/web/assets/{channel-CxF1CmEY.js → channel-DB8mSlhP.js} +2 -2
- package/dist/web/assets/{client-CVZRorEj.js → client-DHxa8CWS.js} +1 -1
- package/dist/web/assets/code-CsVM8hq8.js +7 -0
- package/dist/web/assets/conversation-activity-CZJfUGoL.js +1 -0
- package/dist/web/assets/conversation-connection-CaV3KY7Z.js +1 -0
- package/dist/web/assets/discover-Do0oQbdF.js +4 -0
- package/dist/web/assets/{dist-HTsJAisd.js → dist-B887qHIr.js} +1 -1
- package/dist/web/assets/{dist-CDM0qUmO.js → dist-Bg8Vm0DE.js} +1 -1
- package/dist/web/assets/{dist-BVmTdBxj.js → dist-C2z70795.js} +1 -1
- package/dist/web/assets/{dist-EmwCDpCc.js → dist-CcBabmlO.js} +1 -1
- package/dist/web/assets/{dist-DkQMSgZ5.js → dist-HSfz5y1D.js} +1 -1
- package/dist/web/assets/{dist-DZN4bTV3.js → dist-HUxdivoH.js} +1 -1
- package/dist/web/assets/{dist-BWsookwC.js → dist-wvfFRict.js} +1 -1
- package/dist/web/assets/{easing-DfoPn4-z.js → easing-B6dSt4eu.js} +1 -1
- package/dist/web/assets/empty-CtUlV5QU.js +1 -0
- package/dist/web/assets/eraser-B8qFMviR.js +1 -0
- package/dist/web/assets/{extension-themes.svelte-BAce41Wm.js → extension-themes.svelte-nXDPOl_E.js} +2 -2
- package/dist/web/assets/{file-tabs.svelte-CaZRhyw0.js → file-tabs.svelte-BxCAtif2.js} +2 -2
- package/dist/web/assets/files-DcUCbPX1.js +156 -0
- package/dist/web/assets/{files-dFQS0tcX.css → files-N9JiAfxr.css} +1 -1
- package/dist/web/assets/filesystem-9b72Tdkw.js +1 -0
- package/dist/web/assets/floating-toolbar-Cqtfs8M7.js +1 -0
- package/dist/web/assets/{git-store.svelte-DkeLA_WZ.js → git-store.svelte-DIVFeLGG.js} +1 -1
- package/dist/web/assets/{icon-action-efe9ZEWq.js → icon-action-C9h3TdBz.js} +1 -1
- package/dist/web/assets/index-6mIS-NWJ.js +165 -0
- package/dist/web/assets/index-D2aeJHnc.css +1 -0
- package/dist/web/assets/launches-Dafgn_my.js +5 -0
- package/dist/web/assets/launches.api-ZZ-IwIQ_.js +1 -0
- package/dist/web/assets/log-view-Dqspnrs0.js +1 -0
- package/dist/web/assets/{logs.api-gZ2mVC9q.js → logs.api-BxN21LL0.js} +1 -1
- package/dist/web/assets/{maintenance-state.svelte-xMmmI9yr.js → maintenance-state.svelte-BAKtNG-i.js} +2 -2
- package/dist/web/assets/menu-icons-tnCN992t.js +1 -0
- package/dist/web/assets/{mermaid-ACpEwsfj.js → mermaid-DL5xfcqL.js} +1 -1
- package/dist/web/assets/mobile-launch-rows-DR6V5AUH.js +1 -0
- package/dist/web/assets/page-tabs.svelte-wduGZwmi.js +4 -0
- package/dist/web/assets/panel-BW0llJiU.js +1 -0
- package/dist/web/assets/popover-panel-DO5nPkvA.js +4 -0
- package/dist/web/assets/pr-view-loader.svelte-RSHgeFYM.js +1 -0
- package/dist/web/assets/progress-CRuzrJQt.js +1 -0
- package/dist/web/assets/{scratch-notes-state.svelte-rBeSOn4h.js → scratch-notes-state.svelte-BcqgnE6z.js} +1 -1
- package/dist/web/assets/{scratch-notes.api-Co80EGtL.js → scratch-notes.api-D9wtv1Mn.js} +1 -1
- package/dist/web/assets/settings-CKsESd2i.js +1 -0
- package/dist/web/assets/settings-Crny2xGb.js +1 -0
- package/dist/web/assets/settings-scope-BiY5kIdC.js +35 -0
- package/dist/web/assets/shell-BiZy0tcZ.js +1 -0
- package/dist/web/assets/shell-layout.svelte-9B3T60gv.js +2 -0
- package/dist/web/assets/{lock-open-BBTCOUg5.js → tag-Bp1l7psd.js} +1 -1
- package/dist/web/assets/time-egBWJGDu.js +1 -0
- package/dist/web/assets/views-Bl6CiPE0.js +2 -0
- package/dist/web/assets/{workbench-connection-Gsy9bIuP.js → workbench-connection-CyMud_mZ.js} +1 -1
- package/dist/web/assets/{workspace-CUoFFOwJ.js → workspace-V-yCOfn1.js} +1 -1
- package/dist/web/assets/workspace-actions.svelte-D8-Agx2d.js +1 -0
- package/dist/web/assets/{workspace-selectors.svelte-D-EQR_-Z.js → workspace-selectors.svelte-DQ1mQdvX.js} +2 -2
- package/dist/web/index.html +47 -48
- package/dist/web/sw.js +1 -1
- package/dist/worker.js +14 -14
- package/package.json +7 -7
- package/dist/builtin/configure-nerve/guide/collaboration.md +0 -15
- package/dist/builtin/configure-nerve/scripts/nerve-version.json +0 -1
- package/dist/chunk-D6C32XHS.js.LEGAL.txt +0 -25
- package/dist/chunk-RJR7DJJK.js +0 -32
- package/dist/chunk-UVRULOOP.js +0 -35
- package/dist/quick-script-docs/runtime/files.md +0 -11
- package/dist/web/assets/AsyncBashCenterHost-DldW4utc.js +0 -2
- package/dist/web/assets/FileCenterComposedHost-kxFWeFmP.js +0 -1
- package/dist/web/assets/FilesWorkbenchPanel-BxjUf50f.js +0 -12
- package/dist/web/assets/LaunchCenterHost-1xrIDf73.js +0 -1
- package/dist/web/assets/LaunchConfigurationNotice-BfRdIOv0.js +0 -1
- package/dist/web/assets/LaunchesWorkbenchPanel-BhCyWFHf.js +0 -1
- package/dist/web/assets/LogStream-C70iQmUI.css +0 -1
- package/dist/web/assets/LogStream-CibF_jgC.js +0 -1
- package/dist/web/assets/MobileFilesBody-4bLT2m0j.js +0 -1
- package/dist/web/assets/MobileFilesHost-X_0r4Z16.js +0 -1
- package/dist/web/assets/MobileLaunchOutputHost-BEchaBtD.js +0 -1
- package/dist/web/assets/MobileLaunchesHost-S7Z3DySI.js +0 -2
- package/dist/web/assets/MobileSettingsHost-94-sABuO.js +0 -2
- package/dist/web/assets/SearchWorkbenchPanel-CKccBrNr.js +0 -1
- package/dist/web/assets/SettingsCenterHost-BM-xIy5S.js +0 -1
- package/dist/web/assets/SystemPromptCenterHost-VL4DXNId.js +0 -1
- package/dist/web/assets/adapters-CbIIxNp9.js +0 -1
- package/dist/web/assets/agent-profiles.svelte-8LAIYKmb.js +0 -1
- package/dist/web/assets/appearance.svelte-CLR_fMAx.js +0 -1
- package/dist/web/assets/center-tabs.svelte-BCriw5Eu.js +0 -1
- package/dist/web/assets/code-H_8FkG35.js +0 -7
- package/dist/web/assets/conversation-activity-Dl7udunb.js +0 -1
- package/dist/web/assets/conversation-connection-B226pY9T.js +0 -1
- package/dist/web/assets/discover-DTlfL84I.js +0 -4
- package/dist/web/assets/empty-B8eEKvqc.js +0 -1
- package/dist/web/assets/file-code-CMYYNL9l.js +0 -1
- package/dist/web/assets/files-eAvb-uRC.js +0 -48
- package/dist/web/assets/filesystem-CmkTuQNl.js +0 -1
- package/dist/web/assets/floating-toolbar-BwJ2tdsN.js +0 -1
- package/dist/web/assets/index-CH1Mvlxk.css +0 -1
- package/dist/web/assets/index-DNfABG4x.js +0 -172
- package/dist/web/assets/launches-ZxeZFPI8.js +0 -5
- package/dist/web/assets/launches.api-BEsX6AKZ.js +0 -1
- package/dist/web/assets/launches.svelte-QFDoCgug.js +0 -2
- package/dist/web/assets/menu-icons-C24r3TCF.js +0 -1
- package/dist/web/assets/mobile-launch-rows-Ci7ldwx6.js +0 -1
- package/dist/web/assets/page-tabs.svelte-VZp38ac7.js +0 -4
- package/dist/web/assets/panel-DEG1zXHj.js +0 -1
- package/dist/web/assets/popover-panel-B1cUdhY5.js +0 -5
- package/dist/web/assets/pr-view-loader.svelte-CZfxwzwL.js +0 -1
- package/dist/web/assets/progress-D2Cb6vK_.js +0 -1
- package/dist/web/assets/settings-B_ed0eye.js +0 -1
- package/dist/web/assets/settings-Dzj6Az_d.js +0 -1
- package/dist/web/assets/settings-scope-BjQBgG9v.js +0 -33
- package/dist/web/assets/shell-CbR1KanT.js +0 -1
- package/dist/web/assets/shell-layout.svelte-D5u4i1UJ.js +0 -2
- package/dist/web/assets/time-DqcZ_PFK.js +0 -1
- package/dist/web/assets/views-D4ociG21.js +0 -2
- package/dist/web/assets/workspace-actions.svelte-BMp3D2e1.js +0 -1
- /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/create-extension.mjs +0 -0
- /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/install-extension.mjs +0 -0
- /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/upgrade-extension.mjs +0 -0
- /package/dist/builtin/configure-nerve/{reference/writing-for-agents.md → writing-for-agents.md} +0 -0
- /package/dist/{chunk-H5CAHDII.js.LEGAL.txt → chunk-WQHOXPLV.js.LEGAL.txt} +0 -0
|
@@ -4,7 +4,10 @@ import {
|
|
|
4
4
|
hasExceededStrictToolLimits,
|
|
5
5
|
isStrictToolLimitErrorMessage,
|
|
6
6
|
markStrictToolLimitsExceeded
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UFE7IMKQ.js";
|
|
8
|
+
import {
|
|
9
|
+
SseDecoder
|
|
10
|
+
} from "./chunk-I7OMW4RJ.js";
|
|
8
11
|
import {
|
|
9
12
|
Anthropic
|
|
10
13
|
} from "./chunk-M3ELKCNA.js";
|
|
@@ -14,21 +17,17 @@ import {
|
|
|
14
17
|
ANTHROPIC_ORGANIZATION_ID_ENV,
|
|
15
18
|
ANTHROPIC_SERVICE_ACCOUNT_ID_ENV,
|
|
16
19
|
ANTHROPIC_WORKSPACE_ID_ENV
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-F3X2KHP4.js";
|
|
18
21
|
import {
|
|
19
22
|
registerSessionResourceCleanup
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
applyOpenRouterReportedCost,
|
|
23
|
-
isOpenRouterModel
|
|
24
|
-
} from "./chunk-N4OXAS3A.js";
|
|
23
|
+
} from "./chunk-QKRWXA5W.js";
|
|
25
24
|
import {
|
|
26
25
|
buildCopilotDynamicHeaders,
|
|
27
26
|
hasCopilotVisionInput
|
|
28
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-IL67WXRA.js";
|
|
29
28
|
import {
|
|
30
29
|
shortHash
|
|
31
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FZ7U3GZI.js";
|
|
32
31
|
import {
|
|
33
32
|
adjustMaxTokensForThinking,
|
|
34
33
|
buildBaseOptions,
|
|
@@ -38,46 +37,50 @@ import {
|
|
|
38
37
|
resolveJsonSchemaStrictSampling,
|
|
39
38
|
splitErrorToolResultImages,
|
|
40
39
|
transformMessages
|
|
41
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-RQIN5JYO.js";
|
|
42
41
|
import {
|
|
43
42
|
sanitizeSurrogates
|
|
44
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-P7GPT4XL.js";
|
|
44
|
+
import {
|
|
45
|
+
applyOpenRouterReportedCost,
|
|
46
|
+
isOpenRouterModel
|
|
47
|
+
} from "./chunk-R22FWLXU.js";
|
|
45
48
|
import {
|
|
46
49
|
retryProviderRequest
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-MRDORR5Z.js";
|
|
48
51
|
import {
|
|
49
52
|
withCauseDetail
|
|
50
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-EOZLBW5E.js";
|
|
51
54
|
import {
|
|
52
55
|
headersToRecord
|
|
53
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-NSISYP6D.js";
|
|
54
57
|
import {
|
|
55
58
|
getProviderEnvValue
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-LIIGX2XX.js";
|
|
57
60
|
import {
|
|
58
61
|
ToolCallArgumentsStream,
|
|
59
62
|
parseJsonWithRepair
|
|
60
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-WMZAJ7XA.js";
|
|
61
64
|
import {
|
|
62
65
|
calculateCost,
|
|
63
66
|
getCurrentTools,
|
|
64
67
|
getInitialSystemMessage,
|
|
65
68
|
resolveTranscript
|
|
66
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-WJAHXDL4.js";
|
|
67
70
|
import {
|
|
68
71
|
AssistantMessageEventStream,
|
|
69
72
|
appendAssistantMessageDiagnostic
|
|
70
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-A3OFIREH.js";
|
|
71
74
|
import {
|
|
72
75
|
getIdentityHeaders
|
|
73
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-FNWUCFVO.js";
|
|
74
77
|
import {
|
|
75
78
|
getSystemMessageText,
|
|
76
79
|
renderSystemMessageUpdate
|
|
77
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-EZJH7ED5.js";
|
|
78
81
|
import "./chunk-CWESUMYQ.js";
|
|
79
82
|
|
|
80
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
83
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js
|
|
81
84
|
function resolveCacheRetention(cacheRetention, env) {
|
|
82
85
|
if (cacheRetention) {
|
|
83
86
|
return cacheRetention;
|
|
@@ -194,7 +197,7 @@ function getAnthropicCompat(model) {
|
|
|
194
197
|
// Gateways that drop unknown request fields would silently turn a `continue` into a request
|
|
195
198
|
// without the earlier conversation, so the default is limited to Anthropic's own endpoint.
|
|
196
199
|
// Widen or remove this restriction once proxies generally forward the `thread` field.
|
|
197
|
-
supportsMessageThreads: model.compat?.supportsMessageThreads ??
|
|
200
|
+
supportsMessageThreads: model.compat?.supportsMessageThreads ?? model.baseUrl.includes("api.anthropic.com")
|
|
198
201
|
};
|
|
199
202
|
}
|
|
200
203
|
var threadState = /* @__PURE__ */ new Map();
|
|
@@ -365,71 +368,9 @@ var ANTHROPIC_MESSAGE_EVENTS = /* @__PURE__ */ new Set([
|
|
|
365
368
|
"content_block_delta",
|
|
366
369
|
"content_block_stop"
|
|
367
370
|
]);
|
|
368
|
-
function flushSseEvent(state) {
|
|
369
|
-
if (!state.event && state.data.length === 0) {
|
|
370
|
-
return null;
|
|
371
|
-
}
|
|
372
|
-
const event = {
|
|
373
|
-
event: state.event,
|
|
374
|
-
data: state.data.join("\n"),
|
|
375
|
-
raw: [...state.raw]
|
|
376
|
-
};
|
|
377
|
-
state.event = null;
|
|
378
|
-
state.data = [];
|
|
379
|
-
state.raw = [];
|
|
380
|
-
return event;
|
|
381
|
-
}
|
|
382
|
-
function decodeSseLine(line, state) {
|
|
383
|
-
if (line === "") {
|
|
384
|
-
return flushSseEvent(state);
|
|
385
|
-
}
|
|
386
|
-
state.raw.push(line);
|
|
387
|
-
if (line.startsWith(":")) {
|
|
388
|
-
return null;
|
|
389
|
-
}
|
|
390
|
-
const delimiterIndex = line.indexOf(":");
|
|
391
|
-
const fieldName = delimiterIndex === -1 ? line : line.slice(0, delimiterIndex);
|
|
392
|
-
let value = delimiterIndex === -1 ? "" : line.slice(delimiterIndex + 1);
|
|
393
|
-
if (value.startsWith(" ")) {
|
|
394
|
-
value = value.slice(1);
|
|
395
|
-
}
|
|
396
|
-
if (fieldName === "event") {
|
|
397
|
-
state.event = value;
|
|
398
|
-
} else if (fieldName === "data") {
|
|
399
|
-
state.data.push(value);
|
|
400
|
-
}
|
|
401
|
-
return null;
|
|
402
|
-
}
|
|
403
|
-
function nextLineBreakIndex(text) {
|
|
404
|
-
const carriageReturnIndex = text.indexOf("\r");
|
|
405
|
-
const newlineIndex = text.indexOf("\n");
|
|
406
|
-
if (carriageReturnIndex === -1) {
|
|
407
|
-
return newlineIndex;
|
|
408
|
-
}
|
|
409
|
-
if (newlineIndex === -1) {
|
|
410
|
-
return carriageReturnIndex;
|
|
411
|
-
}
|
|
412
|
-
return Math.min(carriageReturnIndex, newlineIndex);
|
|
413
|
-
}
|
|
414
|
-
function consumeLine(text) {
|
|
415
|
-
const lineBreakIndex = nextLineBreakIndex(text);
|
|
416
|
-
if (lineBreakIndex === -1) {
|
|
417
|
-
return null;
|
|
418
|
-
}
|
|
419
|
-
let nextIndex = lineBreakIndex + 1;
|
|
420
|
-
if (text[lineBreakIndex] === "\r" && text[nextIndex] === "\n") {
|
|
421
|
-
nextIndex += 1;
|
|
422
|
-
}
|
|
423
|
-
return {
|
|
424
|
-
line: text.slice(0, lineBreakIndex),
|
|
425
|
-
rest: text.slice(nextIndex)
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
371
|
async function* iterateSseMessages(body, signal) {
|
|
429
372
|
const reader = body.getReader();
|
|
430
|
-
const
|
|
431
|
-
const state = { event: null, data: [], raw: [] };
|
|
432
|
-
let buffer = "";
|
|
373
|
+
const sse = new SseDecoder();
|
|
433
374
|
try {
|
|
434
375
|
while (true) {
|
|
435
376
|
if (signal?.aborted) {
|
|
@@ -439,37 +380,9 @@ async function* iterateSseMessages(body, signal) {
|
|
|
439
380
|
if (done) {
|
|
440
381
|
break;
|
|
441
382
|
}
|
|
442
|
-
|
|
443
|
-
let consumed2 = consumeLine(buffer);
|
|
444
|
-
while (consumed2) {
|
|
445
|
-
buffer = consumed2.rest;
|
|
446
|
-
const event = decodeSseLine(consumed2.line, state);
|
|
447
|
-
if (event) {
|
|
448
|
-
yield event;
|
|
449
|
-
}
|
|
450
|
-
consumed2 = consumeLine(buffer);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
buffer += decoder.decode();
|
|
454
|
-
let consumed = consumeLine(buffer);
|
|
455
|
-
while (consumed) {
|
|
456
|
-
buffer = consumed.rest;
|
|
457
|
-
const event = decodeSseLine(consumed.line, state);
|
|
458
|
-
if (event) {
|
|
459
|
-
yield event;
|
|
460
|
-
}
|
|
461
|
-
consumed = consumeLine(buffer);
|
|
462
|
-
}
|
|
463
|
-
if (buffer.length > 0) {
|
|
464
|
-
const event = decodeSseLine(buffer, state);
|
|
465
|
-
if (event) {
|
|
466
|
-
yield event;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
const trailingEvent = flushSseEvent(state);
|
|
470
|
-
if (trailingEvent) {
|
|
471
|
-
yield trailingEvent;
|
|
383
|
+
yield* sse.push(value);
|
|
472
384
|
}
|
|
385
|
+
yield* sse.end();
|
|
473
386
|
} finally {
|
|
474
387
|
reader.releaseLock();
|
|
475
388
|
}
|
|
@@ -563,7 +476,8 @@ var stream = (model, context, options) => {
|
|
|
563
476
|
const send = (body) => retryProviderRequest(() => client.beta.messages.create(body, requestOptions).asResponse(), {
|
|
564
477
|
maxRetries: options?.maxRetries,
|
|
565
478
|
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
566
|
-
signal: options?.signal
|
|
479
|
+
signal: options?.signal,
|
|
480
|
+
onErrorResponse: (errorResponse) => options?.onResponse?.(errorResponse, model)
|
|
567
481
|
});
|
|
568
482
|
let disablePreferredStrictTools = hasExceededStrictToolLimits(options?.sessionId);
|
|
569
483
|
let response;
|
|
@@ -1312,6 +1226,8 @@ function convertTools(tools, isOAuthToken2, supportsEagerToolInputStreaming, sup
|
|
|
1312
1226
|
type: "object",
|
|
1313
1227
|
properties: schema.properties ?? {},
|
|
1314
1228
|
required: schema.required ?? [],
|
|
1229
|
+
...schema.additionalProperties === void 0 ? {} : { additionalProperties: schema.additionalProperties },
|
|
1230
|
+
...schema.$schema === void 0 ? {} : { $schema: schema.$schema },
|
|
1315
1231
|
...schema.$defs === void 0 ? {} : { $defs: schema.$defs },
|
|
1316
1232
|
...schema.definitions === void 0 ? {} : { definitions: schema.definitions }
|
|
1317
1233
|
};
|
|
@@ -2,12 +2,12 @@ import { createRequire as __nerveCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
clampThinkingLevel
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WJAHXDL4.js";
|
|
6
6
|
import {
|
|
7
7
|
getSystemMessageText
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EZJH7ED5.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
10
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js
|
|
11
11
|
var UnsupportedStrictJsonSchemaError = class extends Error {
|
|
12
12
|
};
|
|
13
13
|
var UNSUPPORTED_STRICT_SCHEMA_KEYS = [
|
|
@@ -62,6 +62,9 @@ function makeJsonSchemaNodeStrict(schema, isUnsupportedKeyword) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
if (schema.type === void 0 && schema.anyOf === void 0 && schema.enum === void 0) {
|
|
66
|
+
throw new UnsupportedStrictJsonSchemaError("schemas without a type are unsupported");
|
|
67
|
+
}
|
|
65
68
|
if (schema.anyOf !== void 0) {
|
|
66
69
|
if (!Array.isArray(schema.anyOf) || schema.anyOf.length === 0) {
|
|
67
70
|
throw new UnsupportedStrictJsonSchemaError("anyOf must contain at least one schema");
|
|
@@ -239,7 +242,7 @@ function createGrammarToolInputProperties(tools, supportsOpenAIGrammarTools) {
|
|
|
239
242
|
return properties;
|
|
240
243
|
}
|
|
241
244
|
|
|
242
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
245
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js
|
|
243
246
|
var CHARS_PER_TOKEN = 3.5;
|
|
244
247
|
var ESTIMATED_IMAGE_CHARS = 4800;
|
|
245
248
|
function calculateContextTokens(usage) {
|
|
@@ -324,7 +327,7 @@ function estimateToolsTokens(tools) {
|
|
|
324
327
|
return estimateTextTokens(safeJsonStringify(tools));
|
|
325
328
|
}
|
|
326
329
|
|
|
327
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
330
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js
|
|
328
331
|
var CONTEXT_SAFETY_TOKENS = 4096;
|
|
329
332
|
var CONTEXT_SAFETY_RATIO = 0.15;
|
|
330
333
|
var MIN_OUTPUT_WITH_RATIO_MARGIN = 32768;
|
|
@@ -399,7 +402,7 @@ function adjustMaxTokensForThinking(baseMaxTokens, modelMaxTokens, reasoningLeve
|
|
|
399
402
|
return { maxTokens, thinkingBudget };
|
|
400
403
|
}
|
|
401
404
|
|
|
402
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
405
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js
|
|
403
406
|
var NON_VISION_USER_IMAGE_PLACEHOLDER = "(image omitted: model does not support images)";
|
|
404
407
|
var NON_VISION_TOOL_IMAGE_PLACEHOLDER = "(tool image omitted: model does not support images)";
|
|
405
408
|
var ERROR_TOOL_IMAGE_PLACEHOLDER = "(image attached after the tool results)";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __nerveCreateRequire } from "node:module";
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
|
|
4
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
4
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/auth/oauth/trusted-url.js
|
|
5
5
|
function trustedHttpUrl(value) {
|
|
6
6
|
if (typeof value !== "string" || !URL.canParse(value))
|
|
7
7
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __nerveCreateRequire } from "node:module";
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
|
|
4
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
4
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js
|
|
5
5
|
var CANCEL_MESSAGE = "Login cancelled";
|
|
6
6
|
var TIMEOUT_MESSAGE = "Device flow timed out";
|
|
7
7
|
var SLOW_DOWN_TIMEOUT_MESSAGE = "Device flow timed out after one or more slow_down responses. This is often caused by clock drift in WSL or VM environments. Please sync or restart the VM clock and try again.";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire as __nerveCreateRequire } from "node:module";
|
|
2
|
+
const require = __nerveCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
classifySystemOne
|
|
5
|
+
} from "./chunk-7MJT6LHU.js";
|
|
6
|
+
import {
|
|
7
|
+
isRecord
|
|
8
|
+
} from "./chunk-CZXRZEV4.js";
|
|
9
|
+
import {
|
|
10
|
+
isOpenRouterModel
|
|
11
|
+
} from "./chunk-R22FWLXU.js";
|
|
12
|
+
import "./chunk-MRDORR5Z.js";
|
|
13
|
+
import "./chunk-EOZLBW5E.js";
|
|
14
|
+
import "./chunk-NSISYP6D.js";
|
|
15
|
+
import "./chunk-WJAHXDL4.js";
|
|
16
|
+
import "./chunk-A3OFIREH.js";
|
|
17
|
+
import "./chunk-FNWUCFVO.js";
|
|
18
|
+
import "./chunk-EZJH7ED5.js";
|
|
19
|
+
import "./chunk-CWESUMYQ.js";
|
|
20
|
+
|
|
21
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js
|
|
22
|
+
var transport = {
|
|
23
|
+
api: "typesafe-system-one",
|
|
24
|
+
label: "System One API",
|
|
25
|
+
detectCompat: (model) => isOpenRouterModel(model) ? { imageInput: "state-image-urls", sendImageOptInHeader: false } : { imageInput: "assets", sendImageOptInHeader: true },
|
|
26
|
+
url: (model) => new URL("systemone", `${model.baseUrl.replace(/\/+$/u, "")}/`),
|
|
27
|
+
payload: (model, request) => ({ model: model.id, ...request }),
|
|
28
|
+
output: (body) => {
|
|
29
|
+
if (!isRecord(body))
|
|
30
|
+
throw new Error("System One API returned an unexpected response");
|
|
31
|
+
return body;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var classify = (model, context, options) => classifySystemOne(transport, model, context, options);
|
|
35
|
+
export {
|
|
36
|
+
classify
|
|
37
|
+
};
|
|
@@ -2,7 +2,6 @@ import { createRequire as __nerveCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
ChangeMonitor,
|
|
5
|
-
NativeGitReadError,
|
|
6
5
|
NativeOperationError,
|
|
7
6
|
checkGitAncestry,
|
|
8
7
|
configureManagedProcessRuntime,
|
|
@@ -30,11 +29,10 @@ import {
|
|
|
30
29
|
terminateManagedTarget,
|
|
31
30
|
terminateTcpListener,
|
|
32
31
|
validateGitBranchName
|
|
33
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5VLAJMQQ.js";
|
|
34
33
|
import "./chunk-CWESUMYQ.js";
|
|
35
34
|
export {
|
|
36
35
|
ChangeMonitor,
|
|
37
|
-
NativeGitReadError,
|
|
38
36
|
NativeOperationError,
|
|
39
37
|
checkGitAncestry,
|
|
40
38
|
configureManagedProcessRuntime,
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { createRequire as __nerveCreateRequire } from "node:module";
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
applyOpenRouterReportedCost,
|
|
5
|
-
isOpenRouterModel
|
|
6
|
-
} from "./chunk-N4OXAS3A.js";
|
|
7
3
|
import {
|
|
8
4
|
buildCopilotDynamicHeaders,
|
|
9
5
|
hasCopilotVisionInput
|
|
10
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IL67WXRA.js";
|
|
11
7
|
import {
|
|
12
8
|
clampOpenAIPromptCacheKey
|
|
13
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KDGUQYYY.js";
|
|
14
10
|
import {
|
|
15
11
|
OpenAI
|
|
16
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RAHBWFWV.js";
|
|
17
13
|
import {
|
|
18
14
|
shortHash
|
|
19
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FZ7U3GZI.js";
|
|
20
16
|
import {
|
|
21
17
|
appendGrammarToolInputJsonDelta,
|
|
22
18
|
buildBaseOptions,
|
|
@@ -30,46 +26,84 @@ import {
|
|
|
30
26
|
resolveSamplingParams,
|
|
31
27
|
thinkingBudgetForLevel,
|
|
32
28
|
transformMessages
|
|
33
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-RQIN5JYO.js";
|
|
34
30
|
import {
|
|
35
31
|
sanitizeSurrogates
|
|
36
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-P7GPT4XL.js";
|
|
33
|
+
import {
|
|
34
|
+
applyOpenRouterReportedCost,
|
|
35
|
+
isOpenRouterModel
|
|
36
|
+
} from "./chunk-R22FWLXU.js";
|
|
37
37
|
import {
|
|
38
38
|
retryProviderRequest
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-MRDORR5Z.js";
|
|
40
40
|
import {
|
|
41
41
|
formatProviderError,
|
|
42
42
|
normalizeProviderError
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-EOZLBW5E.js";
|
|
44
44
|
import {
|
|
45
45
|
headersToRecord
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-NSISYP6D.js";
|
|
47
47
|
import {
|
|
48
48
|
getProviderEnvValue
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-LIIGX2XX.js";
|
|
50
50
|
import {
|
|
51
51
|
ToolCallArgumentsStream
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-WMZAJ7XA.js";
|
|
53
53
|
import {
|
|
54
54
|
calculateCost,
|
|
55
55
|
clampThinkingLevel,
|
|
56
56
|
getDeclaredTools,
|
|
57
57
|
resolveTranscript,
|
|
58
58
|
resolveTranscriptTools
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-WJAHXDL4.js";
|
|
60
60
|
import {
|
|
61
61
|
AssistantMessageEventStream
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-A3OFIREH.js";
|
|
63
63
|
import {
|
|
64
64
|
getIdentityHeaders
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-FNWUCFVO.js";
|
|
66
66
|
import {
|
|
67
67
|
getSystemMessageText,
|
|
68
68
|
renderSystemMessageUpdate
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-EZJH7ED5.js";
|
|
70
70
|
import "./chunk-CWESUMYQ.js";
|
|
71
71
|
|
|
72
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
72
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/utils/openrouter-finish-reason.js
|
|
73
|
+
function readOpenRouterNativeFinishReason(choice) {
|
|
74
|
+
const native = choice.native_finish_reason;
|
|
75
|
+
return typeof native === "string" && native.length > 0 ? native : void 0;
|
|
76
|
+
}
|
|
77
|
+
function applyOpenRouterNativeFinishReason(message, finishReason, nativeReason) {
|
|
78
|
+
if (nativeReason === finishReason)
|
|
79
|
+
return;
|
|
80
|
+
message.rawStopReason = `${finishReason}.${nativeReason}`;
|
|
81
|
+
if (message.stopReason === "error" && message.errorMessage) {
|
|
82
|
+
message.errorMessage += ` (native_finish_reason: ${nativeReason})`;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
var CLEAN_STOP_NATIVE_REASONS = /* @__PURE__ */ new Set([
|
|
86
|
+
"stop",
|
|
87
|
+
"end_turn",
|
|
88
|
+
"stop_sequence",
|
|
89
|
+
"eos",
|
|
90
|
+
"complete",
|
|
91
|
+
"completed",
|
|
92
|
+
"pause_turn",
|
|
93
|
+
"compaction",
|
|
94
|
+
"end_of_stream"
|
|
95
|
+
]);
|
|
96
|
+
function flagOpenRouterEmptyStop(message, nativeReason) {
|
|
97
|
+
if (message.stopReason !== "stop" || CLEAN_STOP_NATIVE_REASONS.has(nativeReason.toLowerCase()))
|
|
98
|
+
return;
|
|
99
|
+
const hasVisibleOutput = message.content.some((block) => block.type === "toolCall" || block.type === "text" && block.text.trim().length > 0);
|
|
100
|
+
if (hasVisibleOutput)
|
|
101
|
+
return;
|
|
102
|
+
message.stopReason = "error";
|
|
103
|
+
message.errorMessage = `OpenRouter returned an empty response (native_finish_reason: ${nativeReason})`;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js
|
|
73
107
|
function hasHeader(headers, name) {
|
|
74
108
|
if (!headers)
|
|
75
109
|
return false;
|
|
@@ -233,13 +267,16 @@ var stream = (model, context, options) => {
|
|
|
233
267
|
const { data: openaiStream, response } = await retryProviderRequest(() => client.chat.completions.create(params, requestOptions).withResponse(), {
|
|
234
268
|
maxRetries: options?.maxRetries,
|
|
235
269
|
maxRetryDelayMs: options?.maxRetryDelayMs,
|
|
236
|
-
signal: options?.signal
|
|
270
|
+
signal: options?.signal,
|
|
271
|
+
onErrorResponse: (errorResponse) => options?.onResponse?.(errorResponse, model)
|
|
237
272
|
});
|
|
238
273
|
await options?.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);
|
|
239
274
|
stream2.push({ type: "start", partial: output });
|
|
240
275
|
let textBlock = null;
|
|
241
276
|
let thinkingBlock = null;
|
|
242
277
|
let hasFinishReason = false;
|
|
278
|
+
const isOpenRouter = isOpenRouterModel(model);
|
|
279
|
+
let nativeFinishReason;
|
|
243
280
|
const toolCallBlocksByIndex = /* @__PURE__ */ new Map();
|
|
244
281
|
const toolCallBlocksById = /* @__PURE__ */ new Map();
|
|
245
282
|
const toolCallStates = /* @__PURE__ */ new Map();
|
|
@@ -381,6 +418,9 @@ var stream = (model, context, options) => {
|
|
|
381
418
|
if (!chunk.usage && choice.usage) {
|
|
382
419
|
output.usage = parseChunkUsage(choice.usage, model);
|
|
383
420
|
}
|
|
421
|
+
if (isOpenRouter) {
|
|
422
|
+
nativeFinishReason = readOpenRouterNativeFinishReason(choice) ?? nativeFinishReason;
|
|
423
|
+
}
|
|
384
424
|
if (choice.finish_reason) {
|
|
385
425
|
output.rawStopReason = choice.finish_reason;
|
|
386
426
|
const finishReasonResult = mapStopReason(choice.finish_reason);
|
|
@@ -388,6 +428,9 @@ var stream = (model, context, options) => {
|
|
|
388
428
|
if (finishReasonResult.errorMessage) {
|
|
389
429
|
output.errorMessage = finishReasonResult.errorMessage;
|
|
390
430
|
}
|
|
431
|
+
if (nativeFinishReason) {
|
|
432
|
+
applyOpenRouterNativeFinishReason(output, choice.finish_reason, nativeFinishReason);
|
|
433
|
+
}
|
|
391
434
|
hasFinishReason = true;
|
|
392
435
|
}
|
|
393
436
|
if (choice.delta) {
|
|
@@ -477,6 +520,9 @@ var stream = (model, context, options) => {
|
|
|
477
520
|
if (!hasFinishReason && !compat.supportsFinishReason) {
|
|
478
521
|
output.stopReason = output.content.some((block) => block.type === "toolCall") ? "toolUse" : "stop";
|
|
479
522
|
}
|
|
523
|
+
if (nativeFinishReason) {
|
|
524
|
+
flagOpenRouterEmptyStop(output, nativeFinishReason);
|
|
525
|
+
}
|
|
480
526
|
if (output.stopReason === "error") {
|
|
481
527
|
throw new Error(output.errorMessage || "Provider returned an error stop reason");
|
|
482
528
|
}
|
|
@@ -1073,7 +1119,7 @@ function parseChunkUsage(rawUsage, model) {
|
|
|
1073
1119
|
output: outputTokens,
|
|
1074
1120
|
cacheRead: cacheReadTokens,
|
|
1075
1121
|
cacheWrite: cacheWriteTokens,
|
|
1076
|
-
reasoning: rawUsage.completion_tokens_details?.reasoning_tokens || 0,
|
|
1122
|
+
reasoning: rawUsage.completion_tokens_details?.reasoning_tokens || rawUsage.reasoning_tokens || 0,
|
|
1077
1123
|
totalTokens: input + outputTokens + cacheReadTokens + cacheWriteTokens,
|
|
1078
1124
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }
|
|
1079
1125
|
};
|
|
@@ -1122,11 +1168,11 @@ function detectCompat(model) {
|
|
|
1122
1168
|
const isNonStandard = isNvidia || isCerebras || provider === "xai" || baseUrl.includes("api.x.ai") || isTogether || baseUrl.includes("chutes.ai") || isDeepSeek || isZai || isMoonshot || provider === "opencode" || baseUrl.includes("opencode.ai") || isCloudflareWorkersAI || isCloudflareAiGateway || isAntLing;
|
|
1123
1169
|
const useMaxTokens = baseUrl.includes("chutes.ai") || isDeepSeek || isMoonshot || isCloudflareAiGateway || isTogether || isNvidia || isAntLing || isZai;
|
|
1124
1170
|
const isGrok = provider === "xai" || baseUrl.includes("api.x.ai");
|
|
1125
|
-
const
|
|
1171
|
+
const isOpenAI = provider === "openai" || baseUrl.includes("api.openai.com");
|
|
1126
1172
|
const cacheControlFormat = provider === "openrouter" && model.id.startsWith("anthropic/") ? "anthropic" : void 0;
|
|
1127
1173
|
return {
|
|
1128
1174
|
supportsStore: !isNonStandard,
|
|
1129
|
-
supportsDeveloperRole:
|
|
1175
|
+
supportsDeveloperRole: isOpenAI,
|
|
1130
1176
|
supportsReasoningEffort: !isGrok && !isZai && !isMoonshot && !isTogether && !isCloudflareAiGateway && !isNvidia && !isAntLing,
|
|
1131
1177
|
supportsUsageInStreaming: true,
|
|
1132
1178
|
supportsFinishReason: true,
|
|
@@ -2,9 +2,9 @@ import { createRequire as __nerveCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
registerSessionResourceCleanup
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QKRWXA5W.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
7
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/api/strict-tool-limits.js
|
|
8
8
|
var STRICT_TOOL_LIMIT_ERROR_MESSAGES = [
|
|
9
9
|
"The compiled grammar is too large",
|
|
10
10
|
"Too many strict tools (",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __nerveCreateRequire } from "node:module";
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
|
|
4
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
4
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js
|
|
5
5
|
function combineAbortSignals(signals) {
|
|
6
6
|
const activeSignals = signals.filter((signal) => signal !== void 0);
|
|
7
7
|
if (activeSignals.length === 0) {
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
generatePKCE,
|
|
5
5
|
oauthErrorHtml,
|
|
6
6
|
oauthSuccessHtml
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QC6DSC4D.js";
|
|
8
8
|
import {
|
|
9
9
|
getProviderEnvValue
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LIIGX2XX.js";
|
|
11
11
|
import "./chunk-CWESUMYQ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
13
|
+
// node_modules/.pnpm/@earendil-works+pi-ai@1.6.1_@smithy+signature-v4@5.7.3_google-auth-library@10.7.0_suppo_bdf1b0d1b5e752e25be2c525cddbb146/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js
|
|
14
14
|
import { randomBytes } from "node:crypto";
|
|
15
15
|
import { createServer } from "node:http";
|
|
16
16
|
var DYNAMIC_CLIENT_ID = "dynamic_agent_client";
|