Files
Arcrun/registry/components/kbdb_create_block/component.contract.yaml
T
Leo 519423cb0d feat(arcrun): mira wiki page with tag filter + accumulated WIP
- 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>
2026-05-07 16:52:01 +08:00

75 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
canonical_id: "kbdb_create_block"
display_name: "KBDB 建立 Block"
category: "data"
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: false
no_filesystem_syscall: true
io_model: "stdin_stdout_json"
input_schema:
type: object
required: [api_key, content]
properties:
api_key:
type: string
description: KBDB partner keypk_live_xxx 或 ak_xxx
content:
type: string
description: block 內容
type:
type: string
description: block typenote / chat / page 等,預設 block
parent_id:
type: string
description: 父 block id(留言鏈用)
user_id:
type: string
description: 擁有者 user_id / namespace
source:
type: string
description: 來源標記
page_name:
type: string
description: 所屬 page
tags_json:
type: string
description: tags JSON 字串
kbdb_url:
type: string
description: KBDB API base(預設 https://kbdb.finally.click
output_schema:
type: object
properties:
success:
type: boolean
data:
type: object
description: KBDB 回傳(含新 block 的 id
error:
type: string
gherkin_tests:
- scenario: "缺 content"
given: '{"api_key":"pk_live_x"}'
then_contains: '{"success":false'
- scenario: "建立留言(type=chat + parent_id"
given: '{"api_key":"pk_live_x","content":"hi","type":"chat","parent_id":"abc"}'
then_contains: 'success'
tags: [data, storage, kbdb, create, primitive]
description: "建立單一 KBDB blockPOST /blocks),不切多 chunks。支援 parent_id 給留言鏈用。Mira 留言/AI 回覆使用,本零件為 P0 必備。"
config_example: |
reply:
api_key: "{{secret.kbdb_key}}"
content: "我的留言"
type: "chat"
parent_id: "{{previous_node.output.block_id}}"
user_id: "inkstone_leo"
page_name: "my-post"