merge: issue #13 步驟2 清 parts.ts 降級零件殘留
telegram/gmail/sheets/line 改走 recipe canonical_id、移除已刪 ai_transform。 TS tsc 過、gmail 讀取留 TODO 不硬塞。自動派工第 2 件共用框架 PR。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+34
-58
@@ -174,27 +174,9 @@ const BUILTIN_COMPONENTS: ComponentDef[] = [
|
|||||||
type: string
|
type: string
|
||||||
format: email`,
|
format: email`,
|
||||||
},
|
},
|
||||||
// ── AI 類 ──────────────────────────────────────────────────────────────────
|
// ── AI 類:已移除 ──────────────────────────────────────────────────────────
|
||||||
{
|
// ai_transform_compile / ai_transform_run 於 2026-05-29 刪除(mindset §2:arcrun 是
|
||||||
canonical_id: 'ai_transform_compile',
|
// AI 呼叫的工具,不是工具回頭呼叫 LLM)。需要 AI 判斷/轉換由操盤的 CC 自己做。
|
||||||
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}}"`,
|
|
||||||
},
|
|
||||||
// ── API 整合類(Recipe 型,不需 deploy Worker) ────────────────────────────
|
// ── API 整合類(Recipe 型,不需 deploy Worker) ────────────────────────────
|
||||||
{
|
{
|
||||||
canonical_id: 'http_request',
|
canonical_id: 'http_request',
|
||||||
@@ -212,63 +194,57 @@ const BUILTIN_COMPONENTS: ComponentDef[] = [
|
|||||||
key: "{{value}}"`,
|
key: "{{value}}"`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
canonical_id: 'gmail',
|
canonical_id: 'gmail_send',
|
||||||
display_name: 'Gmail',
|
display_name: 'Gmail Send',
|
||||||
category: 'api',
|
category: 'api',
|
||||||
description: '寄送 Gmail(需要 gmail_token credential)',
|
description: '透過 recipe 寄送 Gmail(recipe gmail_send,auth: google service_account)。注意:Gmail 讀取尚無對應 recipe(待 seed 補 gmail_list)。',
|
||||||
config_example:
|
config_example:
|
||||||
` mail_node:
|
` # 寄信用內建 recipe gmail_send;body 帶 raw(base64url MIME)
|
||||||
component: gmail
|
mail_node:
|
||||||
to: "recipient@example.com"
|
component: gmail_send
|
||||||
subject: "來自 arcrun 的通知"
|
method: POST
|
||||||
body: "{{message}}"`,
|
body:
|
||||||
credentials_required: [
|
raw: "{{mime_base64url}}"`,
|
||||||
{ key: 'gmail_token', type: 'OAuth2 access token', inject_as: 'access_token' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
canonical_id: 'google_sheets',
|
canonical_id: 'google_sheets_append',
|
||||||
display_name: 'Google Sheets',
|
display_name: 'Google Sheets Append',
|
||||||
category: 'api',
|
category: 'api',
|
||||||
description: 'Google Sheets 讀寫(需要 google_oauth credential)',
|
description: '透過 recipe 追加一列到 Sheets(recipe google_sheets_append;讀取用 google_sheets_read。auth: google service_account)',
|
||||||
config_example:
|
config_example:
|
||||||
` sheet_node:
|
` # 追加用內建 recipe google_sheets_append(讀取改用 google_sheets_read)
|
||||||
component: google_sheets
|
sheet_node:
|
||||||
spreadsheet_id: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"
|
component: google_sheets_append
|
||||||
range: "Sheet1!A:B"
|
method: POST
|
||||||
operation: append
|
_path: "/v4/spreadsheets/{{spreadsheet_id}}/values/Sheet1!A:B:append?valueInputOption=RAW"
|
||||||
|
body:
|
||||||
values:
|
values:
|
||||||
- ["{{name}}", "{{email}}"]`,
|
- ["{{name}}", "{{email}}"]`,
|
||||||
credentials_required: [
|
|
||||||
{ key: 'google_oauth', type: 'OAuth2 access token', inject_as: 'access_token' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
canonical_id: 'telegram',
|
canonical_id: 'telegram_send',
|
||||||
display_name: 'Telegram',
|
display_name: 'Telegram Send',
|
||||||
category: 'api',
|
category: 'api',
|
||||||
description: '發送 Telegram 訊息(需要 telegram_bot_token credential)',
|
description: '透過 recipe 發送 Telegram 訊息(recipe telegram_send,auth: static_key,token 注入 URL path)',
|
||||||
config_example:
|
config_example:
|
||||||
` tg_node:
|
` # 內建 recipe telegram_send(token 由 auth 注入 URL,不寫在這)
|
||||||
component: telegram
|
tg_node:
|
||||||
|
component: telegram_send
|
||||||
chat_id: "123456789"
|
chat_id: "123456789"
|
||||||
text: "{{message}}"`,
|
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',
|
display_name: 'LINE Notify',
|
||||||
category: 'api',
|
category: 'api',
|
||||||
description: '發送 LINE Notify 通知(需要 line_token credential)',
|
description: '透過 recipe 發送 LINE Notify 通知(recipe line_notify_send,auth: static_key Bearer)',
|
||||||
config_example:
|
config_example:
|
||||||
` line_node:
|
` # 內建 recipe line_notify_send(POST notify,body form-urlencoded)
|
||||||
component: line_notify
|
line_node:
|
||||||
|
component: line_notify_send
|
||||||
|
method: POST
|
||||||
|
body:
|
||||||
message: "{{notification}}"`,
|
message: "{{notification}}"`,
|
||||||
credentials_required: [
|
|
||||||
{ key: 'line_token', type: 'LINE Notify token', inject_as: 'token' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
canonical_id: 'notion',
|
canonical_id: 'notion',
|
||||||
|
|||||||
Reference in New Issue
Block a user