@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.
Files changed (255) hide show
  1. package/THIRD-PARTY-LICENSES.txt +210 -16
  2. package/dist/builtin/configure-nerve/SKILL.md +19 -10
  3. package/dist/builtin/configure-nerve/reference/agent-preferences.md +9 -0
  4. package/dist/builtin/configure-nerve/reference/agent-profiles.md +2 -6
  5. package/dist/builtin/configure-nerve/reference/agents-md.md +1 -1
  6. package/dist/builtin/configure-nerve/reference/extensions/api/extension-api/artifacts.d.ts +10 -0
  7. package/dist/builtin/configure-nerve/reference/extensions/api/extension-api/text.d.ts +4 -0
  8. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/components.d.ts +2 -0
  9. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/collections/match-terms.d.ts +8 -0
  10. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/callout/callout.svelte.d.ts +1 -1
  11. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/index.d.ts +3 -0
  12. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/log-source.d.ts +43 -0
  13. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/log-view.svelte.d.ts +22 -0
  14. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/log-window.d.ts +77 -0
  15. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/components/composites/log-view/terminal-text.svelte.d.ts +6 -0
  16. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/display/status.d.ts +3 -0
  17. package/dist/builtin/configure-nerve/reference/extensions/api/extension-sdk/components/ui-kit/terminal/ansi.d.ts +4 -0
  18. package/dist/builtin/configure-nerve/{guide/extensions.md → reference/extensions/build.md} +4 -4
  19. package/dist/builtin/configure-nerve/reference/extensions/components.md +2 -1
  20. package/dist/builtin/configure-nerve/reference/extensions/manifest.md +1 -1
  21. package/dist/builtin/configure-nerve/reference/extensions/overview.md +2 -2
  22. package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/lib.mjs +2 -2
  23. package/dist/builtin/configure-nerve/reference/extensions/scripts/nerve-version.json +1 -0
  24. package/dist/builtin/configure-nerve/reference/extensions/sharing.md +2 -2
  25. package/dist/builtin/configure-nerve/reference/extensions/themes.md +1 -1
  26. package/dist/builtin/configure-nerve/reference/permissions.md +2 -2
  27. package/dist/builtin/configure-nerve/reference/prompt-suggestions.md +2 -2
  28. package/dist/builtin/configure-nerve/reference/skills.md +9 -9
  29. package/dist/{chunk-QFK2SWD2.js → chunk-34SYO66C.js} +11 -11
  30. package/dist/{chunk-6ZS7TA6E.js → chunk-35O66NLU.js} +2 -2
  31. package/dist/{chunk-DHIDYKXJ.js → chunk-3LWB5SGT.js} +1781 -1719
  32. package/dist/{chunk-7FSH3ABG.js → chunk-57A5HFXL.js} +4 -4
  33. package/dist/{chunk-EF7ZZKA3.js → chunk-5K7U6UXA.js} +3 -3
  34. package/dist/{chunk-WIQEPAUG.js → chunk-5S5O3V5G.js} +11 -10
  35. package/dist/{chunk-MTHLTFG4.js → chunk-5VLAJMQQ.js} +97 -105
  36. package/dist/{chunk-MI6L5CEA.js → chunk-5WMHGTVL.js} +2 -2
  37. package/dist/{chunk-NVVW3MWJ.js → chunk-6IJORN3N.js} +9 -9
  38. package/dist/{chunk-OMCM3MHS.js → chunk-7GSR2AW5.js} +10 -9
  39. package/dist/{chunk-WG62RHZ2.js → chunk-7MJT6LHU.js} +14 -4
  40. package/dist/{chunk-DDBE2VLT.js → chunk-A3OFIREH.js} +2 -2
  41. package/dist/{chunk-ZGWXLG5X.js → chunk-BNBEFI2M.js} +66 -76
  42. package/dist/{chunk-7RPHIJT3.js → chunk-C7L4BBGD.js} +4 -4
  43. package/dist/{chunk-2ICPO4UM.js → chunk-CZXRZEV4.js} +16 -14
  44. package/dist/{chunk-PVPJAGWR.js → chunk-EOZLBW5E.js} +2 -2
  45. package/dist/{chunk-U5KGV63C.js → chunk-EZJH7ED5.js} +1 -1
  46. package/dist/{chunk-RL52LSTV.js → chunk-F3X2KHP4.js} +1 -1
  47. package/dist/{chunk-Q3C7TQ2M.js → chunk-FNWUCFVO.js} +3 -3
  48. package/dist/chunk-FQVIQOV5.js +163 -0
  49. package/dist/{chunk-LP4APBBQ.js → chunk-FZ7U3GZI.js} +1 -1
  50. package/dist/{chunk-MBMZEIOG.js → chunk-G5SVCJCT.js} +38 -51
  51. package/dist/{chunk-62DQXVPO.js → chunk-HDTS5AS5.js} +26 -7
  52. package/dist/{chunk-WC5HHPPM.js → chunk-HRJJKZGM.js} +1 -1
  53. package/dist/chunk-I7OMW4RJ.js +87 -0
  54. package/dist/{chunk-TQURLRHD.js → chunk-IL67WXRA.js} +1 -1
  55. package/dist/{chunk-QDEH776O.js → chunk-KBBBQCYV.js} +179 -20
  56. package/dist/{chunk-KUFIFCB4.js → chunk-KDGUQYYY.js} +1 -1
  57. package/dist/{chunk-IRRR3PWN.js → chunk-KQD4DYEP.js} +68 -35
  58. package/dist/{chunk-JBEWFFOK.js → chunk-LIIGX2XX.js} +1 -1
  59. package/dist/{chunk-IVBMHEPK.js → chunk-LX33FMTS.js} +23 -36
  60. package/dist/{chunk-HPINJGBO.js → chunk-METH7J6V.js} +13 -12
  61. package/dist/{chunk-N6BUYKF3.js → chunk-MLE6MKPY.js} +7 -7
  62. package/dist/{chunk-3CZXUKLG.js → chunk-MRDORR5Z.js} +8 -1
  63. package/dist/{chunk-6IHXVT5H.js → chunk-NSISYP6D.js} +1 -1
  64. package/dist/{chunk-P72Y5ZBH.js → chunk-O2IYZBX6.js} +15 -26
  65. package/dist/{chunk-TSAUBRRU.js → chunk-P7GPT4XL.js} +1 -1
  66. package/dist/{chunk-F5XCJ6UV.js → chunk-PA37GH3T.js} +33 -58
  67. package/dist/{chunk-BACYVEE6.js → chunk-QC6DSC4D.js} +2 -2
  68. package/dist/{chunk-ZVH6EB7S.js → chunk-QKRWXA5W.js} +1 -1
  69. package/dist/{chunk-D6C32XHS.js → chunk-QQPLW3ZX.js} +17359 -12634
  70. package/dist/chunk-QQPLW3ZX.js.LEGAL.txt +59 -0
  71. package/dist/{chunk-N4OXAS3A.js → chunk-R22FWLXU.js} +1 -1
  72. package/dist/{chunk-7HGFEQSD.js → chunk-R7UJIPJA.js} +5 -5
  73. package/dist/{chunk-NW3DH7IK.js → chunk-RAHBWFWV.js} +8457 -2726
  74. package/dist/{chunk-O5JHHRFN.js → chunk-RMV6IZ2C.js} +32 -116
  75. package/dist/{chunk-Z6AY5VOZ.js → chunk-RQIN5JYO.js} +9 -6
  76. package/dist/{chunk-Q5E4ZL2R.js → chunk-S2UG5HD6.js} +1 -1
  77. package/dist/{chunk-U3TEC52G.js → chunk-S637DPAG.js} +1 -1
  78. package/dist/chunk-S6KM4DOB.js +37 -0
  79. package/dist/{chunk-MPDKZVHT.js → chunk-SVX46YXY.js} +1 -3
  80. package/dist/{chunk-XTUSLUQ7.js → chunk-TLDULBKV.js} +70 -24
  81. package/dist/{chunk-L5WGVYXM.js → chunk-UFE7IMKQ.js} +2 -2
  82. package/dist/{chunk-ZUWBEV2O.js → chunk-UQHUYEFW.js} +1 -1
  83. package/dist/{chunk-XM27UVWN.js → chunk-V7WOX4O7.js} +3 -3
  84. package/dist/{chunk-W7LEYYFH.js → chunk-WJAHXDL4.js} +41 -32
  85. package/dist/{chunk-6GUJQURI.js → chunk-WLTE6OJM.js} +2 -2
  86. package/dist/{chunk-BG2KGLIA.js → chunk-WMZAJ7XA.js} +2 -2
  87. package/dist/chunk-WOLKTL4F.js +32 -0
  88. package/dist/{chunk-H5CAHDII.js → chunk-WQHOXPLV.js} +51929 -50256
  89. package/dist/{chunk-EUT45AKW.js → chunk-YODV42KQ.js} +25 -32
  90. package/dist/{chunk-FCAIYPDJ.js → chunk-ZFFWWZIA.js} +2 -2
  91. package/dist/{chunk-376GN4PB.js → chunk-ZTG7VIGB.js} +173 -79
  92. package/dist/{chunk-O6FDXE54.js → chunk-ZVUAJ7UV.js} +25 -36
  93. package/dist/daemon.js +15 -15
  94. package/dist/ext-frame/base.css +1 -1
  95. package/dist/extension-assets/atlassian/docs/confluence-writing.md +5 -5
  96. package/dist/extension-assets/diagram/bundle.js +3 -0
  97. package/dist/git-isolated-reader-helper.js +1 -1
  98. package/dist/main.js +57 -128
  99. package/dist/quick-script-docs/runtime/artifacts.md +11 -0
  100. package/dist/quick-script-docs/runtime/documents.md +21 -12
  101. package/dist/quick-script-docs/runtime/editing.md +44 -0
  102. package/dist/quick-script-docs/runtime/images.md +1 -1
  103. package/dist/sandbox-libraries/credential-runtime.js +3 -0
  104. package/dist/sandbox-libraries/extension-runtime.js +3 -0
  105. package/dist/web/assets/AsyncBashCenterHost-BlxXoXd6.js +2 -0
  106. package/dist/web/assets/{ConversationListItem-CCaGnyA1.js → ConversationListItem-DfSMoYfe.js} +3 -3
  107. package/dist/web/assets/{ConversationsWorkbenchPanel-DLM3saY5.js → ConversationsWorkbenchPanel-BOIMwRZx.js} +1 -1
  108. package/dist/web/assets/{DiscoverCenterHost-DVNL8uZQ.js → DiscoverCenterHost-Bi6audxE.js} +1 -1
  109. package/dist/web/assets/{ExtensionPageCenterHost-CHKg6c3M.js → ExtensionPageCenterHost-DEg-LHcU.js} +1 -1
  110. package/dist/web/assets/FileCenterComposedHost-CPwzMZI9.js +1 -0
  111. package/dist/web/assets/FilesWorkbenchPanel-DnKQd6QC.js +12 -0
  112. package/dist/web/assets/{GitDiffCenterHost-DmtKqHer.js → GitDiffCenterHost-DtsFPa1z.js} +1 -1
  113. package/dist/web/assets/{GitWorkbenchPanel-BmyMyvL8.js → GitWorkbenchPanel-BfJKdIkE.js} +1 -1
  114. package/dist/web/assets/LaunchCenterHost-C5Bd9ELF.js +1 -0
  115. package/dist/web/assets/LaunchConfigurationNotice-Dp3rBKil.js +1 -0
  116. package/dist/web/assets/LaunchOutputPane-BuCSQcxg.js +2 -0
  117. package/dist/web/assets/LaunchesWorkbenchPanel-CMd3Xcbp.js +1 -0
  118. package/dist/web/assets/{LogsCenterHost-CdqD6zH8.js → LogsCenterHost-Be6EbsrZ.js} +1 -1
  119. package/dist/web/assets/{MermaidCenterHost-BjwJLU-2.js → MermaidCenterHost-BdQ8CGeb.js} +1 -1
  120. package/dist/web/assets/MobileFilesBody-C1q-YRaD.js +1 -0
  121. package/dist/web/assets/MobileFilesHost-DK769osZ.js +1 -0
  122. package/dist/web/assets/MobileLaunchOutputHost-BLDX3-Tn.js +1 -0
  123. package/dist/web/assets/MobileLaunchesHost-Dv2gfOEY.js +2 -0
  124. package/dist/web/assets/{MobileNoteEditorHost-lfAeMVH9.js → MobileNoteEditorHost-ZRzzwCYD.js} +1 -1
  125. package/dist/web/assets/{MobileNotesHost-DOi0goPc.js → MobileNotesHost-COOtVfAp.js} +2 -2
  126. package/dist/web/assets/MobileSettingsHost-BU2lCcG2.js +2 -0
  127. package/dist/web/assets/{MobileSettingsPageHost-CtpUzfVG.js → MobileSettingsPageHost-BC5LOq7Y.js} +1 -1
  128. package/dist/web/assets/{NotesWorkbenchPanel-CsbMYHAw.js → NotesWorkbenchPanel-BiTDbfjj.js} +1 -1
  129. package/dist/web/assets/{PullRequestCenterHost-B22Ua7bA.js → PullRequestCenterHost-DV3V3yxm.js} +1 -1
  130. package/dist/web/assets/{PullRequestsWorkbenchPanel-DOIHvZ6H.js → PullRequestsWorkbenchPanel-Dpvt9W-q.js} +1 -1
  131. package/dist/web/assets/SearchWorkbenchPanel-Bfj8fwPg.js +1 -0
  132. package/dist/web/assets/SettingsCenterHost-sHWZehrB.js +1 -0
  133. package/dist/web/assets/SystemPromptCenterHost-CA9i8UbB.js +2 -0
  134. package/dist/web/assets/{ThemePreviewPicker-B_DTUsui.js → ThemePreviewPicker-PySjP6aS.js} +1 -1
  135. package/dist/web/assets/adapters-fVomUv3-.js +1 -0
  136. package/dist/web/assets/agent-profiles.svelte-CenutfXA.js +1 -0
  137. package/dist/web/assets/appearance.svelte-BKxiMJ3c.js +1 -0
  138. package/dist/web/assets/center-tabs.svelte-i0d5hUO3.js +2 -0
  139. package/dist/web/assets/{channel-CxF1CmEY.js → channel-DB8mSlhP.js} +2 -2
  140. package/dist/web/assets/{client-CVZRorEj.js → client-DHxa8CWS.js} +1 -1
  141. package/dist/web/assets/code-CsVM8hq8.js +7 -0
  142. package/dist/web/assets/conversation-activity-CZJfUGoL.js +1 -0
  143. package/dist/web/assets/conversation-connection-CaV3KY7Z.js +1 -0
  144. package/dist/web/assets/discover-Do0oQbdF.js +4 -0
  145. package/dist/web/assets/{dist-HTsJAisd.js → dist-B887qHIr.js} +1 -1
  146. package/dist/web/assets/{dist-CDM0qUmO.js → dist-Bg8Vm0DE.js} +1 -1
  147. package/dist/web/assets/{dist-BVmTdBxj.js → dist-C2z70795.js} +1 -1
  148. package/dist/web/assets/{dist-EmwCDpCc.js → dist-CcBabmlO.js} +1 -1
  149. package/dist/web/assets/{dist-DkQMSgZ5.js → dist-HSfz5y1D.js} +1 -1
  150. package/dist/web/assets/{dist-DZN4bTV3.js → dist-HUxdivoH.js} +1 -1
  151. package/dist/web/assets/{dist-BWsookwC.js → dist-wvfFRict.js} +1 -1
  152. package/dist/web/assets/{easing-DfoPn4-z.js → easing-B6dSt4eu.js} +1 -1
  153. package/dist/web/assets/empty-CtUlV5QU.js +1 -0
  154. package/dist/web/assets/eraser-B8qFMviR.js +1 -0
  155. package/dist/web/assets/{extension-themes.svelte-BAce41Wm.js → extension-themes.svelte-nXDPOl_E.js} +2 -2
  156. package/dist/web/assets/{file-tabs.svelte-CaZRhyw0.js → file-tabs.svelte-BxCAtif2.js} +2 -2
  157. package/dist/web/assets/files-DcUCbPX1.js +156 -0
  158. package/dist/web/assets/{files-dFQS0tcX.css → files-N9JiAfxr.css} +1 -1
  159. package/dist/web/assets/filesystem-9b72Tdkw.js +1 -0
  160. package/dist/web/assets/floating-toolbar-Cqtfs8M7.js +1 -0
  161. package/dist/web/assets/{git-store.svelte-DkeLA_WZ.js → git-store.svelte-DIVFeLGG.js} +1 -1
  162. package/dist/web/assets/{icon-action-efe9ZEWq.js → icon-action-C9h3TdBz.js} +1 -1
  163. package/dist/web/assets/index-6mIS-NWJ.js +165 -0
  164. package/dist/web/assets/index-D2aeJHnc.css +1 -0
  165. package/dist/web/assets/launches-Dafgn_my.js +5 -0
  166. package/dist/web/assets/launches.api-ZZ-IwIQ_.js +1 -0
  167. package/dist/web/assets/log-view-Dqspnrs0.js +1 -0
  168. package/dist/web/assets/{logs.api-gZ2mVC9q.js → logs.api-BxN21LL0.js} +1 -1
  169. package/dist/web/assets/{maintenance-state.svelte-xMmmI9yr.js → maintenance-state.svelte-BAKtNG-i.js} +2 -2
  170. package/dist/web/assets/menu-icons-tnCN992t.js +1 -0
  171. package/dist/web/assets/{mermaid-ACpEwsfj.js → mermaid-DL5xfcqL.js} +1 -1
  172. package/dist/web/assets/mobile-launch-rows-DR6V5AUH.js +1 -0
  173. package/dist/web/assets/page-tabs.svelte-wduGZwmi.js +4 -0
  174. package/dist/web/assets/panel-BW0llJiU.js +1 -0
  175. package/dist/web/assets/popover-panel-DO5nPkvA.js +4 -0
  176. package/dist/web/assets/pr-view-loader.svelte-RSHgeFYM.js +1 -0
  177. package/dist/web/assets/progress-CRuzrJQt.js +1 -0
  178. package/dist/web/assets/{scratch-notes-state.svelte-rBeSOn4h.js → scratch-notes-state.svelte-BcqgnE6z.js} +1 -1
  179. package/dist/web/assets/{scratch-notes.api-Co80EGtL.js → scratch-notes.api-D9wtv1Mn.js} +1 -1
  180. package/dist/web/assets/settings-CKsESd2i.js +1 -0
  181. package/dist/web/assets/settings-Crny2xGb.js +1 -0
  182. package/dist/web/assets/settings-scope-BiY5kIdC.js +35 -0
  183. package/dist/web/assets/shell-BiZy0tcZ.js +1 -0
  184. package/dist/web/assets/shell-layout.svelte-9B3T60gv.js +2 -0
  185. package/dist/web/assets/{lock-open-BBTCOUg5.js → tag-Bp1l7psd.js} +1 -1
  186. package/dist/web/assets/time-egBWJGDu.js +1 -0
  187. package/dist/web/assets/views-Bl6CiPE0.js +2 -0
  188. package/dist/web/assets/{workbench-connection-Gsy9bIuP.js → workbench-connection-CyMud_mZ.js} +1 -1
  189. package/dist/web/assets/{workspace-CUoFFOwJ.js → workspace-V-yCOfn1.js} +1 -1
  190. package/dist/web/assets/workspace-actions.svelte-D8-Agx2d.js +1 -0
  191. package/dist/web/assets/{workspace-selectors.svelte-D-EQR_-Z.js → workspace-selectors.svelte-DQ1mQdvX.js} +2 -2
  192. package/dist/web/index.html +47 -48
  193. package/dist/web/sw.js +1 -1
  194. package/dist/worker.js +14 -14
  195. package/package.json +7 -7
  196. package/dist/builtin/configure-nerve/guide/collaboration.md +0 -15
  197. package/dist/builtin/configure-nerve/scripts/nerve-version.json +0 -1
  198. package/dist/chunk-D6C32XHS.js.LEGAL.txt +0 -25
  199. package/dist/chunk-RJR7DJJK.js +0 -32
  200. package/dist/chunk-UVRULOOP.js +0 -35
  201. package/dist/quick-script-docs/runtime/files.md +0 -11
  202. package/dist/web/assets/AsyncBashCenterHost-DldW4utc.js +0 -2
  203. package/dist/web/assets/FileCenterComposedHost-kxFWeFmP.js +0 -1
  204. package/dist/web/assets/FilesWorkbenchPanel-BxjUf50f.js +0 -12
  205. package/dist/web/assets/LaunchCenterHost-1xrIDf73.js +0 -1
  206. package/dist/web/assets/LaunchConfigurationNotice-BfRdIOv0.js +0 -1
  207. package/dist/web/assets/LaunchesWorkbenchPanel-BhCyWFHf.js +0 -1
  208. package/dist/web/assets/LogStream-C70iQmUI.css +0 -1
  209. package/dist/web/assets/LogStream-CibF_jgC.js +0 -1
  210. package/dist/web/assets/MobileFilesBody-4bLT2m0j.js +0 -1
  211. package/dist/web/assets/MobileFilesHost-X_0r4Z16.js +0 -1
  212. package/dist/web/assets/MobileLaunchOutputHost-BEchaBtD.js +0 -1
  213. package/dist/web/assets/MobileLaunchesHost-S7Z3DySI.js +0 -2
  214. package/dist/web/assets/MobileSettingsHost-94-sABuO.js +0 -2
  215. package/dist/web/assets/SearchWorkbenchPanel-CKccBrNr.js +0 -1
  216. package/dist/web/assets/SettingsCenterHost-BM-xIy5S.js +0 -1
  217. package/dist/web/assets/SystemPromptCenterHost-VL4DXNId.js +0 -1
  218. package/dist/web/assets/adapters-CbIIxNp9.js +0 -1
  219. package/dist/web/assets/agent-profiles.svelte-8LAIYKmb.js +0 -1
  220. package/dist/web/assets/appearance.svelte-CLR_fMAx.js +0 -1
  221. package/dist/web/assets/center-tabs.svelte-BCriw5Eu.js +0 -1
  222. package/dist/web/assets/code-H_8FkG35.js +0 -7
  223. package/dist/web/assets/conversation-activity-Dl7udunb.js +0 -1
  224. package/dist/web/assets/conversation-connection-B226pY9T.js +0 -1
  225. package/dist/web/assets/discover-DTlfL84I.js +0 -4
  226. package/dist/web/assets/empty-B8eEKvqc.js +0 -1
  227. package/dist/web/assets/file-code-CMYYNL9l.js +0 -1
  228. package/dist/web/assets/files-eAvb-uRC.js +0 -48
  229. package/dist/web/assets/filesystem-CmkTuQNl.js +0 -1
  230. package/dist/web/assets/floating-toolbar-BwJ2tdsN.js +0 -1
  231. package/dist/web/assets/index-CH1Mvlxk.css +0 -1
  232. package/dist/web/assets/index-DNfABG4x.js +0 -172
  233. package/dist/web/assets/launches-ZxeZFPI8.js +0 -5
  234. package/dist/web/assets/launches.api-BEsX6AKZ.js +0 -1
  235. package/dist/web/assets/launches.svelte-QFDoCgug.js +0 -2
  236. package/dist/web/assets/menu-icons-C24r3TCF.js +0 -1
  237. package/dist/web/assets/mobile-launch-rows-Ci7ldwx6.js +0 -1
  238. package/dist/web/assets/page-tabs.svelte-VZp38ac7.js +0 -4
  239. package/dist/web/assets/panel-DEG1zXHj.js +0 -1
  240. package/dist/web/assets/popover-panel-B1cUdhY5.js +0 -5
  241. package/dist/web/assets/pr-view-loader.svelte-CZfxwzwL.js +0 -1
  242. package/dist/web/assets/progress-D2Cb6vK_.js +0 -1
  243. package/dist/web/assets/settings-B_ed0eye.js +0 -1
  244. package/dist/web/assets/settings-Dzj6Az_d.js +0 -1
  245. package/dist/web/assets/settings-scope-BjQBgG9v.js +0 -33
  246. package/dist/web/assets/shell-CbR1KanT.js +0 -1
  247. package/dist/web/assets/shell-layout.svelte-D5u4i1UJ.js +0 -2
  248. package/dist/web/assets/time-DqcZ_PFK.js +0 -1
  249. package/dist/web/assets/views-D4ociG21.js +0 -2
  250. package/dist/web/assets/workspace-actions.svelte-BMp3D2e1.js +0 -1
  251. /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/create-extension.mjs +0 -0
  252. /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/install-extension.mjs +0 -0
  253. /package/dist/builtin/configure-nerve/{scripts → reference/extensions/scripts}/upgrade-extension.mjs +0 -0
  254. /package/dist/builtin/configure-nerve/{reference/writing-for-agents.md → writing-for-agents.md} +0 -0
  255. /package/dist/{chunk-H5CAHDII.js.LEGAL.txt → chunk-WQHOXPLV.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-6ZS7TA6E.js";
5
+ } from "./chunk-35O66NLU.js";
6
6
  import {
7
7
  combineAbortSignals
8
- } from "./chunk-ZUWBEV2O.js";
8
+ } from "./chunk-UQHUYEFW.js";
9
+ import {
10
+ SseDecoder
11
+ } from "./chunk-I7OMW4RJ.js";
9
12
  import {
10
13
  convertResponsesMessages,
11
- convertResponsesTools,
12
- getResponsesToolSupport,
14
+ prepareResponsesPrompt,
13
15
  processResponsesStream
14
- } from "./chunk-IRRR3PWN.js";
16
+ } from "./chunk-KQD4DYEP.js";
15
17
  import {
16
18
  registerSessionResourceCleanup
17
- } from "./chunk-ZVH6EB7S.js";
19
+ } from "./chunk-QKRWXA5W.js";
18
20
  import {
19
21
  clampOpenAIPromptCacheKey
20
- } from "./chunk-KUFIFCB4.js";
21
- import "./chunk-LP4APBBQ.js";
22
+ } from "./chunk-KDGUQYYY.js";
23
+ import "./chunk-FZ7U3GZI.js";
22
24
  import {
23
25
  buildBaseOptions,
24
26
  createGrammarToolInputProperties
25
- } from "./chunk-Z6AY5VOZ.js";
26
- import "./chunk-TSAUBRRU.js";
27
+ } from "./chunk-RQIN5JYO.js";
28
+ import "./chunk-P7GPT4XL.js";
27
29
  import {
28
30
  formatProviderError,
29
31
  normalizeProviderError
30
- } from "./chunk-PVPJAGWR.js";
32
+ } from "./chunk-EOZLBW5E.js";
31
33
  import {
32
34
  headersToRecord
33
- } from "./chunk-6IHXVT5H.js";
34
- import "./chunk-JBEWFFOK.js";
35
- import "./chunk-BG2KGLIA.js";
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
- resolveTranscriptTools
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-DDBE2VLT.js";
49
+ } from "./chunk-A3OFIREH.js";
50
50
  import {
51
51
  getIdentityHeaders
52
- } from "./chunk-Q3C7TQ2M.js";
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.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js
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.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js
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) : void 0;
412
- const reasoningEffort = clampedReasoning === "off" ? void 0 : 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 buildRequestBody(model, context, options, cacheSessionId, grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(context.messages), model.compat?.supportsOpenAIGrammarTools ?? false)) {
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 transcriptTools = resolveTranscriptTools(context.messages, getResponsesToolSupport({
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
- instructions: instructions || "You are a helpful assistant.",
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 (transcriptTools.requestTools.length > 0) {
457
- body.tools = convertResponsesTools(transcriptTools.requestTools, {
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 = options.reasoningEffort === "none" ? model.thinkingLevelMap?.off === void 0 ? "none" : model.thinkingLevelMap.off : model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort;
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 decoder = new TextDecoder();
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
- buffer += done ? decoder.decode() : decoder.decode(value, { stream: true });
631
- if (done && buffer.trim())
632
- buffer += "\n\n";
633
- let idx = buffer.indexOf("\n\n");
634
- while (idx !== -1) {
635
- const chunk = buffer.slice(0, idx);
636
- buffer = buffer.slice(idx + 2);
637
- const dataLines = chunk.split("\n").filter((l) => l.startsWith("data:")).map((l) => l.slice(5).trim());
638
- if (dataLines.length > 0) {
639
- const data = dataLines.join("\n").trim();
640
- if (data && data !== "[DONE]") {
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 = 55 * 60 * 1e3;
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-6GUJQURI.js";
6
+ } from "./chunk-WLTE6OJM.js";
7
7
  import {
8
8
  generatePKCE
9
- } from "./chunk-BACYVEE6.js";
9
+ } from "./chunk-QC6DSC4D.js";
10
10
  import {
11
11
  getProviderEnvValue
12
- } from "./chunk-JBEWFFOK.js";
12
+ } from "./chunk-LIIGX2XX.js";
13
13
  import "./chunk-CWESUMYQ.js";
14
14
 
15
- // node_modules/.pnpm/@earendil-works+pi-ai@1.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js
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-3CZXUKLG.js";
5
+ } from "./chunk-MRDORR5Z.js";
6
6
  import {
7
7
  headersToRecord,
8
8
  providerHeadersToRecord
9
- } from "./chunk-6IHXVT5H.js";
9
+ } from "./chunk-NSISYP6D.js";
10
10
  import {
11
11
  calculateCost
12
- } from "./chunk-W7LEYYFH.js";
12
+ } from "./chunk-WJAHXDL4.js";
13
13
  import {
14
14
  getIdentityHeaders
15
- } from "./chunk-Q3C7TQ2M.js";
15
+ } from "./chunk-FNWUCFVO.js";
16
16
 
17
- // node_modules/.pnpm/@earendil-works+pi-ai@1.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js
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
- const { response, json } = await retryProviderRequest(async () => {
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 { response: next, json: await next.json() };
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 input = tokenCount(value.input_tokens);
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: 0,
93
- cacheWrite: 0,
94
- totalTokens: input + output,
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);
@@ -2,9 +2,9 @@ import { createRequire as __nerveCreateRequire } from "node:module";
2
2
  const require = __nerveCreateRequire(import.meta.url);
3
3
  import {
4
4
  ownedSlice
5
- } from "./chunk-U5KGV63C.js";
5
+ } from "./chunk-EZJH7ED5.js";
6
6
 
7
- // node_modules/.pnpm/@earendil-works+pi-ai@1.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js
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/error-body.js
8
8
  var MAX_PROVIDER_ERROR_BODY_CHARS = 4e3;
9
9
  function normalizeProviderError(error) {
10
10
  if (!(error instanceof Error)) {
@@ -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.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/utils/text.js
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/text.js
5
5
  function contentText(content, separator = "\n") {
6
6
  if (typeof content === "string")
7
7
  return content;
@@ -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.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js
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/env-api-keys.js
5
5
  var __rewriteRelativeImportExtension = function(path, preserveJsx) {
6
6
  if (typeof path === "string" && /^\.\.?\//.test(path)) {
7
7
  return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
@@ -1,10 +1,10 @@
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.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/utils/version.js
5
- var PI_AI_VERSION = "1.5.2";
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/version.js
5
+ var PI_AI_VERSION = "1.6.1";
6
6
 
7
- // node_modules/.pnpm/@earendil-works+pi-ai@1.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/utils/identity.js
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/identity.js
8
8
  var NVIDIA_NIM_HOST = "integrate.api.nvidia.com";
9
9
  var OPENCODE_HOST = "opencode.ai";
10
10
  function mergeClientIdentity(...sources) {
@@ -0,0 +1,163 @@
1
+ import { createRequire as __nerveCreateRequire } from "node:module";
2
+ const require = __nerveCreateRequire(import.meta.url);
3
+ import {
4
+ isRecord,
5
+ postClassifierRequest,
6
+ requiredNumber
7
+ } from "./chunk-CZXRZEV4.js";
8
+ import "./chunk-MRDORR5Z.js";
9
+ import {
10
+ formatProviderError,
11
+ normalizeProviderError
12
+ } from "./chunk-EOZLBW5E.js";
13
+ import "./chunk-NSISYP6D.js";
14
+ import {
15
+ calculateCost
16
+ } from "./chunk-WJAHXDL4.js";
17
+ import "./chunk-A3OFIREH.js";
18
+ import "./chunk-FNWUCFVO.js";
19
+ import "./chunk-EZJH7ED5.js";
20
+ import "./chunk-CWESUMYQ.js";
21
+
22
+ // 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/pi-decision.js
23
+ var LABEL = "Pi Decision";
24
+ function finiteNonNegative(value) {
25
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : 0;
26
+ }
27
+ function requiredUnitInterval(value, field) {
28
+ const num = requiredNumber(LABEL, value, field);
29
+ if (num < 0 || num > 1) {
30
+ throw new Error(`${LABEL} returned out-of-range ${field}: ${num}`);
31
+ }
32
+ return num;
33
+ }
34
+ function parseUsage(value, model) {
35
+ if (!isRecord(value) || typeof value.input !== "number" && typeof value.output !== "number")
36
+ return void 0;
37
+ const input = finiteNonNegative(value.input);
38
+ const output = finiteNonNegative(value.output);
39
+ const cacheRead = finiteNonNegative(value.cacheRead);
40
+ const cacheWrite = finiteNonNegative(value.cacheWrite);
41
+ const totalTokens = typeof value.totalTokens === "number" && Number.isFinite(value.totalTokens) && value.totalTokens >= 0 ? value.totalTokens : input + output + cacheRead + cacheWrite;
42
+ const usage = {
43
+ input,
44
+ output,
45
+ cacheRead,
46
+ cacheWrite,
47
+ totalTokens,
48
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }
49
+ };
50
+ if (isRecord(value.cost) && typeof value.cost.total === "number" && Number.isFinite(value.cost.total)) {
51
+ usage.cost = {
52
+ input: finiteNonNegative(value.cost.input),
53
+ output: finiteNonNegative(value.cost.output),
54
+ cacheRead: finiteNonNegative(value.cost.cacheRead),
55
+ cacheWrite: finiteNonNegative(value.cost.cacheWrite),
56
+ total: finiteNonNegative(value.cost.total),
57
+ ...typeof value.cost.totalFromProvider === "boolean" ? { totalFromProvider: value.cost.totalFromProvider } : {}
58
+ };
59
+ } else {
60
+ calculateCost(model, usage);
61
+ }
62
+ return usage;
63
+ }
64
+ function parseProbabilities(value, id, criteria) {
65
+ if (!isRecord(value))
66
+ throw new Error(`${LABEL} returned invalid probabilities for ${id}`);
67
+ return Object.fromEntries(Object.entries(value).map(([choice, prob]) => {
68
+ if (!Object.hasOwn(criteria, choice)) {
69
+ throw new Error(`${LABEL} returned unknown choice "${choice}" in probabilities for ${id}`);
70
+ }
71
+ return [choice, requiredUnitInterval(prob, `probability for ${id}.${choice}`)];
72
+ }));
73
+ }
74
+ function parseAnswer(id, question, answer) {
75
+ if (!isRecord(answer))
76
+ throw new Error(`${LABEL} returned an invalid answer for ${id}`);
77
+ if (question.type === "choice") {
78
+ if (answer.type !== "choice" || typeof answer.choice !== "string") {
79
+ throw new Error(`${LABEL} did not return a choice answer for ${id}`);
80
+ }
81
+ if (!Object.hasOwn(question.criteria, answer.choice)) {
82
+ throw new Error(`${LABEL} returned unknown choice "${answer.choice}" for ${id}`);
83
+ }
84
+ return {
85
+ type: "choice",
86
+ choice: answer.choice,
87
+ probabilities: parseProbabilities(answer.probabilities, id, question.criteria),
88
+ confidence: requiredUnitInterval(answer.confidence, `confidence for ${id}`)
89
+ };
90
+ }
91
+ if (question.type === "score") {
92
+ if (answer.type !== "score")
93
+ throw new Error(`${LABEL} did not return a score answer for ${id}`);
94
+ const score = requiredNumber(LABEL, answer.score, `score for ${id}`);
95
+ const maxScore = Math.max(0, question.criteria.length - 1);
96
+ if (score < 0 || score > maxScore) {
97
+ throw new Error(`${LABEL} returned out-of-range score for ${id}: ${score}`);
98
+ }
99
+ return {
100
+ type: "score",
101
+ score,
102
+ confidence: requiredUnitInterval(answer.confidence, `confidence for ${id}`)
103
+ };
104
+ }
105
+ if (answer.type !== "bool")
106
+ throw new Error(`${LABEL} did not return a bool answer for ${id}`);
107
+ return { type: "bool", probability: requiredUnitInterval(answer.probability, `probability for ${id}`) };
108
+ }
109
+ function parseAnswers(value, context) {
110
+ if (!isRecord(value))
111
+ throw new Error(`${LABEL} returned an unexpected response`);
112
+ return Object.fromEntries(Object.entries(context.questions).map(([id, question]) => {
113
+ if (!Object.hasOwn(value, id))
114
+ throw new Error(`${LABEL} did not return an answer for ${id}`);
115
+ return [id, parseAnswer(id, question, value[id])];
116
+ }));
117
+ }
118
+ var classify = async (model, context, options) => {
119
+ const output = {
120
+ api: model.api,
121
+ provider: model.provider,
122
+ model: model.id,
123
+ answers: {},
124
+ stopReason: "stop",
125
+ timestamp: Date.now()
126
+ };
127
+ try {
128
+ if (model.api !== "pi-decision")
129
+ throw new Error(`Unsupported classifier API: ${model.api}`);
130
+ const images = context.images ?? [];
131
+ if (images.length > 0 && !model.input.includes("image")) {
132
+ throw new Error(`${LABEL} model ${model.id} does not support image input`);
133
+ }
134
+ const url = new URL("decision", `${model.baseUrl.replace(/\/+$/u, "")}/`);
135
+ const requestBody = {
136
+ model: model.id,
137
+ context: {
138
+ state: context.state,
139
+ ...images.length > 0 ? { images } : {},
140
+ questions: context.questions
141
+ },
142
+ ...options?.sessionId !== void 0 ? { options: { sessionId: options.sessionId } } : {}
143
+ };
144
+ const body = await postClassifierRequest(LABEL, url, model, requestBody, options);
145
+ if (!isRecord(body))
146
+ throw new Error(`${LABEL} returned an unexpected response`);
147
+ if (typeof body.responseId === "string" && body.responseId)
148
+ output.responseId = body.responseId;
149
+ const usage = parseUsage(body.usage, model);
150
+ if (usage)
151
+ output.usage = usage;
152
+ output.answers = parseAnswers(body.answers, context);
153
+ return output;
154
+ } catch (error) {
155
+ output.answers = {};
156
+ output.stopReason = options?.signal?.aborted ? "aborted" : "error";
157
+ output.errorMessage = formatProviderError(normalizeProviderError(error), `${LABEL} error`);
158
+ return output;
159
+ }
160
+ };
161
+ export {
162
+ classify
163
+ };
@@ -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.5.2_@aws-sdk+credential-provider-node@3.972.83_@smithy+signatur_b842a8cec34a633ed5f728049ae89b72/node_modules/@earendil-works/pi-ai/dist/utils/hash.js
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/hash.js
5
5
  function shortHash(str) {
6
6
  let h1 = 3735928559;
7
7
  let h2 = 1103547991;