canonical_id: "ai_transform_run" display_name: "AI 轉換執行" category: "logic" version: "v1" wasi_target: "preview1" stability: "floating" runtime_compat: - "cf-workers" - "workerd" - "wazero" constraints: max_size_kb: 2048 max_cold_start_ms: 50 no_network_syscall: true no_filesystem_syscall: true io_model: "stdin_stdout_json" input_schema: type: object required: [transform_id, input] properties: transform_id: type: string description: 由 ai_transform_compile 回傳的 ID input: {} output_schema: type: object properties: success: type: boolean data: type: object properties: result: {} transform_id: type: string gherkin_tests: - scenario: "正常執行" given: '{"transform_id":"at-123","input":{"date":"2024-01-15"}}' then_contains: '"transform_id":"at-123"' - scenario: "缺少 transform_id" given: '{"input":{}}' then_contains: '{"success":false' tags: [ai, transform, run, execute] description: "Phase 0 stub:使用 transform_id 執行轉換,目前直接回傳 input。Phase 2 接 AI host function。" config_example: | my_ai_run: # 節點名稱(可自訂) transform_id: "at-abc123" # 由 ai_transform_compile 回傳的轉換 ID(必填) input: {"date": "2024-01-15"} # 要套用轉換的輸入資料(必填)