@skaile/workspaces 4.38.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/app-sdk/index.js +1 -1
  3. package/dist/{asset-feeds-UYIFZKKG.js → asset-feeds-HIWT4DVT.js} +24 -96
  4. package/dist/asset-feeds-HIWT4DVT.js.map +1 -0
  5. package/dist/asset-manager/catalog-deployer.js +10 -9
  6. package/dist/asset-manager/index.js +15 -14
  7. package/dist/asset-manager/installer.js +10 -9
  8. package/dist/asset-manager/src/catalog-deployer.d.ts +1 -3
  9. package/dist/asset-manager/src/catalog-deployer.d.ts.map +1 -1
  10. package/dist/asset-manager/src/index.d.ts +6 -8
  11. package/dist/asset-manager/src/index.d.ts.map +1 -1
  12. package/dist/bridge/drivers/claude-sdk.js +25 -13
  13. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  14. package/dist/bridge/drivers/codex.js +11 -10
  15. package/dist/bridge/drivers/codex.js.map +1 -1
  16. package/dist/bridge/drivers/continue.js +12 -11
  17. package/dist/bridge/drivers/continue.js.map +1 -1
  18. package/dist/bridge/drivers/echo.js +4 -4
  19. package/dist/bridge/drivers/gemini.js +6 -6
  20. package/dist/bridge/drivers/goose.js +12 -11
  21. package/dist/bridge/drivers/goose.js.map +1 -1
  22. package/dist/bridge/drivers/omp.js +5 -5
  23. package/dist/bridge/drivers/opencode.js +12 -11
  24. package/dist/bridge/drivers/opencode.js.map +1 -1
  25. package/dist/bridge/drivers/qwen.js +6 -6
  26. package/dist/bridge/index.js +15 -14
  27. package/dist/bridge/src/drivers/claude-sdk.d.ts +4 -0
  28. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  29. package/dist/bridge/src/types.d.ts +7 -0
  30. package/dist/bridge/src/types.d.ts.map +1 -1
  31. package/dist/{chunk-7RC37XFW.js → chunk-22DN3DB2.js} +59 -12
  32. package/dist/chunk-22DN3DB2.js.map +1 -0
  33. package/dist/{chunk-6EMF4UZI.js → chunk-32DMH2GD.js} +8 -8
  34. package/dist/{chunk-6EMF4UZI.js.map → chunk-32DMH2GD.js.map} +1 -1
  35. package/dist/{chunk-A5EDMBFG.js → chunk-43ZBF3WH.js} +5 -8
  36. package/dist/chunk-43ZBF3WH.js.map +1 -0
  37. package/dist/{chunk-J5UF3OOS.js → chunk-53WMBXSL.js} +62 -16
  38. package/dist/chunk-53WMBXSL.js.map +1 -0
  39. package/dist/{chunk-YCMZHL4T.js → chunk-7QMRP6BC.js} +4 -4
  40. package/dist/{chunk-YCMZHL4T.js.map → chunk-7QMRP6BC.js.map} +1 -1
  41. package/dist/{chunk-6VRZ6M2L.js → chunk-7SAWDPUT.js} +3 -3
  42. package/dist/{chunk-6VRZ6M2L.js.map → chunk-7SAWDPUT.js.map} +1 -1
  43. package/dist/chunk-A2ULN3KX.js +40 -0
  44. package/dist/chunk-A2ULN3KX.js.map +1 -0
  45. package/dist/{chunk-DSB6X25D.js → chunk-AG44ZJ7W.js} +3 -3
  46. package/dist/{chunk-DSB6X25D.js.map → chunk-AG44ZJ7W.js.map} +1 -1
  47. package/dist/{chunk-LOHQTTUV.js → chunk-CFL5IJHV.js} +3 -3
  48. package/dist/{chunk-LOHQTTUV.js.map → chunk-CFL5IJHV.js.map} +1 -1
  49. package/dist/{chunk-36ML6SFP.js → chunk-CGJ7B6MZ.js} +4 -4
  50. package/dist/{chunk-36ML6SFP.js.map → chunk-CGJ7B6MZ.js.map} +1 -1
  51. package/dist/{chunk-6X4DHKHP.js → chunk-CT6NQSA4.js} +3 -3
  52. package/dist/{chunk-6X4DHKHP.js.map → chunk-CT6NQSA4.js.map} +1 -1
  53. package/dist/{chunk-5K2VT6E2.js → chunk-DXUQCMVT.js} +3 -3
  54. package/dist/{chunk-5K2VT6E2.js.map → chunk-DXUQCMVT.js.map} +1 -1
  55. package/dist/{chunk-HUNZYTOS.js → chunk-EB6OPURC.js} +3 -3
  56. package/dist/chunk-EB6OPURC.js.map +1 -0
  57. package/dist/{chunk-27DN4DZD.js → chunk-GFPG27HK.js} +12 -14
  58. package/dist/chunk-GFPG27HK.js.map +1 -0
  59. package/dist/{chunk-2EL2PBRC.js → chunk-H4EGUQ7M.js} +3 -3
  60. package/dist/{chunk-2EL2PBRC.js.map → chunk-H4EGUQ7M.js.map} +1 -1
  61. package/dist/{chunk-YQEF36D5.js → chunk-H5G3OYY6.js} +4 -4
  62. package/dist/{chunk-YQEF36D5.js.map → chunk-H5G3OYY6.js.map} +1 -1
  63. package/dist/{chunk-R2U346ER.js → chunk-HD5K3BYW.js} +3 -3
  64. package/dist/{chunk-R2U346ER.js.map → chunk-HD5K3BYW.js.map} +1 -1
  65. package/dist/{chunk-VJNTB4DN.js → chunk-HTBGJCKP.js} +4 -4
  66. package/dist/{chunk-VJNTB4DN.js.map → chunk-HTBGJCKP.js.map} +1 -1
  67. package/dist/{chunk-JEPSP6XK.js → chunk-HWE3FXF4.js} +17 -11
  68. package/dist/chunk-HWE3FXF4.js.map +1 -0
  69. package/dist/{chunk-7FZSABQV.js → chunk-I3ITSUWS.js} +5 -5
  70. package/dist/{chunk-7FZSABQV.js.map → chunk-I3ITSUWS.js.map} +1 -1
  71. package/dist/{chunk-MQ42OYKH.js → chunk-I7Z4FN52.js} +4 -4
  72. package/dist/{chunk-MQ42OYKH.js.map → chunk-I7Z4FN52.js.map} +1 -1
  73. package/dist/{chunk-YNUBJY3L.js → chunk-IDEA6CYI.js} +6 -5
  74. package/dist/chunk-IDEA6CYI.js.map +1 -0
  75. package/dist/{chunk-4WKZEMBD.js → chunk-IGXKUCLI.js} +3 -3
  76. package/dist/{chunk-4WKZEMBD.js.map → chunk-IGXKUCLI.js.map} +1 -1
  77. package/dist/{chunk-HXG6IZSF.js → chunk-JFVEX4G5.js} +6 -6
  78. package/dist/{chunk-HXG6IZSF.js.map → chunk-JFVEX4G5.js.map} +1 -1
  79. package/dist/{chunk-YYH5EVPM.js → chunk-JUXQUZOQ.js} +12 -4
  80. package/dist/{chunk-YYH5EVPM.js.map → chunk-JUXQUZOQ.js.map} +1 -1
  81. package/dist/{chunk-DV47JNI4.js → chunk-KC3OF6B2.js} +3 -3
  82. package/dist/{chunk-DV47JNI4.js.map → chunk-KC3OF6B2.js.map} +1 -1
  83. package/dist/{chunk-7UL2SQQH.js → chunk-KREXWKVX.js} +4 -4
  84. package/dist/{chunk-7UL2SQQH.js.map → chunk-KREXWKVX.js.map} +1 -1
  85. package/dist/{chunk-QWWDDU5Z.js → chunk-LHFZTVIM.js} +23 -24
  86. package/dist/chunk-LHFZTVIM.js.map +1 -0
  87. package/dist/{chunk-YV3YI3TA.js → chunk-MBVNMPG7.js} +4 -4
  88. package/dist/{chunk-YV3YI3TA.js.map → chunk-MBVNMPG7.js.map} +1 -1
  89. package/dist/{chunk-MS2JK4V7.js → chunk-MX7IRKTO.js} +6 -6
  90. package/dist/{chunk-MS2JK4V7.js.map → chunk-MX7IRKTO.js.map} +1 -1
  91. package/dist/{chunk-UDFWBALP.js → chunk-NFGRW3L7.js} +3 -3
  92. package/dist/{chunk-UDFWBALP.js.map → chunk-NFGRW3L7.js.map} +1 -1
  93. package/dist/{chunk-CACCIOQL.js → chunk-ODT7HSLI.js} +16 -15
  94. package/dist/chunk-ODT7HSLI.js.map +1 -0
  95. package/dist/{chunk-QBQITQAM.js → chunk-PV4OBVA3.js} +3 -3
  96. package/dist/{chunk-QBQITQAM.js.map → chunk-PV4OBVA3.js.map} +1 -1
  97. package/dist/{chunk-ORH2BZEM.js → chunk-QCI6D7E4.js} +69 -22
  98. package/dist/chunk-QCI6D7E4.js.map +1 -0
  99. package/dist/{chunk-DIQDYNXZ.js → chunk-QZLWJETK.js} +3 -3
  100. package/dist/{chunk-DIQDYNXZ.js.map → chunk-QZLWJETK.js.map} +1 -1
  101. package/dist/{chunk-PRCUGFXV.js → chunk-RDYI4MML.js} +3 -3
  102. package/dist/{chunk-PRCUGFXV.js.map → chunk-RDYI4MML.js.map} +1 -1
  103. package/dist/{chunk-6KPQDP7P.js → chunk-RP4B4HVX.js} +11 -2
  104. package/dist/chunk-RP4B4HVX.js.map +1 -0
  105. package/dist/{chunk-YCJ3PJNB.js → chunk-RSHMAEK3.js} +8 -14
  106. package/dist/chunk-RSHMAEK3.js.map +1 -0
  107. package/dist/chunk-RVRB27AN.js +64 -0
  108. package/dist/chunk-RVRB27AN.js.map +1 -0
  109. package/dist/{chunk-5NYBY6ZE.js → chunk-TVOODIZE.js} +3 -3
  110. package/dist/{chunk-5NYBY6ZE.js.map → chunk-TVOODIZE.js.map} +1 -1
  111. package/dist/{chunk-BQ3HXZNT.js → chunk-TVYLXZTT.js} +2 -2
  112. package/dist/{chunk-BQ3HXZNT.js.map → chunk-TVYLXZTT.js.map} +1 -1
  113. package/dist/{chunk-EOKAFBJ7.js → chunk-TYUJB336.js} +3 -3
  114. package/dist/{chunk-EOKAFBJ7.js.map → chunk-TYUJB336.js.map} +1 -1
  115. package/dist/{chunk-OLMNDIAU.js → chunk-UVOJSWD2.js} +95 -320
  116. package/dist/chunk-UVOJSWD2.js.map +1 -0
  117. package/dist/{chunk-DOVURNRK.js → chunk-VDJKWKH2.js} +3 -3
  118. package/dist/chunk-VDJKWKH2.js.map +1 -0
  119. package/dist/{chunk-VDBP6Y5M.js → chunk-WCQMXBO5.js} +21 -47
  120. package/dist/chunk-WCQMXBO5.js.map +1 -0
  121. package/dist/{chunk-ILAZDNIA.js → chunk-WOJ4AK3Q.js} +3 -3
  122. package/dist/{chunk-ILAZDNIA.js.map → chunk-WOJ4AK3Q.js.map} +1 -1
  123. package/dist/{chunk-XU7JET5Z.js → chunk-X7MHVL4R.js} +16 -100
  124. package/dist/chunk-X7MHVL4R.js.map +1 -0
  125. package/dist/{chunk-K3IBZ2UZ.js → chunk-XUUYAS3Z.js} +3 -3
  126. package/dist/{chunk-K3IBZ2UZ.js.map → chunk-XUUYAS3Z.js.map} +1 -1
  127. package/dist/{chunk-EETXMMZS.js → chunk-XWLEXD34.js} +3 -3
  128. package/dist/{chunk-EETXMMZS.js.map → chunk-XWLEXD34.js.map} +1 -1
  129. package/dist/{chunk-R5ARWJGE.js → chunk-YOWFUJO7.js} +260 -40
  130. package/dist/chunk-YOWFUJO7.js.map +1 -0
  131. package/dist/{chunk-OQRB7JUS.js → chunk-YV4J7V53.js} +3 -3
  132. package/dist/{chunk-OQRB7JUS.js.map → chunk-YV4J7V53.js.map} +1 -1
  133. package/dist/{chunk-JXT46QFC.js → chunk-ZDKJHQY2.js} +2 -2
  134. package/dist/{chunk-JXT46QFC.js.map → chunk-ZDKJHQY2.js.map} +1 -1
  135. package/dist/cli/index.js +378 -702
  136. package/dist/cli/index.js.map +1 -1
  137. package/dist/cli/src/asset-feeds.d.ts +1 -8
  138. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  139. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  140. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  141. package/dist/cli/src/commands/library-index.d.ts +5 -12
  142. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  143. package/dist/cli/src/commands/manage.d.ts +74 -58
  144. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  145. package/dist/cli/src/commands/show.d.ts +1 -1
  146. package/dist/cli/src/commands/skailify-lib.d.ts +0 -31
  147. package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -1
  148. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  149. package/dist/cli/src/commands/validate.d.ts +20 -2
  150. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  151. package/dist/cli/src/flow-discovery.d.ts +2 -2
  152. package/dist/cli/src/hooks/pre-commit-version.d.ts +1 -1
  153. package/dist/cli/src/skill-walker.d.ts +7 -10
  154. package/dist/cli/src/skill-walker.d.ts.map +1 -1
  155. package/dist/connectors/config.js +6 -5
  156. package/dist/connectors/index.js +24 -23
  157. package/dist/connectors-shared/index.js +2 -2
  158. package/dist/core/discovery.js +1 -1
  159. package/dist/core/index.js +9 -8
  160. package/dist/core/manifest.js +2 -2
  161. package/dist/core/models.js +1 -1
  162. package/dist/core/plugin-groupings.d.ts +2 -0
  163. package/dist/core/plugin-groupings.js +4 -0
  164. package/dist/core/plugin-groupings.js.map +1 -0
  165. package/dist/core/publish-manifest.js +2 -2
  166. package/dist/core/ref.js +1 -1
  167. package/dist/core/runtime-assets.js +6 -5
  168. package/dist/core/src/discovery.d.ts +11 -51
  169. package/dist/core/src/discovery.d.ts.map +1 -1
  170. package/dist/core/src/index.d.ts +3 -2
  171. package/dist/core/src/index.d.ts.map +1 -1
  172. package/dist/core/src/models.d.ts +6 -33
  173. package/dist/core/src/models.d.ts.map +1 -1
  174. package/dist/core/src/plugin-groupings.d.ts +31 -0
  175. package/dist/core/src/plugin-groupings.d.ts.map +1 -0
  176. package/dist/core/src/repo-manager.d.ts.map +1 -1
  177. package/dist/core/src/settings.d.ts +1 -1
  178. package/dist/core/src/workspace-config.d.ts +1 -1
  179. package/dist/core/workspace-config.js +5 -4
  180. package/dist/deploy/index.js +9 -8
  181. package/dist/deploy/index.js.map +1 -1
  182. package/dist/discovery/index.js +6 -5
  183. package/dist/discovery/src/discover.d.ts +9 -25
  184. package/dist/discovery/src/discover.d.ts.map +1 -1
  185. package/dist/discovery/src/index.d.ts +0 -2
  186. package/dist/discovery/src/index.d.ts.map +1 -1
  187. package/dist/discovery/src/source-config.d.ts +13 -9
  188. package/dist/discovery/src/source-config.d.ts.map +1 -1
  189. package/dist/discovery/src/tree-entries.d.ts +6 -11
  190. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  191. package/dist/{ensure-sources-VX63EKY7.js → ensure-sources-G4FXTJDB.js} +18 -17
  192. package/dist/ensure-sources-G4FXTJDB.js.map +1 -0
  193. package/dist/factory-assets/README.md +1 -1
  194. package/dist/factory-assets/connectors/box.js +24 -23
  195. package/dist/factory-assets/connectors/deploy.js +24 -23
  196. package/dist/factory-assets/connectors/devserver.js +24 -23
  197. package/dist/factory-assets/connectors/flow/CONNECTOR.md +6 -1
  198. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  199. package/dist/factory-assets/connectors/flow/adapter.js +24 -23
  200. package/dist/factory-assets/connectors/flow/contract/flow.v2.schema.json +13 -3
  201. package/dist/factory-assets/connectors/flow/contract/index.d.ts +1 -0
  202. package/dist/factory-assets/connectors/flow/contract/index.d.ts.map +1 -1
  203. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts +21 -5
  204. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts.map +1 -1
  205. package/dist/factory-assets/connectors/flow/contract/schema.d.ts +2 -0
  206. package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
  207. package/dist/factory-assets/connectors/flow/contract/sub-flow-output.d.ts +20 -0
  208. package/dist/factory-assets/connectors/flow/contract/sub-flow-output.d.ts.map +1 -0
  209. package/dist/factory-assets/connectors/flow/contract.js +4 -4
  210. package/dist/factory-assets/connectors/flow/engine/bindings.d.ts.map +1 -1
  211. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts +12 -0
  212. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts.map +1 -0
  213. package/dist/factory-assets/connectors/flow/engine/index.d.ts +1 -0
  214. package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
  215. package/dist/factory-assets/connectors/flow/engine/loader.d.ts +3 -3
  216. package/dist/factory-assets/connectors/flow/engine/locate.d.ts +2 -2
  217. package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -1
  218. package/dist/factory-assets/connectors/flow/engine/types.d.ts +0 -2
  219. package/dist/factory-assets/connectors/flow/engine/types.d.ts.map +1 -1
  220. package/dist/factory-assets/connectors/flow/engine.js +13 -12
  221. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
  222. package/dist/factory-assets/connectors/flow/prompt-fragments.js +3 -3
  223. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  224. package/dist/factory-assets/connectors/flow/run-flow.js +26 -25
  225. package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts +6 -5
  226. package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts.map +1 -1
  227. package/dist/factory-assets/connectors/flow.js +24 -23
  228. package/dist/factory-assets/connectors/git.js +24 -23
  229. package/dist/factory-assets/connectors/gmail.js +24 -23
  230. package/dist/factory-assets/connectors/googledrive.js +24 -23
  231. package/dist/factory-assets/connectors/local.js +24 -23
  232. package/dist/factory-assets/connectors/mattermost.js +24 -23
  233. package/dist/factory-assets/connectors/memory.js +24 -23
  234. package/dist/factory-assets/connectors/minio.js +24 -23
  235. package/dist/factory-assets/connectors/postgres.js +24 -23
  236. package/dist/factory-assets/connectors/s3.js +24 -23
  237. package/dist/factory-assets/connectors/sharepoint.js +24 -23
  238. package/dist/factory-assets/connectors/sqlite.js +24 -23
  239. package/dist/factory-assets/connectors/static-server.js +24 -23
  240. package/dist/factory-assets/connectors/tunnel.js +24 -23
  241. package/dist/factory-assets/connectors/webdav.js +24 -23
  242. package/dist/factory-assets/connectors/xstate-store.js +24 -23
  243. package/dist/factory-assets/connectors/xstate.js +24 -23
  244. package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +37 -26
  245. package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +2 -2
  246. package/dist/factory-assets/skills/skailify/SKILL.md +10 -19
  247. package/dist/{flows-PX53XFV7.js → flows-7E2GVW5L.js} +14 -13
  248. package/dist/{flows-PX53XFV7.js.map → flows-7E2GVW5L.js.map} +1 -1
  249. package/dist/{helpers-DF55G2YC.js → helpers-EVPKJXGS.js} +18 -17
  250. package/dist/{helpers-DF55G2YC.js.map → helpers-EVPKJXGS.js.map} +1 -1
  251. package/dist/library/index.js +13 -12
  252. package/dist/library/install.js +2 -2
  253. package/dist/library/src/index.d.ts +1 -1
  254. package/dist/library/src/index.d.ts.map +1 -1
  255. package/dist/library/src/local/db.d.ts.map +1 -1
  256. package/dist/library/src/local/library-manager.d.ts.map +1 -1
  257. package/dist/library/src/local/library.d.ts.map +1 -1
  258. package/dist/library/src/local/local-catalog-source.d.ts +0 -9
  259. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  260. package/dist/library/src/local/schema.d.ts +1 -20
  261. package/dist/library/src/local/schema.d.ts.map +1 -1
  262. package/dist/library/src/remote/remote-catalog-source.d.ts +1 -11
  263. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  264. package/dist/library/src/sync/manifest-writeback.d.ts +5 -5
  265. package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
  266. package/dist/library/src/user-library.d.ts +1 -9
  267. package/dist/library/src/user-library.d.ts.map +1 -1
  268. package/dist/{library-publish-2PNWJJOY.js → library-publish-SBEWWTPM.js} +25 -24
  269. package/dist/library-publish-SBEWWTPM.js.map +1 -0
  270. package/dist/open-library-UAZIGZUQ.js +39 -0
  271. package/dist/{open-library-SUVOMIWZ.js.map → open-library-UAZIGZUQ.js.map} +1 -1
  272. package/dist/paths-U7TA7MTE.js +22 -0
  273. package/dist/{paths-W4LDORQQ.js.map → paths-U7TA7MTE.js.map} +1 -1
  274. package/dist/{plugin-store-D45CREMJ.js → plugin-store-TT45MGQZ.js} +11 -10
  275. package/dist/plugin-store-TT45MGQZ.js.map +1 -0
  276. package/dist/plugins/index.js +1 -1
  277. package/dist/plugins/src/catalog-source.d.ts +4 -55
  278. package/dist/plugins/src/catalog-source.d.ts.map +1 -1
  279. package/dist/plugins/src/index.d.ts +1 -1
  280. package/dist/plugins/src/index.d.ts.map +1 -1
  281. package/dist/{project-RTLVOXUU.js → project-JLD5RCVK.js} +19 -18
  282. package/dist/{project-RTLVOXUU.js.map → project-JLD5RCVK.js.map} +1 -1
  283. package/dist/resolver/index.js +10 -9
  284. package/dist/runner/index.js +35 -34
  285. package/dist/runner/src/compaction/orchestrator.d.ts +2 -1
  286. package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
  287. package/dist/runner/src/compaction-gate.d.ts +13 -0
  288. package/dist/runner/src/compaction-gate.d.ts.map +1 -1
  289. package/dist/runner/src/resource-handler.d.ts +32 -3
  290. package/dist/runner/src/resource-handler.d.ts.map +1 -1
  291. package/dist/runner/src/serve.d.ts.map +1 -1
  292. package/dist/sdk/asset-manager.js +15 -14
  293. package/dist/sdk/bridge.js +15 -14
  294. package/dist/sdk/core.js +9 -8
  295. package/dist/sdk/flow.js +13 -12
  296. package/dist/sdk/index.js +35 -34
  297. package/dist/sdk/index.js.map +1 -1
  298. package/dist/sdk/resolver.js +10 -9
  299. package/dist/sdk/runner.js +35 -34
  300. package/dist/sdk/session.js +2 -2
  301. package/dist/sdk/types.js +1 -1
  302. package/dist/secrets/index.js +2 -18
  303. package/dist/secrets/src/providers/local.d.ts.map +1 -1
  304. package/dist/session/index.js +2 -2
  305. package/dist/{setup-ZA7VZL72.js → setup-PGZM4SOO.js} +25 -24
  306. package/dist/setup-PGZM4SOO.js.map +1 -0
  307. package/dist/skills-7QVYPIXI.js +26 -0
  308. package/dist/{skills-R3RPIPWP.js.map → skills-7QVYPIXI.js.map} +1 -1
  309. package/dist/source-SDZYXVVV.js +40 -0
  310. package/dist/{source-Y5YQ7M53.js.map → source-SDZYXVVV.js.map} +1 -1
  311. package/dist/{source-manifest-publish-RZIJNRIW.js → source-manifest-publish-UDLTYV6Y.js} +26 -25
  312. package/dist/source-manifest-publish-UDLTYV6Y.js.map +1 -0
  313. package/dist/tui/index.js +35 -34
  314. package/dist/tui/index.js.map +1 -1
  315. package/dist/types/index.js +1 -1
  316. package/dist/types/src/events.d.ts +69 -2
  317. package/dist/types/src/events.d.ts.map +1 -1
  318. package/dist/types/src/index.d.ts +2 -2
  319. package/dist/types/src/index.d.ts.map +1 -1
  320. package/dist/types/src/protocol.d.ts +3 -3
  321. package/dist/types/src/protocol.d.ts.map +1 -1
  322. package/dist/types/src/version.d.ts +27 -1
  323. package/dist/types/src/version.d.ts.map +1 -1
  324. package/dist/workspace-plugin/adapters/mcp.js +17 -16
  325. package/dist/workspace-plugin/adapters/omp.js +13 -13
  326. package/dist/workspace-plugin/adapters/omp.js.map +1 -1
  327. package/dist/workspace-plugin/index.js +1 -1
  328. package/dist/workspace-plugin/src/adapters/mcp.d.ts +4 -4
  329. package/dist/workspace-plugin/src/adapters/mcp.d.ts.map +1 -1
  330. package/dist/workspace-plugin/src/adapters/omp.d.ts +2 -2
  331. package/dist/workspace-plugin/src/tools/skills.d.ts +5 -17
  332. package/dist/workspace-plugin/src/tools/skills.d.ts.map +1 -1
  333. package/package.json +7 -1
  334. package/dist/asset-feeds-UYIFZKKG.js.map +0 -1
  335. package/dist/chunk-27DN4DZD.js.map +0 -1
  336. package/dist/chunk-6KPQDP7P.js.map +0 -1
  337. package/dist/chunk-7RC37XFW.js.map +0 -1
  338. package/dist/chunk-A5EDMBFG.js.map +0 -1
  339. package/dist/chunk-CACCIOQL.js.map +0 -1
  340. package/dist/chunk-DOVURNRK.js.map +0 -1
  341. package/dist/chunk-HUNZYTOS.js.map +0 -1
  342. package/dist/chunk-J5UF3OOS.js.map +0 -1
  343. package/dist/chunk-JEPSP6XK.js.map +0 -1
  344. package/dist/chunk-OLMNDIAU.js.map +0 -1
  345. package/dist/chunk-ORH2BZEM.js.map +0 -1
  346. package/dist/chunk-QVZA2MDT.js +0 -81
  347. package/dist/chunk-QVZA2MDT.js.map +0 -1
  348. package/dist/chunk-QWWDDU5Z.js.map +0 -1
  349. package/dist/chunk-R5ARWJGE.js.map +0 -1
  350. package/dist/chunk-VDBP6Y5M.js.map +0 -1
  351. package/dist/chunk-XU7JET5Z.js.map +0 -1
  352. package/dist/chunk-YCJ3PJNB.js.map +0 -1
  353. package/dist/chunk-YNUBJY3L.js.map +0 -1
  354. package/dist/discovery/src/domains.d.ts +0 -149
  355. package/dist/discovery/src/domains.d.ts.map +0 -1
  356. package/dist/ensure-sources-VX63EKY7.js.map +0 -1
  357. package/dist/library-publish-2PNWJJOY.js.map +0 -1
  358. package/dist/open-library-SUVOMIWZ.js +0 -38
  359. package/dist/paths-W4LDORQQ.js +0 -21
  360. package/dist/plugin-store-D45CREMJ.js.map +0 -1
  361. package/dist/setup-ZA7VZL72.js.map +0 -1
  362. package/dist/skills-R3RPIPWP.js +0 -25
  363. package/dist/source-Y5YQ7M53.js +0 -39
  364. package/dist/source-manifest-publish-RZIJNRIW.js.map +0 -1
@@ -1,38 +1,38 @@
1
- import { WorkspacePlugin } from './chunk-BQ3HXZNT.js';
2
- import { buildWorkspaceToolDefs } from './chunk-YCJ3PJNB.js';
3
- import { findAiAssetsRoot } from './chunk-EOKAFBJ7.js';
1
+ import { WorkspacePlugin } from './chunk-TVYLXZTT.js';
2
+ import { buildWorkspaceToolDefs } from './chunk-RSHMAEK3.js';
3
+ import { findAiAssetsRoot } from './chunk-TYUJB336.js';
4
4
  import { WebSocketServerTransport } from './chunk-5LKOAX7I.js';
5
5
  import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
6
6
  import { prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-HCYS7GFP.js';
7
- import { resolveFlowPath } from './chunk-27DN4DZD.js';
8
- import { findAiAssetsRoot as findAiAssetsRoot$1, deployCatalogEntry, undeployCatalogEntry } from './chunk-DOVURNRK.js';
9
- import { ConnectFailureCarryOver, registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-J5UF3OOS.js';
10
- import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, isKnownSecretRef, EnvSecretProvider, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-YQEF36D5.js';
11
- import { EventNormalizer } from './chunk-7UL2SQQH.js';
12
- import { probeResumeTranscript, transcriptStoreForRuntime } from './chunk-5NYBY6ZE.js';
7
+ import { resolveFlowPath } from './chunk-GFPG27HK.js';
8
+ import { findAiAssetsRoot as findAiAssetsRoot$1, deployCatalogEntry, undeployCatalogEntry } from './chunk-VDJKWKH2.js';
9
+ import { ConnectFailureCarryOver, registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-53WMBXSL.js';
10
+ import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, isKnownSecretRef, EnvSecretProvider, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-H5G3OYY6.js';
11
+ import { EventNormalizer } from './chunk-KREXWKVX.js';
12
+ import { probeResumeTranscript, transcriptStoreForRuntime } from './chunk-TVOODIZE.js';
13
13
  import { scopeReconfigureModel } from './chunk-EINLFFP6.js';
14
14
  import { CodexNativeStateUnavailable } from './chunk-LOO5CB5M.js';
15
- import { dispatchCapability } from './chunk-PRCUGFXV.js';
15
+ import { dispatchCapability } from './chunk-RDYI4MML.js';
16
16
  import { classifyClaudeSdkError } from './chunk-XBSQ4KMC.js';
17
17
  import { agentExecRequested } from './chunk-YROR332M.js';
18
- import { toAgentEffort, createDriver, catalogLayer, providerCredentialEnvName, toMergedRegistry, registryCredentialEnv, AI_PROVIDER_PRESETS, AgentDriver } from './chunk-6KPQDP7P.js';
19
- import { loadFlow } from './chunk-7RC37XFW.js';
20
- import { parseFlowDefinition } from './chunk-DIQDYNXZ.js';
21
- import { renderStimulusPrompt } from './chunk-K3IBZ2UZ.js';
22
- import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-YNUBJY3L.js';
23
- import { resolveLibraryDir, resolveSettings, loadProviderRegistry } from './chunk-YV3YI3TA.js';
24
- import { resolveRuntimeAssets } from './chunk-36ML6SFP.js';
18
+ import { toAgentEffort, createDriver, catalogLayer, providerCredentialEnvName, toMergedRegistry, registryCredentialEnv, AI_PROVIDER_PRESETS, AgentDriver } from './chunk-RP4B4HVX.js';
19
+ import { loadFlow } from './chunk-22DN3DB2.js';
20
+ import { parseFlowDefinition } from './chunk-QZLWJETK.js';
21
+ import { renderStimulusPrompt } from './chunk-XUUYAS3Z.js';
22
+ import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-IDEA6CYI.js';
23
+ import { resolveLibraryDir, resolveSettings, loadProviderRegistry } from './chunk-MBVNMPG7.js';
24
+ import { resolveRuntimeAssets } from './chunk-CGJ7B6MZ.js';
25
25
  import { resolveDriverPaths } from './chunk-K5GBV4SA.js';
26
- import { resolveSkWorkspaceConfig, resolveAgentDir, loadMcpServerDeclarations, COMPACTION_DEFAULTS, resolveCompactionThresholdPercent, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration, stageMaterializedSkills, readSkillAllowList, isStagedSkillMarkerFor, unstageSkill, STAGED_SKILL_MARKER } from './chunk-JEPSP6XK.js';
26
+ import { resolveSkWorkspaceConfig, resolveAgentDir, loadMcpServerDeclarations, COMPACTION_DEFAULTS, resolveCompactionThresholdPercent, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration, stageMaterializedSkills, readSkillAllowList, isStagedSkillMarkerFor, unstageSkill, STAGED_SKILL_MARKER } from './chunk-HWE3FXF4.js';
27
27
  import { globalSkaileDir } from './chunk-TLKM4M47.js';
28
- import { withFsDeadline, FsDeadlineError, fsDeadlineMs, parseFrontmatter, tryWithFsDeadline } from './chunk-5K2VT6E2.js';
29
- import { parseAssetRef } from './chunk-A5EDMBFG.js';
28
+ import { withFsDeadline, FsDeadlineError, fsDeadlineMs, parseFrontmatter, tryWithFsDeadline } from './chunk-DXUQCMVT.js';
29
+ import { parseAssetRef } from './chunk-43ZBF3WH.js';
30
30
  import { resolveLogStoreConfig, createLogStoreFromConfig, OnLogBridgeSink, WsLogSink, resolveLogsRetention, enforceLogsRetention } from './chunk-JMKB7IB4.js';
31
31
  import { pickRegistryEntries, registryEntries, resolveEntryBaseUrl, parseModelRef, isEntryEnabled, parseCredentialRef } from './chunk-MJHSLODD.js';
32
32
  import { getLogStore, registerLogStore, createLogger, resetLogStore, isUnwritableStreamError, markStreamBroken, isBrokenPipeError, redactCredentials } from './chunk-BOFL7GIF.js';
33
33
  import { __require } from './chunk-NSBPE2FW.js';
34
34
  import pc from 'picocolors';
35
- import path5, { join, resolve, relative, sep, isAbsolute, basename, dirname } from 'path';
35
+ import path5, { join, resolve, basename, dirname, relative, sep, isAbsolute } from 'path';
36
36
  import { Marked } from 'marked';
37
37
  import { markedTerminal } from 'marked-terminal';
38
38
  import fs4, { readFile, readdir, lstat, stat, rm, unlink, mkdir, writeFile, realpath, rename, open, readlink, mkdtemp } from 'fs/promises';
@@ -3864,6 +3864,176 @@ async function readMountRange(targetPath, range, authoritativeSize) {
3864
3864
  });
3865
3865
  }
3866
3866
  }
3867
+ var MOUNT_WRITE_MAX_CHUNK_BYTES = 8 * 1024 * 1024;
3868
+ var WRITE_RANGE_PARTIAL_TTL_MS = 60 * 60 * 1e3;
3869
+ var PARTIAL_SUFFIX = ".skaile-partial";
3870
+ var UPLOAD_ID_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
3871
+ var PARTIAL_NAME_MAX_BYTES = 120;
3872
+ function writeRangePartialPath(targetPath, uploadId) {
3873
+ const name = basename(targetPath);
3874
+ const stem = Buffer.byteLength(name) > PARTIAL_NAME_MAX_BYTES ? createHash("sha256").update(name).digest("hex").slice(0, 32) : name;
3875
+ return join(dirname(targetPath), `.${stem}.${uploadId}${PARTIAL_SUFFIX}`);
3876
+ }
3877
+ var partialLocks = /* @__PURE__ */ new Map();
3878
+ var transferOutcomes = /* @__PURE__ */ new Map();
3879
+ function recordOutcome(partialPath, outcome, size) {
3880
+ const now = Date.now();
3881
+ for (const [key, entry] of transferOutcomes) {
3882
+ if (now - entry.at > WRITE_RANGE_PARTIAL_TTL_MS) transferOutcomes.delete(key);
3883
+ }
3884
+ transferOutcomes.set(partialPath, { outcome, size, at: now });
3885
+ }
3886
+ async function withPartialLock(key, fn) {
3887
+ const previous = partialLocks.get(key) ?? Promise.resolve();
3888
+ const run = previous.catch(() => {
3889
+ }).then(fn);
3890
+ partialLocks.set(key, run);
3891
+ try {
3892
+ return await run;
3893
+ } finally {
3894
+ if (partialLocks.get(key) === run) partialLocks.delete(key);
3895
+ }
3896
+ }
3897
+ function invalidRange(message) {
3898
+ return new ResourceOperationError(`Invalid write range: ${message}`, "invalid_range");
3899
+ }
3900
+ function parseWriteRange(options, content) {
3901
+ const { uploadId, offset, size, abort } = options ?? {};
3902
+ if (typeof uploadId !== "string" || !UPLOAD_ID_PATTERN.test(uploadId)) {
3903
+ throw invalidRange("uploadId must be 1-64 letters, digits, '-' or '_'");
3904
+ }
3905
+ if (abort === true) return { uploadId, offset: 0, size: 0, abort: true, chunk: Buffer.alloc(0) };
3906
+ for (const [name, value] of [
3907
+ ["offset", offset],
3908
+ ["size", size]
3909
+ ]) {
3910
+ if (!(Number.isSafeInteger(value) && value >= 0)) {
3911
+ throw invalidRange(`${name} must be a non-negative integer`);
3912
+ }
3913
+ }
3914
+ const body = typeof content === "object" && content !== null ? content : void 0;
3915
+ if (body?.encoding !== "binary" || typeof body.data !== "string") {
3916
+ throw invalidRange('the chunk must be base64 content with encoding "binary"');
3917
+ }
3918
+ if (body.data.length > Math.ceil(MOUNT_WRITE_MAX_CHUNK_BYTES / 3) * 4) {
3919
+ throw invalidRange(`a chunk holds at most ${MOUNT_WRITE_MAX_CHUNK_BYTES} bytes`);
3920
+ }
3921
+ const chunk = Buffer.from(body.data, "base64");
3922
+ if (chunk.length > MOUNT_WRITE_MAX_CHUNK_BYTES) {
3923
+ throw invalidRange(`a chunk holds at most ${MOUNT_WRITE_MAX_CHUNK_BYTES} bytes`);
3924
+ }
3925
+ if (offset + chunk.length > size) {
3926
+ throw invalidRange(
3927
+ `a chunk of ${chunk.length} bytes at offset ${offset} runs past the stated size of ${size}`
3928
+ );
3929
+ }
3930
+ if (chunk.length === 0 && offset < size) {
3931
+ throw invalidRange(
3932
+ `an empty chunk at offset ${offset} cannot complete a file of ${size} bytes`
3933
+ );
3934
+ }
3935
+ return { uploadId, offset, size, abort: false, chunk };
3936
+ }
3937
+ async function sweepStalePartials(targetPath, keep) {
3938
+ const dir = dirname(targetPath);
3939
+ try {
3940
+ const names = await withFsDeadline(`readdir ${dir}`, () => readdir(dir));
3941
+ const now = Date.now();
3942
+ for (const name of names) {
3943
+ if (!name.startsWith(".") || !name.endsWith(PARTIAL_SUFFIX)) continue;
3944
+ const abs = join(dir, name);
3945
+ if (abs === keep) continue;
3946
+ const st = await withFsDeadline(`lstat ${abs}`, () => lstat(abs));
3947
+ if (st.isFile() && now - st.mtimeMs > WRITE_RANGE_PARTIAL_TTL_MS) {
3948
+ await withFsDeadline(`unlink ${abs}`, () => unlink(abs));
3949
+ }
3950
+ }
3951
+ } catch {
3952
+ }
3953
+ }
3954
+ async function openPartial(partialPath, start) {
3955
+ if (start) await withFsDeadline(`rm ${partialPath}`, () => rm(partialPath, { force: true }));
3956
+ const flags = start ? constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW : constants.O_RDWR | constants.O_NOFOLLOW;
3957
+ const opening = open(partialPath, flags);
3958
+ try {
3959
+ return await withFsDeadline(`open ${partialPath}`, () => opening);
3960
+ } catch (err) {
3961
+ void opening.then((h) => h.close()).catch(() => {
3962
+ });
3963
+ throw err;
3964
+ }
3965
+ }
3966
+ async function writeRangeChunk(targetPath, options, content) {
3967
+ const req = parseWriteRange(options, content);
3968
+ const partialPath = writeRangePartialPath(targetPath, req.uploadId);
3969
+ return withPartialLock(partialPath, async () => {
3970
+ const known = transferOutcomes.get(partialPath);
3971
+ if (req.abort) {
3972
+ await withFsDeadline(`rm ${partialPath}`, () => rm(partialPath, { force: true }));
3973
+ transferOutcomes.delete(partialPath);
3974
+ return { received: 0, size: 0, complete: false };
3975
+ }
3976
+ const received = req.offset + req.chunk.length;
3977
+ if (req.offset > 0 && known?.outcome === "done") {
3978
+ if (received === req.size && known.size === req.size) {
3979
+ return { received, size: req.size, complete: true };
3980
+ }
3981
+ throw invalidRange(`transfer "${req.uploadId}" is already complete`);
3982
+ }
3983
+ if (req.offset > 0 && known?.outcome === "stalled") {
3984
+ throw invalidRange(
3985
+ `transfer "${req.uploadId}" stalled on a slow mount; start again at offset 0`
3986
+ );
3987
+ }
3988
+ const parentDir = dirname(targetPath);
3989
+ await withFsDeadline(`mkdir ${parentDir}`, () => mkdir(parentDir, { recursive: true }));
3990
+ if (req.offset === 0) await sweepStalePartials(targetPath, partialPath);
3991
+ let fh;
3992
+ try {
3993
+ fh = await openPartial(partialPath, req.offset === 0);
3994
+ if (req.offset === 0) transferOutcomes.delete(partialPath);
3995
+ } catch (err) {
3996
+ const code = err.code;
3997
+ if (code === "ELOOP") throw invalidRange("the partial file is not a regular file");
3998
+ if (code !== "ENOENT" || req.offset === 0) throw err;
3999
+ throw invalidRange(`no transfer "${req.uploadId}" is in progress; start again at offset 0`);
4000
+ }
4001
+ try {
4002
+ const st = await withFsDeadline(`fstat ${partialPath}`, () => fh.stat());
4003
+ if (!st.isFile()) throw invalidRange("the partial file is not a regular file");
4004
+ if (st.size !== req.offset) {
4005
+ throw invalidRange(`expected offset ${st.size}, got ${req.offset}`);
4006
+ }
4007
+ await withFsDeadline(`write ${partialPath} @${req.offset}+${req.chunk.length}`, async () => {
4008
+ let done = 0;
4009
+ while (done < req.chunk.length) {
4010
+ const { bytesWritten } = await fh.write(
4011
+ req.chunk,
4012
+ done,
4013
+ req.chunk.length - done,
4014
+ req.offset + done
4015
+ );
4016
+ done += bytesWritten;
4017
+ }
4018
+ });
4019
+ } catch (err) {
4020
+ if (err instanceof FsDeadlineError) {
4021
+ void fh.close().catch(() => {
4022
+ });
4023
+ recordOutcome(partialPath, "stalled", req.size);
4024
+ } else {
4025
+ await fh.close().catch(() => {
4026
+ });
4027
+ }
4028
+ throw err;
4029
+ }
4030
+ await withFsDeadline(`close ${partialPath}`, () => fh.close());
4031
+ if (received < req.size) return { received, size: req.size, complete: false };
4032
+ await withFsDeadline(`rename ${partialPath}`, () => rename(partialPath, targetPath));
4033
+ recordOutcome(partialPath, "done", req.size);
4034
+ return { received, size: req.size, complete: true };
4035
+ });
4036
+ }
3867
4037
  var MOUNT_STAT_MAX_ENTRIES = 5e4;
3868
4038
  var MOUNT_STAT_BUDGET_MS = 1e4;
3869
4039
  var MOUNT_STAT_CONCURRENCY = 16;
@@ -4094,6 +4264,11 @@ async function handleMountResourceRequest(command, manager, emit) {
4094
4264
  data = true;
4095
4265
  break;
4096
4266
  }
4267
+ case "write_range": {
4268
+ if (rel === "") throw new Error("A file path is required");
4269
+ data = await writeRangeChunk(targetPath, options, content);
4270
+ break;
4271
+ }
4097
4272
  case "mkdir": {
4098
4273
  if (rel === "") throw new Error("A folder path is required");
4099
4274
  const parentDir = dirname(targetPath);
@@ -4216,27 +4391,34 @@ async function readDanglingLink(absPath) {
4216
4391
  async function handleSessionRootResourceRequest(command, rootDir, emit) {
4217
4392
  const { requestId, connectorId, operation, path: reqPath, content } = command;
4218
4393
  try {
4219
- if (operation !== "write" && operation !== "delete") {
4394
+ if (operation !== "write" && operation !== "write_range" && operation !== "delete") {
4220
4395
  throw unsupportedOperation(operation, "the session root");
4221
4396
  }
4397
+ const access = operation === "delete" ? "delete" : "write";
4222
4398
  if (!reqPath) throw new Error("A path is required for the session root");
4223
4399
  if (isAbsolute(reqPath)) throw new Error("Absolute paths are not allowed for the session root");
4224
4400
  const root = resolve(rootDir);
4225
4401
  const targetPath = resolve(root, reqPath);
4226
4402
  if (!isWithin2(root, targetPath)) throw new Error("Path traversal outside the session root");
4227
4403
  const rel = relative(root, targetPath).split(sep).join("/");
4228
- if (!isSessionRootPathAllowed(rel, operation)) {
4404
+ if (!isSessionRootPathAllowed(rel, access)) {
4229
4405
  throw new Error(
4230
4406
  `Path "${rel}" is not writable in the session root \u2014 allowed: ${[...SESSION_ROOT_WRITABLE_FILES, ...SESSION_ROOT_WRITABLE_DIRS.map((d) => `${d}/**`)].join(", ")}`
4231
4407
  );
4232
4408
  }
4233
4409
  const realRoot = await withFsDeadline(`realpath ${root}`, () => realpath(root));
4234
- const onDisk = operation === "write" ? await resolveOnDisk(targetPath) : join(await resolveOnDisk(dirname(targetPath)), basename(targetPath));
4235
- if (!isWithin2(realRoot, operation === "write" ? onDisk : dirname(onDisk))) {
4410
+ const onDisk = access === "write" ? await resolveOnDisk(targetPath) : join(await resolveOnDisk(dirname(targetPath)), basename(targetPath));
4411
+ if (!isWithin2(realRoot, access === "write" ? onDisk : dirname(onDisk))) {
4236
4412
  throw new Error("Path escapes the session root through a symlink");
4237
4413
  }
4238
4414
  let data = true;
4239
- if (operation === "write") {
4415
+ if (operation === "write_range") {
4416
+ data = await writeRangeChunk(
4417
+ onDisk,
4418
+ command.options,
4419
+ content
4420
+ );
4421
+ } else if (operation === "write") {
4240
4422
  const parentDir = dirname(onDisk);
4241
4423
  await withFsDeadline(`mkdir ${parentDir}`, () => mkdir(parentDir, { recursive: true }));
4242
4424
  const writeContent = typeof content === "string" ? content : content?.data ?? "";
@@ -4918,12 +5100,23 @@ async function claimDriverForCompaction(deps) {
4918
5100
  deps.gate.settle(hold);
4919
5101
  };
4920
5102
  const timeoutMs = deps.timeoutMs ?? compactionTurnWaitMs();
4921
- if (await raceDeadline(deps.awaitClaimedTurns(), timeoutMs) === "opened") return release2;
4922
- release2();
4923
- deps.log(
4924
- `[serve] compaction skipped: a turn still held the driver after ${Math.round(timeoutMs / 1e3)}s`
4925
- );
4926
- return null;
5103
+ if (await raceDeadline(deps.awaitClaimedTurns(), timeoutMs) !== "opened") {
5104
+ release2();
5105
+ deps.log(
5106
+ `[serve] compaction skipped: a turn still held the driver after ${Math.round(timeoutMs / 1e3)}s`
5107
+ );
5108
+ return null;
5109
+ }
5110
+ if (deps.isSwapping?.()) {
5111
+ release2();
5112
+ deps.log("[serve] compaction skipped: a driver swap is pending");
5113
+ return null;
5114
+ }
5115
+ const endTurn = deps.claimTurnSlot?.();
5116
+ return () => {
5117
+ endTurn?.();
5118
+ release2();
5119
+ };
4927
5120
  }
4928
5121
  var TURN_COMPACTION_YIELD_ATTEMPTS = 3;
4929
5122
  async function beginTurnClearOfCompaction(deps, maxAttempts = TURN_COMPACTION_YIELD_ATTEMPTS) {
@@ -5821,6 +6014,11 @@ function compactionTimeoutMs() {
5821
6014
  const raw = Number(process.env.SKAILE_COMPACTION_TIMEOUT_MS);
5822
6015
  return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_COMPACTION_TIMEOUT_MS;
5823
6016
  }
6017
+ var DEFAULT_COMPACTION_INACTIVITY_MS = 3 * 6e4;
6018
+ function compactionInactivityMs() {
6019
+ const raw = Number(process.env.SKAILE_COMPACTION_INACTIVITY_MS);
6020
+ return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_COMPACTION_INACTIVITY_MS;
6021
+ }
5824
6022
  var RETRYABLE_ERROR_CODES = /* @__PURE__ */ new Set(["timeout", "unknown"]);
5825
6023
  var RETRY_FOCUS_DIRECTIVE = `The previous attempt to write this summary did not finish in time, most likely
5826
6024
  because it ran long. Be economical: compress aggressively, and drop low-value
@@ -6096,7 +6294,8 @@ var CompactionOrchestrator = class {
6096
6294
  * thing that separates a genuinely empty model response from a turn that was
6097
6295
  * settled by something other than the model, which resolves in milliseconds.
6098
6296
  *
6099
- * The call is bounded by {@link compactionTimeoutMs}; on expiry the turn is
6297
+ * The call is bounded by {@link compactionInactivityMs} of driver silence and
6298
+ * by the {@link compactionTimeoutMs} ceiling; on either expiry the turn is
6100
6299
  * aborted and `timedOut` is returned so the caller can record a classified
6101
6300
  * `timeout` rather than wait out the driver's much longer stall watchdog.
6102
6301
  */
@@ -6104,7 +6303,10 @@ var CompactionOrchestrator = class {
6104
6303
  let summaryText = "";
6105
6304
  let sawDeltas = false;
6106
6305
  const capturedMessages = /* @__PURE__ */ new WeakSet();
6306
+ let rearmInactivity = () => {
6307
+ };
6107
6308
  const captureHandler = (raw) => {
6309
+ rearmInactivity();
6108
6310
  const event = raw;
6109
6311
  if (event.type === "text") {
6110
6312
  summaryText += event.content ?? "";
@@ -6144,23 +6346,36 @@ var CompactionOrchestrator = class {
6144
6346
  let promptError = null;
6145
6347
  let timedOut = false;
6146
6348
  let timer;
6349
+ let idleTimer;
6147
6350
  const startedAt = Date.now();
6148
6351
  const timeoutMs = compactionTimeoutMs();
6352
+ const inactivityMs = compactionInactivityMs();
6149
6353
  try {
6150
- this.driver.on("agent-event", captureHandler);
6151
- const running = this.driver.prompt(prompt);
6152
6354
  const expiry = new Promise((resolve4) => {
6153
6355
  timer = setTimeout(() => resolve4("expired"), timeoutMs);
6356
+ let lastEventAt = Date.now();
6357
+ const check = () => {
6358
+ const lastSeen = Math.max(lastEventAt, this.driver.lastActivityAt?.() ?? 0);
6359
+ const idleMs = Date.now() - lastSeen;
6360
+ if (idleMs >= inactivityMs) resolve4("stalled");
6361
+ else idleTimer = setTimeout(check, inactivityMs - idleMs);
6362
+ };
6363
+ rearmInactivity = () => {
6364
+ lastEventAt = Date.now();
6365
+ };
6366
+ idleTimer = setTimeout(check, inactivityMs);
6154
6367
  });
6368
+ this.driver.on("agent-event", captureHandler);
6369
+ const running = this.driver.prompt(prompt);
6155
6370
  const outcome = await Promise.race([running.then(() => "settled"), expiry]);
6156
- if (outcome === "expired") {
6371
+ if (outcome !== "settled") {
6157
6372
  timedOut = true;
6158
6373
  const settled = running.then(
6159
6374
  () => void 0,
6160
6375
  () => void 0
6161
6376
  );
6162
6377
  promptError = new Error(
6163
- `Compaction prompt did not complete within ${timeoutMs}ms; the turn was aborted.`
6378
+ outcome === "stalled" ? `Compaction prompt produced no output for ${inactivityMs}ms; the turn was aborted.` : `Compaction prompt did not complete within ${timeoutMs}ms; the turn was aborted.`
6164
6379
  );
6165
6380
  const aborted = this.driver.abort().catch((abortErr) => {
6166
6381
  this.opts.onLog?.(`[compaction] abort after timeout failed: ${String(abortErr)}`);
@@ -6177,6 +6392,9 @@ var CompactionOrchestrator = class {
6177
6392
  promptError = err;
6178
6393
  } finally {
6179
6394
  clearTimeout(timer);
6395
+ clearTimeout(idleTimer);
6396
+ rearmInactivity = () => {
6397
+ };
6180
6398
  this.driver.removeListener("agent-event", captureHandler);
6181
6399
  }
6182
6400
  return { summaryText, promptError, elapsedMs: Date.now() - startedAt, timedOut };
@@ -9749,6 +9967,8 @@ async function startAgentServer(opts) {
9749
9967
  claimDriver: (trigger) => claimDriverForCompaction({
9750
9968
  gate: compactionGate,
9751
9969
  awaitClaimedTurns: () => driverSwapGate.awaitActiveTurn(),
9970
+ isSwapping: () => driverSwapGate.isSwapping(),
9971
+ claimTurnSlot: () => driverSwapGate.beginTurn(),
9752
9972
  log,
9753
9973
  timeoutMs: compactionTurnWaitFor(trigger)
9754
9974
  }),
@@ -11710,6 +11930,6 @@ function touchSession(state) {
11710
11930
  return { ...state, updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
11711
11931
  }
11712
11932
 
11713
- export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CONNECTOR_MUTATE_NOT_READY, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_READ_MAX_CHUNK_BYTES, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, capabilitySignatureInputs, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, driverActiveAfterTurnEnd, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowRunDrivesTurns, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, reconnectedRunNeedsAgentTurn, recreateKeepingLiveFlows, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, restoredRunHasWorkToResume, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, supportsLiveToolUpdates, takeRunnerWsAuthToken, toActiveFlowTarget, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile };
11714
- //# sourceMappingURL=chunk-R5ARWJGE.js.map
11715
- //# sourceMappingURL=chunk-R5ARWJGE.js.map
11933
+ export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CONNECTOR_MUTATE_NOT_READY, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_READ_MAX_CHUNK_BYTES, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MOUNT_WRITE_MAX_CHUNK_BYTES, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WRITE_RANGE_PARTIAL_TTL_MS, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, capabilitySignatureInputs, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, driverActiveAfterTurnEnd, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowRunDrivesTurns, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, reconnectedRunNeedsAgentTurn, recreateKeepingLiveFlows, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, restoredRunHasWorkToResume, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, supportsLiveToolUpdates, takeRunnerWsAuthToken, toActiveFlowTarget, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile, writeRangeChunk, writeRangePartialPath };
11934
+ //# sourceMappingURL=chunk-YOWFUJO7.js.map
11935
+ //# sourceMappingURL=chunk-YOWFUJO7.js.map