清 parts.ts 降級零件殘留:telegram/gmail/sheets/line 改走 recipe、移除已刪的 ai_transform(issue #13 步驟2)

telegram/gmail/google_sheets/line_notify 已於 2026-05-29 Phase 2 降級為 recipe,
但 acr parts 仍列舊 component: 形態誤導 CC。參照 notion 樣板改成「走 recipe」描述 +
canonical_id 對齊 api-recipe-seeds.ts(telegram_send/gmail_send/google_sheets_append/line_notify_send)。
ai_transform_compile/run 已刪除(mindset §2),整段移除。
canonical_id 均已核實存在於 cypher-executor/src/lib/api-recipe-seeds.ts。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-06-28 16:05:39 +08:00
parent caa8e103ff
commit 225aa9f9e7
+34 -58
View File
@@ -174,27 +174,9 @@ const BUILTIN_COMPONENTS: ComponentDef[] = [
type: string
format: email`,
},
// ── AI 類 ──────────────────────────────────────────────────────────────────
{
canonical_id: 'ai_transform_compile',
display_name: 'AI Transform Compile',
category: 'ai',
description: '將自然語言規則編譯成可執行轉換程式',
config_example:
` compile_node:
component: ai_transform_compile
rule: "把 name 轉成大寫,並在前面加上 Hello "`,
},
{
canonical_id: 'ai_transform_run',
display_name: 'AI Transform Run',
category: 'ai',
description: '執行 ai_transform_compile 產生的轉換程式',
config_example:
` run_node:
component: ai_transform_run
program: "{{compiled_program}}"`,
},
// ── AI 類:已移除 ──────────────────────────────────────────────────────────
// ai_transform_compile / ai_transform_run 於 2026-05-29 刪除(mindset §2arcrun 是
// AI 呼叫的工具,不是工具回頭呼叫 LLM)。需要 AI 判斷/轉換由操盤的 CC 自己做。
// ── API 整合類(Recipe 型,不需 deploy Worker) ────────────────────────────
{
canonical_id: 'http_request',
@@ -212,63 +194,57 @@ const BUILTIN_COMPONENTS: ComponentDef[] = [
key: "{{value}}"`,
},
{
canonical_id: 'gmail',
display_name: 'Gmail',
canonical_id: 'gmail_send',
display_name: 'Gmail Send',
category: 'api',
description: '寄送 Gmail需要 gmail_token credential',
description: '透過 recipe 寄送 Gmailrecipe gmail_sendauth: google service_account)。注意:Gmail 讀取尚無對應 recipe(待 seed 補 gmail_list)。',
config_example:
` mail_node:
component: gmail
to: "recipient@example.com"
subject: "來自 arcrun 的通知"
body: "{{message}}"`,
credentials_required: [
{ key: 'gmail_token', type: 'OAuth2 access token', inject_as: 'access_token' },
],
` # 寄信用內建 recipe gmail_sendbody 帶 rawbase64url MIME
mail_node:
component: gmail_send
method: POST
body:
raw: "{{mime_base64url}}"`,
},
{
canonical_id: 'google_sheets',
display_name: 'Google Sheets',
canonical_id: 'google_sheets_append',
display_name: 'Google Sheets Append',
category: 'api',
description: 'Google Sheets 讀寫(需要 google_oauth credential',
description: '透過 recipe 追加一列到 Sheetsrecipe google_sheets_append;讀取用 google_sheets_read。auth: google service_account',
config_example:
` sheet_node:
component: google_sheets
spreadsheet_id: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
range: "Sheet1!A:B"
operation: append
` # 追加用內建 recipe google_sheets_append(讀取改用 google_sheets_read
sheet_node:
component: google_sheets_append
method: POST
_path: "/v4/spreadsheets/{{spreadsheet_id}}/values/Sheet1!A:B:append?valueInputOption=RAW"
body:
values:
- ["{{name}}", "{{email}}"]`,
credentials_required: [
{ key: 'google_oauth', type: 'OAuth2 access token', inject_as: 'access_token' },
],
},
{
canonical_id: 'telegram',
display_name: 'Telegram',
canonical_id: 'telegram_send',
display_name: 'Telegram Send',
category: 'api',
description: '發送 Telegram 訊息(需要 telegram_bot_token credential',
description: '透過 recipe 發送 Telegram 訊息(recipe telegram_sendauth: static_keytoken 注入 URL path',
config_example:
` tg_node:
component: telegram
` # 內建 recipe telegram_sendtoken 由 auth 注入 URL,不寫在這)
tg_node:
component: telegram_send
chat_id: "123456789"
text: "{{message}}"`,
credentials_required: [
{ key: 'telegram_bot_token', type: 'Bot token', inject_as: 'bot_token' },
],
},
{
canonical_id: 'line_notify',
canonical_id: 'line_notify_send',
display_name: 'LINE Notify',
category: 'api',
description: '發送 LINE Notify 通知(需要 line_token credential',
description: '透過 recipe 發送 LINE Notify 通知(recipe line_notify_sendauth: static_key Bearer',
config_example:
` line_node:
component: line_notify
` # 內建 recipe line_notify_sendPOST notifybody form-urlencoded
line_node:
component: line_notify_send
method: POST
body:
message: "{{notification}}"`,
credentials_required: [
{ key: 'line_token', type: 'LINE Notify token', inject_as: 'token' },
],
},
{
canonical_id: 'notion',