@axiom-lattice/core 2.1.63 → 2.1.64
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.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +77 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -11883,7 +11883,11 @@ var Agent = class {
|
|
|
11883
11883
|
yield chunk;
|
|
11884
11884
|
}
|
|
11885
11885
|
} catch (error) {
|
|
11886
|
-
|
|
11886
|
+
if (error?.message === "Thread aborted") {
|
|
11887
|
+
console.debug("Resume stream interrupted: thread aborted");
|
|
11888
|
+
} else {
|
|
11889
|
+
console.error("Resume stream error:", error);
|
|
11890
|
+
}
|
|
11887
11891
|
throw error;
|
|
11888
11892
|
}
|
|
11889
11893
|
}
|
|
@@ -18584,15 +18588,76 @@ Use this when the task follows a standard BPO (Business Process Orchestration) p
|
|
|
18584
18588
|
|
|
18585
18589
|
**Step 4: Design the orchestrator.** Responsibility, system prompt, topology edges, sub-agent list.
|
|
18586
18590
|
|
|
18587
|
-
**Step 5: Self-review checklist.** Before presenting to the user, verify:
|
|
18588
|
-
- Completeness (every stage covered by an edge?)
|
|
18589
|
-
- Purposes clear (each edge's business intent?)
|
|
18590
|
-
- Order correct (serial chain logical?)
|
|
18591
|
-
- Edge cases (invalid input, failure, timeout?)
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18591
|
+
**Step 5: Self-review checklist.** Before presenting to the user, verify:
|
|
18592
|
+
- Completeness (every stage covered by an edge?)
|
|
18593
|
+
- Purposes clear (each edge's business intent?)
|
|
18594
|
+
- Order correct (serial chain logical?)
|
|
18595
|
+
- Edge cases (invalid input, failure, timeout?)
|
|
18596
|
+
|
|
18597
|
+
**Step 6: Write the workflow description (Spec).** After designing the topology and sub-agents, compose a comprehensive **\`description\`** for the orchestrator. This description serves as the workflow's specification \u2014 anyone reading it should understand exactly what this workflow does without needing to inspect individual sub-agent configs.
|
|
18598
|
+
|
|
18599
|
+
The description MUST include ALL of the following:
|
|
18600
|
+
|
|
18601
|
+
| Section | Content |
|
|
18602
|
+
|---------|---------|
|
|
18603
|
+
| **Overview** | One-sentence summary of the workflow's purpose and business value |
|
|
18604
|
+
| **Steps** | Numbered list of each stage in the pipeline. For each step: which sub-agent handles it, what it does, what tools it uses, and what it produces (output) |
|
|
18605
|
+
| **Data Flow** | How data moves between steps. What does each step receive as input? What does it produce and pass to the next step? |
|
|
18606
|
+
| **Logic & Conditions** | Any conditional branching, decision points, retry logic, or exception handling. When does the workflow take path A vs path B? What happens on failure? |
|
|
18607
|
+
| **Tools Used** | Summary table or list of all tools used across sub-agents, grouped by sub-agent |
|
|
18608
|
+
| **Expected Input** | What input does the workflow expect from the user? (format, examples) |
|
|
18609
|
+
| **Expected Output** | What does the workflow produce at the end? (format, examples) |
|
|
18610
|
+
|
|
18611
|
+
**Formatting rules:**
|
|
18612
|
+
- Write in **Chinese** if the user communicates in Chinese; otherwise English
|
|
18613
|
+
- Use **Markdown** for formatting (headings, lists, tables, code blocks)
|
|
18614
|
+
- Be detailed but concise \u2014 each section should be 1-5 lines
|
|
18615
|
+
- Avoid placeholder text like "TODO" or "TBD"
|
|
18616
|
+
|
|
18617
|
+
**Example structure:**
|
|
18618
|
+
|
|
18619
|
+
\`\`\`markdown
|
|
18620
|
+
## Overview
|
|
18621
|
+
\u672C\u5DE5\u4F5C\u6D41\u81EA\u52A8\u4ECE\u591A\u4E2A\u6570\u636E\u6E90\u91C7\u96C6\u7ADE\u54C1\u4EF7\u683C\uFF0C\u751F\u6210\u5BF9\u6BD4\u5206\u6790\u62A5\u544A\u5E76\u63A8\u9001\u901A\u77E5\u3002
|
|
18622
|
+
|
|
18623
|
+
## Steps
|
|
18624
|
+
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
|
|
18625
|
+
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
|
|
18626
|
+
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
|
|
18627
|
+
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
|
|
18628
|
+
|
|
18629
|
+
## Data Flow
|
|
18630
|
+
\`\u7528\u6237\u8F93\u5165(URL\u5217\u8868 + \u65E5\u671F\u8303\u56F4)\` \u2192 data-collector \u722C\u53D6+\u67E5\u8BE2 \u2192 \u539F\u59CBJSON \u2192 data-cleaner \u6E05\u6D17\u8F6C\u6362 \u2192 \u6807\u51C6\u5316JSON \u2192 report-generator \u5206\u6790\u751F\u6210 \u2192 \u62A5\u544AMarkdown \u2192 notifier \u63A8\u9001
|
|
18631
|
+
|
|
18632
|
+
## Logic & Conditions
|
|
18633
|
+
- data-collector \u722C\u53D6\u5931\u8D25\u65F6\u91CD\u8BD5\u6700\u591A3\u6B21\uFF0C\u95F4\u969430\u79D2
|
|
18634
|
+
- \u82E5\u67D0\u4E00\u5546\u54C1\u4EF7\u683C\u7F3A\u5931\u8D85\u8FC77\u5929\uFF0C\u6807\u8BB0\u4E3A\u300C\u6570\u636E\u4E0D\u5168\u300D\u5E76\u5728\u62A5\u544A\u4E2D\u9AD8\u4EAE
|
|
18635
|
+
- report-generator \u8BA1\u7B97\u6DA8\u5E45\u8D85\u8FC720%\u65F6\u81EA\u52A8\u6807\u8BB0\u300C\u5F02\u5E38\u6CE2\u52A8\u300D\u8B66\u544A
|
|
18636
|
+
- \u4EFB\u4F55\u6B65\u9AA4\u5931\u8D25\u65F6\uFF0Cworkflow \u505C\u6B62\u5E76\u5C06\u9519\u8BEF\u4FE1\u606F\u8F93\u51FA\u5230\u6700\u7EC8\u62A5\u544A
|
|
18637
|
+
|
|
18638
|
+
## Tools Used
|
|
18639
|
+
| \u5B50Agent | \u5DE5\u5177 |
|
|
18640
|
+
|---------|------|
|
|
18641
|
+
| data-collector | browser, metrics |
|
|
18642
|
+
| data-cleaner | code_eval, filesystem |
|
|
18643
|
+
| report-generator | code_eval, filesystem |
|
|
18644
|
+
| notifier | scheduler, ask_user_to_clarify |
|
|
18645
|
+
|
|
18646
|
+
## Expected Input
|
|
18647
|
+
- \u7ADE\u54C1URL\u5217\u8868\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09
|
|
18648
|
+
- \u65E5\u671F\u8303\u56F4\uFF08\u8D77\u59CB-\u7ED3\u675F\uFF0C\u683C\u5F0F YYYY-MM-DD\uFF09
|
|
18649
|
+
- \u63A8\u9001\u6E20\u9053\u9009\u62E9\uFF08\u90AE\u4EF6/\u9489\u9489/\u4F01\u4E1A\u5FAE\u4FE1\uFF09
|
|
18650
|
+
|
|
18651
|
+
## Expected Output
|
|
18652
|
+
- Markdown \u683C\u5F0F\u5BF9\u6BD4\u62A5\u544A\uFF0C\u5305\u542B\u4EF7\u683C\u8D8B\u52BF\u56FE\u3001\u6DA8\u8DCC\u5E45\u3001\u5F02\u5E38\u6807\u8BB0
|
|
18653
|
+
- \u62A5\u544A\u6587\u4EF6\u8DEF\u5F84\u53CA\u63A8\u9001\u72B6\u6001\u786E\u8BA4
|
|
18654
|
+
\`\`\`
|
|
18655
|
+
|
|
18656
|
+
**The description field is the single source of truth for the workflow.** When the user clicks the info icon on the workflow in the automation view, they will see this description rendered as a Popover. It must be comprehensive enough to stand alone as a spec document.
|
|
18657
|
+
|
|
18658
|
+
### Phase 2: Confirm
|
|
18659
|
+
|
|
18660
|
+
Present the full design: topology diagram, all sub-agent configs, orchestrator config, AND the workflow description (spec). **Ask for explicit approval:** "Ready to build? I'll create {N} sub-agents, then the orchestrator. Proceed?" **Do NOT build until the user confirms.**
|
|
18596
18661
|
|
|
18597
18662
|
### Phase 3: Build
|
|
18598
18663
|
|
|
@@ -18711,7 +18776,7 @@ Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents
|
|
|
18711
18776
|
\`\`\`typescript
|
|
18712
18777
|
{
|
|
18713
18778
|
name: string, // Required. Display name for the orchestrator
|
|
18714
|
-
description?: string, //
|
|
18779
|
+
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.
|
|
18715
18780
|
prompt: string, // Required. System prompt \u2014 how to route through the topology
|
|
18716
18781
|
edges: [{ // Required. At least 1 edge defining the workflow
|
|
18717
18782
|
from: string, // Orchestrator's ID (use placeholder name; tool auto-replaces)
|
|
@@ -18733,7 +18798,7 @@ Creates a PROCESSING agent with a business-defined workflow topology. Sub-agents
|
|
|
18733
18798
|
\`\`\`typescript
|
|
18734
18799
|
{
|
|
18735
18800
|
name: string, // Required. Display name for the orchestrator
|
|
18736
|
-
description?: string, //
|
|
18801
|
+
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.
|
|
18737
18802
|
prompt: string, // Required. System prompt \u2014 how to route through the topology
|
|
18738
18803
|
edges: [{ // Required. At least 1 edge defining the serial workflow chain
|
|
18739
18804
|
from: string, // Source agent ID. First edge: use orchestrator name as placeholder (tool auto-replaces). Subsequent edges: previous sub-agent ID
|