diff --git a/cli/src/commands/parts.ts b/cli/src/commands/parts.ts index 6bdf54d..33a3536 100644 --- a/cli/src/commands/parts.ts +++ b/cli/src/commands/parts.ts @@ -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 §2:arcrun 是 + // 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 寄送 Gmail(recipe gmail_send,auth: 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_send;body 帶 raw(base64url 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 追加一列到 Sheets(recipe 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 - values: - - ["{{name}}", "{{email}}"]`, - credentials_required: [ - { key: 'google_oauth', type: 'OAuth2 access token', inject_as: 'access_token' }, - ], +` # 追加用內建 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}}"]`, }, { - 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_send,auth: static_key,token 注入 URL path)', config_example: -` tg_node: - component: telegram +` # 內建 recipe telegram_send(token 由 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_send,auth: static_key Bearer)', config_example: -` line_node: - component: line_notify - message: "{{notification}}"`, - credentials_required: [ - { key: 'line_token', type: 'LINE Notify token', inject_as: 'token' }, - ], +` # 內建 recipe line_notify_send(POST notify,body form-urlencoded) + line_node: + component: line_notify_send + method: POST + body: + message: "{{notification}}"`, }, { canonical_id: 'notion',