Add channel management feature with public/private channels, membership (owner/member roles), invitations, broadcast messaging, and full MCP tool exposure. New files: - internal/channels/ - types, store, service, validation, errors - internal/mcp/channel_tools.go - 8 MCP tools for channel operations - schema/002_channels.sql - migration for channel_invites table MCP tools: create_channel, join_channel, leave_channel, list_channels, invite_to_channel, kick_from_channel, send_channel_message, update_channel Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 lines
625 B
SQL
15 lines
625 B
SQL
-- Channel invites for private channel membership gating
|
|
CREATE TABLE IF NOT EXISTS channel_invites (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
channel_id INTEGER NOT NULL REFERENCES channels(id) ON DELETE CASCADE,
|
|
agent_name TEXT NOT NULL,
|
|
invited_by TEXT NOT NULL,
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
status TEXT NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'accepted', 'declined')),
|
|
UNIQUE(channel_id, agent_name)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_channel_invites_agent ON channel_invites(agent_name);
|
|
|
|
INSERT OR IGNORE INTO schema_migrations (version) VALUES (2);
|