@axiom-lattice/core 2.1.96 → 2.1.98

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.js CHANGED
@@ -8847,8 +8847,18 @@ var codeEvalPlugin = {
8847
8847
  description: "Enables safe code execution",
8848
8848
  configSchema: {
8849
8849
  type: "object",
8850
+ title: "Code Evaluation Configuration",
8851
+ description: "Configure code execution sandbox settings",
8852
+ required: ["vmIsolation"],
8850
8853
  properties: {
8851
- vmIsolation: { type: "string" }
8854
+ vmIsolation: {
8855
+ type: "string",
8856
+ title: "VM Isolation",
8857
+ description: "Controls how code execution is isolated between agents and projects",
8858
+ enum: ["global", "agent", "project"],
8859
+ default: "global",
8860
+ widget: "segmented"
8861
+ }
8852
8862
  }
8853
8863
  },
8854
8864
  defaultConfig: { vmIsolation: "global" }
@@ -8897,9 +8907,18 @@ var browserPlugin = {
8897
8907
  description: "Provides browser automation capabilities",
8898
8908
  configSchema: {
8899
8909
  type: "object",
8910
+ title: "Browser Configuration",
8911
+ description: "Configure browser automation settings",
8912
+ required: ["vmIsolation"],
8900
8913
  properties: {
8901
- vmIsolation: { type: "string" },
8902
- headless: { type: "boolean" }
8914
+ vmIsolation: {
8915
+ type: "string",
8916
+ title: "VM Isolation",
8917
+ description: "Controls how browser instances are isolated between agents and projects",
8918
+ enum: ["global", "agent", "project"],
8919
+ default: "agent",
8920
+ widget: "segmented"
8921
+ }
8903
8922
  }
8904
8923
  },
8905
8924
  defaultConfig: { headless: true, vmIsolation: "agent" }
@@ -8945,8 +8964,17 @@ var sqlPlugin = {
8945
8964
  ],
8946
8965
  configSchema: {
8947
8966
  type: "object",
8967
+ title: "SQL Configuration",
8968
+ description: "Configure database connection settings",
8969
+ required: ["databaseKeys"],
8948
8970
  properties: {
8949
- databaseKeys: { type: "array", items: { type: "string" }, widget: "databaseSelect" }
8971
+ databaseKeys: {
8972
+ type: "array",
8973
+ title: "Select Databases",
8974
+ description: "Select databases this agent can access (multi-select from registered databases)",
8975
+ items: { type: "string" },
8976
+ widget: "databaseSelect"
8977
+ }
8950
8978
  }
8951
8979
  },
8952
8980
  defaultConfig: { databaseKeys: [] }
@@ -9960,7 +9988,32 @@ var skillPlugin = {
9960
9988
  meta: {
9961
9989
  type: "skill",
9962
9990
  name: "Skills",
9963
- description: "Provides skill loading capabilities for the agent"
9991
+ description: "Provides skill loading capabilities for the agent",
9992
+ configSchema: {
9993
+ type: "object",
9994
+ title: "Skills Configuration",
9995
+ description: "Configure which skills this agent can use",
9996
+ properties: {
9997
+ readAll: {
9998
+ type: "boolean",
9999
+ title: "Read All Skills",
10000
+ description: "When enabled, the agent will have access to all available skills automatically",
10001
+ default: false,
10002
+ widget: "switch"
10003
+ },
10004
+ skills: {
10005
+ type: "array",
10006
+ title: "Select Skills",
10007
+ description: "Select which skills this agent can use (ignored if 'Read All Skills' is enabled)",
10008
+ items: { type: "string" },
10009
+ widget: "skillSelect"
10010
+ }
10011
+ }
10012
+ },
10013
+ defaultConfig: {
10014
+ readAll: false,
10015
+ skills: []
10016
+ }
9964
10017
  },
9965
10018
  middleware: (cfg) => createSkillMiddleware(cfg)
9966
10019
  };
@@ -10838,8 +10891,18 @@ var filesystemPlugin = {
10838
10891
  description: "Provides file system operations for reading, writing, and managing files",
10839
10892
  configSchema: {
10840
10893
  type: "object",
10894
+ title: "Filesystem Configuration",
10895
+ description: "Configure filesystem isolation and access settings",
10896
+ required: ["vmIsolation"],
10841
10897
  properties: {
10842
- vmIsolation: { type: "string" }
10898
+ vmIsolation: {
10899
+ type: "string",
10900
+ title: "VM Isolation",
10901
+ description: "Controls how filesystem access is isolated between agents and projects",
10902
+ enum: ["global", "agent", "project"],
10903
+ default: "global",
10904
+ widget: "segmented"
10905
+ }
10843
10906
  }
10844
10907
  },
10845
10908
  defaultConfig: { vmIsolation: "global" }
@@ -10896,9 +10959,23 @@ var metricsPlugin = {
10896
10959
  ],
10897
10960
  configSchema: {
10898
10961
  type: "object",
10962
+ title: "Metrics Configuration",
10963
+ description: "Configure metrics server access settings",
10899
10964
  properties: {
10900
- connectAll: { type: "boolean" },
10901
- serverKeys: { type: "array", items: { type: "string" } }
10965
+ connectAll: {
10966
+ type: "boolean",
10967
+ title: "Connect All Servers",
10968
+ description: "When enabled, the agent will connect to all available metrics servers automatically",
10969
+ default: false,
10970
+ widget: "switch"
10971
+ },
10972
+ serverKeys: {
10973
+ type: "array",
10974
+ title: "Select Metrics Servers",
10975
+ description: "Select metrics servers this agent can query (ignored if 'Connect All Servers' is enabled)",
10976
+ items: { type: "string" },
10977
+ widget: "metricsSelect"
10978
+ }
10902
10979
  }
10903
10980
  },
10904
10981
  defaultConfig: { connectAll: false, serverKeys: [] }
@@ -11509,9 +11586,23 @@ var collectionPlugin = {
11509
11586
  ],
11510
11587
  configSchema: {
11511
11588
  type: "object",
11589
+ title: "Collection Configuration",
11590
+ description: "Configure collection access for this agent",
11512
11591
  properties: {
11513
- connectAll: { type: "boolean" },
11514
- collectionKeys: { type: "array", items: { type: "string" } }
11592
+ connectAll: {
11593
+ type: "boolean",
11594
+ title: "Connect All Collections",
11595
+ description: "When enabled, the agent will have access to all collections automatically",
11596
+ default: false,
11597
+ widget: "switch"
11598
+ },
11599
+ collectionKeys: {
11600
+ type: "array",
11601
+ title: "Select Collections",
11602
+ description: "Select which collections this agent can access",
11603
+ items: { type: "string" },
11604
+ widget: "collectionSelect"
11605
+ }
11515
11606
  }
11516
11607
  },
11517
11608
  defaultConfig: { connectAll: false, collectionKeys: [] }
@@ -11528,10 +11619,10 @@ var import_langchain56 = require("langchain");
11528
11619
  var import_zod56 = __toESM(require("zod"));
11529
11620
  var questionSchema = import_zod56.default.object({
11530
11621
  question: import_zod56.default.string().describe("The question text to ask the user"),
11531
- options: import_zod56.default.array(import_zod56.default.string()).optional().default([]).describe("List of EXACT, selectable values. Maximum 3 options allowed. DO NOT include any 'placeholder' options that require the user to type (e.g., do NOT add 'Enter manual value'). If manual input is needed, set allowOther to true instead. For file_upload questions, pass an empty array."),
11532
- type: import_zod56.default.enum(["single", "multiple", "file_upload"]).describe("Whether the question allows single selection, multiple selections, or expects a file upload. file_upload questions render a file picker component and the uploaded file path is returned as the answer."),
11622
+ options: import_zod56.default.array(import_zod56.default.string()).optional().default([]).describe("List of EXACT, selectable values. Maximum 3 options allowed. DO NOT include placeholder values like 'Other' or 'Enter manually'. For free-text with predefined choices, use allowOther=true (works with 'single' and 'multiple'). For pure free-text without choices, use type='input' instead. For file_upload and input, pass an empty array."),
11623
+ type: import_zod56.default.enum(["single", "multiple", "file_upload", "input"]).describe("The question format. 'single' = pick one from options (default, see tool description for guidance). 'multiple' = pick several from options. 'input' = free-text field (only when options cannot express the answer). 'file_upload' = file picker."),
11533
11624
  required: import_zod56.default.boolean().optional().default(false).describe("Whether this question must be answered"),
11534
- allowOther: import_zod56.default.boolean().optional().default(true).describe("Set to true to append an 'Other' option that opens a free-text input field. Use this for open-ended answers or when the 3 options cannot cover all possibilities.")
11625
+ allowOther: import_zod56.default.boolean().optional().default(true).describe("Set to true to append an 'Other' checkbox with a free-text input field. Works with 'single' and 'multiple' types. Use for open-ended answers or when the options cannot cover all possibilities. Not applicable for 'input' or 'file_upload' types.")
11535
11626
  });
11536
11627
  var inputSchema = import_zod56.default.object({
11537
11628
  questions: import_zod56.default.array(questionSchema).min(1, "At least one question is required").describe("A structured sequence of clarification questions. Use these to gather missing parameters or disambiguate user intent before proceeding.")
@@ -11543,7 +11634,7 @@ function createAskUserToClarifyTool() {
11543
11634
  },
11544
11635
  {
11545
11636
  name: "ask_user_to_clarify",
11546
- description: "Prompts the user to choose from a list of predefined values, provide custom input, or upload a file. USE CASES: 1. Use 'options' ONLY for distinct, mutually exclusive choices (e.g., ['Standard', 'Express']). 2. Set 'allowOther: true' ONLY when you need to capture free-text information that doesn't fit into the predefined options. 3. Use type: 'file_upload' to ask the user to upload a file \u2014 options can be an empty array for this type. IMPORTANT: Never put placeholders like 'Please specify' or 'Other' inside the 'options' list. ",
11637
+ description: "Ask the user clarifying questions using the most appropriate question type. TYPE SELECTION GUIDE (in priority order \u2014 prefer earlier types when possible):\n1. type: 'single' \u2014 DEFAULT for most cases. Use when the user must pick ONE from a known set (e.g., ['Yes', 'No'], ['Standard', 'Express', 'Priority']). Max 3 options. Best UX: click, no typing.\n2. type: 'multiple' \u2014 Use when the user can select SEVERAL from a known set (e.g., ['Email', 'SMS', 'Push']).\n3. type: 'input' \u2014 Use when the answer is purely free-text and CANNOT be enumerated (e.g., name, email, arbitrary description). Only use this when 'single' + options is not feasible.\n4. type: 'file_upload' \u2014 Use ONLY when the user needs to upload a file. Do NOT use for text input.\n\nallowOther: true \u2014 Escape hatch for 'single' and 'multiple' types. Adds an 'Other' checkbox with a text field. Use when the options MIGHT not cover everything. Do NOT set allowOther on 'input' or 'file_upload' types.\n\nANTI-PATTERNS: Never put 'Other' or 'Enter manually' inside the options array. Never use 'input' when 'single' + options would work. Never use 'file_upload' for text input.",
11547
11638
  schema: inputSchema
11548
11639
  }
11549
11640
  );
@@ -11620,7 +11711,11 @@ function createAskUserClarifyMiddleware() {
11620
11711
  parts.push(...answer.selectedOptions ?? []);
11621
11712
  }
11622
11713
  if (answer.otherText && answer.otherText.trim() !== "") {
11623
- parts.push(`Other: ${answer.otherText.trim()}`);
11714
+ if (question.type === "input") {
11715
+ parts.push(answer.otherText.trim());
11716
+ } else {
11717
+ parts.push(`Other: ${answer.otherText.trim()}`);
11718
+ }
11624
11719
  }
11625
11720
  if (answer.filePath && answer.filePath.trim() !== "") {
11626
11721
  parts.push(`File: ${answer.filePath.trim()}`);
@@ -11642,7 +11737,14 @@ var askUserClarifyPlugin = {
11642
11737
  meta: {
11643
11738
  type: "ask_user_to_clarify",
11644
11739
  name: "Ask User To Clarify",
11645
- description: "Enables the agent to ask users clarifying questions"
11740
+ description: "Enables the agent to ask users clarifying questions",
11741
+ configSchema: {
11742
+ type: "object",
11743
+ title: "Ask User To Clarify Configuration",
11744
+ description: "Configure user clarification settings",
11745
+ properties: {}
11746
+ },
11747
+ defaultConfig: {}
11646
11748
  },
11647
11749
  middleware: () => createAskUserClarifyMiddleware()
11648
11750
  };
@@ -12540,7 +12642,14 @@ var widgetPlugin = {
12540
12642
  meta: {
12541
12643
  type: "widget",
12542
12644
  name: "Widget",
12543
- description: "Enables the agent to render interactive HTML widgets"
12645
+ description: "Enables the agent to render interactive HTML widgets",
12646
+ configSchema: {
12647
+ type: "object",
12648
+ title: "Widget Configuration",
12649
+ description: "Configure widget rendering capabilities (zero configuration required)",
12650
+ properties: {}
12651
+ },
12652
+ defaultConfig: {}
12544
12653
  },
12545
12654
  middleware: () => createWidgetMiddleware()
12546
12655
  };
@@ -13163,7 +13272,24 @@ var clawPlugin = {
13163
13272
  meta: {
13164
13273
  type: "claw",
13165
13274
  name: "Memory",
13166
- description: "Injects and manages memory/bootstrap files in the runtime workspace"
13275
+ description: "Injects and manages memory/bootstrap files in the runtime workspace",
13276
+ configSchema: {
13277
+ type: "object",
13278
+ title: "Memory Configuration",
13279
+ description: "Configure bootstrap file injection behavior",
13280
+ properties: {
13281
+ injectBootstrapFiles: {
13282
+ type: "boolean",
13283
+ title: "Inject Bootstrap Files",
13284
+ description: "Automatically inject default bootstrap files into the workspace context",
13285
+ default: true,
13286
+ widget: "switch"
13287
+ }
13288
+ }
13289
+ },
13290
+ defaultConfig: {
13291
+ injectBootstrapFiles: true
13292
+ }
13167
13293
  },
13168
13294
  middleware: (cfg) => createClawMiddleware(cfg)
13169
13295
  };
@@ -13359,7 +13485,46 @@ var datePlugin = {
13359
13485
  meta: {
13360
13486
  type: "date",
13361
13487
  name: "Current Date",
13362
- description: "Injects the current date into the agent system prompt"
13488
+ description: "Injects the current date into the agent system prompt",
13489
+ configSchema: {
13490
+ type: "object",
13491
+ title: "Date Configuration",
13492
+ description: "Configure timezone for the current date",
13493
+ properties: {
13494
+ timezone: {
13495
+ type: "string",
13496
+ title: "Timezone",
13497
+ description: "Select timezone for displaying the current date",
13498
+ default: "UTC",
13499
+ enumLabels: {
13500
+ "UTC": "UTC (Coordinated Universal Time)",
13501
+ "America/New_York": "New York (EST/EDT)",
13502
+ "America/Chicago": "Chicago (CST/CDT)",
13503
+ "America/Denver": "Denver (MST/MDT)",
13504
+ "America/Los_Angeles": "Los Angeles (PST/PDT)",
13505
+ "America/Toronto": "Toronto (EST/EDT)",
13506
+ "America/Sao_Paulo": "S\xE3o Paulo (BRT)",
13507
+ "Europe/London": "London (GMT/BST)",
13508
+ "Europe/Paris": "Paris (CET/CEST)",
13509
+ "Europe/Berlin": "Berlin (CET/CEST)",
13510
+ "Europe/Moscow": "Moscow (MSK)",
13511
+ "Asia/Dubai": "Dubai (GST)",
13512
+ "Asia/Kolkata": "Kolkata (IST)",
13513
+ "Asia/Shanghai": "Shanghai (CST)",
13514
+ "Asia/Hong_Kong": "Hong Kong (HKT)",
13515
+ "Asia/Singapore": "Singapore (SGT)",
13516
+ "Asia/Tokyo": "Tokyo (JST)",
13517
+ "Asia/Seoul": "Seoul (KST)",
13518
+ "Australia/Sydney": "Sydney (AEDT/AEST)",
13519
+ "Pacific/Auckland": "Auckland (NZDT/NZST)"
13520
+ },
13521
+ widget: "select"
13522
+ }
13523
+ }
13524
+ },
13525
+ defaultConfig: {
13526
+ timezone: "UTC"
13527
+ }
13363
13528
  },
13364
13529
  middleware: (cfg) => createDateMiddleware(cfg)
13365
13530
  };
@@ -16373,7 +16538,25 @@ var schedulerPlugin = {
16373
16538
  meta: {
16374
16539
  type: "scheduler",
16375
16540
  name: "Scheduler",
16376
- description: "Enables the agent to schedule future work"
16541
+ description: "Enables the agent to schedule future work",
16542
+ configSchema: {
16543
+ type: "object",
16544
+ title: "Scheduler Configuration",
16545
+ description: "Configure retry behavior for scheduled tasks",
16546
+ properties: {
16547
+ defaultMaxRetries: {
16548
+ type: "integer",
16549
+ title: "Default Max Retries",
16550
+ description: "Default retry count for scheduled tasks created through the middleware",
16551
+ default: 0,
16552
+ minimum: 0,
16553
+ widget: "numberInput"
16554
+ }
16555
+ }
16556
+ },
16557
+ defaultConfig: {
16558
+ defaultMaxRetries: 0
16559
+ }
16377
16560
  },
16378
16561
  middleware: (cfg) => createSchedulerMiddleware(cfg)
16379
16562
  };
@@ -16513,7 +16696,14 @@ var taskPlugin = {
16513
16696
  meta: {
16514
16697
  type: "task",
16515
16698
  name: "Task Management",
16516
- description: "Enables persistent task management with delegation and tracking"
16699
+ description: "Enables persistent task management with delegation and tracking",
16700
+ configSchema: {
16701
+ type: "object",
16702
+ title: "Task Management Configuration",
16703
+ description: "Zero-configuration task management",
16704
+ properties: {}
16705
+ },
16706
+ defaultConfig: {}
16517
16707
  },
16518
16708
  middleware: () => createTaskMiddleware()
16519
16709
  };
@@ -17496,17 +17686,17 @@ function getAsyncPromptText() {
17496
17686
 
17497
17687
  ## Async Task Usage
17498
17688
 
17499
- When tasks are independent and can run in parallel, use \`async: true\` to launch
17500
- background tasks. The task returns immediately with a task ID.
17689
+ **IMPORTANT: Only use \`async: true\` when the USER explicitly requests it.** Do NOT set \`async: true\` on your own initiative, even if tasks appear independent or parallelizable. The user must explicitly ask for background/async execution, for example: "run this in the background", "do this asynchronously", "fire and forget", or "let me know when it's done".
17690
+
17691
+ If the user does NOT explicitly request async execution, always use \`async: false\` (the default) so the task runs synchronously and the result is available immediately.
17501
17692
 
17502
- CRITICAL: After launching with \`async: true\`, move on immediately.
17503
- - NEVER call check_async_task or list_async_tasks right after starting a task.
17693
+ When \`async: true\` IS explicitly requested by the user:
17694
+ - The task returns immediately with a task ID.
17695
+ - Move on immediately after launching. NEVER call check_async_task or list_async_tasks right after starting a task.
17504
17696
  - NEVER poll for task completion. The result will arrive as a notification.
17505
17697
  - Only check task status when the USER explicitly asks for an update.
17506
- - If you receive an [Async task completed] notification, read it and incorporate
17507
- the result into your next response. Do not then call check_async_task repeatedly.
17508
- - Task statuses in conversation history are stale \u2014 always use fresh tool calls
17509
- when the user asks.
17698
+ - If you receive an [Async task completed] notification, read it and incorporate the result into your next response. Do not then call check_async_task repeatedly.
17699
+ - Task statuses in conversation history are stale \u2014 always use fresh tool calls when the user asks.
17510
17700
  - Use cancel_async_task if the user wants to stop a running task.
17511
17701
  - Keep the full task_id: never truncate or abbreviate it.`;
17512
17702
  }
@@ -23398,7 +23588,10 @@ registerToolLattice(
23398
23588
  },
23399
23589
  async (input, exeConfig) => {
23400
23590
  try {
23401
- const tenantId = getTenantId(exeConfig);
23591
+ const parentRunConfig = exeConfig?.configurable?.runConfig || {};
23592
+ const tenantId = parentRunConfig.tenantId || "default";
23593
+ const workspaceId = parentRunConfig.workspaceId;
23594
+ const projectId = parentRunConfig.projectId;
23402
23595
  const { id, message } = input;
23403
23596
  const store = getAssistStore();
23404
23597
  const existing = await store.getAssistantById(tenantId, id);
@@ -23409,7 +23602,9 @@ registerToolLattice(
23409
23602
  const agent = new Agent({
23410
23603
  tenant_id: tenantId,
23411
23604
  assistant_id: id,
23412
- thread_id: threadId
23605
+ thread_id: threadId,
23606
+ workspace_id: workspaceId,
23607
+ project_id: projectId
23413
23608
  });
23414
23609
  const result = await agent.invokeWithState({ input: { message } });
23415
23610
  return JSON.stringify({ agentId: id, threadId, result });