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>
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
canonical_id: "platform_crypto"
|
||
display_name: "Platform Crypto Primitive"
|
||
category: "platform"
|
||
version: "v1"
|
||
wasi_target: "preview1"
|
||
stability: "stable"
|
||
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: [action]
|
||
properties:
|
||
action:
|
||
type: string
|
||
enum: [generate_api_key, encrypt, random_token]
|
||
email:
|
||
type: string
|
||
description: generate_api_key 用
|
||
plaintext:
|
||
type: string
|
||
description: encrypt 用
|
||
bytes:
|
||
type: integer
|
||
description: random_token 用,預設 32
|
||
output_schema:
|
||
type: object
|
||
properties:
|
||
success:
|
||
type: boolean
|
||
api_key:
|
||
type: string
|
||
description: generate_api_key 結果,ak_ 前綴
|
||
encrypted:
|
||
type: string
|
||
description: encrypt 結果,base64
|
||
iv:
|
||
type: string
|
||
description: encrypt 結果,base64
|
||
token:
|
||
type: string
|
||
description: random_token 結果,hex
|
||
tags: [platform, crypto, internal]
|
||
description: |
|
||
平台內部 crypto primitive。
|
||
- generate_api_key: HMAC-SHA256(email, ENCRYPTION_KEY) → ak_xxx
|
||
- encrypt: AES-GCM(plaintext, ENCRYPTION_KEY) → {encrypted, iv}(base64)
|
||
- random_token: crypto random bytes → hex string
|
||
ENCRYPTION_KEY 由 host 持有,永不進入 WASM。
|