@dexto/core 1.1.11 → 1.2.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 (416) hide show
  1. package/README.md +24 -4
  2. package/dist/Dexto.cjs +4 -14
  3. package/dist/Dexto.d.ts +8 -29
  4. package/dist/Dexto.d.ts.map +1 -1
  5. package/dist/Dexto.js +4 -12
  6. package/dist/agent/DextoAgent.cjs +92 -3
  7. package/dist/agent/DextoAgent.d.ts +12 -4
  8. package/dist/agent/DextoAgent.d.ts.map +1 -1
  9. package/dist/agent/DextoAgent.js +52 -3
  10. package/dist/agent/agentCard.js +1 -0
  11. package/dist/agent/error-codes.cjs +1 -0
  12. package/dist/agent/error-codes.d.ts +1 -0
  13. package/dist/agent/error-codes.d.ts.map +1 -1
  14. package/dist/agent/error-codes.js +2 -0
  15. package/dist/agent/errors.cjs +13 -0
  16. package/dist/agent/errors.d.ts +4 -0
  17. package/dist/agent/errors.d.ts.map +1 -1
  18. package/dist/agent/errors.js +14 -0
  19. package/dist/agent/index.js +1 -0
  20. package/dist/agent/registry/error-codes.js +1 -0
  21. package/dist/agent/registry/errors.js +1 -0
  22. package/dist/agent/registry/registry.js +1 -0
  23. package/dist/agent/registry/types.js +1 -0
  24. package/dist/agent/registry/user-registry.js +1 -0
  25. package/dist/agent/schemas.cjs +6 -1
  26. package/dist/agent/schemas.d.ts +113 -3
  27. package/dist/agent/schemas.d.ts.map +1 -1
  28. package/dist/agent/schemas.js +7 -1
  29. package/dist/agent/state-manager.js +1 -0
  30. package/dist/approval/error-codes.js +1 -0
  31. package/dist/approval/errors.js +1 -0
  32. package/dist/approval/index.js +1 -0
  33. package/dist/approval/manager.cjs +30 -0
  34. package/dist/approval/manager.d.ts +23 -1
  35. package/dist/approval/manager.d.ts.map +1 -1
  36. package/dist/approval/manager.js +31 -0
  37. package/dist/approval/providers/event-based-approval-provider.js +1 -0
  38. package/dist/approval/providers/factory.js +1 -0
  39. package/dist/approval/providers/noop-approval-provider.js +1 -0
  40. package/dist/approval/schemas.cjs +36 -0
  41. package/dist/approval/schemas.d.ts +173 -0
  42. package/dist/approval/schemas.d.ts.map +1 -1
  43. package/dist/approval/schemas.js +33 -0
  44. package/dist/approval/types.cjs +1 -0
  45. package/dist/approval/types.d.ts +27 -1
  46. package/dist/approval/types.d.ts.map +1 -1
  47. package/dist/approval/types.js +2 -0
  48. package/dist/chunk-C6A6W6XS.js +53 -0
  49. package/dist/config/agent-resolver.js +1 -0
  50. package/dist/config/error-codes.js +1 -0
  51. package/dist/config/errors.js +1 -0
  52. package/dist/config/loader.js +1 -0
  53. package/dist/config/writer.js +1 -0
  54. package/dist/context/compression/middle-removal.js +1 -0
  55. package/dist/context/compression/oldest-removal.js +1 -0
  56. package/dist/context/error-codes.js +1 -0
  57. package/dist/context/errors.js +1 -0
  58. package/dist/context/index.js +1 -0
  59. package/dist/context/manager.cjs +36 -1
  60. package/dist/context/manager.d.ts.map +1 -1
  61. package/dist/context/manager.js +27 -1
  62. package/dist/context/media-helpers.js +1 -0
  63. package/dist/context/utils.cjs +102 -6
  64. package/dist/context/utils.d.ts +35 -2
  65. package/dist/context/utils.d.ts.map +1 -1
  66. package/dist/context/utils.js +100 -6
  67. package/dist/errors/DextoBaseError.js +1 -0
  68. package/dist/errors/DextoRuntimeError.js +1 -0
  69. package/dist/errors/DextoValidationError.js +1 -0
  70. package/dist/errors/index.js +1 -0
  71. package/dist/errors/result-bridge.js +1 -0
  72. package/dist/errors/types.cjs +3 -0
  73. package/dist/errors/types.d.ts +7 -2
  74. package/dist/errors/types.d.ts.map +1 -1
  75. package/dist/errors/types.js +4 -0
  76. package/dist/events/index.cjs +1 -0
  77. package/dist/events/index.d.ts +6 -2
  78. package/dist/events/index.d.ts.map +1 -1
  79. package/dist/events/index.js +2 -0
  80. package/dist/filesystem/error-codes.cjs +53 -0
  81. package/dist/filesystem/error-codes.d.ts +31 -0
  82. package/dist/filesystem/error-codes.d.ts.map +1 -0
  83. package/dist/filesystem/error-codes.js +30 -0
  84. package/dist/filesystem/errors.cjs +303 -0
  85. package/dist/filesystem/errors.d.ts +109 -0
  86. package/dist/filesystem/errors.d.ts.map +1 -0
  87. package/dist/filesystem/errors.js +280 -0
  88. package/dist/filesystem/filesystem-service.cjs +482 -0
  89. package/dist/filesystem/filesystem-service.d.ts +57 -0
  90. package/dist/filesystem/filesystem-service.d.ts.map +1 -0
  91. package/dist/filesystem/filesystem-service.js +449 -0
  92. package/dist/filesystem/index.cjs +37 -0
  93. package/dist/filesystem/index.d.ts +11 -0
  94. package/dist/filesystem/index.d.ts.map +1 -0
  95. package/dist/filesystem/index.js +11 -0
  96. package/dist/filesystem/path-validator.cjs +172 -0
  97. package/dist/filesystem/path-validator.d.ts +53 -0
  98. package/dist/filesystem/path-validator.d.ts.map +1 -0
  99. package/dist/filesystem/path-validator.js +139 -0
  100. package/dist/filesystem/types.cjs +16 -0
  101. package/dist/filesystem/types.d.ts +171 -0
  102. package/dist/filesystem/types.d.ts.map +1 -0
  103. package/dist/filesystem/types.js +0 -0
  104. package/dist/index.browser.js +1 -0
  105. package/dist/index.cjs +3 -3
  106. package/dist/index.d.ts +2 -1
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +3 -2
  109. package/dist/llm/error-codes.js +1 -0
  110. package/dist/llm/errors.js +1 -0
  111. package/dist/llm/formatters/anthropic.js +1 -0
  112. package/dist/llm/formatters/factory.js +1 -0
  113. package/dist/llm/formatters/openai.js +1 -0
  114. package/dist/llm/formatters/vercel.js +1 -0
  115. package/dist/llm/registry.cjs +15 -15
  116. package/dist/llm/registry.d.ts +1 -1
  117. package/dist/llm/registry.js +16 -15
  118. package/dist/llm/resolver.js +1 -0
  119. package/dist/llm/schemas.cjs +6 -2
  120. package/dist/llm/schemas.d.ts +10 -0
  121. package/dist/llm/schemas.d.ts.map +1 -1
  122. package/dist/llm/schemas.js +7 -2
  123. package/dist/llm/services/anthropic.cjs +67 -0
  124. package/dist/llm/services/anthropic.d.ts +6 -0
  125. package/dist/llm/services/anthropic.d.ts.map +1 -1
  126. package/dist/llm/services/anthropic.js +27 -0
  127. package/dist/llm/services/factory.js +1 -0
  128. package/dist/llm/services/openai.cjs +87 -0
  129. package/dist/llm/services/openai.d.ts +6 -0
  130. package/dist/llm/services/openai.d.ts.map +1 -1
  131. package/dist/llm/services/openai.js +47 -0
  132. package/dist/llm/services/test-utils.integration.cjs +1 -1
  133. package/dist/llm/services/test-utils.integration.js +2 -1
  134. package/dist/llm/services/vercel.cjs +144 -97
  135. package/dist/llm/services/vercel.d.ts +6 -1
  136. package/dist/llm/services/vercel.d.ts.map +1 -1
  137. package/dist/llm/services/vercel.js +105 -98
  138. package/dist/llm/tokenizer/anthropic.js +1 -0
  139. package/dist/llm/tokenizer/default.js +1 -0
  140. package/dist/llm/tokenizer/factory.js +1 -0
  141. package/dist/llm/tokenizer/google.js +1 -0
  142. package/dist/llm/tokenizer/openai.cjs +1 -1
  143. package/dist/llm/tokenizer/openai.d.ts +1 -1
  144. package/dist/llm/tokenizer/openai.js +2 -1
  145. package/dist/llm/tokenizer/types.js +1 -0
  146. package/dist/llm/types.d.ts +2 -2
  147. package/dist/llm/types.d.ts.map +1 -1
  148. package/dist/llm/types.js +1 -0
  149. package/dist/llm/validation.js +1 -0
  150. package/dist/logger/browser.js +1 -0
  151. package/dist/logger/logger.d.ts +42 -0
  152. package/dist/logger/logger.d.ts.map +1 -1
  153. package/dist/logger/logger.js +1 -0
  154. package/dist/mcp/error-codes.cjs +1 -0
  155. package/dist/mcp/error-codes.d.ts +1 -0
  156. package/dist/mcp/error-codes.d.ts.map +1 -1
  157. package/dist/mcp/error-codes.js +2 -0
  158. package/dist/mcp/errors.cjs +12 -0
  159. package/dist/mcp/errors.d.ts +7 -0
  160. package/dist/mcp/errors.d.ts.map +1 -1
  161. package/dist/mcp/errors.js +13 -0
  162. package/dist/mcp/manager.cjs +66 -16
  163. package/dist/mcp/manager.d.ts +7 -0
  164. package/dist/mcp/manager.d.ts.map +1 -1
  165. package/dist/mcp/manager.js +67 -16
  166. package/dist/mcp/mcp-client.js +1 -0
  167. package/dist/mcp/resolver.js +1 -0
  168. package/dist/mcp/schemas.js +1 -0
  169. package/dist/mcp/types.d.ts +1 -1
  170. package/dist/mcp/types.d.ts.map +1 -1
  171. package/dist/memory/error-codes.js +1 -0
  172. package/dist/memory/errors.js +1 -0
  173. package/dist/memory/index.js +1 -0
  174. package/dist/memory/manager.js +1 -0
  175. package/dist/memory/schemas.js +1 -0
  176. package/dist/plugins/builtins/content-policy.js +1 -0
  177. package/dist/plugins/builtins/response-sanitizer.js +1 -0
  178. package/dist/plugins/error-codes.js +1 -0
  179. package/dist/plugins/index.js +1 -0
  180. package/dist/plugins/loader.js +1 -0
  181. package/dist/plugins/manager.js +1 -0
  182. package/dist/plugins/registrations/builtins.js +1 -0
  183. package/dist/plugins/schemas.js +1 -0
  184. package/dist/preferences/constants.js +1 -0
  185. package/dist/preferences/error-codes.js +1 -0
  186. package/dist/preferences/errors.js +1 -0
  187. package/dist/preferences/index.js +1 -0
  188. package/dist/preferences/loader.cjs +3 -1
  189. package/dist/preferences/loader.d.ts +10 -1
  190. package/dist/preferences/loader.d.ts.map +1 -1
  191. package/dist/preferences/loader.js +4 -1
  192. package/dist/preferences/schemas.cjs +2 -1
  193. package/dist/preferences/schemas.d.ts +8 -0
  194. package/dist/preferences/schemas.d.ts.map +1 -1
  195. package/dist/preferences/schemas.js +3 -1
  196. package/dist/process/command-validator.cjs +544 -0
  197. package/dist/process/command-validator.d.ts +46 -0
  198. package/dist/process/command-validator.d.ts.map +1 -0
  199. package/dist/process/command-validator.js +521 -0
  200. package/dist/process/error-codes.cjs +47 -0
  201. package/dist/process/error-codes.d.ts +25 -0
  202. package/dist/process/error-codes.d.ts.map +1 -0
  203. package/dist/process/error-codes.js +24 -0
  204. package/dist/process/errors.cjs +244 -0
  205. package/dist/process/errors.d.ts +87 -0
  206. package/dist/process/errors.d.ts.map +1 -0
  207. package/dist/process/errors.js +221 -0
  208. package/dist/process/index.cjs +37 -0
  209. package/dist/process/index.d.ts +11 -0
  210. package/dist/process/index.d.ts.map +1 -0
  211. package/dist/process/index.js +11 -0
  212. package/dist/process/process-service.cjs +443 -0
  213. package/dist/process/process-service.d.ts +62 -0
  214. package/dist/process/process-service.d.ts.map +1 -0
  215. package/dist/process/process-service.js +410 -0
  216. package/dist/process/types.cjs +16 -0
  217. package/dist/process/types.d.ts +107 -0
  218. package/dist/process/types.d.ts.map +1 -0
  219. package/dist/process/types.js +0 -0
  220. package/dist/prompts/error-codes.js +1 -0
  221. package/dist/prompts/errors.js +1 -0
  222. package/dist/prompts/index.js +1 -0
  223. package/dist/prompts/name-validation.js +1 -0
  224. package/dist/prompts/prompt-manager.js +1 -0
  225. package/dist/prompts/providers/custom-prompt-provider.js +1 -0
  226. package/dist/prompts/providers/file-prompt-provider.js +1 -0
  227. package/dist/prompts/providers/mcp-prompt-provider.js +1 -0
  228. package/dist/prompts/providers/starter-prompt-provider.js +1 -0
  229. package/dist/prompts/schemas.js +1 -0
  230. package/dist/prompts/utils.js +1 -0
  231. package/dist/resources/error-codes.js +1 -0
  232. package/dist/resources/errors.js +1 -0
  233. package/dist/resources/handlers/blob-handler.js +1 -0
  234. package/dist/resources/handlers/factory.js +1 -0
  235. package/dist/resources/handlers/filesystem-handler.cjs +1 -1
  236. package/dist/resources/handlers/filesystem-handler.d.ts.map +1 -1
  237. package/dist/resources/handlers/filesystem-handler.js +2 -1
  238. package/dist/resources/index.js +1 -0
  239. package/dist/resources/internal-provider.js +1 -0
  240. package/dist/resources/manager.js +1 -0
  241. package/dist/resources/reference-parser.js +1 -0
  242. package/dist/resources/schemas.js +1 -0
  243. package/dist/search/index.js +1 -0
  244. package/dist/search/search-service.js +1 -0
  245. package/dist/session/chat-session.cjs +2 -2
  246. package/dist/session/chat-session.d.ts +2 -2
  247. package/dist/session/chat-session.js +3 -2
  248. package/dist/session/error-codes.js +1 -0
  249. package/dist/session/errors.js +1 -0
  250. package/dist/session/history/database.js +1 -0
  251. package/dist/session/history/factory.js +1 -0
  252. package/dist/session/history/memory.js +1 -0
  253. package/dist/session/index.js +1 -0
  254. package/dist/session/schemas.js +1 -0
  255. package/dist/session/session-manager.d.ts +6 -0
  256. package/dist/session/session-manager.d.ts.map +1 -1
  257. package/dist/session/session-manager.js +1 -0
  258. package/dist/session/title-generator.js +1 -0
  259. package/dist/storage/blob/factory.cjs +3 -3
  260. package/dist/storage/blob/factory.d.ts +3 -1
  261. package/dist/storage/blob/factory.d.ts.map +1 -1
  262. package/dist/storage/blob/factory.js +4 -3
  263. package/dist/storage/blob/local-blob-store.cjs +18 -2
  264. package/dist/storage/blob/local-blob-store.d.ts +2 -1
  265. package/dist/storage/blob/local-blob-store.d.ts.map +1 -1
  266. package/dist/storage/blob/local-blob-store.js +19 -2
  267. package/dist/storage/blob/schemas.js +1 -0
  268. package/dist/storage/cache/factory.js +1 -0
  269. package/dist/storage/cache/memory-cache-store.js +1 -0
  270. package/dist/storage/cache/redis-store.js +1 -0
  271. package/dist/storage/cache/schemas.js +1 -0
  272. package/dist/storage/database/factory.cjs +7 -5
  273. package/dist/storage/database/factory.d.ts +3 -1
  274. package/dist/storage/database/factory.d.ts.map +1 -1
  275. package/dist/storage/database/factory.js +8 -5
  276. package/dist/storage/database/memory-database-store.js +1 -0
  277. package/dist/storage/database/postgres-store.js +1 -0
  278. package/dist/storage/database/schemas.cjs +1 -1
  279. package/dist/storage/database/schemas.js +2 -1
  280. package/dist/storage/database/sqlite-store.cjs +20 -2
  281. package/dist/storage/database/sqlite-store.d.ts +2 -1
  282. package/dist/storage/database/sqlite-store.d.ts.map +1 -1
  283. package/dist/storage/database/sqlite-store.js +21 -2
  284. package/dist/storage/error-codes.cjs +1 -0
  285. package/dist/storage/error-codes.d.ts +1 -0
  286. package/dist/storage/error-codes.d.ts.map +1 -1
  287. package/dist/storage/error-codes.js +2 -0
  288. package/dist/storage/errors.cjs +15 -0
  289. package/dist/storage/errors.d.ts +4 -0
  290. package/dist/storage/errors.d.ts.map +1 -1
  291. package/dist/storage/errors.js +16 -0
  292. package/dist/storage/index.js +1 -0
  293. package/dist/storage/schemas.js +1 -0
  294. package/dist/storage/storage-manager.cjs +7 -5
  295. package/dist/storage/storage-manager.d.ts +5 -2
  296. package/dist/storage/storage-manager.d.ts.map +1 -1
  297. package/dist/storage/storage-manager.js +8 -5
  298. package/dist/systemPrompt/contributors.js +1 -0
  299. package/dist/systemPrompt/error-codes.js +1 -0
  300. package/dist/systemPrompt/errors.js +1 -0
  301. package/dist/systemPrompt/in-built-prompts.js +1 -0
  302. package/dist/systemPrompt/index.js +1 -0
  303. package/dist/systemPrompt/manager.js +1 -0
  304. package/dist/systemPrompt/registry.js +1 -0
  305. package/dist/systemPrompt/schemas.js +1 -0
  306. package/dist/telemetry/decorators.cjs +175 -0
  307. package/dist/telemetry/decorators.d.ts +17 -0
  308. package/dist/telemetry/decorators.d.ts.map +1 -0
  309. package/dist/telemetry/decorators.js +157 -0
  310. package/dist/telemetry/exporters.cjs +108 -0
  311. package/dist/telemetry/exporters.d.ts +29 -0
  312. package/dist/telemetry/exporters.d.ts.map +1 -0
  313. package/dist/telemetry/exporters.js +85 -0
  314. package/dist/telemetry/index.cjs +28 -0
  315. package/dist/telemetry/index.d.ts +2 -0
  316. package/dist/telemetry/index.d.ts.map +1 -0
  317. package/dist/telemetry/index.js +5 -0
  318. package/dist/telemetry/schemas.cjs +71 -0
  319. package/dist/telemetry/schemas.d.ts +54 -0
  320. package/dist/telemetry/schemas.d.ts.map +1 -0
  321. package/dist/telemetry/schemas.js +48 -0
  322. package/dist/telemetry/telemetry.cjs +228 -0
  323. package/dist/telemetry/telemetry.d.ts +74 -0
  324. package/dist/telemetry/telemetry.d.ts.map +1 -0
  325. package/dist/telemetry/telemetry.js +205 -0
  326. package/dist/telemetry/types.cjs +16 -0
  327. package/dist/telemetry/types.d.ts +22 -0
  328. package/dist/telemetry/types.d.ts.map +1 -0
  329. package/dist/telemetry/types.js +0 -0
  330. package/dist/telemetry/utils.cjs +87 -0
  331. package/dist/telemetry/utils.d.ts +21 -0
  332. package/dist/telemetry/utils.d.ts.map +1 -0
  333. package/dist/telemetry/utils.js +62 -0
  334. package/dist/tools/confirmation/allowed-tools-provider/factory.js +1 -0
  335. package/dist/tools/confirmation/allowed-tools-provider/in-memory.js +1 -0
  336. package/dist/tools/confirmation/allowed-tools-provider/storage.js +1 -0
  337. package/dist/tools/error-codes.js +1 -0
  338. package/dist/tools/errors.js +1 -0
  339. package/dist/tools/index.js +1 -0
  340. package/dist/tools/internal-tools/constants.cjs +39 -0
  341. package/dist/tools/internal-tools/constants.d.ts +12 -0
  342. package/dist/tools/internal-tools/constants.d.ts.map +1 -0
  343. package/dist/tools/internal-tools/constants.js +16 -0
  344. package/dist/tools/internal-tools/implementations/ask-user-tool.js +1 -0
  345. package/dist/tools/internal-tools/implementations/bash-exec-tool.cjs +106 -0
  346. package/dist/tools/internal-tools/implementations/bash-exec-tool.d.ts +13 -0
  347. package/dist/tools/internal-tools/implementations/bash-exec-tool.d.ts.map +1 -0
  348. package/dist/tools/internal-tools/implementations/bash-exec-tool.js +73 -0
  349. package/dist/tools/internal-tools/implementations/bash-output-tool.cjs +49 -0
  350. package/dist/tools/internal-tools/implementations/bash-output-tool.d.ts +12 -0
  351. package/dist/tools/internal-tools/implementations/bash-output-tool.d.ts.map +1 -0
  352. package/dist/tools/internal-tools/implementations/bash-output-tool.js +26 -0
  353. package/dist/tools/internal-tools/implementations/edit-file-tool.cjs +62 -0
  354. package/dist/tools/internal-tools/implementations/edit-file-tool.d.ts +12 -0
  355. package/dist/tools/internal-tools/implementations/edit-file-tool.d.ts.map +1 -0
  356. package/dist/tools/internal-tools/implementations/edit-file-tool.js +39 -0
  357. package/dist/tools/internal-tools/implementations/glob-files-tool.cjs +57 -0
  358. package/dist/tools/internal-tools/implementations/glob-files-tool.d.ts +12 -0
  359. package/dist/tools/internal-tools/implementations/glob-files-tool.d.ts.map +1 -0
  360. package/dist/tools/internal-tools/implementations/glob-files-tool.js +34 -0
  361. package/dist/tools/internal-tools/implementations/grep-content-tool.cjs +71 -0
  362. package/dist/tools/internal-tools/implementations/grep-content-tool.d.ts +12 -0
  363. package/dist/tools/internal-tools/implementations/grep-content-tool.d.ts.map +1 -0
  364. package/dist/tools/internal-tools/implementations/grep-content-tool.js +48 -0
  365. package/dist/tools/internal-tools/implementations/kill-process-tool.cjs +47 -0
  366. package/dist/tools/internal-tools/implementations/kill-process-tool.d.ts +12 -0
  367. package/dist/tools/internal-tools/implementations/kill-process-tool.d.ts.map +1 -0
  368. package/dist/tools/internal-tools/implementations/kill-process-tool.js +24 -0
  369. package/dist/tools/internal-tools/implementations/read-file-tool.cjs +55 -0
  370. package/dist/tools/internal-tools/implementations/read-file-tool.d.ts +12 -0
  371. package/dist/tools/internal-tools/implementations/read-file-tool.d.ts.map +1 -0
  372. package/dist/tools/internal-tools/implementations/read-file-tool.js +32 -0
  373. package/dist/tools/internal-tools/implementations/search-history-tool.js +1 -0
  374. package/dist/tools/internal-tools/implementations/write-file-tool.cjs +56 -0
  375. package/dist/tools/internal-tools/implementations/write-file-tool.d.ts +12 -0
  376. package/dist/tools/internal-tools/implementations/write-file-tool.d.ts.map +1 -0
  377. package/dist/tools/internal-tools/implementations/write-file-tool.js +33 -0
  378. package/dist/tools/internal-tools/index.cjs +3 -1
  379. package/dist/tools/internal-tools/index.d.ts +1 -0
  380. package/dist/tools/internal-tools/index.d.ts.map +1 -1
  381. package/dist/tools/internal-tools/index.js +1 -0
  382. package/dist/tools/internal-tools/provider.js +1 -0
  383. package/dist/tools/internal-tools/registry.cjs +40 -4
  384. package/dist/tools/internal-tools/registry.d.ts +5 -9
  385. package/dist/tools/internal-tools/registry.d.ts.map +1 -1
  386. package/dist/tools/internal-tools/registry.js +41 -3
  387. package/dist/tools/schemas.cjs +18 -5
  388. package/dist/tools/schemas.d.ts +30 -1
  389. package/dist/tools/schemas.d.ts.map +1 -1
  390. package/dist/tools/schemas.js +15 -2
  391. package/dist/tools/tool-manager.cjs +158 -19
  392. package/dist/tools/tool-manager.d.ts +48 -2
  393. package/dist/tools/tool-manager.d.ts.map +1 -1
  394. package/dist/tools/tool-manager.js +118 -19
  395. package/dist/utils/api-key-resolver.js +1 -0
  396. package/dist/utils/api-key-store.js +1 -0
  397. package/dist/utils/async-context.js +1 -0
  398. package/dist/utils/debug.js +1 -0
  399. package/dist/utils/env.js +1 -0
  400. package/dist/utils/error-conversion.js +1 -0
  401. package/dist/utils/execution-context.js +1 -0
  402. package/dist/utils/fs-walk.js +1 -0
  403. package/dist/utils/path.js +1 -0
  404. package/dist/utils/port-utils.js +1 -0
  405. package/dist/utils/redactor.js +1 -0
  406. package/dist/utils/result.js +1 -0
  407. package/dist/utils/safe-stringify.js +1 -0
  408. package/dist/utils/schema-metadata.js +1 -0
  409. package/dist/utils/schema.js +1 -0
  410. package/dist/utils/service-initializer.cjs +42 -4
  411. package/dist/utils/service-initializer.d.ts +2 -1
  412. package/dist/utils/service-initializer.d.ts.map +1 -1
  413. package/dist/utils/service-initializer.js +33 -4
  414. package/dist/utils/user-info.js +1 -0
  415. package/dist/utils/zod-schema-converter.js +1 -0
  416. package/package.json +11 -1
@@ -0,0 +1,521 @@
1
+ import "../chunk-C6A6W6XS.js";
2
+ import { logger } from "../logger/index.js";
3
+ const MAX_COMMAND_LENGTH = 1e4;
4
+ const DANGEROUS_PATTERNS = [
5
+ // File system destruction
6
+ /rm\s+-rf\s+\//,
7
+ // rm -rf /
8
+ /rm\s+-rf\s+\/\s*$/,
9
+ // rm -rf / (end of line)
10
+ /rm\s+-rf\s+\/\s*2/,
11
+ // rm -rf / 2>/dev/null (with error suppression)
12
+ // Fork bomb variations
13
+ /:\(\)\{\s*:\|:&\s*\};:/,
14
+ // Classic fork bomb
15
+ /:\(\)\{\s*:\|:&\s*\};/,
16
+ // Fork bomb without final colon
17
+ /:\(\)\{\s*:\|:&\s*\}/,
18
+ // Fork bomb without semicolon
19
+ // Disk operations
20
+ /dd\s+if=.*of=\/dev\//,
21
+ // dd to disk devices
22
+ /dd\s+if=\/dev\/zero.*of=\/dev\//,
23
+ // dd zero to disk
24
+ /dd\s+if=\/dev\/urandom.*of=\/dev\//,
25
+ // dd random to disk
26
+ />\s*\/dev\/sd[a-z]/,
27
+ // Write to disk devices
28
+ />>\s*\/dev\/sd[a-z]/,
29
+ // Append to disk devices
30
+ // Filesystem operations
31
+ /mkfs\./,
32
+ // Format filesystem
33
+ /mkfs\s+/,
34
+ // Format filesystem with space
35
+ /fdisk\s+\/dev\/sd[a-z]/,
36
+ // Partition disk
37
+ /parted\s+\/dev\/sd[a-z]/,
38
+ // Partition disk with parted
39
+ // Download and execute patterns
40
+ /wget.*\|\s*sh/,
41
+ // wget | sh
42
+ /wget.*\|\s*bash/,
43
+ // wget | bash
44
+ /curl.*\|\s*sh/,
45
+ // curl | sh
46
+ /curl.*\|\s*bash/,
47
+ // curl | bash
48
+ /wget.*\|\s*python/,
49
+ // wget | python
50
+ /curl.*\|\s*python/,
51
+ // curl | python
52
+ // Shell execution
53
+ /\|\s*bash/,
54
+ // Pipe to bash
55
+ /\|\s*sh/,
56
+ // Pipe to sh
57
+ /\|\s*zsh/,
58
+ // Pipe to zsh
59
+ /\|\s*fish/,
60
+ // Pipe to fish
61
+ // Command evaluation
62
+ /eval\s+\$\(/,
63
+ // eval $()
64
+ /eval\s+`/,
65
+ // eval backticks
66
+ /eval\s+"/,
67
+ // eval double quotes
68
+ /eval\s+'/,
69
+ // eval single quotes
70
+ // Permission changes
71
+ /chmod\s+777\s+\//,
72
+ // chmod 777 /
73
+ /chmod\s+777\s+\/\s*$/,
74
+ // chmod 777 / (end of line)
75
+ /chmod\s+-R\s+777\s+\//,
76
+ // chmod -R 777 /
77
+ /chown\s+-R\s+root\s+\//,
78
+ // chown -R root /
79
+ // Network operations
80
+ /nc\s+-l\s+-p\s+\d+/,
81
+ // netcat listener
82
+ /ncat\s+-l\s+-p\s+\d+/,
83
+ // ncat listener
84
+ /socat\s+.*LISTEN/,
85
+ // socat listener
86
+ // Process manipulation
87
+ /killall\s+-9/,
88
+ // killall -9
89
+ /pkill\s+-9/,
90
+ // pkill -9
91
+ /kill\s+-9\s+-1/,
92
+ // kill -9 -1 (kill all processes)
93
+ // System shutdown/reboot
94
+ /shutdown\s+now/,
95
+ // shutdown now
96
+ /reboot/,
97
+ // reboot
98
+ /halt/,
99
+ // halt
100
+ /poweroff/,
101
+ // poweroff
102
+ // Memory operations
103
+ /echo\s+3\s*>\s*\/proc\/sys\/vm\/drop_caches/,
104
+ // Clear page cache
105
+ /sync\s*;\s*echo\s+3\s*>\s*\/proc\/sys\/vm\/drop_caches/,
106
+ // Sync and clear cache
107
+ // Network interface manipulation
108
+ /ifconfig\s+.*down/,
109
+ // Bring interface down
110
+ /ip\s+link\s+set\s+.*down/,
111
+ // Bring interface down with ip
112
+ // Package manager operations
113
+ /apt\s+remove\s+--purge\s+.*/,
114
+ // Remove packages
115
+ /yum\s+remove\s+.*/,
116
+ // Remove packages
117
+ /dnf\s+remove\s+.*/,
118
+ // Remove packages
119
+ /pacman\s+-R\s+.*/
120
+ // Remove packages
121
+ ];
122
+ const INJECTION_PATTERNS = [
123
+ // Command chaining with dangerous commands
124
+ /;\s*rm\s+-rf/,
125
+ // ; rm -rf
126
+ /&&\s*rm\s+-rf/,
127
+ // && rm -rf
128
+ /\|\s*rm\s+-rf/,
129
+ // | rm -rf
130
+ /;\s*chmod\s+777/,
131
+ // ; chmod 777
132
+ /&&\s*chmod\s+777/,
133
+ // && chmod 777
134
+ /;\s*chown\s+root/,
135
+ // ; chown root
136
+ /&&\s*chown\s+root/,
137
+ // && chown root
138
+ // Command substitution with dangerous commands
139
+ /`.*rm.*`/,
140
+ // backticks with rm
141
+ /\$\(.*rm.*\)/,
142
+ // $() with rm
143
+ /`.*chmod.*`/,
144
+ // backticks with chmod
145
+ /\$\(.*chmod.*\)/,
146
+ // $() with chmod
147
+ /`.*chown.*`/,
148
+ // backticks with chown
149
+ /\$\(.*chown.*\)/,
150
+ // $() with chown
151
+ // Multiple command separators
152
+ /;\s*;\s*/,
153
+ // Multiple semicolons
154
+ /&&\s*&&\s*/,
155
+ // Multiple && operators
156
+ /\|\|\s*\|\|\s*/,
157
+ // Multiple || operators
158
+ // Redirection with dangerous commands
159
+ /rm\s+.*>\s*\/dev\/null/,
160
+ // rm with output redirection
161
+ /chmod\s+.*>\s*\/dev\/null/,
162
+ // chmod with output redirection
163
+ /chown\s+.*>\s*\/dev\/null/,
164
+ // chown with output redirection
165
+ // Environment variable manipulation
166
+ /\$[A-Z_]+\s*=\s*.*rm/,
167
+ // Environment variable with rm
168
+ /\$[A-Z_]+\s*=\s*.*chmod/,
169
+ // Environment variable with chmod
170
+ /\$[A-Z_]+\s*=\s*.*chown/
171
+ // Environment variable with chown
172
+ ];
173
+ const REQUIRES_APPROVAL_PATTERNS = [
174
+ // File operations
175
+ /^rm\s+/,
176
+ // rm (removal)
177
+ /^mv\s+/,
178
+ // move files
179
+ /^cp\s+/,
180
+ // copy files
181
+ /^chmod\s+/,
182
+ // chmod
183
+ /^chown\s+/,
184
+ // chown
185
+ /^chgrp\s+/,
186
+ // chgrp
187
+ /^ln\s+/,
188
+ // create links
189
+ /^unlink\s+/,
190
+ // unlink files
191
+ // Git operations
192
+ /^git\s+push/,
193
+ // git push
194
+ /^git\s+commit/,
195
+ // git commit
196
+ /^git\s+reset/,
197
+ // git reset
198
+ /^git\s+rebase/,
199
+ // git rebase
200
+ /^git\s+merge/,
201
+ // git merge
202
+ /^git\s+checkout/,
203
+ // git checkout
204
+ /^git\s+branch/,
205
+ // git branch
206
+ /^git\s+tag/,
207
+ // git tag
208
+ // Package management
209
+ /^npm\s+publish/,
210
+ // npm publish
211
+ /^npm\s+uninstall/,
212
+ // npm uninstall
213
+ /^yarn\s+publish/,
214
+ // yarn publish
215
+ /^yarn\s+remove/,
216
+ // yarn remove
217
+ /^pip\s+install/,
218
+ // pip install
219
+ /^pip\s+uninstall/,
220
+ // pip uninstall
221
+ /^apt\s+install/,
222
+ // apt install
223
+ /^apt\s+remove/,
224
+ // apt remove
225
+ /^yum\s+install/,
226
+ // yum install
227
+ /^yum\s+remove/,
228
+ // yum remove
229
+ /^dnf\s+install/,
230
+ // dnf install
231
+ /^dnf\s+remove/,
232
+ // dnf remove
233
+ /^pacman\s+-S/,
234
+ // pacman install
235
+ /^pacman\s+-R/,
236
+ // pacman remove
237
+ // Container operations
238
+ /^docker\s+/,
239
+ // docker commands
240
+ /^podman\s+/,
241
+ // podman commands
242
+ /^kubectl\s+/,
243
+ // kubectl commands
244
+ // System operations
245
+ /^sudo\s+/,
246
+ // sudo commands
247
+ /^su\s+/,
248
+ // su commands
249
+ /^systemctl\s+/,
250
+ // systemctl commands
251
+ /^service\s+/,
252
+ // service commands
253
+ /^mount\s+/,
254
+ // mount commands
255
+ /^umount\s+/,
256
+ // umount commands
257
+ /^fdisk\s+/,
258
+ // fdisk commands
259
+ /^parted\s+/,
260
+ // parted commands
261
+ /^mkfs\s+/,
262
+ // mkfs commands
263
+ /^fsck\s+/,
264
+ // fsck commands
265
+ // Network operations
266
+ /^iptables\s+/,
267
+ // iptables commands
268
+ /^ufw\s+/,
269
+ // ufw commands
270
+ /^firewall-cmd\s+/,
271
+ // firewall-cmd commands
272
+ /^sshd\s+/,
273
+ // sshd commands
274
+ /^ssh\s+/,
275
+ // ssh commands
276
+ /^scp\s+/,
277
+ // scp commands
278
+ /^rsync\s+/,
279
+ // rsync commands
280
+ // Process management
281
+ /^kill\s+/,
282
+ // kill commands
283
+ /^killall\s+/,
284
+ // killall commands
285
+ /^pkill\s+/,
286
+ // pkill commands
287
+ /^nohup\s+/,
288
+ // nohup commands
289
+ /^screen\s+/,
290
+ // screen commands
291
+ /^tmux\s+/,
292
+ // tmux commands
293
+ // Database operations
294
+ /^mysql\s+/,
295
+ // mysql commands
296
+ /^psql\s+/,
297
+ // psql commands
298
+ /^sqlite3\s+/,
299
+ // sqlite3 commands
300
+ /^mongodb\s+/,
301
+ // mongodb commands
302
+ /^redis-cli\s+/
303
+ // redis-cli commands
304
+ ];
305
+ const SAFE_PATTERNS = [
306
+ // Directory navigation with commands
307
+ /^cd\s+.*&&\s+\w+/,
308
+ // cd && command
309
+ /^cd\s+.*;\s+\w+/,
310
+ // cd ; command
311
+ // Safe pipe operations
312
+ /\|\s*grep/,
313
+ // | grep
314
+ /\|\s*head/,
315
+ // | head
316
+ /\|\s*tail/,
317
+ // | tail
318
+ /\|\s*sort/,
319
+ // | sort
320
+ /\|\s*uniq/,
321
+ // | uniq
322
+ /\|\s*wc/,
323
+ // | wc
324
+ /\|\s*cat/,
325
+ // | cat
326
+ /\|\s*less/,
327
+ // | less
328
+ /\|\s*more/,
329
+ // | more
330
+ /\|\s*awk/,
331
+ // | awk
332
+ /\|\s*sed/,
333
+ // | sed
334
+ /\|\s*cut/,
335
+ // | cut
336
+ /\|\s*tr/,
337
+ // | tr
338
+ /\|\s*xargs/,
339
+ // | xargs
340
+ // Safe redirection
341
+ /^ls\s+.*>/,
342
+ // ls with output redirection
343
+ /^find\s+.*>/,
344
+ // find with output redirection
345
+ /^grep\s+.*>/,
346
+ // grep with output redirection
347
+ /^cat\s+.*>/
348
+ // cat with output redirection
349
+ ];
350
+ const WRITE_PATTERNS = [
351
+ // Output redirection
352
+ />/,
353
+ // output redirection
354
+ />>/,
355
+ // append redirection
356
+ /2>/,
357
+ // error redirection
358
+ /2>>/,
359
+ // error append redirection
360
+ /&>/,
361
+ // both output and error redirection
362
+ /&>>/,
363
+ // both output and error append redirection
364
+ // File operations
365
+ /tee\s+/,
366
+ // tee command
367
+ /touch\s+/,
368
+ // touch command
369
+ /mkdir\s+/,
370
+ // mkdir command
371
+ /rmdir\s+/,
372
+ // rmdir command
373
+ // Text editors
374
+ /vim\s+/,
375
+ // vim command
376
+ /nano\s+/,
377
+ // nano command
378
+ /emacs\s+/,
379
+ // emacs command
380
+ /code\s+/,
381
+ // code command (VS Code)
382
+ // File copying and moving
383
+ /cp\s+/,
384
+ // cp command
385
+ /mv\s+/,
386
+ // mv command
387
+ /scp\s+/,
388
+ // scp command
389
+ /rsync\s+/
390
+ // rsync command
391
+ ];
392
+ class CommandValidator {
393
+ config;
394
+ constructor(config) {
395
+ this.config = config;
396
+ logger.debug(`CommandValidator initialized with security level: ${config.securityLevel}`);
397
+ }
398
+ /**
399
+ * Validate a command for security and policy compliance
400
+ */
401
+ validateCommand(command) {
402
+ if (!command || command.trim() === "") {
403
+ return {
404
+ isValid: false,
405
+ error: "Command cannot be empty"
406
+ };
407
+ }
408
+ const trimmedCommand = command.trim();
409
+ if (trimmedCommand.length > MAX_COMMAND_LENGTH) {
410
+ return {
411
+ isValid: false,
412
+ error: `Command too long: ${trimmedCommand.length} characters. Maximum: ${MAX_COMMAND_LENGTH}`
413
+ };
414
+ }
415
+ if (this.config.securityLevel !== "permissive") {
416
+ for (const pattern of DANGEROUS_PATTERNS) {
417
+ if (pattern.test(trimmedCommand)) {
418
+ return {
419
+ isValid: false,
420
+ error: `Command matches dangerous pattern: ${pattern.source}`
421
+ };
422
+ }
423
+ }
424
+ }
425
+ const injectionResult = this.detectInjection(trimmedCommand);
426
+ if (!injectionResult.isValid) {
427
+ return injectionResult;
428
+ }
429
+ for (const blockedPattern of this.config.blockedCommands) {
430
+ if (trimmedCommand.includes(blockedPattern)) {
431
+ return {
432
+ isValid: false,
433
+ error: `Command is blocked: matches "${blockedPattern}"`
434
+ };
435
+ }
436
+ }
437
+ if (this.config.allowedCommands.length > 0) {
438
+ const isAllowed = this.config.allowedCommands.some(
439
+ (allowedCmd) => trimmedCommand.startsWith(allowedCmd)
440
+ );
441
+ if (!isAllowed) {
442
+ return {
443
+ isValid: false,
444
+ error: `Command not in allowed list. Allowed: ${this.config.allowedCommands.join(", ")}`
445
+ };
446
+ }
447
+ }
448
+ const requiresApproval = this.determineApprovalRequirement(trimmedCommand);
449
+ return {
450
+ isValid: true,
451
+ normalizedCommand: trimmedCommand,
452
+ requiresApproval
453
+ };
454
+ }
455
+ /**
456
+ * Detect command injection attempts
457
+ */
458
+ detectInjection(command) {
459
+ for (const pattern of INJECTION_PATTERNS) {
460
+ if (pattern.test(command)) {
461
+ return {
462
+ isValid: false,
463
+ error: `Potential command injection detected: ${pattern.source}`
464
+ };
465
+ }
466
+ }
467
+ if (this.config.securityLevel === "strict") {
468
+ const hasMultipleCommands = /;|\|{1,2}|&&/.test(command);
469
+ if (hasMultipleCommands) {
470
+ const isSafe = SAFE_PATTERNS.some((pattern) => pattern.test(command));
471
+ if (!isSafe) {
472
+ return {
473
+ isValid: false,
474
+ error: "Multiple commands detected in strict mode. Use moderate or permissive mode if this is intentional."
475
+ };
476
+ }
477
+ }
478
+ }
479
+ return {
480
+ isValid: true
481
+ };
482
+ }
483
+ /**
484
+ * Determine if a command requires approval
485
+ */
486
+ determineApprovalRequirement(command) {
487
+ for (const pattern of REQUIRES_APPROVAL_PATTERNS) {
488
+ if (pattern.test(command)) {
489
+ return true;
490
+ }
491
+ }
492
+ if (this.config.securityLevel === "strict") {
493
+ return true;
494
+ }
495
+ if (this.config.securityLevel === "moderate") {
496
+ return WRITE_PATTERNS.some((pattern) => pattern.test(command));
497
+ }
498
+ return false;
499
+ }
500
+ /**
501
+ * Get list of blocked commands
502
+ */
503
+ getBlockedCommands() {
504
+ return [...this.config.blockedCommands];
505
+ }
506
+ /**
507
+ * Get list of allowed commands
508
+ */
509
+ getAllowedCommands() {
510
+ return [...this.config.allowedCommands];
511
+ }
512
+ /**
513
+ * Get security level
514
+ */
515
+ getSecurityLevel() {
516
+ return this.config.securityLevel;
517
+ }
518
+ }
519
+ export {
520
+ CommandValidator
521
+ };
@@ -0,0 +1,47 @@
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 error_codes_exports = {};
20
+ __export(error_codes_exports, {
21
+ ProcessErrorCode: () => ProcessErrorCode
22
+ });
23
+ module.exports = __toCommonJS(error_codes_exports);
24
+ var ProcessErrorCode = /* @__PURE__ */ ((ProcessErrorCode2) => {
25
+ ProcessErrorCode2["INVALID_COMMAND"] = "PROCESS_INVALID_COMMAND";
26
+ ProcessErrorCode2["COMMAND_BLOCKED"] = "PROCESS_COMMAND_BLOCKED";
27
+ ProcessErrorCode2["COMMAND_TOO_LONG"] = "PROCESS_COMMAND_TOO_LONG";
28
+ ProcessErrorCode2["INJECTION_DETECTED"] = "PROCESS_INJECTION_DETECTED";
29
+ ProcessErrorCode2["APPROVAL_REQUIRED"] = "PROCESS_APPROVAL_REQUIRED";
30
+ ProcessErrorCode2["APPROVAL_DENIED"] = "PROCESS_APPROVAL_DENIED";
31
+ ProcessErrorCode2["EXECUTION_FAILED"] = "PROCESS_EXECUTION_FAILED";
32
+ ProcessErrorCode2["TIMEOUT"] = "PROCESS_TIMEOUT";
33
+ ProcessErrorCode2["PERMISSION_DENIED"] = "PROCESS_PERMISSION_DENIED";
34
+ ProcessErrorCode2["COMMAND_NOT_FOUND"] = "PROCESS_COMMAND_NOT_FOUND";
35
+ ProcessErrorCode2["WORKING_DIRECTORY_INVALID"] = "PROCESS_WORKING_DIRECTORY_INVALID";
36
+ ProcessErrorCode2["PROCESS_NOT_FOUND"] = "PROCESS_NOT_FOUND";
37
+ ProcessErrorCode2["TOO_MANY_PROCESSES"] = "PROCESS_TOO_MANY_PROCESSES";
38
+ ProcessErrorCode2["KILL_FAILED"] = "PROCESS_KILL_FAILED";
39
+ ProcessErrorCode2["OUTPUT_BUFFER_FULL"] = "PROCESS_OUTPUT_BUFFER_FULL";
40
+ ProcessErrorCode2["INVALID_CONFIG"] = "PROCESS_INVALID_CONFIG";
41
+ ProcessErrorCode2["SERVICE_NOT_INITIALIZED"] = "PROCESS_SERVICE_NOT_INITIALIZED";
42
+ return ProcessErrorCode2;
43
+ })(ProcessErrorCode || {});
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ ProcessErrorCode
47
+ });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Process Service Error Codes
3
+ *
4
+ * Standardized error codes for process execution and management
5
+ */
6
+ export declare enum ProcessErrorCode {
7
+ INVALID_COMMAND = "PROCESS_INVALID_COMMAND",
8
+ COMMAND_BLOCKED = "PROCESS_COMMAND_BLOCKED",
9
+ COMMAND_TOO_LONG = "PROCESS_COMMAND_TOO_LONG",
10
+ INJECTION_DETECTED = "PROCESS_INJECTION_DETECTED",
11
+ APPROVAL_REQUIRED = "PROCESS_APPROVAL_REQUIRED",
12
+ APPROVAL_DENIED = "PROCESS_APPROVAL_DENIED",
13
+ EXECUTION_FAILED = "PROCESS_EXECUTION_FAILED",
14
+ TIMEOUT = "PROCESS_TIMEOUT",
15
+ PERMISSION_DENIED = "PROCESS_PERMISSION_DENIED",
16
+ COMMAND_NOT_FOUND = "PROCESS_COMMAND_NOT_FOUND",
17
+ WORKING_DIRECTORY_INVALID = "PROCESS_WORKING_DIRECTORY_INVALID",
18
+ PROCESS_NOT_FOUND = "PROCESS_NOT_FOUND",
19
+ TOO_MANY_PROCESSES = "PROCESS_TOO_MANY_PROCESSES",
20
+ KILL_FAILED = "PROCESS_KILL_FAILED",
21
+ OUTPUT_BUFFER_FULL = "PROCESS_OUTPUT_BUFFER_FULL",
22
+ INVALID_CONFIG = "PROCESS_INVALID_CONFIG",
23
+ SERVICE_NOT_INITIALIZED = "PROCESS_SERVICE_NOT_INITIALIZED"
24
+ }
25
+ //# sourceMappingURL=error-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/process/error-codes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oBAAY,gBAAgB;IAExB,eAAe,4BAA4B;IAC3C,eAAe,4BAA4B;IAC3C,gBAAgB,6BAA6B;IAC7C,kBAAkB,+BAA+B;IACjD,iBAAiB,8BAA8B;IAC/C,eAAe,4BAA4B;IAG3C,gBAAgB,6BAA6B;IAC7C,OAAO,oBAAoB;IAC3B,iBAAiB,8BAA8B;IAC/C,iBAAiB,8BAA8B;IAC/C,yBAAyB,sCAAsC;IAG/D,iBAAiB,sBAAsB;IACvC,kBAAkB,+BAA+B;IACjD,WAAW,wBAAwB;IACnC,kBAAkB,+BAA+B;IAGjD,cAAc,2BAA2B;IACzC,uBAAuB,oCAAoC;CAC9D"}
@@ -0,0 +1,24 @@
1
+ import "../chunk-C6A6W6XS.js";
2
+ var ProcessErrorCode = /* @__PURE__ */ ((ProcessErrorCode2) => {
3
+ ProcessErrorCode2["INVALID_COMMAND"] = "PROCESS_INVALID_COMMAND";
4
+ ProcessErrorCode2["COMMAND_BLOCKED"] = "PROCESS_COMMAND_BLOCKED";
5
+ ProcessErrorCode2["COMMAND_TOO_LONG"] = "PROCESS_COMMAND_TOO_LONG";
6
+ ProcessErrorCode2["INJECTION_DETECTED"] = "PROCESS_INJECTION_DETECTED";
7
+ ProcessErrorCode2["APPROVAL_REQUIRED"] = "PROCESS_APPROVAL_REQUIRED";
8
+ ProcessErrorCode2["APPROVAL_DENIED"] = "PROCESS_APPROVAL_DENIED";
9
+ ProcessErrorCode2["EXECUTION_FAILED"] = "PROCESS_EXECUTION_FAILED";
10
+ ProcessErrorCode2["TIMEOUT"] = "PROCESS_TIMEOUT";
11
+ ProcessErrorCode2["PERMISSION_DENIED"] = "PROCESS_PERMISSION_DENIED";
12
+ ProcessErrorCode2["COMMAND_NOT_FOUND"] = "PROCESS_COMMAND_NOT_FOUND";
13
+ ProcessErrorCode2["WORKING_DIRECTORY_INVALID"] = "PROCESS_WORKING_DIRECTORY_INVALID";
14
+ ProcessErrorCode2["PROCESS_NOT_FOUND"] = "PROCESS_NOT_FOUND";
15
+ ProcessErrorCode2["TOO_MANY_PROCESSES"] = "PROCESS_TOO_MANY_PROCESSES";
16
+ ProcessErrorCode2["KILL_FAILED"] = "PROCESS_KILL_FAILED";
17
+ ProcessErrorCode2["OUTPUT_BUFFER_FULL"] = "PROCESS_OUTPUT_BUFFER_FULL";
18
+ ProcessErrorCode2["INVALID_CONFIG"] = "PROCESS_INVALID_CONFIG";
19
+ ProcessErrorCode2["SERVICE_NOT_INITIALIZED"] = "PROCESS_SERVICE_NOT_INITIALIZED";
20
+ return ProcessErrorCode2;
21
+ })(ProcessErrorCode || {});
22
+ export {
23
+ ProcessErrorCode
24
+ };