@skaile/workspaces 5.6.1 → 5.8.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 (428) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/README.md +4 -2
  3. package/dist/app-sdk/index.js +1 -1
  4. package/dist/{asset-feeds-LU7NHOAP.js → asset-feeds-EYRZR4K5.js} +55 -31
  5. package/dist/asset-feeds-EYRZR4K5.js.map +1 -0
  6. package/dist/asset-manager/catalog-deployer.js +10 -10
  7. package/dist/asset-manager/index.js +16 -16
  8. package/dist/asset-manager/installer.js +12 -12
  9. package/dist/asset-manager/renderers.js +11 -11
  10. package/dist/asset-manager/src/index.d.ts +364 -30
  11. package/dist/asset-manager/src/index.d.ts.map +1 -1
  12. package/dist/asset-manager/src/install-agent.d.ts +11 -0
  13. package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
  14. package/dist/asset-manager/src/installer.d.ts +6 -3
  15. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  16. package/dist/bridge/drivers/claude-sdk.js +148 -212
  17. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  18. package/dist/bridge/drivers/codex.js +91 -67
  19. package/dist/bridge/drivers/codex.js.map +1 -1
  20. package/dist/bridge/drivers/continue.js +16 -17
  21. package/dist/bridge/drivers/continue.js.map +1 -1
  22. package/dist/bridge/drivers/echo.js +4 -4
  23. package/dist/bridge/drivers/gemini.js +8 -8
  24. package/dist/bridge/drivers/goose.js +16 -17
  25. package/dist/bridge/drivers/goose.js.map +1 -1
  26. package/dist/bridge/drivers/omp.js +68 -104
  27. package/dist/bridge/drivers/omp.js.map +1 -1
  28. package/dist/bridge/drivers/opencode.js +16 -17
  29. package/dist/bridge/drivers/opencode.js.map +1 -1
  30. package/dist/bridge/drivers/qwen.js +8 -8
  31. package/dist/bridge/index.js +17 -18
  32. package/dist/bridge/src/codex/managed-driver.d.ts +13 -10
  33. package/dist/bridge/src/codex/managed-driver.d.ts.map +1 -1
  34. package/dist/bridge/src/drivers/_subprocess-cli.d.ts +12 -2
  35. package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +1 -1
  36. package/dist/bridge/src/drivers/claude-sdk.d.ts +37 -62
  37. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  38. package/dist/bridge/src/drivers/codex.d.ts +26 -10
  39. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  40. package/dist/bridge/src/drivers/continue.d.ts +2 -2
  41. package/dist/bridge/src/drivers/continue.d.ts.map +1 -1
  42. package/dist/bridge/src/drivers/gemini.d.ts +2 -2
  43. package/dist/bridge/src/drivers/gemini.d.ts.map +1 -1
  44. package/dist/bridge/src/drivers/goose.d.ts +2 -2
  45. package/dist/bridge/src/drivers/goose.d.ts.map +1 -1
  46. package/dist/bridge/src/drivers/omp.d.ts +24 -35
  47. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  48. package/dist/bridge/src/drivers/opencode.d.ts +2 -2
  49. package/dist/bridge/src/drivers/opencode.d.ts.map +1 -1
  50. package/dist/bridge/src/drivers/recovery-policy.d.ts +79 -0
  51. package/dist/bridge/src/drivers/recovery-policy.d.ts.map +1 -0
  52. package/dist/bridge/src/index.d.ts +1 -0
  53. package/dist/bridge/src/index.d.ts.map +1 -1
  54. package/dist/bridge/src/reconfigure-ledger.d.ts +117 -0
  55. package/dist/bridge/src/reconfigure-ledger.d.ts.map +1 -0
  56. package/dist/bridge/src/types.d.ts +57 -6
  57. package/dist/bridge/src/types.d.ts.map +1 -1
  58. package/dist/{chunk-OLLAQLFJ.js → chunk-2FRUUDZY.js} +5 -5
  59. package/dist/{chunk-OLLAQLFJ.js.map → chunk-2FRUUDZY.js.map} +1 -1
  60. package/dist/{chunk-SDFROXSA.js → chunk-2LWYNQK7.js} +3 -3
  61. package/dist/{chunk-SDFROXSA.js.map → chunk-2LWYNQK7.js.map} +1 -1
  62. package/dist/{chunk-TZCQ7ZWQ.js → chunk-36AFURKZ.js} +10 -11
  63. package/dist/chunk-36AFURKZ.js.map +1 -0
  64. package/dist/{chunk-MX3UQXLU.js → chunk-4MQS7CAF.js} +256 -92
  65. package/dist/chunk-4MQS7CAF.js.map +1 -0
  66. package/dist/{chunk-45VFGT7A.js → chunk-4PTSR4UU.js} +3 -3
  67. package/dist/{chunk-45VFGT7A.js.map → chunk-4PTSR4UU.js.map} +1 -1
  68. package/dist/{chunk-VX3INFBA.js → chunk-6GRX5L6A.js} +5 -5
  69. package/dist/{chunk-VX3INFBA.js.map → chunk-6GRX5L6A.js.map} +1 -1
  70. package/dist/{chunk-NFGRW3L7.js → chunk-7RGTAEG6.js} +3 -3
  71. package/dist/{chunk-NFGRW3L7.js.map → chunk-7RGTAEG6.js.map} +1 -1
  72. package/dist/{chunk-5B5IZVEP.js → chunk-AWQYXZVG.js} +15 -6
  73. package/dist/chunk-AWQYXZVG.js.map +1 -0
  74. package/dist/{chunk-XBSQ4KMC.js → chunk-B4X2N7JQ.js} +205 -3
  75. package/dist/chunk-B4X2N7JQ.js.map +1 -0
  76. package/dist/{chunk-FRHE7FFB.js → chunk-B6GIW55K.js} +5 -3
  77. package/dist/chunk-B6GIW55K.js.map +1 -0
  78. package/dist/{chunk-LLKKLKZJ.js → chunk-BJNUNQAW.js} +3 -3
  79. package/dist/{chunk-LLKKLKZJ.js.map → chunk-BJNUNQAW.js.map} +1 -1
  80. package/dist/{chunk-7ZHLYXTI.js → chunk-BTE2V4IW.js} +3 -3
  81. package/dist/{chunk-7ZHLYXTI.js.map → chunk-BTE2V4IW.js.map} +1 -1
  82. package/dist/{chunk-ZBBM6O6P.js → chunk-CGT45WN7.js} +3 -3
  83. package/dist/{chunk-ZBBM6O6P.js.map → chunk-CGT45WN7.js.map} +1 -1
  84. package/dist/{chunk-47ZD34KB.js → chunk-CIFS5K6T.js} +3 -3
  85. package/dist/{chunk-47ZD34KB.js.map → chunk-CIFS5K6T.js.map} +1 -1
  86. package/dist/{chunk-BTISGSK4.js → chunk-CKQEIY43.js} +4 -4
  87. package/dist/{chunk-BTISGSK4.js.map → chunk-CKQEIY43.js.map} +1 -1
  88. package/dist/{chunk-KXTO7HON.js → chunk-EAZECHPM.js} +3 -3
  89. package/dist/{chunk-KXTO7HON.js.map → chunk-EAZECHPM.js.map} +1 -1
  90. package/dist/{chunk-VKSXST23.js → chunk-EF7NPDDU.js} +4 -4
  91. package/dist/{chunk-VKSXST23.js.map → chunk-EF7NPDDU.js.map} +1 -1
  92. package/dist/chunk-EPBKISS5.js +84 -0
  93. package/dist/chunk-EPBKISS5.js.map +1 -0
  94. package/dist/{chunk-VJENKWXF.js → chunk-F2EKONM7.js} +3 -3
  95. package/dist/{chunk-VJENKWXF.js.map → chunk-F2EKONM7.js.map} +1 -1
  96. package/dist/{chunk-DMLDYFDS.js → chunk-F3RDEH5U.js} +7 -4
  97. package/dist/chunk-F3RDEH5U.js.map +1 -0
  98. package/dist/{chunk-UAP2XHRF.js → chunk-FTJJO3EM.js} +39 -29
  99. package/dist/chunk-FTJJO3EM.js.map +1 -0
  100. package/dist/{chunk-2GRB5ITE.js → chunk-FVJK4QWM.js} +4 -4
  101. package/dist/{chunk-2GRB5ITE.js.map → chunk-FVJK4QWM.js.map} +1 -1
  102. package/dist/{chunk-AOAZCSDI.js → chunk-FZNG4V4J.js} +16 -30
  103. package/dist/chunk-FZNG4V4J.js.map +1 -0
  104. package/dist/{chunk-BF33SCLY.js → chunk-GB7WDMH2.js} +4 -4
  105. package/dist/{chunk-BF33SCLY.js.map → chunk-GB7WDMH2.js.map} +1 -1
  106. package/dist/{chunk-NARITJS2.js → chunk-GCICGXDD.js} +3 -3
  107. package/dist/{chunk-NARITJS2.js.map → chunk-GCICGXDD.js.map} +1 -1
  108. package/dist/{chunk-PA7WLID3.js → chunk-GTILM2CI.js} +56 -5
  109. package/dist/chunk-GTILM2CI.js.map +1 -0
  110. package/dist/{chunk-WIHQWVWL.js → chunk-GXXFLBUQ.js} +26 -27
  111. package/dist/chunk-GXXFLBUQ.js.map +1 -0
  112. package/dist/{chunk-PTO2YDDG.js → chunk-H7QUDDKH.js} +1337 -168
  113. package/dist/chunk-H7QUDDKH.js.map +1 -0
  114. package/dist/{chunk-I4QBZLOR.js → chunk-HG34RNTK.js} +7 -13
  115. package/dist/chunk-HG34RNTK.js.map +1 -0
  116. package/dist/{chunk-65EYRFZJ.js → chunk-HYDRDNKN.js} +10 -6
  117. package/dist/chunk-HYDRDNKN.js.map +1 -0
  118. package/dist/{chunk-4GNJELPH.js → chunk-I6NLLJHZ.js} +2 -2
  119. package/dist/{chunk-4GNJELPH.js.map → chunk-I6NLLJHZ.js.map} +1 -1
  120. package/dist/{chunk-VSQFGU5D.js → chunk-ILFGVSTJ.js} +3 -3
  121. package/dist/{chunk-VSQFGU5D.js.map → chunk-ILFGVSTJ.js.map} +1 -1
  122. package/dist/{chunk-2XFUXGV6.js → chunk-IONAUNWB.js} +3 -3
  123. package/dist/{chunk-2XFUXGV6.js.map → chunk-IONAUNWB.js.map} +1 -1
  124. package/dist/{chunk-CT6NQSA4.js → chunk-ISHJITXJ.js} +3 -3
  125. package/dist/{chunk-CT6NQSA4.js.map → chunk-ISHJITXJ.js.map} +1 -1
  126. package/dist/chunk-IZCR27MU.js +60 -0
  127. package/dist/chunk-IZCR27MU.js.map +1 -0
  128. package/dist/{chunk-2W4LBLIN.js → chunk-JAKOMFC6.js} +68 -20
  129. package/dist/chunk-JAKOMFC6.js.map +1 -0
  130. package/dist/{chunk-MFHKHXDE.js → chunk-L5VSIPQD.js} +5 -5
  131. package/dist/chunk-L5VSIPQD.js.map +1 -0
  132. package/dist/{chunk-RGXVQZOV.js → chunk-LEMHVDET.js} +89 -67
  133. package/dist/chunk-LEMHVDET.js.map +1 -0
  134. package/dist/{chunk-37FTLYFP.js → chunk-LNFKL23K.js} +3 -3
  135. package/dist/{chunk-37FTLYFP.js.map → chunk-LNFKL23K.js.map} +1 -1
  136. package/dist/{chunk-6NPINANG.js → chunk-LSXHED6I.js} +6 -6
  137. package/dist/{chunk-6NPINANG.js.map → chunk-LSXHED6I.js.map} +1 -1
  138. package/dist/{chunk-XUUYAS3Z.js → chunk-M3WPBTGJ.js} +3 -3
  139. package/dist/{chunk-XUUYAS3Z.js.map → chunk-M3WPBTGJ.js.map} +1 -1
  140. package/dist/{chunk-QZLWJETK.js → chunk-MGGFBZWA.js} +3 -3
  141. package/dist/{chunk-QZLWJETK.js.map → chunk-MGGFBZWA.js.map} +1 -1
  142. package/dist/{chunk-QD772CGQ.js → chunk-NPLPCRW5.js} +5 -5
  143. package/dist/{chunk-QD772CGQ.js.map → chunk-NPLPCRW5.js.map} +1 -1
  144. package/dist/{chunk-QCI6D7E4.js → chunk-NUELZWCF.js} +266 -170
  145. package/dist/chunk-NUELZWCF.js.map +1 -0
  146. package/dist/{chunk-GP6ZL7PE.js → chunk-OFBIWVCR.js} +3 -3
  147. package/dist/{chunk-GP6ZL7PE.js.map → chunk-OFBIWVCR.js.map} +1 -1
  148. package/dist/{chunk-D2V42LUE.js → chunk-P23M65LB.js} +93 -52
  149. package/dist/chunk-P23M65LB.js.map +1 -0
  150. package/dist/{chunk-46OVMT76.js → chunk-PMECEZK3.js} +16 -10
  151. package/dist/chunk-PMECEZK3.js.map +1 -0
  152. package/dist/{chunk-27HS2DHB.js → chunk-PTSGWKHR.js} +4 -4
  153. package/dist/{chunk-27HS2DHB.js.map → chunk-PTSGWKHR.js.map} +1 -1
  154. package/dist/{chunk-OKGUDNDT.js → chunk-Q6E6FM7P.js} +35 -33
  155. package/dist/chunk-Q6E6FM7P.js.map +1 -0
  156. package/dist/{chunk-PJS2YWGG.js → chunk-QOP6KDFR.js} +8 -9
  157. package/dist/chunk-QOP6KDFR.js.map +1 -0
  158. package/dist/{chunk-AO7VJ6G6.js → chunk-QVNRCDTV.js} +29 -8
  159. package/dist/chunk-QVNRCDTV.js.map +1 -0
  160. package/dist/{chunk-VBBBZDI7.js → chunk-S53LOR7B.js} +3 -3
  161. package/dist/{chunk-VBBBZDI7.js.map → chunk-S53LOR7B.js.map} +1 -1
  162. package/dist/{chunk-KUFNKVBM.js → chunk-SH5D7U7N.js} +20 -7
  163. package/dist/{chunk-KUFNKVBM.js.map → chunk-SH5D7U7N.js.map} +1 -1
  164. package/dist/{chunk-SX4UIDKT.js → chunk-UAROCOXF.js} +3 -3
  165. package/dist/{chunk-SX4UIDKT.js.map → chunk-UAROCOXF.js.map} +1 -1
  166. package/dist/{chunk-JMKB7IB4.js → chunk-UMVKJM4Q.js} +4 -4
  167. package/dist/chunk-UMVKJM4Q.js.map +1 -0
  168. package/dist/{chunk-HCYS7GFP.js → chunk-V2DXZYBB.js} +3 -3
  169. package/dist/{chunk-HCYS7GFP.js.map → chunk-V2DXZYBB.js.map} +1 -1
  170. package/dist/{chunk-KYXOGHY6.js → chunk-W5DWWE4Y.js} +4 -4
  171. package/dist/{chunk-KYXOGHY6.js.map → chunk-W5DWWE4Y.js.map} +1 -1
  172. package/dist/{chunk-FK6HPLQA.js → chunk-WTQ3TATB.js} +3 -3
  173. package/dist/{chunk-FK6HPLQA.js.map → chunk-WTQ3TATB.js.map} +1 -1
  174. package/dist/{chunk-OGLDAJFL.js → chunk-Y4N2NUZD.js} +4 -4
  175. package/dist/{chunk-OGLDAJFL.js.map → chunk-Y4N2NUZD.js.map} +1 -1
  176. package/dist/{chunk-XOGG7VDZ.js → chunk-Y7QA2OLD.js} +17 -25
  177. package/dist/chunk-Y7QA2OLD.js.map +1 -0
  178. package/dist/{chunk-2KOKBTR4.js → chunk-YSHVQGUS.js} +123 -28
  179. package/dist/chunk-YSHVQGUS.js.map +1 -0
  180. package/dist/chunk-ZAOGFXDO.js +112 -0
  181. package/dist/chunk-ZAOGFXDO.js.map +1 -0
  182. package/dist/{chunk-7KLC4LZO.js → chunk-ZKSJMZKD.js} +17 -13
  183. package/dist/chunk-ZKSJMZKD.js.map +1 -0
  184. package/dist/cli/index.js +1169 -672
  185. package/dist/cli/index.js.map +1 -1
  186. package/dist/cli/src/asset-feeds.d.ts +5 -2
  187. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  188. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  189. package/dist/cli/src/commands/catalog.d.ts +27 -5
  190. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  191. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  192. package/dist/cli/src/commands/library-index.d.ts +49 -4
  193. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  194. package/dist/cli/src/commands/library-publish.d.ts +9 -0
  195. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  196. package/dist/cli/src/commands/manage.d.ts +8 -2
  197. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  198. package/dist/cli/src/commands/outdated.d.ts +10 -4
  199. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  200. package/dist/cli/src/commands/project.d.ts +15 -4
  201. package/dist/cli/src/commands/project.d.ts.map +1 -1
  202. package/dist/cli/src/commands/publish-core.d.ts +10 -1
  203. package/dist/cli/src/commands/publish-core.d.ts.map +1 -1
  204. package/dist/cli/src/commands/session.d.ts.map +1 -1
  205. package/dist/cli/src/commands/source.d.ts +18 -3
  206. package/dist/cli/src/commands/source.d.ts.map +1 -1
  207. package/dist/cli/src/commands/tree.d.ts.map +1 -1
  208. package/dist/cli/src/commands/update.d.ts +1 -1
  209. package/dist/cli/src/commands/update.d.ts.map +1 -1
  210. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  211. package/dist/cli/src/flow-discovery.d.ts +8 -5
  212. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  213. package/dist/cli/src/open-library.d.ts +0 -11
  214. package/dist/cli/src/open-library.d.ts.map +1 -1
  215. package/dist/cli/src/skill-checks.d.ts +30 -10
  216. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  217. package/dist/connectors/config.js +6 -6
  218. package/dist/connectors/index.js +26 -27
  219. package/dist/connectors/src/access-policy.d.ts +33 -0
  220. package/dist/connectors/src/access-policy.d.ts.map +1 -0
  221. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  222. package/dist/connectors/src/index.d.ts +2 -0
  223. package/dist/connectors/src/index.d.ts.map +1 -1
  224. package/dist/connectors-O6Y6VESP.js +44 -0
  225. package/dist/{connectors-HWENZFKW.js.map → connectors-O6Y6VESP.js.map} +1 -1
  226. package/dist/connectors-shared/index.js +2 -2
  227. package/dist/core/index.js +9 -9
  228. package/dist/core/logging.js +1 -1
  229. package/dist/core/manifest.js +2 -2
  230. package/dist/core/models.js +1 -1
  231. package/dist/core/publish-manifest.js +2 -2
  232. package/dist/core/ref.js +1 -1
  233. package/dist/core/runtime-assets.js +6 -6
  234. package/dist/core/src/cache-paths.d.ts.map +1 -1
  235. package/dist/core/src/index.d.ts +4 -4
  236. package/dist/core/src/index.d.ts.map +1 -1
  237. package/dist/core/src/lock.d.ts +3 -3
  238. package/dist/core/src/lock.d.ts.map +1 -1
  239. package/dist/core/src/logging/config.d.ts +9 -1
  240. package/dist/core/src/logging/config.d.ts.map +1 -1
  241. package/dist/core/src/manifest.d.ts +17 -2
  242. package/dist/core/src/manifest.d.ts.map +1 -1
  243. package/dist/core/src/models.d.ts +22 -6
  244. package/dist/core/src/models.d.ts.map +1 -1
  245. package/dist/core/src/repo-manager.d.ts +41 -6
  246. package/dist/core/src/repo-manager.d.ts.map +1 -1
  247. package/dist/core/src/store.d.ts +16 -2
  248. package/dist/core/src/store.d.ts.map +1 -1
  249. package/dist/core/src/workspace-config.d.ts +10 -1
  250. package/dist/core/src/workspace-config.d.ts.map +1 -1
  251. package/dist/core/store.js +2 -2
  252. package/dist/core/workspace-config.js +5 -5
  253. package/dist/deploy/index.js +9 -9
  254. package/dist/discovery/index.js +5 -5
  255. package/dist/discovery/src/index.d.ts +1 -1
  256. package/dist/discovery/src/index.d.ts.map +1 -1
  257. package/dist/discovery/src/source-config.d.ts +12 -0
  258. package/dist/discovery/src/source-config.d.ts.map +1 -1
  259. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  260. package/dist/{ensure-sources-DSTSXJWK.js → ensure-sources-SKLNM4UZ.js} +19 -19
  261. package/dist/{ensure-sources-DSTSXJWK.js.map → ensure-sources-SKLNM4UZ.js.map} +1 -1
  262. package/dist/factory-assets/connectors/box.js +26 -27
  263. package/dist/factory-assets/connectors/deploy.js +26 -27
  264. package/dist/factory-assets/connectors/devserver.js +26 -27
  265. package/dist/factory-assets/connectors/flow/adapter.d.ts +6 -0
  266. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  267. package/dist/factory-assets/connectors/flow/adapter.js +26 -27
  268. package/dist/factory-assets/connectors/flow/contract/expression.d.ts +3 -0
  269. package/dist/factory-assets/connectors/flow/contract/expression.d.ts.map +1 -1
  270. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts +1 -1
  271. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts.map +1 -1
  272. package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
  273. package/dist/factory-assets/connectors/flow/contract.js +4 -4
  274. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts +4 -3
  275. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts.map +1 -1
  276. package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts +6 -1
  277. package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts.map +1 -1
  278. package/dist/factory-assets/connectors/flow/engine.js +13 -13
  279. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
  280. package/dist/factory-assets/connectors/flow/prompt-fragments.js +3 -3
  281. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  282. package/dist/factory-assets/connectors/flow/run-flow.js +28 -29
  283. package/dist/factory-assets/connectors/flow.js +26 -27
  284. package/dist/factory-assets/connectors/git/config.d.ts.map +1 -1
  285. package/dist/factory-assets/connectors/git.js +26 -27
  286. package/dist/factory-assets/connectors/gmail.js +26 -27
  287. package/dist/factory-assets/connectors/googledrive.js +26 -27
  288. package/dist/factory-assets/connectors/local.js +26 -27
  289. package/dist/factory-assets/connectors/mattermost.js +26 -27
  290. package/dist/factory-assets/connectors/memory.js +26 -27
  291. package/dist/factory-assets/connectors/minio.js +26 -27
  292. package/dist/factory-assets/connectors/postgres.js +26 -27
  293. package/dist/factory-assets/connectors/s3.js +26 -27
  294. package/dist/factory-assets/connectors/sharepoint.js +26 -27
  295. package/dist/factory-assets/connectors/sqlite.js +26 -27
  296. package/dist/factory-assets/connectors/static-server.js +26 -27
  297. package/dist/factory-assets/connectors/tunnel.js +26 -27
  298. package/dist/factory-assets/connectors/webdav.js +26 -27
  299. package/dist/factory-assets/connectors/xstate-store.js +26 -27
  300. package/dist/factory-assets/connectors/xstate.js +26 -27
  301. package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +10 -7
  302. package/dist/flows-CBYRSAGS.js +26 -0
  303. package/dist/{flows-ENQY2DV7.js.map → flows-CBYRSAGS.js.map} +1 -1
  304. package/dist/{helpers-R44RUTDY.js → helpers-MWZDRBLD.js} +19 -19
  305. package/dist/{helpers-R44RUTDY.js.map → helpers-MWZDRBLD.js.map} +1 -1
  306. package/dist/library/index.js +13 -13
  307. package/dist/library/install.js +3 -3
  308. package/dist/library/src/index.d.ts +5 -3
  309. package/dist/library/src/index.d.ts.map +1 -1
  310. package/dist/library/src/local/library-manager.d.ts +6 -0
  311. package/dist/library/src/local/library-manager.d.ts.map +1 -1
  312. package/dist/library/src/local/local-catalog-source.d.ts +5 -2
  313. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  314. package/dist/library/src/local/scan-authoring-libraries.d.ts +43 -0
  315. package/dist/library/src/local/scan-authoring-libraries.d.ts.map +1 -0
  316. package/dist/library/src/manifest-writer.d.ts +46 -1
  317. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  318. package/dist/library/src/sync/git-driver.d.ts +12 -0
  319. package/dist/library/src/sync/git-driver.d.ts.map +1 -1
  320. package/dist/{library-publish-LFOJJVMK.js → library-publish-PICMDSB2.js} +129 -49
  321. package/dist/library-publish-PICMDSB2.js.map +1 -0
  322. package/dist/open-library-OG457THY.js +40 -0
  323. package/dist/{open-library-4WUMQHES.js.map → open-library-OG457THY.js.map} +1 -1
  324. package/dist/open-registry-ZUZJ7MS7.js +32 -0
  325. package/dist/{open-registry-NVPCQPND.js.map → open-registry-ZUZJ7MS7.js.map} +1 -1
  326. package/dist/paths-FQ64OLJG.js +22 -0
  327. package/dist/{paths-YUCP7K6U.js.map → paths-FQ64OLJG.js.map} +1 -1
  328. package/dist/{plugin-store-66QFBNEO.js → plugin-store-MPAMD5OT.js} +11 -11
  329. package/dist/{plugin-store-66QFBNEO.js.map → plugin-store-MPAMD5OT.js.map} +1 -1
  330. package/dist/project-2GFT5LEZ.js +41 -0
  331. package/dist/{project-VMOHUXBD.js.map → project-2GFT5LEZ.js.map} +1 -1
  332. package/dist/resolver/index.js +10 -10
  333. package/dist/runner/index.js +41 -42
  334. package/dist/runner/src/logging-bootstrap.d.ts +6 -0
  335. package/dist/runner/src/logging-bootstrap.d.ts.map +1 -1
  336. package/dist/runner/src/reconfigure-handler.d.ts +38 -17
  337. package/dist/runner/src/reconfigure-handler.d.ts.map +1 -1
  338. package/dist/runner/src/serve.d.ts.map +1 -1
  339. package/dist/runner/src/session-capability-wiring.d.ts +0 -2
  340. package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
  341. package/dist/sdk/asset-manager.js +16 -16
  342. package/dist/sdk/bridge.js +17 -18
  343. package/dist/sdk/core.js +9 -9
  344. package/dist/sdk/flow.js +13 -13
  345. package/dist/sdk/index.js +69 -46
  346. package/dist/sdk/index.js.map +1 -1
  347. package/dist/sdk/resolver.js +10 -10
  348. package/dist/sdk/runner.js +41 -42
  349. package/dist/sdk/session.js +2 -2
  350. package/dist/sdk/src/agent-session.d.ts +8 -0
  351. package/dist/sdk/src/agent-session.d.ts.map +1 -1
  352. package/dist/sdk/store.js +2 -1
  353. package/dist/sdk/types.js +1 -1
  354. package/dist/secrets/index.js +2 -2
  355. package/dist/session/index.js +2 -2
  356. package/dist/{setup-PYY23HGZ.js → setup-WHMCSIF2.js} +27 -28
  357. package/dist/setup-WHMCSIF2.js.map +1 -0
  358. package/dist/skills-TVO26Y4V.js +26 -0
  359. package/dist/{skills-CS7NE5TT.js.map → skills-TVO26Y4V.js.map} +1 -1
  360. package/dist/source-LKOFTOEK.js +41 -0
  361. package/dist/{source-JCF6KSQN.js.map → source-LKOFTOEK.js.map} +1 -1
  362. package/dist/{source-manifest-publish-O6P7G2M7.js → source-manifest-publish-L5J3QXER.js} +28 -28
  363. package/dist/{source-manifest-publish-O6P7G2M7.js.map → source-manifest-publish-L5J3QXER.js.map} +1 -1
  364. package/dist/store/index.js +2 -1
  365. package/dist/store/src/store.d.ts +8 -5
  366. package/dist/store/src/store.d.ts.map +1 -1
  367. package/dist/tui/index.js +41 -42
  368. package/dist/tui/index.js.map +1 -1
  369. package/dist/types/index.js +1 -1
  370. package/dist/types/manifests.js +1 -1
  371. package/dist/types/src/ask-slots.d.ts +68 -0
  372. package/dist/types/src/ask-slots.d.ts.map +1 -0
  373. package/dist/types/src/delivery.d.ts.map +1 -1
  374. package/dist/types/src/events.d.ts +29 -1
  375. package/dist/types/src/events.d.ts.map +1 -1
  376. package/dist/types/src/index.d.ts +1 -1
  377. package/dist/types/src/index.d.ts.map +1 -1
  378. package/dist/types/src/manifests/index.d.ts +1 -1
  379. package/dist/types/src/manifests/index.d.ts.map +1 -1
  380. package/dist/types/src/manifests/preset.d.ts +4 -0
  381. package/dist/types/src/manifests/preset.d.ts.map +1 -1
  382. package/dist/types/src/version.d.ts +12 -1
  383. package/dist/types/src/version.d.ts.map +1 -1
  384. package/dist/workspace-plugin/adapters/mcp.js +33 -34
  385. package/dist/workspace-plugin/adapters/omp.js +14 -14
  386. package/dist/workspace-plugin/index.js +2 -2
  387. package/package.json +1 -1
  388. package/dist/asset-feeds-LU7NHOAP.js.map +0 -1
  389. package/dist/chunk-2KOKBTR4.js.map +0 -1
  390. package/dist/chunk-2NYXQYHN.js +0 -22
  391. package/dist/chunk-2NYXQYHN.js.map +0 -1
  392. package/dist/chunk-2W4LBLIN.js.map +0 -1
  393. package/dist/chunk-46OVMT76.js.map +0 -1
  394. package/dist/chunk-5B5IZVEP.js.map +0 -1
  395. package/dist/chunk-65EYRFZJ.js.map +0 -1
  396. package/dist/chunk-7KLC4LZO.js.map +0 -1
  397. package/dist/chunk-AO7VJ6G6.js.map +0 -1
  398. package/dist/chunk-AOAZCSDI.js.map +0 -1
  399. package/dist/chunk-D2V42LUE.js.map +0 -1
  400. package/dist/chunk-DMLDYFDS.js.map +0 -1
  401. package/dist/chunk-EINLFFP6.js +0 -59
  402. package/dist/chunk-EINLFFP6.js.map +0 -1
  403. package/dist/chunk-FRHE7FFB.js.map +0 -1
  404. package/dist/chunk-I4QBZLOR.js.map +0 -1
  405. package/dist/chunk-JMKB7IB4.js.map +0 -1
  406. package/dist/chunk-MFHKHXDE.js.map +0 -1
  407. package/dist/chunk-MX3UQXLU.js.map +0 -1
  408. package/dist/chunk-OKGUDNDT.js.map +0 -1
  409. package/dist/chunk-PA7WLID3.js.map +0 -1
  410. package/dist/chunk-PJS2YWGG.js.map +0 -1
  411. package/dist/chunk-PTO2YDDG.js.map +0 -1
  412. package/dist/chunk-QCI6D7E4.js.map +0 -1
  413. package/dist/chunk-RGXVQZOV.js.map +0 -1
  414. package/dist/chunk-TZCQ7ZWQ.js.map +0 -1
  415. package/dist/chunk-UAP2XHRF.js.map +0 -1
  416. package/dist/chunk-WIHQWVWL.js.map +0 -1
  417. package/dist/chunk-XBSQ4KMC.js.map +0 -1
  418. package/dist/chunk-XOGG7VDZ.js.map +0 -1
  419. package/dist/connectors-HWENZFKW.js +0 -45
  420. package/dist/flows-ENQY2DV7.js +0 -26
  421. package/dist/library-publish-LFOJJVMK.js.map +0 -1
  422. package/dist/open-library-4WUMQHES.js +0 -40
  423. package/dist/open-registry-NVPCQPND.js +0 -32
  424. package/dist/paths-YUCP7K6U.js +0 -22
  425. package/dist/project-VMOHUXBD.js +0 -41
  426. package/dist/setup-PYY23HGZ.js.map +0 -1
  427. package/dist/skills-CS7NE5TT.js +0 -26
  428. package/dist/source-JCF6KSQN.js +0 -41
@@ -332,7 +332,7 @@ function ownValue(value, segment, position, path) {
332
332
  }
333
333
  return value[segment];
334
334
  }
335
- function resolvePath(raw, context, position, traverse) {
335
+ function parsePathShape(raw, position) {
336
336
  const segments = raw.split(".");
337
337
  if (segments.length > FLOW_EXPRESSION_LIMITS.maxPathSegments) {
338
338
  throw expressionError(
@@ -345,43 +345,45 @@ function resolvePath(raw, context, position, traverse) {
345
345
  }
346
346
  const forbidden = segments.find((segment) => FORBIDDEN_PATH_SEGMENTS.has(segment));
347
347
  if (forbidden) throw expressionError(`contains forbidden path segment ${forbidden}`, position);
348
- let value;
349
- let remaining;
350
- let skippedProducer;
351
348
  if (segments[0] === "flow" && segments[1] === "input") {
352
349
  if (segments.length === 2) {
353
350
  throw expressionError("path requires a JSON property suffix", position);
354
351
  }
355
- value = context.flow.input;
356
- remaining = segments.slice(2);
357
- } else if (segments[0] === "defaults" && segments.length >= 2) {
358
- value = context.defaults ?? {};
359
- remaining = segments.slice(1);
360
- } else if (segments[0] === "nodes" && segments.length === 3 && segments[2] === "status") {
361
- value = context.nodes;
362
- remaining = segments.slice(1);
363
- } else if (segments[0] === "nodes" && segments.length >= 4 && segments[2] === "output" && segments[3] === "fields") {
352
+ return { root: "input", remaining: segments.slice(2) };
353
+ }
354
+ if (segments[0] === "defaults" && segments.length >= 2) {
355
+ return { root: "defaults", remaining: segments.slice(1) };
356
+ }
357
+ if (segments[0] === "nodes" && segments.length === 3 && segments[2] === "status") {
358
+ return { root: "nodes", remaining: segments.slice(1) };
359
+ }
360
+ if (segments[0] === "nodes" && segments.length >= 4 && segments[2] === "output" && segments[3] === "fields") {
364
361
  if (segments.length === 4) {
365
362
  throw expressionError("path requires a JSON property suffix", position);
366
363
  }
367
- if (Object.hasOwn(context.nodes, segments[1]) && context.nodes[segments[1]].status === "skipped") {
368
- skippedProducer = segments[1];
369
- }
370
- value = context.nodes;
371
- remaining = segments.slice(1);
372
- } else {
373
- throw expressionError(`contains unsupported path ${raw}`, position);
364
+ return { root: "nodes", remaining: segments.slice(1), outputProducer: segments[1] };
374
365
  }
375
- if (!traverse) return void 0;
376
- if (skippedProducer !== void 0) {
377
- throw expressionError(
378
- `cannot read ${raw}: producer node ${skippedProducer} was skipped and produced no output`,
379
- position,
380
- raw,
381
- skippedProducer
382
- );
366
+ throw expressionError(`contains unsupported path ${raw}`, position);
367
+ }
368
+ function readPath(shape, raw, context, position) {
369
+ let value;
370
+ if (shape.root === "input") {
371
+ value = context.flow.input;
372
+ } else if (shape.root === "defaults") {
373
+ value = context.defaults ?? {};
374
+ } else {
375
+ value = context.nodes;
376
+ const producer = shape.outputProducer;
377
+ if (producer !== void 0 && Object.hasOwn(context.nodes, producer) && context.nodes[producer].status === "skipped") {
378
+ throw expressionError(
379
+ `cannot read ${raw}: producer node ${producer} was skipped and produced no output`,
380
+ position,
381
+ raw,
382
+ producer
383
+ );
384
+ }
383
385
  }
384
- for (const segment of remaining) value = ownValue(value, segment, position, raw);
386
+ for (const segment of shape.remaining) value = ownValue(value, segment, position, raw);
385
387
  return value;
386
388
  }
387
389
  function compare(operator, left, right, position) {
@@ -418,35 +420,16 @@ function isBooleanOperand(value) {
418
420
  function assertBooleanOperand(value, position) {
419
421
  if (!isBooleanOperand(value)) throw expressionError("requires boolean operands", position);
420
422
  }
421
- var Parser = class {
422
- constructor(tokens, context, onPath, onBooleanPath, onEvaluatedPath, onComparison) {
423
+ var COMPARISON_OPERATORS = ["==", "!=", "<", "<=", ">", ">=", "in"];
424
+ var ExpressionBuilder = class {
425
+ constructor(tokens) {
423
426
  this.tokens = tokens;
424
- this.context = context;
425
- this.onPath = onPath;
426
- this.onBooleanPath = onBooleanPath;
427
- this.onEvaluatedPath = onEvaluatedPath;
428
- this.onComparison = onComparison;
429
427
  }
430
428
  tokens;
431
- context;
432
- onPath;
433
- onBooleanPath;
434
- onEvaluatedPath;
435
- onComparison;
436
429
  index = 0;
437
430
  nesting = 0;
438
- /** Literal `path == true` conjuncts already parsed, one frame per enclosing `&&` chain. */
439
- guardFrames = [];
440
- /**
441
- * Guards the operand {@link parseComparison} just parsed establishes when true:
442
- * its own path for a literal `path == true`, or every guard of a parenthesized
443
- * `&&` group, which is true only when all its conjuncts are.
444
- */
445
- lastGuards = [];
446
- /** Guards of the `&&` / `||` chain that just finished; empty once a `||` joined it. */
447
- lastChainGuards = [];
448
- parse(evaluate2 = true) {
449
- const value = this.parseOr(evaluate2);
431
+ build() {
432
+ const root = this.parseOr();
450
433
  const trailing = this.peek();
451
434
  if (trailing.kind !== "eof") {
452
435
  throw expressionError(
@@ -454,7 +437,7 @@ var Parser = class {
454
437
  trailing.position
455
438
  );
456
439
  }
457
- return value;
440
+ return root;
458
441
  }
459
442
  peek() {
460
443
  return this.tokens[this.index];
@@ -466,105 +449,79 @@ var Parser = class {
466
449
  if (this.peek().value !== value) return void 0;
467
450
  return this.take();
468
451
  }
469
- parseOr(evaluate2) {
470
- let value = this.parseAnd(evaluate2);
471
- let disjunction = false;
452
+ parseOr() {
453
+ const operands = [this.parseAnd()];
454
+ const positions = [];
472
455
  while (this.peek().value === "||") {
473
- disjunction = true;
474
- const operator = this.take();
475
- assertBooleanOperand(value, operator.position);
476
- if (isStaticPath(value)) this.onBooleanPath?.(value.path);
477
- const evaluateRight = evaluate2 && value === false;
478
- const right = this.parseAnd(evaluateRight);
479
- assertBooleanOperand(right, operator.position);
480
- if (isStaticPath(right)) this.onBooleanPath?.(right.path);
481
- value = evaluate2 ? value === true || right === true : STATIC_BOOLEAN;
482
- }
483
- if (disjunction) this.lastChainGuards = [];
484
- return value;
456
+ positions.push(this.take().position);
457
+ operands.push(this.parseAnd());
458
+ }
459
+ return { kind: "or", operands, positions };
485
460
  }
486
- parseAnd(evaluate2) {
487
- const guards = [];
488
- this.guardFrames.push(guards);
489
- try {
490
- let value = this.parseComparison(evaluate2);
491
- guards.push(...this.lastGuards);
492
- while (this.peek().value === "&&") {
493
- const operator = this.take();
494
- assertBooleanOperand(value, operator.position);
495
- if (isStaticPath(value)) this.onBooleanPath?.(value.path);
496
- const evaluateRight = evaluate2 && value === true;
497
- const right = this.parseComparison(evaluateRight);
498
- guards.push(...this.lastGuards);
499
- assertBooleanOperand(right, operator.position);
500
- if (isStaticPath(right)) this.onBooleanPath?.(right.path);
501
- value = evaluate2 ? value === true && right === true : STATIC_BOOLEAN;
502
- }
503
- this.lastChainGuards = [...guards];
504
- return value;
505
- } finally {
506
- this.guardFrames.pop();
461
+ parseAnd() {
462
+ const operands = [this.parseComparison()];
463
+ const positions = [];
464
+ while (this.peek().value === "&&") {
465
+ positions.push(this.take().position);
466
+ operands.push(this.parseComparison());
507
467
  }
468
+ return { kind: "and", operands, positions };
508
469
  }
509
- parseComparison(evaluate2) {
510
- const group = this.peek().value === "(";
511
- const left = this.parseUnary(evaluate2);
470
+ parseComparison() {
471
+ const left = this.parseUnary();
512
472
  const token = this.peek();
513
- if (token.kind !== "operator" || !["==", "!=", "<", "<=", ">", ">=", "in"].includes(String(token.value))) {
514
- this.lastGuards = group ? this.lastChainGuards : [];
473
+ if (token.kind !== "operator" || !COMPARISON_OPERATORS.includes(String(token.value))) {
515
474
  return left;
516
475
  }
517
476
  this.take();
518
- const right = this.parseUnary(evaluate2);
519
- const operator = String(token.value);
520
- this.onComparison?.({
521
- operator,
522
- left: isStaticPath(left) ? { path: left.path } : { literal: left },
523
- right: isStaticPath(right) ? { path: right.path } : { literal: right },
524
- guards: this.guardFrames.flat()
525
- });
526
- this.lastGuards = operator === "==" && isStaticPath(left) && right === true ? [left.path] : [];
527
- return evaluate2 ? compare(operator, left, right, token.position) : STATIC_BOOLEAN;
477
+ const right = this.parseUnary();
478
+ return {
479
+ kind: "compare",
480
+ operator: String(token.value),
481
+ left,
482
+ right,
483
+ position: token.position
484
+ };
528
485
  }
529
- parseUnary(evaluate2) {
486
+ parseUnary() {
530
487
  const operator = this.accept("!");
531
488
  if (operator) {
532
- const value = this.parseUnary(evaluate2);
533
- assertBooleanOperand(value, operator.position);
534
- if (isStaticPath(value)) this.onBooleanPath?.(value.path);
535
- return evaluate2 ? value === false : STATIC_BOOLEAN;
489
+ return { kind: "not", operand: this.parseUnary(), position: operator.position };
536
490
  }
537
- return this.parsePrimary(evaluate2);
491
+ return this.parsePrimary();
538
492
  }
539
- parsePrimary(evaluate2) {
493
+ parsePrimary() {
540
494
  const token = this.take();
541
- if (token.kind === "value") return token.value;
495
+ if (token.kind === "value") return { kind: "literal", value: token.value };
542
496
  if (token.kind === "word") {
543
- this.onPath?.(String(token.value));
544
- resolvePath(String(token.value), this.context, token.position, false);
545
- if (evaluate2) this.onEvaluatedPath?.(String(token.value));
546
- return evaluate2 ? resolvePath(String(token.value), this.context, token.position, true) : { marker: STATIC_PATH, path: String(token.value) };
497
+ const path = String(token.value);
498
+ return {
499
+ kind: "path",
500
+ path,
501
+ position: token.position,
502
+ shape: parsePathShape(path, token.position)
503
+ };
547
504
  }
548
505
  if (token.value === "(") {
549
506
  this.enterNesting(token.position);
550
- const value = this.parseOr(evaluate2);
507
+ const inner = this.parseOr();
551
508
  if (!this.accept(")"))
552
509
  throw expressionError("is missing a closing parenthesis", token.position);
553
510
  this.nesting--;
554
- return value;
511
+ return { kind: "group", inner };
555
512
  }
556
513
  if (token.value === "[") {
557
514
  this.enterNesting(token.position);
558
- const values = [];
515
+ const items = [];
559
516
  if (!this.accept("]")) {
560
517
  do
561
- values.push(this.parsePrimary(evaluate2));
518
+ items.push(this.parsePrimary());
562
519
  while (this.accept(","));
563
520
  if (!this.accept("]"))
564
521
  throw expressionError("is missing a closing bracket", token.position);
565
522
  }
566
523
  this.nesting--;
567
- return values;
524
+ return { kind: "list", items };
568
525
  }
569
526
  throw expressionError(`contains unexpected token ${String(token.value)}`, token.position);
570
527
  }
@@ -578,44 +535,185 @@ var Parser = class {
578
535
  }
579
536
  }
580
537
  };
581
- function inspectFlowExpressionComparisons(expression) {
538
+ var ExpressionAnalyzer = class {
539
+ references = /* @__PURE__ */ new Map();
540
+ comparisons = [];
541
+ /** Literal `path == true` conjuncts already analyzed, one frame per enclosing `&&` chain. */
542
+ guardFrames = [];
543
+ /**
544
+ * Guards the operand {@link analyzeOperand} just analyzed establishes when true:
545
+ * its own path for a literal `path == true`, or every guard of a parenthesized
546
+ * `&&` group, which is true only when all its conjuncts are.
547
+ */
548
+ lastGuards = [];
549
+ /** Guards of the `&&` / `||` chain that just finished; empty once a `||` joined it. */
550
+ lastChainGuards = [];
551
+ record(path, booleanOperand) {
552
+ this.references.set(path, (this.references.get(path) ?? false) || booleanOperand);
553
+ }
554
+ booleanOperand(value, position) {
555
+ assertBooleanOperand(value, position);
556
+ if (isStaticPath(value)) this.record(value.path, true);
557
+ }
558
+ /** Static value of a node: literals as themselves, paths as markers, computed booleans as one marker. */
559
+ analyze(node) {
560
+ switch (node.kind) {
561
+ case "literal":
562
+ return node.value;
563
+ case "path":
564
+ this.record(node.path, false);
565
+ return { marker: STATIC_PATH, path: node.path };
566
+ case "list":
567
+ return node.items.map((item) => this.analyze(item));
568
+ case "group":
569
+ return this.analyze(node.inner);
570
+ case "not": {
571
+ const value = this.analyze(node.operand);
572
+ this.booleanOperand(value, node.position);
573
+ return STATIC_BOOLEAN;
574
+ }
575
+ case "compare": {
576
+ const left = this.analyze(node.left);
577
+ const right = this.analyze(node.right);
578
+ this.comparisons.push({
579
+ operator: node.operator,
580
+ left: isStaticPath(left) ? { path: left.path } : { literal: left },
581
+ right: isStaticPath(right) ? { path: right.path } : { literal: right },
582
+ guards: this.guardFrames.flat()
583
+ });
584
+ this.lastGuards = node.operator === "==" && isStaticPath(left) && right === true ? [left.path] : [];
585
+ return STATIC_BOOLEAN;
586
+ }
587
+ case "and":
588
+ return this.analyzeAnd(node);
589
+ case "or":
590
+ return this.analyzeOr(node);
591
+ }
592
+ }
593
+ analyzeOperand(node) {
594
+ if (node.kind === "compare") return this.analyze(node);
595
+ const value = this.analyze(node);
596
+ this.lastGuards = node.kind === "group" ? this.lastChainGuards : [];
597
+ return value;
598
+ }
599
+ analyzeAnd(node) {
600
+ const guards = [];
601
+ this.guardFrames.push(guards);
602
+ try {
603
+ let value = this.analyzeOperand(node.operands[0]);
604
+ guards.push(...this.lastGuards);
605
+ for (let index = 1; index < node.operands.length; index++) {
606
+ const position = node.positions[index - 1];
607
+ this.booleanOperand(value, position);
608
+ const right = this.analyzeOperand(node.operands[index]);
609
+ guards.push(...this.lastGuards);
610
+ this.booleanOperand(right, position);
611
+ value = STATIC_BOOLEAN;
612
+ }
613
+ this.lastChainGuards = [...guards];
614
+ return value;
615
+ } finally {
616
+ this.guardFrames.pop();
617
+ }
618
+ }
619
+ analyzeOr(node) {
620
+ let value = this.analyze(node.operands[0]);
621
+ for (let index = 1; index < node.operands.length; index++) {
622
+ const position = node.positions[index - 1];
623
+ this.booleanOperand(value, position);
624
+ const right = this.analyze(node.operands[index]);
625
+ this.booleanOperand(right, position);
626
+ value = STATIC_BOOLEAN;
627
+ }
628
+ if (node.operands.length > 1) this.lastChainGuards = [];
629
+ return value;
630
+ }
631
+ };
632
+ function assertBooleanValue(value, position) {
633
+ if (typeof value !== "boolean") throw expressionError("requires boolean operands", position);
634
+ }
635
+ function evaluateNode(node, context, onPath) {
636
+ switch (node.kind) {
637
+ case "literal":
638
+ return node.value;
639
+ case "path":
640
+ onPath?.(node.path);
641
+ return readPath(node.shape, node.path, context, node.position);
642
+ case "list":
643
+ return node.items.map((item) => evaluateNode(item, context, onPath));
644
+ case "group":
645
+ return evaluateNode(node.inner, context, onPath);
646
+ case "not": {
647
+ const value = evaluateNode(node.operand, context, onPath);
648
+ assertBooleanValue(value, node.position);
649
+ return value === false;
650
+ }
651
+ case "compare":
652
+ return compare(
653
+ node.operator,
654
+ evaluateNode(node.left, context, onPath),
655
+ evaluateNode(node.right, context, onPath),
656
+ node.position
657
+ );
658
+ case "and":
659
+ case "or": {
660
+ const continueOn = node.kind === "and";
661
+ let value = evaluateNode(node.operands[0], context, onPath);
662
+ for (let index = 1; index < node.operands.length; index++) {
663
+ const position = node.positions[index - 1];
664
+ assertBooleanValue(value, position);
665
+ if (value !== continueOn) continue;
666
+ value = evaluateNode(node.operands[index], context, onPath);
667
+ assertBooleanValue(value, position);
668
+ }
669
+ return value;
670
+ }
671
+ }
672
+ }
673
+ var COMPILED_EXPRESSION_LIMIT = 512;
674
+ var compiledExpressions = /* @__PURE__ */ new Map();
675
+ function compileExpression(expression) {
676
+ const cached = compiledExpressions.get(expression);
677
+ if (cached) return cached;
582
678
  const tokens = tokenize(expression);
583
- if (expression.trim() === "default") return [];
584
- const comparisons = [];
585
- const context = { flow: { input: {} }, nodes: {} };
586
- new Parser(
587
- tokens,
588
- context,
589
- void 0,
590
- void 0,
591
- void 0,
592
- (comparison) => comparisons.push(comparison)
593
- ).parse(false);
594
- return comparisons;
679
+ let compiled;
680
+ if (expression.trim() === "default") {
681
+ compiled = { references: [], comparisons: [], booleanResult: true };
682
+ } else {
683
+ const root = new ExpressionBuilder(tokens).build();
684
+ const analyzer = new ExpressionAnalyzer();
685
+ const result = analyzer.analyze(root);
686
+ compiled = {
687
+ root,
688
+ references: Array.from(analyzer.references, ([path, booleanOperand]) => ({
689
+ path,
690
+ booleanOperand
691
+ })),
692
+ comparisons: analyzer.comparisons,
693
+ booleanResult: typeof result === "boolean" || result === STATIC_BOOLEAN
694
+ };
695
+ }
696
+ if (compiledExpressions.size >= COMPILED_EXPRESSION_LIMIT) {
697
+ const oldest = compiledExpressions.keys().next();
698
+ if (!oldest.done) compiledExpressions.delete(oldest.value);
699
+ }
700
+ compiledExpressions.set(expression, compiled);
701
+ return compiled;
702
+ }
703
+ function inspectFlowExpressionComparisons(expression) {
704
+ return [...compileExpression(expression).comparisons];
595
705
  }
596
706
  function inspectFlowExpression(expression, requireBoolean = true) {
597
- const tokens = tokenize(expression);
598
- if (expression.trim() === "default") return [];
599
- const references = /* @__PURE__ */ new Map();
600
- const record2 = (path, booleanOperand) => {
601
- references.set(path, (references.get(path) ?? false) || booleanOperand);
602
- };
603
- const context = { flow: { input: {} }, nodes: {} };
604
- const result = new Parser(
605
- tokens,
606
- context,
607
- (path) => record2(path, false),
608
- (path) => record2(path, true)
609
- ).parse(false);
610
- if (requireBoolean && typeof result !== "boolean" && result !== STATIC_BOOLEAN) {
707
+ const compiled = compileExpression(expression);
708
+ if (requireBoolean && !compiled.booleanResult) {
611
709
  throw expressionError("must evaluate to a boolean");
612
710
  }
613
- return Array.from(references, ([path, booleanOperand]) => ({ path, booleanOperand }));
711
+ return [...compiled.references];
614
712
  }
615
713
  function evaluateFlowExpression(expression, context) {
616
- const tokens = tokenize(expression);
617
- if (expression.trim() === "default") return true;
618
- const result = new Parser(tokens, context).parse();
714
+ const { root } = compileExpression(expression);
715
+ if (root === void 0) return true;
716
+ const result = evaluateNode(root, context);
619
717
  if (typeof result !== "boolean") {
620
718
  throw expressionError("must evaluate to a boolean");
621
719
  }
@@ -625,16 +723,10 @@ function evaluate(expression, context) {
625
723
  return evaluateFlowExpression(expression, context);
626
724
  }
627
725
  function evaluateFlowExpressionValue(expression, context) {
628
- const tokens = tokenize(expression);
629
- if (expression.trim() === "default") return { value: true, paths: [] };
726
+ const { root } = compileExpression(expression);
727
+ if (root === void 0) return { value: true, paths: [] };
630
728
  const paths = [];
631
- const value = new Parser(
632
- tokens,
633
- context,
634
- void 0,
635
- void 0,
636
- (path) => paths.push(path)
637
- ).parse();
729
+ const value = evaluateNode(root, context, (path) => paths.push(path));
638
730
  return { value, paths };
639
731
  }
640
732
  function originsForPath(path, nodeOutputOrigin, flowInputOrigins) {
@@ -779,11 +871,6 @@ function resolveFlowBindings(bindings, context, nodeOutputOrigin = {}, flowInput
779
871
  const values = {};
780
872
  const origins = {};
781
873
  const entries = Object.entries(bindings ?? {});
782
- for (const [name] of entries) {
783
- if (!FLOW_BINDING_NAME_PATTERN.test(name)) {
784
- throw expressionError(`contains reserved binding name input.${name}`);
785
- }
786
- }
787
874
  for (const [name, authored] of entries) {
788
875
  const resolved = resolveBindingValue(
789
876
  authored,
@@ -912,6 +999,15 @@ var FlowOutputContractSchema = z2.strictObject({
912
999
  message: `output binding ${name} has no property in output.schema`
913
1000
  });
914
1001
  }
1002
+ try {
1003
+ compileOutputFieldsSchema(output.schema);
1004
+ } catch (error) {
1005
+ context.addIssue({
1006
+ code: "custom",
1007
+ path: ["schema"],
1008
+ message: `output.schema: ${invalidOutputFieldsSchemaMessage(error)}`
1009
+ });
1010
+ }
915
1011
  });
916
1012
  var PreconditionSchema = z2.strictObject({
917
1013
  expr: nonEmptyString,
@@ -1448,6 +1544,6 @@ function validateClassifierRules(flow, context) {
1448
1544
  }
1449
1545
  }
1450
1546
 
1451
- export { FLOW_CAPTURE_CHANNELS, FLOW_CAPTURE_DESTINATION_PATTERN, FLOW_EXPRESSION_LIMITS, FlowDefinitionSchema, FlowExpressionError, InputSchema, MISSING_FIELD, RESERVED_CLASSIFIER_FIELDS, captureDestinationFieldName, checkClassifierShape, classifierDecision, compileOutputFieldsSchema, consumedOutputFieldPaths, declaredFieldSchema, declaresReservedClassifierField, duplicateCaptureDestinationMessage, evaluate, evaluateFlowExpression, getConsumedOutputSchema, hasConstantlyFalsePrecondition, inspectFlowExpressionComparisons, invalidCaptureDestinationMessage, invalidOutputFieldsSchemaMessage, parseFlowDefinitionStructure, resolveFlowBindings, stableFlowJson, withoutReservedClassifierFields };
1452
- //# sourceMappingURL=chunk-QCI6D7E4.js.map
1453
- //# sourceMappingURL=chunk-QCI6D7E4.js.map
1547
+ export { FLOW_CAPTURE_CHANNELS, FLOW_CAPTURE_DESTINATION_PATTERN, FLOW_EXPRESSION_LIMITS, FlowDefinitionSchema, FlowExpressionError, InputSchema, MISSING_FIELD, RESERVED_CLASSIFIER_FIELDS, captureDestinationFieldName, checkClassifierShape, classifierDecision, compileOutputFieldsSchema, consumedOutputFieldPaths, declaredFieldSchema, declaresReservedClassifierField, duplicateCaptureDestinationMessage, evaluate, evaluateFlowExpression, getConsumedOutputSchema, hasConstantlyFalsePrecondition, inspectFlowExpressionComparisons, invalidCaptureDestinationMessage, parseFlowDefinitionStructure, resolveFlowBindings, stableFlowJson, withoutReservedClassifierFields };
1548
+ //# sourceMappingURL=chunk-NUELZWCF.js.map
1549
+ //# sourceMappingURL=chunk-NUELZWCF.js.map