@axiom-lattice/core 2.1.68 → 2.1.70

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 CHANGED
@@ -1559,7 +1559,7 @@ interface SandboxManagerProtocol {
1559
1559
  vmIsolation: SandboxIsolationLevel;
1560
1560
  };
1561
1561
  getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxInstance>;
1562
- createSandbox(name: string): Promise<SandboxInstance>;
1562
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
1563
1563
  getSandbox(name: string): Promise<SandboxInstance>;
1564
1564
  stopSandbox(name: string): Promise<void>;
1565
1565
  deleteSandbox(name: string): Promise<void>;
@@ -3852,7 +3852,7 @@ interface VolumeFsClient {
3852
3852
  }
3853
3853
 
3854
3854
  interface SandboxProvider {
3855
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
3855
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
3856
3856
  getSandbox(name: string): Promise<SandboxInstance>;
3857
3857
  stopSandbox(name: string): Promise<void>;
3858
3858
  deleteSandbox(name: string): Promise<void>;
@@ -3970,7 +3970,7 @@ declare class MicrosandboxRemoteProvider implements SandboxProvider {
3970
3970
  private readonly instances;
3971
3971
  private readonly creating;
3972
3972
  constructor(config: MicrosandboxRemoteProviderConfig);
3973
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
3973
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
3974
3974
  getSandbox(name: string): Promise<SandboxInstance>;
3975
3975
  stopSandbox(name: string): Promise<void>;
3976
3976
  deleteSandbox(name: string): Promise<void>;
@@ -3988,7 +3988,7 @@ declare class RemoteSandboxProvider implements SandboxProvider {
3988
3988
  private client;
3989
3989
  private instances;
3990
3990
  constructor(config: RemoteSandboxProviderConfig);
3991
- createSandbox(name: string): Promise<SandboxInstance>;
3991
+ createSandbox(name: string, _config: RunSandboxConfig): Promise<SandboxInstance>;
3992
3992
  getSandbox(name: string): Promise<SandboxInstance>;
3993
3993
  stopSandbox(name: string): Promise<void>;
3994
3994
  deleteSandbox(name: string): Promise<void>;
@@ -4005,7 +4005,7 @@ declare class E2BProvider implements SandboxProvider {
4005
4005
  private instances;
4006
4006
  private creating;
4007
4007
  constructor(config: E2BProviderConfig);
4008
- createSandbox(name: string): Promise<SandboxInstance>;
4008
+ createSandbox(name: string, _config: RunSandboxConfig): Promise<SandboxInstance>;
4009
4009
  getSandbox(name: string): Promise<SandboxInstance>;
4010
4010
  stopSandbox(name: string): Promise<void>;
4011
4011
  deleteSandbox(name: string): Promise<void>;
@@ -4026,7 +4026,7 @@ declare class DaytonaProvider implements SandboxProvider {
4026
4026
  private creating;
4027
4027
  private volumeId;
4028
4028
  constructor(config: DaytonaProviderConfig);
4029
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
4029
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
4030
4030
  /**
4031
4031
  * Build volume mounts for a sandbox based on RunSandboxConfig.
4032
4032
  * Mounts:
@@ -4186,7 +4186,7 @@ declare class SandboxLatticeManager extends BaseLatticeManager<SandboxProvider>
4186
4186
  getVolumeBackend(config: RunSandboxConfig): Promise<BackendProtocol | null>;
4187
4187
  getVolumeBackendForPath(config: RunSandboxConfig, filePath: string): Promise<BackendProtocol | null>;
4188
4188
  private _resolveVolumeForPath;
4189
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
4189
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
4190
4190
  getSandbox(name: string): Promise<SandboxInstance>;
4191
4191
  stopSandbox(name: string): Promise<void>;
4192
4192
  deleteSandbox(name: string): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -1559,7 +1559,7 @@ interface SandboxManagerProtocol {
1559
1559
  vmIsolation: SandboxIsolationLevel;
1560
1560
  };
1561
1561
  getSandboxFromConfig(config: RunSandboxConfig): Promise<SandboxInstance>;
1562
- createSandbox(name: string): Promise<SandboxInstance>;
1562
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
1563
1563
  getSandbox(name: string): Promise<SandboxInstance>;
1564
1564
  stopSandbox(name: string): Promise<void>;
1565
1565
  deleteSandbox(name: string): Promise<void>;
@@ -3852,7 +3852,7 @@ interface VolumeFsClient {
3852
3852
  }
3853
3853
 
3854
3854
  interface SandboxProvider {
3855
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
3855
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
3856
3856
  getSandbox(name: string): Promise<SandboxInstance>;
3857
3857
  stopSandbox(name: string): Promise<void>;
3858
3858
  deleteSandbox(name: string): Promise<void>;
@@ -3970,7 +3970,7 @@ declare class MicrosandboxRemoteProvider implements SandboxProvider {
3970
3970
  private readonly instances;
3971
3971
  private readonly creating;
3972
3972
  constructor(config: MicrosandboxRemoteProviderConfig);
3973
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
3973
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
3974
3974
  getSandbox(name: string): Promise<SandboxInstance>;
3975
3975
  stopSandbox(name: string): Promise<void>;
3976
3976
  deleteSandbox(name: string): Promise<void>;
@@ -3988,7 +3988,7 @@ declare class RemoteSandboxProvider implements SandboxProvider {
3988
3988
  private client;
3989
3989
  private instances;
3990
3990
  constructor(config: RemoteSandboxProviderConfig);
3991
- createSandbox(name: string): Promise<SandboxInstance>;
3991
+ createSandbox(name: string, _config: RunSandboxConfig): Promise<SandboxInstance>;
3992
3992
  getSandbox(name: string): Promise<SandboxInstance>;
3993
3993
  stopSandbox(name: string): Promise<void>;
3994
3994
  deleteSandbox(name: string): Promise<void>;
@@ -4005,7 +4005,7 @@ declare class E2BProvider implements SandboxProvider {
4005
4005
  private instances;
4006
4006
  private creating;
4007
4007
  constructor(config: E2BProviderConfig);
4008
- createSandbox(name: string): Promise<SandboxInstance>;
4008
+ createSandbox(name: string, _config: RunSandboxConfig): Promise<SandboxInstance>;
4009
4009
  getSandbox(name: string): Promise<SandboxInstance>;
4010
4010
  stopSandbox(name: string): Promise<void>;
4011
4011
  deleteSandbox(name: string): Promise<void>;
@@ -4026,7 +4026,7 @@ declare class DaytonaProvider implements SandboxProvider {
4026
4026
  private creating;
4027
4027
  private volumeId;
4028
4028
  constructor(config: DaytonaProviderConfig);
4029
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
4029
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
4030
4030
  /**
4031
4031
  * Build volume mounts for a sandbox based on RunSandboxConfig.
4032
4032
  * Mounts:
@@ -4186,7 +4186,7 @@ declare class SandboxLatticeManager extends BaseLatticeManager<SandboxProvider>
4186
4186
  getVolumeBackend(config: RunSandboxConfig): Promise<BackendProtocol | null>;
4187
4187
  getVolumeBackendForPath(config: RunSandboxConfig, filePath: string): Promise<BackendProtocol | null>;
4188
4188
  private _resolveVolumeForPath;
4189
- createSandbox(name: string, config?: RunSandboxConfig): Promise<SandboxInstance>;
4189
+ createSandbox(name: string, config: RunSandboxConfig): Promise<SandboxInstance>;
4190
4190
  getSandbox(name: string): Promise<SandboxInstance>;
4191
4191
  stopSandbox(name: string): Promise<void>;
4192
4192
  deleteSandbox(name: string): Promise<void>;
package/dist/index.js CHANGED
@@ -5842,6 +5842,9 @@ var SandboxLatticeManager = class _SandboxLatticeManager extends BaseLatticeMana
5842
5842
  projectId: config.projectId,
5843
5843
  assistant_id: config.assistant_id
5844
5844
  });
5845
+ console.log(
5846
+ `[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}`
5847
+ );
5845
5848
  return this.createSandbox(name, config);
5846
5849
  }
5847
5850
  async getVolumeBackend(config) {
@@ -5952,7 +5955,11 @@ var createShellExecTool = ({
5952
5955
  const runConfig = exe_config?.configurable?.runConfig ?? {};
5953
5956
  const sandboxManager = getSandBoxManager();
5954
5957
  const sandbox = await sandboxManager.getSandboxFromConfig({
5955
- ...runConfig,
5958
+ assistant_id: runConfig.assistant_id || "",
5959
+ thread_id: runConfig.thread_id || "",
5960
+ tenantId: runConfig.tenantId,
5961
+ workspaceId: runConfig.workspaceId,
5962
+ projectId: runConfig.projectId,
5956
5963
  vmIsolation
5957
5964
  });
5958
5965
  const executeResult = await sandbox.shell.execCommand({
@@ -6011,7 +6018,11 @@ registerToolLattice(
6011
6018
  const runConfig = exe_config.configurable?.runConfig || {};
6012
6019
  const sandboxManager = getSandBoxManager();
6013
6020
  const sandbox = await sandboxManager.getSandboxFromConfig({
6014
- ...runConfig,
6021
+ assistant_id: runConfig.assistant_id || "",
6022
+ thread_id: runConfig.thread_id || "",
6023
+ tenantId: runConfig.tenantId,
6024
+ workspaceId: runConfig.workspaceId,
6025
+ projectId: runConfig.projectId,
6015
6026
  vmIsolation: "global"
6016
6027
  });
6017
6028
  let inputPath = input.uri;
@@ -19058,8 +19069,9 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
19058
19069
 
19059
19070
  **Step 2: Topology design.** Design the agent topology and use \`show_widget\` to render an interactive diagram showing the flow: Orchestrator \u2192 Stage 1 \u2192 Stage 2 \u2192 ... \u2192 Output. Each edge should be labeled with its business purpose.
19060
19071
 
19061
- **Step 3: Design each sub-agent** (one at a time). For each:
19072
+ **Step 3: Design each sub-agent** as a **deep_agent** type (one at a time). For each:
19062
19073
  - Responsibility, system prompt, middleware, input/output contract
19074
+ - Deep agents have built-in file capabilities (ls, read, write, edit, glob, grep), so do NOT add filesystem middleware.
19063
19075
  - **Ask for confirmation before moving to the next sub-agent.**
19064
19076
 
19065
19077
  **Step 4: Design the orchestrator.** Responsibility, system prompt, topology edges, sub-agent list.
@@ -19090,7 +19102,7 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
19090
19102
  - Be detailed but concise \u2014 each section should be 1-5 lines
19091
19103
  - Avoid placeholder text like "TODO" or "TBD"
19092
19104
 
19093
- **Example structure:**
19105
+ **Example structure** (\u5B50 Agent \u5747\u4E3A deep_agent \u7C7B\u578B\uFF0C\u65E0\u9700 filesystem \u4E2D\u95F4\u4EF6):
19094
19106
 
19095
19107
  \`\`\`markdown
19096
19108
  ## Overview
@@ -19099,7 +19111,7 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
19099
19111
  ## Steps
19100
19112
  1. **\u6570\u636E\u91C7\u96C6 (data-collector)** \u2014 \u4F7F\u7528 browser \u5DE5\u5177\u722C\u53D6\u6307\u5B9AURL\u7684\u7ADE\u54C1\u4EF7\u683C\u6570\u636E\uFF0C\u8C03\u7528 metrics API \u62C9\u53D6\u5386\u53F2\u4EF7\u683C\u3002\u8F93\u51FA\u539F\u59CB\u4EF7\u683C\u6570\u636E\u96C6 JSON\u3002
19101
19113
  2. **\u6570\u636E\u6E05\u6D17 (data-cleaner)** \u2014 \u4F7F\u7528 code_eval \u6267\u884C Python \u811A\u672C\u6E05\u6D17\u5F02\u5E38\u503C\u548C\u7F3A\u5931\u503C\uFF0C\u7EDF\u4E00\u8D27\u5E01\u5355\u4F4D\u3002\u8F93\u51FA\u6807\u51C6\u5316\u6570\u636E\u96C6\u3002
19102
- 3. **\u62A5\u544A\u751F\u6210 (report-generator)** \u2014 \u4F7F\u7528 filesystem \u8BFB\u53D6\u6A21\u677F\uFF0Ccode_eval \u8BA1\u7B97\u6DA8\u8DCC\u5E45\u548C\u8D8B\u52BF\uFF0C\u751F\u6210 Markdown \u5BF9\u6BD4\u62A5\u544A\u3002\u8F93\u51FA\u62A5\u544A\u6587\u4EF6\u8DEF\u5F84\u3002
19114
+ 3. **\u62A5\u544A\u751F\u6210 (report-generator)** \u2014 \u8BFB\u53D6\u6A21\u677F\u6587\u4EF6\uFF0Ccode_eval \u8BA1\u7B97\u6DA8\u8DCC\u5E45\u548C\u8D8B\u52BF\uFF0C\u751F\u6210 Markdown \u5BF9\u6BD4\u62A5\u544A\u3002\u8F93\u51FA\u62A5\u544A\u6587\u4EF6\u8DEF\u5F84\u3002
19103
19115
  4. **\u901A\u77E5\u63A8\u9001 (notifier)** \u2014 \u8C03\u7528 scheduler \u5B89\u6392\u5B9A\u65F6\u53D1\u9001\uFF0C\u4F7F\u7528 ask_user_to_clarify \u8BF7\u6C42\u53D1\u9001\u786E\u8BA4\u3002\u8F93\u51FA\u53D1\u9001\u7ED3\u679C\u3002
19104
19116
 
19105
19117
  ## Data Flow
@@ -19115,8 +19127,8 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
19115
19127
  | \u5B50Agent | \u5DE5\u5177 |
19116
19128
  |---------|------|
19117
19129
  | data-collector | browser, metrics |
19118
- | data-cleaner | code_eval, filesystem |
19119
- | report-generator | code_eval, filesystem |
19130
+ | data-cleaner | code_eval |
19131
+ | report-generator | code_eval |
19120
19132
  | notifier | scheduler, ask_user_to_clarify |
19121
19133
 
19122
19134
  ## Expected Input
@@ -19140,9 +19152,9 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
19140
19152
  Create sub-agents FIRST, then the orchestrator:
19141
19153
 
19142
19154
  \`\`\`
19143
- 1. create_agent(name: "stage-1", type: "react", ...)
19144
- 2. create_agent(name: "stage-2", type: "react", ...)
19145
- 3. create_agent(name: "stage-3", type: "react", ...)
19155
+ 1. create_agent(name: "stage-1", type: "deep_agent", ...)
19156
+ 2. create_agent(name: "stage-2", type: "deep_agent", ...)
19157
+ 3. create_agent(name: "stage-3", type: "deep_agent", ...)
19146
19158
  4. create_processing_agent(
19147
19159
  name: "orchestrator",
19148
19160
  prompt: "...",
@@ -19179,7 +19191,7 @@ Use this for complex, open-ended tasks where the execution path cannot be fully
19179
19191
  - Work through todos one at a time
19180
19192
  - Refine the list as understanding deepens
19181
19193
  - Self-correct based on intermediate findings
19182
- 2. **Middleware** \u2014 filesystem, code_eval, browser, skill, widget, ask_user_to_clarify as needed
19194
+ 2. **Middleware** \u2014 code_eval, browser, skill, widget, ask_user_to_clarify as needed (deep_agent already has built-in file capabilities, so filesystem middleware is NOT needed)
19183
19195
  3. **Sub-agents** (optional) \u2014 Specialized delegates for specific capabilities
19184
19196
 
19185
19197
  **Step 4: Self-review.** Verify: autonomy, tool coverage, guardrails.
@@ -19247,29 +19259,7 @@ All fields except name, type, and prompt are optional.
19247
19259
 
19248
19260
  ### create_processing_agent (PROCESSING)
19249
19261
 
19250
- Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist.
19251
-
19252
- \`\`\`typescript
19253
- {
19254
- name: string, // Required. Display name for the orchestrator
19255
- description?: string, // Required for good UX. Comprehensive workflow spec in Markdown (Chinese if user speaks Chinese). Must cover: Overview, Steps (with tools per step), Data Flow, Logic & Conditions, Tools Used, Expected Input, Expected Output. This is the single source of truth displayed in the automation view info popover.
19256
- prompt: string, // Required. System prompt \u2014 how to route through the topology
19257
- edges: [{ // Required. At least 1 edge defining the workflow
19258
- from: string, // Orchestrator's ID (use placeholder name; tool auto-replaces)
19259
- to: string, // Sub-agent ID to delegate to
19260
- purpose: string, // Business purpose \u2014 what this step accomplishes
19261
- }],
19262
- tools?: string[], // Optional. Tool keys from list_tools
19263
- subAgents: string[], // Required. IDs of sub-agents in the pipeline
19264
- internalSubAgents?: AgentConfig[], // Optional. Inline sub-agent configs
19265
- middleware?: MiddlewareConfig[], // Optional. Additional middleware (topology is auto-added)
19266
- modelKey?: string, // Optional. Model to use
19267
- }
19268
- \`\`\`
19269
-
19270
- ### create_processing_agent (PROCESSING)
19271
-
19272
- Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist.
19262
+ Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist (created as **deep_agent** type).
19273
19263
 
19274
19264
  \`\`\`typescript
19275
19265
  {
@@ -19281,6 +19271,7 @@ Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents
19281
19271
  to: string, // Sub-agent ID to delegate to
19282
19272
  purpose: string, // Business purpose \u2014 what this step accomplishes
19283
19273
  }],
19274
+ tools?: string[], // Optional. Tool keys from list_tools
19284
19275
  subAgents: string[], // Required. IDs of sub-agents in the pipeline
19285
19276
  internalSubAgents?: AgentConfig[], // Optional. Inline sub-agent configs
19286
19277
  middleware?: MiddlewareConfig[], // Optional. Additional middleware (topology is auto-added)
@@ -19411,13 +19402,13 @@ Provides: \`read_topo_progress\` \u2014 enforces multi-agent workflow topology.
19411
19402
 
19412
19403
  | Agent Role | Recommended Middleware |
19413
19404
  |-----------|----------------------|
19414
- | Code assistant | filesystem, code_eval, widget |
19415
- | Data analyst | filesystem, sql, code_eval, widget |
19416
- | Web researcher | browser, filesystem, widget |
19405
+ | Code assistant | code_eval, widget |
19406
+ | Data analyst | sql, code_eval, widget |
19407
+ | Web researcher | browser, widget |
19417
19408
  | Operations / SRE | metrics, sql, widget |
19418
19409
  | Process orchestrator | skill, date, scheduler, widget |
19419
- | General assistant | filesystem, date, widget |
19420
- | Approval-gated operations | ask_user_to_clarify, filesystem, widget |
19410
+ | General assistant | date, widget |
19411
+ | Approval-gated operations | ask_user_to_clarify, widget |
19421
19412
  | Interactive Q&A | ask_user_to_clarify, date, widget |
19422
19413
 
19423
19414
  ### update_processing_agent
@@ -21117,6 +21108,9 @@ var MicrosandboxServiceClient = class {
21117
21108
  this.apiKey = config.apiKey;
21118
21109
  }
21119
21110
  async ensureSandbox(name, input) {
21111
+ console.log(
21112
+ `[MicrosandboxClient] ensureSandbox name=${name} image=${input.image ?? "not set"} envKeys=${Object.keys(input.env ?? {}).join(",") || "none"}`
21113
+ );
21120
21114
  return this.request(`/api/sandboxes/${encodeURIComponent(name)}`, {
21121
21115
  method: "PUT",
21122
21116
  body: input
@@ -21364,8 +21358,12 @@ var MicrosandboxRemoteProvider = class {
21364
21358
  }
21365
21359
  buildEnsureInput(config) {
21366
21360
  const defaultMicrosandboxRemoteConfig = getDefaultMicrosandboxRemoteConfig();
21361
+ const image = this.config.image ?? defaultMicrosandboxRemoteConfig.image;
21362
+ console.log(
21363
+ `[MicrosandboxRemote] buildEnsureInput image=${image} from=${this.config.image ? "providerConfig" : "defaultConfig"}`
21364
+ );
21367
21365
  return {
21368
- image: this.config.image ?? defaultMicrosandboxRemoteConfig.image,
21366
+ image,
21369
21367
  cpus: this.config.cpus ?? defaultMicrosandboxRemoteConfig.cpus,
21370
21368
  memoryMib: this.config.memoryMib ?? defaultMicrosandboxRemoteConfig.memoryMib,
21371
21369
  env: {
@@ -21530,7 +21528,7 @@ var RemoteSandboxProvider = class {
21530
21528
  environment: ""
21531
21529
  });
21532
21530
  }
21533
- async createSandbox(name) {
21531
+ async createSandbox(name, _config) {
21534
21532
  const existing = this.instances.get(name);
21535
21533
  if (existing) {
21536
21534
  return existing;
@@ -21667,7 +21665,7 @@ var E2BProvider = class {
21667
21665
  this.instances = /* @__PURE__ */ new Map();
21668
21666
  this.creating = /* @__PURE__ */ new Map();
21669
21667
  }
21670
- async createSandbox(name) {
21668
+ async createSandbox(name, _config) {
21671
21669
  const existing = this.instances.get(name);
21672
21670
  if (existing) {
21673
21671
  const running = await existing.getStatus();