generated from coulomb/repo-seed
Adds a message-passing layer to state-hub so Claude instances can coordinate across sessions without polling shared progress events. - Migration f3a4b5c6d7e8: agent_messages table with thread support - FastAPI router: POST/GET /messages/, thread view, mark-read, archive, reply - 4 MCP tools: send_message, get_messages, mark_message_read, reply_to_message - Observable dashboard: /inbox page with unread/read/archived sections + KPI - CLAUDE.md updates: global, custodian, marki-docx, activity-core, template - TOOLS.md: Agent Inbox tools section documented Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
606 B
Python
31 lines
606 B
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class MessageCreate(BaseModel):
|
|
from_agent: str
|
|
to_agent: str
|
|
subject: str
|
|
body: str
|
|
thread_id: uuid.UUID | None = None
|
|
|
|
|
|
class MessageReply(BaseModel):
|
|
from_agent: str
|
|
body: str
|
|
|
|
|
|
class MessageRead(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
id: uuid.UUID
|
|
from_agent: str
|
|
to_agent: str
|
|
subject: str
|
|
body: str
|
|
thread_id: uuid.UUID | None = None
|
|
read_at: datetime | None = None
|
|
archived_at: datetime | None = None
|
|
created_at: datetime
|