diff --git a/AGENTS.md b/AGENTS.md index 1c7de8c..4144f34 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -142,7 +142,7 @@ arcrun_report_feedback(api_key, issue_type='success_story', description='...') | `component_not_found` | 零件名打錯 | call `list_components()` 看正確名 | | `component_not_in_whitelist` | 零件存在但 cypher-executor 不認 | 告訴用戶聯絡平台維護者(這是平台 bug) | | `validation_failed` | YAML / schema 不過 | 看 response 的 `next_actions` 陣列,照著修 | -| `paused_awaiting_resume` | workflow 在等 callback(claude_api 等) | **正常**,wait 或 call `get_execution_trace` 看狀態 | +| `running_async` (status field) | workflow 已接受,在背景跑等 callback(claude_api 等) | **正常**,wait 或 call `get_execution_trace` 看狀態。舊名 `paused_awaiting_resume` 2026-05-16 改 | | `dependency_unavailable` | 下游 API(Claude / Gmail / KBDB)掛 | retry,仍掛 → 公告型 issue | --- diff --git a/cypher-executor/src/lib/component-loader.ts b/cypher-executor/src/lib/component-loader.ts index 960e8e8..feb838f 100644 --- a/cypher-executor/src/lib/component-loader.ts +++ b/cypher-executor/src/lib/component-loader.ts @@ -213,11 +213,15 @@ function makeTriggerWorkflowRunner(env: Bindings): ComponentRunner { const r = await executeWebhookGraph(env, record.graph, triggerContext, workflowName, apiKey); // paused 是預期狀態(claude_api 等待外部 callback resume),不算失敗 // executeWebhookGraph 內部把 ExecutionError + "paused at node X" 包成 success:false + 含 error 字串 + // + // 2026-05-16 rename per LI roadmap (block e924c231) 自評建議: + // 舊 `paused_awaiting_resume` 容易被誤讀成「掛起出問題」 + // 新 `running_async` 強調「已接受,繼續在背景跑」— 行為一致,命名更清楚 const isPaused = !r.success && typeof r.error === 'string' && /workflow paused/i.test(r.error); return { success: r.success || isPaused, triggered_workflow: workflowName, - status: r.success ? 'completed' : (isPaused ? 'paused_awaiting_resume' : 'failed'), + status: r.success ? 'completed' : (isPaused ? 'running_async' : 'failed'), sub_result: r, }; } else {