@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.mjs
CHANGED
|
@@ -18222,9 +18222,7 @@ ${body}` : `${frontmatter}
|
|
|
18222
18222
|
} catch (listError) {
|
|
18223
18223
|
console.log(`[SandboxSkillStore] Skills directory not found, creating: ${skillsDir}`);
|
|
18224
18224
|
try {
|
|
18225
|
-
await sandbox.
|
|
18226
|
-
command: `mkdir -p /root/.agents/skills`
|
|
18227
|
-
});
|
|
18225
|
+
await sandbox.file.createDirectory(skillsDir);
|
|
18228
18226
|
} catch (mkdirError) {
|
|
18229
18227
|
console.error(`[SandboxSkillStore] Failed to create skills directory: ${mkdirError.message}`);
|
|
18230
18228
|
return [];
|
|
@@ -18365,12 +18363,7 @@ ${body}` : `${frontmatter}
|
|
|
18365
18363
|
try {
|
|
18366
18364
|
const sandbox = await this.getSandbox(tenantId, context);
|
|
18367
18365
|
const dirPath = this.getSkillDirectoryPath(tenantId, id);
|
|
18368
|
-
|
|
18369
|
-
command: `rm -rf ${dirPath}`
|
|
18370
|
-
});
|
|
18371
|
-
if (deleteResult.exit_code !== 0) {
|
|
18372
|
-
return false;
|
|
18373
|
-
}
|
|
18366
|
+
await sandbox.file.deletePath(dirPath);
|
|
18374
18367
|
return true;
|
|
18375
18368
|
} catch (error) {
|
|
18376
18369
|
console.error(`Error deleting skill ${id}:`, error);
|
|
@@ -21183,6 +21176,20 @@ var MicrosandboxRemoteInstance = class {
|
|
|
21183
21176
|
return Buffer.from(result.contentBase64, "base64");
|
|
21184
21177
|
}
|
|
21185
21178
|
return Buffer.from(result.content ?? "");
|
|
21179
|
+
},
|
|
21180
|
+
deletePath: async (path3) => {
|
|
21181
|
+
const resolved = normalizeExternalSandboxPath(path3);
|
|
21182
|
+
await this.client.execCommand({
|
|
21183
|
+
sandboxName: this.name,
|
|
21184
|
+
command: `rm -rf "${resolved}"`
|
|
21185
|
+
});
|
|
21186
|
+
},
|
|
21187
|
+
createDirectory: async (path3) => {
|
|
21188
|
+
const resolved = normalizeExternalSandboxPath(path3);
|
|
21189
|
+
await this.client.execCommand({
|
|
21190
|
+
sandboxName: this.name,
|
|
21191
|
+
command: `mkdir -p "${resolved}"`
|
|
21192
|
+
});
|
|
21186
21193
|
}
|
|
21187
21194
|
};
|
|
21188
21195
|
this.shell = {
|
|
@@ -21634,6 +21641,24 @@ var RemoteSandboxInstance = class {
|
|
|
21634
21641
|
}
|
|
21635
21642
|
const buffer2 = await result.body.arrayBuffer();
|
|
21636
21643
|
return Buffer.from(buffer2);
|
|
21644
|
+
},
|
|
21645
|
+
deletePath: async (path3) => {
|
|
21646
|
+
const resolved = this.resolvePath(path3);
|
|
21647
|
+
const result = await this.client.shell.execCommand({
|
|
21648
|
+
command: `rm -rf "${resolved}"`
|
|
21649
|
+
});
|
|
21650
|
+
if (!result.ok) {
|
|
21651
|
+
throw new Error(`deletePath failed: ${extractFetcherError(result.error)}`);
|
|
21652
|
+
}
|
|
21653
|
+
},
|
|
21654
|
+
createDirectory: async (path3) => {
|
|
21655
|
+
const resolved = this.resolvePath(path3);
|
|
21656
|
+
const result = await this.client.shell.execCommand({
|
|
21657
|
+
command: `mkdir -p "${resolved}"`
|
|
21658
|
+
});
|
|
21659
|
+
if (!result.ok) {
|
|
21660
|
+
throw new Error(`createDirectory failed: ${extractFetcherError(result.error)}`);
|
|
21661
|
+
}
|
|
21637
21662
|
}
|
|
21638
21663
|
};
|
|
21639
21664
|
this.shell = {
|
|
@@ -21897,6 +21922,12 @@ var E2BInstance = class {
|
|
|
21897
21922
|
downloadFile: async (params) => {
|
|
21898
21923
|
const data = await this.native.files.read(params.file, { format: "bytes" });
|
|
21899
21924
|
return Buffer.isBuffer(data) ? data : Buffer.from(data);
|
|
21925
|
+
},
|
|
21926
|
+
deletePath: async (path3) => {
|
|
21927
|
+
await this.native.commands.run(`rm -rf "${path3}"`);
|
|
21928
|
+
},
|
|
21929
|
+
createDirectory: async (path3) => {
|
|
21930
|
+
await this.native.commands.run(`mkdir -p "${path3}"`);
|
|
21900
21931
|
}
|
|
21901
21932
|
};
|
|
21902
21933
|
this.shell = {
|
|
@@ -22063,6 +22094,12 @@ var DaytonaInstance = class {
|
|
|
22063
22094
|
downloadFile: async (params) => {
|
|
22064
22095
|
const buffer2 = await this.native.fs.downloadFile(toRelativePath(params.file));
|
|
22065
22096
|
return Buffer.isBuffer(buffer2) ? buffer2 : Buffer.from(buffer2);
|
|
22097
|
+
},
|
|
22098
|
+
deletePath: async (path3) => {
|
|
22099
|
+
await this.native.process.executeCommand(`rm -rf "${toRelativePath(path3)}"`, void 0, void 0);
|
|
22100
|
+
},
|
|
22101
|
+
createDirectory: async (path3) => {
|
|
22102
|
+
await this.native.process.executeCommand(`mkdir -p "${toRelativePath(path3)}"`, void 0, void 0);
|
|
22066
22103
|
}
|
|
22067
22104
|
};
|
|
22068
22105
|
this.shell = {
|