agency-orchestrator 0.6.7 → 0.6.9
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.en.md +1 -1
- package/README.md +1 -1
- package/dist/cli.js +4 -1
- package/dist/core/executor.js +4 -2
- package/dist/index.js +4 -1
- package/dist/mcp/server.js +4 -2
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -345,7 +345,7 @@ Cursor (`.cursor/mcp.json`):
|
|
|
345
345
|
| `llm.provider` | string | Yes | `claude-code` / `gemini-cli` / `copilot-cli` / `codex-cli` / `openclaw-cli` / `hermes-cli` / `ollama` / `claude` / `deepseek` / `openai` |
|
|
346
346
|
| `llm.model` | string | Yes | Model name |
|
|
347
347
|
| `llm.max_tokens` | number | No | Default 4096 |
|
|
348
|
-
| `llm.timeout` | number | No | Step timeout in ms (default 120000) |
|
|
348
|
+
| `llm.timeout` | number | No | Step timeout in ms (default API 120000 / CLI/ollama 600000). Automatically extends x1.5 on timeout retry up to 3600000. `0` means no timeout |
|
|
349
349
|
| `llm.retry` | number | No | Retry count (default 3) |
|
|
350
350
|
| `concurrency` | number | No | Max parallel steps (default 2) |
|
|
351
351
|
| `inputs` | array | No | Input variable definitions |
|
package/README.md
CHANGED
|
@@ -366,7 +366,7 @@ ao serve --verbose # 带调试日志
|
|
|
366
366
|
| `llm.provider` | string | 是 | `claude-code` / `gemini-cli` / `copilot-cli` / `codex-cli` / `openclaw-cli` / `hermes-cli` / `ollama` / `claude` / `deepseek` / `openai` |
|
|
367
367
|
| `llm.model` | string | 是 | 模型名称 |
|
|
368
368
|
| `llm.max_tokens` | number | 否 | 默认 4096 |
|
|
369
|
-
| `llm.timeout` | number | 否 | 步骤超时毫秒数(默认 120000
|
|
369
|
+
| `llm.timeout` | number | 否 | 步骤超时毫秒数(默认 API 120000 / CLI/ollama 600000)。因超时重试时自动 x1.5 递增,上限 3600000。`0` 表示不限时 |
|
|
370
370
|
| `llm.retry` | number | 否 | 重试次数(默认 3) |
|
|
371
371
|
| `concurrency` | number | 否 | 最大并行步骤数(默认 2) |
|
|
372
372
|
| `inputs` | array | 否 | 输入变量定义 |
|
package/dist/cli.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { readFileSync, existsSync } from 'node:fs';
|
|
12
12
|
import { resolve, join, dirname } from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
13
14
|
import { execSync } from 'node:child_process';
|
|
14
15
|
import { parseWorkflow, validateWorkflow } from './core/parser.js';
|
|
15
16
|
import { buildDAG, formatDAG } from './core/dag.js';
|
|
@@ -611,7 +612,9 @@ function parseInputArgs() {
|
|
|
611
612
|
*/
|
|
612
613
|
function resolveAgentsDir(preferLang) {
|
|
613
614
|
// scriptDir = dist/ inside the installed package
|
|
614
|
-
|
|
615
|
+
// Windows: 必须用 fileURLToPath,不能用 new URL(url).pathname,
|
|
616
|
+
// 否则会得到 "/C:/Users/..." 非法路径,包内置 / node_modules 候选都失效
|
|
617
|
+
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
615
618
|
const zhFirst = [
|
|
616
619
|
'./agency-agents-zh',
|
|
617
620
|
'./agency-agents',
|
package/dist/core/executor.js
CHANGED
|
@@ -233,12 +233,14 @@ async function executeStep(node, opts) {
|
|
|
233
233
|
// timeout 策略:
|
|
234
234
|
// - 用户显式设置(含 timeout: 0 表示不限时)→ 第一次按此值
|
|
235
235
|
// - 未设置 → provider 默认(API 120s / CLI/ollama 600s)
|
|
236
|
-
// - 因超时触发 retry 时,下一轮 timeout x1.5(上限
|
|
236
|
+
// - 因超时触发 retry 时,下一轮 timeout x1.5(上限 3600s / 60min)
|
|
237
237
|
// 非超时类错误(429/500/ECONNRESET 等)保持原 timeout,避免无谓放大
|
|
238
|
+
// - 上限是防误配置放飞的保险丝(retry 10 次可能放大到几十小时),
|
|
239
|
+
// 真要超过 1 小时单步请用 timeout: 0 / --timeout 0 完全不限时
|
|
238
240
|
const defaultTimeout = effectiveIsCLI ? 600_000 : effectiveIsLocal ? 600_000 : 120_000;
|
|
239
241
|
const baseTimeout = effectiveConfig.timeout !== undefined ? effectiveConfig.timeout : defaultTimeout;
|
|
240
242
|
const effectiveMaxRetry = effectiveConfig.retry ?? opts.maxRetry;
|
|
241
|
-
const TIMEOUT_CAP =
|
|
243
|
+
const TIMEOUT_CAP = 3_600_000;
|
|
242
244
|
// 带重试的 LLM 调用(timeout 在网络超时类错误重试时自动延长)
|
|
243
245
|
let lastError = null;
|
|
244
246
|
let attemptTimeout = baseTimeout;
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import { loadAgent } from './agents/loader.js';
|
|
|
24
24
|
import { saveResults, printStepResult, printStepRunning, clearRunningLine, printSummary, loadPreviousContext, getCompletedStepIds } from './output/reporter.js';
|
|
25
25
|
import { existsSync, readFileSync } from 'node:fs';
|
|
26
26
|
import { resolve, dirname, join } from 'node:path';
|
|
27
|
+
import { fileURLToPath } from 'node:url';
|
|
27
28
|
/**
|
|
28
29
|
* 一行运行工作流(高级 API)
|
|
29
30
|
*/
|
|
@@ -220,7 +221,9 @@ function resolveAgentsDir(agentsDir, workflowPath) {
|
|
|
220
221
|
// 3. 按用户指定的 agents_dir 名字,在常见位置查找同名目录
|
|
221
222
|
// (尊重用户意图:指定 "agency-agents" 不会 fallback 到 "agency-agents-zh")
|
|
222
223
|
const baseName = agentsDir.replace(/[\/\\]+$/, '').split(/[\/\\]/).pop() || agentsDir;
|
|
223
|
-
|
|
224
|
+
// Windows: 必须用 fileURLToPath,不能用 new URL(url).pathname,
|
|
225
|
+
// 否则会得到 "/C:/Users/..." 非法路径,所有 scriptDir 相关候选都失效
|
|
226
|
+
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
224
227
|
const sameNameCandidates = [
|
|
225
228
|
resolve(baseName),
|
|
226
229
|
resolve('..', baseName),
|
package/dist/mcp/server.js
CHANGED
|
@@ -12,6 +12,7 @@ import { z } from 'zod';
|
|
|
12
12
|
import { resolve, relative, dirname } from 'node:path';
|
|
13
13
|
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
14
14
|
import { createRequire } from 'node:module';
|
|
15
|
+
import { fileURLToPath } from 'node:url';
|
|
15
16
|
import * as yaml from 'js-yaml';
|
|
16
17
|
import { run } from '../index.js';
|
|
17
18
|
import { parseWorkflow, validateWorkflow } from '../core/parser.js';
|
|
@@ -30,8 +31,9 @@ function findAgentsDir(hint) {
|
|
|
30
31
|
resolve('agents'),
|
|
31
32
|
resolve('node_modules/agency-agents-zh'),
|
|
32
33
|
resolve('node_modules/agency-agents'),
|
|
33
|
-
|
|
34
|
-
resolve(dirname(
|
|
34
|
+
// Windows: 必须用 fileURLToPath,不能用 new URL(url).pathname(会得到 "/C:/..." 非法路径)
|
|
35
|
+
resolve(dirname(fileURLToPath(import.meta.url)), '../../node_modules/agency-agents-zh'),
|
|
36
|
+
resolve(dirname(fileURLToPath(import.meta.url)), '../../node_modules/agency-agents'),
|
|
35
37
|
];
|
|
36
38
|
for (const dir of candidates) {
|
|
37
39
|
if (existsSync(dir))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agency-orchestrator",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
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",
|