refactor(mcp): u6u_* tool 全面 rename 為 arcrun_* + 前綴收斂單一來源

零 u6u 洩漏(leo 要求 1):connector tool 清單只剩 arcrun_*,並移除壞掉/
重複的 u6u_ workflow tool(deploy/execute/get/list_workflows 由 arcrun_
push/run/get/list_workflows 取代);MCP server name 也由 u6u-mcp-server
改 arcrun-mcp-server。

前綴單一真相源(leo 要求 2):新增 mcp/src/brand.ts(TOOL_PREFIX + toolName()
helper),所有 server.tool() 註冊一律走 toolName("suffix"),前綴不再明碼散寫。
未來 rebrand 只改 brand.ts 一行。

- 12 個獨有能力 tool rename(component/tag/gui/search_workflows)
- 4 個重複/壞掉 tool 移除
- inter-tool hint、描述字串、註解內 u6u_ 名字全數更新
- tsc exit 0;vitest 19/19 綠

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
This commit is contained in:
Claude
2026-07-07 05:21:34 +00:00
parent befc63cfe0
commit 5fc7277c3c
26 changed files with 111 additions and 308 deletions
+5 -4
View File
@@ -11,6 +11,7 @@
*/
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { toolName } from "../brand.js";
import { z } from "zod";
import type { Env } from "../types.js";
import { cypherFetch, errorResponse, successResponse } from "../lib/cypher-client.js";
@@ -20,7 +21,7 @@ const apiKeyDesc =
export function registerValidateYaml(server: McpServer, env: Env) {
server.tool(
"arcrun_validate_yaml",
toolName("validate_yaml"),
"Dry-run YAML 校驗。不部署、無 side effect。回 {valid, errors?, nodeCount, edgeCount}。**永遠先 call 此 tool 再 push_workflow**,避免反覆 deploy 失敗。",
{
api_key: z.string().describe(apiKeyDesc),
@@ -73,7 +74,7 @@ export function registerValidateYaml(server: McpServer, env: Env) {
export function registerListPausedExecutions(server: McpServer, env: Env) {
server.tool(
"arcrun_list_paused_executions",
toolName("list_paused_executions"),
"列當前 api_key 下所有 paused workflow(等 daemon callback resume 的)。給 debug 用:claude_api 等 async 零件會把 workflow 暫停,此 tool 告訴你哪些還沒回來。",
{
api_key: z.string().describe(apiKeyDesc),
@@ -108,7 +109,7 @@ export function registerListPausedExecutions(server: McpServer, env: Env) {
export function registerGetExecutionTrace(server: McpServer, env: Env) {
server.tool(
"arcrun_get_execution_trace",
toolName("get_execution_trace"),
"看單一 paused workflow 的 state 細節(trace、graph、context、pending_result)。task_id 從 paused 錯誤訊息或 list_paused_executions 取得。",
{
api_key: z.string().describe(apiKeyDesc),
@@ -156,7 +157,7 @@ export function registerGetExecutionTrace(server: McpServer, env: Env) {
export function registerListRecentExecutions(server: McpServer, env: Env) {
server.tool(
"arcrun_list_recent_executions",
toolName("list_recent_executions"),
"列某 workflow 最近 N 次執行 verdict(成功 / 失敗 / duration)。資料來源是 ANALYTICS_KV 90 天保留期。",
{
api_key: z.string().describe(apiKeyDesc),