@nervekit/desktop 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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/display/status.d.ts +3 -0
- package/dist/builtin/configure-nerve/{guide/extensions.md → reference/extensions/build.md} +4 -4
- 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-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-H5CAHDII.js → chunk-EBDLSTDH.js} +51414 -50054
- 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-376GN4PB.js → chunk-HKBJTS2Z.js} +173 -79
- 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-DHIDYKXJ.js → chunk-XIVWNWL7.js} +1778 -1701
- package/dist/{chunk-EUT45AKW.js → chunk-YODV42KQ.js} +25 -32
- package/dist/{chunk-FCAIYPDJ.js → chunk-ZFFWWZIA.js} +2 -2
- 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-DldW4utc.js → AsyncBashCenterHost-Dcx6zVCo.js} +1 -1
- package/dist/web/assets/{ConversationListItem-CCaGnyA1.js → ConversationListItem-DALhochc.js} +3 -3
- package/dist/web/assets/{ConversationsWorkbenchPanel-DLM3saY5.js → ConversationsWorkbenchPanel-ChtoTW2H.js} +1 -1
- package/dist/web/assets/{DiscoverCenterHost-DVNL8uZQ.js → DiscoverCenterHost-Bju7ypB-.js} +1 -1
- package/dist/web/assets/{ExtensionPageCenterHost-CHKg6c3M.js → ExtensionPageCenterHost-BO-5q4j_.js} +1 -1
- package/dist/web/assets/FileCenterComposedHost-BxLlLMBI.js +1 -0
- package/dist/web/assets/{FilesWorkbenchPanel-BxjUf50f.js → FilesWorkbenchPanel-jyqwIQAe.js} +4 -4
- package/dist/web/assets/{GitDiffCenterHost-DmtKqHer.js → GitDiffCenterHost-D8i3Jq9A.js} +1 -1
- package/dist/web/assets/{GitWorkbenchPanel-BmyMyvL8.js → GitWorkbenchPanel-CtZPJKqJ.js} +1 -1
- package/dist/web/assets/{LaunchCenterHost-1xrIDf73.js → LaunchCenterHost-CSy1io6s.js} +1 -1
- package/dist/web/assets/{LaunchConfigurationNotice-BfRdIOv0.js → LaunchConfigurationNotice-DugBa05c.js} +1 -1
- package/dist/web/assets/{LaunchesWorkbenchPanel-BhCyWFHf.js → LaunchesWorkbenchPanel-CNqGG_AP.js} +1 -1
- package/dist/web/assets/{LogStream-CibF_jgC.js → LogStream-DfJ4LiCv.js} +1 -1
- package/dist/web/assets/{LogsCenterHost-CdqD6zH8.js → LogsCenterHost-xynA0TWK.js} +1 -1
- package/dist/web/assets/{MermaidCenterHost-BjwJLU-2.js → MermaidCenterHost-kAV1ocvE.js} +1 -1
- package/dist/web/assets/MobileFilesBody-CiwIT8Vf.js +1 -0
- package/dist/web/assets/MobileFilesHost-DvQOpQFH.js +1 -0
- package/dist/web/assets/MobileLaunchOutputHost-pFJgIV1_.js +1 -0
- package/dist/web/assets/MobileLaunchesHost-0VtdW0x8.js +2 -0
- package/dist/web/assets/{MobileNoteEditorHost-lfAeMVH9.js → MobileNoteEditorHost-DSuZ0mU5.js} +1 -1
- package/dist/web/assets/{MobileNotesHost-DOi0goPc.js → MobileNotesHost-Lg699XCv.js} +2 -2
- package/dist/web/assets/MobileSettingsHost-Bv1P74ck.js +2 -0
- package/dist/web/assets/{MobileSettingsPageHost-CtpUzfVG.js → MobileSettingsPageHost-DudFqhZC.js} +1 -1
- package/dist/web/assets/{NotesWorkbenchPanel-CsbMYHAw.js → NotesWorkbenchPanel-C8sctQWR.js} +1 -1
- package/dist/web/assets/{PullRequestCenterHost-B22Ua7bA.js → PullRequestCenterHost-BWJ-exw1.js} +1 -1
- package/dist/web/assets/{PullRequestsWorkbenchPanel-DOIHvZ6H.js → PullRequestsWorkbenchPanel-8Fb0-hW3.js} +1 -1
- package/dist/web/assets/SearchWorkbenchPanel-B35YmwtL.js +1 -0
- package/dist/web/assets/SettingsCenterHost-BuiirrId.js +1 -0
- package/dist/web/assets/SystemPromptCenterHost-BqKV92Ew.js +2 -0
- package/dist/web/assets/{ThemePreviewPicker-B_DTUsui.js → ThemePreviewPicker-C6J0H91i.js} +1 -1
- package/dist/web/assets/adapters-C5HB2cBr.js +1 -0
- package/dist/web/assets/agent-profiles.svelte-DjdXLJnE.js +1 -0
- package/dist/web/assets/appearance.svelte-fB4gKc-X.js +1 -0
- package/dist/web/assets/center-tabs.svelte-8YpJhA1o.js +2 -0
- package/dist/web/assets/{channel-CxF1CmEY.js → channel-3Wv484LF.js} +2 -2
- package/dist/web/assets/{client-CVZRorEj.js → client-CjIsgPXA.js} +1 -1
- package/dist/web/assets/code-BDTZAlQg.js +7 -0
- package/dist/web/assets/conversation-activity-CZJfUGoL.js +1 -0
- package/dist/web/assets/conversation-connection-Dm9Zr6Yb.js +1 -0
- package/dist/web/assets/discover-Cwv6pB0p.js +4 -0
- package/dist/web/assets/{dist-DZN4bTV3.js → dist-BB4fpXjy.js} +1 -1
- package/dist/web/assets/{dist-DkQMSgZ5.js → dist-BBlCv_-z.js} +1 -1
- package/dist/web/assets/{dist-HTsJAisd.js → dist-BENZZeCy.js} +1 -1
- package/dist/web/assets/{dist-BWsookwC.js → dist-BqcaQXZ-.js} +1 -1
- package/dist/web/assets/{dist-CDM0qUmO.js → dist-CIK1TmOX.js} +1 -1
- package/dist/web/assets/{dist-EmwCDpCc.js → dist-DUPZ8ZaX.js} +1 -1
- package/dist/web/assets/{dist-BVmTdBxj.js → dist-DoKRJEPu.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-D2TAUtUA.js} +2 -2
- package/dist/web/assets/{file-tabs.svelte-CaZRhyw0.js → file-tabs.svelte-DxL_vZZv.js} +2 -2
- package/dist/web/assets/{files-dFQS0tcX.css → files-N9JiAfxr.css} +1 -1
- package/dist/web/assets/files-vq7_WbHL.js +156 -0
- package/dist/web/assets/filesystem-DiVFVMn3.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-D9S4P9gI.js} +1 -1
- package/dist/web/assets/{icon-action-efe9ZEWq.js → icon-action-C9h3TdBz.js} +1 -1
- package/dist/web/assets/index-B8XniJoh.js +165 -0
- package/dist/web/assets/index-DC_ohlBG.css +1 -0
- package/dist/web/assets/{launches-ZxeZFPI8.js → launches-CmB4KShL.js} +5 -5
- package/dist/web/assets/launches.api-C4z0obJK.js +1 -0
- package/dist/web/assets/{launches.svelte-QFDoCgug.js → launches.svelte-D2bNAphM.js} +2 -2
- package/dist/web/assets/{logs.api-gZ2mVC9q.js → logs.api-BtGxtYFi.js} +1 -1
- package/dist/web/assets/{maintenance-state.svelte-xMmmI9yr.js → maintenance-state.svelte-BusQWeCR.js} +2 -2
- package/dist/web/assets/menu-icons-DLuZ586C.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-Cc5F8hMx.js +4 -0
- package/dist/web/assets/panel-BW0llJiU.js +1 -0
- package/dist/web/assets/popover-panel-SA7quIc1.js +4 -0
- package/dist/web/assets/{pr-view-loader.svelte-CZfxwzwL.js → pr-view-loader.svelte-eOmDNaGf.js} +1 -1
- package/dist/web/assets/progress-BZbo8ynI.js +1 -0
- package/dist/web/assets/{scratch-notes-state.svelte-rBeSOn4h.js → scratch-notes-state.svelte-B4NySamQ.js} +1 -1
- package/dist/web/assets/{scratch-notes.api-Co80EGtL.js → scratch-notes.api-BMBs2yoU.js} +1 -1
- package/dist/web/assets/settings-Cu_0wNkX.js +1 -0
- package/dist/web/assets/settings-DTw27q0i.js +1 -0
- package/dist/web/assets/settings-scope-Bz4U5ImL.js +35 -0
- package/dist/web/assets/shell-BiZy0tcZ.js +1 -0
- package/dist/web/assets/{shell-layout.svelte-D5u4i1UJ.js → shell-layout.svelte-Dyx_fbRn.js} +2 -2
- 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-DIrSFdZB.js +2 -0
- package/dist/web/assets/{workbench-connection-Gsy9bIuP.js → workbench-connection-BpvUZMVX.js} +1 -1
- package/dist/web/assets/workspace-actions.svelte-DE0mQsY6.js +1 -0
- package/dist/web/assets/{workspace-selectors.svelte-D-EQR_-Z.js → workspace-selectors.svelte-B90FdGfV.js} +2 -2
- package/dist/web/assets/{workspace-CUoFFOwJ.js → workspace-uXAUsF3x.js} +1 -1
- package/dist/web/index.html +47 -47
- 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/FileCenterComposedHost-kxFWeFmP.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.api-BEsX6AKZ.js +0 -1
- 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/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/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-EBDLSTDH.js.LEGAL.txt} +0 -0
|
@@ -2,60 +2,58 @@ import { createRequire as __nerveCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
resolveHttpProxyUrlForTarget
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-35O66NLU.js";
|
|
6
6
|
import {
|
|
7
7
|
combineAbortSignals
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UQHUYEFW.js";
|
|
9
|
+
import {
|
|
10
|
+
SseDecoder
|
|
11
|
+
} from "./chunk-I7OMW4RJ.js";
|
|
9
12
|
import {
|
|
10
13
|
convertResponsesMessages,
|
|
11
|
-
|
|
12
|
-
getResponsesToolSupport,
|
|
14
|
+
prepareResponsesPrompt,
|
|
13
15
|
processResponsesStream
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KQD4DYEP.js";
|
|
15
17
|
import {
|
|
16
18
|
registerSessionResourceCleanup
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QKRWXA5W.js";
|
|
18
20
|
import {
|
|
19
21
|
clampOpenAIPromptCacheKey
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-KDGUQYYY.js";
|
|
23
|
+
import "./chunk-FZ7U3GZI.js";
|
|
22
24
|
import {
|
|
23
25
|
buildBaseOptions,
|
|
24
26
|
createGrammarToolInputProperties
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-RQIN5JYO.js";
|
|
28
|
+
import "./chunk-P7GPT4XL.js";
|
|
27
29
|
import {
|
|
28
30
|
formatProviderError,
|
|
29
31
|
normalizeProviderError
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-EOZLBW5E.js";
|
|
31
33
|
import {
|
|
32
34
|
headersToRecord
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-NSISYP6D.js";
|
|
36
|
+
import "./chunk-LIIGX2XX.js";
|
|
37
|
+
import "./chunk-WMZAJ7XA.js";
|
|
36
38
|
import {
|
|
37
39
|
clampThinkingLevel,
|
|
38
40
|
getDeclaredTools,
|
|
39
|
-
getInitialSystemMessage,
|
|
40
41
|
normalizeContext,
|
|
41
|
-
resolveTranscript
|
|
42
|
-
|
|
43
|
-
} from "./chunk-W7LEYYFH.js";
|
|
42
|
+
resolveTranscript
|
|
43
|
+
} from "./chunk-WJAHXDL4.js";
|
|
44
44
|
import {
|
|
45
45
|
AssistantMessageEventStream,
|
|
46
46
|
appendAssistantMessageDiagnostic,
|
|
47
47
|
createAssistantMessageDiagnostic,
|
|
48
48
|
formatThrownValue
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-A3OFIREH.js";
|
|
50
50
|
import {
|
|
51
51
|
getIdentityHeaders
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import
|
|
54
|
-
getSystemMessageText
|
|
55
|
-
} from "./chunk-U5KGV63C.js";
|
|
52
|
+
} from "./chunk-FNWUCFVO.js";
|
|
53
|
+
import "./chunk-EZJH7ED5.js";
|
|
56
54
|
import "./chunk-CWESUMYQ.js";
|
|
57
55
|
|
|
58
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
56
|
+
// 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/uuid.js
|
|
59
57
|
var MAX_UUID_V7_TIMESTAMP = 281474976710655;
|
|
60
58
|
var MAX_SEQUENCE = (1n << 41n) - 1n;
|
|
61
59
|
var lastOrdinaryTimestamp = -1;
|
|
@@ -91,7 +89,7 @@ function uuidv7(timestampMs) {
|
|
|
91
89
|
return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(6, 8).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
|
|
92
90
|
}
|
|
93
91
|
|
|
94
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
92
|
+
// 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-codex-responses.js
|
|
95
93
|
var DEFAULT_CODEX_BASE_URL = "https://chatgpt.com/backend-api";
|
|
96
94
|
var JWT_CLAIM_PATH = "https://api.openai.com/auth";
|
|
97
95
|
var DEFAULT_MAX_RETRIES = 0;
|
|
@@ -103,6 +101,7 @@ var CODEX_TOOL_CALL_PROVIDERS = /* @__PURE__ */ new Set(["openai", "openai-codex
|
|
|
103
101
|
var WEBSOCKET_MESSAGE_TOO_BIG_CLOSE_CODE = 1009;
|
|
104
102
|
var WEBSOCKET_CONNECTION_LIMIT_REACHED_CODE = "websocket_connection_limit_reached";
|
|
105
103
|
var PREVIOUS_RESPONSE_NOT_FOUND_CODE = "previous_response_not_found";
|
|
104
|
+
var MIN_OUTPUT_TOKENS = 16;
|
|
106
105
|
var CODEX_RESPONSE_STATUSES = /* @__PURE__ */ new Set([
|
|
107
106
|
"completed",
|
|
108
107
|
"incomplete",
|
|
@@ -211,12 +210,14 @@ var stream = (model, context, options) => {
|
|
|
211
210
|
const stream2 = new AssistantMessageEventStream();
|
|
212
211
|
const normalizedContext = resolveTranscript(context, model.compat?.supportsMidConvoSystemMessages);
|
|
213
212
|
(async () => {
|
|
213
|
+
const configurationUpdateEffort = getConfigurationUpdateEffort(model, options);
|
|
214
214
|
const output = {
|
|
215
215
|
role: "assistant",
|
|
216
216
|
content: [],
|
|
217
217
|
api: "openai-codex-responses",
|
|
218
218
|
provider: model.provider,
|
|
219
219
|
model: model.id,
|
|
220
|
+
...configurationUpdateEffort === void 0 ? {} : { providerThinkingLevel: configurationUpdateEffort },
|
|
220
221
|
usage: {
|
|
221
222
|
input: 0,
|
|
222
223
|
output: 0,
|
|
@@ -237,7 +238,7 @@ var stream = (model, context, options) => {
|
|
|
237
238
|
const grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(normalizedContext.messages), model.compat?.supportsOpenAIGrammarTools ?? false);
|
|
238
239
|
const cacheSessionId = options?.cacheRetention === "none" ? void 0 : options?.sessionId;
|
|
239
240
|
const codexSessionId = clampOpenAIPromptCacheKey(cacheSessionId);
|
|
240
|
-
let body = buildRequestBody(model, normalizedContext, options, codexSessionId, grammarToolInputProperties);
|
|
241
|
+
let body = buildRequestBody(model, normalizedContext, options, codexSessionId, grammarToolInputProperties, configurationUpdateEffort);
|
|
241
242
|
const nextBody = await options?.onPayload?.(body, model);
|
|
242
243
|
if (nextBody !== void 0) {
|
|
243
244
|
body = nextBody;
|
|
@@ -408,60 +409,62 @@ var streamSimple = (model, context, options) => {
|
|
|
408
409
|
...buildBaseOptions(model, context, options, apiKey),
|
|
409
410
|
toolChoice: options?.toolChoice
|
|
410
411
|
};
|
|
411
|
-
const clampedReasoning = options?.reasoning ? clampThinkingLevel(model, options.reasoning) :
|
|
412
|
-
const reasoningEffort = clampedReasoning
|
|
412
|
+
const clampedReasoning = options?.reasoning ? clampThinkingLevel(model, options.reasoning) : "off";
|
|
413
|
+
const reasoningEffort = clampedReasoning !== "off" ? clampedReasoning : model.reasoning ? "none" : void 0;
|
|
413
414
|
return stream(model, context, {
|
|
414
415
|
...base,
|
|
415
416
|
reasoningEffort
|
|
416
417
|
});
|
|
417
418
|
};
|
|
418
|
-
function
|
|
419
|
+
function getConfigurationUpdateEffort(model, options) {
|
|
420
|
+
if (!model.compat?.supportsMidConvoEffort || options?.reasoningEffort === void 0)
|
|
421
|
+
return void 0;
|
|
422
|
+
return resolveReasoningEffort(model, options.reasoningEffort) ?? void 0;
|
|
423
|
+
}
|
|
424
|
+
function resolveReasoningEffort(model, reasoningEffort) {
|
|
425
|
+
if (reasoningEffort === "none") {
|
|
426
|
+
return model.thinkingLevelMap?.off === void 0 ? "none" : model.thinkingLevelMap.off;
|
|
427
|
+
}
|
|
428
|
+
return model.thinkingLevelMap?.[reasoningEffort] ?? reasoningEffort;
|
|
429
|
+
}
|
|
430
|
+
function buildRequestBody(model, context, options, cacheSessionId, grammarToolInputProperties, configurationUpdateEffort) {
|
|
419
431
|
const supportsStrictMode = model.compat?.supportsStrictMode ?? true;
|
|
420
432
|
const supportsOpenAIGrammarTools = model.compat?.supportsOpenAIGrammarTools ?? false;
|
|
421
433
|
const supportsAdditionalTools = model.compat?.supportsAdditionalTools ?? false;
|
|
422
434
|
const supportsToolSearch = model.compat?.supportsToolSearch ?? false;
|
|
423
|
-
const
|
|
424
|
-
supportsMidConvoSystemMessages: model.compat?.supportsMidConvoSystemMessages ?? false,
|
|
425
|
-
supportsAdditionalTools,
|
|
426
|
-
supportsToolSearch
|
|
427
|
-
}));
|
|
428
|
-
const messages = convertResponsesMessages(model, context, CODEX_TOOL_CALL_PROVIDERS, {
|
|
429
|
-
includeSystemPrompt: false,
|
|
435
|
+
const { input, requestTools, requestEffortBaseline } = prepareResponsesPrompt(model, context, CODEX_TOOL_CALL_PROVIDERS, {
|
|
430
436
|
grammarToolInputProperties,
|
|
431
437
|
supportsMidConvoSystemMessages: model.compat?.supportsMidConvoSystemMessages ?? false,
|
|
432
438
|
supportsAdditionalTools,
|
|
433
439
|
supportsToolSearch,
|
|
434
|
-
toolOptions: { strict: null, supportsStrictMode, supportsOpenAIGrammarTools }
|
|
440
|
+
toolOptions: { strict: null, supportsStrictMode, supportsOpenAIGrammarTools },
|
|
441
|
+
configurationUpdateEffort,
|
|
442
|
+
effortBaseline: "initial"
|
|
435
443
|
});
|
|
436
|
-
const initialSystemMessage = getInitialSystemMessage(context.messages);
|
|
437
|
-
const instructions = initialSystemMessage ? getSystemMessageText(initialSystemMessage) : "";
|
|
438
444
|
const body = {
|
|
439
445
|
model: model.id,
|
|
440
446
|
store: false,
|
|
441
447
|
stream: true,
|
|
442
|
-
|
|
443
|
-
input: messages,
|
|
448
|
+
input,
|
|
444
449
|
text: { verbosity: options?.textVerbosity || "low" },
|
|
445
450
|
include: ["reasoning.encrypted_content"],
|
|
446
451
|
prompt_cache_key: cacheSessionId,
|
|
447
452
|
tool_choice: options?.toolChoice ?? "auto",
|
|
448
453
|
parallel_tool_calls: true
|
|
449
454
|
};
|
|
455
|
+
if (options?.maxTokens && (model.compat?.supportsMaxOutputTokens ?? true)) {
|
|
456
|
+
body.max_output_tokens = Math.max(options.maxTokens, MIN_OUTPUT_TOKENS);
|
|
457
|
+
}
|
|
450
458
|
if (options?.temperature !== void 0) {
|
|
451
459
|
body.temperature = options.temperature;
|
|
452
460
|
}
|
|
453
461
|
if (options?.serviceTier !== void 0) {
|
|
454
462
|
body.service_tier = options.serviceTier;
|
|
455
463
|
}
|
|
456
|
-
if (
|
|
457
|
-
body.tools =
|
|
458
|
-
strict: null,
|
|
459
|
-
supportsStrictMode,
|
|
460
|
-
supportsOpenAIGrammarTools
|
|
461
|
-
});
|
|
462
|
-
}
|
|
464
|
+
if (requestTools.length > 0)
|
|
465
|
+
body.tools = requestTools;
|
|
463
466
|
if (options?.reasoningEffort !== void 0) {
|
|
464
|
-
const effort =
|
|
467
|
+
const effort = requestEffortBaseline ?? resolveReasoningEffort(model, options.reasoningEffort);
|
|
465
468
|
if (effort !== null) {
|
|
466
469
|
body.reasoning = {
|
|
467
470
|
effort,
|
|
@@ -611,8 +614,7 @@ async function* parseSSE(response, signal) {
|
|
|
611
614
|
if (!response.body)
|
|
612
615
|
return;
|
|
613
616
|
const reader = response.body.getReader();
|
|
614
|
-
const
|
|
615
|
-
let buffer = "";
|
|
617
|
+
const sse = new SseDecoder();
|
|
616
618
|
const onAbort = () => {
|
|
617
619
|
void reader.cancel().catch(() => {
|
|
618
620
|
});
|
|
@@ -627,28 +629,19 @@ async function* parseSSE(response, signal) {
|
|
|
627
629
|
if (signal?.aborted) {
|
|
628
630
|
throw new Error("Request was aborted");
|
|
629
631
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
try {
|
|
642
|
-
yield JSON.parse(data);
|
|
643
|
-
} catch (cause) {
|
|
644
|
-
throw new CodexProtocolError(`Invalid Codex SSE JSON: ${formatThrownValue(cause)}`, {
|
|
645
|
-
cause,
|
|
646
|
-
payload: data
|
|
647
|
-
});
|
|
648
|
-
}
|
|
632
|
+
const events = done ? sse.end() : sse.push(value);
|
|
633
|
+
for (const event of events) {
|
|
634
|
+
const data = event.data.trim();
|
|
635
|
+
if (data && data !== "[DONE]") {
|
|
636
|
+
try {
|
|
637
|
+
yield JSON.parse(data);
|
|
638
|
+
} catch (cause) {
|
|
639
|
+
throw new CodexProtocolError(`Invalid Codex SSE JSON: ${formatThrownValue(cause)}`, {
|
|
640
|
+
cause,
|
|
641
|
+
payload: data
|
|
642
|
+
});
|
|
649
643
|
}
|
|
650
644
|
}
|
|
651
|
-
idx = buffer.indexOf("\n\n");
|
|
652
645
|
}
|
|
653
646
|
if (done)
|
|
654
647
|
break;
|
|
@@ -667,7 +660,7 @@ async function* parseSSE(response, signal) {
|
|
|
667
660
|
}
|
|
668
661
|
var OPENAI_BETA_RESPONSES_WEBSOCKETS = "responses_websockets=2026-02-06";
|
|
669
662
|
var SESSION_WEBSOCKET_CACHE_TTL_MS = 5 * 60 * 1e3;
|
|
670
|
-
var SESSION_WEBSOCKET_MAX_AGE_MS =
|
|
663
|
+
var SESSION_WEBSOCKET_MAX_AGE_MS = 45 * 60 * 1e3;
|
|
671
664
|
var websocketSessionCache = /* @__PURE__ */ new Map();
|
|
672
665
|
var websocketDebugStats = /* @__PURE__ */ new Map();
|
|
673
666
|
var websocketSseFallbackSessions = /* @__PURE__ */ new Set();
|
|
@@ -1220,10 +1213,7 @@ async function processWebSocketStream(url, body, headers, output, stream2, model
|
|
|
1220
1213
|
if (options?.signal?.aborted) {
|
|
1221
1214
|
keepConnection = false;
|
|
1222
1215
|
} else if (useCachedContext && entry && output.responseId) {
|
|
1223
|
-
const responseItems = convertResponsesMessages(model, normalizeContext({ messages: [output] }), CODEX_TOOL_CALL_PROVIDERS, {
|
|
1224
|
-
includeSystemPrompt: false,
|
|
1225
|
-
grammarToolInputProperties
|
|
1226
|
-
}).filter((item) => item.type !== "function_call_output" && item.type !== "custom_tool_call_output");
|
|
1216
|
+
const responseItems = convertResponsesMessages(model, normalizeContext({ messages: [output] }), CODEX_TOOL_CALL_PROVIDERS, { grammarToolInputProperties }).filter((item) => item.type !== "function_call_output" && item.type !== "custom_tool_call_output");
|
|
1227
1217
|
entry.continuation = {
|
|
1228
1218
|
lastRequestBody: fullBody,
|
|
1229
1219
|
lastResponseId: output.responseId,
|
|
@@ -3,16 +3,16 @@ const require = __nerveCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
startOAuthCallbackServer,
|
|
5
5
|
waitForCallbackOrManualInput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WLTE6OJM.js";
|
|
7
7
|
import {
|
|
8
8
|
generatePKCE
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QC6DSC4D.js";
|
|
10
10
|
import {
|
|
11
11
|
getProviderEnvValue
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LIIGX2XX.js";
|
|
13
13
|
import "./chunk-CWESUMYQ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
15
|
+
// 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/openrouter.js
|
|
16
16
|
var AUTHORIZE_URL = "https://openrouter.ai/auth";
|
|
17
17
|
var TOKEN_URL = "https://openrouter.ai/api/v1/auth/keys";
|
|
18
18
|
var LOGIN_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
@@ -2,19 +2,19 @@ import { createRequire as __nerveCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
retryProviderRequest
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MRDORR5Z.js";
|
|
6
6
|
import {
|
|
7
7
|
headersToRecord,
|
|
8
8
|
providerHeadersToRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NSISYP6D.js";
|
|
10
10
|
import {
|
|
11
11
|
calculateCost
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WJAHXDL4.js";
|
|
13
13
|
import {
|
|
14
14
|
getIdentityHeaders
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FNWUCFVO.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
17
|
+
// 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/classifier-shared.js
|
|
18
18
|
function httpError(label, response, body) {
|
|
19
19
|
const error = new Error(`${label} returned ${response.status}`);
|
|
20
20
|
error.status = response.status;
|
|
@@ -51,7 +51,7 @@ async function postClassifierRequest(label, url, model, body, options, noRetrySt
|
|
|
51
51
|
if (transformed !== void 0)
|
|
52
52
|
payload = transformed;
|
|
53
53
|
const requestFetch = options.fetch ?? globalThis.fetch;
|
|
54
|
-
|
|
54
|
+
return retryProviderRequest(async () => {
|
|
55
55
|
const timeoutSignal = options.timeoutMs !== void 0 ? AbortSignal.timeout(options.timeoutMs) : void 0;
|
|
56
56
|
const signal = options.signal && timeoutSignal ? AbortSignal.any([options.signal, timeoutSignal]) : options.signal ?? timeoutSignal;
|
|
57
57
|
try {
|
|
@@ -61,9 +61,10 @@ async function postClassifierRequest(label, url, model, body, options, noRetrySt
|
|
|
61
61
|
body: JSON.stringify(payload),
|
|
62
62
|
signal
|
|
63
63
|
});
|
|
64
|
+
await options.onResponse?.({ status: next.status, headers: headersToRecord(next.headers) }, model);
|
|
64
65
|
if (!next.ok)
|
|
65
66
|
throw httpError(label, next, await next.text());
|
|
66
|
-
return
|
|
67
|
+
return await next.json();
|
|
67
68
|
} catch (error) {
|
|
68
69
|
if (timeoutSignal?.aborted && !options.signal?.aborted)
|
|
69
70
|
throw timeoutError(options.timeoutMs);
|
|
@@ -75,8 +76,6 @@ async function postClassifierRequest(label, url, model, body, options, noRetrySt
|
|
|
75
76
|
signal: options.signal,
|
|
76
77
|
noRetryStatuses
|
|
77
78
|
});
|
|
78
|
-
await options.onResponse?.({ status: response.status, headers: headersToRecord(response.headers) }, model);
|
|
79
|
-
return json;
|
|
80
79
|
}
|
|
81
80
|
function tokenCount(value) {
|
|
82
81
|
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
|
|
@@ -84,14 +83,17 @@ function tokenCount(value) {
|
|
|
84
83
|
function parseClassifierUsage(value, model) {
|
|
85
84
|
if (!isRecord(value) || value.input_tokens === void 0 && value.output_tokens === void 0)
|
|
86
85
|
return void 0;
|
|
87
|
-
const
|
|
86
|
+
const totalInput = tokenCount(value.input_tokens);
|
|
88
87
|
const output = tokenCount(value.output_tokens);
|
|
88
|
+
const details = isRecord(value.input_tokens_details) ? value.input_tokens_details : void 0;
|
|
89
|
+
const cacheRead = Math.min(tokenCount(details?.cached_tokens), totalInput);
|
|
90
|
+
const cacheWrite = Math.min(tokenCount(details?.cache_write_tokens), totalInput - cacheRead);
|
|
89
91
|
const usage = {
|
|
90
|
-
input,
|
|
92
|
+
input: totalInput - cacheRead - cacheWrite,
|
|
91
93
|
output,
|
|
92
|
-
cacheRead
|
|
93
|
-
cacheWrite
|
|
94
|
-
totalTokens:
|
|
94
|
+
cacheRead,
|
|
95
|
+
cacheWrite,
|
|
96
|
+
totalTokens: totalInput + output,
|
|
95
97
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }
|
|
96
98
|
};
|
|
97
99
|
calculateCost(model, usage);
|