@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 +35 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2793,7 +2793,7 @@ var manageBindingSchema = z3.object({
|
|
|
2793
2793
|
channelInstallationId: z3.string().optional().describe("Channel installation ID (auto-detected if omitted and only one exists for this channel)"),
|
|
2794
2794
|
senderId: z3.string().optional().describe("Sender identifier (email address, Lark openId, Slack userId)"),
|
|
2795
2795
|
agentId: z3.string().optional().describe("Target agent ID to route messages to"),
|
|
2796
|
-
threadMode: z3.enum(["fixed", "per_conversation"]).optional().describe("Thread mode:
|
|
2796
|
+
threadMode: z3.enum(["fixed", "per_conversation"]).optional().default("per_conversation").describe("Thread mode: per_conversation (recommended) or fixed"),
|
|
2797
2797
|
senderDisplayName: z3.string().optional().describe("Human-readable name for the sender")
|
|
2798
2798
|
});
|
|
2799
2799
|
registerToolLattice(
|
|
@@ -2803,8 +2803,8 @@ registerToolLattice(
|
|
|
2803
2803
|
description: `Manage sender-to-agent bindings for external channels (email, Lark, Slack).
|
|
2804
2804
|
|
|
2805
2805
|
- list_installations: List available channel installations. Filter by channel type (optional). Use this first to discover available channelInstallationIds.
|
|
2806
|
-
- 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.
|
|
2807
|
-
- update: Update an existing binding. Required: channel, senderId. Optional: agentId, threadMode, senderDisplayName.
|
|
2806
|
+
- 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.
|
|
2807
|
+
- update: Update an existing binding. Required: channel, senderId. Optional: agentId, threadMode (default: per_conversation), senderDisplayName.
|
|
2808
2808
|
- delete: Remove a binding. Required: channel, senderId.
|
|
2809
2809
|
- list: List all bindings. Optional: channel, agentId, channelInstallationId.
|
|
2810
2810
|
|
|
@@ -18804,7 +18804,7 @@ If the user's intent is unclear after creation, ask: "Edit this agent or create
|
|
|
18804
18804
|
|
|
18805
18805
|
## Your Tools
|
|
18806
18806
|
|
|
18807
|
-
You have
|
|
18807
|
+
You have nine tools for agent management:
|
|
18808
18808
|
- **list_agents** \u2014 See all existing agents for this workspace
|
|
18809
18809
|
- **list_tools** \u2014 See all available tools that can be assigned to agents
|
|
18810
18810
|
- **get_agent** \u2014 View the full configuration of a specific agent
|
|
@@ -18813,6 +18813,7 @@ You have eight tools for agent management:
|
|
|
18813
18813
|
- **update_processing_agent** \u2014 Modify a PROCESSING agent's topology edges, name, prompt, or sub-agents
|
|
18814
18814
|
- **update_agent** \u2014 Modify an existing REACT or DEEP_AGENT agent's configuration
|
|
18815
18815
|
- **delete_agent** \u2014 Remove an agent permanently
|
|
18816
|
+
- **manage_binding** \u2014 Bind a sender (email, Lark, Slack user) to an agent so external messages are routed to it
|
|
18816
18817
|
|
|
18817
18818
|
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.
|
|
18818
18819
|
|
|
@@ -18893,6 +18894,8 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
|
|
|
18893
18894
|
|
|
18894
18895
|
**Step 1: Process analysis.** Ask: What is the end-to-end process? Map the stages.
|
|
18895
18896
|
|
|
18897
|
+
**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.
|
|
18898
|
+
|
|
18896
18899
|
**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.
|
|
18897
18900
|
|
|
18898
18901
|
**Step 3: Design each sub-agent** as a **deep_agent** type (one at a time). For each:
|
|
@@ -18999,6 +19002,18 @@ First edge's \`from\` uses orchestrator name as placeholder (auto-resolved). Sub
|
|
|
18999
19002
|
|
|
19000
19003
|
You may ask: "Want me to test the orchestrator end-to-end?" If yes, delegate to the **Agent Reviewer** sub-agent.
|
|
19001
19004
|
|
|
19005
|
+
### Phase 5: Bind channel (ask)
|
|
19006
|
+
|
|
19007
|
+
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.
|
|
19008
|
+
|
|
19009
|
+
**Step 1: Check installations.** Call \`manage_binding\` with \`action: "list_installations"\` to see available channel installations.
|
|
19010
|
+
|
|
19011
|
+
**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?"
|
|
19012
|
+
|
|
19013
|
+
**Step 3: Bind.** Call \`manage_binding\` with \`action: "create"\`, providing \`channel\`, \`senderId\` (the email), and \`agentId\` (the orchestrator's ID).
|
|
19014
|
+
|
|
19015
|
+
**IMPORTANT:** Only create a binding after the user explicitly provides the email address. Do NOT guess or fabricate sender information.
|
|
19016
|
+
|
|
19002
19017
|
---
|
|
19003
19018
|
|
|
19004
19019
|
## Workflow C: Dynamic Agent (DEEP_AGENT type)
|
|
@@ -19237,6 +19252,22 @@ Provides: \`read_topo_progress\` \u2014 enforces multi-agent workflow topology.
|
|
|
19237
19252
|
| Approval-gated operations | ask_user_to_clarify, widget |
|
|
19238
19253
|
| Interactive Q&A | ask_user_to_clarify, date, widget |
|
|
19239
19254
|
|
|
19255
|
+
### manage_binding Reference
|
|
19256
|
+
|
|
19257
|
+
Use \`manage_binding\` to bind external senders (email, Lark, Slack) to agents. A binding routes inbound messages from the sender to the specified agent.
|
|
19258
|
+
|
|
19259
|
+
| action | description | required params |
|
|
19260
|
+
|--------|-------------|----------------|
|
|
19261
|
+
| list_installations | List available channel installations | channel (optional) |
|
|
19262
|
+
| create | Bind a sender to an agent | channel, senderId, agentId |
|
|
19263
|
+
| update | Update an existing binding | channel, senderId |
|
|
19264
|
+
| delete | Remove a binding | channel, senderId |
|
|
19265
|
+
| list | List all bindings | channel, agentId (optional) |
|
|
19266
|
+
|
|
19267
|
+
- **senderId**: For email channel, this is the email address. For Lark, it's the openId. For Slack, it's the userId.
|
|
19268
|
+
- **threadMode**: Always use \`"per_conversation"\` (new thread per conversation). Do NOT use \`"fixed"\`.
|
|
19269
|
+
- **channelInstallationId**: Auto-detected if only one installation exists for the channel. Use \`list_installations\` first if unsure.
|
|
19270
|
+
|
|
19240
19271
|
### update_processing_agent
|
|
19241
19272
|
|
|
19242
19273
|
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.
|