@dexto/core 1.5.4 → 1.5.6

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 (102) hide show
  1. package/dist/agent/DextoAgent.cjs +61 -155
  2. package/dist/agent/DextoAgent.d.ts +11 -54
  3. package/dist/agent/DextoAgent.d.ts.map +1 -1
  4. package/dist/agent/DextoAgent.js +61 -155
  5. package/dist/context/compaction/strategies/reactive-overflow.cjs +5 -3
  6. package/dist/context/compaction/strategies/reactive-overflow.d.ts +1 -0
  7. package/dist/context/compaction/strategies/reactive-overflow.d.ts.map +1 -1
  8. package/dist/context/compaction/strategies/reactive-overflow.js +5 -3
  9. package/dist/context/compaction/types.d.ts +13 -1
  10. package/dist/context/compaction/types.d.ts.map +1 -1
  11. package/dist/errors/types.cjs +0 -2
  12. package/dist/errors/types.d.ts +1 -5
  13. package/dist/errors/types.d.ts.map +1 -1
  14. package/dist/errors/types.js +0 -2
  15. package/dist/events/index.cjs +0 -2
  16. package/dist/events/index.d.ts +6 -25
  17. package/dist/events/index.d.ts.map +1 -1
  18. package/dist/events/index.js +0 -2
  19. package/dist/llm/executor/stream-processor.cjs +85 -27
  20. package/dist/llm/executor/stream-processor.d.ts +4 -0
  21. package/dist/llm/executor/stream-processor.d.ts.map +1 -1
  22. package/dist/llm/executor/stream-processor.js +85 -27
  23. package/dist/llm/executor/turn-executor.cjs +58 -130
  24. package/dist/llm/executor/turn-executor.d.ts +9 -43
  25. package/dist/llm/executor/turn-executor.d.ts.map +1 -1
  26. package/dist/llm/executor/turn-executor.js +58 -130
  27. package/dist/llm/executor/types.d.ts +0 -28
  28. package/dist/llm/executor/types.d.ts.map +1 -1
  29. package/dist/llm/services/vercel.cjs +2 -5
  30. package/dist/llm/services/vercel.d.ts +1 -6
  31. package/dist/llm/services/vercel.d.ts.map +1 -1
  32. package/dist/llm/services/vercel.js +2 -5
  33. package/dist/logger/logger.cjs +6 -7
  34. package/dist/logger/logger.d.ts +1 -0
  35. package/dist/logger/logger.d.ts.map +1 -1
  36. package/dist/logger/logger.js +6 -7
  37. package/dist/session/chat-session.cjs +19 -12
  38. package/dist/session/chat-session.d.ts +3 -6
  39. package/dist/session/chat-session.d.ts.map +1 -1
  40. package/dist/session/chat-session.js +19 -12
  41. package/dist/session/session-manager.cjs +0 -135
  42. package/dist/session/session-manager.d.ts +0 -43
  43. package/dist/session/session-manager.d.ts.map +1 -1
  44. package/dist/session/session-manager.js +0 -135
  45. package/dist/telemetry/telemetry.cjs +12 -5
  46. package/dist/telemetry/telemetry.d.ts.map +1 -1
  47. package/dist/telemetry/telemetry.js +12 -5
  48. package/dist/tools/schemas.cjs +2 -2
  49. package/dist/tools/schemas.js +2 -2
  50. package/package.json +15 -5
  51. package/dist/filesystem/error-codes.cjs +0 -53
  52. package/dist/filesystem/error-codes.d.ts +0 -31
  53. package/dist/filesystem/error-codes.d.ts.map +0 -1
  54. package/dist/filesystem/error-codes.js +0 -30
  55. package/dist/filesystem/errors.cjs +0 -303
  56. package/dist/filesystem/errors.d.ts +0 -109
  57. package/dist/filesystem/errors.d.ts.map +0 -1
  58. package/dist/filesystem/errors.js +0 -280
  59. package/dist/filesystem/filesystem-service.cjs +0 -534
  60. package/dist/filesystem/filesystem-service.d.ts +0 -97
  61. package/dist/filesystem/filesystem-service.d.ts.map +0 -1
  62. package/dist/filesystem/filesystem-service.js +0 -501
  63. package/dist/filesystem/index.cjs +0 -37
  64. package/dist/filesystem/index.d.ts +0 -11
  65. package/dist/filesystem/index.d.ts.map +0 -1
  66. package/dist/filesystem/index.js +0 -11
  67. package/dist/filesystem/path-validator.cjs +0 -250
  68. package/dist/filesystem/path-validator.d.ts +0 -103
  69. package/dist/filesystem/path-validator.d.ts.map +0 -1
  70. package/dist/filesystem/path-validator.js +0 -217
  71. package/dist/filesystem/types.cjs +0 -16
  72. package/dist/filesystem/types.d.ts +0 -175
  73. package/dist/filesystem/types.d.ts.map +0 -1
  74. package/dist/filesystem/types.js +0 -0
  75. package/dist/process/command-validator.cjs +0 -554
  76. package/dist/process/command-validator.d.ts +0 -49
  77. package/dist/process/command-validator.d.ts.map +0 -1
  78. package/dist/process/command-validator.js +0 -531
  79. package/dist/process/error-codes.cjs +0 -47
  80. package/dist/process/error-codes.d.ts +0 -25
  81. package/dist/process/error-codes.d.ts.map +0 -1
  82. package/dist/process/error-codes.js +0 -24
  83. package/dist/process/errors.cjs +0 -244
  84. package/dist/process/errors.d.ts +0 -87
  85. package/dist/process/errors.d.ts.map +0 -1
  86. package/dist/process/errors.js +0 -221
  87. package/dist/process/index.cjs +0 -37
  88. package/dist/process/index.d.ts +0 -11
  89. package/dist/process/index.d.ts.map +0 -1
  90. package/dist/process/index.js +0 -11
  91. package/dist/process/process-service.cjs +0 -497
  92. package/dist/process/process-service.d.ts +0 -69
  93. package/dist/process/process-service.d.ts.map +0 -1
  94. package/dist/process/process-service.js +0 -464
  95. package/dist/process/types.cjs +0 -16
  96. package/dist/process/types.d.ts +0 -107
  97. package/dist/process/types.d.ts.map +0 -1
  98. package/dist/process/types.js +0 -0
  99. package/dist/session/compaction-service.cjs +0 -139
  100. package/dist/session/compaction-service.d.ts +0 -81
  101. package/dist/session/compaction-service.d.ts.map +0 -1
  102. package/dist/session/compaction-service.js +0 -106
@@ -1,531 +0,0 @@
1
- import "../chunk-PTJYTZNU.js";
2
- const MAX_COMMAND_LENGTH = 1e4;
3
- const DANGEROUS_PATTERNS = [
4
- // File system destruction
5
- /rm\s+-rf\s+\//,
6
- // rm -rf /
7
- /rm\s+-rf\s+\/\s*$/,
8
- // rm -rf / (end of line)
9
- /rm\s+-rf\s+\/\s*2/,
10
- // rm -rf / 2>/dev/null (with error suppression)
11
- // Fork bomb variations
12
- /:\(\)\{\s*:\|:&\s*\};:/,
13
- // Classic fork bomb
14
- /:\(\)\{\s*:\|:&\s*\};/,
15
- // Fork bomb without final colon
16
- /:\(\)\{\s*:\|:&\s*\}/,
17
- // Fork bomb without semicolon
18
- // Disk operations
19
- /dd\s+if=.*of=\/dev\//,
20
- // dd to disk devices
21
- /dd\s+if=\/dev\/zero.*of=\/dev\//,
22
- // dd zero to disk
23
- /dd\s+if=\/dev\/urandom.*of=\/dev\//,
24
- // dd random to disk
25
- />\s*\/dev\/sd[a-z]/,
26
- // Write to disk devices
27
- />>\s*\/dev\/sd[a-z]/,
28
- // Append to disk devices
29
- // Filesystem operations
30
- /mkfs\./,
31
- // Format filesystem
32
- /mkfs\s+/,
33
- // Format filesystem with space
34
- /fdisk\s+\/dev\/sd[a-z]/,
35
- // Partition disk
36
- /parted\s+\/dev\/sd[a-z]/,
37
- // Partition disk with parted
38
- // Download and execute patterns
39
- /wget.*\|\s*sh/,
40
- // wget | sh
41
- /wget.*\|\s*bash/,
42
- // wget | bash
43
- /curl.*\|\s*sh/,
44
- // curl | sh
45
- /curl.*\|\s*bash/,
46
- // curl | bash
47
- /wget.*\|\s*python/,
48
- // wget | python
49
- /curl.*\|\s*python/,
50
- // curl | python
51
- // Shell execution
52
- /\|\s*bash/,
53
- // Pipe to bash
54
- /\|\s*sh/,
55
- // Pipe to sh
56
- /\|\s*zsh/,
57
- // Pipe to zsh
58
- /\|\s*fish/,
59
- // Pipe to fish
60
- // Command evaluation
61
- /eval\s+\$\(/,
62
- // eval $()
63
- /eval\s+`/,
64
- // eval backticks
65
- /eval\s+"/,
66
- // eval double quotes
67
- /eval\s+'/,
68
- // eval single quotes
69
- // Permission changes
70
- /chmod\s+777\s+\//,
71
- // chmod 777 /
72
- /chmod\s+777\s+\/\s*$/,
73
- // chmod 777 / (end of line)
74
- /chmod\s+-R\s+777\s+\//,
75
- // chmod -R 777 /
76
- /chown\s+-R\s+root\s+\//,
77
- // chown -R root /
78
- // Network operations
79
- /nc\s+-l\s+-p\s+\d+/,
80
- // netcat listener
81
- /ncat\s+-l\s+-p\s+\d+/,
82
- // ncat listener
83
- /socat\s+.*LISTEN/,
84
- // socat listener
85
- // Process manipulation
86
- /killall\s+-9/,
87
- // killall -9
88
- /pkill\s+-9/,
89
- // pkill -9
90
- /kill\s+-9\s+-1/,
91
- // kill -9 -1 (kill all processes)
92
- // System shutdown/reboot
93
- /shutdown\s+now/,
94
- // shutdown now
95
- /reboot/,
96
- // reboot
97
- /halt/,
98
- // halt
99
- /poweroff/,
100
- // poweroff
101
- // Memory operations
102
- /echo\s+3\s*>\s*\/proc\/sys\/vm\/drop_caches/,
103
- // Clear page cache
104
- /sync\s*;\s*echo\s+3\s*>\s*\/proc\/sys\/vm\/drop_caches/,
105
- // Sync and clear cache
106
- // Network interface manipulation
107
- /ifconfig\s+.*down/,
108
- // Bring interface down
109
- /ip\s+link\s+set\s+.*down/,
110
- // Bring interface down with ip
111
- // Package manager operations
112
- /apt\s+remove\s+--purge\s+.*/,
113
- // Remove packages
114
- /yum\s+remove\s+.*/,
115
- // Remove packages
116
- /dnf\s+remove\s+.*/,
117
- // Remove packages
118
- /pacman\s+-R\s+.*/
119
- // Remove packages
120
- ];
121
- const INJECTION_PATTERNS = [
122
- // Command chaining with dangerous commands using semicolon (more suspicious)
123
- /;\s*rm\s+-rf/,
124
- // ; rm -rf
125
- /;\s*chmod\s+777/,
126
- // ; chmod 777
127
- /;\s*chown\s+root/,
128
- // ; chown root
129
- // Command substitution with dangerous commands
130
- /`.*rm.*`/,
131
- // backticks with rm
132
- /\$\(.*rm.*\)/,
133
- // $() with rm
134
- /`.*chmod.*`/,
135
- // backticks with chmod
136
- /\$\(.*chmod.*\)/,
137
- // $() with chmod
138
- /`.*chown.*`/,
139
- // backticks with chown
140
- /\$\(.*chown.*\)/,
141
- // $() with chown
142
- // Multiple command separators
143
- /;\s*;\s*/,
144
- // Multiple semicolons
145
- /&&\s*&&\s*/,
146
- // Multiple && operators
147
- /\|\|\s*\|\|\s*/,
148
- // Multiple || operators
149
- // Redirection with dangerous commands
150
- /rm\s+.*>\s*\/dev\/null/,
151
- // rm with output redirection
152
- /chmod\s+.*>\s*\/dev\/null/,
153
- // chmod with output redirection
154
- /chown\s+.*>\s*\/dev\/null/,
155
- // chown with output redirection
156
- // Environment variable manipulation
157
- /\$[A-Z_]+\s*=\s*.*rm/,
158
- // Environment variable with rm
159
- /\$[A-Z_]+\s*=\s*.*chmod/,
160
- // Environment variable with chmod
161
- /\$[A-Z_]+\s*=\s*.*chown/
162
- // Environment variable with chown
163
- ];
164
- const REQUIRES_APPROVAL_PATTERNS = [
165
- // File operations
166
- /^rm\s+/,
167
- // rm (removal)
168
- /^mv\s+/,
169
- // move files
170
- /^cp\s+/,
171
- // copy files
172
- /^chmod\s+/,
173
- // chmod
174
- /^chown\s+/,
175
- // chown
176
- /^chgrp\s+/,
177
- // chgrp
178
- /^ln\s+/,
179
- // create links
180
- /^unlink\s+/,
181
- // unlink files
182
- // Git operations
183
- /^git\s+push/,
184
- // git push
185
- /^git\s+commit/,
186
- // git commit
187
- /^git\s+reset/,
188
- // git reset
189
- /^git\s+rebase/,
190
- // git rebase
191
- /^git\s+merge/,
192
- // git merge
193
- /^git\s+checkout/,
194
- // git checkout
195
- /^git\s+branch/,
196
- // git branch
197
- /^git\s+tag/,
198
- // git tag
199
- // Package management
200
- /^npm\s+publish/,
201
- // npm publish
202
- /^npm\s+uninstall/,
203
- // npm uninstall
204
- /^yarn\s+publish/,
205
- // yarn publish
206
- /^yarn\s+remove/,
207
- // yarn remove
208
- /^pip\s+install/,
209
- // pip install
210
- /^pip\s+uninstall/,
211
- // pip uninstall
212
- /^apt\s+install/,
213
- // apt install
214
- /^apt\s+remove/,
215
- // apt remove
216
- /^yum\s+install/,
217
- // yum install
218
- /^yum\s+remove/,
219
- // yum remove
220
- /^dnf\s+install/,
221
- // dnf install
222
- /^dnf\s+remove/,
223
- // dnf remove
224
- /^pacman\s+-S/,
225
- // pacman install
226
- /^pacman\s+-R/,
227
- // pacman remove
228
- // Container operations
229
- /^docker\s+/,
230
- // docker commands
231
- /^podman\s+/,
232
- // podman commands
233
- /^kubectl\s+/,
234
- // kubectl commands
235
- // System operations
236
- /^sudo\s+/,
237
- // sudo commands
238
- /^su\s+/,
239
- // su commands
240
- /^systemctl\s+/,
241
- // systemctl commands
242
- /^service\s+/,
243
- // service commands
244
- /^mount\s+/,
245
- // mount commands
246
- /^umount\s+/,
247
- // umount commands
248
- /^fdisk\s+/,
249
- // fdisk commands
250
- /^parted\s+/,
251
- // parted commands
252
- /^mkfs\s+/,
253
- // mkfs commands
254
- /^fsck\s+/,
255
- // fsck commands
256
- // Network operations
257
- /^iptables\s+/,
258
- // iptables commands
259
- /^ufw\s+/,
260
- // ufw commands
261
- /^firewall-cmd\s+/,
262
- // firewall-cmd commands
263
- /^sshd\s+/,
264
- // sshd commands
265
- /^ssh\s+/,
266
- // ssh commands
267
- /^scp\s+/,
268
- // scp commands
269
- /^rsync\s+/,
270
- // rsync commands
271
- // Process management
272
- /^kill\s+/,
273
- // kill commands
274
- /^killall\s+/,
275
- // killall commands
276
- /^pkill\s+/,
277
- // pkill commands
278
- /^nohup\s+/,
279
- // nohup commands
280
- /^screen\s+/,
281
- // screen commands
282
- /^tmux\s+/,
283
- // tmux commands
284
- // Database operations
285
- /^mysql\s+/,
286
- // mysql commands
287
- /^psql\s+/,
288
- // psql commands
289
- /^sqlite3\s+/,
290
- // sqlite3 commands
291
- /^mongodb\s+/,
292
- // mongodb commands
293
- /^redis-cli\s+/
294
- // redis-cli commands
295
- ];
296
- const SAFE_PATTERNS = [
297
- // Directory navigation with commands
298
- /^cd\s+.*&&\s+\w+/,
299
- // cd && command
300
- /^cd\s+.*;\s+\w+/,
301
- // cd ; command
302
- // Safe pipe operations
303
- /\|\s*grep/,
304
- // | grep
305
- /\|\s*head/,
306
- // | head
307
- /\|\s*tail/,
308
- // | tail
309
- /\|\s*sort/,
310
- // | sort
311
- /\|\s*uniq/,
312
- // | uniq
313
- /\|\s*wc/,
314
- // | wc
315
- /\|\s*cat/,
316
- // | cat
317
- /\|\s*less/,
318
- // | less
319
- /\|\s*more/,
320
- // | more
321
- /\|\s*awk/,
322
- // | awk
323
- /\|\s*sed/,
324
- // | sed
325
- /\|\s*cut/,
326
- // | cut
327
- /\|\s*tr/,
328
- // | tr
329
- /\|\s*xargs/,
330
- // | xargs
331
- // Safe redirection
332
- /^ls\s+.*>/,
333
- // ls with output redirection
334
- /^find\s+.*>/,
335
- // find with output redirection
336
- /^grep\s+.*>/,
337
- // grep with output redirection
338
- /^cat\s+.*>/
339
- // cat with output redirection
340
- ];
341
- const WRITE_PATTERNS = [
342
- // Output redirection
343
- />/,
344
- // output redirection
345
- />>/,
346
- // append redirection
347
- /2>/,
348
- // error redirection
349
- /2>>/,
350
- // error append redirection
351
- /&>/,
352
- // both output and error redirection
353
- /&>>/,
354
- // both output and error append redirection
355
- // File operations
356
- /tee\s+/,
357
- // tee command
358
- /touch\s+/,
359
- // touch command
360
- /mkdir\s+/,
361
- // mkdir command
362
- /rmdir\s+/,
363
- // rmdir command
364
- // Text editors
365
- /vim\s+/,
366
- // vim command
367
- /nano\s+/,
368
- // nano command
369
- /emacs\s+/,
370
- // emacs command
371
- /code\s+/,
372
- // code command (VS Code)
373
- // File copying and moving
374
- /cp\s+/,
375
- // cp command
376
- /mv\s+/,
377
- // mv command
378
- /scp\s+/,
379
- // scp command
380
- /rsync\s+/
381
- // rsync command
382
- ];
383
- class CommandValidator {
384
- config;
385
- logger;
386
- constructor(config, logger) {
387
- this.config = config;
388
- this.logger = logger;
389
- this.logger.debug(
390
- `CommandValidator initialized with security level: ${config.securityLevel}`
391
- );
392
- }
393
- /**
394
- * Validate a command for security and policy compliance
395
- */
396
- validateCommand(command) {
397
- if (!command || command.trim() === "") {
398
- return {
399
- isValid: false,
400
- error: "Command cannot be empty"
401
- };
402
- }
403
- const trimmedCommand = command.trim();
404
- if (/&\s*$/.test(trimmedCommand)) {
405
- return {
406
- isValid: false,
407
- error: "Commands ending with & (shell backgrounding) are not allowed. Use run_in_background parameter instead for proper process management."
408
- };
409
- }
410
- if (trimmedCommand.length > MAX_COMMAND_LENGTH) {
411
- return {
412
- isValid: false,
413
- error: `Command too long: ${trimmedCommand.length} characters. Maximum: ${MAX_COMMAND_LENGTH}`
414
- };
415
- }
416
- if (this.config.securityLevel !== "permissive") {
417
- for (const pattern of DANGEROUS_PATTERNS) {
418
- if (pattern.test(trimmedCommand)) {
419
- return {
420
- isValid: false,
421
- error: `Command matches dangerous pattern: ${pattern.source}`
422
- };
423
- }
424
- }
425
- }
426
- const injectionResult = this.detectInjection(trimmedCommand);
427
- if (!injectionResult.isValid) {
428
- return injectionResult;
429
- }
430
- for (const blockedPattern of this.config.blockedCommands) {
431
- if (trimmedCommand.includes(blockedPattern)) {
432
- return {
433
- isValid: false,
434
- error: `Command is blocked: matches "${blockedPattern}"`
435
- };
436
- }
437
- }
438
- if (this.config.allowedCommands.length > 0) {
439
- const isAllowed = this.config.allowedCommands.some(
440
- (allowedCmd) => trimmedCommand.startsWith(allowedCmd)
441
- );
442
- if (!isAllowed) {
443
- return {
444
- isValid: false,
445
- error: `Command not in allowed list. Allowed: ${this.config.allowedCommands.join(", ")}`
446
- };
447
- }
448
- }
449
- const requiresApproval = this.determineApprovalRequirement(trimmedCommand);
450
- return {
451
- isValid: true,
452
- normalizedCommand: trimmedCommand,
453
- requiresApproval
454
- };
455
- }
456
- /**
457
- * Detect command injection attempts
458
- */
459
- detectInjection(command) {
460
- for (const pattern of INJECTION_PATTERNS) {
461
- if (pattern.test(command)) {
462
- return {
463
- isValid: false,
464
- error: `Potential command injection detected: ${pattern.source}`
465
- };
466
- }
467
- }
468
- if (this.config.securityLevel === "strict") {
469
- const hasMultipleCommands = /;|\|{1,2}|&&/.test(command);
470
- if (hasMultipleCommands) {
471
- const isSafe = SAFE_PATTERNS.some((pattern) => pattern.test(command));
472
- if (!isSafe) {
473
- return {
474
- isValid: false,
475
- error: "Multiple commands detected in strict mode. Use moderate or permissive mode if this is intentional."
476
- };
477
- }
478
- }
479
- }
480
- return {
481
- isValid: true
482
- };
483
- }
484
- /**
485
- * Determine if a command requires approval
486
- * Handles compound commands (with &&, ||, ;) by checking each sub-command
487
- */
488
- determineApprovalRequirement(command) {
489
- const subCommands = command.split(/\s*(?:&&|\|\||;)\s*/).map((cmd) => cmd.trim());
490
- for (const subCmd of subCommands) {
491
- if (!subCmd) continue;
492
- const normalizedSubCmd = subCmd.replace(/^(?:then|do|else)\b\s*/, "").replace(/^\{\s*/, "").trim();
493
- if (!normalizedSubCmd) continue;
494
- for (const pattern of REQUIRES_APPROVAL_PATTERNS) {
495
- if (pattern.test(normalizedSubCmd)) {
496
- return true;
497
- }
498
- }
499
- if (this.config.securityLevel === "strict") {
500
- return true;
501
- }
502
- if (this.config.securityLevel === "moderate") {
503
- if (WRITE_PATTERNS.some((pattern) => pattern.test(normalizedSubCmd))) {
504
- return true;
505
- }
506
- }
507
- }
508
- return false;
509
- }
510
- /**
511
- * Get list of blocked commands
512
- */
513
- getBlockedCommands() {
514
- return [...this.config.blockedCommands];
515
- }
516
- /**
517
- * Get list of allowed commands
518
- */
519
- getAllowedCommands() {
520
- return [...this.config.allowedCommands];
521
- }
522
- /**
523
- * Get security level
524
- */
525
- getSecurityLevel() {
526
- return this.config.securityLevel;
527
- }
528
- }
529
- export {
530
- CommandValidator
531
- };
@@ -1,47 +0,0 @@
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
- });
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,24 +0,0 @@
1
- import "../chunk-PTJYTZNU.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
- };