@axiom-lattice/core 2.1.54 → 2.1.55
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +34 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3472,10 +3472,10 @@ var SandboxLatticeManager = class _SandboxLatticeManager extends BaseLatticeMana
|
|
|
3472
3472
|
}
|
|
3473
3473
|
_resolveVolumeForPath(config, tenantId, filePath) {
|
|
3474
3474
|
const normalized = normalizeExternalSandboxPath(filePath);
|
|
3475
|
-
if (normalized === "/.
|
|
3475
|
+
if (normalized === "/root/.agents" || normalized.startsWith("/root/.agents/")) {
|
|
3476
3476
|
return {
|
|
3477
3477
|
volumeName: buildNamedVolumeName("s", "skills", tenantId),
|
|
3478
|
-
pathPrefix: "/.
|
|
3478
|
+
pathPrefix: "/root/.agents"
|
|
3479
3479
|
};
|
|
3480
3480
|
}
|
|
3481
3481
|
if (normalized === "/agent" || normalized.startsWith("/agent/")) {
|
|
@@ -4878,13 +4878,13 @@ var createLoadSkillContentTool = () => {
|
|
|
4878
4878
|
async (input, _exe_config) => {
|
|
4879
4879
|
try {
|
|
4880
4880
|
const sandbox = await getSandboxFromExeConfig(_exe_config);
|
|
4881
|
-
const filePath =
|
|
4881
|
+
const filePath = `/root/.agents/skills/${input.skill_name}/SKILL.md`;
|
|
4882
4882
|
let content;
|
|
4883
4883
|
try {
|
|
4884
4884
|
const result2 = await sandbox.file.readFile(filePath);
|
|
4885
4885
|
content = result2.content;
|
|
4886
4886
|
} catch {
|
|
4887
|
-
const listResult = await sandbox.file.listPath("/.
|
|
4887
|
+
const listResult = await sandbox.file.listPath("/root/.agents/skills", { recursive: false });
|
|
4888
4888
|
const available = listResult.files.filter((f) => f.is_dir).map((f) => f.path.split("/").pop()).filter(Boolean).join(", ");
|
|
4889
4889
|
return `Skill "${input.skill_name}" not found. Available skills: ${available}`;
|
|
4890
4890
|
}
|
|
@@ -4892,7 +4892,7 @@ var createLoadSkillContentTool = () => {
|
|
|
4892
4892
|
let result = buildSkillFile(meta, body);
|
|
4893
4893
|
try {
|
|
4894
4894
|
const resourcesResult = await sandbox.file.listPath(
|
|
4895
|
-
|
|
4895
|
+
`/root/.agents/skills/${input.skill_name}/resources`,
|
|
4896
4896
|
{ recursive: false }
|
|
4897
4897
|
);
|
|
4898
4898
|
const resources = resourcesResult.files.map((f) => f.path.split("/").pop()).filter(Boolean);
|
|
@@ -4945,14 +4945,14 @@ function createSkillMiddleware(params = {}) {
|
|
|
4945
4945
|
projectId: runConfig.projectId,
|
|
4946
4946
|
vmIsolation: "project"
|
|
4947
4947
|
});
|
|
4948
|
-
const result = await sandbox.file.listPath("/.
|
|
4948
|
+
const result = await sandbox.file.listPath("/root/.agents/skills", { recursive: false });
|
|
4949
4949
|
const allSkills = [];
|
|
4950
4950
|
for (const entry of result.files) {
|
|
4951
4951
|
if (!entry.is_dir) continue;
|
|
4952
4952
|
const skillName = entry.path.split("/").pop();
|
|
4953
4953
|
if (!skillName) continue;
|
|
4954
4954
|
try {
|
|
4955
|
-
const fileResult = await sandbox.file.readFile(
|
|
4955
|
+
const fileResult = await sandbox.file.readFile(`/root/.agents/skills/${skillName}/SKILL.md`);
|
|
4956
4956
|
const { meta } = parseSkillFrontmatter(fileResult.content);
|
|
4957
4957
|
allSkills.push({
|
|
4958
4958
|
id: skillName,
|
|
@@ -5488,7 +5488,7 @@ Path conventions:
|
|
|
5488
5488
|
- All paths are absolute starting with /. Key directories:
|
|
5489
5489
|
- /agent/ \u2014 Your private agent directory (identity, memory, preferences). Isolated per agent.
|
|
5490
5490
|
- /project/ \u2014 Project workspace. Shared across all agents in the same project. Persisted across sessions.
|
|
5491
|
-
- /.
|
|
5491
|
+
- /root/.agents/skills/ \u2014 Skill definitions. Read-only for most operations.
|
|
5492
5492
|
|
|
5493
5493
|
- ls: list files in a directory
|
|
5494
5494
|
- read_file: read a file from the filesystem
|
|
@@ -16504,7 +16504,7 @@ var SandboxSkillStore = class {
|
|
|
16504
16504
|
if (name.includes("..") || name.includes("/") || name.includes("\\")) {
|
|
16505
16505
|
throw new Error(`Invalid skill name: ${name} (contains invalid characters)`);
|
|
16506
16506
|
}
|
|
16507
|
-
return
|
|
16507
|
+
return `/root/.agents/skills/${name}`;
|
|
16508
16508
|
}
|
|
16509
16509
|
/**
|
|
16510
16510
|
* Get skill file path in sandbox (absolute path with ~/ prefix)
|
|
@@ -16571,14 +16571,14 @@ ${body}` : `${frontmatter}
|
|
|
16571
16571
|
async getAllSkills(tenantId, context) {
|
|
16572
16572
|
try {
|
|
16573
16573
|
const sandbox = await this.getSandbox(tenantId, context);
|
|
16574
|
-
const skillsDir = "/.
|
|
16574
|
+
const skillsDir = "/root/.agents/skills";
|
|
16575
16575
|
try {
|
|
16576
16576
|
await sandbox.file.listPath(skillsDir, { recursive: false });
|
|
16577
16577
|
} catch (listError) {
|
|
16578
16578
|
console.log(`[SandboxSkillStore] Skills directory not found, creating: ${skillsDir}`);
|
|
16579
16579
|
try {
|
|
16580
16580
|
await sandbox.shell.execCommand({
|
|
16581
|
-
command: `mkdir -p /.
|
|
16581
|
+
command: `mkdir -p /root/.agents/skills`
|
|
16582
16582
|
});
|
|
16583
16583
|
} catch (mkdirError) {
|
|
16584
16584
|
console.error(`[SandboxSkillStore] Failed to create skills directory: ${mkdirError.message}`);
|
|
@@ -18374,11 +18374,15 @@ var MicrosandboxProvider = class {
|
|
|
18374
18374
|
async stopSandbox(name) {
|
|
18375
18375
|
const instance = this.instances.get(name);
|
|
18376
18376
|
if (instance) {
|
|
18377
|
-
|
|
18377
|
+
try {
|
|
18378
|
+
await instance.stop();
|
|
18379
|
+
} catch {
|
|
18380
|
+
}
|
|
18378
18381
|
}
|
|
18379
18382
|
}
|
|
18380
18383
|
async deleteSandbox(name) {
|
|
18381
18384
|
const instance = this.instances.get(name);
|
|
18385
|
+
this.instances.delete(name);
|
|
18382
18386
|
if (instance) {
|
|
18383
18387
|
try {
|
|
18384
18388
|
await instance.kill();
|
|
@@ -18387,7 +18391,6 @@ var MicrosandboxProvider = class {
|
|
|
18387
18391
|
}
|
|
18388
18392
|
}
|
|
18389
18393
|
await Sandbox.remove(name);
|
|
18390
|
-
this.instances.delete(name);
|
|
18391
18394
|
}
|
|
18392
18395
|
async listSandboxes() {
|
|
18393
18396
|
return Array.from(this.instances.values());
|
|
@@ -18735,12 +18738,15 @@ var MicrosandboxRemoteProvider = class {
|
|
|
18735
18738
|
return instance;
|
|
18736
18739
|
}
|
|
18737
18740
|
async stopSandbox(name) {
|
|
18738
|
-
|
|
18741
|
+
try {
|
|
18742
|
+
await this.client.stopSandbox(name);
|
|
18743
|
+
} catch {
|
|
18744
|
+
}
|
|
18739
18745
|
this.instances.delete(name);
|
|
18740
18746
|
}
|
|
18741
18747
|
async deleteSandbox(name) {
|
|
18742
|
-
await this.client.deleteSandbox(name);
|
|
18743
18748
|
this.instances.delete(name);
|
|
18749
|
+
await this.client.deleteSandbox(name);
|
|
18744
18750
|
}
|
|
18745
18751
|
createVolumeFsClient(volumeName) {
|
|
18746
18752
|
return {
|
|
@@ -18770,7 +18776,7 @@ var MicrosandboxRemoteProvider = class {
|
|
|
18770
18776
|
buildDefaultVolumes(config) {
|
|
18771
18777
|
const tenantId = config?.tenantId ?? "default";
|
|
18772
18778
|
const volumes = {
|
|
18773
|
-
"/.
|
|
18779
|
+
"/root/.agents": {
|
|
18774
18780
|
type: "named",
|
|
18775
18781
|
name: buildNamedVolumeName("s", "skills", tenantId)
|
|
18776
18782
|
}
|
|
@@ -19099,15 +19105,18 @@ var E2BProvider = class {
|
|
|
19099
19105
|
async stopSandbox(name) {
|
|
19100
19106
|
const instance = this.instances.get(name);
|
|
19101
19107
|
if (instance) {
|
|
19102
|
-
|
|
19108
|
+
try {
|
|
19109
|
+
await instance.stop();
|
|
19110
|
+
} catch {
|
|
19111
|
+
}
|
|
19103
19112
|
}
|
|
19104
19113
|
}
|
|
19105
19114
|
async deleteSandbox(name) {
|
|
19106
19115
|
const instance = this.instances.get(name);
|
|
19116
|
+
this.instances.delete(name);
|
|
19107
19117
|
if (instance) {
|
|
19108
19118
|
await instance.kill();
|
|
19109
19119
|
}
|
|
19110
|
-
this.instances.delete(name);
|
|
19111
19120
|
}
|
|
19112
19121
|
async listSandboxes() {
|
|
19113
19122
|
return Array.from(this.instances.values());
|
|
@@ -19320,7 +19329,7 @@ var DaytonaProvider = class {
|
|
|
19320
19329
|
/**
|
|
19321
19330
|
* Build volume mounts for a sandbox based on RunSandboxConfig.
|
|
19322
19331
|
* Mounts:
|
|
19323
|
-
* /.
|
|
19332
|
+
* /root/.agents → tenants/{tenantId}/skills
|
|
19324
19333
|
* /agent → tenants/{tenantId}/agents/{assistantId}
|
|
19325
19334
|
* /project → tenants/{tenantId}/projects/{projectId}
|
|
19326
19335
|
*/
|
|
@@ -19336,7 +19345,7 @@ var DaytonaProvider = class {
|
|
|
19336
19345
|
const mounts = [];
|
|
19337
19346
|
mounts.push({
|
|
19338
19347
|
volumeId: volume.id,
|
|
19339
|
-
mountPath: "/.
|
|
19348
|
+
mountPath: "/root/.agents",
|
|
19340
19349
|
subpath: `tenants/${tenantId}/skills`
|
|
19341
19350
|
});
|
|
19342
19351
|
if (config.assistant_id) {
|
|
@@ -19398,18 +19407,21 @@ var DaytonaProvider = class {
|
|
|
19398
19407
|
async stopSandbox(name) {
|
|
19399
19408
|
const instance = this.instances.get(name);
|
|
19400
19409
|
if (instance) {
|
|
19401
|
-
|
|
19410
|
+
try {
|
|
19411
|
+
await instance.stop();
|
|
19412
|
+
} catch {
|
|
19413
|
+
}
|
|
19402
19414
|
}
|
|
19403
19415
|
}
|
|
19404
19416
|
async deleteSandbox(name) {
|
|
19405
19417
|
const instance = this.instances.get(name);
|
|
19418
|
+
this.instances.delete(name);
|
|
19406
19419
|
if (instance) {
|
|
19407
19420
|
try {
|
|
19408
19421
|
await instance.kill();
|
|
19409
19422
|
} catch {
|
|
19410
19423
|
}
|
|
19411
19424
|
}
|
|
19412
|
-
this.instances.delete(name);
|
|
19413
19425
|
}
|
|
19414
19426
|
async listSandboxes() {
|
|
19415
19427
|
return Array.from(this.instances.values());
|