@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
@@ -19,8 +19,10 @@ import {
19
19
  coreMigrations,
20
20
  createId,
21
21
  defineStep,
22
+ digest,
22
23
  dropLaunchToolDocument,
23
24
  external_exports,
25
+ files,
24
26
  hasEnabledRemovedToolRule,
25
27
  hasLaunchToolRule,
26
28
  imageExplanationToolSettingsSchema,
@@ -43,7 +45,7 @@ import {
43
45
  storagePaths,
44
46
  thinkingLevelSchema,
45
47
  validateName
46
- } from "./chunk-DHIDYKXJ.js";
48
+ } from "./chunk-3LWB5SGT.js";
47
49
  import {
48
50
  __toESM
49
51
  } from "./chunk-CWESUMYQ.js";
@@ -287,7 +289,7 @@ async function runUnit(ctx, item, fn, options = {}) {
287
289
  }, options.quarantine);
288
290
  return;
289
291
  }
290
- const files = ctx.fs.beginUnit();
292
+ const files2 = ctx.fs.beginUnit();
291
293
  const undoReport = options.checkpoint?.();
292
294
  const saved = structuredClone({
293
295
  setAside: state.setAside,
@@ -299,7 +301,7 @@ async function runUnit(ctx, item, fn, options = {}) {
299
301
  const action = async () => fn();
300
302
  result = options.transaction ? await options.transaction(action) : await action();
301
303
  } catch (error) {
302
- files.finish(false);
304
+ files2.finish(false);
303
305
  undoReport?.();
304
306
  Object.assign(state, saved);
305
307
  state.failures.push({ ...item, reason: boundedReason(error) });
@@ -307,7 +309,7 @@ async function runUnit(ctx, item, fn, options = {}) {
307
309
  } finally {
308
310
  state.unit = void 0;
309
311
  }
310
- files.finish(true);
312
+ files2.finish(true);
311
313
  return result;
312
314
  }
313
315
  function quarantineSource(ctx, path, root) {
@@ -717,10 +719,10 @@ function quarantineDiscardedConversations(ctx) {
717
719
  if (isAbsolute3(id) || id.startsWith("legacy-record:"))
718
720
  continue;
719
721
  const records = [];
720
- const files = [];
722
+ const files2 = [];
721
723
  const add = (path) => {
722
724
  if (existsSync4(path))
723
- files.push(path);
725
+ files2.push(path);
724
726
  };
725
727
  if (/^conv_[A-Za-z0-9_-]+$/.test(id)) {
726
728
  add(join3(ctx.paths.dataPath, "conversations", id.slice(5)));
@@ -767,7 +769,7 @@ function quarantineDiscardedConversations(ctx) {
767
769
  }
768
770
  yield* records;
769
771
  })(),
770
- files
772
+ files: files2
771
773
  });
772
774
  }
773
775
  } finally {
@@ -1906,7 +1908,7 @@ import { closeSync as closeSync3, cpSync, lstatSync as lstatSync3, openSync as o
1906
1908
  import { dirname as dirname3, join as join4 } from "node:path";
1907
1909
  var REMOVE_RETRY = { maxRetries: 5, retryDelay: 50 };
1908
1910
  var present = (path) => !!lstatSync3(path, { throwIfNoEntry: false });
1909
- function digest(path) {
1911
+ function digest2(path) {
1910
1912
  const hash2 = createHash4("sha256");
1911
1913
  const visit = (path2) => {
1912
1914
  const stat = lstatSync3(path2);
@@ -1953,7 +1955,7 @@ function movePreservingSource(from, to) {
1953
1955
  return;
1954
1956
  }
1955
1957
  if (present(to)) {
1956
- assert4.equal(digest(from), digest(to), `Conflicting move destination ${to}`);
1958
+ assert4.equal(digest2(from), digest2(to), `Conflicting move destination ${to}`);
1957
1959
  rmSync(from, { recursive: true, force: true, ...REMOVE_RETRY });
1958
1960
  syncDirectory(dirname3(from));
1959
1961
  return;
@@ -2519,10 +2521,10 @@ async function checkConfiguration(input) {
2519
2521
  checkedDocuments.clear();
2520
2522
  checkedTexts.clear();
2521
2523
  const failures = [];
2522
- const files = candidates(input.home, input.dataDir, input.reader, input.discarded);
2523
- for (const candidate of files)
2524
+ const files2 = candidates(input.home, input.dataDir, input.reader, input.discarded);
2525
+ for (const candidate of files2)
2524
2526
  input.context.ownPaths([candidate.path], candidate.root);
2525
- for (const candidate of files) {
2527
+ for (const candidate of files2) {
2526
2528
  const path = resolve4(candidate.path);
2527
2529
  if (!lstatSync5(path, { throwIfNoEntry: false }))
2528
2530
  continue;
@@ -2628,7 +2630,7 @@ function readJson(path, fallback = {}) {
2628
2630
  return fallback;
2629
2631
  }
2630
2632
  }
2631
- var digest2 = (text3) => `sha256:${createHash5("sha256").update(text3).digest("hex")}`;
2633
+ var digest3 = (text3) => `sha256:${createHash5("sha256").update(text3).digest("hex")}`;
2632
2634
  var normalizeDigest = (value) => value.startsWith("sha256:") ? value : `sha256:${value}`;
2633
2635
  function convertSettings(document) {
2634
2636
  let changed = false;
@@ -2708,8 +2710,8 @@ async function convertConfiguration(home, scratch, ctx) {
2708
2710
  const before = readFileSync3(path, "utf8"), after = renameSuggestionFilter(before);
2709
2711
  if (after !== before) {
2710
2712
  conversions[path] = {
2711
- before: digest2(before),
2712
- after: digest2(after)
2713
+ before: digest3(before),
2714
+ after: digest3(after)
2713
2715
  };
2714
2716
  writeJson(checkpoint, conversions);
2715
2717
  atomicWrite(path, after);
@@ -2761,7 +2763,7 @@ function convertPromptTrust(data, home, scratch) {
2761
2763
  return approved ? { ...data, path, status, contentDigest: normalizeDigest(approved) } : null;
2762
2764
  }
2763
2765
  try {
2764
- const text3 = readFileSync3(path, "utf8"), current = digest2(text3);
2766
+ const text3 = readFileSync3(path, "utf8"), current = digest3(text3);
2765
2767
  const old = data.contentDigest ?? data.digest;
2766
2768
  if (old) {
2767
2769
  const conversions = readJson(join7(scratch, "suggestion-digests.json"));
@@ -2775,7 +2777,7 @@ function convertPromptTrust(data, home, scratch) {
2775
2777
  };
2776
2778
  }
2777
2779
  const code = predicate(text3);
2778
- if (status === "trusted" && (!code || digest2(code) !== normalizeDigest(data.predicateHash ?? "")))
2780
+ if (status === "trusted" && (!code || digest3(code) !== normalizeDigest(data.predicateHash ?? "")))
2779
2781
  return null;
2780
2782
  return { ...data, path, status, contentDigest: current };
2781
2783
  } catch (error) {
@@ -2990,9 +2992,9 @@ function convertProfileScope(root, markdownDirectory, customizations = [], disab
2990
2992
  verifyAncestors(target3, root);
2991
2993
  writeJson(target3, document);
2992
2994
  assert10.deepEqual(profilesDocument.parse(readJson(target3)), document, `Subagent JSON verification failed: ${target3}`);
2993
- for (const [path, digest5] of Object.entries(sources)) {
2995
+ for (const [path, digest6] of Object.entries(sources)) {
2994
2996
  verifyAncestors(path, root);
2995
- assert10.equal(hash(readFileSync4(path, "utf8")), digest5, `Profile changed during conversion: ${path}`);
2997
+ assert10.equal(hash(readFileSync4(path, "utf8")), digest6, `Profile changed during conversion: ${path}`);
2996
2998
  preserveForRollback(path);
2997
2999
  rmSync4(path);
2998
3000
  }
@@ -3412,7 +3414,7 @@ function collectAssets(reader, mapping, oldConversationId, rootId, tools, tasks)
3412
3414
  if (assets.has(logicalPath))
3413
3415
  return;
3414
3416
  const path = resolve6(root, logicalPath);
3415
- const preserve = (reason2, files = []) => reader.context?.quarantine({
3417
+ const preserve = (reason2, files2 = []) => reader.context?.quarantine({
3416
3418
  kind: "conversation",
3417
3419
  id: `${oldConversationId}/asset/${row2?.id ?? logicalPath}`,
3418
3420
  reason: reason2
@@ -3426,7 +3428,7 @@ function collectAssets(reader, mapping, oldConversationId, rootId, tools, tasks)
3426
3428
  }
3427
3429
  }
3428
3430
  ],
3429
- files,
3431
+ files: files2,
3430
3432
  retainSource: true,
3431
3433
  setAside: false
3432
3434
  });
@@ -3882,9 +3884,9 @@ import { createHash as createHash9 } from "node:crypto";
3882
3884
  function userMessageDigest(message) {
3883
3885
  const content = message.content;
3884
3886
  const text3 = typeof content === "string" ? content : Array.isArray(content) ? content.filter((block) => block.type === "text").map((block) => block.text).join("\n") : "";
3885
- return digest3(text3);
3887
+ return digest4(text3);
3886
3888
  }
3887
- function digest3(text3) {
3889
+ function digest4(text3) {
3888
3890
  return createHash9("sha256").update(text3).digest("hex");
3889
3891
  }
3890
3892
  function verifySelectedPath(input) {
@@ -3922,7 +3924,7 @@ function verifySelectedPath(input) {
3922
3924
  if (!event)
3923
3925
  throw new Error(`Missing imported event ${eventId}`);
3924
3926
  if (event.type === "user_message")
3925
- newUsers.push(digest3(event.payload.text));
3927
+ newUsers.push(digest4(event.payload.text));
3926
3928
  if (event.type === "assistant_message") {
3927
3929
  for (const block of event.payload.content) {
3928
3930
  if (block.type === "toolCall")
@@ -7049,10 +7051,10 @@ import { join as join17 } from "node:path";
7049
7051
 
7050
7052
  // packages/workbench-server/dist/infrastructure/migrations/steps/0002-agent-profiles/released-export.js
7051
7053
  import assert23 from "node:assert/strict";
7052
- var digest4 = external_exports.string().regex(/^[a-f0-9]{64}$/);
7054
+ var digest5 = external_exports.string().regex(/^[a-f0-9]{64}$/);
7053
7055
  var target = external_exports.object({
7054
7056
  bytes: external_exports.string(),
7055
- digest: digest4,
7057
+ digest: digest5,
7056
7058
  kind: external_exports.enum([
7057
7059
  "preferences",
7058
7060
  "creation",
@@ -7067,9 +7069,9 @@ var exportReceiptSchema = external_exports.object({
7067
7069
  schemaVersion: external_exports.literal(1),
7068
7070
  release: external_exports.literal("0.37.0"),
7069
7071
  identity: external_exports.string(),
7070
- sources: external_exports.record(external_exports.string(), external_exports.object({ digest: digest4, backup: external_exports.string() }).strict()),
7072
+ sources: external_exports.record(external_exports.string(), external_exports.object({ digest: digest5, backup: external_exports.string() }).strict()),
7071
7073
  targets: external_exports.record(external_exports.string(), target),
7072
- rowDigest: digest4.optional(),
7074
+ rowDigest: digest5.optional(),
7073
7075
  retire: external_exports.array(external_exports.string()),
7074
7076
  report: external_exports.array(external_exports.string())
7075
7077
  }).strict();
@@ -7432,13 +7434,13 @@ async function browserNames() {
7432
7434
  }
7433
7435
 
7434
7436
  // packages/workbench-server/dist/infrastructure/migrations/steps/0002-agent-profiles/released-executor.js
7435
- async function executeReleasedMigration(db, files, progress) {
7436
- await files.verifyFiles();
7437
+ async function executeReleasedMigration(db, files2, progress) {
7438
+ await files2.verifyFiles();
7437
7439
  if (db.state() === "converted") {
7438
7440
  await progress?.("verify-backup", "Checking database backup");
7439
7441
  db.verifyBackup();
7440
7442
  await db.verifyConverted();
7441
- files.committed();
7443
+ files2.committed();
7442
7444
  return;
7443
7445
  }
7444
7446
  await db.verifyReleased();
@@ -7450,7 +7452,7 @@ async function executeReleasedMigration(db, files, progress) {
7450
7452
  let committed = false;
7451
7453
  try {
7452
7454
  await db.verifyReleased();
7453
- await files.verifyFiles();
7455
+ await files2.verifyFiles();
7454
7456
  await progress?.("update-database", "Updating database");
7455
7457
  db.metadata();
7456
7458
  db.rebuild();
@@ -7460,17 +7462,17 @@ async function executeReleasedMigration(db, files, progress) {
7460
7462
  await db.verifyConverted();
7461
7463
  db.commit();
7462
7464
  committed = true;
7463
- files.committed();
7465
+ files2.committed();
7464
7466
  } catch (error) {
7465
7467
  if (!committed)
7466
7468
  db.rollback();
7467
7469
  throw error;
7468
7470
  }
7469
7471
  }
7470
- async function retireReleasedSources(files) {
7471
- await files.verifyFiles();
7472
- for (const receipt3 of files.receipts)
7473
- await files.retire(receipt3);
7472
+ async function retireReleasedSources(files2) {
7473
+ await files2.verifyFiles();
7474
+ for (const receipt3 of files2.receipts)
7475
+ await files2.retire(receipt3);
7474
7476
  }
7475
7477
 
7476
7478
  // packages/workbench-server/dist/infrastructure/migrations/steps/0002-agent-profiles/released-schema-verification.js
@@ -7936,18 +7938,18 @@ function inputs(ctx, root, snapshots) {
7936
7938
  });
7937
7939
  for (const issue of input.issues)
7938
7940
  ctx.quarantine({ kind: "configuration", id: issue.path, reason: issue.reason }, { files: [issue.path], retainSource: true });
7939
- for (const [path, digest5] of input.snapshots)
7940
- snapshots.set(path, digest5);
7941
+ for (const [path, digest6] of input.snapshots)
7942
+ snapshots.set(path, digest6);
7941
7943
  return input.before;
7942
7944
  }
7943
7945
  var planPath = (ctx) => join21(archiveRoot(ctx), "plan.json");
7944
7946
  async function planExports(ctx) {
7945
7947
  await phaseProgress(ctx, "inventory", "Checking migration inputs")();
7946
- const files = io(ctx), original = inventory(ctx);
7948
+ const files2 = io(ctx), original = inventory(ctx);
7947
7949
  const snapshots = /* @__PURE__ */ new Map();
7948
7950
  const baseContext = { builtins: releasedBuiltins, skillSources: {}, report: () => {
7949
7951
  } };
7950
- const userInput = readReleasedScope(ctx.paths.home, files, "user", baseContext);
7952
+ const userInput = readReleasedScope(ctx.paths.home, files2, "user", baseContext);
7951
7953
  const user = userInput.before;
7952
7954
  const receipts = [], rows = {}, trust = [];
7953
7955
  const claimed = /* @__PURE__ */ new Set();
@@ -7959,8 +7961,8 @@ async function planExports(ctx) {
7959
7961
  ctx.ownPaths([...sources, ...Object.keys(targets2)], root);
7960
7962
  const path = join21(archiveRoot(ctx), sha256(identity), "receipt.json");
7961
7963
  for (const source of sources)
7962
- assert29.equal(sha256(files.read(source)), snapshots.get(source), "Source changed while planning conversion");
7963
- const receipt3 = prepareExport(files, {
7964
+ assert29.equal(sha256(files2.read(source)), snapshots.get(source), "Source changed while planning conversion");
7965
+ const receipt3 = prepareExport(files2, {
7964
7966
  identity,
7965
7967
  backupDirectory: join21(archiveRoot(ctx), sha256(identity)),
7966
7968
  sources,
@@ -7989,10 +7991,10 @@ async function planExports(ctx) {
7989
7991
  ])
7990
7992
  };
7991
7993
  validateReleasedCatalog(input, root, "user", context);
7992
- for (const [path, digest5] of input.snapshots)
7993
- snapshots.set(path, digest5);
7994
+ for (const [path, digest6] of input.snapshots)
7995
+ snapshots.set(path, digest6);
7994
7996
  const result = convertPreferencesV037({ ...before, scope: "user" }, context);
7995
- const targets2 = input.issues.length ? {} : isolateScopeTargets(root, input, files, releasedScopeTargets(root, "user", before, context, result));
7997
+ const targets2 = input.issues.length ? {} : isolateScopeTargets(root, input, files2, releasedScopeTargets(root, "user", before, context, result));
7996
7998
  for (const issue of input.issues)
7997
7999
  ctx.quarantine({ kind: "configuration", id: issue.path, reason: issue.reason }, { files: [issue.path], retainSource: true });
7998
8000
  for (const message of scopeIssueReport(input.issues))
@@ -9410,6 +9412,97 @@ var step_default6 = defineStep({
9410
9412
  }
9411
9413
  });
9412
9414
 
9415
+ // packages/workbench-server/dist/infrastructure/migrations/steps/0007-user-configuration-trust/step.js
9416
+ import { createHash as createHash12, randomUUID as randomUUID7 } from "node:crypto";
9417
+ import { existsSync as existsSync25, mkdirSync as mkdirSync9, readdirSync as readdirSync13, readFileSync as readFileSync15 } from "node:fs";
9418
+ import { homedir as homedir2 } from "node:os";
9419
+ import { dirname as dirname13, join as join26 } from "node:path";
9420
+ var sha2562 = (bytes) => `sha256:${createHash12("sha256").update(bytes).digest("hex")}`;
9421
+ var RENAMES = [
9422
+ ["project_permissions", "permissions"],
9423
+ ["project_capabilities", "capabilities"],
9424
+ ["project_skill", "skill"]
9425
+ ];
9426
+ function filesIn(directory, suffix) {
9427
+ return existsSync25(directory) ? readdirSync13(directory).filter((name) => name.endsWith(suffix) && !name.startsWith(".")).sort().map((name) => join26(directory, name)) : [];
9428
+ }
9429
+ async function userSkillFolders(context) {
9430
+ const { paths } = context;
9431
+ const roots = [
9432
+ join26(paths.agentPath, "skills"),
9433
+ join26(homedir2(), ".agents", "skills")
9434
+ ].filter((root) => existsSync25(root));
9435
+ if (roots.length === 0)
9436
+ return [];
9437
+ const loaded = await loadSkills(new NodeExecutionEnv({ cwd: paths.agentPath }), roots);
9438
+ return [...new Set(loaded.skills.map((skill) => dirname13(skill.filePath)))];
9439
+ }
9440
+ async function trustCurrentContent(context) {
9441
+ const { paths } = context;
9442
+ const items = [];
9443
+ const byBytes = (kind, key2) => ({
9444
+ kind,
9445
+ key: key2,
9446
+ name: null,
9447
+ digest: () => sha2562(readFileSync15(key2))
9448
+ });
9449
+ for (const file of filesIn(paths.agentProfilesPath, ".json"))
9450
+ items.push(byBytes("agent_profile", file));
9451
+ for (const file of filesIn(join26(paths.configPath, "rule-sets"), ".json"))
9452
+ items.push(byBytes("permission_rule_set", file));
9453
+ if (existsSync25(paths.permissionsConfigPath))
9454
+ items.push(byBytes("permissions", paths.permissionsConfigPath));
9455
+ const agent = join26(paths.configPath, "agent.json");
9456
+ if (existsSync25(agent))
9457
+ items.push(byBytes("capabilities", agent));
9458
+ for (const file of filesIn(paths.suggestionsPath, ".md"))
9459
+ items.push(byBytes("prompt_suggestion", file));
9460
+ for (const folder of await userSkillFolders(context))
9461
+ items.push({
9462
+ kind: "skill",
9463
+ key: folder,
9464
+ name: null,
9465
+ digest: async () => digest(folder, await files(folder))
9466
+ });
9467
+ mkdirSync9(dirname13(paths.sqlitePath), { recursive: true });
9468
+ const db = openCoreDatabase(paths.sqlitePath);
9469
+ try {
9470
+ migrate(db);
9471
+ const now = (/* @__PURE__ */ new Date()).toISOString();
9472
+ const computed = [];
9473
+ for (const item of items)
9474
+ try {
9475
+ computed.push({ item, digest: await item.digest() });
9476
+ } catch {
9477
+ }
9478
+ const exists = db.sqlite.prepare("SELECT 1 FROM trusted_resource WHERE kind = ? AND project_id IS NULL AND resource_key = ?");
9479
+ const insert = db.sqlite.prepare("INSERT INTO trusted_resource (id, kind, project_id, resource_key, name, content_digest, status, grants, created_at, updated_at) VALUES (?, ?, NULL, ?, ?, ?, 'trusted', NULL, ?, ?)");
9480
+ const rename2 = db.sqlite.prepare("UPDATE trusted_resource SET kind = ? WHERE kind = ?");
9481
+ const suggestionRows = db.sqlite.prepare("SELECT id, resource_key FROM trusted_resource WHERE kind = 'prompt_suggestion' AND project_id IS NULL").all();
9482
+ db.transaction(() => {
9483
+ for (const [from, to] of RENAMES)
9484
+ rename2.run(to, from);
9485
+ db.sqlite.prepare("DELETE FROM trusted_resource WHERE kind = 'prompt_suggestion' AND project_id IS NOT NULL AND status = 'trusted'").run();
9486
+ const update = db.sqlite.prepare("UPDATE trusted_resource SET content_digest = ?, updated_at = ? WHERE id = ?");
9487
+ for (const row2 of suggestionRows)
9488
+ if (existsSync25(row2.resource_key))
9489
+ update.run(sha2562(readFileSync15(row2.resource_key)), now, row2.id);
9490
+ for (const { item, digest: digest6 } of computed)
9491
+ if (!exists.get(item.kind, item.key))
9492
+ insert.run(`trust_${randomUUID7().replaceAll("-", "")}`, item.kind, item.key, item.name, digest6, now, now);
9493
+ });
9494
+ } finally {
9495
+ db.close();
9496
+ }
9497
+ }
9498
+ var step_default7 = defineStep({
9499
+ id: "0007-user-configuration-trust",
9500
+ description: "Rename project trust kinds and trust the user's existing profiles, skills, rule sets, permissions, agent settings and suggestions",
9501
+ async run(context) {
9502
+ await trustCurrentContent(context);
9503
+ }
9504
+ });
9505
+
9413
9506
  // packages/workbench-server/dist/infrastructure/migrations/steps/index.js
9414
9507
  var implementations = [
9415
9508
  step_default,
@@ -9417,7 +9510,8 @@ var implementations = [
9417
9510
  step_default3,
9418
9511
  step_default4,
9419
9512
  step_default5,
9420
- step_default6
9513
+ step_default6,
9514
+ step_default7
9421
9515
  ];
9422
9516
  if (implementations.length !== MIGRATION_METADATA.length)
9423
9517
  throw new Error("Migration metadata and implementations must match.");
@@ -9429,10 +9523,10 @@ var MIGRATION_REGISTRY = Object.freeze(MIGRATION_METADATA.map((metadata, index)
9429
9523
  }));
9430
9524
 
9431
9525
  // packages/workbench-server/dist/infrastructure/migrations/framework/filesystem.js
9432
- import { randomUUID as randomUUID7 } from "node:crypto";
9526
+ import { randomUUID as randomUUID8 } from "node:crypto";
9433
9527
  import assert30 from "node:assert/strict";
9434
- import { closeSync as closeSync4, openSync as openSync4, existsSync as existsSync25, lstatSync as lstatSync15, mkdirSync as mkdirSync9, rmSync as rmSync10, writeFileSync as writeFileSync6 } from "node:fs";
9435
- import { dirname as dirname13, join as join26 } from "node:path";
9528
+ import { closeSync as closeSync4, openSync as openSync4, existsSync as existsSync26, lstatSync as lstatSync15, mkdirSync as mkdirSync10, rmSync as rmSync10, writeFileSync as writeFileSync6 } from "node:fs";
9529
+ import { dirname as dirname14, join as join27 } from "node:path";
9436
9530
  var MigrationFilesystem = class {
9437
9531
  scratchDir;
9438
9532
  readOnly = false;
@@ -9448,10 +9542,10 @@ var MigrationFilesystem = class {
9448
9542
  ];
9449
9543
  }
9450
9544
  recoverUnit() {
9451
- const pending2 = join26(this.scratchDir, "pending-unit");
9452
- if (!existsSync25(pending2))
9545
+ const pending2 = join27(this.scratchDir, "pending-unit");
9546
+ if (!existsSync26(pending2))
9453
9547
  return;
9454
- if (!existsSync25(join26(pending2, "committed")))
9548
+ if (!existsSync26(join27(pending2, "committed")))
9455
9549
  new RollbackJournal(pending2).restore();
9456
9550
  setUnitJournal(void 0);
9457
9551
  rmSync10(pending2, { recursive: true, force: true });
@@ -9462,7 +9556,7 @@ var MigrationFilesystem = class {
9462
9556
  if (this.readOnly)
9463
9557
  return { finish() {
9464
9558
  } };
9465
- const pending2 = join26(this.scratchDir, "pending-unit");
9559
+ const pending2 = join27(this.scratchDir, "pending-unit");
9466
9560
  const journal = new RollbackJournal(pending2);
9467
9561
  this.#unit = journal;
9468
9562
  setUnitJournal(journal);
@@ -9472,7 +9566,7 @@ var MigrationFilesystem = class {
9472
9566
  if (!success)
9473
9567
  journal.restore();
9474
9568
  else {
9475
- const marker = join26(pending2, "committed");
9569
+ const marker = join27(pending2, "committed");
9476
9570
  writeFileSync6(marker, "", { mode: 384 });
9477
9571
  syncFile(marker);
9478
9572
  syncDirectory(pending2);
@@ -9492,8 +9586,8 @@ var MigrationFilesystem = class {
9492
9586
  writeChunks(path, chunks) {
9493
9587
  for (const journal of this.journals())
9494
9588
  journal.preserveFile(path);
9495
- mkdirSync9(dirname13(path), { recursive: true, mode: 448 });
9496
- const temporary = `${path}.${randomUUID7()}.migration-write`;
9589
+ mkdirSync10(dirname14(path), { recursive: true, mode: 448 });
9590
+ const temporary = `${path}.${randomUUID8()}.migration-write`;
9497
9591
  for (const journal of this.journals())
9498
9592
  journal.preserveFile(temporary);
9499
9593
  try {
@@ -9506,7 +9600,7 @@ var MigrationFilesystem = class {
9506
9600
  }
9507
9601
  syncFile(temporary);
9508
9602
  renameWithRetrySync(temporary, path);
9509
- syncDirectory(dirname13(path));
9603
+ syncDirectory(dirname14(path));
9510
9604
  } finally {
9511
9605
  rmSync10(temporary, { force: true });
9512
9606
  }
@@ -9531,8 +9625,8 @@ var MigrationFilesystem = class {
9531
9625
  this.journals();
9532
9626
  const stat = lstatSync15(path, { throwIfNoEntry: false });
9533
9627
  if (stat?.isDirectory()) {
9534
- const retained = join26(this.scratchDir, "removed", String(Date.now()) + "-" + Math.random().toString(36).slice(2));
9535
- mkdirSync9(dirname13(retained), { recursive: true, mode: 448 });
9628
+ const retained = join27(this.scratchDir, "removed", String(Date.now()) + "-" + Math.random().toString(36).slice(2));
9629
+ mkdirSync10(dirname14(retained), { recursive: true, mode: 448 });
9536
9630
  this.move(path, retained);
9537
9631
  } else {
9538
9632
  for (const journal of this.journals())
@@ -9542,12 +9636,12 @@ var MigrationFilesystem = class {
9542
9636
  }
9543
9637
  mkdir(path) {
9544
9638
  const missing = [];
9545
- for (let p = path; !existsSync25(p) && p !== dirname13(p); p = dirname13(p))
9639
+ for (let p = path; !existsSync26(p) && p !== dirname14(p); p = dirname14(p))
9546
9640
  missing.push(p);
9547
9641
  for (const p of missing.reverse()) {
9548
9642
  for (const journal of this.journals())
9549
9643
  journal.snapshotDirectory(p);
9550
- mkdirSync9(p, { recursive: true, mode: 448 });
9644
+ mkdirSync10(p, { recursive: true, mode: 448 });
9551
9645
  }
9552
9646
  if (!missing.length)
9553
9647
  for (const journal of this.journals())
@@ -9556,9 +9650,9 @@ var MigrationFilesystem = class {
9556
9650
  };
9557
9651
 
9558
9652
  // packages/workbench-server/dist/infrastructure/migrations/framework/context.js
9559
- import { readFileSync as readFileSync15, realpathSync as realpathSync6 } from "node:fs";
9653
+ import { readFileSync as readFileSync16, realpathSync as realpathSync6 } from "node:fs";
9560
9654
  import { appendFile, mkdir, statfs } from "node:fs/promises";
9561
- import { join as join27 } from "node:path";
9655
+ import { join as join28 } from "node:path";
9562
9656
  async function assertFreeDisk(path, required) {
9563
9657
  const stats = await statfs(path, { bigint: true });
9564
9658
  const available = stats.bavail * stats.bsize;
@@ -9566,10 +9660,10 @@ async function assertFreeDisk(path, required) {
9566
9660
  throw new Error(`Migration requires ${required} free bytes; only ${available} available.`);
9567
9661
  }
9568
9662
  }
9569
- var discardedItemsPath = (scratchDir) => join27(scratchDir, "discarded.json");
9663
+ var discardedItemsPath = (scratchDir) => join28(scratchDir, "discarded.json");
9570
9664
  function readDiscardedItems(scratchDir) {
9571
9665
  try {
9572
- const ids = JSON.parse(readFileSync15(discardedItemsPath(scratchDir), "utf8"));
9666
+ const ids = JSON.parse(readFileSync16(discardedItemsPath(scratchDir), "utf8"));
9573
9667
  if (!Array.isArray(ids) || !ids.every((id) => typeof id === "string"))
9574
9668
  throw new Error("Invalid discarded item list");
9575
9669
  return new Set(ids);
@@ -9581,7 +9675,7 @@ function readDiscardedItems(scratchDir) {
9581
9675
  }
9582
9676
  function createStepContext(requestedPaths, id, description, onProgress) {
9583
9677
  const paths = storagePaths(realpathSync6(requestedPaths.home));
9584
- const scratchDir = join27(paths.migrationWorkPath, id);
9678
+ const scratchDir = join28(paths.migrationWorkPath, id);
9585
9679
  let logging = Promise.resolve();
9586
9680
  let logError;
9587
9681
  const context = {
@@ -9598,7 +9692,7 @@ function createStepContext(requestedPaths, id, description, onProgress) {
9598
9692
  log(message) {
9599
9693
  logging = logging.then(async () => {
9600
9694
  await mkdir(scratchDir, { recursive: true, mode: 448 });
9601
- await appendFile(join27(scratchDir, "step.log"), `${(/* @__PURE__ */ new Date()).toISOString()} ${message}
9695
+ await appendFile(join28(scratchDir, "step.log"), `${(/* @__PURE__ */ new Date()).toISOString()} ${message}
9602
9696
  `, { mode: 384 });
9603
9697
  }).catch((error) => {
9604
9698
  logError = error;
@@ -9618,9 +9712,9 @@ function createStepContext(requestedPaths, id, description, onProgress) {
9618
9712
  }
9619
9713
 
9620
9714
  // packages/workbench-server/dist/infrastructure/migrations/framework/recovery.js
9621
- import { existsSync as existsSync26 } from "node:fs";
9715
+ import { existsSync as existsSync27 } from "node:fs";
9622
9716
  import { copyFile, readFile, rm as rm2 } from "node:fs/promises";
9623
- import { dirname as dirname14, join as join28 } from "node:path";
9717
+ import { dirname as dirname15, join as join29 } from "node:path";
9624
9718
  async function readMigrationFailureReport(paths) {
9625
9719
  try {
9626
9720
  return JSON.parse(await readFile(paths.migrationFailureReportPath, "utf8"));
@@ -9651,8 +9745,8 @@ async function discardFailedItems(home, ids, options = {}) {
9651
9745
  const unknown = ids.filter((id) => !failed.has(id));
9652
9746
  if (!ids.length || unknown.length)
9653
9747
  throw new Error(`Only items reported by the last upgrade attempt can be discarded${unknown.length ? `: ${unknown.join(", ")}` : ""}.`);
9654
- const scratchDir = join28(paths.migrationWorkPath, report.step);
9655
- const dependencyPath = join28(scratchDir, "unit-dependencies.json");
9748
+ const scratchDir = join29(paths.migrationWorkPath, report.step);
9749
+ const dependencyPath = join29(scratchDir, "unit-dependencies.json");
9656
9750
  const dependencies = await pathExists(dependencyPath) ? JSON.parse(await readFile(dependencyPath, "utf8")) : {};
9657
9751
  const chosen = new Set(ids);
9658
9752
  for (const id of chosen)
@@ -9660,7 +9754,7 @@ async function discardFailedItems(home, ids, options = {}) {
9660
9754
  if (failed.has(child))
9661
9755
  chosen.add(child);
9662
9756
  const discarded = readDiscardedItems(scratchDir);
9663
- const detailsPath = join28(scratchDir, "discarded-details.json");
9757
+ const detailsPath = join29(scratchDir, "discarded-details.json");
9664
9758
  const details = await pathExists(detailsPath) ? JSON.parse(await readFile(detailsPath, "utf8")) : [];
9665
9759
  for (const item of report.discardable ?? [])
9666
9760
  if (chosen.has(item.id) && !details.some((saved) => saved.id === item.id))
@@ -9683,27 +9777,27 @@ async function rollbackFailedMigration(home, options = {}) {
9683
9777
  if (entry2?.step.id !== report.step)
9684
9778
  throw new Error(`Upgrade step ${report.step} is not pending.`);
9685
9779
  const { context } = createStepContext(paths, entry2.step.id, entry2.step.description, () => void 0);
9686
- if (existsSync26(join28(context.scratchDir, "verified.json")))
9780
+ if (existsSync27(join29(context.scratchDir, "verified.json")))
9687
9781
  throw new Error("The failed upgrade cannot be rolled back.");
9688
9782
  await entry2.step.rollback?.(context);
9689
- if (existsSync26(join28(context.scratchDir, "rollback")))
9783
+ if (existsSync27(join29(context.scratchDir, "rollback")))
9690
9784
  new RollbackJournal(context.scratchDir).restore();
9691
9785
  const baselineBackup = manifestBackupPath(paths);
9692
- const restoredMarker = join28(context.scratchDir, "manifest-restored.json");
9786
+ const restoredMarker = join29(context.scratchDir, "manifest-restored.json");
9693
9787
  if (!await pathExists(restoredMarker)) {
9694
- const backup2 = !manifest.migrations?.length && await pathExists(baselineBackup) ? baselineBackup : join28(context.scratchDir, "manifest.before.json");
9788
+ const backup2 = !manifest.migrations?.length && await pathExists(baselineBackup) ? baselineBackup : join29(context.scratchDir, "manifest.before.json");
9695
9789
  if (!await pathExists(backup2))
9696
9790
  throw new Error("Missing pre-step manifest rollback snapshot.");
9697
9791
  const temporary = `${paths.manifestPath}.rollback`;
9698
9792
  await copyFile(backup2, temporary);
9699
9793
  syncFile(temporary);
9700
9794
  await retryRename(temporary, paths.manifestPath);
9701
- syncDirectory(dirname14(paths.manifestPath));
9795
+ syncDirectory(dirname15(paths.manifestPath));
9702
9796
  await atomicWriteJson(restoredMarker, {}, 384);
9703
9797
  }
9704
9798
  await rm2(baselineBackup, { force: true });
9705
9799
  await rm2(context.scratchDir, { recursive: true, force: true });
9706
- await rm2(join28(paths.migrationWorkPath, "cleanup-needed.json"), {
9800
+ await rm2(join29(paths.migrationWorkPath, "cleanup-needed.json"), {
9707
9801
  force: true
9708
9802
  });
9709
9803
  await rm2(paths.migrationFailureReportPath, { force: true });