agency-orchestrator 0.7.1 → 0.7.2

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.
Files changed (52) hide show
  1. package/README.en.md +11 -11
  2. package/README.md +13 -13
  3. package/package.json +2 -2
  4. package/web/DESIGN-SPEC.md +2 -2
  5. package/web/demo.html +3 -3
  6. package/website/dist/assets/Changelog-DNlKP4iX.js +8 -0
  7. package/website/dist/assets/{Docs-jVtdnV1V.js → Docs-9NP2H3s0.js} +8 -8
  8. package/website/dist/assets/{Experts-DvHdUTkA.js → Experts-DMJdDpIe.js} +1 -1
  9. package/website/dist/assets/{Home-CuKSAhhs.js → Home-DM7EoF7S.js} +1 -1
  10. package/website/dist/assets/{Markdown-CzvoTEon.js → Markdown-DCC1nLQ-.js} +1 -1
  11. package/website/dist/assets/{NotFound-XjyDV2Ze.js → NotFound-CiLdwJb3.js} +1 -1
  12. package/website/dist/assets/{SiteFooter-BbchjdS_.js → SiteFooter-CLIQXwew.js} +1 -1
  13. package/website/dist/assets/{Sponsors-CasRYU6K.js → Sponsors-DlgFN3VG.js} +1 -1
  14. package/website/dist/assets/{Studio-DEa4VUlD.js → Studio-B3XF__Yk.js} +1 -1
  15. package/website/dist/assets/{TutorialDetail-DGg0aUda.js → TutorialDetail-Dn5rhB6f.js} +1 -1
  16. package/website/dist/assets/{Tutorials-fyZkMhyj.js → Tutorials-CeNhvIuG.js} +1 -1
  17. package/website/dist/assets/{arrow-left-r7YlEG0F.js → arrow-left-ENwUQ2i7.js} +1 -1
  18. package/website/dist/assets/{arrow-up-right-S_2KPGsV.js → arrow-up-right-Cn4ATaZ1.js} +1 -1
  19. package/website/dist/assets/{badge-6Gfwsh0d.js → badge-B-L-y5fx.js} +1 -1
  20. package/website/dist/assets/{clock-D8PeqKFu.js → clock-BiHXhE37.js} +1 -1
  21. package/website/dist/assets/{copy-DM6PG3IG.js → copy-CQZ5TzmV.js} +1 -1
  22. package/website/dist/assets/{copy-button-D_k68ABR.js → copy-button-Dr9lRjiI.js} +1 -1
  23. package/website/dist/assets/experts-Bv953aOf.js +1 -0
  24. package/website/dist/assets/{index-BcVZ_Mpj.js → index-DQ2cHvK5.js} +4 -4
  25. package/website/dist/assets/{mail-Ku2rHYYH.js → mail-M21ADvXM.js} +1 -1
  26. package/website/dist/assets/{search-B5qDUIZ_.js → search-BRTjF9qD.js} +1 -1
  27. package/website/dist/assets/{sparkles-DgA7sBsL.js → sparkles-P5rh_tw-.js} +1 -1
  28. package/website/dist/assets/{sponsors-CoYiygYC.js → sponsors-B9KhG2hW.js} +1 -1
  29. package/website/dist/assets/{tutorials-DGsg9mxy.js → tutorials-CqF_e3yL.js} +2 -2
  30. package/website/dist/assets/{users-D8WHA_Pp.js → users-D3-N7gU0.js} +1 -1
  31. package/website/dist/index.html +3 -3
  32. package/website/dist/prompts/zh/academic/academic-study-planner.md +48 -0
  33. package/website/dist/prompts/zh/engineering/engineering-mechanical-design-engineer.md +304 -0
  34. package/website/dist/prompts/zh/engineering/engineering-pc-host-engineer.md +224 -0
  35. package/website/dist/prompts/zh/marketing/marketing-ai-citation-strategist.md +105 -105
  36. package/website/dist/prompts/zh/marketing/marketing-daily-news-briefing.md +296 -0
  37. package/website/dist/prompts/zh/paid-media/paid-media-auditor.md +11 -1
  38. package/website/dist/prompts/zh/paid-media/paid-media-creative-strategist.md +11 -1
  39. package/website/dist/prompts/zh/paid-media/paid-media-paid-social-strategist.md +11 -1
  40. package/website/dist/prompts/zh/paid-media/paid-media-ppc-strategist.md +11 -1
  41. package/website/dist/prompts/zh/paid-media/paid-media-programmatic-buyer.md +11 -1
  42. package/website/dist/prompts/zh/paid-media/paid-media-search-query-analyst.md +11 -1
  43. package/website/dist/prompts/zh/paid-media/paid-media-tracking-specialist.md +11 -1
  44. package/website/dist/prompts/zh/sales/sales-deal-strategist.md +12 -2
  45. package/website/dist/prompts/zh/sales/sales-discovery-coach.md +9 -1
  46. package/website/dist/prompts/zh/sales/sales-engineer.md +11 -1
  47. package/website/dist/prompts/zh/sales/sales-outbound-strategist.md +9 -1
  48. package/website/dist/prompts/zh/specialized/livestock-archive-auditor.md +128 -0
  49. package/website/dist/prompts/zh/supply-chain/supply-chain-garment-factory-planning-engineer.md +255 -0
  50. package/website/dist/assets/Changelog-DN5992Xt.js +0 -8
  51. package/website/dist/assets/experts-BeKtg-h2.js +0 -1
  52. /package/website/dist/prompts/zh/{support/support-supply-chain-strategist.md → supply-chain/supply-chain-strategist.md} +0 -0
package/README.en.md CHANGED
@@ -9,9 +9,9 @@
9
9
  [![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)
10
10
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
11
11
 
12
- **One sentence → full plan · 211 expert AI roles · Zero-code YAML · 10 LLM providers · key supported (DeepSeek recommended), plus 7 key-free options**
12
+ **One sentence → full plan · 216 expert AI roles · Zero-code YAML · 10 LLM providers · key supported (DeepSeek recommended), plus 7 key-free options**
13
13
 
14
- > **Note:** `ao compose --run` auto-detects your language. Both 211 Chinese roles and 170+ English roles ([agency-agents](https://github.com/msitarzewski/agency-agents), MIT) are **bundled in the npm package — no extra download needed**. **6 English workflow templates** are ready in `workflows/en/` — more coming in v0.6.
14
+ > **Note:** `ao compose --run` auto-detects your language. Both 216 Chinese roles and 184 English roles ([agency-agents](https://github.com/msitarzewski/agency-agents), MIT) are **bundled in the npm package — no extra download needed**. **6 English workflow templates** are ready in `workflows/en/` — more coming in v0.6.
15
15
 
16
16
  > 📖 [Full Tutorial](https://dev.to/jnmetacode/agency-orchestrator-one-sentence-five-ai-agents-a-complete-plan-in-3-minutes-1ij6) — from install to real-world use in 10 minutes
17
17
 
@@ -66,7 +66,7 @@ ao compose "I'm a programmer looking to start a side hustle with AI content, tar
66
66
  ==================================================
67
67
  ```
68
68
 
69
- **No code. No config. No role selection.** One sentence → AI auto-decomposes the task → matches roles from 211 experts → executes as DAG → outputs a complete plan.
69
+ **No code. No config. No role selection.** One sentence → AI auto-decomposes the task → matches roles from 216 experts → executes as DAG → outputs a complete plan.
70
70
 
71
71
  ### What Can You Build
72
72
 
@@ -91,7 +91,7 @@ Chatting with one AI gives you one perspective. But any real decision needs prod
91
91
 
92
92
  | | ChatGPT / Claude | CrewAI / LangGraph | **Agency Orchestrator** |
93
93
  |---|--------|-----------|---------------------|
94
- | Roles | 1 generalist | Write your own | **211 expert roles** |
94
+ | Roles | 1 generalist | Write your own | **216 expert roles** |
95
95
  | Usage | Chat | Write Python | **One sentence / YAML** |
96
96
  | API key | — | Required | **Key supported; 7 key-free options too** |
97
97
  | Dependencies | — | pip + dozens of packages | **npm + 2 deps** |
@@ -254,8 +254,8 @@ OPENAI_API_KEY=your-key
254
254
 
255
255
  ```bash
256
256
  ao demo # Zero-config multi-agent demo
257
- ao init # (Optional) Copy 211 Chinese roles locally for editing
258
- ao init --lang en # (Optional) Copy 170+ English roles locally for editing
257
+ ao init # (Optional) Copy 216 Chinese roles locally for editing
258
+ ao init --lang en # (Optional) Copy 184 English roles locally for editing
259
259
  ao init --workflow # Interactive workflow creator
260
260
  ao compose "description" # AI-powered workflow generation
261
261
  ao compose "description" --run # Generate AND execute in one command
@@ -286,7 +286,7 @@ ao compose "PR code review covering security and performance"
286
286
  ```
287
287
 
288
288
  The AI will:
289
- 1. Select matching roles from 211 available (e.g., Code Reviewer, Security Engineer, Performance Benchmarker)
289
+ 1. Select matching roles from 216 available (e.g., Code Reviewer, Security Engineer, Performance Benchmarker)
290
290
  2. Design the DAG (3-way parallel → summary)
291
291
  3. Generate complete YAML with variable passing and task descriptions
292
292
  4. Save to `workflows/` — ready to `ao run`
@@ -526,8 +526,8 @@ ao-output/product-review-2026-03-22/
526
526
  ## Ecosystem
527
527
 
528
528
  ```
529
- Your AI subscription ──→ agency-orchestrator ──→ 380+ expert roles collaborate ──→ quality output
530
- │ (211 Chinese + 170+ English)
529
+ Your AI subscription ──→ agency-orchestrator ──→ 400+ expert roles collaborate ──→ quality output
530
+ │ (216 Chinese + 184 English)
531
531
  ┌────────────────┼────────────────┐
532
532
  ▼ ▼ ▼
533
533
  14 AI Coding Tools CLI Mode MCP Server
@@ -537,8 +537,8 @@ Your AI subscription ──→ agency-orchestrator ──→ 380+ expert roles c
537
537
 
538
538
  | Project | Description |
539
539
  |---------|-------------|
540
- | [agency-agents](https://github.com/msitarzewski/agency-agents) | 170+ English AI role definitions by [@msitarzewski](https://github.com/msitarzewski) — the English role library for this engine |
541
- | [agency-agents-zh](https://github.com/jnMetaCode/agency-agents-zh) | 211 Chinese AI role definitions (Chinese) — the Chinese role library for this engine |
540
+ | [agency-agents](https://github.com/msitarzewski/agency-agents) | 184 English AI role definitions by [@msitarzewski](https://github.com/msitarzewski) — the English role library for this engine |
541
+ | [agency-agents-zh](https://github.com/jnMetaCode/agency-agents-zh) | 216 Chinese AI role definitions (Chinese) — the Chinese role library for this engine |
542
542
  | [ai-coding-guide](https://github.com/jnMetaCode/ai-coding-guide) | AI coding tools field guide (Chinese) — 66 Claude Code tips + 9 tools best practices |
543
543
  | [superpowers-zh](https://github.com/jnMetaCode/superpowers-zh) | AI coding superpowers (Chinese) — 20 skills for Claude Code / Cursor |
544
544
  | [shellward](https://github.com/jnMetaCode/shellward) | AI agent security middleware — prompt injection detection, DLP, command safety |
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  [![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)
10
10
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
11
11
 
12
- **一句话出结果 · 211 个专业 AI 角色 · YAML 零代码 · 10 种大模型 · 支持 key(推荐 DeepSeek),也有 7 种免 key 方式**
12
+ **一句话出结果 · 216 个专业 AI 角色 · YAML 零代码 · 10 种大模型 · 支持 key(推荐 DeepSeek),也有 7 种免 key 方式**
13
13
 
14
14
  > 📖 [完整上手教程](https://mp.weixin.qq.com/s/XcGbkMb6TM6NLQiL7ICwbw) — 从安装到实战,10 分钟上手
15
15
 
@@ -65,7 +65,7 @@ ao compose "我是一个程序员,想用AI做自媒体副业,目标月入2
65
65
  ==================================================
66
66
  ```
67
67
 
68
- **不用写代码,不用写配置,不用选角色。** 一句话 → AI 自动拆解任务 → 从 211 个角色中匹配 → 按 DAG 并行执行 → 输出完整方案。
68
+ **不用写代码,不用写配置,不用选角色。** 一句话 → AI 自动拆解任务 → 从 216 个角色中匹配 → 按 DAG 并行执行 → 输出完整方案。
69
69
 
70
70
  ### 你能用它做什么
71
71
 
@@ -90,12 +90,12 @@ ao compose "设计一个 SaaS 产品的定价策略" --run #
90
90
 
91
91
  | | ChatGPT / Claude | CrewAI / LangGraph | **Agency Orchestrator** |
92
92
  |---|--------|-----------|---------------------|
93
- | 角色数 | 1 个通用 | 自己写 | **211 个专业角色** |
93
+ | 角色数 | 1 个通用 | 自己写 | **216 个专业角色** |
94
94
  | 使用方式 | 对话 | 写 Python | **一句话 / YAML** |
95
95
  | API key | — | 必须 | **支持 key,也有 7 种免 key 方式** |
96
96
  | 依赖 | — | pip + 几十个包 | **npm + 2 个依赖** |
97
97
  | 并行 | — | 手动建图 | **DAG 自动检测** |
98
- | 中文角色 | — | 无 | **211 个** |
98
+ | 中文角色 | — | 无 | **216 个** |
99
99
  | 价格 | 订阅制 | 开源 + API 费 | **DeepSeek 甜区极低成本,亦可免 key 起步** |
100
100
 
101
101
  ## 3 步开始
@@ -263,8 +263,8 @@ OPENAI_API_KEY=你的key
263
263
 
264
264
  ```bash
265
265
  ao demo # 零配置体验多智能体协作
266
- ao init # (可选)复制 211 个中文角色到本地以便编辑
267
- ao init --lang en # (可选)复制 170+ 个英文角色到本地以便编辑
266
+ ao init # (可选)复制 216 个中文角色到本地以便编辑
267
+ ao init --lang en # (可选)复制 184 个英文角色到本地以便编辑
268
268
  ao init --workflow # 交互式创建工作流
269
269
  ao compose "一句话描述" # AI 智能编排工作流
270
270
  ao compose "一句话描述" --run # 编排并立即执行
@@ -289,14 +289,14 @@ ao serve # 启动 MCP Server(供 Claude Code / Cur
289
289
 
290
290
  ### AI 智能编排(Compose)
291
291
 
292
- 一句话描述需求,AI 自动从 211 个角色中选角色、设计 DAG、生成完整 workflow YAML:
292
+ 一句话描述需求,AI 自动从 216 个角色中选角色、设计 DAG、生成完整 workflow YAML:
293
293
 
294
294
  ```bash
295
295
  ao compose "PR 代码审查,要覆盖安全和性能"
296
296
  ```
297
297
 
298
298
  AI 会自动:
299
- 1. 从 211 角色中匹配出 Code Reviewer、Security Engineer、Performance Benchmarker
299
+ 1. 从 216 角色中匹配出 Code Reviewer、Security Engineer、Performance Benchmarker
300
300
  2. 设计 DAG(三路并行 → 汇总)
301
301
  3. 生成带 `depends_on`、变量串联的完整 YAML
302
302
  4. 保存到 `workflows/` — 直接 `ao run` 就能跑
@@ -505,8 +505,8 @@ ao-output/产品需求评审-2026-03-22/
505
505
  ## 生态与社区
506
506
 
507
507
  ```
508
- 你的 AI 会员 ──→ agency-orchestrator ──→ 380+ 个 AI 角色协作 ──→ 高质量输出
509
- │ (211 中文 + 170+ 英文)
508
+ 你的 AI 会员 ──→ agency-orchestrator ──→ 400+ 个 AI 角色协作 ──→ 高质量输出
509
+ │ (216 中文 + 184 英文)
510
510
  ┌────────────────┼────────────────┐
511
511
  ▼ ▼ ▼
512
512
  14 个 AI 编程工具 CLI 模式 MCP Server
@@ -516,9 +516,9 @@ ao-output/产品需求评审-2026-03-22/
516
516
 
517
517
  | 项目 | 定位 | 一句话 |
518
518
  |------|------|-------|
519
- | **本项目**(agency-orchestrator) | 🚀 编排引擎 | 一句话 → 211 专家协作,**几分钟出方案**(9 家 LLM / 6 免费) |
520
- | [agency-agents-zh](https://github.com/jnMetaCode/agency-agents-zh) ![](https://img.shields.io/github/stars/jnMetaCode/agency-agents-zh?style=flat&label=⭐) | 🎭 中文角色库 | 211 个**即插即用** AI 专家,含 46 中国原创(小红书 / 抖音 / 飞书 / 钉钉) |
521
- | [agency-agents](https://github.com/msitarzewski/agency-agents) | 🎭 英文角色库 | 170+ 个英文 AI 角色 by [@msitarzewski](https://github.com/msitarzewski) |
519
+ | **本项目**(agency-orchestrator) | 🚀 编排引擎 | 一句话 → 216 专家协作,**几分钟出方案**(10 家 LLM / 7 免费) |
520
+ | [agency-agents-zh](https://github.com/jnMetaCode/agency-agents-zh) ![](https://img.shields.io/github/stars/jnMetaCode/agency-agents-zh?style=flat&label=⭐) | 🎭 中文角色库 | 216 个**即插即用** AI 专家,含 50 中国原创(小红书 / 抖音 / 飞书 / 钉钉) |
521
+ | [agency-agents](https://github.com/msitarzewski/agency-agents) | 🎭 英文角色库 | 184 个英文 AI 角色 by [@msitarzewski](https://github.com/msitarzewski) |
522
522
  | [superpowers-zh](https://github.com/jnMetaCode/superpowers-zh) ![](https://img.shields.io/github/stars/jnMetaCode/superpowers-zh?style=flat&label=⭐) | 🧠 工作方法论 | 20 个 skills 教 AI 怎么干活(TDD / 调试 / 代码审查等) |
523
523
  | [ai-coding-guide](https://github.com/jnMetaCode/ai-coding-guide) | 📖 实战教程 | 66 个 Claude Code 技巧 + 9 款工具最佳实践 + 配置模板 |
524
524
  | [shellward](https://github.com/jnMetaCode/shellward) | 🛡️ 安全中间件 | 8 层防御 + DLP 数据流 + 注入检测,**零依赖**(含 MCP Server) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agency-orchestrator",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Multi-agent YAML workflow engine — 211 AI roles, auto DAG parallelism, zero code. One sentence → multiple AI roles collaborate → complete plan in minutes. 10 LLM providers, 7 need no API key.",
5
5
  "keywords": [
6
6
  "multi-agent",
@@ -89,7 +89,7 @@
89
89
  "dependencies": {
90
90
  "@anthropic-ai/sdk": "^0.52.0",
91
91
  "@modelcontextprotocol/sdk": "^1.28.0",
92
- "agency-agents-zh": "^1.1.0",
92
+ "agency-agents-zh": "^1.2.2",
93
93
  "js-yaml": "^4.1.0"
94
94
  },
95
95
  "devDependencies": {
@@ -20,7 +20,7 @@
20
20
  | GET | `/api/workflows` | 列出所有工作流(内置 + private),含 steps/inputs 元数据 |
21
21
  | GET | `/api/workflows/yaml?file=` | 返回指定工作流的 YAML 原文 |
22
22
  | POST | `/api/run` | 运行工作流(SSE 流式),支持 resume/fromStep |
23
- | GET | `/api/roles` | 列出所有角色(211 个),含分类/名称/描述/颜色 |
23
+ | GET | `/api/roles` | 列出所有角色(216 个),含分类/名称/描述/颜色 |
24
24
  | GET | `/api/roles/:category/:id` | 获取单个角色详情(含完整 system prompt) |
25
25
  | POST | `/api/run-role` | 单角色对话(SSE 流式),后端自动生成临时单步 workflow |
26
26
  | GET | `/api/runs` | 列出运行历史(从 ao-output/ 读取) |
@@ -147,7 +147,7 @@
147
147
  - 执行总结
148
148
  - 最终交付(Markdown 渲染的完整方案)
149
149
  - 速度控制:快(0.5x) / 正常(1x) / 慢(2x)
150
- - 底部特性展示:211+ 角色 / 10 种大模型 / DAG 自动并行 / Zero 代码
150
+ - 底部特性展示:216+ 角色 / 10 种大模型 / DAG 自动并行 / Zero 代码
151
151
 
152
152
  ---
153
153
 
package/web/demo.html CHANGED
@@ -364,7 +364,7 @@
364
364
  <span class="tag">v0.5.2</span>
365
365
  </div>
366
366
  <div style="color: var(--dim); font-size: 13px;">
367
- 211 中文 + 170 英文 AI 专家角色 · 10 种大模型 · 7 种免 API key
367
+ 216 中文 + 184 英文 AI 专家角色 · 10 种大模型 · 7 种免 API key
368
368
  </div>
369
369
  </header>
370
370
 
@@ -403,7 +403,7 @@
403
403
  </div>
404
404
 
405
405
  <div class="features">
406
- <div class="feat"><div class="k">211+</div><div class="v">即插即用的 AI 专家角色</div></div>
406
+ <div class="feat"><div class="k">216+</div><div class="v">即插即用的 AI 专家角色</div></div>
407
407
  <div class="feat"><div class="k">10</div><div class="v">种大模型(7 种免 API key)</div></div>
408
408
  <div class="feat"><div class="k">DAG</div><div class="v">自动检测并行,无需手工编排</div></div>
409
409
  <div class="feat"><div class="k">Zero</div><div class="v">代码 · 配置 · 角色选择</div></div>
@@ -829,7 +829,7 @@ async function startDemo() {
829
829
  const meta = document.createElement("div");
830
830
  meta.className = "meta";
831
831
  term.appendChild(meta);
832
- await typewriter(meta, ` 正在用 AI 编排工作流...(211 个角色可选)\n`, 8);
832
+ await typewriter(meta, ` 正在用 AI 编排工作流...(216 个角色可选)\n`, 8);
833
833
  await sleep(300);
834
834
 
835
835
  const info = document.createElement("div");
@@ -0,0 +1,8 @@
1
+ import{u as m,r as d,j as n}from"./vendor-react-DvXH3HTt.js";import{S as p}from"./SiteFooter-CLIQXwew.js";import{B as c}from"./badge-B-L-y5fx.js";import{M as u}from"./Markdown-DCC1nLQ-.js";import{c as h,u as x,S as g}from"./index-DQ2cHvK5.js";import{A as f}from"./arrow-up-right-Cn4ATaZ1.js";import"./vendor-radix-Bip5Pqfe.js";import"./vendor-charts-BiMa1Zmo.js";/**
2
+ * @license lucide-react v0.469.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const L=h("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]),v='# Changelog\n\n本项目采用 [语义化版本](https://semver.org/lang/zh-CN/)。\n\n## [Unreleased]\n\n## [0.7.2] - 2026-06-16\n\n### Changed\n- **角色库升级到 agency-agents-zh 1.2.2**:中文角色 **211 → 216**(新增服装厂排产工程师等;并带来 Hermes Windows 目录修复、Qoder 集成、ai-citation-strategist 中文化)。全站计数统一为 **216 中文 / 184 英文**(README / 官网 / 文档 / 教程 / About)。\n\n### Fixed\n- 官网专家库清理一个失效角色的孤儿提示词(`support-supply-chain-strategist`,1.2.x 已移除)。\n\n## [0.7.1] - 2026-06-16\n\n### Fixed\n- **嵌套角色现在可枚举 / 可用**:角色加载改为**递归**子目录,`game-development/unity/*`、`unreal-engine/*`、`roblox-studio/*`、`godot/*`、`blender/*` 等 15 个嵌套智能体此前无法被 `listAgents` / `ao roles` / compose 建议发现(loader 只扫一层)——现在补齐,中文库角色数与官方一致达到 **211**(英文库 184)。\n- **枚举只认真角色**:仅纳入带 `name:` frontmatter 的 `.md`,排除 `QUICKSTART` / `EXECUTIVE-BRIEF` 等攻略 / 模板文档(此前会被当成"角色"混入列表)。\n- **官网专家库补齐**:`gen-experts.mjs` 同步递归,专家浏览 / 复制提示词覆盖全部 211(zh)+ 184(en),不再漏掉游戏开发类嵌套专家。\n\n## [0.7.0] - 2026-06-16\n\n### Added\n- **网页 Studio + 桌面客户端**:本地 `ao web` 启动可视化 Studio(角色组队 / 工作流 / 运行历史 / 用量 / 密钥);同一套 UI 打包为 Electron 桌面客户端(macOS arm64+Intel · Windows · Linux),经 GitHub Actions 一键发布到 Releases,官网提供下载入口。key 只存本机。\n- **Studio / 官网全面双语化 + 英文资源**:UI、角色库、工作流模板按语言切换(`/en` 读英文 `agency-agents` 库与 `workflows-en/` 模板,不再混中文)。\n- **CompShare(优云智算)provider 内置**:OpenAI 兼容接入,填 key 即用(`COMPSHARE_API_KEY` / `COMPSHARE_BASE_URL`)。\n- **一键复制完整提示词**:Studio 专家详情与公开站「专家库」页都能查看 / 复制每位专家的完整系统提示词(公开站读静态 `experts.json` + `/prompts/*.md`)。\n- **公开站 `/studio` 演示模式**:无后端也能浏览全部专家、查看 / 复制提示词;填 key 与运行被引导到「安装客户端 / 本地运行」。\n- **`ao roles <关键词>` 角色搜索**:按 角色路径 / 名称 / 描述 不区分大小写过滤(也支持 `--search`);无匹配给友好提示。\n- **`ao init` 首跑向导**:角色库装好后自动探测可用 provider(优先免 key 的 claude-code CLI / Ollama),按环境给出个性化下一步,缩短「安装→价值」。\n- **评测回归门禁**:黄金任务集抽到 `eval/golden-tasks.ts`;新增 `eval/gate.ts` 与 `npm run eval:gate` / `eval:baseline`——胜率阈值 + judge 双向一致率阈值 + 基线快照回归判定,judge 太弱时判 INCONCLUSIVE(绝不当通过)。\n\n### Changed\n- **`ao compose` 幻觉角色确定性修复**:生成的工作流引用不存在的角色时,优先用最接近的**真实角色直接改写 YAML**(不再多花一次 LLM 调用、保证产物可运行),无可信匹配才回退 LLM;并在 LLM 重试后再做确定性兜底,堵住「重试后仍残留坏角色却被当成功」的缺口。\n- **打包内容**:npm 包额外纳入 `web/`、`website/dist/`、`workflows-en/`,`prepublishOnly` 自动构建引擎 + Studio。\n\n### Tests\n- 新增 `test/roles.ts`、`test/init.ts`、`test/eval-gate.ts` 并并入 `npm test`;`test/compose.ts` 覆盖确定性角色修复。\n\n## [0.6.17] - 2026-04-29\n\n### Added\n- 模板库扩充:5 个手写精调高质量 workflow,覆盖个人 / 中小团队高频场景\n - `tech-blog.yaml` — 技术博客创作(调研 → 大纲 → 正文 → 润色,4 步)\n - `meeting-notes.yaml` — 会议纪要整理(清理 → 决策/TODO/争议 三视角并行 → 整合,5 步)\n - `okr-decomposition.yaml` — OKR 拆解(现状分析 → 季度 KR → Q1 行动方案 → 完整文档,4 步)\n - `product-launch-comms.yaml` — 产品发布物料(统一定位 → 通稿 / 社交 / 邮件 三件套并行 → 物料包,5 步)\n - `pitch-deck-outline.yaml` — 创业 Pitch Deck 大纲(市场 / 方案 / 商业模式 / 财务 四角度并行 → 5 屏 deck,5 步)\n- 内置 workflow 总数从 44 个增加到 **49 个**,全部 validate 通过\n\n### Notes\n- 5 个模板都是"输入一句话 / 一段简介 → 多角度并行展开 → 整合"的纯 LLM 任务,不依赖外部数据 / 联网,零歧义\n- 每个模板的 task 描述都精确指定输出格式(markdown 模板)和约束(字数 / 结构 / 不许 AI 套话),避免 LLM 输出泛泛而谈\n- 默认 provider deepseek-chat(最便宜稳),用户可用 `--provider` 覆盖\n\n## [0.6.16] - 2026-04-29\n\n### Changed\n- **`ao demo` 重构:检测优先,去掉预录 mock**\n - 检测到可用 LLM(CLI / API key / Ollama)→ **直接真跑** story-creation 工作流,无需"先看 mock 再确认"\n - 没检测到 → 显示**真实 DAG 结构**(用 ao 自身的 `formatDAG`)+ 3 行行动指引(Claude Code / DeepSeek / Ollama 任选)\n - 删掉旧的 `MOCK_STEPS` 预录数据 + `replayMockSteps` 函数(共 ~150 行)。原 mock 内容是精修过的小说创作,让用户对真跑的输出期望被错误抬高,且占用 5 秒注意力后还要再问 y/n,链路过长\n - 体验路径从 "mock 5s → 选 provider → y/n → 真跑" 简化为 "检测 → 真跑" 或 "检测 → DAG + 配 key 指引"\n\n## [0.6.15] - 2026-04-27\n\n### Fixed\n- CLI provider(claude-code / gemini-cli / copilot-cli / codex-cli / openclaw-cli / hermes-cli)在"进程退出码 0 但 stdout 完全空"时,cli-base.ts 之前会默默返回空字符串给上层,导致 `ao compose` 报出迷惑性的"AI 生成的内容不是有效的 workflow YAML",真实根因被吞。现在直接 reject 并给出诊断 hint:可能是 CLI 命令格式过期(参考 issue #14 hermes 的 `chat -q` → `-z`)、agent / model 配置错、或需要先认证。错误消息附上"在终端直接跑一次该命令看真实输出"的具体调试建议\n\n### Tests\n- 新增 test/cli-base.ts:覆盖 4 类场景(exit 0 + 空输出 reject / 正常输出 / exit 非 0 + stderr / ENOENT 提示安装),全量从 135 项增加到 **139 项**\n\n## [0.6.14] - 2026-04-27\n\n### Fixed\n- **#16** DeepSeek 原生 connector 在某些用户环境下报 `405 Method Not Allowed`。根因:commit `f96d7b0` 让 deepseek case fallback 到 `OPENAI_BASE_URL` env,但用户先用 `ao init --provider openai --base-url https://api.openai.com/v1` 写入过 `OPENAI_BASE_URL` 后切到 deepseek,会用 OpenAI endpoint + DeepSeek key 调用,得到 405。修复:每个 provider 用自己专属的 BASE_URL env(deepseek → `DEEPSEEK_BASE_URL`,openai → `OPENAI_BASE_URL`),不再跨污染。`ao init` 也对应路由到正确 env\n\n### Tests\n- 修补一个发版 process 漏洞:`factory-custom.ts` / `step-llm.ts` / `step-llm-yaml.ts` / `stdin-limit.ts` / `compose-name.ts` 这 5 个测试文件之前**根本没在 `npm test` 里跑**(21 项 +1 项新加的测试都不被 CI 守护)。补进 test 脚本,全量从 114 项增加到 **135 项**\n- 新增 2 项 factory-custom 测试覆盖 #16:deepseek 不被 OPENAI_BASE_URL 污染 / DEEPSEEK_BASE_URL 自定义代理仍生效\n\n## [0.6.13] - 2026-04-27\n\n### Fixed\n- **回归修复**:0.6.12 新加的"output 唯一性校验"对两类合法的 ao 设计模式误报,导致 6 个内置 workflow 在 validate 时失败。现在校验放过两类例外:\n - **`any_completed` 分支收敛**:多个并行 step 产出同名 output,下游用 `depends_on_mode: any_completed` 引用,是有意的"任一分支完成即走"设计(如 incident-response.yaml 的多团队并行分析、hiring-pipeline.yaml 的多维度评估)\n - **loop 迭代覆盖**:种子 step 产生初始值 + loop step 反复覆盖同名 output,是常见的"原地修改"迭代模式(如 content-publish.yaml 的 write/revise 循环)\n- 修了 3 个内置 workflow 的拓扑反向引用:legal-consultation.yaml / investment-analysis.yaml / xiaohongshu-content.yaml 的相关 step 补 `depends_on`(不是新校验过严,是 yaml 本身设计就有缺陷,新校验把它们暴露出来)\n\n### Tests\n- 新增 2 项 parser 测试覆盖 any_completed / loop 迭代覆盖的合法重名例外\n- E2E 验证:44 个内置 workflow 现在全部通过 validate\n\n## [0.6.12] - 2026-04-27\n\n### Fixed\n- **#14** `hermes-cli` connector 用旧参数 `chat -q` 调用 hermes,新版 hermes 已废弃此用法、改为 `-z`(oneshot)。修正参数让 hermes provider 重新可用\n- `validateWorkflow` 之前只检查"变量是否在某处定义",不检查"是否在引用方的 DAG 上游"。一个 step 引用下游 step 的 output(拓扑反向)会通过校验,到 run 阶段才崩。现在校验阶段就拦下,错误提示明确指出"该变量由非上游 step 产出,需要把对应 step 加进 depends_on"。和 autoFix 的拓扑约束保持一致\n- `validateWorkflow` 加 `step.output` 唯一性检查。两个 step 不能 output 到同一个变量名(重名会让下游引用拿到的值依赖 context Map 写入顺序,不可预期)\n- `validateWorkflow` 的变量引用检查范围扩到 `step.condition` / `step.loop.exit_condition` / `step.prompt`。之前只看 `step.task`,让条件分支表达式里的未定义变量漏检\n\n### Tests\n- 新增 3 项 parser 测试覆盖:拓扑反向引用 / output 重名 / condition 字段里的未定义变量\n\n## [0.6.11] - 2026-04-27\n\n### Fixed\n- `repairWithLLM` 失败时静默吞错。LLM 调用因网络/认证/超时失败时不再悄悄返回,会在 stderr 给出失败原因,避免用户看到 "LLM 修复后仍有 X 个变量未解决" 误以为 LLM 修了但不够,实际是根本没调通\n\n### Tests\n- 新增 1 项测试覆盖跨 step 同名 bad var 的已知边界行为(全局 replace 只处理一次,靠 LLM repair 兜底)\n\n## [0.6.10] - 2026-04-27\n\n### Fixed\n- `ao compose --run` 生成的 YAML 中变量引用错误的修复链全面强化。原 `autoFixVariableRefs` 启发式有两个核心缺陷:\n - 模糊匹配在**全局 outputs** 范围内找替换目标,能把"早期 step 引用未来 step output"配上(DAG 拓扑反向),例如 `{{personal_assessment}}` 被错误地改成 `{{final_report}}`\n - 启发式覆盖不全时直接放弃,没有 LLM 兜底\n- 现在的修复链:\n - autoFix 加 **DAG 上游约束**:替换目标必须在当前 step 的 `depends_on` 递归闭包内的 step.output 集合里。指向下游或跨支的错改不再可能\n - autoFix 修不全时自动调 **LLM 二次修复**:把当前 YAML、未解决的变量列表、可用 inputs/outputs 喂给 LLM,让它选择改 task 引用 / 加 step output / 补 depends_on\n - `--run` 模式在 compose 阶段就检查"未定义变量 / 角色不存在 / 解析失败"等致命错误,不再放进 run 阶段才崩溃;abort 时给出清晰的"重新生成 / 手动修改"建议\n\n### Changed\n- compose system prompt(中英)加两条规则:(1) 每个 `{{X}}` 引用的 X 必须在 inputs 或上游 step.output 中;(2) merge / 汇总类 step 的 `depends_on` 必须列出所有产生引用变量的上游 step\n\n## [0.6.9] - 2026-04-24\n\n### Fixed\n- Windows 上 `ao run` / `ao compose` / `ao serve` 找不到包内置 / node_modules 下的 agents 目录,报 "agents 目录不存在"。根因:`new URL(import.meta.url).pathname` 在 Windows 上返回 `/C:/Users/...` 这种前导斜杠非法路径,`dirname` + `resolve` 后所有依赖 scriptDir 的候选路径全部失效。改用 `node:url` 的 `fileURLToPath` 跨平台 API 正确解析。Mac/Linux 行为不变\n\n## [0.6.8] - 2026-04-24\n\n### Changed\n- 超时重试递增的上限从 900s 提到 3600s(60 分钟)。原上限对 CLI / ollama 长任务偏紧:CLI 默认 600s 起跳第一次递增就封顶,用户 `--timeout 20m` 起点已超上限完全不递增。抬到 60min 后覆盖绝大多数真实长任务;仍然保留上限作为"防误配置放飞"的保险丝。真要超过 1 小时单步用 `timeout: 0` / `--timeout 0` 完全不限时\n\n## [0.6.7] - 2026-04-23\n\n### Added\n- `ao run` / `ao compose` 新增 `--timeout <value>` 参数。支持 `300000`(毫秒)、`300s`(秒)、`5m`(分钟)、`0`(不限时)。命令行优先级高于 YAML 里的 `llm.timeout`\n- 因超时触发重试时,下一次 timeout 自动 x1.5 递增(上限 900s,本版本后续被提到 3600s)。递增同时作用于 connector 内层 fetch/CLI timeout,避免内层 hard timeout 提前 abort\n\n### Changed\n- `ao compose` 生成的 YAML 默认 `timeout` 从 120000 抬到 300000(API 类 provider)。ollama 和 CLI 类保持 600000\n- `withTimeout` 错误消息加引导:"超时 (Xms),可用 --timeout 或 YAML llm.timeout 延长"\n\n### Fixed\n- `classifyError` 5xx / 429 状态码改用 `\\b` 单词边界匹配。原 `msg.includes(\'500\')` 等会把 "450000ms"、"1500ms"、"1429ms" 等字符串里的数字子串误判成 HTTP 错误,导致超时错误被错误归类为 server_error,递增逻辑失效\n- `classifyError` 现在识别中文"超时"字样。之前 `withTimeout` 抛出的 `超时 (120000ms)` 被归为 non_retryable,retry 根本不触发\n- `timeout: 0`(不限时)现在真正生效。原 `effectiveConfig.timeout || default` 把 0 当 falsy 用默认值覆盖了,改成 `!== undefined` 判断\n',y=/^##\s*\[([^\]]+)\]\s*(?:-\s*(.+))?$/;function k(s=v){const t=s.split(`
7
+ `),o=[];let e=null,a=[];const r=()=>{e&&(e.body=a.join(`
8
+ `).trim(),o.push(e))};for(const l of t){const i=l.match(y);i?(r(),e={version:i[1].trim(),date:(i[2]??"").trim(),body:""},a=[]):e&&a.push(l)}return r(),o}const A=k();function b(s){return`v${s.replace(/[^\w.-]/g,"-")}`}function j(){const{t:s}=x(),t=s.changelog,{hash:o}=m();return d.useEffect(()=>{if(!o)return;const e=document.getElementById(o.slice(1));e&&e.scrollIntoView({behavior:"smooth",block:"start"})},[o]),n.jsxs(n.Fragment,{children:[n.jsx("main",{className:"pt-24",children:n.jsxs("div",{className:"container-page max-w-3xl pb-20",children:[n.jsx("h1",{className:"text-3xl font-extrabold tracking-tight sm:text-4xl",children:t.title}),n.jsx("p",{className:"mt-3 text-muted-foreground",children:t.subtitle}),n.jsx("div",{className:"mt-10 space-y-5",children:A.map((e,a)=>{const r=b(e.version);return n.jsxs("section",{id:r,className:"scroll-mt-24 rounded-2xl border border-border/70 bg-card/60 p-6",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[n.jsxs("a",{href:`#${r}`,className:"inline-flex items-center gap-1.5 text-xl font-bold hover:text-primary",children:[n.jsx(L,{className:"size-4 text-primary"}),/^\d/.test(e.version)?`v${e.version}`:e.version]}),a===0&&n.jsx(c,{className:"border-primary/30 bg-primary/10 text-primary",children:t.latest}),e.date&&n.jsx("span",{className:"text-sm text-muted-foreground",children:e.date})]}),e.body&&n.jsx(u,{className:"mt-4",children:e.body})]},e.version)})}),n.jsxs("a",{href:g.changelog,target:"_blank",rel:"noreferrer",className:"mt-12 inline-flex items-center gap-1.5 rounded-xl border border-border/70 bg-card/60 px-4 py-3 text-sm font-medium hover:border-primary/40",children:[t.repoLink,n.jsx(f,{className:"size-4 text-primary"})]})]})}),n.jsx(p,{})]})}export{j as default};
@@ -1,21 +1,21 @@
1
- import{f as b,r as u,j as e,h as k,L as w}from"./vendor-react-DvXH3HTt.js";import{C as x}from"./copy-button-D_k68ABR.js";import{S as v}from"./SiteFooter-BbchjdS_.js";import{M as A}from"./Markdown-CzvoTEon.js";import{u as z,a as O}from"./index-BcVZ_Mpj.js";import{S as I}from"./search-B5qDUIZ_.js";import"./copy-DM6PG3IG.js";import"./vendor-radix-Bip5Pqfe.js";import"./vendor-charts-BiMa1Zmo.js";const i=[{icon:"🚀",label:{zh:"快速入门",en:"Getting started"},pages:[{slug:"intro",title:{zh:"软件介绍",en:"Introduction"},sections:[{heading:{zh:"什么是 Agency Orchestrator",en:"What is Agency Orchestrator"},body:{zh:`Agency Orchestrator(\`ao\`)是 **agency-agents 专家角色库的编排器**。
1
+ import{f as b,r as u,j as e,h as k,L as w}from"./vendor-react-DvXH3HTt.js";import{C as x}from"./copy-button-Dr9lRjiI.js";import{S as v}from"./SiteFooter-CLIQXwew.js";import{M as A}from"./Markdown-DCC1nLQ-.js";import{u as z,a as O}from"./index-DQ2cHvK5.js";import{S as I}from"./search-BRTjF9qD.js";import"./copy-CQZ5TzmV.js";import"./vendor-radix-Bip5Pqfe.js";import"./vendor-charts-BiMa1Zmo.js";const i=[{icon:"🚀",label:{zh:"快速入门",en:"Getting started"},pages:[{slug:"intro",title:{zh:"软件介绍",en:"Introduction"},sections:[{heading:{zh:"什么是 Agency Orchestrator",en:"What is Agency Orchestrator"},body:{zh:`Agency Orchestrator(\`ao\`)是 **agency-agents 专家角色库的编排器**。
2
2
 
3
- agency-agents 里有 211 位打磨好的 AI 专家——营销、工程、设计、产品、财务、法律、销售、学术……每一位都是一段精调过的系统提示词,让模型稳定地以该领域专家的身份输出。但单独一位专家只能解决一个环节;真实任务往往要**多位专家分工协作**:研究员先调研、分析师再拆解、撰稿人成文、收口角色把关。
3
+ agency-agents 里有 216 位打磨好的 AI 专家——营销、工程、设计、产品、财务、法律、销售、学术……每一位都是一段精调过的系统提示词,让模型稳定地以该领域专家的身份输出。但单独一位专家只能解决一个环节;真实任务往往要**多位专家分工协作**:研究员先调研、分析师再拆解、撰稿人成文、收口角色把关。
4
4
 
5
5
  AO 就是把这些专家组队起来的那一层:你用一句话或一份 YAML 描述需求,AO 自动选出合适的专家、按依赖关系排成 DAG、并行执行、在专家之间传递产出,几分钟交付一份完整方案。**你来用 agency-agents 的专家,AO 让「用专家」这件事零门槛。**`,en:`Agency Orchestrator (\`ao\`) is **the orchestrator for the agency-agents expert library**.
6
6
 
7
- agency-agents ships 211 finely-tuned AI experts — marketing, engineering, design, product, finance, legal, sales, academic… each a carefully crafted system prompt that makes a model reliably act as that domain expert. But one expert only handles one step; real tasks need **several experts working together**: a researcher scopes it, an analyst breaks it down, a writer drafts it, a finalizer reviews.
7
+ agency-agents ships 216 finely-tuned AI experts — marketing, engineering, design, product, finance, legal, sales, academic… each a carefully crafted system prompt that makes a model reliably act as that domain expert. But one expert only handles one step; real tasks need **several experts working together**: a researcher scopes it, an analyst breaks it down, a writer drafts it, a finalizer reviews.
8
8
 
9
9
  AO is the layer that teams them up: describe your need in one sentence or a YAML file, and AO picks the right experts, arranges them into a DAG by dependency, runs them in parallel, passes outputs between them, and delivers a full plan in minutes. **You come to use agency-agents' experts; AO makes using them effortless.**`}},{heading:{zh:"解决什么问题",en:"What problems it solves"},body:{zh:`- **让 agency-agents 的专家真正协作起来**:单个专家只解决一个环节,AO 让多位专家按 DAG 分工、并行、交接
10
10
  - 单次 prompt 难以覆盖复杂任务,多专家分工 + 收口质量更高
11
11
  - 不想写编排代码:用 YAML 声明依赖,引擎自动并行;或一句话 \`compose\` 自动选专家、生成并运行
12
- - 211 位专家覆盖营销、工程、设计、产品、财务、法律、销售、学术等领域
12
+ - 216 位专家覆盖营销、工程、设计、产品、财务、法律、销售、学术等领域
13
13
  - 10 个 provider,7 个免 API key`,en:`- **Make agency-agents' experts actually collaborate**: one expert handles one step; AO has many experts divide work, run in parallel, and hand off via a DAG
14
14
  - A single prompt struggles with complex tasks; multi-expert division + a finalizer yields higher quality
15
15
  - No orchestration code: declare dependencies in YAML, or \`compose\` from one sentence to auto-pick experts, generate and run
16
- - 211 experts across marketing, engineering, design, product, finance, legal, sales, academic, and more
16
+ - 216 experts across marketing, engineering, design, product, finance, legal, sales, academic, and more
17
17
  - 10 providers, 7 of them need no API key`}},{heading:{zh:"怎么用(本地运行)",en:"How to use it (runs locally)"},body:{zh:'AO 在**你自己机器上**运行。三种入口:\n1. **网页 Studio(推荐,最友好)**:本地跑 `ao web`,浏览器里选专家/模板、点击运行、实时介入——图形界面,不用碰命令行。\n2. **一句话 compose**:`ao compose "你的需求" --run`,自动选专家、生成并运行。\n3. **手写 YAML(进阶)**:自定义角色/任务/依赖/循环,完全可控、可版本管理。\n\n> 注意:本站是**公开演示**——`Studio` 标签在线上没有后端、不能真跑、也不要在上面填 key。要真用请按上面任一方式**本地运行**。三种入口同一引擎,产物都落 `ao-output/`,都支持断点续跑与返工。',en:'AO runs **on your own machine**. Three entry points:\n1. **Web Studio (recommended, friendliest)**: run `ao web` locally and pick experts/templates, click run, and intervene live — a GUI, no command line needed.\n2. **One-sentence compose**: `ao compose "your need" --run` — auto-picks experts, generates and runs.\n3. **Hand-written YAML (advanced)**: define roles/tasks/dependencies/loops yourself — fully controllable and versionable.\n\n> Note: this site is a **public demo** — the Studio tab here has no backend, can\'t run for real, and you should never enter a key on it. To actually use AO, **run locally** via any option above. All three share one engine, save to `ao-output/`, and support resume & rework.'}}]},{slug:"install",title:{zh:"安装",en:"Install"},sections:[{heading:{zh:"全局安装",en:"Global install"},body:{zh:"需要 Node.js 18+。全局安装后即可在任意目录使用 `ao` 命令:",en:"Requires Node.js 18+. Install globally to use the `ao` command anywhere:"},code:`npm i -g agency-orchestrator
18
- ao --version`},{heading:{zh:"专家库随装随用,无需单独安装",en:"Experts come bundled — no separate install"},body:{zh:"**装 AO 就自带 agency-agents 专家库**——它是 AO 的依赖(`agency-agents-zh`),`npm i -g` 时会一并装好,你不用再单独安装或克隆。`ao roles` 能列出 211 位专家,就说明专家库已就绪。需要升级时重新全局安装即可:",en:"**Installing AO bundles the agency-agents library** — it's a dependency (`agency-agents-zh`) installed automatically by `npm i -g`, so you never install or clone it separately. If `ao roles` lists all 211 experts, the library is ready. To upgrade, reinstall globally:"},code:`ao roles # 验证专家库(应列出 211 位专家)
18
+ ao --version`},{heading:{zh:"专家库随装随用,无需单独安装",en:"Experts come bundled — no separate install"},body:{zh:"**装 AO 就自带 agency-agents 专家库**——它是 AO 的依赖(`agency-agents-zh`),`npm i -g` 时会一并装好,你不用再单独安装或克隆。`ao roles` 能列出 216 位专家,就说明专家库已就绪。需要升级时重新全局安装即可:",en:"**Installing AO bundles the agency-agents library** — it's a dependency (`agency-agents-zh`) installed automatically by `npm i -g`, so you never install or clone it separately. If `ao roles` lists all 216 experts, the library is ready. To upgrade, reinstall globally:"},code:`ao roles # 验证专家库(应列出 216 位专家)
19
19
  npm i -g agency-orchestrator@latest # 升级`},{heading:{zh:"无需 API Key 起步",en:"Start without an API key"},body:{zh:"不想配 key 也能跑:AO 支持 claude-code CLI、gemini-cli、Ollama 本地模型等 7 种免 key 方式。装好对应 CLI 或本地模型后,用 `--provider` 指定即可。",en:"No key needed to start: AO supports 7 key-free paths such as the claude-code CLI, gemini-cli, and local Ollama. Install the CLI or local model, then point to it with `--provider`."}},{heading:{zh:"不想用命令行?下载桌面客户端",en:"Prefer no terminal? Download the desktop app"},body:{zh:'不熟悉命令行可以直接下载**桌面客户端**(原生 App,免装 Node):[**前往下载 →**](https://github.com/jnMetaCode/agency-orchestrator/releases/latest)。\n\n- **macOS Apple Silicon**:`...-arm64.dmg`\n- **macOS Intel**:`...-0.2.0.dmg`(不带 arm64 的那个)\n- **Windows**:`...Setup...exe` **Linux**:`...AppImage`\n\n桌面端把网页 Studio 包成原生应用,体验和 `ao web` 一致,key 同样只存本机。**它自带引擎和 Node,双击即用,无需再 `npm i -g agency-orchestrator`**——只有想在终端用 `ao` 命令或接进脚本 / CI 时才需要装 CLI。\n\n> 不想装桌面版、嫌签名提示麻烦?**用网页版也行**:本地运行 `ao web`(功能和桌面版完全一样,key 只存本机),或直接打开 [ao.aiolaola.com](https://ao.aiolaola.com) 演示体验。三者任选其一。\n\n下载后想校验完整性(可选):每个 Release 附带 `SHA256SUMS-<平台>.txt`,运行 `shasum -a 256 <下载的文件>` 对照即可。\n\n#### macOS 打开时提示「已损坏,无法打开」?\n\n这不是真的损坏——当前是**未签名版**,系统给从网上下载的 App 打了「隔离」标记。三步解决:\n\n1. 先把 App 拖进**「应用程序」**,再推出磁盘映像(dmg)。\n2. 打开**「终端」**,粘贴回车(会让你输开机密码,输入时不显示是正常的):\n ```bash\n sudo xattr -rd com.apple.quarantine "/Applications/Agency Orchestrator.app"\n ```\n3. 回「应用程序」双击打开即可。\n\n> Windows 若弹「Windows 已保护你的电脑」,点**「更多信息」→「仍要运行」**。\n> 这些都是未签名 App 的正常提示,待项目做了 Apple 公证 / Windows 签名后会自动消失。',en:`Not comfortable with the command line? Just download the **desktop app** (native, no Node needed): [**Download →**](https://github.com/jnMetaCode/agency-orchestrator/releases/latest).
20
20
 
21
21
  - **macOS Apple Silicon**: \`...-arm64.dmg\`
@@ -42,7 +42,7 @@ It's not actually damaged — the build is **unsigned**, so macOS flags internet
42
42
  > On Windows, if you see "Windows protected your PC", click **More info → Run anyway**.
43
43
  > These are normal prompts for unsigned apps and will disappear once the project is Apple-notarized / Windows-signed.`}}]},{slug:"compose",title:{zh:"一句话编排(推荐)",en:"Compose (recommended)"},sections:[{heading:{zh:"compose --run",en:"compose --run"},body:{zh:"最快上手方式:一句话描述需求,AO 自动选角、设计 DAG、生成并**直接运行**工作流。",en:"The fastest start: describe your need; AO picks experts, designs the DAG, generates and **runs** the workflow."},code:'ao compose "我是程序员,想用 AI 做自媒体副业,目标月入 2 万,帮我做完整规划" --run'},{heading:{zh:"先生成、后运行",en:"Generate first, run later"},body:{zh:"去掉 `--run` 时,AO 只**生成 YAML 工作流并保存**,不立即执行。你可以先打开生成的 YAML 检查 / 微调专家与任务,确认无误后再 `ao run` 跑:",en:"Without `--run`, AO only **generates and saves the YAML workflow** without executing. Open it to review / tweak the experts and tasks, then run it with `ao run`:"},code:`ao compose "为新品做一套发布物料"
44
44
  # 检查生成的 yaml 后
45
- ao run <生成的工作流.yaml>`},{heading:{zh:"为什么 compose 有效",en:"Why compose works"},body:{zh:"compose 底层也是一次 LLM 调用——它读取 211 位专家的能力清单,按你的需求挑人、排依赖。生成质量取决于底层模型能力,建议用有能力的模型跑 compose。生成的 DAG 是**确定性**执行的:谁先谁后、谁并行由依赖图决定,不靠模型即兴。",en:"compose is itself an LLM call — it reads the 211 experts' capabilities and picks/sequences them for your need. Generation quality depends on the underlying model, so use a capable one for compose. The generated DAG executes **deterministically**: order and parallelism come from the dependency graph, not improvisation."}}]},{slug:"run",title:{zh:"运行工作流",en:"Run a workflow"},sections:[{heading:{zh:"run / validate / plan",en:"run / validate / plan"},body:{zh:"把工作流写成 YAML,或用内置模板直接跑。`validate` 只校验不运行,`plan` 看引擎排出的 DAG 执行计划。",en:"Write a workflow as YAML, or run a built-in template. `validate` checks without running; `plan` shows the engine's DAG execution plan."},code:`ao run workflows/story-creation.yaml
45
+ ao run <生成的工作流.yaml>`},{heading:{zh:"为什么 compose 有效",en:"Why compose works"},body:{zh:"compose 底层也是一次 LLM 调用——它读取 216 位专家的能力清单,按你的需求挑人、排依赖。生成质量取决于底层模型能力,建议用有能力的模型跑 compose。生成的 DAG 是**确定性**执行的:谁先谁后、谁并行由依赖图决定,不靠模型即兴。",en:"compose is itself an LLM call — it reads the 216 experts' capabilities and picks/sequences them for your need. Generation quality depends on the underlying model, so use a capable one for compose. The generated DAG executes **deterministically**: order and parallelism come from the dependency graph, not improvisation."}}]},{slug:"run",title:{zh:"运行工作流",en:"Run a workflow"},sections:[{heading:{zh:"run / validate / plan",en:"run / validate / plan"},body:{zh:"把工作流写成 YAML,或用内置模板直接跑。`validate` 只校验不运行,`plan` 看引擎排出的 DAG 执行计划。",en:"Write a workflow as YAML, or run a built-in template. `validate` checks without running; `plan` shows the engine's DAG execution plan."},code:`ao run workflows/story-creation.yaml
46
46
  ao validate workflow.yaml # 只校验不运行
47
47
  ao plan workflow.yaml # 看 DAG 执行计划`},{heading:{zh:"常用选项",en:"Common options"},body:{zh:'- `--provider <name>`:临时覆盖 provider,不改 YAML\n- `--timeout <值>`:单步超时,支持 `300s` / `5m`(API 默认 300s,本地/CLI 600s)\n- `--resume last --from <step>`:从某步重跑(见「迭代优化」)\n- `--feedback "意见"`:带意见返工某一步',en:'- `--provider <name>`: override the provider without editing YAML\n- `--timeout <value>`: per-step timeout, accepts `300s` / `5m` (API default 300s, local/CLI 600s)\n- `--resume last --from <step>`: rerun from a step (see Iterate)\n- `--feedback "note"`: revise a step with a note'},code:"ao run workflow.yaml --provider deepseek --timeout 5m"},{heading:{zh:"产物去哪了",en:"Where outputs go"},body:{zh:"每次运行的所有步骤产物保存在 `ao-output/<name>-<timestamp>/`:`metadata.json` 记录步骤 id 与状态,`steps/` 下是每一步的具体产出。这套产物是断点续跑和返工的基础。",en:"Every run saves all step outputs to `ao-output/<name>-<timestamp>/`: `metadata.json` holds step ids and states, and `steps/` has each step's output. These artifacts power resume and rework."}}]}]},{icon:"🧩",label:{zh:"工作流 YAML",en:"Workflow YAML"},pages:[{slug:"yaml-structure",title:{zh:"YAML 结构",en:"YAML structure"},sections:[{heading:{zh:"最小骨架",en:"Minimal skeleton"},body:{zh:"一个工作流 = 顶层配置(`llm` 必填)+ `steps`。每个 step 指定角色、任务、输出变量。任务里用 `{{变量}}` 引用上游产出或输入。",en:"A workflow = top-level config (`llm` required) + `steps`. Each step has a role, a task, and an output variable. Reference upstream outputs or inputs with `{{var}}` in the task."},code:`name: "我的工作流"
48
48
  agents_dir: "agency-agents-zh"
@@ -71,7 +71,7 @@ steps:
71
71
  loop:
72
72
  back_to: write
73
73
  max_iterations: 3
74
- exit_condition: "{{review}} contains 通过"`},{heading:{zh:"condition 条件分支",en:"condition branching"},body:{zh:"用 `condition` 让某步按上游产出有条件地执行;不满足时跳过该步及其下游。支持 `contains`(包含)和 `equals`(相等)两种判断,`exit_condition` 同此语法。",en:"Use `condition` to run a step only when an upstream output matches; otherwise the step (and its downstream) is skipped. Supports `contains` and `equals`; `exit_condition` uses the same syntax."},code:'condition: "{{review}} contains 需要修改"'}]}]},{icon:"🔁",label:{zh:"迭代优化",en:"Iterate"},pages:[{slug:"resume",title:{zh:"断点续跑",en:"Resume"},sections:[{heading:{zh:"--resume --from",en:"--resume --from"},body:{zh:"只想改某一步时,复用上一次运行的所有上游产物,从该步往后重跑,下游自动跟着重算——不浪费已经跑好的 token。",en:"To revise one step, reuse all upstream outputs from the last run and rerun from that step onward; downstream recomputes automatically — no wasted tokens."},code:"ao run workflow.yaml --resume last --from character_design"},{heading:{zh:"先读产物再决定",en:"Read outputs first"},body:{zh:"改之前先看最新一次运行目录:`metadata.json` 看步骤 id 与状态,`steps/` 看具体产出,确认从哪一步动手最划算。`--resume last` 指向最近一次运行。",en:"Before revising, inspect the latest run dir: `metadata.json` for step ids/states, `steps/` for outputs — to pick the most efficient restart point. `--resume last` points to the most recent run."}}]},{slug:"feedback",title:{zh:"对话式返工",en:"Feedback rework"},sections:[{heading:{zh:"--feedback",en:"--feedback"},body:{zh:"`--resume --from` 是**从头重跑**那一步。如果你只是有一条具体意见(「结尾太平」「预算太高」),用 `--feedback`:它把**上一版产出 + 你的意见**交给专家,让它在草稿上改,而不是推倒重写。",en:"`--resume --from` reruns a step **from scratch**. When you have a specific note ('ending too flat', 'budget too high'), use `--feedback`: it hands the expert its **previous output + your note** to revise the draft instead of rewriting."},code:'ao run workflow.yaml --from write_story --feedback "结尾太仓促,再铺垫一段"'},{heading:{zh:"用法要点",en:"Notes"},body:{zh:"- `--feedback` 省略 `--resume` 时默认 `--resume last`\n- 必须配 `--from` 指定要改哪一步\n- 改完后下游步骤自动用新产出重跑",en:"- `--feedback` implies `--resume last` when `--resume` is omitted\n- Requires `--from` to pick the step\n- Downstream steps automatically rerun with the revised output"}}]}]},{icon:"🎭",label:{zh:"专家与 Provider",en:"Experts & providers"},pages:[{slug:"roles",title:{zh:"专家角色库 agency-agents",en:"Expert library: agency-agents"},sections:[{heading:{zh:"agency-agents 是什么",en:"What is agency-agents"},body:{zh:"agency-agents 是一套开源的 **AI 专家角色库**,收录了 211 位打磨好的专家。每一位专家是一个带 frontmatter 的 `.md` 文件,核心是一段精心调过的系统提示词——它约束模型的身份、视角、输出格式与专业边界,让模型稳定地以「市场研究员」「资深编辑」「财务分析师」「风控专家」等真实身份产出,而不是泛泛而谈的通用助手。\n\n角色按领域分门别类,覆盖营销、工程、设计、产品、财务、法律、销售、学术、项目管理、客服、测试等领域。AO 默认从 `node_modules/agency-agents-zh`(或仓库同级目录)加载这套库。",en:"agency-agents is an open-source **library of AI expert roles** — 211 finely-tuned experts. Each expert is a `.md` file with frontmatter, centered on a carefully tuned system prompt that fixes the model's identity, perspective, output format, and domain boundaries — so the model reliably acts as a 'trend researcher', 'technical writer', 'financial analyst', 'narratologist', etc., instead of a generic assistant.\n\nRoles are organized by domain across marketing, engineering, design, product, finance, legal, sales, academic, project management, support, testing, and more. AO loads this library from `node_modules/agency-agents-zh` (or a sibling repo) by default."},code:"ao roles # 列出全部 211 位专家"},{heading:{zh:"AO 与 agency-agents 的关系",en:"How AO and agency-agents relate"},body:{zh:"agency-agents 提供「专家」,AO 提供「让专家组队干活」的编排能力。绝大多数用户是冲着 agency-agents 的专家来的——AO 的价值,就是让你把这些专家一句话拉起来协作:`compose` 自动选专家、排 DAG、生成并运行工作流,几分钟拿到多专家协作的完整产出。",en:"agency-agents provides the experts; AO provides the orchestration that puts them to work as a team. Most users come for agency-agents' experts — AO's value is letting you spin them up to collaborate from a single sentence: `compose` auto-picks experts, arranges the DAG, generates and runs the workflow, delivering multi-expert output in minutes."}},{heading:{zh:"找专家:ao roles 搜索",en:"Find an expert: ao roles search"},body:{zh:"211 位专家不用一个个翻。`ao roles <关键词>`(或 `--search`)会在 **agency-agents 全库**里按 角色路径 / 名称 / 描述 搜索(不区分大小写),秒定位你要的专家:",en:"No need to scroll all 211. `ao roles <keyword>` (or `--search`) searches the **entire agency-agents library** by path / name / description (case-insensitive) to find the expert you need:"},code:`ao roles seo # 找 SEO 相关专家
74
+ exit_condition: "{{review}} contains 通过"`},{heading:{zh:"condition 条件分支",en:"condition branching"},body:{zh:"用 `condition` 让某步按上游产出有条件地执行;不满足时跳过该步及其下游。支持 `contains`(包含)和 `equals`(相等)两种判断,`exit_condition` 同此语法。",en:"Use `condition` to run a step only when an upstream output matches; otherwise the step (and its downstream) is skipped. Supports `contains` and `equals`; `exit_condition` uses the same syntax."},code:'condition: "{{review}} contains 需要修改"'}]}]},{icon:"🔁",label:{zh:"迭代优化",en:"Iterate"},pages:[{slug:"resume",title:{zh:"断点续跑",en:"Resume"},sections:[{heading:{zh:"--resume --from",en:"--resume --from"},body:{zh:"只想改某一步时,复用上一次运行的所有上游产物,从该步往后重跑,下游自动跟着重算——不浪费已经跑好的 token。",en:"To revise one step, reuse all upstream outputs from the last run and rerun from that step onward; downstream recomputes automatically — no wasted tokens."},code:"ao run workflow.yaml --resume last --from character_design"},{heading:{zh:"先读产物再决定",en:"Read outputs first"},body:{zh:"改之前先看最新一次运行目录:`metadata.json` 看步骤 id 与状态,`steps/` 看具体产出,确认从哪一步动手最划算。`--resume last` 指向最近一次运行。",en:"Before revising, inspect the latest run dir: `metadata.json` for step ids/states, `steps/` for outputs — to pick the most efficient restart point. `--resume last` points to the most recent run."}}]},{slug:"feedback",title:{zh:"对话式返工",en:"Feedback rework"},sections:[{heading:{zh:"--feedback",en:"--feedback"},body:{zh:"`--resume --from` 是**从头重跑**那一步。如果你只是有一条具体意见(「结尾太平」「预算太高」),用 `--feedback`:它把**上一版产出 + 你的意见**交给专家,让它在草稿上改,而不是推倒重写。",en:"`--resume --from` reruns a step **from scratch**. When you have a specific note ('ending too flat', 'budget too high'), use `--feedback`: it hands the expert its **previous output + your note** to revise the draft instead of rewriting."},code:'ao run workflow.yaml --from write_story --feedback "结尾太仓促,再铺垫一段"'},{heading:{zh:"用法要点",en:"Notes"},body:{zh:"- `--feedback` 省略 `--resume` 时默认 `--resume last`\n- 必须配 `--from` 指定要改哪一步\n- 改完后下游步骤自动用新产出重跑",en:"- `--feedback` implies `--resume last` when `--resume` is omitted\n- Requires `--from` to pick the step\n- Downstream steps automatically rerun with the revised output"}}]}]},{icon:"🎭",label:{zh:"专家与 Provider",en:"Experts & providers"},pages:[{slug:"roles",title:{zh:"专家角色库 agency-agents",en:"Expert library: agency-agents"},sections:[{heading:{zh:"agency-agents 是什么",en:"What is agency-agents"},body:{zh:"agency-agents 是一套开源的 **AI 专家角色库**,收录了 216 位打磨好的专家。每一位专家是一个带 frontmatter 的 `.md` 文件,核心是一段精心调过的系统提示词——它约束模型的身份、视角、输出格式与专业边界,让模型稳定地以「市场研究员」「资深编辑」「财务分析师」「风控专家」等真实身份产出,而不是泛泛而谈的通用助手。\n\n角色按领域分门别类,覆盖营销、工程、设计、产品、财务、法律、销售、学术、项目管理、客服、测试等领域。AO 默认从 `node_modules/agency-agents-zh`(或仓库同级目录)加载这套库。",en:"agency-agents is an open-source **library of AI expert roles** — 216 finely-tuned experts. Each expert is a `.md` file with frontmatter, centered on a carefully tuned system prompt that fixes the model's identity, perspective, output format, and domain boundaries — so the model reliably acts as a 'trend researcher', 'technical writer', 'financial analyst', 'narratologist', etc., instead of a generic assistant.\n\nRoles are organized by domain across marketing, engineering, design, product, finance, legal, sales, academic, project management, support, testing, and more. AO loads this library from `node_modules/agency-agents-zh` (or a sibling repo) by default."},code:"ao roles # 列出全部 216 位专家"},{heading:{zh:"AO 与 agency-agents 的关系",en:"How AO and agency-agents relate"},body:{zh:"agency-agents 提供「专家」,AO 提供「让专家组队干活」的编排能力。绝大多数用户是冲着 agency-agents 的专家来的——AO 的价值,就是让你把这些专家一句话拉起来协作:`compose` 自动选专家、排 DAG、生成并运行工作流,几分钟拿到多专家协作的完整产出。",en:"agency-agents provides the experts; AO provides the orchestration that puts them to work as a team. Most users come for agency-agents' experts — AO's value is letting you spin them up to collaborate from a single sentence: `compose` auto-picks experts, arranges the DAG, generates and runs the workflow, delivering multi-expert output in minutes."}},{heading:{zh:"找专家:ao roles 搜索",en:"Find an expert: ao roles search"},body:{zh:"216 位专家不用一个个翻。`ao roles <关键词>`(或 `--search`)会在 **agency-agents 全库**里按 角色路径 / 名称 / 描述 搜索(不区分大小写),秒定位你要的专家:",en:"No need to scroll all 216. `ao roles <keyword>` (or `--search`) searches the **entire agency-agents library** by path / name / description (case-insensitive) to find the expert you need:"},code:`ao roles seo # 找 SEO 相关专家
75
75
  ao roles 财务 # 找财务相关专家`},{heading:{zh:"在工作流里引用专家",en:"Reference an expert in a workflow"},body:{zh:"在 step 里用 `category/role-name` 指定专家;或者干脆用 `ao compose` 让 AO 替你选。",en:"In a step, name the expert as `category/role-name`; or just let `ao compose` pick for you."},code:`steps:
76
76
  - id: research
77
77
  role: "product/product-trend-researcher" # agency-agents 里的专家
@@ -1 +1 @@
1
- import{r as l,j as e}from"./vendor-react-DvXH3HTt.js";import{S as F}from"./SiteFooter-BbchjdS_.js";import{u as R,a as p,S as D,X as K}from"./index-BcVZ_Mpj.js";import{e as q}from"./experts-BeKtg-h2.js";import{S as H}from"./search-B5qDUIZ_.js";import{C as z,a as M}from"./copy-DM6PG3IG.js";import{A as I}from"./arrow-up-right-S_2KPGsV.js";import"./vendor-radix-Bip5Pqfe.js";import"./vendor-charts-BiMa1Zmo.js";const E=q;async function Q(n){try{return await navigator.clipboard.writeText(n),!0}catch{try{const a=document.createElement("textarea");a.value=n,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();const s=document.execCommand("copy");return document.body.removeChild(a),s}catch{return!1}}}function T({e:n,className:a}){return e.jsx("span",{className:p("grid size-10 shrink-0 place-items-center rounded-xl text-lg font-bold text-white",a),style:{background:n.color||"#888"},children:n.emoji||n.name.slice(0,1)})}function Y(){const{t:n,lang:a}=R(),s=n.experts,m=E[a]??E.zh,[u,P]=l.useState(""),[c,y]=l.useState("all"),f=l.useRef(new Map),[x,j]=l.useState(null),[d,b]=l.useState(null),[N,h]=l.useState(""),[v,w]=l.useState(!1),k=l.useCallback(async t=>{const r=`${a}/${t.category}/${t.id}`;if(f.current.has(r))return f.current.get(r);const o=await fetch(`/prompts/${a}/${t.category}/${t.id}.md`);if(!o.ok)throw new Error("fetch failed");const i=await o.text();return f.current.set(r,i),i},[a]),C=t=>{j(t),setTimeout(()=>j(r=>r===t?null:r),1800)},$=async t=>{const r=`${t.category}/${t.id}`;try{const o=await Q(await k(t));C(o?r:`fail:${r}`)}catch{C(`fail:${r}`)}},S=async t=>{b(t),h(""),w(!0);try{h(await k(t))}catch{h("")}w(!1)},L=l.useMemo(()=>{const t=new Map;return m.forEach(r=>t.set(r.category,r.categoryName)),Array.from(t,([r,o])=>({id:r,name:o}))},[m]),g=l.useMemo(()=>{const t=u.trim().toLowerCase();return m.filter(r=>c!=="all"&&r.category!==c?!1:t?(r.name+r.description+r.categoryName).toLowerCase().includes(t):!0)},[m,u,c]);return e.jsxs(e.Fragment,{children:[e.jsx("main",{className:"pt-24",children:e.jsxs("div",{className:"container-page pb-20",children:[e.jsxs("div",{className:"mx-auto max-w-2xl text-center",children:[e.jsx("h1",{className:"text-3xl font-extrabold tracking-tight sm:text-4xl md:text-5xl",children:s.title}),e.jsx("p",{className:"mx-auto mt-4 text-pretty leading-relaxed text-muted-foreground",children:s.subtitle})]}),e.jsx("div",{className:"mx-auto mt-8 max-w-xl",children:e.jsxs("div",{className:"relative",children:[e.jsx(H,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{value:u,onChange:t=>P(t.target.value),placeholder:s.searchPlaceholder,className:"w-full rounded-xl border border-border/70 bg-card/60 py-2.5 pl-10 pr-3 text-sm outline-none focus:border-primary/40"})]})}),e.jsxs("div",{className:"mt-5 flex flex-wrap items-center justify-center gap-2",children:[e.jsx(A,{active:c==="all",onClick:()=>y("all"),children:s.all}),L.map(t=>e.jsx(A,{active:c===t.id,onClick:()=>y(t.id),children:t.name},t.id))]}),e.jsxs("p",{className:"mt-4 text-center text-sm text-muted-foreground",children:[g.length," ",s.countSuffix]}),g.length===0?e.jsx("p",{className:"mt-16 text-center text-sm text-muted-foreground",children:s.empty}):e.jsx("div",{className:"mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:g.map(t=>{const r=`${t.category}/${t.id}`,o=x===r,i=x===`fail:${r}`;return e.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/70 bg-card/60 p-5 transition-colors hover:border-primary/40",children:[e.jsxs("button",{type:"button",onClick:()=>S(t),className:"flex items-center gap-3 text-left",children:[e.jsx(T,{e:t}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-[11px] font-medium text-primary",children:t.categoryName}),e.jsx("h3",{className:"truncate font-semibold",children:t.name})]})]}),e.jsx("p",{className:"mt-3 line-clamp-4 flex-1 text-sm leading-relaxed text-muted-foreground",children:t.description}),e.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>S(t),className:"rounded-lg border border-border/70 px-3 py-1.5 text-xs font-medium text-muted-foreground hover:border-primary/40 hover:text-foreground",children:s.viewPrompt}),e.jsxs("button",{type:"button",onClick:()=>$(t),className:p("inline-flex flex-1 items-center justify-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors",o?"border-emerald-500/40 bg-emerald-500/10 text-emerald-500":i?"border-red-500/40 bg-red-500/10 text-red-500":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/15"),children:[o?e.jsx(z,{className:"size-3.5"}):e.jsx(M,{className:"size-3.5"}),o?s.copied:i?s.copyFailed:s.copyPrompt]})]})]},r)})}),e.jsx("div",{className:"mt-12 text-center",children:e.jsxs("a",{href:D.rolesRepo,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-border/70 bg-card/60 px-4 py-3 text-sm font-medium hover:border-primary/40",children:[s.repoCta,e.jsx(I,{className:"size-4 text-primary"})]})})]})}),e.jsx(F,{}),d&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/60 p-0 backdrop-blur-sm sm:items-center sm:p-6",onClick:()=>b(null),children:e.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-2xl flex-col overflow-hidden rounded-t-2xl border border-border/70 bg-card shadow-2xl sm:rounded-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-border/70 p-4",children:[e.jsx(T,{e:d}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate text-[11px] font-medium text-primary",children:d.categoryName}),e.jsx("h3",{className:"truncate font-semibold",children:d.name})]}),e.jsx("button",{type:"button",onClick:()=>b(null),"aria-label":s.close,className:"rounded-lg p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",children:e.jsx(K,{className:"size-5"})})]}),e.jsx("p",{className:"px-4 pt-3 text-xs text-muted-foreground",children:s.promptHint}),e.jsx("div",{className:"m-4 flex-1 overflow-auto rounded-xl border border-border/60 bg-background/60 p-4",children:v?e.jsx("p",{className:"text-sm text-muted-foreground",children:s.loading}):e.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-foreground",children:N})}),e.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-border/70 p-4",children:(()=>{const t=`${d.category}/${d.id}`,r=x===t,o=x===`fail:${t}`;return e.jsxs("button",{type:"button",onClick:()=>$(d),disabled:v||!N,className:p("inline-flex items-center gap-1.5 rounded-lg border px-4 py-2 text-sm font-medium transition-colors disabled:opacity-50",r?"border-emerald-500/40 bg-emerald-500/10 text-emerald-500":o?"border-red-500/40 bg-red-500/10 text-red-500":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/15"),children:[r?e.jsx(z,{className:"size-4"}):e.jsx(M,{className:"size-4"}),r?s.copied:o?s.copyFailed:s.copyPrompt]})})()})]})})]})}function A({active:n,onClick:a,children:s}){return e.jsx("button",{type:"button",onClick:a,className:p("rounded-full border px-3 py-1 text-sm font-medium transition-colors",n?"border-primary/40 bg-primary/10 text-primary":"border-border/70 text-muted-foreground hover:text-foreground"),children:s})}export{Y as default};
1
+ import{r as l,j as e}from"./vendor-react-DvXH3HTt.js";import{S as F}from"./SiteFooter-CLIQXwew.js";import{u as R,a as p,S as D,X as K}from"./index-DQ2cHvK5.js";import{e as q}from"./experts-Bv953aOf.js";import{S as H}from"./search-BRTjF9qD.js";import{C as z,a as M}from"./copy-CQZ5TzmV.js";import{A as I}from"./arrow-up-right-Cn4ATaZ1.js";import"./vendor-radix-Bip5Pqfe.js";import"./vendor-charts-BiMa1Zmo.js";const E=q;async function Q(n){try{return await navigator.clipboard.writeText(n),!0}catch{try{const a=document.createElement("textarea");a.value=n,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();const s=document.execCommand("copy");return document.body.removeChild(a),s}catch{return!1}}}function T({e:n,className:a}){return e.jsx("span",{className:p("grid size-10 shrink-0 place-items-center rounded-xl text-lg font-bold text-white",a),style:{background:n.color||"#888"},children:n.emoji||n.name.slice(0,1)})}function Y(){const{t:n,lang:a}=R(),s=n.experts,m=E[a]??E.zh,[u,P]=l.useState(""),[c,y]=l.useState("all"),f=l.useRef(new Map),[x,j]=l.useState(null),[d,b]=l.useState(null),[N,h]=l.useState(""),[v,w]=l.useState(!1),k=l.useCallback(async t=>{const r=`${a}/${t.category}/${t.id}`;if(f.current.has(r))return f.current.get(r);const o=await fetch(`/prompts/${a}/${t.category}/${t.id}.md`);if(!o.ok)throw new Error("fetch failed");const i=await o.text();return f.current.set(r,i),i},[a]),C=t=>{j(t),setTimeout(()=>j(r=>r===t?null:r),1800)},$=async t=>{const r=`${t.category}/${t.id}`;try{const o=await Q(await k(t));C(o?r:`fail:${r}`)}catch{C(`fail:${r}`)}},S=async t=>{b(t),h(""),w(!0);try{h(await k(t))}catch{h("")}w(!1)},L=l.useMemo(()=>{const t=new Map;return m.forEach(r=>t.set(r.category,r.categoryName)),Array.from(t,([r,o])=>({id:r,name:o}))},[m]),g=l.useMemo(()=>{const t=u.trim().toLowerCase();return m.filter(r=>c!=="all"&&r.category!==c?!1:t?(r.name+r.description+r.categoryName).toLowerCase().includes(t):!0)},[m,u,c]);return e.jsxs(e.Fragment,{children:[e.jsx("main",{className:"pt-24",children:e.jsxs("div",{className:"container-page pb-20",children:[e.jsxs("div",{className:"mx-auto max-w-2xl text-center",children:[e.jsx("h1",{className:"text-3xl font-extrabold tracking-tight sm:text-4xl md:text-5xl",children:s.title}),e.jsx("p",{className:"mx-auto mt-4 text-pretty leading-relaxed text-muted-foreground",children:s.subtitle})]}),e.jsx("div",{className:"mx-auto mt-8 max-w-xl",children:e.jsxs("div",{className:"relative",children:[e.jsx(H,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{value:u,onChange:t=>P(t.target.value),placeholder:s.searchPlaceholder,className:"w-full rounded-xl border border-border/70 bg-card/60 py-2.5 pl-10 pr-3 text-sm outline-none focus:border-primary/40"})]})}),e.jsxs("div",{className:"mt-5 flex flex-wrap items-center justify-center gap-2",children:[e.jsx(A,{active:c==="all",onClick:()=>y("all"),children:s.all}),L.map(t=>e.jsx(A,{active:c===t.id,onClick:()=>y(t.id),children:t.name},t.id))]}),e.jsxs("p",{className:"mt-4 text-center text-sm text-muted-foreground",children:[g.length," ",s.countSuffix]}),g.length===0?e.jsx("p",{className:"mt-16 text-center text-sm text-muted-foreground",children:s.empty}):e.jsx("div",{className:"mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:g.map(t=>{const r=`${t.category}/${t.id}`,o=x===r,i=x===`fail:${r}`;return e.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/70 bg-card/60 p-5 transition-colors hover:border-primary/40",children:[e.jsxs("button",{type:"button",onClick:()=>S(t),className:"flex items-center gap-3 text-left",children:[e.jsx(T,{e:t}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-[11px] font-medium text-primary",children:t.categoryName}),e.jsx("h3",{className:"truncate font-semibold",children:t.name})]})]}),e.jsx("p",{className:"mt-3 line-clamp-4 flex-1 text-sm leading-relaxed text-muted-foreground",children:t.description}),e.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>S(t),className:"rounded-lg border border-border/70 px-3 py-1.5 text-xs font-medium text-muted-foreground hover:border-primary/40 hover:text-foreground",children:s.viewPrompt}),e.jsxs("button",{type:"button",onClick:()=>$(t),className:p("inline-flex flex-1 items-center justify-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors",o?"border-emerald-500/40 bg-emerald-500/10 text-emerald-500":i?"border-red-500/40 bg-red-500/10 text-red-500":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/15"),children:[o?e.jsx(z,{className:"size-3.5"}):e.jsx(M,{className:"size-3.5"}),o?s.copied:i?s.copyFailed:s.copyPrompt]})]})]},r)})}),e.jsx("div",{className:"mt-12 text-center",children:e.jsxs("a",{href:D.rolesRepo,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-border/70 bg-card/60 px-4 py-3 text-sm font-medium hover:border-primary/40",children:[s.repoCta,e.jsx(I,{className:"size-4 text-primary"})]})})]})}),e.jsx(F,{}),d&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/60 p-0 backdrop-blur-sm sm:items-center sm:p-6",onClick:()=>b(null),children:e.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-2xl flex-col overflow-hidden rounded-t-2xl border border-border/70 bg-card shadow-2xl sm:rounded-2xl",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-border/70 p-4",children:[e.jsx(T,{e:d}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate text-[11px] font-medium text-primary",children:d.categoryName}),e.jsx("h3",{className:"truncate font-semibold",children:d.name})]}),e.jsx("button",{type:"button",onClick:()=>b(null),"aria-label":s.close,className:"rounded-lg p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",children:e.jsx(K,{className:"size-5"})})]}),e.jsx("p",{className:"px-4 pt-3 text-xs text-muted-foreground",children:s.promptHint}),e.jsx("div",{className:"m-4 flex-1 overflow-auto rounded-xl border border-border/60 bg-background/60 p-4",children:v?e.jsx("p",{className:"text-sm text-muted-foreground",children:s.loading}):e.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-foreground",children:N})}),e.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-border/70 p-4",children:(()=>{const t=`${d.category}/${d.id}`,r=x===t,o=x===`fail:${t}`;return e.jsxs("button",{type:"button",onClick:()=>$(d),disabled:v||!N,className:p("inline-flex items-center gap-1.5 rounded-lg border px-4 py-2 text-sm font-medium transition-colors disabled:opacity-50",r?"border-emerald-500/40 bg-emerald-500/10 text-emerald-500":o?"border-red-500/40 bg-red-500/10 text-red-500":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/15"),children:[r?e.jsx(z,{className:"size-4"}):e.jsx(M,{className:"size-4"}),r?s.copied:o?s.copyFailed:s.copyPrompt]})})()})]})})]})}function A({active:n,onClick:a,children:s}){return e.jsx("button",{type:"button",onClick:a,className:p("rounded-full border px-3 py-1 text-sm font-medium transition-colors",n?"border-primary/40 bg-primary/10 text-primary":"border-border/70 text-muted-foreground hover:text-foreground"),children:s})}export{Y as default};
@@ -1,4 +1,4 @@
1
- import{j as e,L as c}from"./vendor-react-DvXH3HTt.js";import{c as i,u as n,S as l,B as d,G as m}from"./index-BcVZ_Mpj.js";import{B as u,U as b,T as j,K as f}from"./users-D8WHA_Pp.js";import{m as o}from"./vendor-framer-motion-ZdeJPCY2.js";import{C as p}from"./copy-button-D_k68ABR.js";import{B as N}from"./badge-6Gfwsh0d.js";import{C as y}from"./copy-DM6PG3IG.js";import{H as v,s as w}from"./sponsors-CoYiygYC.js";import{S as k}from"./SiteFooter-BbchjdS_.js";import"./vendor-radix-Bip5Pqfe.js";import"./vendor-charts-BiMa1Zmo.js";/**
1
+ import{j as e,L as c}from"./vendor-react-DvXH3HTt.js";import{c as i,u as n,S as l,B as d,G as m}from"./index-DQ2cHvK5.js";import{B as u,U as b,T as j,K as f}from"./users-D3-N7gU0.js";import{m as o}from"./vendor-framer-motion-ZdeJPCY2.js";import{C as p}from"./copy-button-Dr9lRjiI.js";import{B as N}from"./badge-B-L-y5fx.js";import{C as y}from"./copy-CQZ5TzmV.js";import{H as v,s as w}from"./sponsors-B9KhG2hW.js";import{S as k}from"./SiteFooter-CLIQXwew.js";import"./vendor-radix-Bip5Pqfe.js";import"./vendor-charts-BiMa1Zmo.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.