@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.mjs CHANGED
@@ -5617,6 +5617,9 @@ var SandboxLatticeManager = class _SandboxLatticeManager extends BaseLatticeMana
5617
5617
  projectId: config.projectId,
5618
5618
  assistant_id: config.assistant_id
5619
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
+ );
5620
5623
  return this.createSandbox(name, config);
5621
5624
  }
5622
5625
  async getVolumeBackend(config) {
@@ -5727,7 +5730,11 @@ var createShellExecTool = ({
5727
5730
  const runConfig = exe_config?.configurable?.runConfig ?? {};
5728
5731
  const sandboxManager = getSandBoxManager();
5729
5732
  const sandbox = await sandboxManager.getSandboxFromConfig({
5730
- ...runConfig,
5733
+ assistant_id: runConfig.assistant_id || "",
5734
+ thread_id: runConfig.thread_id || "",
5735
+ tenantId: runConfig.tenantId,
5736
+ workspaceId: runConfig.workspaceId,
5737
+ projectId: runConfig.projectId,
5731
5738
  vmIsolation
5732
5739
  });
5733
5740
  const executeResult = await sandbox.shell.execCommand({
@@ -5786,7 +5793,11 @@ registerToolLattice(
5786
5793
  const runConfig = exe_config.configurable?.runConfig || {};
5787
5794
  const sandboxManager = getSandBoxManager();
5788
5795
  const sandbox = await sandboxManager.getSandboxFromConfig({
5789
- ...runConfig,
5796
+ assistant_id: runConfig.assistant_id || "",
5797
+ thread_id: runConfig.thread_id || "",
5798
+ tenantId: runConfig.tenantId,
5799
+ workspaceId: runConfig.workspaceId,
5800
+ projectId: runConfig.projectId,
5790
5801
  vmIsolation: "global"
5791
5802
  });
5792
5803
  let inputPath = input.uri;
@@ -18884,8 +18895,9 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
18884
18895
 
18885
18896
  **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.
18886
18897
 
18887
- **Step 3: Design each sub-agent** (one at a time). For each:
18898
+ **Step 3: Design each sub-agent** as a **deep_agent** type (one at a time). For each:
18888
18899
  - Responsibility, system prompt, middleware, input/output contract
18900
+ - Deep agents have built-in file capabilities (ls, read, write, edit, glob, grep), so do NOT add filesystem middleware.
18889
18901
  - **Ask for confirmation before moving to the next sub-agent.**
18890
18902
 
18891
18903
  **Step 4: Design the orchestrator.** Responsibility, system prompt, topology edges, sub-agent list.
@@ -18916,7 +18928,7 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
18916
18928
  - Be detailed but concise \u2014 each section should be 1-5 lines
18917
18929
  - Avoid placeholder text like "TODO" or "TBD"
18918
18930
 
18919
- **Example structure:**
18931
+ **Example structure** (\u5B50 Agent \u5747\u4E3A deep_agent \u7C7B\u578B\uFF0C\u65E0\u9700 filesystem \u4E2D\u95F4\u4EF6):
18920
18932
 
18921
18933
  \`\`\`markdown
18922
18934
  ## Overview
@@ -18925,7 +18937,7 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
18925
18937
  ## Steps
18926
18938
  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
18927
18939
  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
18928
- 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
18940
+ 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
18929
18941
  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
18930
18942
 
18931
18943
  ## Data Flow
@@ -18941,8 +18953,8 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
18941
18953
  | \u5B50Agent | \u5DE5\u5177 |
18942
18954
  |---------|------|
18943
18955
  | data-collector | browser, metrics |
18944
- | data-cleaner | code_eval, filesystem |
18945
- | report-generator | code_eval, filesystem |
18956
+ | data-cleaner | code_eval |
18957
+ | report-generator | code_eval |
18946
18958
  | notifier | scheduler, ask_user_to_clarify |
18947
18959
 
18948
18960
  ## Expected Input
@@ -18966,9 +18978,9 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
18966
18978
  Create sub-agents FIRST, then the orchestrator:
18967
18979
 
18968
18980
  \`\`\`
18969
- 1. create_agent(name: "stage-1", type: "react", ...)
18970
- 2. create_agent(name: "stage-2", type: "react", ...)
18971
- 3. create_agent(name: "stage-3", type: "react", ...)
18981
+ 1. create_agent(name: "stage-1", type: "deep_agent", ...)
18982
+ 2. create_agent(name: "stage-2", type: "deep_agent", ...)
18983
+ 3. create_agent(name: "stage-3", type: "deep_agent", ...)
18972
18984
  4. create_processing_agent(
18973
18985
  name: "orchestrator",
18974
18986
  prompt: "...",
@@ -19005,7 +19017,7 @@ Use this for complex, open-ended tasks where the execution path cannot be fully
19005
19017
  - Work through todos one at a time
19006
19018
  - Refine the list as understanding deepens
19007
19019
  - Self-correct based on intermediate findings
19008
- 2. **Middleware** \u2014 filesystem, code_eval, browser, skill, widget, ask_user_to_clarify as needed
19020
+ 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)
19009
19021
  3. **Sub-agents** (optional) \u2014 Specialized delegates for specific capabilities
19010
19022
 
19011
19023
  **Step 4: Self-review.** Verify: autonomy, tool coverage, guardrails.
@@ -19073,29 +19085,7 @@ All fields except name, type, and prompt are optional.
19073
19085
 
19074
19086
  ### create_processing_agent (PROCESSING)
19075
19087
 
19076
- Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist.
19077
-
19078
- \`\`\`typescript
19079
- {
19080
- name: string, // Required. Display name for the orchestrator
19081
- 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.
19082
- prompt: string, // Required. System prompt \u2014 how to route through the topology
19083
- edges: [{ // Required. At least 1 edge defining the workflow
19084
- from: string, // Orchestrator's ID (use placeholder name; tool auto-replaces)
19085
- to: string, // Sub-agent ID to delegate to
19086
- purpose: string, // Business purpose \u2014 what this step accomplishes
19087
- }],
19088
- tools?: string[], // Optional. Tool keys from list_tools
19089
- subAgents: string[], // Required. IDs of sub-agents in the pipeline
19090
- internalSubAgents?: AgentConfig[], // Optional. Inline sub-agent configs
19091
- middleware?: MiddlewareConfig[], // Optional. Additional middleware (topology is auto-added)
19092
- modelKey?: string, // Optional. Model to use
19093
- }
19094
- \`\`\`
19095
-
19096
- ### create_processing_agent (PROCESSING)
19097
-
19098
- Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist.
19088
+ Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist (created as **deep_agent** type).
19099
19089
 
19100
19090
  \`\`\`typescript
19101
19091
  {
@@ -19107,6 +19097,7 @@ Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents
19107
19097
  to: string, // Sub-agent ID to delegate to
19108
19098
  purpose: string, // Business purpose \u2014 what this step accomplishes
19109
19099
  }],
19100
+ tools?: string[], // Optional. Tool keys from list_tools
19110
19101
  subAgents: string[], // Required. IDs of sub-agents in the pipeline
19111
19102
  internalSubAgents?: AgentConfig[], // Optional. Inline sub-agent configs
19112
19103
  middleware?: MiddlewareConfig[], // Optional. Additional middleware (topology is auto-added)
@@ -19237,13 +19228,13 @@ Provides: \`read_topo_progress\` \u2014 enforces multi-agent workflow topology.
19237
19228
 
19238
19229
  | Agent Role | Recommended Middleware |
19239
19230
  |-----------|----------------------|
19240
- | Code assistant | filesystem, code_eval, widget |
19241
- | Data analyst | filesystem, sql, code_eval, widget |
19242
- | Web researcher | browser, filesystem, widget |
19231
+ | Code assistant | code_eval, widget |
19232
+ | Data analyst | sql, code_eval, widget |
19233
+ | Web researcher | browser, widget |
19243
19234
  | Operations / SRE | metrics, sql, widget |
19244
19235
  | Process orchestrator | skill, date, scheduler, widget |
19245
- | General assistant | filesystem, date, widget |
19246
- | Approval-gated operations | ask_user_to_clarify, filesystem, widget |
19236
+ | General assistant | date, widget |
19237
+ | Approval-gated operations | ask_user_to_clarify, widget |
19247
19238
  | Interactive Q&A | ask_user_to_clarify, date, widget |
19248
19239
 
19249
19240
  ### update_processing_agent
@@ -20945,6 +20936,9 @@ var MicrosandboxServiceClient = class {
20945
20936
  this.apiKey = config.apiKey;
20946
20937
  }
20947
20938
  async ensureSandbox(name, input) {
20939
+ console.log(
20940
+ `[MicrosandboxClient] ensureSandbox name=${name} image=${input.image ?? "not set"} envKeys=${Object.keys(input.env ?? {}).join(",") || "none"}`
20941
+ );
20948
20942
  return this.request(`/api/sandboxes/${encodeURIComponent(name)}`, {
20949
20943
  method: "PUT",
20950
20944
  body: input
@@ -21192,8 +21186,12 @@ var MicrosandboxRemoteProvider = class {
21192
21186
  }
21193
21187
  buildEnsureInput(config) {
21194
21188
  const defaultMicrosandboxRemoteConfig = getDefaultMicrosandboxRemoteConfig();
21189
+ const image = this.config.image ?? defaultMicrosandboxRemoteConfig.image;
21190
+ console.log(
21191
+ `[MicrosandboxRemote] buildEnsureInput image=${image} from=${this.config.image ? "providerConfig" : "defaultConfig"}`
21192
+ );
21195
21193
  return {
21196
- image: this.config.image ?? defaultMicrosandboxRemoteConfig.image,
21194
+ image,
21197
21195
  cpus: this.config.cpus ?? defaultMicrosandboxRemoteConfig.cpus,
21198
21196
  memoryMib: this.config.memoryMib ?? defaultMicrosandboxRemoteConfig.memoryMib,
21199
21197
  env: {
@@ -21358,7 +21356,7 @@ var RemoteSandboxProvider = class {
21358
21356
  environment: ""
21359
21357
  });
21360
21358
  }
21361
- async createSandbox(name) {
21359
+ async createSandbox(name, _config) {
21362
21360
  const existing = this.instances.get(name);
21363
21361
  if (existing) {
21364
21362
  return existing;
@@ -21495,7 +21493,7 @@ var E2BProvider = class {
21495
21493
  this.instances = /* @__PURE__ */ new Map();
21496
21494
  this.creating = /* @__PURE__ */ new Map();
21497
21495
  }
21498
- async createSandbox(name) {
21496
+ async createSandbox(name, _config) {
21499
21497
  const existing = this.instances.get(name);
21500
21498
  if (existing) {
21501
21499
  const running = await existing.getStatus();