519423cb0d
- landing/app/mira/wiki: tag=mira-wiki list now shows all wiki paragraphs (depends on KBDB tag filter exposed in matrix/kbdb commit, separate repo) - landing: app/mira hub + feed split + various WIP from prior sessions - registry/components: claude_api / kbdb_create_block / kbdb_get / km_writer / platform_crypto / auth_oauth2 contracts + main.go (accumulated) - .component-builds: pkg-lock updates + index.ts adjustments (WIP) - .agents/specs/arcrun/frontend-redesign: design notes - docs/test_credentials, docs/user_requirements/arcrun-landing-page: WIP docs - cypher-executor: auth-dispatcher / wasi-shim adjustments (WIP) Includes accumulated work from prior sessions plus the wiki UI tag-filter update that surfaces the AI-generated wiki paragraphs at /mira/wiki. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
canonical_id: "claude_api"
|
||
display_name: "Claude AI 對話"
|
||
category: "ai"
|
||
version: "v2"
|
||
wasi_target: "preview1"
|
||
stability: "floating"
|
||
runtime_compat:
|
||
- "cf-workers"
|
||
- "workerd"
|
||
- "wazero"
|
||
constraints:
|
||
max_size_kb: 2048
|
||
max_cold_start_ms: 80
|
||
no_network_syscall: false
|
||
no_filesystem_syscall: true
|
||
io_model: "stdin_stdout_json"
|
||
input_schema:
|
||
type: object
|
||
required: [mira_token, prompt]
|
||
properties:
|
||
mira_token:
|
||
type: string
|
||
description: Mira daemon Bearer token(Hetzner cloud-cto Mira daemon 的 MIRA_TOKEN)
|
||
prompt:
|
||
type: string
|
||
description: 要送給 Mira 的訊息(已內建 Mira 副駕 persona,不需重複設角色)
|
||
mira_url:
|
||
type: string
|
||
description: Mira daemon URL,預設 https://mira.uncle6.me
|
||
default: "https://mira.uncle6.me"
|
||
timeout_ms:
|
||
type: integer
|
||
description: Daemon 協商模式 timeout,預設 25000ms(協商上限)
|
||
default: 25000
|
||
output_schema:
|
||
type: object
|
||
properties:
|
||
success:
|
||
type: boolean
|
||
data:
|
||
type: object
|
||
description: 同步完成時的回應
|
||
properties:
|
||
text: { type: string, description: Mira 的回覆文字 }
|
||
task_id: { type: string }
|
||
model: { type: string, description: 「實際 routing 用的模型(haiku / sonnet)」 }
|
||
pending:
|
||
type: boolean
|
||
description: 「true 時表示 daemon 切到非同步模式,task 還在跑,需 polling」
|
||
task_id:
|
||
type: string
|
||
description: pending=true 時用此 id polling
|
||
poll_url:
|
||
type: string
|
||
description: GET 此 URL 查詢任務進度 / 結果
|
||
error:
|
||
type: string
|
||
gherkin_tests:
|
||
- scenario: "缺 mira_token"
|
||
given: '{"prompt":"hi"}'
|
||
then_contains: '{"success":false'
|
||
- scenario: "簡短對話 25s 內回完"
|
||
given: '{"mira_token":"...","prompt":"1+1=?"}'
|
||
then_contains: 'success'
|
||
tags: [ai, llm, claude, mira, primitive]
|
||
description: "呼叫 Mira daemon (Hetzner cloud-cto) 進行 AI 對話。Daemon 內部用 Claude Agent SDK,內建 Mira 副駕 persona,可長執行任務。所有 mira-app 的 AI workflow(自動回覆、wiki 合成、新聞註解)都用此零件。"
|
||
config_example: |
|
||
ai_reply:
|
||
mira_token: "{{secret.mira_token}}"
|
||
prompt: |
|
||
用戶 leo 在 mira 河道發了這則貼文:
|
||
「{{trigger.post_content}}」
|
||
|
||
請以副駕 AI 的身份留言回應,簡短繁中,務實。
|
||
timeout_ms: 25000
|