@axiom-lattice/core 2.1.74 → 2.1.75
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.
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +46 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1528,6 +1528,8 @@ interface SandboxFileService {
|
|
|
1528
1528
|
downloadFile(params: {
|
|
1529
1529
|
file: string;
|
|
1530
1530
|
}): Promise<Buffer>;
|
|
1531
|
+
deletePath(path: string): Promise<void>;
|
|
1532
|
+
createDirectory(path: string): Promise<void>;
|
|
1531
1533
|
}
|
|
1532
1534
|
interface SandboxShellService {
|
|
1533
1535
|
execCommand(params: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1528,6 +1528,8 @@ interface SandboxFileService {
|
|
|
1528
1528
|
downloadFile(params: {
|
|
1529
1529
|
file: string;
|
|
1530
1530
|
}): Promise<Buffer>;
|
|
1531
|
+
deletePath(path: string): Promise<void>;
|
|
1532
|
+
createDirectory(path: string): Promise<void>;
|
|
1531
1533
|
}
|
|
1532
1534
|
interface SandboxShellService {
|
|
1533
1535
|
execCommand(params: {
|
package/dist/index.js
CHANGED
|
@@ -18398,9 +18398,7 @@ ${body}` : `${frontmatter}
|
|
|
18398
18398
|
} catch (listError) {
|
|
18399
18399
|
console.log(`[SandboxSkillStore] Skills directory not found, creating: ${skillsDir}`);
|
|
18400
18400
|
try {
|
|
18401
|
-
await sandbox.
|
|
18402
|
-
command: `mkdir -p /root/.agents/skills`
|
|
18403
|
-
});
|
|
18401
|
+
await sandbox.file.createDirectory(skillsDir);
|
|
18404
18402
|
} catch (mkdirError) {
|
|
18405
18403
|
console.error(`[SandboxSkillStore] Failed to create skills directory: ${mkdirError.message}`);
|
|
18406
18404
|
return [];
|
|
@@ -18541,12 +18539,7 @@ ${body}` : `${frontmatter}
|
|
|
18541
18539
|
try {
|
|
18542
18540
|
const sandbox = await this.getSandbox(tenantId, context);
|
|
18543
18541
|
const dirPath = this.getSkillDirectoryPath(tenantId, id);
|
|
18544
|
-
|
|
18545
|
-
command: `rm -rf ${dirPath}`
|
|
18546
|
-
});
|
|
18547
|
-
if (deleteResult.exit_code !== 0) {
|
|
18548
|
-
return false;
|
|
18549
|
-
}
|
|
18542
|
+
await sandbox.file.deletePath(dirPath);
|
|
18550
18543
|
return true;
|
|
18551
18544
|
} catch (error) {
|
|
18552
18545
|
console.error(`Error deleting skill ${id}:`, error);
|
|
@@ -21357,6 +21350,20 @@ var MicrosandboxRemoteInstance = class {
|
|
|
21357
21350
|
return Buffer.from(result.contentBase64, "base64");
|
|
21358
21351
|
}
|
|
21359
21352
|
return Buffer.from(result.content ?? "");
|
|
21353
|
+
},
|
|
21354
|
+
deletePath: async (path3) => {
|
|
21355
|
+
const resolved = normalizeExternalSandboxPath(path3);
|
|
21356
|
+
await this.client.execCommand({
|
|
21357
|
+
sandboxName: this.name,
|
|
21358
|
+
command: `rm -rf "${resolved}"`
|
|
21359
|
+
});
|
|
21360
|
+
},
|
|
21361
|
+
createDirectory: async (path3) => {
|
|
21362
|
+
const resolved = normalizeExternalSandboxPath(path3);
|
|
21363
|
+
await this.client.execCommand({
|
|
21364
|
+
sandboxName: this.name,
|
|
21365
|
+
command: `mkdir -p "${resolved}"`
|
|
21366
|
+
});
|
|
21360
21367
|
}
|
|
21361
21368
|
};
|
|
21362
21369
|
this.shell = {
|
|
@@ -21808,6 +21815,24 @@ var RemoteSandboxInstance = class {
|
|
|
21808
21815
|
}
|
|
21809
21816
|
const buffer2 = await result.body.arrayBuffer();
|
|
21810
21817
|
return Buffer.from(buffer2);
|
|
21818
|
+
},
|
|
21819
|
+
deletePath: async (path3) => {
|
|
21820
|
+
const resolved = this.resolvePath(path3);
|
|
21821
|
+
const result = await this.client.shell.execCommand({
|
|
21822
|
+
command: `rm -rf "${resolved}"`
|
|
21823
|
+
});
|
|
21824
|
+
if (!result.ok) {
|
|
21825
|
+
throw new Error(`deletePath failed: ${extractFetcherError(result.error)}`);
|
|
21826
|
+
}
|
|
21827
|
+
},
|
|
21828
|
+
createDirectory: async (path3) => {
|
|
21829
|
+
const resolved = this.resolvePath(path3);
|
|
21830
|
+
const result = await this.client.shell.execCommand({
|
|
21831
|
+
command: `mkdir -p "${resolved}"`
|
|
21832
|
+
});
|
|
21833
|
+
if (!result.ok) {
|
|
21834
|
+
throw new Error(`createDirectory failed: ${extractFetcherError(result.error)}`);
|
|
21835
|
+
}
|
|
21811
21836
|
}
|
|
21812
21837
|
};
|
|
21813
21838
|
this.shell = {
|
|
@@ -22071,6 +22096,12 @@ var E2BInstance = class {
|
|
|
22071
22096
|
downloadFile: async (params) => {
|
|
22072
22097
|
const data = await this.native.files.read(params.file, { format: "bytes" });
|
|
22073
22098
|
return Buffer.isBuffer(data) ? data : Buffer.from(data);
|
|
22099
|
+
},
|
|
22100
|
+
deletePath: async (path3) => {
|
|
22101
|
+
await this.native.commands.run(`rm -rf "${path3}"`);
|
|
22102
|
+
},
|
|
22103
|
+
createDirectory: async (path3) => {
|
|
22104
|
+
await this.native.commands.run(`mkdir -p "${path3}"`);
|
|
22074
22105
|
}
|
|
22075
22106
|
};
|
|
22076
22107
|
this.shell = {
|
|
@@ -22237,6 +22268,12 @@ var DaytonaInstance = class {
|
|
|
22237
22268
|
downloadFile: async (params) => {
|
|
22238
22269
|
const buffer2 = await this.native.fs.downloadFile(toRelativePath(params.file));
|
|
22239
22270
|
return Buffer.isBuffer(buffer2) ? buffer2 : Buffer.from(buffer2);
|
|
22271
|
+
},
|
|
22272
|
+
deletePath: async (path3) => {
|
|
22273
|
+
await this.native.process.executeCommand(`rm -rf "${toRelativePath(path3)}"`, void 0, void 0);
|
|
22274
|
+
},
|
|
22275
|
+
createDirectory: async (path3) => {
|
|
22276
|
+
await this.native.process.executeCommand(`mkdir -p "${toRelativePath(path3)}"`, void 0, void 0);
|
|
22240
22277
|
}
|
|
22241
22278
|
};
|
|
22242
22279
|
this.shell = {
|