zhizhi/persona-brain-db/schema/05-agent-registry.sql

25 lines
1.1 KiB
SQL
Raw Permalink 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.

-- ============================================================
-- 表5agent_registryAgent注册表
-- 用途Phase C Agent集群的注册中心
-- ============================================================
CREATE TABLE IF NOT EXISTS agent_registry (
agent_id VARCHAR(64) PRIMARY KEY,
name VARCHAR(128) NOT NULL,
type VARCHAR(32) NOT NULL
CHECK (type IN (
'code_gen', 'deploy', 'test', 'ui_design',
'data_sync', 'review'
)),
capabilities TEXT, -- JSON object
api_endpoint VARCHAR(256),
status VARCHAR(16) NOT NULL DEFAULT 'registered'
CHECK (status IN (
'registered', 'active', 'suspended', 'retired'
)),
performance TEXT, -- JSON object
assigned_persona VARCHAR(32) REFERENCES persona_identity(persona_id),
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);