@axiom-lattice/core 2.1.70 → 2.1.72

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
@@ -3018,7 +3018,7 @@ var manageBindingSchema = import_zod3.default.object({
3018
3018
  channelInstallationId: import_zod3.default.string().optional().describe("Channel installation ID (auto-detected if omitted and only one exists for this channel)"),
3019
3019
  senderId: import_zod3.default.string().optional().describe("Sender identifier (email address, Lark openId, Slack userId)"),
3020
3020
  agentId: import_zod3.default.string().optional().describe("Target agent ID to route messages to"),
3021
- threadMode: import_zod3.default.enum(["fixed", "per_conversation"]).optional().describe("Thread mode: fixed or per_conversation"),
3021
+ threadMode: import_zod3.default.enum(["fixed", "per_conversation"]).optional().default("per_conversation").describe("Thread mode: per_conversation (recommended) or fixed"),
3022
3022
  senderDisplayName: import_zod3.default.string().optional().describe("Human-readable name for the sender")
3023
3023
  });
3024
3024
  registerToolLattice(
@@ -3028,8 +3028,8 @@ registerToolLattice(
3028
3028
  description: `Manage sender-to-agent bindings for external channels (email, Lark, Slack).
3029
3029
 
3030
3030
  - list_installations: List available channel installations. Filter by channel type (optional). Use this first to discover available channelInstallationIds.
3031
- - create: Bind a sender to an agent. Required: channel, senderId, agentId. channelInstallationId is optional \u2014 auto-detected if only one installation exists for this channel.
3032
- - update: Update an existing binding. Required: channel, senderId. Optional: agentId, threadMode, senderDisplayName.
3031
+ - create: Bind a sender to an agent. Required: channel, senderId, agentId. Optional: threadMode (default: per_conversation). channelInstallationId is optional \u2014 auto-detected if only one installation exists for this channel.
3032
+ - update: Update an existing binding. Required: channel, senderId. Optional: agentId, threadMode (default: per_conversation), senderDisplayName.
3033
3033
  - delete: Remove a binding. Required: channel, senderId.
3034
3034
  - list: List all bindings. Optional: channel, agentId, channelInstallationId.
3035
3035
 
@@ -18978,7 +18978,7 @@ If the user's intent is unclear after creation, ask: "Edit this agent or create
18978
18978
 
18979
18979
  ## Your Tools
18980
18980
 
18981
- You have eight tools for agent management:
18981
+ You have nine tools for agent management:
18982
18982
  - **list_agents** \u2014 See all existing agents for this workspace
18983
18983
  - **list_tools** \u2014 See all available tools that can be assigned to agents
18984
18984
  - **get_agent** \u2014 View the full configuration of a specific agent
@@ -18987,6 +18987,7 @@ You have eight tools for agent management:
18987
18987
  - **update_processing_agent** \u2014 Modify a PROCESSING agent's topology edges, name, prompt, or sub-agents
18988
18988
  - **update_agent** \u2014 Modify an existing REACT or DEEP_AGENT agent's configuration
18989
18989
  - **delete_agent** \u2014 Remove an agent permanently
18990
+ - **manage_binding** \u2014 Bind a sender (email, Lark, Slack user) to an agent so external messages are routed to it
18990
18991
 
18991
18992
  You also have an **Agent Reviewer** sub-agent that handles testing and configuration review. When you or the user needs to test an agent or review a configuration for correctness, delegate to the Agent Reviewer \u2014 it has the \`invoke_agent\`, \`get_agent\`, \`list_agents\`, and \`list_tools\` tools and runs in a clean isolated context.
18992
18993
 
@@ -19067,6 +19068,8 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
19067
19068
 
19068
19069
  **Step 1: Process analysis.** Ask: What is the end-to-end process? Map the stages.
19069
19070
 
19071
+ **Business rule \u2014 Draft-then-confirm pattern:** When a workflow creates business objects that require human approval (e.g., draft orders in SAP B1, purchase requisitions, expense reports), the design MUST include a confirmation step AFTER the creation step. The create step must complete successfully before the confirm step runs. The flow is always: **Create draft \u2192 User confirms \u2192 Finalize**. Reason: systems like SAP B1 only expose drafts to users after they are created \u2014 the user cannot see or approve something that doesn't exist yet. The confirm step MUST use the \`ask_user_to_clarify\` middleware.
19072
+
19070
19073
  **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.
19071
19074
 
19072
19075
  **Step 3: Design each sub-agent** as a **deep_agent** type (one at a time). For each:
@@ -19173,6 +19176,18 @@ First edge's \`from\` uses orchestrator name as placeholder (auto-resolved). Sub
19173
19176
 
19174
19177
  You may ask: "Want me to test the orchestrator end-to-end?" If yes, delegate to the **Agent Reviewer** sub-agent.
19175
19178
 
19179
+ ### Phase 5: Bind channel (ask)
19180
+
19181
+ After the workflow is created, ask the user if they want to bind an email address (or Lark/Slack sender) to drive the workflow. This allows external users to trigger the workflow by sending messages to the channel.
19182
+
19183
+ **Step 1: Check installations.** Call \`manage_binding\` with \`action: "list_installations"\` to see available channel installations.
19184
+
19185
+ **Step 2: Ask user.** Present the available channels and ask: "Would you like to bind an email address to drive this workflow? If so, what email address should trigger it?"
19186
+
19187
+ **Step 3: Bind.** Call \`manage_binding\` with \`action: "create"\`, providing \`channel\`, \`senderId\` (the email), and \`agentId\` (the orchestrator's ID).
19188
+
19189
+ **IMPORTANT:** Only create a binding after the user explicitly provides the email address. Do NOT guess or fabricate sender information.
19190
+
19176
19191
  ---
19177
19192
 
19178
19193
  ## Workflow C: Dynamic Agent (DEEP_AGENT type)
@@ -19411,6 +19426,22 @@ Provides: \`read_topo_progress\` \u2014 enforces multi-agent workflow topology.
19411
19426
  | Approval-gated operations | ask_user_to_clarify, widget |
19412
19427
  | Interactive Q&A | ask_user_to_clarify, date, widget |
19413
19428
 
19429
+ ### manage_binding Reference
19430
+
19431
+ Use \`manage_binding\` to bind external senders (email, Lark, Slack) to agents. A binding routes inbound messages from the sender to the specified agent.
19432
+
19433
+ | action | description | required params |
19434
+ |--------|-------------|----------------|
19435
+ | list_installations | List available channel installations | channel (optional) |
19436
+ | create | Bind a sender to an agent | channel, senderId, agentId |
19437
+ | update | Update an existing binding | channel, senderId |
19438
+ | delete | Remove a binding | channel, senderId |
19439
+ | list | List all bindings | channel, agentId (optional) |
19440
+
19441
+ - **senderId**: For email channel, this is the email address. For Lark, it's the openId. For Slack, it's the userId.
19442
+ - **threadMode**: Always use \`"per_conversation"\` (new thread per conversation). Do NOT use \`"fixed"\`.
19443
+ - **channelInstallationId**: Auto-detected if only one installation exists for the channel. Use \`list_installations\` first if unsure.
19444
+
19414
19445
  ### update_processing_agent
19415
19446
 
19416
19447
  Updates a PROCESSING agent's topology edges, name, prompt, or sub-agents. Unlike update_agent, this properly handles placeholder resolution for edge \`from\` values and manages the topology middleware correctly.