@dexto/core 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (514) hide show
  1. package/README.md +36 -0
  2. package/dist/agent/DextoAgent.cjs +22 -3
  3. package/dist/agent/DextoAgent.d.ts +19 -2
  4. package/dist/agent/DextoAgent.d.ts.map +1 -1
  5. package/dist/agent/DextoAgent.js +23 -4
  6. package/dist/agent/index.cjs +4 -1
  7. package/dist/agent/index.d.ts +1 -1
  8. package/dist/agent/index.d.ts.map +1 -1
  9. package/dist/agent/index.js +5 -1
  10. package/dist/agent/schemas.cjs +90 -71
  11. package/dist/agent/schemas.d.ts +5959 -96
  12. package/dist/agent/schemas.d.ts.map +1 -1
  13. package/dist/agent/schemas.js +87 -66
  14. package/dist/approval/manager.cjs +165 -1
  15. package/dist/approval/manager.d.ts +91 -2
  16. package/dist/approval/manager.d.ts.map +1 -1
  17. package/dist/approval/manager.js +155 -1
  18. package/dist/approval/schemas.cjs +39 -3
  19. package/dist/approval/schemas.d.ts +238 -1
  20. package/dist/approval/schemas.d.ts.map +1 -1
  21. package/dist/approval/schemas.js +35 -3
  22. package/dist/approval/types.cjs +1 -0
  23. package/dist/approval/types.d.ts +26 -1
  24. package/dist/approval/types.d.ts.map +1 -1
  25. package/dist/approval/types.js +1 -0
  26. package/dist/context/compaction/factory.cjs +57 -0
  27. package/dist/context/compaction/factory.d.ts +17 -0
  28. package/dist/context/compaction/factory.d.ts.map +1 -0
  29. package/dist/context/compaction/factory.js +34 -0
  30. package/dist/context/compaction/index.cjs +49 -0
  31. package/dist/context/compaction/index.d.ts +11 -0
  32. package/dist/context/compaction/index.d.ts.map +1 -0
  33. package/dist/context/compaction/index.js +19 -0
  34. package/dist/context/{compression → compaction}/overflow.cjs +3 -3
  35. package/dist/context/{compression → compaction}/overflow.d.ts +4 -4
  36. package/dist/context/compaction/overflow.d.ts.map +1 -0
  37. package/dist/context/{compression → compaction}/overflow.js +2 -2
  38. package/dist/context/compaction/provider.cjs +16 -0
  39. package/dist/context/compaction/provider.d.ts +48 -0
  40. package/dist/context/compaction/provider.d.ts.map +1 -0
  41. package/dist/context/compaction/providers/noop-provider.cjs +48 -0
  42. package/dist/context/compaction/providers/noop-provider.d.ts +24 -0
  43. package/dist/context/compaction/providers/noop-provider.d.ts.map +1 -0
  44. package/dist/context/compaction/providers/noop-provider.js +24 -0
  45. package/dist/context/compaction/providers/reactive-overflow-provider.cjs +61 -0
  46. package/dist/context/compaction/providers/reactive-overflow-provider.d.ts +36 -0
  47. package/dist/context/compaction/providers/reactive-overflow-provider.d.ts.map +1 -0
  48. package/dist/context/compaction/providers/reactive-overflow-provider.js +37 -0
  49. package/dist/context/compaction/registry.cjs +39 -0
  50. package/dist/context/compaction/registry.d.ts +19 -0
  51. package/dist/context/compaction/registry.d.ts.map +1 -0
  52. package/dist/context/compaction/registry.js +16 -0
  53. package/dist/context/compaction/schemas.cjs +38 -0
  54. package/dist/context/compaction/schemas.d.ts +24 -0
  55. package/dist/context/compaction/schemas.d.ts.map +1 -0
  56. package/dist/context/compaction/schemas.js +14 -0
  57. package/dist/context/compaction/strategies/noop.cjs +36 -0
  58. package/dist/context/compaction/strategies/noop.d.ts +18 -0
  59. package/dist/context/compaction/strategies/noop.d.ts.map +1 -0
  60. package/dist/context/compaction/strategies/noop.js +13 -0
  61. package/dist/context/{compression → compaction/strategies}/reactive-overflow.cjs +3 -3
  62. package/dist/context/{compression → compaction/strategies}/reactive-overflow.d.ts +6 -6
  63. package/dist/context/compaction/strategies/reactive-overflow.d.ts.map +1 -0
  64. package/dist/context/{compression → compaction/strategies}/reactive-overflow.js +4 -4
  65. package/dist/context/{compression → compaction}/types.d.ts +4 -4
  66. package/dist/context/compaction/types.d.ts.map +1 -0
  67. package/dist/context/compaction/types.js +0 -0
  68. package/dist/context/error-codes.cjs +4 -0
  69. package/dist/context/error-codes.d.ts +4 -0
  70. package/dist/context/error-codes.d.ts.map +1 -1
  71. package/dist/context/error-codes.js +4 -0
  72. package/dist/context/errors.cjs +40 -0
  73. package/dist/context/errors.d.ts +14 -0
  74. package/dist/context/errors.d.ts.map +1 -1
  75. package/dist/context/errors.js +40 -0
  76. package/dist/context/index.cjs +3 -1
  77. package/dist/context/index.d.ts +1 -0
  78. package/dist/context/index.d.ts.map +1 -1
  79. package/dist/context/index.js +1 -0
  80. package/dist/context/types.d.ts +6 -0
  81. package/dist/context/types.d.ts.map +1 -1
  82. package/dist/context/utils.cjs +27 -7
  83. package/dist/context/utils.d.ts.map +1 -1
  84. package/dist/context/utils.js +27 -7
  85. package/dist/errors/result-bridge.cjs +2 -3
  86. package/dist/errors/result-bridge.d.ts.map +1 -1
  87. package/dist/errors/result-bridge.js +2 -3
  88. package/dist/events/index.cjs +6 -3
  89. package/dist/events/index.d.ts +35 -19
  90. package/dist/events/index.d.ts.map +1 -1
  91. package/dist/events/index.js +5 -3
  92. package/dist/filesystem/filesystem-service.cjs +39 -0
  93. package/dist/filesystem/filesystem-service.d.ts +32 -0
  94. package/dist/filesystem/filesystem-service.d.ts.map +1 -1
  95. package/dist/filesystem/filesystem-service.js +39 -0
  96. package/dist/filesystem/index.d.ts +1 -1
  97. package/dist/filesystem/index.d.ts.map +1 -1
  98. package/dist/filesystem/path-validator.cjs +69 -1
  99. package/dist/filesystem/path-validator.d.ts +43 -2
  100. package/dist/filesystem/path-validator.d.ts.map +1 -1
  101. package/dist/filesystem/path-validator.js +69 -1
  102. package/dist/image/define-image.cjs +146 -0
  103. package/dist/image/define-image.d.ts +71 -0
  104. package/dist/image/define-image.d.ts.map +1 -0
  105. package/dist/image/define-image.js +121 -0
  106. package/dist/image/index.cjs +32 -0
  107. package/dist/image/index.d.ts +53 -0
  108. package/dist/image/index.d.ts.map +1 -0
  109. package/dist/image/index.js +7 -0
  110. package/dist/image/types.cjs +16 -0
  111. package/dist/image/types.d.ts +231 -0
  112. package/dist/image/types.d.ts.map +1 -0
  113. package/dist/image/types.js +0 -0
  114. package/dist/index.cjs +5 -1
  115. package/dist/index.d.ts +2 -0
  116. package/dist/index.d.ts.map +1 -1
  117. package/dist/index.js +2 -0
  118. package/dist/llm/error-codes.cjs +1 -0
  119. package/dist/llm/error-codes.d.ts +1 -0
  120. package/dist/llm/error-codes.d.ts.map +1 -1
  121. package/dist/llm/error-codes.js +1 -0
  122. package/dist/llm/errors.cjs +24 -0
  123. package/dist/llm/errors.d.ts +19 -6
  124. package/dist/llm/errors.d.ts.map +1 -1
  125. package/dist/llm/errors.js +24 -0
  126. package/dist/llm/executor/provider-options.cjs +87 -0
  127. package/dist/llm/executor/provider-options.d.ts +49 -0
  128. package/dist/llm/executor/provider-options.d.ts.map +1 -0
  129. package/dist/llm/executor/provider-options.js +63 -0
  130. package/dist/llm/executor/stream-processor.cjs +22 -11
  131. package/dist/llm/executor/stream-processor.d.ts.map +1 -1
  132. package/dist/llm/executor/stream-processor.js +22 -11
  133. package/dist/llm/executor/turn-executor.cjs +60 -23
  134. package/dist/llm/executor/turn-executor.d.ts +7 -5
  135. package/dist/llm/executor/turn-executor.d.ts.map +1 -1
  136. package/dist/llm/executor/turn-executor.js +60 -23
  137. package/dist/llm/formatters/vercel.cjs +15 -3
  138. package/dist/llm/formatters/vercel.d.ts.map +1 -1
  139. package/dist/llm/formatters/vercel.js +15 -3
  140. package/dist/llm/index.cjs +18 -1
  141. package/dist/llm/index.d.ts +2 -0
  142. package/dist/llm/index.d.ts.map +1 -1
  143. package/dist/llm/index.js +14 -0
  144. package/dist/llm/providers/local/ai-sdk-adapter.cjs +308 -0
  145. package/dist/llm/providers/local/ai-sdk-adapter.d.ts +29 -0
  146. package/dist/llm/providers/local/ai-sdk-adapter.d.ts.map +1 -0
  147. package/dist/llm/providers/local/ai-sdk-adapter.js +278 -0
  148. package/dist/llm/providers/local/downloader.cjs +291 -0
  149. package/dist/llm/providers/local/downloader.d.ts +82 -0
  150. package/dist/llm/providers/local/downloader.d.ts.map +1 -0
  151. package/dist/llm/providers/local/downloader.js +251 -0
  152. package/dist/llm/providers/local/error-codes.cjs +57 -0
  153. package/dist/llm/providers/local/error-codes.d.ts +66 -0
  154. package/dist/llm/providers/local/error-codes.d.ts.map +1 -0
  155. package/dist/llm/providers/local/error-codes.js +34 -0
  156. package/dist/llm/providers/local/errors.cjs +240 -0
  157. package/dist/llm/providers/local/errors.d.ts +31 -0
  158. package/dist/llm/providers/local/errors.d.ts.map +1 -0
  159. package/dist/llm/providers/local/errors.js +217 -0
  160. package/dist/llm/providers/local/gpu-detector.cjs +214 -0
  161. package/dist/llm/providers/local/gpu-detector.d.ts +28 -0
  162. package/dist/llm/providers/local/gpu-detector.d.ts.map +1 -0
  163. package/dist/llm/providers/local/gpu-detector.js +178 -0
  164. package/dist/llm/providers/local/index.cjs +147 -0
  165. package/dist/llm/providers/local/index.d.ts +21 -0
  166. package/dist/llm/providers/local/index.d.ts.map +1 -0
  167. package/dist/llm/providers/local/index.js +126 -0
  168. package/dist/llm/providers/local/node-llama-provider.cjs +216 -0
  169. package/dist/llm/providers/local/node-llama-provider.d.ts +90 -0
  170. package/dist/llm/providers/local/node-llama-provider.d.ts.map +1 -0
  171. package/dist/llm/providers/local/node-llama-provider.js +176 -0
  172. package/dist/llm/providers/local/ollama-provider.cjs +230 -0
  173. package/dist/llm/providers/local/ollama-provider.d.ts +70 -0
  174. package/dist/llm/providers/local/ollama-provider.d.ts.map +1 -0
  175. package/dist/llm/providers/local/ollama-provider.js +198 -0
  176. package/dist/llm/providers/local/registry.cjs +343 -0
  177. package/dist/llm/providers/local/registry.d.ts +51 -0
  178. package/dist/llm/providers/local/registry.d.ts.map +1 -0
  179. package/dist/llm/providers/local/registry.js +312 -0
  180. package/dist/llm/providers/local/schemas.cjs +169 -0
  181. package/dist/llm/providers/local/schemas.d.ts +395 -0
  182. package/dist/llm/providers/local/schemas.d.ts.map +1 -0
  183. package/dist/llm/providers/local/schemas.js +133 -0
  184. package/dist/llm/providers/local/types.cjs +16 -0
  185. package/dist/llm/providers/local/types.d.ts +219 -0
  186. package/dist/llm/providers/local/types.d.ts.map +1 -0
  187. package/dist/llm/providers/local/types.js +0 -0
  188. package/dist/llm/providers/openrouter-model-registry.cjs +350 -0
  189. package/dist/llm/providers/openrouter-model-registry.d.ts +120 -0
  190. package/dist/llm/providers/openrouter-model-registry.d.ts.map +1 -0
  191. package/dist/llm/providers/openrouter-model-registry.js +309 -0
  192. package/dist/llm/registry.cjs +604 -9
  193. package/dist/llm/registry.d.ts +35 -0
  194. package/dist/llm/registry.d.ts.map +1 -1
  195. package/dist/llm/registry.js +600 -9
  196. package/dist/llm/resolver.cjs +63 -5
  197. package/dist/llm/resolver.d.ts +3 -3
  198. package/dist/llm/resolver.d.ts.map +1 -1
  199. package/dist/llm/resolver.js +69 -6
  200. package/dist/llm/schemas.cjs +107 -81
  201. package/dist/llm/schemas.d.ts +181 -22
  202. package/dist/llm/schemas.d.ts.map +1 -1
  203. package/dist/llm/schemas.js +107 -81
  204. package/dist/llm/services/factory.cjs +87 -13
  205. package/dist/llm/services/factory.d.ts +4 -1
  206. package/dist/llm/services/factory.d.ts.map +1 -1
  207. package/dist/llm/services/factory.js +85 -12
  208. package/dist/llm/services/test-utils.integration.cjs +22 -2
  209. package/dist/llm/services/test-utils.integration.d.ts +7 -1
  210. package/dist/llm/services/test-utils.integration.d.ts.map +1 -1
  211. package/dist/llm/services/test-utils.integration.js +26 -3
  212. package/dist/llm/services/vercel.cjs +8 -3
  213. package/dist/llm/services/vercel.d.ts +3 -2
  214. package/dist/llm/services/vercel.d.ts.map +1 -1
  215. package/dist/llm/services/vercel.js +8 -3
  216. package/dist/llm/types.cjs +11 -1
  217. package/dist/llm/types.d.ts +1 -1
  218. package/dist/llm/types.d.ts.map +1 -1
  219. package/dist/llm/types.js +11 -1
  220. package/dist/logger/logger.cjs +7 -3
  221. package/dist/logger/logger.d.ts.map +1 -1
  222. package/dist/logger/logger.js +7 -3
  223. package/dist/mcp/manager.cjs +8 -0
  224. package/dist/mcp/manager.d.ts +17 -0
  225. package/dist/mcp/manager.d.ts.map +1 -1
  226. package/dist/mcp/manager.js +8 -0
  227. package/dist/mcp/mcp-client.cjs +0 -3
  228. package/dist/mcp/mcp-client.d.ts.map +1 -1
  229. package/dist/mcp/mcp-client.js +0 -3
  230. package/dist/memory/schemas.d.ts +3 -3
  231. package/dist/plugins/error-codes.cjs +3 -0
  232. package/dist/plugins/error-codes.d.ts +7 -1
  233. package/dist/plugins/error-codes.d.ts.map +1 -1
  234. package/dist/plugins/error-codes.js +3 -0
  235. package/dist/plugins/index.cjs +7 -0
  236. package/dist/plugins/index.d.ts +4 -2
  237. package/dist/plugins/index.d.ts.map +1 -1
  238. package/dist/plugins/index.js +6 -1
  239. package/dist/plugins/manager.cjs +92 -7
  240. package/dist/plugins/manager.d.ts +10 -3
  241. package/dist/plugins/manager.d.ts.map +1 -1
  242. package/dist/plugins/manager.js +92 -7
  243. package/dist/plugins/registry.cjs +63 -0
  244. package/dist/plugins/registry.d.ts +101 -0
  245. package/dist/plugins/registry.d.ts.map +1 -0
  246. package/dist/plugins/registry.js +39 -0
  247. package/dist/plugins/schemas.cjs +17 -5
  248. package/dist/plugins/schemas.d.ts +62 -5
  249. package/dist/plugins/schemas.d.ts.map +1 -1
  250. package/dist/plugins/schemas.js +15 -4
  251. package/dist/providers/base-registry.cjs +147 -0
  252. package/dist/providers/base-registry.d.ts +147 -0
  253. package/dist/providers/base-registry.d.ts.map +1 -0
  254. package/dist/providers/base-registry.js +123 -0
  255. package/dist/providers/discovery.cjs +109 -0
  256. package/dist/providers/discovery.d.ts +96 -0
  257. package/dist/providers/discovery.d.ts.map +1 -0
  258. package/dist/providers/discovery.js +84 -0
  259. package/dist/providers/index.cjs +24 -0
  260. package/dist/providers/index.d.ts +32 -0
  261. package/dist/providers/index.d.ts.map +1 -0
  262. package/dist/providers/index.js +2 -0
  263. package/dist/resources/reference-parser.cjs +3 -3
  264. package/dist/resources/reference-parser.d.ts.map +1 -1
  265. package/dist/resources/reference-parser.js +3 -3
  266. package/dist/session/chat-session.cjs +20 -3
  267. package/dist/session/chat-session.d.ts.map +1 -1
  268. package/dist/session/chat-session.js +21 -4
  269. package/dist/session/history/database.cjs +49 -15
  270. package/dist/session/history/database.d.ts.map +1 -1
  271. package/dist/session/history/database.js +49 -15
  272. package/dist/session/session-manager.cjs +2 -1
  273. package/dist/session/session-manager.d.ts.map +1 -1
  274. package/dist/session/session-manager.js +2 -1
  275. package/dist/storage/blob/factory.cjs +8 -11
  276. package/dist/storage/blob/factory.d.ts +32 -6
  277. package/dist/storage/blob/factory.d.ts.map +1 -1
  278. package/dist/storage/blob/factory.js +8 -11
  279. package/dist/storage/blob/index.cjs +56 -0
  280. package/dist/storage/blob/index.d.ts +45 -0
  281. package/dist/storage/blob/index.d.ts.map +1 -0
  282. package/dist/storage/blob/index.js +30 -0
  283. package/dist/storage/blob/provider.cjs +16 -0
  284. package/dist/storage/blob/provider.d.ts +50 -0
  285. package/dist/storage/blob/provider.d.ts.map +1 -0
  286. package/dist/storage/blob/provider.js +0 -0
  287. package/dist/storage/blob/providers/index.cjs +31 -0
  288. package/dist/storage/blob/providers/index.d.ts +8 -0
  289. package/dist/storage/blob/providers/index.d.ts.map +1 -0
  290. package/dist/storage/blob/providers/index.js +7 -0
  291. package/dist/storage/blob/providers/local.cjs +39 -0
  292. package/dist/storage/blob/providers/local.d.ts +17 -0
  293. package/dist/storage/blob/providers/local.d.ts.map +1 -0
  294. package/dist/storage/blob/providers/local.js +16 -0
  295. package/dist/storage/blob/providers/memory.cjs +39 -0
  296. package/dist/storage/blob/providers/memory.d.ts +17 -0
  297. package/dist/storage/blob/providers/memory.d.ts.map +1 -0
  298. package/dist/storage/blob/providers/memory.js +16 -0
  299. package/dist/storage/blob/registry.cjs +50 -0
  300. package/dist/storage/blob/registry.d.ts +42 -0
  301. package/dist/storage/blob/registry.d.ts.map +1 -0
  302. package/dist/storage/blob/registry.js +26 -0
  303. package/dist/storage/blob/schemas.cjs +9 -12
  304. package/dist/storage/blob/schemas.d.ts +39 -34
  305. package/dist/storage/blob/schemas.d.ts.map +1 -1
  306. package/dist/storage/blob/schemas.js +6 -11
  307. package/dist/storage/cache/factory.cjs +8 -36
  308. package/dist/storage/cache/factory.d.ts +32 -7
  309. package/dist/storage/cache/factory.d.ts.map +1 -1
  310. package/dist/storage/cache/factory.js +8 -26
  311. package/dist/storage/cache/index.cjs +53 -0
  312. package/dist/storage/cache/index.d.ts +44 -0
  313. package/dist/storage/cache/index.d.ts.map +1 -0
  314. package/dist/storage/cache/index.js +28 -0
  315. package/dist/storage/cache/provider.cjs +16 -0
  316. package/dist/storage/cache/provider.d.ts +56 -0
  317. package/dist/storage/cache/provider.d.ts.map +1 -0
  318. package/dist/storage/cache/provider.js +0 -0
  319. package/dist/storage/cache/providers/index.cjs +31 -0
  320. package/dist/storage/cache/providers/index.d.ts +8 -0
  321. package/dist/storage/cache/providers/index.d.ts.map +1 -0
  322. package/dist/storage/cache/providers/index.js +7 -0
  323. package/dist/storage/cache/providers/memory.cjs +40 -0
  324. package/dist/storage/cache/providers/memory.d.ts +17 -0
  325. package/dist/storage/cache/providers/memory.d.ts.map +1 -0
  326. package/dist/storage/cache/providers/memory.js +17 -0
  327. package/dist/storage/cache/providers/redis.cjs +66 -0
  328. package/dist/storage/cache/providers/redis.d.ts +20 -0
  329. package/dist/storage/cache/providers/redis.d.ts.map +1 -0
  330. package/dist/storage/cache/providers/redis.js +33 -0
  331. package/dist/storage/cache/registry.cjs +50 -0
  332. package/dist/storage/cache/registry.d.ts +42 -0
  333. package/dist/storage/cache/registry.d.ts.map +1 -0
  334. package/dist/storage/cache/registry.js +26 -0
  335. package/dist/storage/cache/schemas.cjs +6 -2
  336. package/dist/storage/cache/schemas.d.ts +2 -3
  337. package/dist/storage/cache/schemas.d.ts.map +1 -1
  338. package/dist/storage/cache/schemas.js +3 -1
  339. package/dist/storage/database/factory.cjs +8 -47
  340. package/dist/storage/database/factory.d.ts +34 -8
  341. package/dist/storage/database/factory.d.ts.map +1 -1
  342. package/dist/storage/database/factory.js +8 -37
  343. package/dist/storage/database/index.cjs +58 -0
  344. package/dist/storage/database/index.d.ts +45 -0
  345. package/dist/storage/database/index.d.ts.map +1 -0
  346. package/dist/storage/database/index.js +37 -0
  347. package/dist/storage/database/postgres-store.cjs +174 -78
  348. package/dist/storage/database/postgres-store.d.ts +19 -0
  349. package/dist/storage/database/postgres-store.d.ts.map +1 -1
  350. package/dist/storage/database/postgres-store.js +174 -78
  351. package/dist/storage/database/provider.cjs +16 -0
  352. package/dist/storage/database/provider.d.ts +56 -0
  353. package/dist/storage/database/provider.d.ts.map +1 -0
  354. package/dist/storage/database/provider.js +0 -0
  355. package/dist/storage/database/providers/index.cjs +34 -0
  356. package/dist/storage/database/providers/index.d.ts +9 -0
  357. package/dist/storage/database/providers/index.d.ts.map +1 -0
  358. package/dist/storage/database/providers/index.js +9 -0
  359. package/dist/storage/database/providers/memory.cjs +40 -0
  360. package/dist/storage/database/providers/memory.d.ts +16 -0
  361. package/dist/storage/database/providers/memory.d.ts.map +1 -0
  362. package/dist/storage/database/providers/memory.js +17 -0
  363. package/dist/storage/database/providers/postgres.cjs +62 -0
  364. package/dist/storage/database/providers/postgres.d.ts +19 -0
  365. package/dist/storage/database/providers/postgres.d.ts.map +1 -0
  366. package/dist/storage/database/providers/postgres.js +29 -0
  367. package/dist/storage/database/providers/sqlite.cjs +66 -0
  368. package/dist/storage/database/providers/sqlite.d.ts +20 -0
  369. package/dist/storage/database/providers/sqlite.d.ts.map +1 -0
  370. package/dist/storage/database/providers/sqlite.js +33 -0
  371. package/dist/storage/database/registry.cjs +50 -0
  372. package/dist/storage/database/registry.d.ts +42 -0
  373. package/dist/storage/database/registry.d.ts.map +1 -0
  374. package/dist/storage/database/registry.js +26 -0
  375. package/dist/storage/database/schemas.cjs +12 -3
  376. package/dist/storage/database/schemas.d.ts +11 -4
  377. package/dist/storage/database/schemas.d.ts.map +1 -1
  378. package/dist/storage/database/schemas.js +8 -2
  379. package/dist/storage/error-codes.cjs +6 -0
  380. package/dist/storage/error-codes.d.ts +7 -1
  381. package/dist/storage/error-codes.d.ts.map +1 -1
  382. package/dist/storage/error-codes.js +6 -0
  383. package/dist/storage/errors.cjs +80 -0
  384. package/dist/storage/errors.d.ts +24 -0
  385. package/dist/storage/errors.d.ts.map +1 -1
  386. package/dist/storage/errors.js +80 -0
  387. package/dist/storage/index.cjs +47 -4
  388. package/dist/storage/index.d.ts +34 -8
  389. package/dist/storage/index.d.ts.map +1 -1
  390. package/dist/storage/index.js +32 -3
  391. package/dist/storage/schemas.cjs +4 -0
  392. package/dist/storage/schemas.d.ts +24 -50
  393. package/dist/storage/schemas.d.ts.map +1 -1
  394. package/dist/storage/schemas.js +5 -1
  395. package/dist/storage/storage-manager.cjs +6 -6
  396. package/dist/storage/storage-manager.d.ts.map +1 -1
  397. package/dist/storage/storage-manager.js +3 -3
  398. package/dist/systemPrompt/in-built-prompts.cjs +7 -6
  399. package/dist/systemPrompt/in-built-prompts.d.ts +2 -2
  400. package/dist/systemPrompt/in-built-prompts.d.ts.map +1 -1
  401. package/dist/systemPrompt/in-built-prompts.js +6 -5
  402. package/dist/systemPrompt/registry.cjs +2 -2
  403. package/dist/systemPrompt/registry.d.ts +1 -1
  404. package/dist/systemPrompt/registry.d.ts.map +1 -1
  405. package/dist/systemPrompt/registry.js +2 -2
  406. package/dist/systemPrompt/schemas.cjs +2 -2
  407. package/dist/systemPrompt/schemas.d.ts +13 -13
  408. package/dist/systemPrompt/schemas.js +2 -2
  409. package/dist/tools/custom-tool-registry.cjs +64 -0
  410. package/dist/tools/custom-tool-registry.d.ts +126 -0
  411. package/dist/tools/custom-tool-registry.d.ts.map +1 -0
  412. package/dist/tools/custom-tool-registry.js +40 -0
  413. package/dist/tools/custom-tool-schema-registry.cjs +164 -0
  414. package/dist/tools/custom-tool-schema-registry.d.ts +86 -0
  415. package/dist/tools/custom-tool-schema-registry.d.ts.map +1 -0
  416. package/dist/tools/custom-tool-schema-registry.js +140 -0
  417. package/dist/tools/error-codes.cjs +3 -0
  418. package/dist/tools/error-codes.d.ts +4 -1
  419. package/dist/tools/error-codes.d.ts.map +1 -1
  420. package/dist/tools/error-codes.js +3 -0
  421. package/dist/tools/errors.cjs +41 -0
  422. package/dist/tools/errors.d.ts +17 -0
  423. package/dist/tools/errors.d.ts.map +1 -1
  424. package/dist/tools/errors.js +41 -0
  425. package/dist/tools/index.cjs +13 -1
  426. package/dist/tools/index.d.ts +4 -0
  427. package/dist/tools/index.d.ts.map +1 -1
  428. package/dist/tools/index.js +11 -1
  429. package/dist/tools/internal-tools/constants.cjs +3 -9
  430. package/dist/tools/internal-tools/constants.d.ts +1 -1
  431. package/dist/tools/internal-tools/constants.d.ts.map +1 -1
  432. package/dist/tools/internal-tools/constants.js +3 -9
  433. package/dist/tools/internal-tools/implementations/get-resource-tool.cjs +113 -0
  434. package/dist/tools/internal-tools/implementations/get-resource-tool.d.ts +30 -0
  435. package/dist/tools/internal-tools/implementations/get-resource-tool.d.ts.map +1 -0
  436. package/dist/tools/internal-tools/implementations/get-resource-tool.js +90 -0
  437. package/dist/tools/internal-tools/implementations/list-resources-tool.cjs +91 -0
  438. package/dist/tools/internal-tools/implementations/list-resources-tool.d.ts +24 -0
  439. package/dist/tools/internal-tools/implementations/list-resources-tool.d.ts.map +1 -0
  440. package/dist/tools/internal-tools/implementations/list-resources-tool.js +68 -0
  441. package/dist/tools/internal-tools/provider.cjs +153 -23
  442. package/dist/tools/internal-tools/provider.d.ts +55 -10
  443. package/dist/tools/internal-tools/provider.d.ts.map +1 -1
  444. package/dist/tools/internal-tools/provider.js +153 -23
  445. package/dist/tools/internal-tools/registry.cjs +18 -43
  446. package/dist/tools/internal-tools/registry.d.ts +4 -4
  447. package/dist/tools/internal-tools/registry.d.ts.map +1 -1
  448. package/dist/tools/internal-tools/registry.js +18 -43
  449. package/dist/tools/schemas.cjs +20 -0
  450. package/dist/tools/schemas.d.ts +43 -1
  451. package/dist/tools/schemas.d.ts.map +1 -1
  452. package/dist/tools/schemas.js +16 -0
  453. package/dist/tools/tool-manager.cjs +140 -13
  454. package/dist/tools/tool-manager.d.ts +22 -3
  455. package/dist/tools/tool-manager.d.ts.map +1 -1
  456. package/dist/tools/tool-manager.js +140 -13
  457. package/dist/tools/types.d.ts +43 -0
  458. package/dist/tools/types.d.ts.map +1 -1
  459. package/dist/utils/api-key-resolver.cjs +19 -1
  460. package/dist/utils/api-key-resolver.d.ts.map +1 -1
  461. package/dist/utils/api-key-resolver.js +19 -1
  462. package/dist/utils/index.cjs +0 -2
  463. package/dist/utils/index.d.ts +0 -1
  464. package/dist/utils/index.d.ts.map +1 -1
  465. package/dist/utils/index.js +0 -1
  466. package/dist/utils/redactor.cjs +18 -3
  467. package/dist/utils/redactor.d.ts +0 -7
  468. package/dist/utils/redactor.d.ts.map +1 -1
  469. package/dist/utils/redactor.js +18 -3
  470. package/dist/utils/service-initializer.cjs +9 -35
  471. package/dist/utils/service-initializer.d.ts.map +1 -1
  472. package/dist/utils/service-initializer.js +9 -35
  473. package/package.json +5 -2
  474. package/dist/context/compression/overflow.d.ts.map +0 -1
  475. package/dist/context/compression/reactive-overflow.d.ts.map +0 -1
  476. package/dist/context/compression/types.d.ts.map +0 -1
  477. package/dist/tools/internal-tools/implementations/bash-exec-tool.cjs +0 -130
  478. package/dist/tools/internal-tools/implementations/bash-exec-tool.d.ts +0 -13
  479. package/dist/tools/internal-tools/implementations/bash-exec-tool.d.ts.map +0 -1
  480. package/dist/tools/internal-tools/implementations/bash-exec-tool.js +0 -97
  481. package/dist/tools/internal-tools/implementations/bash-output-tool.cjs +0 -49
  482. package/dist/tools/internal-tools/implementations/bash-output-tool.d.ts +0 -12
  483. package/dist/tools/internal-tools/implementations/bash-output-tool.d.ts.map +0 -1
  484. package/dist/tools/internal-tools/implementations/bash-output-tool.js +0 -26
  485. package/dist/tools/internal-tools/implementations/edit-file-tool.cjs +0 -127
  486. package/dist/tools/internal-tools/implementations/edit-file-tool.d.ts +0 -12
  487. package/dist/tools/internal-tools/implementations/edit-file-tool.d.ts.map +0 -1
  488. package/dist/tools/internal-tools/implementations/edit-file-tool.js +0 -104
  489. package/dist/tools/internal-tools/implementations/glob-files-tool.cjs +0 -70
  490. package/dist/tools/internal-tools/implementations/glob-files-tool.d.ts +0 -12
  491. package/dist/tools/internal-tools/implementations/glob-files-tool.d.ts.map +0 -1
  492. package/dist/tools/internal-tools/implementations/glob-files-tool.js +0 -47
  493. package/dist/tools/internal-tools/implementations/grep-content-tool.cjs +0 -86
  494. package/dist/tools/internal-tools/implementations/grep-content-tool.d.ts +0 -12
  495. package/dist/tools/internal-tools/implementations/grep-content-tool.d.ts.map +0 -1
  496. package/dist/tools/internal-tools/implementations/grep-content-tool.js +0 -63
  497. package/dist/tools/internal-tools/implementations/kill-process-tool.cjs +0 -47
  498. package/dist/tools/internal-tools/implementations/kill-process-tool.d.ts +0 -12
  499. package/dist/tools/internal-tools/implementations/kill-process-tool.d.ts.map +0 -1
  500. package/dist/tools/internal-tools/implementations/kill-process-tool.js +0 -24
  501. package/dist/tools/internal-tools/implementations/read-file-tool.cjs +0 -63
  502. package/dist/tools/internal-tools/implementations/read-file-tool.d.ts +0 -12
  503. package/dist/tools/internal-tools/implementations/read-file-tool.d.ts.map +0 -1
  504. package/dist/tools/internal-tools/implementations/read-file-tool.js +0 -40
  505. package/dist/tools/internal-tools/implementations/write-file-tool.cjs +0 -124
  506. package/dist/tools/internal-tools/implementations/write-file-tool.d.ts +0 -12
  507. package/dist/tools/internal-tools/implementations/write-file-tool.d.ts.map +0 -1
  508. package/dist/tools/internal-tools/implementations/write-file-tool.js +0 -103
  509. package/dist/utils/env-file.cjs +0 -118
  510. package/dist/utils/env-file.d.ts +0 -5
  511. package/dist/utils/env-file.d.ts.map +0 -1
  512. package/dist/utils/env-file.js +0 -85
  513. /package/dist/context/{compression/types.js → compaction/provider.js} +0 -0
  514. /package/dist/context/{compression → compaction}/types.cjs +0 -0
@@ -91,6 +91,45 @@ class FileSystemService {
91
91
  this.initialized = true;
92
92
  this.logger.info("FileSystemService initialized successfully");
93
93
  }
94
+ /**
95
+ * Check if a file path is within the configured allowed paths.
96
+ * This is a public method for external consumers (like ToolManager) to check
97
+ * if a path requires directory approval before file operations.
98
+ *
99
+ * @param filePath The file path to check (can be relative or absolute)
100
+ * @returns true if the path is within allowed paths, false otherwise
101
+ */
102
+ isPathWithinAllowed(filePath) {
103
+ return this.pathValidator.isPathWithinAllowed(filePath);
104
+ }
105
+ /**
106
+ * Get the list of configured allowed paths.
107
+ * Useful for displaying to users when directory approval is needed.
108
+ *
109
+ * @returns Array of allowed path strings
110
+ */
111
+ getAllowedPaths() {
112
+ return this.pathValidator.getAllowedPaths();
113
+ }
114
+ /**
115
+ * Get the parent directory of a file path (resolved to absolute).
116
+ * Useful for directory approval requests.
117
+ *
118
+ * @param filePath The file path
119
+ * @returns The absolute parent directory path
120
+ */
121
+ getParentDirectory(filePath) {
122
+ return path.dirname(path.resolve(filePath));
123
+ }
124
+ /**
125
+ * Set a callback to check if a path is in an approved directory.
126
+ * This allows PathValidator to consult ApprovalManager without a direct dependency.
127
+ *
128
+ * @param checker Function that returns true if path is in an approved directory
129
+ */
130
+ setDirectoryApprovalChecker(checker) {
131
+ this.pathValidator.setDirectoryApprovalChecker(checker);
132
+ }
94
133
  /**
95
134
  * Read a file with validation and size limits
96
135
  */
@@ -4,6 +4,7 @@
4
4
  * Secure file system operations for Dexto internal tools
5
5
  */
6
6
  import { FileSystemConfig, FileContent, ReadFileOptions, GlobOptions, GlobResult, GrepOptions, SearchResult, WriteFileOptions, WriteResult, EditFileOptions, EditResult, EditOperation } from './types.js';
7
+ import { type DirectoryApprovalChecker } from './path-validator.js';
7
8
  import type { IDextoLogger } from '../logger/v2/types.js';
8
9
  /**
9
10
  * FileSystemService - Handles all file system operations with security checks
@@ -25,6 +26,37 @@ export declare class FileSystemService {
25
26
  * Initialize the service
26
27
  */
27
28
  initialize(): Promise<void>;
29
+ /**
30
+ * Check if a file path is within the configured allowed paths.
31
+ * This is a public method for external consumers (like ToolManager) to check
32
+ * if a path requires directory approval before file operations.
33
+ *
34
+ * @param filePath The file path to check (can be relative or absolute)
35
+ * @returns true if the path is within allowed paths, false otherwise
36
+ */
37
+ isPathWithinAllowed(filePath: string): boolean;
38
+ /**
39
+ * Get the list of configured allowed paths.
40
+ * Useful for displaying to users when directory approval is needed.
41
+ *
42
+ * @returns Array of allowed path strings
43
+ */
44
+ getAllowedPaths(): string[];
45
+ /**
46
+ * Get the parent directory of a file path (resolved to absolute).
47
+ * Useful for directory approval requests.
48
+ *
49
+ * @param filePath The file path
50
+ * @returns The absolute parent directory path
51
+ */
52
+ getParentDirectory(filePath: string): string;
53
+ /**
54
+ * Set a callback to check if a path is in an approved directory.
55
+ * This allows PathValidator to consult ApprovalManager without a direct dependency.
56
+ *
57
+ * @param checker Function that returns true if path is in an approved directory
58
+ */
59
+ setDirectoryApprovalChecker(checker: DirectoryApprovalChecker): void;
28
60
  /**
29
61
  * Read a file with validation and size limits
30
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem-service.d.ts","sourceRoot":"","sources":["../../src/filesystem/filesystem-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EACH,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EAEZ,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,EAGhB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQ1D;;;;GAIG;AACH,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,YAAK,EAAE,MAAM,EAAE,YAAY;IAiBxE;;;OAGG;IACH,OAAO,CAAC,YAAY;IAKpB;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBjC;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;IA+ErF;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAwEhF;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqGtF;;OAEG;IACG,SAAS,CACX,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,gBAAqB,GAC/B,OAAO,CAAC,WAAW,CAAC;IA0DvB;;OAEG;IACG,QAAQ,CACV,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,aAAa,EACxB,OAAO,GAAE,eAAoB,GAC9B,OAAO,CAAC,UAAU,CAAC;IAoEtB;;OAEG;YACW,YAAY;IA0B1B;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;IA6D1C;;OAEG;IACH,SAAS,IAAI,QAAQ,CAAC,gBAAgB,CAAC;IAIvC;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAI3C"}
1
+ {"version":3,"file":"filesystem-service.d.ts","sourceRoot":"","sources":["../../src/filesystem/filesystem-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EACH,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EAEZ,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,EAGhB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAiB,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQ1D;;;;GAIG;AACH,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,YAAK,EAAE,MAAM,EAAE,YAAY;IAiBxE;;;OAGG;IACH,OAAO,CAAC,YAAY;IAKpB;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBjC;;;;;;;OAOG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI9C;;;;;OAKG;IACH,eAAe,IAAI,MAAM,EAAE;IAI3B;;;;;;OAMG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI5C;;;;;OAKG;IACH,2BAA2B,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI;IAIpE;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;IA+ErF;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAwEhF;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqGtF;;OAEG;IACG,SAAS,CACX,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,gBAAqB,GAC/B,OAAO,CAAC,WAAW,CAAC;IA0DvB;;OAEG;IACG,QAAQ,CACV,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,aAAa,EACxB,OAAO,GAAE,eAAoB,GAC9B,OAAO,CAAC,UAAU,CAAC;IAoEtB;;OAEG;YACW,YAAY;IA0B1B;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;IA6D1C;;OAEG;IACH,SAAS,IAAI,QAAQ,CAAC,gBAAgB,CAAC;IAIvC;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAI3C"}
@@ -59,6 +59,45 @@ class FileSystemService {
59
59
  this.initialized = true;
60
60
  this.logger.info("FileSystemService initialized successfully");
61
61
  }
62
+ /**
63
+ * Check if a file path is within the configured allowed paths.
64
+ * This is a public method for external consumers (like ToolManager) to check
65
+ * if a path requires directory approval before file operations.
66
+ *
67
+ * @param filePath The file path to check (can be relative or absolute)
68
+ * @returns true if the path is within allowed paths, false otherwise
69
+ */
70
+ isPathWithinAllowed(filePath) {
71
+ return this.pathValidator.isPathWithinAllowed(filePath);
72
+ }
73
+ /**
74
+ * Get the list of configured allowed paths.
75
+ * Useful for displaying to users when directory approval is needed.
76
+ *
77
+ * @returns Array of allowed path strings
78
+ */
79
+ getAllowedPaths() {
80
+ return this.pathValidator.getAllowedPaths();
81
+ }
82
+ /**
83
+ * Get the parent directory of a file path (resolved to absolute).
84
+ * Useful for directory approval requests.
85
+ *
86
+ * @param filePath The file path
87
+ * @returns The absolute parent directory path
88
+ */
89
+ getParentDirectory(filePath) {
90
+ return path.dirname(path.resolve(filePath));
91
+ }
92
+ /**
93
+ * Set a callback to check if a path is in an approved directory.
94
+ * This allows PathValidator to consult ApprovalManager without a direct dependency.
95
+ *
96
+ * @param checker Function that returns true if path is in an approved directory
97
+ */
98
+ setDirectoryApprovalChecker(checker) {
99
+ this.pathValidator.setDirectoryApprovalChecker(checker);
100
+ }
62
101
  /**
63
102
  * Read a file with validation and size limits
64
103
  */
@@ -4,7 +4,7 @@
4
4
  * Exports file system service, types, errors, and utilities
5
5
  */
6
6
  export { FileSystemService } from './filesystem-service.js';
7
- export { PathValidator } from './path-validator.js';
7
+ export { PathValidator, type DirectoryApprovalChecker } from './path-validator.js';
8
8
  export { FileSystemError } from './errors.js';
9
9
  export { FileSystemErrorCode } from './error-codes.js';
10
10
  export type { FileSystemConfig, FileContent, ReadFileOptions, GlobOptions, GlobResult, GrepOptions, SearchResult, SearchMatch, WriteFileOptions, WriteResult, EditFileOptions, EditResult, EditOperation, FileMetadata, PathValidation, BufferEncoding, } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filesystem/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EACR,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,cAAc,GACjB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filesystem/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EACR,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,cAAc,GACjB,MAAM,YAAY,CAAC"}
@@ -39,6 +39,7 @@ class PathValidator {
39
39
  normalizedBlockedPaths;
40
40
  normalizedBlockedExtensions;
41
41
  logger;
42
+ directoryApprovalChecker;
42
43
  constructor(config, logger) {
43
44
  this.config = config;
44
45
  this.logger = logger;
@@ -53,6 +54,16 @@ class PathValidator {
53
54
  `PathValidator initialized with ${this.normalizedAllowedPaths.length} allowed paths`
54
55
  );
55
56
  }
57
+ /**
58
+ * Set a callback to check if a path is in an approved directory.
59
+ * This allows PathValidator to consult ApprovalManager without a direct dependency.
60
+ *
61
+ * @param checker Function that returns true if path is in an approved directory
62
+ */
63
+ setDirectoryApprovalChecker(checker) {
64
+ this.directoryApprovalChecker = checker;
65
+ this.logger.debug("Directory approval checker configured");
66
+ }
56
67
  /**
57
68
  * Validate a file path for security and policy compliance
58
69
  */
@@ -123,15 +134,23 @@ class PathValidator {
123
134
  }
124
135
  /**
125
136
  * Check if path is within allowed paths (whitelist check)
137
+ * Also consults the directory approval checker if configured.
126
138
  */
127
139
  isPathAllowed(normalizedPath) {
128
140
  if (this.normalizedAllowedPaths.length === 0) {
129
141
  return true;
130
142
  }
131
- return this.normalizedAllowedPaths.some((allowedPath) => {
143
+ const isInConfigPaths = this.normalizedAllowedPaths.some((allowedPath) => {
132
144
  const relative = path.relative(allowedPath, normalizedPath);
133
145
  return !relative.startsWith("..") && !path.isAbsolute(relative);
134
146
  });
147
+ if (isInConfigPaths) {
148
+ return true;
149
+ }
150
+ if (this.directoryApprovalChecker) {
151
+ return this.directoryApprovalChecker(normalizedPath);
152
+ }
153
+ return false;
135
154
  }
136
155
  /**
137
156
  * Check if path matches blocked patterns (blacklist check)
@@ -154,6 +173,55 @@ class PathValidator {
154
173
  isPathAllowedQuick(normalizedPath) {
155
174
  return this.isPathAllowed(normalizedPath) && !this.isPathBlocked(normalizedPath);
156
175
  }
176
+ /**
177
+ * Check if a file path is within the configured allowed paths (from config only).
178
+ * This method does NOT consult ApprovalManager - it only checks the static config paths.
179
+ *
180
+ * This is used by ToolManager.checkDirectoryAccess() to determine if a path
181
+ * needs directory approval. Paths within config-allowed directories don't need
182
+ * directory approval prompts.
183
+ *
184
+ * @param filePath The file path to check (can be relative or absolute)
185
+ * @returns true if the path is within config-allowed paths, false otherwise
186
+ *
187
+ * @example
188
+ * ```typescript
189
+ * // Check if path needs directory approval
190
+ * if (!pathValidator.isPathWithinAllowed('/external/project/file.ts')) {
191
+ * // Request directory access approval
192
+ * }
193
+ * ```
194
+ */
195
+ isPathWithinAllowed(filePath) {
196
+ if (!filePath || filePath.trim() === "") {
197
+ return false;
198
+ }
199
+ const workingDir = this.config.workingDirectory || process.cwd();
200
+ let normalizedPath;
201
+ try {
202
+ normalizedPath = path.isAbsolute(filePath) ? path.resolve(filePath) : path.resolve(workingDir, filePath);
203
+ try {
204
+ normalizedPath = import_node_fs.realpathSync.native(normalizedPath);
205
+ } catch {
206
+ }
207
+ } catch {
208
+ return false;
209
+ }
210
+ return this.isInConfigAllowedPaths(normalizedPath);
211
+ }
212
+ /**
213
+ * Check if path is within config-allowed paths only (no approval checker).
214
+ * Used for prompting decisions.
215
+ */
216
+ isInConfigAllowedPaths(normalizedPath) {
217
+ if (this.normalizedAllowedPaths.length === 0) {
218
+ return true;
219
+ }
220
+ return this.normalizedAllowedPaths.some((allowedPath) => {
221
+ const relative = path.relative(allowedPath, normalizedPath);
222
+ return !relative.startsWith("..") && !path.isAbsolute(relative);
223
+ });
224
+ }
157
225
  /**
158
226
  * Get normalized allowed paths
159
227
  */
@@ -5,16 +5,23 @@
5
5
  */
6
6
  import { FileSystemConfig, PathValidation } from './types.js';
7
7
  import type { IDextoLogger } from '../logger/v2/types.js';
8
+ /**
9
+ * Callback type for checking if a path is in an approved directory.
10
+ * Used to consult ApprovalManager without creating a direct dependency.
11
+ */
12
+ export type DirectoryApprovalChecker = (filePath: string) => boolean;
8
13
  /**
9
14
  * PathValidator - Validates file paths for security and policy compliance
10
15
  *
11
16
  * Security checks:
12
17
  * 1. Path traversal detection (../, symbolic links)
13
- * 2. Allowed paths enforcement (whitelist)
18
+ * 2. Allowed paths enforcement (whitelist + approved directories)
14
19
  * 3. Blocked paths detection (blacklist)
15
20
  * 4. File extension restrictions
16
21
  * 5. Absolute path normalization
17
- * TODO: Add tests
22
+ *
23
+ * PathValidator can optionally consult an external approval checker (e.g., ApprovalManager)
24
+ * to determine if paths outside the config's allowed paths are accessible.
18
25
  */
19
26
  export declare class PathValidator {
20
27
  private config;
@@ -22,7 +29,15 @@ export declare class PathValidator {
22
29
  private normalizedBlockedPaths;
23
30
  private normalizedBlockedExtensions;
24
31
  private logger;
32
+ private directoryApprovalChecker;
25
33
  constructor(config: FileSystemConfig, logger: IDextoLogger);
34
+ /**
35
+ * Set a callback to check if a path is in an approved directory.
36
+ * This allows PathValidator to consult ApprovalManager without a direct dependency.
37
+ *
38
+ * @param checker Function that returns true if path is in an approved directory
39
+ */
40
+ setDirectoryApprovalChecker(checker: DirectoryApprovalChecker): void;
26
41
  /**
27
42
  * Validate a file path for security and policy compliance
28
43
  */
@@ -33,6 +48,7 @@ export declare class PathValidator {
33
48
  private hasPathTraversal;
34
49
  /**
35
50
  * Check if path is within allowed paths (whitelist check)
51
+ * Also consults the directory approval checker if configured.
36
52
  */
37
53
  private isPathAllowed;
38
54
  /**
@@ -43,6 +59,31 @@ export declare class PathValidator {
43
59
  * Quick check if a path is allowed (for internal use)
44
60
  */
45
61
  isPathAllowedQuick(normalizedPath: string): boolean;
62
+ /**
63
+ * Check if a file path is within the configured allowed paths (from config only).
64
+ * This method does NOT consult ApprovalManager - it only checks the static config paths.
65
+ *
66
+ * This is used by ToolManager.checkDirectoryAccess() to determine if a path
67
+ * needs directory approval. Paths within config-allowed directories don't need
68
+ * directory approval prompts.
69
+ *
70
+ * @param filePath The file path to check (can be relative or absolute)
71
+ * @returns true if the path is within config-allowed paths, false otherwise
72
+ *
73
+ * @example
74
+ * ```typescript
75
+ * // Check if path needs directory approval
76
+ * if (!pathValidator.isPathWithinAllowed('/external/project/file.ts')) {
77
+ * // Request directory access approval
78
+ * }
79
+ * ```
80
+ */
81
+ isPathWithinAllowed(filePath: string): boolean;
82
+ /**
83
+ * Check if path is within config-allowed paths only (no approval checker).
84
+ * Used for prompting decisions.
85
+ */
86
+ private isInConfigAllowedPaths;
46
87
  /**
47
88
  * Get normalized allowed paths
48
89
  */
@@ -1 +1 @@
1
- {"version":3,"file":"path-validator.d.ts","sourceRoot":"","sources":["../../src/filesystem/path-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,sBAAsB,CAAW;IACzC,OAAO,CAAC,sBAAsB,CAAW;IACzC,OAAO,CAAC,2BAA2B,CAAW;IAC9C,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY;IAsB1D;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc;IA0E9C;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;OAEG;IACH,OAAO,CAAC,aAAa;IAcrB;;OAEG;IACH,OAAO,CAAC,aAAa;IAyBrB;;OAEG;IACH,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO;IAInD;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE;IAI3B;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE;CAG9B"}
1
+ {"version":3,"file":"path-validator.d.ts","sourceRoot":"","sources":["../../src/filesystem/path-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,sBAAsB,CAAW;IACzC,OAAO,CAAC,sBAAsB,CAAW;IACzC,OAAO,CAAC,2BAA2B,CAAW;IAC9C,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,wBAAwB,CAAuC;gBAE3D,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY;IAsB1D;;;;;OAKG;IACH,2BAA2B,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI;IAKpE;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc;IA0E9C;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAyBrB;;OAEG;IACH,OAAO,CAAC,aAAa;IAyBrB;;OAEG;IACH,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO;IAInD;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IA8B9C;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE;IAI3B;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE;CAG9B"}
@@ -7,6 +7,7 @@ class PathValidator {
7
7
  normalizedBlockedPaths;
8
8
  normalizedBlockedExtensions;
9
9
  logger;
10
+ directoryApprovalChecker;
10
11
  constructor(config, logger) {
11
12
  this.config = config;
12
13
  this.logger = logger;
@@ -21,6 +22,16 @@ class PathValidator {
21
22
  `PathValidator initialized with ${this.normalizedAllowedPaths.length} allowed paths`
22
23
  );
23
24
  }
25
+ /**
26
+ * Set a callback to check if a path is in an approved directory.
27
+ * This allows PathValidator to consult ApprovalManager without a direct dependency.
28
+ *
29
+ * @param checker Function that returns true if path is in an approved directory
30
+ */
31
+ setDirectoryApprovalChecker(checker) {
32
+ this.directoryApprovalChecker = checker;
33
+ this.logger.debug("Directory approval checker configured");
34
+ }
24
35
  /**
25
36
  * Validate a file path for security and policy compliance
26
37
  */
@@ -91,15 +102,23 @@ class PathValidator {
91
102
  }
92
103
  /**
93
104
  * Check if path is within allowed paths (whitelist check)
105
+ * Also consults the directory approval checker if configured.
94
106
  */
95
107
  isPathAllowed(normalizedPath) {
96
108
  if (this.normalizedAllowedPaths.length === 0) {
97
109
  return true;
98
110
  }
99
- return this.normalizedAllowedPaths.some((allowedPath) => {
111
+ const isInConfigPaths = this.normalizedAllowedPaths.some((allowedPath) => {
100
112
  const relative = path.relative(allowedPath, normalizedPath);
101
113
  return !relative.startsWith("..") && !path.isAbsolute(relative);
102
114
  });
115
+ if (isInConfigPaths) {
116
+ return true;
117
+ }
118
+ if (this.directoryApprovalChecker) {
119
+ return this.directoryApprovalChecker(normalizedPath);
120
+ }
121
+ return false;
103
122
  }
104
123
  /**
105
124
  * Check if path matches blocked patterns (blacklist check)
@@ -122,6 +141,55 @@ class PathValidator {
122
141
  isPathAllowedQuick(normalizedPath) {
123
142
  return this.isPathAllowed(normalizedPath) && !this.isPathBlocked(normalizedPath);
124
143
  }
144
+ /**
145
+ * Check if a file path is within the configured allowed paths (from config only).
146
+ * This method does NOT consult ApprovalManager - it only checks the static config paths.
147
+ *
148
+ * This is used by ToolManager.checkDirectoryAccess() to determine if a path
149
+ * needs directory approval. Paths within config-allowed directories don't need
150
+ * directory approval prompts.
151
+ *
152
+ * @param filePath The file path to check (can be relative or absolute)
153
+ * @returns true if the path is within config-allowed paths, false otherwise
154
+ *
155
+ * @example
156
+ * ```typescript
157
+ * // Check if path needs directory approval
158
+ * if (!pathValidator.isPathWithinAllowed('/external/project/file.ts')) {
159
+ * // Request directory access approval
160
+ * }
161
+ * ```
162
+ */
163
+ isPathWithinAllowed(filePath) {
164
+ if (!filePath || filePath.trim() === "") {
165
+ return false;
166
+ }
167
+ const workingDir = this.config.workingDirectory || process.cwd();
168
+ let normalizedPath;
169
+ try {
170
+ normalizedPath = path.isAbsolute(filePath) ? path.resolve(filePath) : path.resolve(workingDir, filePath);
171
+ try {
172
+ normalizedPath = realpathSync.native(normalizedPath);
173
+ } catch {
174
+ }
175
+ } catch {
176
+ return false;
177
+ }
178
+ return this.isInConfigAllowedPaths(normalizedPath);
179
+ }
180
+ /**
181
+ * Check if path is within config-allowed paths only (no approval checker).
182
+ * Used for prompting decisions.
183
+ */
184
+ isInConfigAllowedPaths(normalizedPath) {
185
+ if (this.normalizedAllowedPaths.length === 0) {
186
+ return true;
187
+ }
188
+ return this.normalizedAllowedPaths.some((allowedPath) => {
189
+ const relative = path.relative(allowedPath, normalizedPath);
190
+ return !relative.startsWith("..") && !path.isAbsolute(relative);
191
+ });
192
+ }
125
193
  /**
126
194
  * Get normalized allowed paths
127
195
  */
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var define_image_exports = {};
20
+ __export(define_image_exports, {
21
+ defineImage: () => defineImage,
22
+ defineProviderCategory: () => defineProviderCategory,
23
+ validateImageDefinition: () => validateImageDefinition
24
+ });
25
+ module.exports = __toCommonJS(define_image_exports);
26
+ function defineImage(definition) {
27
+ if (!definition.name) {
28
+ throw new Error("Image definition must have a name");
29
+ }
30
+ if (!definition.version) {
31
+ throw new Error("Image definition must have a version");
32
+ }
33
+ if (!definition.description) {
34
+ throw new Error("Image definition must have a description");
35
+ }
36
+ for (const [category, config] of Object.entries(definition.providers)) {
37
+ if (!config) continue;
38
+ if (!config.providers && !config.register) {
39
+ throw new Error(
40
+ `Provider category '${category}' must have either 'providers' array or 'register' function`
41
+ );
42
+ }
43
+ }
44
+ return definition;
45
+ }
46
+ function defineProviderCategory(config) {
47
+ if (!config.providers && !config.register) {
48
+ throw new Error("Provider category must have either providers or register function");
49
+ }
50
+ return config;
51
+ }
52
+ function validateImageDefinition(definition) {
53
+ if (!definition.name || typeof definition.name !== "string") {
54
+ throw new Error("Image name must be a non-empty string");
55
+ }
56
+ if (!definition.version || typeof definition.version !== "string") {
57
+ throw new Error("Image version must be a non-empty string");
58
+ }
59
+ if (!definition.description || typeof definition.description !== "string") {
60
+ throw new Error("Image description must be a non-empty string");
61
+ }
62
+ const versionRegex = /^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?$/;
63
+ if (!versionRegex.test(definition.version)) {
64
+ throw new Error(
65
+ `Image version '${definition.version}' is not valid semver. Expected format: x.y.z`
66
+ );
67
+ }
68
+ const validTargets = [
69
+ "local-development",
70
+ "cloud-production",
71
+ "edge-serverless",
72
+ "embedded-iot",
73
+ "enterprise",
74
+ "custom"
75
+ ];
76
+ if (definition.target && !validTargets.includes(definition.target)) {
77
+ throw new Error(
78
+ `Invalid target '${definition.target}'. Valid targets: ${validTargets.join(", ")}`
79
+ );
80
+ }
81
+ const hasProviders = definition.providers && Object.values(definition.providers).some((config) => config !== void 0);
82
+ if (!hasProviders && !definition.extends) {
83
+ throw new Error(
84
+ "Image must either define at least one provider category or extend a base image"
85
+ );
86
+ }
87
+ for (const [category, config] of Object.entries(definition.providers)) {
88
+ if (!config) continue;
89
+ if (!config.providers && !config.register) {
90
+ throw new Error(
91
+ `Provider category '${category}' must have either 'providers' array or 'register' function`
92
+ );
93
+ }
94
+ if (config.providers && !Array.isArray(config.providers)) {
95
+ throw new Error(`Provider category '${category}' providers must be an array`);
96
+ }
97
+ if (config.register && typeof config.register !== "function") {
98
+ throw new Error(`Provider category '${category}' register must be a function`);
99
+ }
100
+ }
101
+ const validConstraints = [
102
+ "filesystem-required",
103
+ "network-required",
104
+ "offline-capable",
105
+ "serverless-compatible",
106
+ "cold-start-optimized",
107
+ "low-memory",
108
+ "edge-compatible",
109
+ "browser-compatible"
110
+ ];
111
+ if (definition.constraints) {
112
+ if (!Array.isArray(definition.constraints)) {
113
+ throw new Error("Image constraints must be an array");
114
+ }
115
+ for (const constraint of definition.constraints) {
116
+ if (!validConstraints.includes(constraint)) {
117
+ throw new Error(
118
+ `Invalid constraint '${constraint}'. Valid constraints: ${validConstraints.join(", ")}`
119
+ );
120
+ }
121
+ }
122
+ }
123
+ if (definition.utils) {
124
+ for (const [name, path] of Object.entries(definition.utils)) {
125
+ if (typeof path !== "string") {
126
+ throw new Error(`Utility '${name}' path must be a string`);
127
+ }
128
+ if (!path.startsWith("./")) {
129
+ throw new Error(
130
+ `Utility '${name}' path must be relative (start with './'). Got: ${path}`
131
+ );
132
+ }
133
+ }
134
+ }
135
+ if (definition.extends) {
136
+ if (typeof definition.extends !== "string") {
137
+ throw new Error("Image extends must be a string (parent image name)");
138
+ }
139
+ }
140
+ }
141
+ // Annotate the CommonJS export names for ESM import in node:
142
+ 0 && (module.exports = {
143
+ defineImage,
144
+ defineProviderCategory,
145
+ validateImageDefinition
146
+ });
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Image definition helper
3
+ *
4
+ * Provides type-safe API for defining base images.
5
+ */
6
+ import type { ImageDefinition } from './types.js';
7
+ /**
8
+ * Define a Dexto base image.
9
+ *
10
+ * This function provides type checking and validation for image definitions.
11
+ * Use this in your dexto.image.ts file.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // dexto.image.ts
16
+ * import { defineImage } from '@dexto/core';
17
+ * import { localBlobProvider } from './providers/blob.js';
18
+ *
19
+ * export default defineImage({
20
+ * name: 'local',
21
+ * version: '1.0.0',
22
+ * description: 'Local development base image',
23
+ * target: 'local-development',
24
+ *
25
+ * providers: {
26
+ * blobStore: {
27
+ * providers: [localBlobProvider],
28
+ * },
29
+ * },
30
+ *
31
+ * defaults: {
32
+ * storage: {
33
+ * blob: { type: 'local', storePath: './data/blobs' },
34
+ * },
35
+ * },
36
+ *
37
+ * constraints: ['filesystem-required', 'offline-capable'],
38
+ * });
39
+ * ```
40
+ *
41
+ * @param definition - Image definition object
42
+ * @returns The same definition (for type inference)
43
+ */
44
+ export declare function defineImage(definition: ImageDefinition): ImageDefinition;
45
+ /**
46
+ * Helper to create a provider category configuration.
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * import { defineProviderCategory } from '@dexto/core';
51
+ *
52
+ * const blobStore = defineProviderCategory({
53
+ * providers: [localBlobProvider, s3BlobProvider],
54
+ * });
55
+ * ```
56
+ */
57
+ export declare function defineProviderCategory(config: {
58
+ providers?: any[];
59
+ register?: () => void | Promise<void>;
60
+ }): {
61
+ providers?: any[];
62
+ register?: () => void | Promise<void>;
63
+ };
64
+ /**
65
+ * Validate an image definition.
66
+ * Throws if the definition is invalid.
67
+ *
68
+ * Used by bundler to validate images before building.
69
+ */
70
+ export declare function validateImageDefinition(definition: ImageDefinition): void;
71
+ //# sourceMappingURL=define-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-image.d.ts","sourceRoot":"","sources":["../../src/image/define-image.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,eAAe,GAAG,eAAe,CAuBxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC3C,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;gBAFe,GAAG,EAAE;eACN,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;EAMxC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAiHzE"}