Some checks are pending
Documentation Lint & Validation / Markdown Linting (push) Waiting to run
Documentation Lint & Validation / Validate mdBook Configuration (push) Waiting to run
Documentation Lint & Validation / Content & Structure Validation (push) Waiting to run
Documentation Lint & Validation / Lint & Validation Summary (push) Blocked by required conditions
mdBook Build & Deploy / Build mdBook (push) Waiting to run
mdBook Build & Deploy / Documentation Quality Check (push) Blocked by required conditions
mdBook Build & Deploy / Deploy to GitHub Pages (push) Blocked by required conditions
mdBook Build & Deploy / Notification (push) Blocked by required conditions
Rust CI / Security Audit (push) Waiting to run
Rust CI / Check + Test + Lint (nightly) (push) Waiting to run
Rust CI / Check + Test + Lint (stable) (push) Waiting to run
23 lines
1.2 KiB
Plaintext
23 lines
1.2 KiB
Plaintext
-- Migration 007: A2A Tasks Schema
|
|
-- Creates a2a_tasks table for Agent-to-Agent protocol task persistence
|
|
-- Replaces in-memory HashMap with durable storage
|
|
|
|
-- A2A Tasks table
|
|
DEFINE TABLE a2a_tasks SCHEMAFULL;
|
|
|
|
DEFINE FIELD id ON TABLE a2a_tasks TYPE record<a2a_tasks>;
|
|
DEFINE FIELD task_id ON TABLE a2a_tasks TYPE string ASSERT $value != NONE;
|
|
DEFINE FIELD state ON TABLE a2a_tasks TYPE string ASSERT $value INSIDE ["waiting", "working", "completed", "failed"] DEFAULT "waiting";
|
|
DEFINE FIELD message ON TABLE a2a_tasks TYPE option<object>;
|
|
DEFINE FIELD result ON TABLE a2a_tasks TYPE option<object>;
|
|
DEFINE FIELD error ON TABLE a2a_tasks TYPE option<object>;
|
|
DEFINE FIELD metadata ON TABLE a2a_tasks TYPE option<object>;
|
|
DEFINE FIELD created_at ON TABLE a2a_tasks TYPE datetime DEFAULT time::now();
|
|
DEFINE FIELD updated_at ON TABLE a2a_tasks TYPE datetime DEFAULT time::now() VALUE time::now();
|
|
|
|
-- Indexes for efficient queries
|
|
DEFINE INDEX idx_a2a_tasks_task_id ON TABLE a2a_tasks COLUMNS task_id UNIQUE;
|
|
DEFINE INDEX idx_a2a_tasks_state ON TABLE a2a_tasks COLUMNS state;
|
|
DEFINE INDEX idx_a2a_tasks_created_at ON TABLE a2a_tasks COLUMNS created_at;
|
|
DEFINE INDEX idx_a2a_tasks_state_created ON TABLE a2a_tasks COLUMNS state, created_at;
|