@elizaos/plugin-shell 2.0.0-alpha.9 → 2.0.11-beta.7

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 (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/auto-enable.ts +37 -0
  4. package/package.json +46 -20
  5. package/dist/actions/clearHistory.d.ts +0 -4
  6. package/dist/actions/clearHistory.d.ts.map +0 -1
  7. package/dist/actions/index.d.ts +0 -2
  8. package/dist/actions/index.d.ts.map +0 -1
  9. package/dist/approvals/allowlist.d.ts +0 -76
  10. package/dist/approvals/allowlist.d.ts.map +0 -1
  11. package/dist/approvals/analysis.d.ts +0 -76
  12. package/dist/approvals/analysis.d.ts.map +0 -1
  13. package/dist/approvals/index.d.ts +0 -12
  14. package/dist/approvals/index.d.ts.map +0 -1
  15. package/dist/approvals/service.d.ts +0 -121
  16. package/dist/approvals/service.d.ts.map +0 -1
  17. package/dist/approvals/types.d.ts +0 -219
  18. package/dist/approvals/types.d.ts.map +0 -1
  19. package/dist/build.d.ts +0 -2
  20. package/dist/build.d.ts.map +0 -1
  21. package/dist/generated/prompts/typescript/prompts.d.ts +0 -12
  22. package/dist/generated/prompts/typescript/prompts.d.ts.map +0 -1
  23. package/dist/generated/specs/spec-helpers.d.ts +0 -49
  24. package/dist/generated/specs/spec-helpers.d.ts.map +0 -1
  25. package/dist/generated/specs/specs.d.ts +0 -73
  26. package/dist/generated/specs/specs.d.ts.map +0 -1
  27. package/dist/index.browser.d.ts +0 -4
  28. package/dist/index.browser.d.ts.map +0 -1
  29. package/dist/index.d.ts +0 -14
  30. package/dist/index.d.ts.map +0 -1
  31. package/dist/index.js +0 -5278
  32. package/dist/index.js.map +0 -35
  33. package/dist/providers/index.d.ts +0 -2
  34. package/dist/providers/index.d.ts.map +0 -1
  35. package/dist/providers/shellHistoryProvider.d.ts +0 -4
  36. package/dist/providers/shellHistoryProvider.d.ts.map +0 -1
  37. package/dist/providers/terminalUsage.d.ts +0 -3
  38. package/dist/providers/terminalUsage.d.ts.map +0 -1
  39. package/dist/services/index.d.ts +0 -3
  40. package/dist/services/index.d.ts.map +0 -1
  41. package/dist/services/processRegistry.d.ts +0 -25
  42. package/dist/services/processRegistry.d.ts.map +0 -1
  43. package/dist/services/shellService.d.ts +0 -91
  44. package/dist/services/shellService.d.ts.map +0 -1
  45. package/dist/types/index.d.ts +0 -144
  46. package/dist/types/index.d.ts.map +0 -1
  47. package/dist/utils/config.d.ts +0 -4
  48. package/dist/utils/config.d.ts.map +0 -1
  49. package/dist/utils/index.d.ts +0 -7
  50. package/dist/utils/index.d.ts.map +0 -1
  51. package/dist/utils/pathUtils.d.ts +0 -5
  52. package/dist/utils/pathUtils.d.ts.map +0 -1
  53. package/dist/utils/processQueue.d.ts +0 -136
  54. package/dist/utils/processQueue.d.ts.map +0 -1
  55. package/dist/utils/ptyKeys.d.ts +0 -23
  56. package/dist/utils/ptyKeys.d.ts.map +0 -1
  57. package/dist/utils/shellArgv.d.ts +0 -37
  58. package/dist/utils/shellArgv.d.ts.map +0 -1
  59. package/dist/utils/shellUtils.d.ts +0 -103
  60. package/dist/utils/shellUtils.d.ts.map +0 -1
  61. package/dist/vitest.config.d.ts +0 -3
  62. package/dist/vitest.config.d.ts.map +0 -1
@@ -1,103 +0,0 @@
1
- /**
2
- * Shell Utilities - Platform-specific shell configuration and helpers
3
- * Ported from otto shell-utils.ts and bash-tools.shared.ts
4
- */
5
- import type { ChildProcess, ChildProcessWithoutNullStreams, SpawnOptions } from "node:child_process";
6
- import { spawn } from "node:child_process";
7
- /**
8
- * Get shell configuration for the current platform
9
- */
10
- export declare function getShellConfig(): {
11
- shell: string;
12
- args: string[];
13
- };
14
- /**
15
- * Sanitize binary output by removing control characters
16
- */
17
- export declare function sanitizeBinaryOutput(text: string): string;
18
- /**
19
- * Kill a process tree (cross-platform)
20
- */
21
- export declare function killProcessTree(pid: number): void;
22
- /**
23
- * Kill a session's process
24
- */
25
- export declare function killSession(session: {
26
- pid?: number;
27
- child?: ChildProcessWithoutNullStreams;
28
- }): void;
29
- /**
30
- * Coerce environment object to Record<string, string>
31
- */
32
- export declare function coerceEnv(env?: NodeJS.ProcessEnv | Record<string, string>): Record<string, string>;
33
- /**
34
- * Resolve working directory with fallback
35
- */
36
- export declare function resolveWorkdir(workdir: string, warnings: string[]): string;
37
- /**
38
- * Clamp a number to a range with a default value
39
- */
40
- export declare function clampNumber(value: number | undefined, defaultValue: number, min: number, max: number): number;
41
- /**
42
- * Read an environment variable as an integer
43
- */
44
- export declare function readEnvInt(key: string): number | undefined;
45
- /**
46
- * Chunk a string into smaller pieces
47
- */
48
- export declare function chunkString(input: string, limit?: number): string[];
49
- /**
50
- * Safely slice a string respecting UTF-16 surrogate pairs
51
- */
52
- export declare function sliceUtf16Safe(str: string, start: number, end?: number): string;
53
- /**
54
- * Truncate string in the middle with ellipsis
55
- */
56
- export declare function truncateMiddle(str: string, max: number): string;
57
- /**
58
- * Slice log lines with optional offset and limit
59
- */
60
- export declare function sliceLogLines(text: string, offset?: number, limit?: number): {
61
- slice: string;
62
- totalLines: number;
63
- totalChars: number;
64
- };
65
- /**
66
- * Derive a session name from a command
67
- */
68
- export declare function deriveSessionName(command: string): string | undefined;
69
- /**
70
- * Format duration in human-readable format
71
- */
72
- export declare function formatDuration(ms: number): string;
73
- /**
74
- * Pad a string to a minimum width
75
- */
76
- export declare function pad(str: string, width: number): string;
77
- export type SpawnFallback = {
78
- label: string;
79
- options: SpawnOptions;
80
- };
81
- export type SpawnWithFallbackResult = {
82
- child: ChildProcess;
83
- usedFallback: boolean;
84
- fallbackLabel?: string;
85
- };
86
- type SpawnWithFallbackParams = {
87
- argv: string[];
88
- options: SpawnOptions;
89
- fallbacks?: SpawnFallback[];
90
- spawnImpl?: typeof spawn;
91
- retryCodes?: string[];
92
- onFallback?: (err: unknown, fallback: SpawnFallback) => void;
93
- };
94
- /**
95
- * Format a spawn error for display
96
- */
97
- export declare function formatSpawnError(err: unknown): string;
98
- /**
99
- * Spawn a process with fallback options on certain error codes
100
- */
101
- export declare function spawnWithFallback(params: SpawnWithFallbackParams): Promise<SpawnWithFallbackResult>;
102
- export {};
103
- //# sourceMappingURL=shellUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shellUtils.d.ts","sourceRoot":"","sources":["../../utils/shellUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,YAAY,EACZ,8BAA8B,EAC9B,YAAY,EACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAgD3C;;GAEG;AACH,wBAAgB,cAAc,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CA0BlE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqBzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAsBjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,8BAA8B,CAAC;CACvC,GAAG,IAAI,CAKP;AAED;;GAEG;AACH,wBAAgB,SAAS,CACxB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAe1E;AAWD;;GAEG;AACH,wBAAgB,WAAW,CAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACT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E,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;CAC7D,CAAC;AAIF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAoBrD;AAqDD;;GAEG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,uBAAuB,GAC7B,OAAO,CAAC,uBAAuB,CAAC,CAsClC"}
@@ -1,3 +0,0 @@
1
- declare const _default: import("vite").UserConfig;
2
- export default _default;
3
- //# sourceMappingURL=vitest.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAEA,wBAMG"}