@axiom-lattice/core 2.1.67 → 2.1.69
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 +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2393,6 +2393,10 @@ var InMemoryWorkflowTrackingStore = class {
|
|
|
2393
2393
|
this.runs.set(runId, updated);
|
|
2394
2394
|
return updated;
|
|
2395
2395
|
}
|
|
2396
|
+
async deleteWorkflowRun(runId) {
|
|
2397
|
+
this.runs.delete(runId);
|
|
2398
|
+
this.steps.delete(runId);
|
|
2399
|
+
}
|
|
2396
2400
|
async getWorkflowRunsByThreadId(tenantId, threadId) {
|
|
2397
2401
|
const results = [];
|
|
2398
2402
|
for (const run of this.runs.values()) {
|
|
@@ -5613,6 +5617,9 @@ var SandboxLatticeManager = class _SandboxLatticeManager extends BaseLatticeMana
|
|
|
5613
5617
|
projectId: config.projectId,
|
|
5614
5618
|
assistant_id: config.assistant_id
|
|
5615
5619
|
});
|
|
5620
|
+
console.log(
|
|
5621
|
+
`[SandboxLattice] getSandboxFromConfig name=${name} isolation=${policy.vmIsolation} tenantId=${config.tenantId} workspaceId=${config.workspaceId} projectId=${config.projectId} assistant_id=${config.assistant_id} thread_id=${config.thread_id}`
|
|
5622
|
+
);
|
|
5616
5623
|
return this.createSandbox(name, config);
|
|
5617
5624
|
}
|
|
5618
5625
|
async getVolumeBackend(config) {
|
|
@@ -5723,7 +5730,11 @@ var createShellExecTool = ({
|
|
|
5723
5730
|
const runConfig = exe_config?.configurable?.runConfig ?? {};
|
|
5724
5731
|
const sandboxManager = getSandBoxManager();
|
|
5725
5732
|
const sandbox = await sandboxManager.getSandboxFromConfig({
|
|
5726
|
-
|
|
5733
|
+
assistant_id: runConfig.assistant_id || "",
|
|
5734
|
+
thread_id: runConfig.thread_id || "",
|
|
5735
|
+
tenantId: runConfig.tenantId,
|
|
5736
|
+
workspaceId: runConfig.workspaceId,
|
|
5737
|
+
projectId: runConfig.projectId,
|
|
5727
5738
|
vmIsolation
|
|
5728
5739
|
});
|
|
5729
5740
|
const executeResult = await sandbox.shell.execCommand({
|
|
@@ -5782,7 +5793,11 @@ registerToolLattice(
|
|
|
5782
5793
|
const runConfig = exe_config.configurable?.runConfig || {};
|
|
5783
5794
|
const sandboxManager = getSandBoxManager();
|
|
5784
5795
|
const sandbox = await sandboxManager.getSandboxFromConfig({
|
|
5785
|
-
|
|
5796
|
+
assistant_id: runConfig.assistant_id || "",
|
|
5797
|
+
thread_id: runConfig.thread_id || "",
|
|
5798
|
+
tenantId: runConfig.tenantId,
|
|
5799
|
+
workspaceId: runConfig.workspaceId,
|
|
5800
|
+
projectId: runConfig.projectId,
|
|
5786
5801
|
vmIsolation: "global"
|
|
5787
5802
|
});
|
|
5788
5803
|
let inputPath = input.uri;
|
|
@@ -17239,6 +17254,9 @@ function createTopologyMiddleware(options) {
|
|
|
17239
17254
|
stepIdMap: z54.record(z54.string()).default({})
|
|
17240
17255
|
}),
|
|
17241
17256
|
beforeAgent: async (state, runtime) => {
|
|
17257
|
+
if (state.runId) {
|
|
17258
|
+
return {};
|
|
17259
|
+
}
|
|
17242
17260
|
const runConfig = runtime.context?.runConfig ?? {};
|
|
17243
17261
|
const startingNode = edges[0]?.from ?? runConfig.assistant_id ?? "";
|
|
17244
17262
|
let runId = "";
|
|
@@ -20938,6 +20956,9 @@ var MicrosandboxServiceClient = class {
|
|
|
20938
20956
|
this.apiKey = config.apiKey;
|
|
20939
20957
|
}
|
|
20940
20958
|
async ensureSandbox(name, input) {
|
|
20959
|
+
console.log(
|
|
20960
|
+
`[MicrosandboxClient] ensureSandbox name=${name} image=${input.image ?? "not set"} envKeys=${Object.keys(input.env ?? {}).join(",") || "none"}`
|
|
20961
|
+
);
|
|
20941
20962
|
return this.request(`/api/sandboxes/${encodeURIComponent(name)}`, {
|
|
20942
20963
|
method: "PUT",
|
|
20943
20964
|
body: input
|
|
@@ -21185,8 +21206,12 @@ var MicrosandboxRemoteProvider = class {
|
|
|
21185
21206
|
}
|
|
21186
21207
|
buildEnsureInput(config) {
|
|
21187
21208
|
const defaultMicrosandboxRemoteConfig = getDefaultMicrosandboxRemoteConfig();
|
|
21209
|
+
const image = this.config.image ?? defaultMicrosandboxRemoteConfig.image;
|
|
21210
|
+
console.log(
|
|
21211
|
+
`[MicrosandboxRemote] buildEnsureInput image=${image} from=${this.config.image ? "providerConfig" : "defaultConfig"}`
|
|
21212
|
+
);
|
|
21188
21213
|
return {
|
|
21189
|
-
image
|
|
21214
|
+
image,
|
|
21190
21215
|
cpus: this.config.cpus ?? defaultMicrosandboxRemoteConfig.cpus,
|
|
21191
21216
|
memoryMib: this.config.memoryMib ?? defaultMicrosandboxRemoteConfig.memoryMib,
|
|
21192
21217
|
env: {
|
|
@@ -21351,7 +21376,7 @@ var RemoteSandboxProvider = class {
|
|
|
21351
21376
|
environment: ""
|
|
21352
21377
|
});
|
|
21353
21378
|
}
|
|
21354
|
-
async createSandbox(name) {
|
|
21379
|
+
async createSandbox(name, _config) {
|
|
21355
21380
|
const existing = this.instances.get(name);
|
|
21356
21381
|
if (existing) {
|
|
21357
21382
|
return existing;
|
|
@@ -21488,7 +21513,7 @@ var E2BProvider = class {
|
|
|
21488
21513
|
this.instances = /* @__PURE__ */ new Map();
|
|
21489
21514
|
this.creating = /* @__PURE__ */ new Map();
|
|
21490
21515
|
}
|
|
21491
|
-
async createSandbox(name) {
|
|
21516
|
+
async createSandbox(name, _config) {
|
|
21492
21517
|
const existing = this.instances.get(name);
|
|
21493
21518
|
if (existing) {
|
|
21494
21519
|
const running = await existing.getStatus();
|