@cloudbase/agent-tools 0.0.2

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 (194) hide show
  1. package/CHANGELOG.md +416 -0
  2. package/dist/agent_tool.d.ts +7 -0
  3. package/dist/agent_tool.d.ts.map +1 -0
  4. package/dist/agent_tool.js +16 -0
  5. package/dist/agent_tool.js.map +1 -0
  6. package/dist/bash/bash-tool.d.ts +61 -0
  7. package/dist/bash/bash-tool.d.ts.map +1 -0
  8. package/dist/bash/bash-tool.js +191 -0
  9. package/dist/bash/bash-tool.js.map +1 -0
  10. package/dist/bash/index.d.ts +7 -0
  11. package/dist/bash/index.d.ts.map +1 -0
  12. package/dist/bash/index.js +17 -0
  13. package/dist/bash/index.js.map +1 -0
  14. package/dist/bash/operator/base-operator.d.ts +44 -0
  15. package/dist/bash/operator/base-operator.d.ts.map +1 -0
  16. package/dist/bash/operator/base-operator.js +14 -0
  17. package/dist/bash/operator/base-operator.js.map +1 -0
  18. package/dist/bash/operator/local-operator.d.ts +15 -0
  19. package/dist/bash/operator/local-operator.d.ts.map +1 -0
  20. package/dist/bash/operator/local-operator.js +145 -0
  21. package/dist/bash/operator/local-operator.js.map +1 -0
  22. package/dist/bash/operator/sandbox-operator.d.ts +22 -0
  23. package/dist/bash/operator/sandbox-operator.d.ts.map +1 -0
  24. package/dist/bash/operator/sandbox-operator.js +112 -0
  25. package/dist/bash/operator/sandbox-operator.js.map +1 -0
  26. package/dist/bash/utils.d.ts +106 -0
  27. package/dist/bash/utils.d.ts.map +1 -0
  28. package/dist/bash/utils.js +197 -0
  29. package/dist/bash/utils.js.map +1 -0
  30. package/dist/browser/browser-instance-manager.d.ts +79 -0
  31. package/dist/browser/browser-instance-manager.d.ts.map +1 -0
  32. package/dist/browser/browser-instance-manager.js +242 -0
  33. package/dist/browser/browser-instance-manager.js.map +1 -0
  34. package/dist/browser/browser-tool-executor.d.ts +57 -0
  35. package/dist/browser/browser-tool-executor.d.ts.map +1 -0
  36. package/dist/browser/browser-tool-executor.js +205 -0
  37. package/dist/browser/browser-tool-executor.js.map +1 -0
  38. package/dist/browser/browser_client_unified.d.ts +52 -0
  39. package/dist/browser/browser_client_unified.d.ts.map +1 -0
  40. package/dist/browser/browser_client_unified.js +381 -0
  41. package/dist/browser/browser_client_unified.js.map +1 -0
  42. package/dist/browser/browser_tool_unified.d.ts +93 -0
  43. package/dist/browser/browser_tool_unified.d.ts.map +1 -0
  44. package/dist/browser/browser_tool_unified.js +181 -0
  45. package/dist/browser/browser_tool_unified.js.map +1 -0
  46. package/dist/browser/index.d.ts +7 -0
  47. package/dist/browser/index.d.ts.map +1 -0
  48. package/dist/browser/index.js +19 -0
  49. package/dist/browser/index.js.map +1 -0
  50. package/dist/browser/sandbox-connector.d.ts +93 -0
  51. package/dist/browser/sandbox-connector.d.ts.map +1 -0
  52. package/dist/browser/sandbox-connector.js +272 -0
  53. package/dist/browser/sandbox-connector.js.map +1 -0
  54. package/dist/browser/types.d.ts +53 -0
  55. package/dist/browser/types.d.ts.map +1 -0
  56. package/dist/browser/types.js +3 -0
  57. package/dist/browser/types.js.map +1 -0
  58. package/dist/code_executers/base_code_executor.d.ts +17 -0
  59. package/dist/code_executers/base_code_executor.d.ts.map +1 -0
  60. package/dist/code_executers/base_code_executor.js +20 -0
  61. package/dist/code_executers/base_code_executor.js.map +1 -0
  62. package/dist/code_executers/built_in_code_executor.d.ts +25 -0
  63. package/dist/code_executers/built_in_code_executor.d.ts.map +1 -0
  64. package/dist/code_executers/built_in_code_executor.js +106 -0
  65. package/dist/code_executers/built_in_code_executor.js.map +1 -0
  66. package/dist/code_executers/unsafe_local_code_executor.d.ts +118 -0
  67. package/dist/code_executers/unsafe_local_code_executor.d.ts.map +1 -0
  68. package/dist/code_executers/unsafe_local_code_executor.js +605 -0
  69. package/dist/code_executers/unsafe_local_code_executor.js.map +1 -0
  70. package/dist/fs/edit-tool.d.ts +26 -0
  71. package/dist/fs/edit-tool.d.ts.map +1 -0
  72. package/dist/fs/edit-tool.js +202 -0
  73. package/dist/fs/edit-tool.js.map +1 -0
  74. package/dist/fs/glob-tool.d.ts +31 -0
  75. package/dist/fs/glob-tool.d.ts.map +1 -0
  76. package/dist/fs/glob-tool.js +287 -0
  77. package/dist/fs/glob-tool.js.map +1 -0
  78. package/dist/fs/grep-tool.d.ts +32 -0
  79. package/dist/fs/grep-tool.d.ts.map +1 -0
  80. package/dist/fs/grep-tool.js +353 -0
  81. package/dist/fs/grep-tool.js.map +1 -0
  82. package/dist/fs/index.d.ts +11 -0
  83. package/dist/fs/index.d.ts.map +1 -0
  84. package/dist/fs/index.js +38 -0
  85. package/dist/fs/index.js.map +1 -0
  86. package/dist/fs/ls-tool.d.ts +26 -0
  87. package/dist/fs/ls-tool.d.ts.map +1 -0
  88. package/dist/fs/ls-tool.js +235 -0
  89. package/dist/fs/ls-tool.js.map +1 -0
  90. package/dist/fs/multiedit-tool.d.ts +34 -0
  91. package/dist/fs/multiedit-tool.d.ts.map +1 -0
  92. package/dist/fs/multiedit-tool.js +158 -0
  93. package/dist/fs/multiedit-tool.js.map +1 -0
  94. package/dist/fs/operator/base-operator.d.ts +28 -0
  95. package/dist/fs/operator/base-operator.d.ts.map +1 -0
  96. package/dist/fs/operator/base-operator.js +21 -0
  97. package/dist/fs/operator/base-operator.js.map +1 -0
  98. package/dist/fs/operator/in-memory-operator.d.ts +39 -0
  99. package/dist/fs/operator/in-memory-operator.d.ts.map +1 -0
  100. package/dist/fs/operator/in-memory-operator.js +115 -0
  101. package/dist/fs/operator/in-memory-operator.js.map +1 -0
  102. package/dist/fs/operator/index.d.ts +6 -0
  103. package/dist/fs/operator/index.d.ts.map +1 -0
  104. package/dist/fs/operator/index.js +28 -0
  105. package/dist/fs/operator/index.js.map +1 -0
  106. package/dist/fs/operator/local-operator.d.ts +25 -0
  107. package/dist/fs/operator/local-operator.d.ts.map +1 -0
  108. package/dist/fs/operator/local-operator.js +62 -0
  109. package/dist/fs/operator/local-operator.js.map +1 -0
  110. package/dist/fs/operator/sanbox-operator.d.ts +31 -0
  111. package/dist/fs/operator/sanbox-operator.d.ts.map +1 -0
  112. package/dist/fs/operator/sanbox-operator.js +172 -0
  113. package/dist/fs/operator/sanbox-operator.js.map +1 -0
  114. package/dist/fs/operator/transaction/index.d.ts +6 -0
  115. package/dist/fs/operator/transaction/index.d.ts.map +1 -0
  116. package/dist/fs/operator/transaction/index.js +28 -0
  117. package/dist/fs/operator/transaction/index.js.map +1 -0
  118. package/dist/fs/operator/transaction/snapshot-strategies.d.ts +54 -0
  119. package/dist/fs/operator/transaction/snapshot-strategies.d.ts.map +1 -0
  120. package/dist/fs/operator/transaction/snapshot-strategies.js +278 -0
  121. package/dist/fs/operator/transaction/snapshot-strategies.js.map +1 -0
  122. package/dist/fs/operator/transaction/transaction-operator.d.ts +53 -0
  123. package/dist/fs/operator/transaction/transaction-operator.d.ts.map +1 -0
  124. package/dist/fs/operator/transaction/transaction-operator.js +195 -0
  125. package/dist/fs/operator/transaction/transaction-operator.js.map +1 -0
  126. package/dist/fs/operator/transaction/transaction-utils.d.ts +80 -0
  127. package/dist/fs/operator/transaction/transaction-utils.d.ts.map +1 -0
  128. package/dist/fs/operator/transaction/transaction-utils.js +156 -0
  129. package/dist/fs/operator/transaction/transaction-utils.js.map +1 -0
  130. package/dist/fs/read-tool.d.ts +32 -0
  131. package/dist/fs/read-tool.d.ts.map +1 -0
  132. package/dist/fs/read-tool.js +271 -0
  133. package/dist/fs/read-tool.js.map +1 -0
  134. package/dist/fs/str-replace-editor.d.ts +23 -0
  135. package/dist/fs/str-replace-editor.d.ts.map +1 -0
  136. package/dist/fs/str-replace-editor.js +74 -0
  137. package/dist/fs/str-replace-editor.js.map +1 -0
  138. package/dist/fs/toolkit.d.ts +61 -0
  139. package/dist/fs/toolkit.d.ts.map +1 -0
  140. package/dist/fs/toolkit.js +113 -0
  141. package/dist/fs/toolkit.js.map +1 -0
  142. package/dist/fs/utils.d.ts +32 -0
  143. package/dist/fs/utils.d.ts.map +1 -0
  144. package/dist/fs/utils.js +133 -0
  145. package/dist/fs/utils.js.map +1 -0
  146. package/dist/fs/write-tool.d.ts +26 -0
  147. package/dist/fs/write-tool.d.ts.map +1 -0
  148. package/dist/fs/write-tool.js +110 -0
  149. package/dist/fs/write-tool.js.map +1 -0
  150. package/dist/index.d.ts +10 -0
  151. package/dist/index.d.ts.map +1 -0
  152. package/dist/index.js +40 -0
  153. package/dist/index.js.map +1 -0
  154. package/dist/mcp/agkit-mcp-server.d.ts +291 -0
  155. package/dist/mcp/agkit-mcp-server.d.ts.map +1 -0
  156. package/dist/mcp/agkit-mcp-server.js +821 -0
  157. package/dist/mcp/agkit-mcp-server.js.map +1 -0
  158. package/dist/mcp/client-tool.d.ts +65 -0
  159. package/dist/mcp/client-tool.d.ts.map +1 -0
  160. package/dist/mcp/client-tool.js +220 -0
  161. package/dist/mcp/client-tool.js.map +1 -0
  162. package/dist/mcp/index.d.ts +14 -0
  163. package/dist/mcp/index.d.ts.map +1 -0
  164. package/dist/mcp/index.js +26 -0
  165. package/dist/mcp/index.js.map +1 -0
  166. package/dist/mcp/mcp-client-manager.d.ts +153 -0
  167. package/dist/mcp/mcp-client-manager.d.ts.map +1 -0
  168. package/dist/mcp/mcp-client-manager.js +606 -0
  169. package/dist/mcp/mcp-client-manager.js.map +1 -0
  170. package/dist/mcp/mcp-toolkit.d.ts +112 -0
  171. package/dist/mcp/mcp-toolkit.d.ts.map +1 -0
  172. package/dist/mcp/mcp-toolkit.js +188 -0
  173. package/dist/mcp/mcp-toolkit.js.map +1 -0
  174. package/dist/mcp/types.d.ts +157 -0
  175. package/dist/mcp/types.d.ts.map +1 -0
  176. package/dist/mcp/types.js +34 -0
  177. package/dist/mcp/types.js.map +1 -0
  178. package/dist/mcp/utils.d.ts +17 -0
  179. package/dist/mcp/utils.d.ts.map +1 -0
  180. package/dist/mcp/utils.js +48 -0
  181. package/dist/mcp/utils.js.map +1 -0
  182. package/dist/types/index.d.ts +31 -0
  183. package/dist/types/index.d.ts.map +1 -0
  184. package/dist/types/index.js +3 -0
  185. package/dist/types/index.js.map +1 -0
  186. package/dist/types/zod.d.ts +18 -0
  187. package/dist/types/zod.d.ts.map +1 -0
  188. package/dist/types/zod.js +3 -0
  189. package/dist/types/zod.js.map +1 -0
  190. package/dist/utils.d.ts +141 -0
  191. package/dist/utils.d.ts.map +1 -0
  192. package/dist/utils.js +379 -0
  193. package/dist/utils.js.map +1 -0
  194. package/package.json +46 -0
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.InMemoryFileOperator = void 0;
37
+ const base_operator_1 = require("./base-operator");
38
+ const path = __importStar(require("path"));
39
+ class InMemoryFileOperator extends base_operator_1.BaseFileOperator {
40
+ constructor(fs, workspaceRoot) {
41
+ super();
42
+ this.fileSystem = fs;
43
+ this.workspaceRoot = workspaceRoot || "/";
44
+ }
45
+ /**
46
+ * Set workspace root for path resolution
47
+ */
48
+ setWorkspaceRoot(workspaceRoot) {
49
+ this.workspaceRoot = workspaceRoot;
50
+ }
51
+ /**
52
+ * Get current workspace root
53
+ */
54
+ getWorkspaceRoot() {
55
+ return this.workspaceRoot;
56
+ }
57
+ /**
58
+ * Resolve path relative to workspace root instead of process.cwd()
59
+ * For memory file system, we ensure all paths are absolute to avoid cwd issues
60
+ */
61
+ resolvePath(filePath) {
62
+ const pathStr = filePath.toString();
63
+ if (path.posix.isAbsolute(pathStr)) {
64
+ return path.posix.normalize(pathStr);
65
+ }
66
+ // For memory file system, use path.posix.join to avoid cwd calls
67
+ return path.posix.join(this.workspaceRoot, pathStr);
68
+ }
69
+ async access(path) {
70
+ const resolvedPath = this.resolvePath(path);
71
+ return this.fileSystem.promises.access(resolvedPath);
72
+ }
73
+ async readFile(path, encoding) {
74
+ const resolvedPath = this.resolvePath(path);
75
+ if (encoding) {
76
+ return this.fileSystem.promises.readFile(resolvedPath, encoding);
77
+ }
78
+ return this.fileSystem.promises.readFile(resolvedPath);
79
+ }
80
+ async mkdir(path, options) {
81
+ const resolvedPath = this.resolvePath(path);
82
+ return this.fileSystem.promises.mkdir(resolvedPath, options);
83
+ }
84
+ async writeFile(path, data, options) {
85
+ const resolvedPath = this.resolvePath(path);
86
+ return this.fileSystem.promises.writeFile(resolvedPath, data, options);
87
+ }
88
+ async readdir(path, options) {
89
+ const resolvedPath = this.resolvePath(path);
90
+ return this.fileSystem.promises.readdir(resolvedPath, options);
91
+ }
92
+ async stat(path) {
93
+ const resolvedPath = this.resolvePath(path);
94
+ return this.fileSystem.promises.stat(resolvedPath);
95
+ }
96
+ async exists(path) {
97
+ const resolvedPath = this.resolvePath(path);
98
+ return this.fileSystem.existsSync(resolvedPath);
99
+ }
100
+ async unlink(path) {
101
+ const resolvedPath = this.resolvePath(path);
102
+ return this.fileSystem.promises.unlink(resolvedPath);
103
+ }
104
+ async rmdir(path) {
105
+ const resolvedPath = this.resolvePath(path);
106
+ return this.fileSystem.promises.rmdir(resolvedPath);
107
+ }
108
+ async rename(oldPath, newPath) {
109
+ const resolvedOldPath = this.resolvePath(oldPath);
110
+ const resolvedNewPath = this.resolvePath(newPath);
111
+ return this.fileSystem.promises.rename(resolvedOldPath, resolvedNewPath);
112
+ }
113
+ }
114
+ exports.InMemoryFileOperator = InMemoryFileOperator;
115
+ //# sourceMappingURL=in-memory-operator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-operator.js","sourceRoot":"","sources":["../../../src/fs/operator/in-memory-operator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmD;AAMnD,2CAA6B;AAE7B,MAAa,oBAAqB,SAAQ,gCAAgB;IAIxD,YAAY,EAAO,EAAE,aAAsB;QACzC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,IAAI,GAAG,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,aAAqB;QACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAkB;QACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;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LocalFileOperator } from "./local-operator";
3
+ export { InMemoryFileOperator } from "./in-memory-operator";
4
+ export { SandboxFileOperator } from "./sanbox-operator";
5
+ export * from "./transaction";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fs/operator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD,cAAc,eAAe,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SandboxFileOperator = exports.InMemoryFileOperator = exports.LocalFileOperator = exports.BaseFileOperator = void 0;
18
+ var base_operator_1 = require("./base-operator");
19
+ Object.defineProperty(exports, "BaseFileOperator", { enumerable: true, get: function () { return base_operator_1.BaseFileOperator; } });
20
+ var local_operator_1 = require("./local-operator");
21
+ Object.defineProperty(exports, "LocalFileOperator", { enumerable: true, get: function () { return local_operator_1.LocalFileOperator; } });
22
+ var in_memory_operator_1 = require("./in-memory-operator");
23
+ Object.defineProperty(exports, "InMemoryFileOperator", { enumerable: true, get: function () { return in_memory_operator_1.InMemoryFileOperator; } });
24
+ var sanbox_operator_1 = require("./sanbox-operator");
25
+ Object.defineProperty(exports, "SandboxFileOperator", { enumerable: true, get: function () { return sanbox_operator_1.SandboxFileOperator; } });
26
+ // Transaction-related exports
27
+ __exportStar(require("./transaction"), exports);
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fs/operator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAAmD;AAA1C,iHAAA,gBAAgB,OAAA;AACzB,mDAAqD;AAA5C,mHAAA,iBAAiB,OAAA;AAC1B,2DAA4D;AAAnD,0HAAA,oBAAoB,OAAA;AAC7B,qDAAwD;AAA/C,sHAAA,mBAAmB,OAAA;AAE5B,8BAA8B;AAC9B,gDAA8B"}
@@ -0,0 +1,25 @@
1
+ import fs from "fs";
2
+ import type { Stats as MemfsStats } from "memfs/lib/node/Stats";
3
+ import { BaseFileOperator } from "./base-operator";
4
+ export declare class LocalFileOperator extends BaseFileOperator {
5
+ workspaceRoot: string;
6
+ constructor(config?: {
7
+ workspaceRoot?: string;
8
+ });
9
+ resolvePath(filePath: fs.PathLike): string;
10
+ access(path: fs.PathLike): Promise<void>;
11
+ readFile(path: fs.PathLike): Promise<Buffer>;
12
+ readFile(path: fs.PathLike, encoding: BufferEncoding): Promise<string>;
13
+ mkdir(path: fs.PathLike, options?: fs.MakeDirectoryOptions): Promise<string | undefined>;
14
+ writeFile(path: fs.PathLike, data: string | NodeJS.ArrayBufferView, options?: fs.WriteFileOptions): Promise<void>;
15
+ readdir(path: fs.PathLike): Promise<string[]>;
16
+ readdir(path: fs.PathLike, options: {
17
+ withFileTypes: true;
18
+ }): Promise<fs.Dirent[]>;
19
+ stat(path: fs.PathLike): Promise<fs.Stats | MemfsStats>;
20
+ exists(path: fs.PathLike): Promise<boolean>;
21
+ unlink(path: fs.PathLike): Promise<void>;
22
+ rmdir(path: fs.PathLike): Promise<void>;
23
+ rename(oldPath: fs.PathLike, newPath: fs.PathLike): Promise<void>;
24
+ }
25
+ //# sourceMappingURL=local-operator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-operator.d.ts","sourceRoot":"","sources":["../../../src/fs/operator/local-operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,KAAK,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,qBAAa,iBAAkB,SAAQ,gBAAgB;IAC9C,aAAa,EAAE,MAAM,CAAC;gBAEjB,MAAM,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE;IAMxC,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,GAAG,MAAM;IAW3C,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAYtE,KAAK,CACT,IAAI,EAAE,EAAE,CAAC,QAAQ,EACjB,OAAO,CAAC,EAAE,EAAE,CAAC,oBAAoB,GAChC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAIxB,SAAS,CACb,IAAI,EAAE,EAAE,CAAC,QAAQ,EACjB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,eAAe,EACrC,OAAO,CAAC,EAAE,EAAE,CAAC,gBAAgB,GAC5B,OAAO,CAAC,IAAI,CAAC;IAIV,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAC7C,OAAO,CACX,IAAI,EAAE,EAAE,CAAC,QAAQ,EACjB,OAAO,EAAE;QAAE,aAAa,EAAE,IAAI,CAAA;KAAE,GAC/B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAQjB,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC;IAIvD,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ;IAIxB,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAMxE"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LocalFileOperator = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const base_operator_1 = require("./base-operator");
10
+ class LocalFileOperator extends base_operator_1.BaseFileOperator {
11
+ constructor(config) {
12
+ super();
13
+ this.workspaceRoot =
14
+ path_1.default.resolve(config?.workspaceRoot || "") || process.cwd();
15
+ }
16
+ resolvePath(filePath) {
17
+ const pathStr = filePath.toString();
18
+ if (path_1.default.isAbsolute(pathStr)) {
19
+ return pathStr;
20
+ }
21
+ if (this.workspaceRoot) {
22
+ return path_1.default.resolve(this.workspaceRoot, pathStr);
23
+ }
24
+ return path_1.default.resolve(pathStr);
25
+ }
26
+ async access(path) {
27
+ return fs_1.default.promises.access(this.resolvePath(path));
28
+ }
29
+ async readFile(path, encoding) {
30
+ const resolvedPath = this.resolvePath(path);
31
+ if (encoding) {
32
+ return fs_1.default.promises.readFile(resolvedPath, encoding);
33
+ }
34
+ return fs_1.default.promises.readFile(resolvedPath);
35
+ }
36
+ async mkdir(path, options) {
37
+ return fs_1.default.promises.mkdir(this.resolvePath(path), options);
38
+ }
39
+ async writeFile(path, data, options) {
40
+ return fs_1.default.promises.writeFile(this.resolvePath(path), data, options);
41
+ }
42
+ async readdir(path, options) {
43
+ return fs_1.default.promises.readdir(this.resolvePath(path), options);
44
+ }
45
+ async stat(path) {
46
+ return fs_1.default.promises.stat(this.resolvePath(path));
47
+ }
48
+ async exists(path) {
49
+ return fs_1.default.existsSync(this.resolvePath(path));
50
+ }
51
+ async unlink(path) {
52
+ return fs_1.default.promises.unlink(this.resolvePath(path));
53
+ }
54
+ async rmdir(path) {
55
+ return fs_1.default.promises.rmdir(this.resolvePath(path));
56
+ }
57
+ async rename(oldPath, newPath) {
58
+ return fs_1.default.promises.rename(this.resolvePath(oldPath), this.resolvePath(newPath));
59
+ }
60
+ }
61
+ exports.LocalFileOperator = LocalFileOperator;
62
+ //# sourceMappingURL=local-operator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-operator.js","sourceRoot":"","sources":["../../../src/fs/operator/local-operator.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,mDAAmD;AAEnD,MAAa,iBAAkB,SAAQ,gCAAgB;IAGrD,YAAY,MAAmC;QAC7C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa;YAChB,cAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,IAAI,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAC/D,CAAC;IAEM,WAAW,CAAC,QAAqB;QACtC,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,EAAE,C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CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,OAAc,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAiB;QAC1B,OAAO,YAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAiB;QAC5B,OAAO,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAiB;QAC5B,OAAO,YAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAiB;QAC3B,OAAO,YAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAoB,EAAE,OAAoB;QACrD,OAAO,YAAE,CAAC,QAAQ,CAAC,MAAM,CACvB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EACzB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAC1B,CAAC;IACJ,CAAC;CACF;AAvFD,8CAuFC"}
@@ -0,0 +1,31 @@
1
+ import type * as fs from "node:fs";
2
+ import { Sandbox } from "@e2b/code-interpreter";
3
+ import { BaseFileOperator } from "./base-operator";
4
+ import { type Stats as MemfsStats } from "memfs/lib/node/Stats";
5
+ export declare class SandboxFileOperator extends BaseFileOperator {
6
+ sandbox: Sandbox;
7
+ workspaceRoot: string;
8
+ constructor(fields?: {
9
+ sandbox?: Sandbox;
10
+ workspaceRoot?: string;
11
+ });
12
+ /**
13
+ * Resolve path relative to workspace root if it's not absolute
14
+ */
15
+ resolvePath(pathLike: fs.PathLike): string;
16
+ access(path: fs.PathLike): Promise<void>;
17
+ readFile(path: fs.PathLike): Promise<Buffer>;
18
+ readFile(path: fs.PathLike, encoding: BufferEncoding): Promise<string>;
19
+ mkdir(path: fs.PathLike, options?: fs.MakeDirectoryOptions): Promise<string | undefined>;
20
+ writeFile(path: fs.PathLike, data: string | NodeJS.ArrayBufferView | ArrayBuffer | Blob | ReadableStream): Promise<void>;
21
+ readdir(path: fs.PathLike): Promise<string[]>;
22
+ readdir(path: fs.PathLike, options: {
23
+ withFileTypes: true;
24
+ }): Promise<fs.Dirent[]>;
25
+ stat(path: fs.PathLike): Promise<MemfsStats<number | bigint>>;
26
+ exists(path: fs.PathLike): Promise<boolean>;
27
+ unlink(path: fs.PathLike): Promise<void>;
28
+ rmdir(path: fs.PathLike): Promise<void>;
29
+ rename(oldPath: fs.PathLike, newPath: fs.PathLike): Promise<void>;
30
+ }
31
+ //# sourceMappingURL=sanbox-operator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanbox-operator.d.ts","sourceRoot":"","sources":["../../../src/fs/operator/sanbox-operator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAY,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAS,KAAK,KAAK,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvE,qBAAa,mBAAoB,SAAQ,gBAAgB;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;gBAEjB,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE;IASlE;;OAEG;IACI,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,GAAG,MAAM;IAS3C,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC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CAAC;CAKxE"}
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.SandboxFileOperator = void 0;
37
+ const code_interpreter_1 = require("@e2b/code-interpreter");
38
+ const base_operator_1 = require("./base-operator");
39
+ const Stats_1 = require("memfs/lib/node/Stats");
40
+ const node_1 = require("memfs/lib/node");
41
+ const constants_1 = require("memfs/lib/constants");
42
+ const path = __importStar(require("path"));
43
+ class SandboxFileOperator extends base_operator_1.BaseFileOperator {
44
+ constructor(fields) {
45
+ super();
46
+ if (!fields?.sandbox) {
47
+ throw new Error("Sandbox instance is required");
48
+ }
49
+ this.sandbox = fields.sandbox;
50
+ this.workspaceRoot = path.resolve("/home/user", fields?.workspaceRoot);
51
+ }
52
+ /**
53
+ * Resolve path relative to workspace root if it's not absolute
54
+ */
55
+ resolvePath(pathLike) {
56
+ const pathStr = pathLike.toString();
57
+ if (path.posix.isAbsolute(pathStr)) {
58
+ return pathStr;
59
+ }
60
+ // Use path.posix.join for sandbox environment (Unix-like paths)
61
+ return path.posix.join(this.workspaceRoot, pathStr);
62
+ }
63
+ async access(path) {
64
+ const resolvedPath = this.resolvePath(path);
65
+ await this.sandbox.files.getInfo(resolvedPath);
66
+ }
67
+ async readFile(path, encoding) {
68
+ const resolvedPath = this.resolvePath(path);
69
+ const res = await this.sandbox.files.read(resolvedPath);
70
+ const buffer = Buffer.from(res);
71
+ if (encoding) {
72
+ return buffer.toString(encoding);
73
+ }
74
+ else {
75
+ return buffer;
76
+ }
77
+ }
78
+ async mkdir(path, options) {
79
+ const resolvedPath = this.resolvePath(path);
80
+ if (options?.recursive) {
81
+ const isSuccess = await this.sandbox.files.makeDir(resolvedPath);
82
+ if (isSuccess) {
83
+ return resolvedPath;
84
+ }
85
+ else {
86
+ return undefined;
87
+ }
88
+ }
89
+ else {
90
+ await this.sandbox.files.makeDir(resolvedPath);
91
+ return undefined;
92
+ }
93
+ }
94
+ async writeFile(path, data) {
95
+ const resolvedPath = this.resolvePath(path);
96
+ // Handle conversion from NodeJS.ArrayBufferView to ArrayBuffer
97
+ let finalData;
98
+ if (typeof data === "string") {
99
+ finalData = data;
100
+ }
101
+ else if (data instanceof ArrayBuffer) {
102
+ finalData = data;
103
+ }
104
+ else if (data instanceof Blob) {
105
+ finalData = data;
106
+ }
107
+ else if (data instanceof ReadableStream) {
108
+ finalData = data;
109
+ }
110
+ else {
111
+ // Handle NodeJS.ArrayBufferView (TypedArray or DataView)
112
+ finalData = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
113
+ }
114
+ await this.sandbox.files.write(resolvedPath, finalData);
115
+ }
116
+ async readdir(path, options) {
117
+ const resolvedPath = this.resolvePath(path);
118
+ const items = await this.sandbox.files.list(resolvedPath);
119
+ if (options?.withFileTypes) {
120
+ // Return Dirent array
121
+ return items.map((item) => {
122
+ const dirent = {
123
+ name: item.name,
124
+ path: item.path,
125
+ parentPath: "",
126
+ isFile: () => item.type === code_interpreter_1.FileType.FILE,
127
+ isDirectory: () => item.type === code_interpreter_1.FileType.DIR,
128
+ isBlockDevice: () => false,
129
+ isCharacterDevice: () => false,
130
+ isSymbolicLink: () => false,
131
+ isFIFO: () => false,
132
+ isSocket: () => false,
133
+ };
134
+ return dirent;
135
+ });
136
+ }
137
+ else {
138
+ // Return string array (file names)
139
+ return items.map((item) => item.name);
140
+ }
141
+ }
142
+ async stat(path) {
143
+ const resolvedPath = this.resolvePath(path);
144
+ const info = await this.sandbox.files.getInfo(resolvedPath);
145
+ const node = new node_1.Node(0, (info.type === code_interpreter_1.FileType.FILE ? constants_1.constants.S_IFREG : constants_1.constants.S_IFDIR) |
146
+ info.mode);
147
+ node.mtime = info.modifiedTime ? new Date(info.modifiedTime) : new Date();
148
+ node.ctime = new Date(node.mtime);
149
+ node.getSize = () => info.size;
150
+ const stats = Stats_1.Stats.build(node);
151
+ return stats;
152
+ }
153
+ async exists(path) {
154
+ const resolvedPath = this.resolvePath(path);
155
+ return this.sandbox.files.exists(resolvedPath);
156
+ }
157
+ async unlink(path) {
158
+ const resolvedPath = this.resolvePath(path);
159
+ await this.sandbox.files.remove(resolvedPath);
160
+ }
161
+ async rmdir(path) {
162
+ const resolvedPath = this.resolvePath(path);
163
+ await this.sandbox.files.remove(resolvedPath);
164
+ }
165
+ async rename(oldPath, newPath) {
166
+ const resolvedOldPath = this.resolvePath(oldPath);
167
+ const resolvedNewPath = this.resolvePath(newPath);
168
+ await this.sandbox.files.rename(resolvedOldPath, resolvedNewPath);
169
+ }
170
+ }
171
+ exports.SandboxFileOperator = SandboxFileOperator;
172
+ //# sourceMappingURL=sanbox-operator.js.map
@@ -0,0 +1 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iB;QAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAiB;QAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAoB,EAAE,OAAoB;QACrD,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC;CACF;AApKD,kDAoKC"}
@@ -0,0 +1,6 @@
1
+ export { TransactionFileOperator, EOperatorType } from "./transaction-operator";
2
+ export type { ITransactionFileOperatorConfig } from "./transaction-operator";
3
+ export { SnapshotStrategy, LocalSnapshotStrategy, MemorySnapshotStrategy, SandboxSnapshotStrategy, } from "./snapshot-strategies";
4
+ export type { TransactionOperation, FileState } from "./snapshot-strategies";
5
+ export * from "./transaction-utils";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fs/operator/transaction/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAChF,YAAY,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7E,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SandboxSnapshotStrategy = exports.MemorySnapshotStrategy = exports.LocalSnapshotStrategy = exports.SnapshotStrategy = exports.EOperatorType = exports.TransactionFileOperator = void 0;
18
+ // Transaction-related exports
19
+ var transaction_operator_1 = require("./transaction-operator");
20
+ Object.defineProperty(exports, "TransactionFileOperator", { enumerable: true, get: function () { return transaction_operator_1.TransactionFileOperator; } });
21
+ Object.defineProperty(exports, "EOperatorType", { enumerable: true, get: function () { return transaction_operator_1.EOperatorType; } });
22
+ var snapshot_strategies_1 = require("./snapshot-strategies");
23
+ Object.defineProperty(exports, "SnapshotStrategy", { enumerable: true, get: function () { return snapshot_strategies_1.SnapshotStrategy; } });
24
+ Object.defineProperty(exports, "LocalSnapshotStrategy", { enumerable: true, get: function () { return snapshot_strategies_1.LocalSnapshotStrategy; } });
25
+ Object.defineProperty(exports, "MemorySnapshotStrategy", { enumerable: true, get: function () { return snapshot_strategies_1.MemorySnapshotStrategy; } });
26
+ Object.defineProperty(exports, "SandboxSnapshotStrategy", { enumerable: true, get: function () { return snapshot_strategies_1.SandboxSnapshotStrategy; } });
27
+ __exportStar(require("./transaction-utils"), exports);
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/fs/operator/transaction/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,+DAAgF;AAAvE,+HAAA,uBAAuB,OAAA;AAAE,qHAAA,aAAa,OAAA;AAE/C,6DAK+B;AAJ7B,uHAAA,gBAAgB,OAAA;AAChB,4HAAA,qBAAqB,OAAA;AACrB,6HAAA,sBAAsB,OAAA;AACtB,8HAAA,uBAAuB,OAAA;AAGzB,sDAAoC"}
@@ -0,0 +1,54 @@
1
+ import type { BaseFileOperator } from "../base-operator";
2
+ import type { InMemoryFileOperator } from "../in-memory-operator";
3
+ export interface TransactionOperation {
4
+ type: "write" | "mkdir" | "unlink" | "rmdir" | "rename";
5
+ path: string;
6
+ oldPath?: string;
7
+ timestamp: number;
8
+ }
9
+ export interface FileState {
10
+ exists: boolean;
11
+ isDirectory: boolean;
12
+ contentLoader?: () => Promise<Buffer>;
13
+ }
14
+ export declare abstract class SnapshotStrategy {
15
+ abstract initialize(): Promise<void>;
16
+ abstract saveFile(path: string, fileState: FileState): Promise<void>;
17
+ abstract rollback(operations: TransactionOperation[]): Promise<void>;
18
+ abstract cleanup(): Promise<void>;
19
+ }
20
+ export declare class LocalSnapshotStrategy extends SnapshotStrategy {
21
+ private backupDir;
22
+ private backupPaths;
23
+ private createdPaths;
24
+ initialize(): Promise<any>;
25
+ saveFile(path: string, fileState: FileState): Promise<void>;
26
+ rollback(operations: TransactionOperation[]): Promise<void>;
27
+ private rollbackOperation;
28
+ private restoreFile;
29
+ cleanup(): Promise<void>;
30
+ }
31
+ export declare class MemorySnapshotStrategy extends SnapshotStrategy {
32
+ private operator;
33
+ private snapshot;
34
+ private vol;
35
+ private fs;
36
+ constructor(operator: InMemoryFileOperator);
37
+ initialize(): Promise<any>;
38
+ saveFile(path: string, fileState: FileState): Promise<void>;
39
+ rollback(operations: TransactionOperation[]): Promise<void>;
40
+ cleanup(): Promise<void>;
41
+ }
42
+ export declare class SandboxSnapshotStrategy extends SnapshotStrategy {
43
+ private operator;
44
+ private fileSnapshots;
45
+ private createdPaths;
46
+ constructor(operator: BaseFileOperator);
47
+ initialize(): Promise<any>;
48
+ saveFile(path: string, fileState: FileState): Promise<void>;
49
+ rollback(operations: TransactionOperation[]): Promise<void>;
50
+ private rollbackOperation;
51
+ private restoreFile;
52
+ cleanup(): Promise<void>;
53
+ }
54
+ //# sourceMappingURL=snapshot-strategies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot-strategies.d.ts","sourceRoot":"","sources":["../../../../src/fs/operator/transaction/snapshot-strategies.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAOlE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AAED,8BAAsB,gBAAgB;IACpC,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IACpE,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,o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