@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { createRequire as __nerveCreateRequire } from "node:module";
|
|
2
|
+
const require = __nerveCreateRequire(import.meta.url);
|
|
3
|
+
|
|
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/sse.js
|
|
5
|
+
var SseDecoder = class {
|
|
6
|
+
decoder = new TextDecoder();
|
|
7
|
+
/** The incomplete last line. */
|
|
8
|
+
pendingLine = "";
|
|
9
|
+
/** The last text ended with CR, so a leading LF of the next text completes that CRLF. */
|
|
10
|
+
skipLeadingLf = false;
|
|
11
|
+
event = null;
|
|
12
|
+
data = [];
|
|
13
|
+
raw = [];
|
|
14
|
+
/** Takes the next bytes and returns the events they complete. */
|
|
15
|
+
push(bytes) {
|
|
16
|
+
return this.decodeText(this.decoder.decode(bytes, { stream: true }));
|
|
17
|
+
}
|
|
18
|
+
/** Ends the stream and returns the remaining events, including a last one the stream ended without a blank line. */
|
|
19
|
+
end() {
|
|
20
|
+
const events = this.decodeText(this.decoder.decode());
|
|
21
|
+
if (this.pendingLine)
|
|
22
|
+
this.decodeLine(this.pendingLine);
|
|
23
|
+
this.pendingLine = "";
|
|
24
|
+
this.skipLeadingLf = false;
|
|
25
|
+
const last = this.flush();
|
|
26
|
+
if (last)
|
|
27
|
+
events.push(last);
|
|
28
|
+
return events;
|
|
29
|
+
}
|
|
30
|
+
decodeText(text) {
|
|
31
|
+
const events = [];
|
|
32
|
+
let start = this.skipLeadingLf && text.startsWith("\n") ? 1 : 0;
|
|
33
|
+
if (text.length > 0)
|
|
34
|
+
this.skipLeadingLf = false;
|
|
35
|
+
for (let i = start; i < text.length; i++) {
|
|
36
|
+
const char = text[i];
|
|
37
|
+
if (char !== "\r" && char !== "\n")
|
|
38
|
+
continue;
|
|
39
|
+
const event = this.decodeLine(this.pendingLine + text.slice(start, i));
|
|
40
|
+
if (event)
|
|
41
|
+
events.push(event);
|
|
42
|
+
this.pendingLine = "";
|
|
43
|
+
if (char === "\r") {
|
|
44
|
+
if (i + 1 === text.length)
|
|
45
|
+
this.skipLeadingLf = true;
|
|
46
|
+
else if (text[i + 1] === "\n")
|
|
47
|
+
i++;
|
|
48
|
+
}
|
|
49
|
+
start = i + 1;
|
|
50
|
+
}
|
|
51
|
+
this.pendingLine += text.slice(start);
|
|
52
|
+
return events;
|
|
53
|
+
}
|
|
54
|
+
decodeLine(line) {
|
|
55
|
+
if (line === "")
|
|
56
|
+
return this.flush();
|
|
57
|
+
this.raw.push(line);
|
|
58
|
+
if (line.startsWith(":"))
|
|
59
|
+
return void 0;
|
|
60
|
+
const colon = line.indexOf(":");
|
|
61
|
+
const field = colon === -1 ? line : line.slice(0, colon);
|
|
62
|
+
let value = colon === -1 ? "" : line.slice(colon + 1);
|
|
63
|
+
if (value.startsWith(" "))
|
|
64
|
+
value = value.slice(1);
|
|
65
|
+
if (field === "event")
|
|
66
|
+
this.event = value;
|
|
67
|
+
else if (field === "data")
|
|
68
|
+
this.data.push(value);
|
|
69
|
+
return void 0;
|
|
70
|
+
}
|
|
71
|
+
flush() {
|
|
72
|
+
if (!this.event && this.data.length === 0) {
|
|
73
|
+
this.event = null;
|
|
74
|
+
this.raw = [];
|
|
75
|
+
return void 0;
|
|
76
|
+
}
|
|
77
|
+
const event = { event: this.event, data: this.data.join("\n"), raw: this.raw };
|
|
78
|
+
this.event = null;
|
|
79
|
+
this.data = [];
|
|
80
|
+
this.raw = [];
|
|
81
|
+
return event;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
SseDecoder
|
|
87
|
+
};
|
|
@@ -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/api/github-copilot-headers.js
|
|
5
5
|
function inferCopilotInitiator(messages) {
|
|
6
6
|
const last = messages[messages.length - 1];
|
|
7
7
|
return last && last.role !== "user" ? "agent" : "user";
|
|
@@ -92,12 +92,12 @@ import {
|
|
|
92
92
|
} from "./chunk-YYLKI74V.js";
|
|
93
93
|
import {
|
|
94
94
|
resolveHttpProxyUrlForTarget
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-35O66NLU.js";
|
|
96
96
|
import {
|
|
97
97
|
hasExceededStrictToolLimits,
|
|
98
98
|
isStrictToolLimitErrorMessage,
|
|
99
99
|
markStrictToolLimitsExceeded
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-UFE7IMKQ.js";
|
|
101
101
|
import {
|
|
102
102
|
Agent,
|
|
103
103
|
HttpsProxyAgent,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
import {
|
|
107
107
|
require_src
|
|
108
108
|
} from "./chunk-OQC3F6JA.js";
|
|
109
|
-
import "./chunk-
|
|
109
|
+
import "./chunk-QKRWXA5W.js";
|
|
110
110
|
import {
|
|
111
111
|
adjustMaxTokensForThinking,
|
|
112
112
|
buildBaseOptions,
|
|
@@ -117,39 +117,39 @@ import {
|
|
|
117
117
|
resolveJsonSchemaStrictSampling,
|
|
118
118
|
splitErrorToolResultImages,
|
|
119
119
|
transformMessages
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-RQIN5JYO.js";
|
|
121
121
|
import {
|
|
122
122
|
sanitizeSurrogates
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-P7GPT4XL.js";
|
|
124
124
|
import {
|
|
125
125
|
normalizeProviderError
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-EOZLBW5E.js";
|
|
127
127
|
import {
|
|
128
128
|
providerHeadersToRecord
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-NSISYP6D.js";
|
|
130
130
|
import {
|
|
131
131
|
getProviderEnvValue
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-LIIGX2XX.js";
|
|
133
133
|
import {
|
|
134
134
|
ToolCallArgumentsStream
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-WMZAJ7XA.js";
|
|
136
136
|
import {
|
|
137
137
|
calculateCost,
|
|
138
138
|
collapseSystemMessages,
|
|
139
139
|
getCurrentTools,
|
|
140
140
|
getInitialSystemMessage,
|
|
141
141
|
withoutInitialSystemMessage
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-WJAHXDL4.js";
|
|
143
143
|
import {
|
|
144
144
|
AssistantMessageEventStream,
|
|
145
145
|
appendAssistantMessageDiagnostic
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-A3OFIREH.js";
|
|
147
147
|
import {
|
|
148
148
|
getClientVersion
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-FNWUCFVO.js";
|
|
150
150
|
import {
|
|
151
151
|
getSystemMessageText
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-EZJH7ED5.js";
|
|
153
153
|
import {
|
|
154
154
|
__commonJS,
|
|
155
155
|
__esm,
|
|
@@ -17264,7 +17264,7 @@ var require_dist_cjs18 = __commonJS({
|
|
|
17264
17264
|
throw lastProviderError;
|
|
17265
17265
|
};
|
|
17266
17266
|
var multipleCredentialSourceWarningEmitted = false;
|
|
17267
|
-
var
|
|
17267
|
+
var defaultProvider2 = (init = {}) => memoizeChain([
|
|
17268
17268
|
async () => {
|
|
17269
17269
|
const profile = init.profile ?? process.env[ENV_PROFILE];
|
|
17270
17270
|
if (profile) {
|
|
@@ -17331,7 +17331,7 @@ var require_dist_cjs18 = __commonJS({
|
|
|
17331
17331
|
var credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5;
|
|
17332
17332
|
exports.credentialsTreatedAsExpired = credentialsTreatedAsExpired;
|
|
17333
17333
|
exports.credentialsWillNeedRefresh = credentialsWillNeedRefresh;
|
|
17334
|
-
exports.defaultProvider =
|
|
17334
|
+
exports.defaultProvider = defaultProvider2;
|
|
17335
17335
|
}
|
|
17336
17336
|
});
|
|
17337
17337
|
|
|
@@ -17622,7 +17622,7 @@ var require_dist_cjs21 = __commonJS({
|
|
|
17622
17622
|
var { DEFAULT_RETRY_MODE: DEFAULT_RETRY_MODE2, NODE_RETRY_MODE_CONFIG_OPTIONS: NODE_RETRY_MODE_CONFIG_OPTIONS2, NODE_MAX_ATTEMPT_CONFIG_OPTIONS: NODE_MAX_ATTEMPT_CONFIG_OPTIONS2, resolveRetryConfig: resolveRetryConfig2, getRetryPlugin: getRetryPlugin2 } = (init_retry(), __toCommonJS(retry_exports));
|
|
17623
17623
|
var { TypeRegistry: TypeRegistry2, getSchemaSerdePlugin: getSchemaSerdePlugin2 } = (init_schema(), __toCommonJS(schema_exports));
|
|
17624
17624
|
var { resolveAwsSdkSigV4Config: resolveAwsSdkSigV4Config2, AwsSdkSigV4Signer: AwsSdkSigV4Signer2, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: NODE_AUTH_SCHEME_PREFERENCE_OPTIONS2 } = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
|
|
17625
|
-
var { defaultProvider } = require_dist_cjs18();
|
|
17625
|
+
var { defaultProvider: defaultProvider2 } = require_dist_cjs18();
|
|
17626
17626
|
var { eventStreamPayloadHandlerProvider } = require_dist_cjs19();
|
|
17627
17627
|
var { fromEnvSigningName, nodeProvider } = require_dist_cjs20();
|
|
17628
17628
|
var { toUtf8: toUtf82, fromUtf8: fromUtf82, toBase64: toBase642, fromBase64: fromBase642, calculateBodyLength: calculateBodyLength2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
@@ -20643,7 +20643,7 @@ var require_dist_cjs21 = __commonJS({
|
|
|
20643
20643
|
defaultsMode,
|
|
20644
20644
|
authSchemePreference: config?.authSchemePreference ?? loadConfig2(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS2, loaderConfig),
|
|
20645
20645
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength2,
|
|
20646
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ??
|
|
20646
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider2,
|
|
20647
20647
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider2({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
20648
20648
|
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventStreamPayloadHandlerProvider,
|
|
20649
20649
|
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
@@ -21392,8 +21392,165 @@ var require_dist_cjs21 = __commonJS({
|
|
|
21392
21392
|
}
|
|
21393
21393
|
});
|
|
21394
21394
|
|
|
21395
|
-
// node_modules/.pnpm/@
|
|
21395
|
+
// node_modules/.pnpm/@aws-sdk+credential-provider-node@3.972.82/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
|
|
21396
|
+
var require_dist_cjs22 = __commonJS({
|
|
21397
|
+
"node_modules/.pnpm/@aws-sdk+credential-provider-node@3.972.82/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports) {
|
|
21398
|
+
var { ENV_KEY, ENV_SECRET, fromEnv } = require_dist_cjs6();
|
|
21399
|
+
var { chain, CredentialsProviderError, ENV_PROFILE } = (init_config(), __toCommonJS(config_exports));
|
|
21400
|
+
var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
|
|
21401
|
+
var remoteProvider = async (init) => {
|
|
21402
|
+
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = require_dist_cjs7();
|
|
21403
|
+
if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
|
|
21404
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
|
|
21405
|
+
const { fromHttp } = require_dist_cjs9();
|
|
21406
|
+
return chain(fromHttp(init), fromContainerMetadata(init));
|
|
21407
|
+
}
|
|
21408
|
+
if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
|
|
21409
|
+
return async () => {
|
|
21410
|
+
throw new CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
|
|
21411
|
+
};
|
|
21412
|
+
}
|
|
21413
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");
|
|
21414
|
+
return fromInstanceMetadata(init);
|
|
21415
|
+
};
|
|
21416
|
+
function memoizeChain(providers, treatAsExpired) {
|
|
21417
|
+
const chain2 = internalCreateChain(providers);
|
|
21418
|
+
let activeLock;
|
|
21419
|
+
let passiveLock;
|
|
21420
|
+
let credentials;
|
|
21421
|
+
let forceRefreshLock;
|
|
21422
|
+
const provider = async (options) => {
|
|
21423
|
+
if (options?.forceRefresh) {
|
|
21424
|
+
if (!forceRefreshLock) {
|
|
21425
|
+
forceRefreshLock = chain2(options).then((c5) => {
|
|
21426
|
+
credentials = c5;
|
|
21427
|
+
}).finally(() => {
|
|
21428
|
+
forceRefreshLock = void 0;
|
|
21429
|
+
});
|
|
21430
|
+
}
|
|
21431
|
+
await forceRefreshLock;
|
|
21432
|
+
return credentials;
|
|
21433
|
+
}
|
|
21434
|
+
if (credentials?.expiration) {
|
|
21435
|
+
if (credentials?.expiration?.getTime() < Date.now()) {
|
|
21436
|
+
credentials = void 0;
|
|
21437
|
+
}
|
|
21438
|
+
}
|
|
21439
|
+
if (activeLock) {
|
|
21440
|
+
await activeLock;
|
|
21441
|
+
} else if (!credentials || treatAsExpired?.(credentials)) {
|
|
21442
|
+
if (credentials) {
|
|
21443
|
+
if (!passiveLock) {
|
|
21444
|
+
passiveLock = chain2(options).then((c5) => {
|
|
21445
|
+
credentials = c5;
|
|
21446
|
+
}).catch(() => {
|
|
21447
|
+
}).finally(() => {
|
|
21448
|
+
passiveLock = void 0;
|
|
21449
|
+
});
|
|
21450
|
+
}
|
|
21451
|
+
} else {
|
|
21452
|
+
activeLock = chain2(options).then((c5) => {
|
|
21453
|
+
credentials = c5;
|
|
21454
|
+
}).finally(() => {
|
|
21455
|
+
activeLock = void 0;
|
|
21456
|
+
});
|
|
21457
|
+
return provider(options);
|
|
21458
|
+
}
|
|
21459
|
+
}
|
|
21460
|
+
return credentials;
|
|
21461
|
+
};
|
|
21462
|
+
return provider;
|
|
21463
|
+
}
|
|
21464
|
+
var internalCreateChain = (providers) => async (awsIdentityProperties) => {
|
|
21465
|
+
let lastProviderError;
|
|
21466
|
+
for (const provider of providers) {
|
|
21467
|
+
try {
|
|
21468
|
+
return await provider(awsIdentityProperties);
|
|
21469
|
+
} catch (err) {
|
|
21470
|
+
lastProviderError = err;
|
|
21471
|
+
if (err?.tryNextLink) {
|
|
21472
|
+
continue;
|
|
21473
|
+
}
|
|
21474
|
+
throw err;
|
|
21475
|
+
}
|
|
21476
|
+
}
|
|
21477
|
+
throw lastProviderError;
|
|
21478
|
+
};
|
|
21479
|
+
var multipleCredentialSourceWarningEmitted = false;
|
|
21480
|
+
var defaultProvider2 = (init = {}) => memoizeChain([
|
|
21481
|
+
async () => {
|
|
21482
|
+
const profile = init.profile ?? process.env[ENV_PROFILE];
|
|
21483
|
+
if (profile) {
|
|
21484
|
+
const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];
|
|
21485
|
+
if (envStaticCredentialsAreSet) {
|
|
21486
|
+
if (!multipleCredentialSourceWarningEmitted) {
|
|
21487
|
+
const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn.bind(init.logger) : console.warn;
|
|
21488
|
+
warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
21489
|
+
Multiple credential sources detected:
|
|
21490
|
+
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
21491
|
+
This SDK will proceed with the AWS_PROFILE value.
|
|
21492
|
+
|
|
21493
|
+
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
21494
|
+
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
21495
|
+
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
21496
|
+
`);
|
|
21497
|
+
multipleCredentialSourceWarningEmitted = true;
|
|
21498
|
+
}
|
|
21499
|
+
}
|
|
21500
|
+
throw new CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
|
|
21501
|
+
logger: init.logger,
|
|
21502
|
+
tryNextLink: true
|
|
21503
|
+
});
|
|
21504
|
+
}
|
|
21505
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
|
|
21506
|
+
return fromEnv(init)();
|
|
21507
|
+
},
|
|
21508
|
+
async (awsIdentityProperties) => {
|
|
21509
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
|
|
21510
|
+
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
21511
|
+
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
21512
|
+
throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
|
|
21513
|
+
}
|
|
21514
|
+
const { fromSSO } = require_dist_cjs12();
|
|
21515
|
+
return fromSSO(init)(awsIdentityProperties);
|
|
21516
|
+
},
|
|
21517
|
+
async (awsIdentityProperties) => {
|
|
21518
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
|
|
21519
|
+
const { fromIni } = require_dist_cjs17();
|
|
21520
|
+
return fromIni(init)(awsIdentityProperties);
|
|
21521
|
+
},
|
|
21522
|
+
async (awsIdentityProperties) => {
|
|
21523
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
|
|
21524
|
+
const { fromProcess } = require_dist_cjs15();
|
|
21525
|
+
return fromProcess(init)(awsIdentityProperties);
|
|
21526
|
+
},
|
|
21527
|
+
async (awsIdentityProperties) => {
|
|
21528
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
|
|
21529
|
+
const { fromTokenFile } = require_dist_cjs16();
|
|
21530
|
+
return fromTokenFile(init)(awsIdentityProperties);
|
|
21531
|
+
},
|
|
21532
|
+
async () => {
|
|
21533
|
+
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
|
|
21534
|
+
return (await remoteProvider(init))();
|
|
21535
|
+
},
|
|
21536
|
+
async () => {
|
|
21537
|
+
throw new CredentialsProviderError("Could not load credentials from any providers", {
|
|
21538
|
+
tryNextLink: false,
|
|
21539
|
+
logger: init.logger
|
|
21540
|
+
});
|
|
21541
|
+
}
|
|
21542
|
+
], credentialsTreatedAsExpired);
|
|
21543
|
+
var credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== void 0;
|
|
21544
|
+
var credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5;
|
|
21545
|
+
exports.credentialsTreatedAsExpired = credentialsTreatedAsExpired;
|
|
21546
|
+
exports.credentialsWillNeedRefresh = credentialsWillNeedRefresh;
|
|
21547
|
+
exports.defaultProvider = defaultProvider2;
|
|
21548
|
+
}
|
|
21549
|
+
});
|
|
21550
|
+
|
|
21551
|
+
// 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/bedrock-converse-stream.js
|
|
21396
21552
|
var import_client_bedrock_runtime = __toESM(require_dist_cjs21(), 1);
|
|
21553
|
+
var import_credential_provider_node = __toESM(require_dist_cjs22(), 1);
|
|
21397
21554
|
var import_node_http_handler5 = __toESM(require_dist_cjs8(), 1);
|
|
21398
21555
|
|
|
21399
21556
|
// node_modules/.pnpm/http-proxy-agent@9.1.0_supports-color@7.2.0/node_modules/http-proxy-agent/dist/index.js
|
|
@@ -21496,7 +21653,7 @@ function omit(obj, ...keys) {
|
|
|
21496
21653
|
return ret;
|
|
21497
21654
|
}
|
|
21498
21655
|
|
|
21499
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
21656
|
+
// 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/bedrock-converse-stream.js
|
|
21500
21657
|
var EMPTY_TEXT_PLACEHOLDER = "<empty>";
|
|
21501
21658
|
var THINKING_BINDING_CONTROLS_BETA = "thinking-binding-controls-2026-08-01";
|
|
21502
21659
|
var REDACTED_THINKING_PLACEHOLDER = "[Reasoning redacted]";
|
|
@@ -21560,10 +21717,12 @@ var stream = (model, context, options = {}) => {
|
|
|
21560
21717
|
}
|
|
21561
21718
|
const proxyUrl = resolveHttpProxyUrlForTarget(model.baseUrl, options.env);
|
|
21562
21719
|
if (proxyUrl) {
|
|
21563
|
-
|
|
21720
|
+
const requestHandler = new import_node_http_handler5.NodeHttpHandler({
|
|
21564
21721
|
httpAgent: new HttpProxyAgent(proxyUrl),
|
|
21565
21722
|
httpsAgent: new HttpsProxyAgent(proxyUrl)
|
|
21566
21723
|
});
|
|
21724
|
+
config.requestHandler = requestHandler;
|
|
21725
|
+
config.credentialDefaultProvider = (init) => (0, import_credential_provider_node.defaultProvider)({ ...init, clientConfig: { ...init.clientConfig, requestHandler } });
|
|
21567
21726
|
} else if (getProviderEnvValue("AWS_BEDROCK_FORCE_HTTP1", options.env) === "1") {
|
|
21568
21727
|
config.requestHandler = new import_node_http_handler5.NodeHttpHandler();
|
|
21569
21728
|
}
|
|
@@ -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/api/openai-prompt-cache.js
|
|
5
5
|
var OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH = 64;
|
|
6
6
|
function clampOpenAIPromptCacheKey(key) {
|
|
7
7
|
if (key === void 0)
|
|
@@ -2,7 +2,7 @@ import { createRequire as __nerveCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __nerveCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
shortHash
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FZ7U3GZI.js";
|
|
6
6
|
import {
|
|
7
7
|
appendGrammarToolInputJsonDelta,
|
|
8
8
|
closeGrammarToolInputJson,
|
|
@@ -11,24 +11,27 @@ import {
|
|
|
11
11
|
resolveGrammarConstrainedSampling,
|
|
12
12
|
resolveJsonSchemaStrictSampling,
|
|
13
13
|
transformMessages
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RQIN5JYO.js";
|
|
15
15
|
import {
|
|
16
16
|
sanitizeSurrogates
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P7GPT4XL.js";
|
|
18
18
|
import {
|
|
19
19
|
ToolCallArgumentsStream
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WMZAJ7XA.js";
|
|
21
21
|
import {
|
|
22
22
|
calculateCost,
|
|
23
23
|
resolveTranscript,
|
|
24
24
|
resolveTranscriptTools
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WJAHXDL4.js";
|
|
26
|
+
import {
|
|
27
|
+
appendAssistantMessageDiagnostic
|
|
28
|
+
} from "./chunk-A3OFIREH.js";
|
|
26
29
|
import {
|
|
27
30
|
getSystemMessageText,
|
|
28
31
|
renderSystemMessageUpdate
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-EZJH7ED5.js";
|
|
30
33
|
|
|
31
|
-
// node_modules/.pnpm/@earendil-works+pi-ai@1.
|
|
34
|
+
// 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-responses-shared.js
|
|
32
35
|
function encodeTextSignatureV1(id, phase) {
|
|
33
36
|
const payload = { v: 1, id };
|
|
34
37
|
if (phase)
|
|
@@ -87,6 +90,13 @@ function renderToolRemovalNotice(names) {
|
|
|
87
90
|
${names.map((name) => `- ${name}`).join("\n")}`;
|
|
88
91
|
}
|
|
89
92
|
function convertResponsesMessages(model, context, allowedToolCallProviders, options) {
|
|
93
|
+
return renderResponsesTranscript(model, context, allowedToolCallProviders, options).input;
|
|
94
|
+
}
|
|
95
|
+
function prepareResponsesPrompt(model, context, allowedToolCallProviders, options) {
|
|
96
|
+
const { input, requestTools, requestEffortBaseline } = renderResponsesTranscript(model, context, allowedToolCallProviders, options);
|
|
97
|
+
return { input, requestTools: convertResponsesTools(requestTools, options?.toolOptions), requestEffortBaseline };
|
|
98
|
+
}
|
|
99
|
+
function renderResponsesTranscript(model, context, allowedToolCallProviders, options) {
|
|
90
100
|
const normalizedContext = resolveTranscript(context, options?.supportsMidConvoSystemMessages);
|
|
91
101
|
const messages = [];
|
|
92
102
|
const normalizeIdPart = (part) => {
|
|
@@ -154,8 +164,18 @@ function convertResponsesMessages(model, context, allowedToolCallProviders, opti
|
|
|
154
164
|
tools: convertResponsesTools(tools, { ...options?.toolOptions, toolSearchResult: true })
|
|
155
165
|
});
|
|
156
166
|
};
|
|
157
|
-
|
|
167
|
+
let requestEffortBaseline;
|
|
168
|
+
let previousEffort;
|
|
158
169
|
const pushConfigurationUpdate = (effort) => {
|
|
170
|
+
if (options?.effortBaseline === "initial") {
|
|
171
|
+
if (previousEffort === effort)
|
|
172
|
+
return;
|
|
173
|
+
previousEffort = effort;
|
|
174
|
+
if (requestEffortBaseline === void 0) {
|
|
175
|
+
requestEffortBaseline = effort;
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
159
179
|
messages.push({
|
|
160
180
|
type: "configuration_update",
|
|
161
181
|
reasoning: { effort }
|
|
@@ -172,20 +192,18 @@ function convertResponsesMessages(model, context, allowedToolCallProviders, opti
|
|
|
172
192
|
const anchorsToolChanges = systemIndex++ >= transcriptTools.foldedSystemMessages;
|
|
173
193
|
if (anchorsToolChanges)
|
|
174
194
|
appendSystemToolAdditions(msg, `system:${msgIndex}`);
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
messages.push({ role: instructionRole, content: sanitizeSurrogates(text) });
|
|
188
|
-
}
|
|
195
|
+
const parts = [isLeadingSystemMessage ? getSystemMessageText(msg) : renderSystemMessageUpdate(msg)];
|
|
196
|
+
if (anchorsToolChanges) {
|
|
197
|
+
const added = new Set((msg.toolsAdded ?? []).map((tool) => tool.name));
|
|
198
|
+
const removed = (msg.toolsRemoved ?? []).map((tool) => tool.name).filter((name) => !added.has(name));
|
|
199
|
+
if (removed.length > 0)
|
|
200
|
+
parts.push(renderToolRemovalNotice(removed));
|
|
201
|
+
for (const name of removed)
|
|
202
|
+
unavailableTools.add(name);
|
|
203
|
+
}
|
|
204
|
+
const text = parts.filter((part) => part.length > 0).join("\n\n");
|
|
205
|
+
if (text.length > 0) {
|
|
206
|
+
messages.push({ role: instructionRole, content: sanitizeSurrogates(text) });
|
|
189
207
|
}
|
|
190
208
|
} else if (msg.role === "user") {
|
|
191
209
|
if (typeof msg.content === "string") {
|
|
@@ -255,23 +273,24 @@ function convertResponsesMessages(model, context, allowedToolCallProviders, opti
|
|
|
255
273
|
if (isDifferentModel || !itemId?.startsWith(itemIdPrefix)) {
|
|
256
274
|
itemId = void 0;
|
|
257
275
|
}
|
|
276
|
+
const replayedCall = {
|
|
277
|
+
id: itemId,
|
|
278
|
+
call_id: callId,
|
|
279
|
+
name: toolCall.name,
|
|
280
|
+
status: "completed",
|
|
281
|
+
...isSameModel && toolCall.namespace !== void 0 ? { namespace: toolCall.namespace } : {}
|
|
282
|
+
};
|
|
258
283
|
if (customInputProperty !== void 0) {
|
|
259
284
|
output.push({
|
|
260
285
|
type: "custom_tool_call",
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
name: toolCall.name,
|
|
264
|
-
input: sanitizeSurrogates(getGrammarToolInput(toolCall.name, toolCall.arguments, customInputProperty)),
|
|
265
|
-
...isSameModel && toolCall.namespace !== void 0 ? { namespace: toolCall.namespace } : {}
|
|
286
|
+
...replayedCall,
|
|
287
|
+
input: sanitizeSurrogates(getGrammarToolInput(toolCall.name, toolCall.arguments, customInputProperty))
|
|
266
288
|
});
|
|
267
289
|
} else {
|
|
268
290
|
output.push({
|
|
269
291
|
type: "function_call",
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
name: toolCall.name,
|
|
273
|
-
arguments: JSON.stringify(toolCall.arguments),
|
|
274
|
-
...isSameModel && toolCall.namespace !== void 0 ? { namespace: toolCall.namespace } : {}
|
|
292
|
+
...replayedCall,
|
|
293
|
+
arguments: JSON.stringify(toolCall.arguments)
|
|
275
294
|
});
|
|
276
295
|
}
|
|
277
296
|
}
|
|
@@ -304,7 +323,7 @@ function convertResponsesMessages(model, context, allowedToolCallProviders, opti
|
|
|
304
323
|
}
|
|
305
324
|
if (options?.configurationUpdateEffort !== void 0)
|
|
306
325
|
pushConfigurationUpdate(options.configurationUpdateEffort);
|
|
307
|
-
return messages;
|
|
326
|
+
return { input: messages, requestTools: transcriptTools.requestTools, requestEffortBaseline };
|
|
308
327
|
}
|
|
309
328
|
function convertResponsesTools(tools, options) {
|
|
310
329
|
const defaultStrict = options?.strict === void 0 ? false : options.strict;
|
|
@@ -453,6 +472,7 @@ async function processResponsesStream(openaiStream, output, stream, model, optio
|
|
|
453
472
|
const finalizeResponse = (response) => {
|
|
454
473
|
sawTerminalResponseEvent = true;
|
|
455
474
|
backfillReasoningSignatures(response.output ?? []);
|
|
475
|
+
appendReasoningRemovals(output, response.input_transformations);
|
|
456
476
|
if (response?.id) {
|
|
457
477
|
output.responseId = response.id;
|
|
458
478
|
}
|
|
@@ -651,6 +671,20 @@ async function processResponsesStream(openaiStream, output, stream, model, optio
|
|
|
651
671
|
}
|
|
652
672
|
}
|
|
653
673
|
}
|
|
674
|
+
function appendReasoningRemovals(output, transformations) {
|
|
675
|
+
if (!Array.isArray(transformations))
|
|
676
|
+
return;
|
|
677
|
+
const removals = transformations.filter((transformation) => transformation?.type === "reasoning" && transformation.action === "removed" && transformation.reason !== "turn_boundary");
|
|
678
|
+
if (removals.length === 0)
|
|
679
|
+
return;
|
|
680
|
+
appendAssistantMessageDiagnostic(output, {
|
|
681
|
+
type: "openai_input_transformations",
|
|
682
|
+
timestamp: Date.now(),
|
|
683
|
+
details: {
|
|
684
|
+
transformations: removals.map(({ type, id, action, reason }) => ({ type, id, action, reason }))
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
}
|
|
654
688
|
function customInput(property, initialInput) {
|
|
655
689
|
const buffer = { input: "", started: false, closed: false };
|
|
656
690
|
return {
|
|
@@ -703,8 +737,7 @@ function mapStopReason(status, incompleteReason) {
|
|
|
703
737
|
}
|
|
704
738
|
|
|
705
739
|
export {
|
|
706
|
-
getResponsesToolSupport,
|
|
707
740
|
convertResponsesMessages,
|
|
708
|
-
|
|
741
|
+
prepareResponsesPrompt,
|
|
709
742
|
processResponsesStream
|
|
710
743
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__require
|
|
5
5
|
} from "./chunk-CWESUMYQ.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/utils/provider-env.js
|
|
8
8
|
var procEnvCache = null;
|
|
9
9
|
function getBunSandboxEnvValue(name) {
|
|
10
10
|
if (typeof process === "undefined" || !process.versions?.bun || Object.keys(process.env).length > 0) {
|