Add canvas artifact RPC foundation for A2UI
This commit is contained in:
@@ -684,6 +684,44 @@ Return gateway protocol version, node policy status, and feature-gate snapshot.
|
||||
|
||||
Return the operator-facing snapshot of registered node locations.
|
||||
|
||||
### Canvas Methods
|
||||
|
||||
#### `canvas.put`
|
||||
|
||||
Upsert a session-scoped canvas artifact.
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"id": 12,
|
||||
"method": "canvas.put",
|
||||
"params": {
|
||||
"sessionId": "ws:abc123",
|
||||
"artifactId": "summary-card",
|
||||
"type": "note",
|
||||
"title": "Draft Summary",
|
||||
"content": { "markdown": "## Notes" },
|
||||
"metadata": { "lane": "analysis" }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### `canvas.get`
|
||||
|
||||
Fetch a single artifact by id.
|
||||
|
||||
#### `canvas.list`
|
||||
|
||||
List artifacts for a session (newest first).
|
||||
|
||||
#### `canvas.delete`
|
||||
|
||||
Delete a single artifact.
|
||||
|
||||
#### `canvas.clear`
|
||||
|
||||
Delete all artifacts for a session.
|
||||
|
||||
#### `agent.setToolUseCallback`
|
||||
|
||||
Set callback for tool use events (for confirmation UI).
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# Canvas / A2UI Foundation Checklist
|
||||
|
||||
**Date:** 2026-02-16
|
||||
**Scope:** Close OpenClaw "Canvas / A2UI" gap with a first gateway-level artifact API.
|
||||
|
||||
## Goal
|
||||
|
||||
Add a minimal, testable visual-workspace foundation that companion clients/web UI can use to store and retrieve structured session artifacts.
|
||||
|
||||
## Implemented
|
||||
|
||||
- Added in-memory canvas artifact store:
|
||||
- `src/gateway/canvas-store.ts`
|
||||
- Added gateway canvas handlers:
|
||||
- `canvas.put`
|
||||
- `canvas.get`
|
||||
- `canvas.list`
|
||||
- `canvas.delete`
|
||||
- `canvas.clear`
|
||||
- Wired handlers into gateway routing:
|
||||
- `src/gateway/server.ts`
|
||||
- `src/gateway/handlers/index.ts`
|
||||
- Added docs updates:
|
||||
- `README.md`
|
||||
- `docs/api/PROTOCOL.md`
|
||||
|
||||
## Test Coverage
|
||||
|
||||
- `src/gateway/canvas-store.test.ts`
|
||||
- session scoping
|
||||
- update semantics
|
||||
- delete/clear lifecycle
|
||||
- per-session cap eviction
|
||||
- `src/gateway/handlers/handlers.test.ts`
|
||||
- full `canvas.*` lifecycle handler flow
|
||||
- request validation error paths
|
||||
- `src/gateway/server.test.ts`
|
||||
- end-to-end gateway RPC canvas flow
|
||||
|
||||
## Validation Run
|
||||
|
||||
```bash
|
||||
pnpm test:run src/gateway/canvas-store.test.ts src/gateway/handlers/handlers.test.ts src/gateway/server.test.ts
|
||||
pnpm typecheck
|
||||
pnpm build
|
||||
```
|
||||
+25
-3
@@ -495,6 +495,28 @@
|
||||
],
|
||||
"test_status": "pnpm test:run src/gateway/protocol.test.ts src/gateway/auth.test.ts src/gateway/handlers/node.test.ts src/gateway/handlers/handlers.test.ts src/gateway/server.test.ts src/config/schema.test.ts + pnpm typecheck + pnpm build passing"
|
||||
},
|
||||
"canvas-a2ui-foundation": {
|
||||
"file": "2026-02-16-canvas-a2ui-foundation-checklist.md",
|
||||
"status": "completed",
|
||||
"date": "2026-02-16",
|
||||
"updated": "2026-02-16",
|
||||
"summary": "Implemented Canvas/A2UI gateway foundation with session-scoped artifact RPCs (`canvas.put/get/list/delete/clear`), in-memory artifact storage, handler/server wiring, and docs/tests.",
|
||||
"files_created": [
|
||||
"docs/plans/2026-02-16-canvas-a2ui-foundation-checklist.md",
|
||||
"src/gateway/canvas-store.ts",
|
||||
"src/gateway/canvas-store.test.ts",
|
||||
"src/gateway/handlers/canvas.ts"
|
||||
],
|
||||
"files_modified": [
|
||||
"src/gateway/handlers/index.ts",
|
||||
"src/gateway/handlers/handlers.test.ts",
|
||||
"src/gateway/server.ts",
|
||||
"src/gateway/server.test.ts",
|
||||
"README.md",
|
||||
"docs/api/PROTOCOL.md"
|
||||
],
|
||||
"test_status": "pnpm test:run src/gateway/canvas-store.test.ts src/gateway/handlers/handlers.test.ts src/gateway/server.test.ts + pnpm typecheck + pnpm build passing"
|
||||
},
|
||||
"qmd-backend": {
|
||||
"file": "2026-02-16-qmd-backend-checklist.md",
|
||||
"status": "completed",
|
||||
@@ -3056,7 +3078,7 @@
|
||||
}
|
||||
},
|
||||
"overall_progress": {
|
||||
"total_test_count": 1773,
|
||||
"total_test_count": 1780,
|
||||
"all_tests_passing": true,
|
||||
"p0_completion": "3/3 (100%)",
|
||||
"p1_completion": "4/4 (100%)",
|
||||
@@ -3071,12 +3093,12 @@
|
||||
"tier2_completion": "4/4 (100%) — inbound webhooks, vector memory search, Dockerfile, heartbeat monitor",
|
||||
"tier3_completion": "5/5 (100%) — lane queue, credential redaction, web UI token dashboard, xAI (Grok) provider, Voyage AI embeddings",
|
||||
"tier4_completion": "4/4 (100%) — gateway lock, shell completion, Tailscale Serve/Funnel, DM pairing codes",
|
||||
"feature_gap_scorecard": "119/128 match (93%), 0 partial (0%), 9 missing (7%)",
|
||||
"feature_gap_scorecard": "120/128 match (94%), 0 partial (0%), 8 missing (6%)",
|
||||
"operator_dx_milestone": "Phase 3 (Live Ops Dashboard): 2/2 plans complete — milestone done",
|
||||
"gmail_auth_cli": "flynn gmail-auth command implemented with OAuth2 flow, doctor check, config routed to Telegram",
|
||||
"native_audio_support": "completed — smart routing for native audio (Gemini/OpenAI/GitHub) vs Whisper transcription fallback",
|
||||
"remaining_phases_completion": "Phase 1: 3/3 (100%) — context levels, command registry, memory structure. Phase 2: 3/3 (100%) — component registry, confidence routing, history index. Phase 3: 2/2 (100%) — adaptive memory/compaction, truthfulness/autonomy hardening",
|
||||
"next_up": "OpenClaw gap: Canvas / A2UI (open next scoped implementation checklist)"
|
||||
"next_up": "OpenClaw gap: macOS menu bar companion app (open next scoped implementation checklist)"
|
||||
},
|
||||
"soul_md_and_cron_create": {
|
||||
"date": "2026-02-11",
|
||||
|
||||
Reference in New Issue
Block a user