@arrislink/axon 1.0.3 โ†’ 1.0.4

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/README.md CHANGED
@@ -195,29 +195,37 @@ safety:
195
195
 
196
196
  ## ๐Ÿ—๏ธ Architecture
197
197
 
198
+ Axon is built on a modular architecture that separates requirement definition, task planning, and agentic execution.
199
+
200
+ ```mermaid
201
+ graph TD
202
+ User([User CLI]) --> Commands[Axon Commands: init, spec, plan, work]
203
+
204
+ subgraph "Axon Engine"
205
+ Commands --> Spec[OpenSpec Manager]
206
+ Spec --> Beads[Beads Engine: Graph Gen & Execution]
207
+ Beads --> Skills[Skills Library: Matching & Injection]
208
+ Skills --> Orch[Agent Orchestrator]
209
+ end
210
+
211
+ subgraph "LLM Layer"
212
+ Orch --> LLMInt[Unified LLM Interface]
213
+ LLMInt --> OMO[OhMyOpenCode Registry]
214
+ OMO --> Providers[Providers: Anthropic, OpenAI, Antigrav, etc.]
215
+ end
198
216
  ```
199
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
200
- โ”‚ Axon (Orchestration Layer) โ”‚
201
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
202
- โ”‚ โ”‚ init โ”‚ spec โ”‚ plan โ”‚ work โ”‚ โ”‚
203
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
204
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
205
- โ†“
206
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
207
- โ”‚ Unified LLM Interface (LLMClient) โ”‚
208
- โ”‚ Auto-detects and uses OMO Provider System โ”‚
209
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
210
- โ†“
211
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
212
- โ”‚ OhMyOpenCode Provider System (Optional) โ”‚
213
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
214
- โ”‚ โ”‚Anthropic โ”‚Antigrav โ”‚ OpenAI โ”‚ Google โ”‚ โ”‚
215
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
216
- โ”‚ โ€ข Unified config (~/.omo/providers.yaml) โ”‚
217
- โ”‚ โ€ข Auto failover โ”‚
218
- โ”‚ โ€ข Cost optimization โ”‚
219
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
220
- ```
217
+
218
+ ### Core Components:
219
+
220
+ 1. **OpenSpec Manager**: Parses and manages the specification (`.openspec/spec.md`). It ensures the AI always has a "Source of Truth" for requirements.
221
+ 2. **Beads Engine**:
222
+ * **Planning**: Converts specifications into a Directed Acyclic Graph (DAG) of atomic tasks.
223
+ * **Execution**: Manages task dependencies, state persistence (`graph.json`), and sequential execution.
224
+ 3. **Skills Library**: A repository of reusable code patterns. It automatically matches relevant skills to tasks and injects them into the agent's context.
225
+ 4. **Agent Orchestrator**: Coordinates specialized AI agents (like the general-purpose "Sisyphus") to execute specific beads.
226
+ 5. **Unified LLM Interface**: A vendor-neutral abstraction layer that integrates with **OhMyOpenCode** to provide multi-provider failover and consistent API access.
227
+
228
+ ---
221
229
 
222
230
  ## ๐Ÿงช Development
223
231
 
package/README.zh-CN.md CHANGED
@@ -193,31 +193,39 @@ safety:
193
193
  auto_pause_on_error: true
194
194
  ```
195
195
 
196
- ## ๐Ÿ—๏ธ ๆžถๆž„
196
+ ## ๐Ÿ—๏ธ ๆžถๆž„่ฎพ่ฎก
197
197
 
198
+ Axon ๅŸบไบŽๆจกๅ—ๅŒ–ๆžถๆž„ๆž„ๅปบ๏ผŒๅฐ†้œ€ๆฑ‚ๅฎšไน‰ใ€ไปปๅŠก่ง„ๅˆ’ๅ’Œไปฃ็†ๆ‰ง่กŒๆธ…ๆ™ฐๅˆ†็ฆปใ€‚
199
+
200
+ ```mermaid
201
+ graph TD
202
+ User([็”จๆˆท CLI]) --> Commands[Axon ๅ‘ฝไปค: init, spec, plan, work]
203
+
204
+ subgraph "Axon ๆ ธๅฟƒๅผ•ๆ“Ž"
205
+ Commands --> Spec[OpenSpec ็ฎก็†ๅ™จ]
206
+ Spec --> Beads[Beads ๅผ•ๆ“Ž: ๅ›พ็”ŸๆˆไธŽๆ‰ง่กŒ]
207
+ Beads --> Skills[ๆŠ€่ƒฝๅบ“: ๅŒน้…ไธŽๆณจๅ…ฅ]
208
+ Skills --> Orch[ไปปๅŠก็ผ–ๆŽ’ๅ™จ]
209
+ end
210
+
211
+ subgraph "LLM ๅฑ‚"
212
+ Orch --> LLMInt[็ปŸไธ€ LLM ๆŽฅๅฃ]
213
+ LLMInt --> OMO[OhMyOpenCode ๆณจๅ†Œ่กจ]
214
+ OMO --> Providers[ๅนณๅฐ: Anthropic, OpenAI, Antigrav ็ญ‰]
215
+ end
198
216
  ```
199
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
200
- โ”‚ Axon (็ผ–ๆŽ’ๅฑ‚) โ”‚
201
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
202
- โ”‚ โ”‚ init โ”‚ spec โ”‚ plan โ”‚ work โ”‚ โ”‚
203
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
204
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
205
- โ†“
206
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
207
- โ”‚ ็ปŸไธ€ LLM ๆŽฅๅฃ (LLMClient) โ”‚
208
- โ”‚ ่‡ชๅŠจๆฃ€ๆต‹ๅนถไฝฟ็”จ OMO Provider ็ณป็ปŸ โ”‚
209
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
210
- โ†“
211
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
212
- โ”‚ OhMyOpenCode Provider ็ณป็ปŸ (ๅฏ้€‰) โ”‚
213
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
214
- โ”‚ โ”‚Anthropic โ”‚Antigrav โ”‚ OpenAI โ”‚ Google โ”‚ โ”‚
215
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
216
- โ”‚ โ€ข ็ปŸไธ€้…็ฝฎ (~/.omo/providers.yaml) โ”‚
217
- โ”‚ โ€ข ่‡ชๅŠจ failover โ”‚
218
- โ”‚ โ€ข ๆˆๆœฌไผ˜ๅŒ– โ”‚
219
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
220
- ```
217
+
218
+ ### ๆ ธๅฟƒ็ป„ไปถ่ฏดๆ˜Ž๏ผš
219
+
220
+ 1. **OpenSpec ็ฎก็†ๅ™จ**: ่งฃๆžๅนถ็ฎก็†่ง„ๆ ผ่ฏดๆ˜Ž (`.openspec/spec.md`)๏ผŒ็กฎไฟ AI ๅง‹็ปˆๆ‹ฅๆœ‰้œ€ๆฑ‚็š„โ€œๅ•ไธ€็œŸ็†ๆฅๆบโ€ใ€‚
221
+ 2. **Beads ๅผ•ๆ“Ž**:
222
+ * **่ง„ๅˆ’ (Planning)**: ๅฐ†่ง„ๆ ผ่ฏดๆ˜Ž่ฝฌๆขไธบ็”ฑๅŽŸๅญไปปๅŠก็ป„ๆˆ็š„ๆœ‰ๅ‘ๆ— ็Žฏๅ›พ (DAG)ใ€‚
223
+ * **ๆ‰ง่กŒ (Execution)**: ็ฎก็†ไปปๅŠกไพ่ต–ใ€็Šถๆ€ๆŒไน…ๅŒ– (`graph.json`) ไปฅๅŠ้กบๅบๆ‰ง่กŒๆต็จ‹ใ€‚
224
+ 3. **ๆŠ€่ƒฝๅบ“ (Skills Library)**: ๅฏๅค็”จไปฃ็ ๆจกๅผ็š„ไป“ๅบ“ใ€‚็ณป็ปŸไผš่‡ชๅŠจๅŒน้…็›ธๅ…ณๆŠ€่ƒฝๅนถๅฐ†ๅ…ถๆณจๅ…ฅๅˆฐ AI ๆ™บ่ƒฝไฝ“็š„ไธŠไธ‹ๆ–‡ไธญใ€‚
225
+ 4. **ไปปๅŠก็ผ–ๆŽ’ๅ™จ (Agent Orchestrator)**: ๅ่ฐƒไธ“้—จ็š„ AI ไปฃ็†๏ผˆๅฆ‚้€š็”จๅž‹็š„ "Sisyphus"๏ผ‰ๆฅๆ‰ง่กŒๅ…ทไฝ“็š„ไปปๅŠก็ ๅญใ€‚
226
+ 5. **็ปŸไธ€ LLM ๆŽฅๅฃ**: ๅŽ‚ๅ•†ไธญ็ซ‹็š„ๆŠฝ่ฑกๅฑ‚ใ€‚ๅฎƒ้›†ๆˆไบ† **OhMyOpenCode**๏ผŒๆไพ›ๅคšไพ›ๅบ”ๅ•†ๆ•…้šœ่ฝฌ็งปๅ’Œไธ€่‡ด็š„ API ่ฎฟ้—ฎใ€‚
227
+
228
+ ---
221
229
 
222
230
  ## ๐Ÿงช ๅผ€ๅ‘
223
231
 
package/dist/index.js CHANGED
@@ -16471,10 +16471,19 @@ class OpenCodeLLMClient {
16471
16471
  continue;
16472
16472
  try {
16473
16473
  const event = JSON.parse(line);
16474
+ if (event.type === "config" && event.part?.model) {
16475
+ metadata.model = event.part.model;
16476
+ } else if (event.model && metadata.model === "unknown") {
16477
+ metadata.model = event.model;
16478
+ }
16474
16479
  if (event.type === "text" && event.part?.text) {
16475
16480
  const text = event.part.text;
16476
16481
  fullResponse += text;
16477
16482
  yield text;
16483
+ } else if (event.type === "content" && event.part?.content) {
16484
+ const text = event.part.content;
16485
+ fullResponse += text;
16486
+ yield text;
16478
16487
  } else if (event.type === "step_finish") {
16479
16488
  if (event.part?.snapshot) {}
16480
16489
  if (event.part?.tokens) {
@@ -16888,11 +16897,20 @@ class SpecGenerator {
16888
16897
  7. \u67B6\u6784\u51B3\u7B56\u8BB0\u5F55 (ADR)
16889
16898
 
16890
16899
  \u786E\u4FDD\u6587\u6863\u6E05\u6670\u3001\u53EF\u6267\u884C\uFF0C\u4FBF\u4E8E\u540E\u7EED\u4EFB\u52A1\u62C6\u89E3\u3002`;
16891
- const response = await this.llm.chat([{ role: "user", content: prompt }], {
16892
- temperature: 0.7,
16893
- maxTokens: 4000
16894
- });
16895
- return response.content;
16900
+ try {
16901
+ const response = await this.llm.chat([{ role: "user", content: prompt }], {
16902
+ temperature: 0.7,
16903
+ maxTokens: 4000
16904
+ });
16905
+ if (response.content && response.content.trim().length > 100) {
16906
+ return response.content;
16907
+ }
16908
+ console.warn("\u26A0\uFE0F AI \u751F\u6210\u5185\u5BB9\u8FC7\u77ED\u6216\u4E3A\u7A7A\uFF0C\u5C06\u4F7F\u7528\u6A21\u677F\u751F\u6210\u4F5C\u4E3A\u56DE\u9000\u3002");
16909
+ return this.generateFromTemplate(collected);
16910
+ } catch (error) {
16911
+ console.warn(`\u26A0\uFE0F AI \u751F\u6210\u5931\u8D25: ${error.message}\u3002\u5C06\u4F7F\u7528\u6A21\u677F\u751F\u6210\u4F5C\u4E3A\u56DE\u9000\u3002`);
16912
+ return this.generateFromTemplate(collected);
16913
+ }
16896
16914
  }
16897
16915
  generateFromTemplate(collected) {
16898
16916
  const techStackNames = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrislink/axon",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "AI-Powered Development Operating System with unified LLM provider support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",