@axiom-lattice/core 2.1.69 → 2.1.71
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 +52 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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:
|
|
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
|
|
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,10 +19068,13 @@ 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
|
-
**Step 3: Design each sub-agent** (one at a time). For each:
|
|
19075
|
+
**Step 3: Design each sub-agent** as a **deep_agent** type (one at a time). For each:
|
|
19073
19076
|
- Responsibility, system prompt, middleware, input/output contract
|
|
19077
|
+
- Deep agents have built-in file capabilities (ls, read, write, edit, glob, grep), so do NOT add filesystem middleware.
|
|
19074
19078
|
- **Ask for confirmation before moving to the next sub-agent.**
|
|
19075
19079
|
|
|
19076
19080
|
**Step 4: Design the orchestrator.** Responsibility, system prompt, topology edges, sub-agent list.
|
|
@@ -19101,7 +19105,7 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
|
|
|
19101
19105
|
- Be detailed but concise \u2014 each section should be 1-5 lines
|
|
19102
19106
|
- Avoid placeholder text like "TODO" or "TBD"
|
|
19103
19107
|
|
|
19104
|
-
|
|
19108
|
+
**Example structure** (\u5B50 Agent \u5747\u4E3A deep_agent \u7C7B\u578B\uFF0C\u65E0\u9700 filesystem \u4E2D\u95F4\u4EF6):
|
|
19105
19109
|
|
|
19106
19110
|
\`\`\`markdown
|
|
19107
19111
|
## Overview
|
|
@@ -19110,7 +19114,7 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
|
|
|
19110
19114
|
## Steps
|
|
19111
19115
|
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
|
|
19112
19116
|
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
|
|
19113
|
-
|
|
19117
|
+
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
|
|
19114
19118
|
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
|
|
19115
19119
|
|
|
19116
19120
|
## Data Flow
|
|
@@ -19126,8 +19130,8 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
|
|
|
19126
19130
|
| \u5B50Agent | \u5DE5\u5177 |
|
|
19127
19131
|
|---------|------|
|
|
19128
19132
|
| data-collector | browser, metrics |
|
|
19129
|
-
|
|
19130
|
-
|
|
19133
|
+
| data-cleaner | code_eval |
|
|
19134
|
+
| report-generator | code_eval |
|
|
19131
19135
|
| notifier | scheduler, ask_user_to_clarify |
|
|
19132
19136
|
|
|
19133
19137
|
## Expected Input
|
|
@@ -19151,9 +19155,9 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
|
|
|
19151
19155
|
Create sub-agents FIRST, then the orchestrator:
|
|
19152
19156
|
|
|
19153
19157
|
\`\`\`
|
|
19154
|
-
1. create_agent(name: "stage-1", type: "
|
|
19155
|
-
2. create_agent(name: "stage-2", type: "
|
|
19156
|
-
3. create_agent(name: "stage-3", type: "
|
|
19158
|
+
1. create_agent(name: "stage-1", type: "deep_agent", ...)
|
|
19159
|
+
2. create_agent(name: "stage-2", type: "deep_agent", ...)
|
|
19160
|
+
3. create_agent(name: "stage-3", type: "deep_agent", ...)
|
|
19157
19161
|
4. create_processing_agent(
|
|
19158
19162
|
name: "orchestrator",
|
|
19159
19163
|
prompt: "...",
|
|
@@ -19172,6 +19176,18 @@ First edge's \`from\` uses orchestrator name as placeholder (auto-resolved). Sub
|
|
|
19172
19176
|
|
|
19173
19177
|
You may ask: "Want me to test the orchestrator end-to-end?" If yes, delegate to the **Agent Reviewer** sub-agent.
|
|
19174
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
|
+
|
|
19175
19191
|
---
|
|
19176
19192
|
|
|
19177
19193
|
## Workflow C: Dynamic Agent (DEEP_AGENT type)
|
|
@@ -19190,7 +19206,7 @@ Use this for complex, open-ended tasks where the execution path cannot be fully
|
|
|
19190
19206
|
- Work through todos one at a time
|
|
19191
19207
|
- Refine the list as understanding deepens
|
|
19192
19208
|
- Self-correct based on intermediate findings
|
|
19193
|
-
2. **Middleware** \u2014
|
|
19209
|
+
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)
|
|
19194
19210
|
3. **Sub-agents** (optional) \u2014 Specialized delegates for specific capabilities
|
|
19195
19211
|
|
|
19196
19212
|
**Step 4: Self-review.** Verify: autonomy, tool coverage, guardrails.
|
|
@@ -19258,29 +19274,7 @@ All fields except name, type, and prompt are optional.
|
|
|
19258
19274
|
|
|
19259
19275
|
### create_processing_agent (PROCESSING)
|
|
19260
19276
|
|
|
19261
|
-
Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist.
|
|
19262
|
-
|
|
19263
|
-
\`\`\`typescript
|
|
19264
|
-
{
|
|
19265
|
-
name: string, // Required. Display name for the orchestrator
|
|
19266
|
-
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.
|
|
19267
|
-
prompt: string, // Required. System prompt \u2014 how to route through the topology
|
|
19268
|
-
edges: [{ // Required. At least 1 edge defining the workflow
|
|
19269
|
-
from: string, // Orchestrator's ID (use placeholder name; tool auto-replaces)
|
|
19270
|
-
to: string, // Sub-agent ID to delegate to
|
|
19271
|
-
purpose: string, // Business purpose \u2014 what this step accomplishes
|
|
19272
|
-
}],
|
|
19273
|
-
tools?: string[], // Optional. Tool keys from list_tools
|
|
19274
|
-
subAgents: string[], // Required. IDs of sub-agents in the pipeline
|
|
19275
|
-
internalSubAgents?: AgentConfig[], // Optional. Inline sub-agent configs
|
|
19276
|
-
middleware?: MiddlewareConfig[], // Optional. Additional middleware (topology is auto-added)
|
|
19277
|
-
modelKey?: string, // Optional. Model to use
|
|
19278
|
-
}
|
|
19279
|
-
\`\`\`
|
|
19280
|
-
|
|
19281
|
-
### create_processing_agent (PROCESSING)
|
|
19282
|
-
|
|
19283
|
-
Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist.
|
|
19277
|
+
Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents must already exist (created as **deep_agent** type).
|
|
19284
19278
|
|
|
19285
19279
|
\`\`\`typescript
|
|
19286
19280
|
{
|
|
@@ -19292,6 +19286,7 @@ Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents
|
|
|
19292
19286
|
to: string, // Sub-agent ID to delegate to
|
|
19293
19287
|
purpose: string, // Business purpose \u2014 what this step accomplishes
|
|
19294
19288
|
}],
|
|
19289
|
+
tools?: string[], // Optional. Tool keys from list_tools
|
|
19295
19290
|
subAgents: string[], // Required. IDs of sub-agents in the pipeline
|
|
19296
19291
|
internalSubAgents?: AgentConfig[], // Optional. Inline sub-agent configs
|
|
19297
19292
|
middleware?: MiddlewareConfig[], // Optional. Additional middleware (topology is auto-added)
|
|
@@ -19422,15 +19417,31 @@ Provides: \`read_topo_progress\` \u2014 enforces multi-agent workflow topology.
|
|
|
19422
19417
|
|
|
19423
19418
|
| Agent Role | Recommended Middleware |
|
|
19424
19419
|
|-----------|----------------------|
|
|
19425
|
-
| Code assistant |
|
|
19426
|
-
| Data analyst |
|
|
19427
|
-
| Web researcher | browser,
|
|
19420
|
+
| Code assistant | code_eval, widget |
|
|
19421
|
+
| Data analyst | sql, code_eval, widget |
|
|
19422
|
+
| Web researcher | browser, widget |
|
|
19428
19423
|
| Operations / SRE | metrics, sql, widget |
|
|
19429
19424
|
| Process orchestrator | skill, date, scheduler, widget |
|
|
19430
|
-
| General assistant |
|
|
19431
|
-
| Approval-gated operations | ask_user_to_clarify,
|
|
19425
|
+
| General assistant | date, widget |
|
|
19426
|
+
| Approval-gated operations | ask_user_to_clarify, widget |
|
|
19432
19427
|
| Interactive Q&A | ask_user_to_clarify, date, widget |
|
|
19433
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
|
+
|
|
19434
19445
|
### update_processing_agent
|
|
19435
19446
|
|
|
19436
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.
|