@happyvertical/smrt-chat 0.49.4 → 0.49.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { DATA_DISCOVER_FUNCTION_NAME, DATA_DISCOVER_TOOL_SLUG, DATA_INSPECT_FUNC
8
8
  import { OperationPermissionError, PermissionCatalogService } from "@happyvertical/smrt-users";
9
9
  import { TenantScoped, tenantId } from "@happyvertical/smrt-tenancy";
10
10
  //#region src/__smrt-register__.ts
11
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-chat\",\"packageVersion\":\"0.49.4\",\"objects\":{\"@happyvertical/smrt-chat:AgentSessionCollection\":{\"name\":\"agentsessioncollection\",\"className\":\"AgentSessionCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:AgentSessionCollection\",\"collection\":\"agentsessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/AgentSessionCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"findActiveByParticipant\":{\"name\":\"findActiveByParticipant\",\"async\":true,\"parameters\":[{\"name\":\"participantProfileId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<AgentSession[]>\",\"isStatic\":false,\"isPublic\":true},\"findActiveSession\":{\"name\":\"findActiveSession\",\"async\":true,\"parameters\":[{\"name\":\"agentId\",\"type\":\"string\",\"optional\":false},{\"name\":\"participantProfileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]},{\"name\":\"sessionKey\",\"type\":\"string | null\",\"optional\":true,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<AgentSession | null>\",\"isStatic\":false,\"isPublic\":true},\"findOrCreate\":{\"name\":\"findOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"params\",\"type\":\"object\",\"optional\":false,\"memberTypes\":[\"string\",\"string | null\",\"string[]\"]}],\"returnType\":\"Promise<AgentSession>\",\"isStatic\":false,\"isPublic\":true},\"findByAgent\":{\"name\":\"findByAgent\",\"async\":true,\"parameters\":[{\"name\":\"agentId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<AgentSession[]>\",\"isStatic\":false,\"isPublic\":true},\"expireStale\":{\"name\":\"expireStale\",\"async\":true,\"parameters\":[{\"name\":\"olderThan\",\"type\":\"Date\",\"optional\":false},{\"name\":\"scope\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string | null\",\"string\"]}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"agent_sessions\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"AgentSession\",\"exportName\":\"AgentSessionCollection\",\"collectionExportName\":\"AgentSessionCollectionCollection\",\"schema\":{\"tableName\":\"agent_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"agent_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"agent_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"participant_profile_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID,\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"allowed_tools\\\" TEXT DEFAULT '[]',\\n \\\"session_context\\\" TEXT DEFAULT '{}',\\n \\\"system_prompt\\\" TEXT DEFAULT '',\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"total_tokens_used\\\" INTEGER DEFAULT 0,\\n \\\"max_tokens\\\" INTEGER DEFAULT 0,\\n \\\"max_messages\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"expires_at\\\" TIMESTAMP,\\n \\\"closed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"agent_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"participant_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"allowed_tools\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"},\"session_context\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"system_prompt\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"total_tokens_used\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_tokens\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_messages\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"closed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"agent_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"agent_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"agent_sessions_participant_profile_id_idx\",\"columns\":[\"participant_profile_id\"]},{\"name\":\"agent_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]}],\"version\":\"43eaea36\"}},\"@happyvertical/smrt-chat:ChatMessageCollection\":{\"name\":\"chatmessagecollection\",\"className\":\"ChatMessageCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatMessageCollection\",\"collection\":\"chatmessages\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatMessageCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByRoom\":{\"name\":\"getByRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"number\",\"string\"]}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"getByThread\":{\"name\":\"getByThread\",\"async\":true,\"parameters\":[{\"name\":\"threadId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"getByAgentSession\":{\"name\":\"getByAgentSession\",\"async\":true,\"parameters\":[{\"name\":\"agentSessionId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"search\":{\"name\":\"search\",\"async\":true,\"parameters\":[{\"name\":\"filters\",\"type\":\"any\",\"optional\":false,\"typeUnresolved\":true}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"getUnreadCount\":{\"name\":\"getUnreadCount\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"lastReadMessageId\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"getLatestPerRoom\":{\"name\":\"getLatestPerRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomIds\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, ChatMessage>>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_messages\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatMessage\",\"exportName\":\"ChatMessageCollection\",\"collectionExportName\":\"ChatMessageCollectionCollection\",\"schema\":{\"tableName\":\"chat_messages\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_messages\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"sender_profile_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID,\\n \\\"content\\\" TEXT DEFAULT '',\\n \\\"message_type\\\" TEXT NOT NULL DEFAULT 'text',\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'user',\\n \\\"is_edited\\\" BOOLEAN DEFAULT FALSE,\\n \\\"edited_at\\\" TIMESTAMP,\\n \\\"is_deleted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"reply_to_message_id\\\" UUID,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"tool_call_data\\\" TEXT,\\n \\\"attachments\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"sender_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"content\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"text\"},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"user\"},\"is_edited\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"edited_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"is_deleted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"reply_to_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"tool_call_data\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"attachments\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"chat_messages_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_messages_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_messages_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_messages_thread_id_idx\",\"columns\":[\"thread_id\"]},{\"name\":\"chat_messages_sender_profile_id_idx\",\"columns\":[\"sender_profile_id\"]},{\"name\":\"chat_messages_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"chat_messages_reply_to_message_id_idx\",\"columns\":[\"reply_to_message_id\"]}],\"version\":\"cca14e75\"}},\"@happyvertical/smrt-chat:ChatParticipantCollection\":{\"name\":\"chatparticipantcollection\",\"className\":\"ChatParticipantCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatParticipantCollection\",\"collection\":\"chatparticipants\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatParticipantCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByRoom\":{\"name\":\"getByRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"getByProfile\":{\"name\":\"getByProfile\",\"async\":true,\"parameters\":[{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"findMembership\":{\"name\":\"findMembership\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<ChatParticipant | null>\",\"isStatic\":false,\"isPublic\":true},\"findActiveMembership\":{\"name\":\"findActiveMembership\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant | null>\",\"isStatic\":false,\"isPublic\":true},\"isActiveMember\":{\"name\":\"isActiveMember\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"getOnlineInRoom\":{\"name\":\"getOnlineInRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"getAdminsInRoom\":{\"name\":\"getAdminsInRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"countInRoom\":{\"name\":\"countInRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_participants\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatParticipant\",\"exportName\":\"ChatParticipantCollection\",\"collectionExportName\":\"ChatParticipantCollectionCollection\",\"schema\":{\"tableName\":\"chat_participants\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_participants\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'member',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"online_status\\\" TEXT NOT NULL DEFAULT 'offline',\\n \\\"last_read_message_id\\\" UUID,\\n \\\"last_seen_at\\\" TIMESTAMP,\\n \\\"joined_at\\\" TIMESTAMP,\\n \\\"nickname\\\" TEXT DEFAULT '',\\n \\\"is_muted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"is_pinned\\\" BOOLEAN DEFAULT FALSE\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"member\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"online_status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"offline\"},\"last_read_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"last_seen_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"joined_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"nickname\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_muted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"is_pinned\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false}},\"indexes\":[{\"name\":\"chat_participants_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_participants_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_participants_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_participants_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"chat_participants_last_read_message_id_idx\",\"columns\":[\"last_read_message_id\"]}],\"version\":\"07714046\"}},\"@happyvertical/smrt-chat:ChatReactionCollection\":{\"name\":\"chatreactioncollection\",\"className\":\"ChatReactionCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatReactionCollection\",\"collection\":\"chatreactions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatReactionCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByMessage\":{\"name\":\"getByMessage\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatReaction[]>\",\"isStatic\":false,\"isPublic\":true},\"getReactionCounts\":{\"name\":\"getReactionCounts\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, object>>\",\"isStatic\":false,\"isPublic\":true},\"toggle\":{\"name\":\"toggle\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"emoji\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<object>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_reactions\",\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatReaction\",\"exportName\":\"ChatReactionCollection\",\"collectionExportName\":\"ChatReactionCollectionCollection\",\"schema\":{\"tableName\":\"chat_reactions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_reactions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"message_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"emoji\\\" TEXT NOT NULL DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"emoji\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"chat_reactions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_reactions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_reactions_message_id_idx\",\"columns\":[\"message_id\"]},{\"name\":\"chat_reactions_profile_id_idx\",\"columns\":[\"profile_id\"]}],\"version\":\"5b1969a6\"}},\"@happyvertical/smrt-chat:ChatRoomCollection\":{\"name\":\"chatroomcollection\",\"className\":\"ChatRoomCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatRoomCollection\",\"collection\":\"chatrooms\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatRoomCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"findByType\":{\"name\":\"findByType\",\"async\":true,\"parameters\":[{\"name\":\"roomType\",\"type\":\"ChatRoomType\",\"optional\":false}],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findPublic\":{\"name\":\"findPublic\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findDMs\":{\"name\":\"findDMs\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findAgentRooms\":{\"name\":\"findAgentRooms\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"search\":{\"name\":\"search\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"number\"]}],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findOrCreateDM\":{\"name\":\"findOrCreateDM\",\"async\":true,\"parameters\":[{\"name\":\"profileId1\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId2\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"participants\",\"type\":\"ChatParticipantCollection\",\"optional\":false}],\"returnType\":\"Promise<ChatRoom>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_rooms\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatRoom\",\"exportName\":\"ChatRoomCollection\",\"collectionExportName\":\"ChatRoomCollectionCollection\",\"schema\":{\"tableName\":\"chat_rooms\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_rooms\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" TEXT DEFAULT '',\\n \\\"room_type\\\" TEXT NOT NULL DEFAULT 'public',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"topic\\\" TEXT DEFAULT '',\\n \\\"avatar_url\\\" TEXT DEFAULT '',\\n \\\"is_archived\\\" BOOLEAN DEFAULT FALSE,\\n \\\"max_participants\\\" INTEGER DEFAULT 0,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"created_by_profile_id\\\" UUID,\\n \\\"last_message_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"room_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"public\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"topic\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"avatar_url\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_archived\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"max_participants\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"created_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"chat_rooms_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_rooms_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_rooms_created_by_profile_id_idx\",\"columns\":[\"created_by_profile_id\"]}],\"version\":\"3665d881\"}},\"@happyvertical/smrt-chat:ChatThreadCollection\":{\"name\":\"chatthreadcollection\",\"className\":\"ChatThreadCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatThreadCollection\",\"collection\":\"chatthreads\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatThreadCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByRoom\":{\"name\":\"getByRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatThread[]>\",\"isStatic\":false,\"isPublic\":true},\"getActive\":{\"name\":\"getActive\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatThread[]>\",\"isStatic\":false,\"isPublic\":true},\"getUnresolved\":{\"name\":\"getUnresolved\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatThread[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_threads\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatThread\",\"exportName\":\"ChatThreadCollection\",\"collectionExportName\":\"ChatThreadCollectionCollection\",\"schema\":{\"tableName\":\"chat_threads\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_threads\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"root_message_id\\\" UUID,\\n \\\"title\\\" TEXT DEFAULT '',\\n \\\"is_resolved\\\" BOOLEAN DEFAULT FALSE,\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"participant_count\\\" INTEGER DEFAULT 0\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"root_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"title\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_resolved\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"participant_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0}},\"indexes\":[{\"name\":\"chat_threads_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_threads_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_threads_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_threads_root_message_id_idx\",\"columns\":[\"root_message_id\"]}],\"version\":\"e1ae958b\"}},\"@happyvertical/smrt-chat:VoiceGatewayTurnCollection\":{\"name\":\"voicegatewayturncollection\",\"className\":\"VoiceGatewayTurnCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceGatewayTurnCollection\",\"collection\":\"voicegatewayturns\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/VoiceGatewayTurnCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"reserveTurn\":{\"name\":\"reserveTurn\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"object\",\"optional\":false,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<VoiceGatewayTurn>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_gateway_turns\",\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"VoiceGatewayTurn\",\"exportName\":\"VoiceGatewayTurnCollection\",\"collectionExportName\":\"VoiceGatewayTurnCollectionCollection\",\"schema\":{\"tableName\":\"voice_gateway_turns\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_gateway_turns\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"voice_session_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"gateway_turn_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'processing',\\n \\\"completed_at\\\" TIMESTAMP,\\n \\\"failed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"voice_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"voice_sessions\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"processing\"},\"completed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"failed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"voice_gateway_turns_voice_session_id_gateway_turn_id_idx\",\"columns\":[\"voice_session_id\",\"gateway_turn_id\"],\"unique\":true},{\"name\":\"voice_gateway_turns_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"voice_gateway_turns_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"c4d871b8\"}},\"@happyvertical/smrt-chat:VoiceSessionCollection\":{\"name\":\"voicesessioncollection\",\"className\":\"VoiceSessionCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceSessionCollection\",\"collection\":\"voicesessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/VoiceSessionCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getActiveById\":{\"name\":\"getActiveById\",\"async\":true,\"parameters\":[{\"name\":\"id\",\"type\":\"string\",\"optional\":false},{\"name\":\"target\",\"type\":\"any\",\"optional\":true,\"default\":\"smrt:chat\"}],\"returnType\":\"Promise<VoiceSession | null>\",\"isStatic\":false,\"isPublic\":true},\"expireStale\":{\"name\":\"expireStale\",\"async\":true,\"parameters\":[{\"name\":\"olderThan\",\"type\":\"Date\",\"optional\":true},{\"name\":\"scope\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_sessions\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"VoiceSession\",\"exportName\":\"VoiceSessionCollection\",\"collectionExportName\":\"VoiceSessionCollectionCollection\",\"schema\":{\"tableName\":\"voice_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"actor_profile_id\\\" UUID NOT NULL,\\n \\\"actor_user_id\\\" UUID,\\n \\\"persona_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"expires_at\\\" TIMESTAMP NOT NULL,\\n \\\"last_turn_at\\\" TIMESTAMP,\\n \\\"last_gateway_turn_id\\\" TEXT,\\n \\\"persona_snapshot\\\" TEXT DEFAULT '{}',\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"processed_turn_ids\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"actor_user_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"persona_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"unique\":false},\"last_turn_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"last_gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"persona_snapshot\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"processed_turn_ids\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"voice_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"voice_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"voice_sessions_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]},{\"name\":\"voice_sessions_actor_user_id_idx\",\"columns\":[\"actor_user_id\"]},{\"name\":\"voice_sessions_persona_id_idx\",\"columns\":[\"persona_id\"]},{\"name\":\"voice_sessions_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"voice_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]},{\"name\":\"voice_sessions_thread_id_idx\",\"columns\":[\"thread_id\"]}],\"version\":\"d5cfb90c\"}},\"@happyvertical/smrt-chat:AgentSession\":{\"name\":\"agentsession\",\"className\":\"AgentSession\",\"qualifiedName\":\"@happyvertical/smrt-chat:AgentSession\",\"collection\":\"agentsessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/AgentSession.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"agentId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"participantProfileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"chatRoomId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatRoom\"},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"allowedTools\":{\"type\":\"text\",\"required\":false,\"default\":\"[]\"},\"sessionContext\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"systemPrompt\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"messageCount\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"totalTokensUsed\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"maxTokens\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"maxMessages\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"lastMessageAt\":{\"type\":\"datetime\",\"required\":false},\"expiresAt\":{\"type\":\"datetime\",\"required\":false},\"closedAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getAllowedTools\":{\"name\":\"getAllowedTools\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"setAllowedTools\":{\"name\":\"setAllowedTools\",\"async\":false,\"parameters\":[{\"name\":\"tools\",\"type\":\"string[]\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"isToolAllowed\":{\"name\":\"isToolAllowed\",\"async\":false,\"parameters\":[{\"name\":\"toolName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isExpired\":{\"name\":\"isExpired\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"close\":{\"name\":\"close\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"expire\":{\"name\":\"expire\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getSessionContext\":{\"name\":\"getSessionContext\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setSessionContext\":{\"name\":\"setSessionContext\",\"async\":false,\"parameters\":[{\"name\":\"ctx\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getSessionKey\":{\"name\":\"getSessionKey\",\"async\":false,\"parameters\":[],\"returnType\":\"string | null\",\"isStatic\":false,\"isPublic\":true},\"updateSessionContext\":{\"name\":\"updateSessionContext\",\"async\":true,\"parameters\":[{\"name\":\"updates\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recordMessage\":{\"name\":\"recordMessage\",\"async\":true,\"parameters\":[{\"name\":\"tokensUsed\",\"type\":\"number\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"agent_sessions\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"AgentSession\",\"collectionExportName\":\"AgentSessionCollection\",\"validationRules\":[{\"field\":\"agentId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"participantProfileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"agent_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"agent_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"agent_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"participant_profile_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID,\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"allowed_tools\\\" TEXT DEFAULT '[]',\\n \\\"session_context\\\" TEXT DEFAULT '{}',\\n \\\"system_prompt\\\" TEXT DEFAULT '',\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"total_tokens_used\\\" INTEGER DEFAULT 0,\\n \\\"max_tokens\\\" INTEGER DEFAULT 0,\\n \\\"max_messages\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"expires_at\\\" TIMESTAMP,\\n \\\"closed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"agent_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"participant_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"allowed_tools\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"},\"session_context\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"system_prompt\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"total_tokens_used\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_tokens\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_messages\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"closed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"agent_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"agent_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"agent_sessions_participant_profile_id_idx\",\"columns\":[\"participant_profile_id\"]},{\"name\":\"agent_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]}],\"version\":\"43eaea36\"}},\"@happyvertical/smrt-chat:ChatMessage\":{\"name\":\"chatmessage\",\"className\":\"ChatMessage\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatMessage\",\"collection\":\"chatmessages\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatMessage.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"roomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"threadId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatThread\"},\"senderProfileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"agentSessionId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"AgentSession\"},\"content\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"messageType\":{\"type\":\"text\",\"required\":true,\"default\":\"text\",\"_meta\":{\"required\":true}},\"role\":{\"type\":\"text\",\"required\":true,\"default\":\"user\",\"_meta\":{\"required\":true}},\"isEdited\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"editedAt\":{\"type\":\"datetime\",\"required\":false},\"isDeleted\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"replyToMessageId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatMessage\"},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"toolCallData\":{\"type\":\"text\",\"required\":false},\"attachments\":{\"type\":\"text\",\"required\":false,\"default\":\"[]\"}},\"methods\":{\"getAttachments\":{\"name\":\"getAttachments\",\"async\":false,\"parameters\":[],\"returnType\":\"Array<object>\",\"isStatic\":false,\"isPublic\":true},\"setAttachments\":{\"name\":\"setAttachments\",\"async\":false,\"parameters\":[{\"name\":\"items\",\"type\":\"Array<object>\",\"optional\":false,\"memberTypes\":[\"string\",\"number\"]}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getToolCallData\":{\"name\":\"getToolCallData\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown> | null\",\"isStatic\":false,\"isPublic\":true},\"setToolCallData\":{\"name\":\"setToolCallData\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string, unknown> | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"Record<string, unknown>\"},{\"type\":\"null\"}]}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"hasAttachments\":{\"name\":\"hasAttachments\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isToolCall\":{\"name\":\"isToolCall\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isToolResult\":{\"name\":\"isToolResult\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isFromAgent\":{\"name\":\"isFromAgent\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isSystemMessage\":{\"name\":\"isSystemMessage\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"edit\":{\"name\":\"edit\",\"async\":true,\"parameters\":[{\"name\":\"newContent\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"softDelete\":{\"name\":\"softDelete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getPreview\":{\"name\":\"getPreview\",\"async\":false,\"parameters\":[{\"name\":\"maxLength\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"string\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_messages\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatMessage\",\"collectionExportName\":\"ChatMessageCollection\",\"validationRules\":[{\"field\":\"roomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"senderProfileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"messageType\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"role\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_messages\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_messages\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"sender_profile_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID,\\n \\\"content\\\" TEXT DEFAULT '',\\n \\\"message_type\\\" TEXT NOT NULL DEFAULT 'text',\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'user',\\n \\\"is_edited\\\" BOOLEAN DEFAULT FALSE,\\n \\\"edited_at\\\" TIMESTAMP,\\n \\\"is_deleted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"reply_to_message_id\\\" UUID,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"tool_call_data\\\" TEXT,\\n \\\"attachments\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"sender_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"content\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"text\"},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"user\"},\"is_edited\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"edited_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"is_deleted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"reply_to_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"tool_call_data\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"attachments\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"chat_messages_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_messages_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_messages_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_messages_thread_id_idx\",\"columns\":[\"thread_id\"]},{\"name\":\"chat_messages_sender_profile_id_idx\",\"columns\":[\"sender_profile_id\"]},{\"name\":\"chat_messages_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"chat_messages_reply_to_message_id_idx\",\"columns\":[\"reply_to_message_id\"]}],\"version\":\"cca14e75\"}},\"@happyvertical/smrt-chat:ChatParticipant\":{\"name\":\"chatparticipant\",\"className\":\"ChatParticipant\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatParticipant\",\"collection\":\"chatparticipants\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatParticipant.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"roomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"profileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"role\":{\"type\":\"text\",\"required\":true,\"default\":\"member\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"onlineStatus\":{\"type\":\"text\",\"required\":true,\"default\":\"offline\",\"_meta\":{\"required\":true}},\"lastReadMessageId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatMessage\"},\"lastSeenAt\":{\"type\":\"datetime\",\"required\":false},\"joinedAt\":{\"type\":\"datetime\",\"required\":false},\"nickname\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"isMuted\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"isPinned\":{\"type\":\"boolean\",\"required\":false,\"default\":false}},\"methods\":{\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isOwner\":{\"name\":\"isOwner\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isAdmin\":{\"name\":\"isAdmin\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"markRead\":{\"name\":\"markRead\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"leave\":{\"name\":\"leave\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"setOnline\":{\"name\":\"setOnline\",\"async\":true,\"parameters\":[{\"name\":\"status\",\"type\":\"OnlineStatus\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_participants\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatParticipant\",\"collectionExportName\":\"ChatParticipantCollection\",\"validationRules\":[{\"field\":\"roomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"profileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"role\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"onlineStatus\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_participants\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_participants\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'member',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"online_status\\\" TEXT NOT NULL DEFAULT 'offline',\\n \\\"last_read_message_id\\\" UUID,\\n \\\"last_seen_at\\\" TIMESTAMP,\\n \\\"joined_at\\\" TIMESTAMP,\\n \\\"nickname\\\" TEXT DEFAULT '',\\n \\\"is_muted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"is_pinned\\\" BOOLEAN DEFAULT FALSE\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"member\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"online_status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"offline\"},\"last_read_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"last_seen_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"joined_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"nickname\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_muted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"is_pinned\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false}},\"indexes\":[{\"name\":\"chat_participants_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_participants_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_participants_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_participants_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"chat_participants_last_read_message_id_idx\",\"columns\":[\"last_read_message_id\"]}],\"version\":\"07714046\"}},\"@happyvertical/smrt-chat:ChatReaction\":{\"name\":\"chatreaction\",\"className\":\"ChatReaction\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatReaction\",\"collection\":\"chatreactions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatReaction.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"messageId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatMessage\",\"_meta\":{\"required\":true}},\"profileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"emoji\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}}},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"chat_reactions\",\"api\":{\"include\":[\"list\"]},\"mcp\":{\"include\":[\"list\"]},\"cli\":false,\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatReaction\",\"collectionExportName\":\"ChatReactionCollection\",\"validationRules\":[{\"field\":\"messageId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"profileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"emoji\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_reactions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_reactions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"message_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"emoji\\\" TEXT NOT NULL DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"emoji\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"chat_reactions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_reactions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_reactions_message_id_idx\",\"columns\":[\"message_id\"]},{\"name\":\"chat_reactions_profile_id_idx\",\"columns\":[\"profile_id\"]}],\"version\":\"5b1969a6\"}},\"@happyvertical/smrt-chat:ChatRoom\":{\"name\":\"chatroom\",\"className\":\"ChatRoom\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatRoom\",\"collection\":\"chatrooms\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatRoom.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"name\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"description\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"roomType\":{\"type\":\"text\",\"required\":true,\"default\":\"public\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"topic\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"avatarUrl\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"isArchived\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"maxParticipants\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"createdByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"lastMessageAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"ChatRoomMetadata\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"ChatRoomMetadata\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"updates\",\"type\":\"ChatRoomMetadata\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"isDM\":{\"name\":\"isDM\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isAgentRoom\":{\"name\":\"isAgentRoom\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isPublic\":{\"name\":\"isPublic\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"archive\":{\"name\":\"archive\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"unarchive\":{\"name\":\"unarchive\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_rooms\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatRoom\",\"collectionExportName\":\"ChatRoomCollection\",\"validationRules\":[{\"field\":\"roomType\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_rooms\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_rooms\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" TEXT DEFAULT '',\\n \\\"room_type\\\" TEXT NOT NULL DEFAULT 'public',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"topic\\\" TEXT DEFAULT '',\\n \\\"avatar_url\\\" TEXT DEFAULT '',\\n \\\"is_archived\\\" BOOLEAN DEFAULT FALSE,\\n \\\"max_participants\\\" INTEGER DEFAULT 0,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"created_by_profile_id\\\" UUID,\\n \\\"last_message_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"room_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"public\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"topic\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"avatar_url\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_archived\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"max_participants\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"created_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"chat_rooms_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_rooms_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_rooms_created_by_profile_id_idx\",\"columns\":[\"created_by_profile_id\"]}],\"version\":\"3665d881\"}},\"@happyvertical/smrt-chat:ChatThread\":{\"name\":\"chatthread\",\"className\":\"ChatThread\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatThread\",\"collection\":\"chatthreads\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatThread.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"roomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"rootMessageId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatMessage\",\"_meta\":{\"nullable\":true}},\"title\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"isResolved\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"messageCount\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"lastMessageAt\":{\"type\":\"datetime\",\"required\":false},\"participantCount\":{\"type\":\"integer\",\"required\":false,\"default\":0}},\"methods\":{\"resolve\":{\"name\":\"resolve\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"reopen\":{\"name\":\"reopen\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_threads\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatThread\",\"collectionExportName\":\"ChatThreadCollection\",\"validationRules\":[{\"field\":\"roomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"}],\"schema\":{\"tableName\":\"chat_threads\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_threads\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"root_message_id\\\" UUID,\\n \\\"title\\\" TEXT DEFAULT '',\\n \\\"is_resolved\\\" BOOLEAN DEFAULT FALSE,\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"participant_count\\\" INTEGER DEFAULT 0\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"root_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"title\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_resolved\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"participant_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0}},\"indexes\":[{\"name\":\"chat_threads_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_threads_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_threads_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_threads_root_message_id_idx\",\"columns\":[\"root_message_id\"]}],\"version\":\"e1ae958b\"}},\"@happyvertical/smrt-chat:VoiceGatewayTurn\":{\"name\":\"voicegatewayturn\",\"className\":\"VoiceGatewayTurn\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceGatewayTurn\",\"collection\":\"voicegatewayturns\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/VoiceGatewayTurn.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"voiceSessionId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"VoiceSession\",\"_meta\":{\"required\":true}},\"gatewaySessionId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"gatewayTurnId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"target\":{\"type\":\"text\",\"required\":true,\"default\":\"smrt:chat\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"processing\",\"_meta\":{\"required\":true}},\"completedAt\":{\"type\":\"datetime\",\"required\":false},\"failedAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"complete\":{\"name\":\"complete\",\"async\":true,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"fail\":{\"name\":\"fail\",\"async\":true,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_gateway_turns\",\"conflictColumns\":[\"voice_session_id\",\"gateway_turn_id\"],\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":false,\"tenantScoped\":{\"mode\":\"required\"}},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceGatewayTurn\",\"collectionExportName\":\"VoiceGatewayTurnCollection\",\"validationRules\":[{\"field\":\"voiceSessionId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"gatewaySessionId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"gatewayTurnId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"target\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"voice_gateway_turns\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_gateway_turns\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"voice_session_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"gateway_turn_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'processing',\\n \\\"completed_at\\\" TIMESTAMP,\\n \\\"failed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"voice_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"voice_sessions\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"processing\"},\"completed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"failed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"voice_gateway_turns_voice_session_id_gateway_turn_id_idx\",\"columns\":[\"voice_session_id\",\"gateway_turn_id\"],\"unique\":true},{\"name\":\"voice_gateway_turns_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"voice_gateway_turns_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"c4d871b8\"}},\"@happyvertical/smrt-chat:VoiceSession\":{\"name\":\"voicesession\",\"className\":\"VoiceSession\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceSession\",\"collection\":\"voicesessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/VoiceSession.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"gatewaySessionId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"actorProfileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"actorUserId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-users:User\",\"_meta\":{\"nullable\":true}},\"personaId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-personas:AgentPersona\"},\"agentSessionId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"AgentSession\",\"_meta\":{\"required\":true}},\"chatRoomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"threadId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatThread\"},\"target\":{\"type\":\"text\",\"required\":true,\"default\":\"smrt:chat\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"expiresAt\":{\"type\":\"datetime\",\"required\":true,\"_meta\":{\"required\":true}},\"lastTurnAt\":{\"type\":\"datetime\",\"required\":false},\"lastGatewayTurnId\":{\"type\":\"text\",\"required\":false},\"personaSnapshot\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"processedTurnIds\":{\"type\":\"text\",\"required\":false,\"default\":\"[]\"}},\"methods\":{\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isExpired\":{\"name\":\"isExpired\",\"async\":false,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"expire\":{\"name\":\"expire\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"revoke\":{\"name\":\"revoke\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getPersonaSnapshot\":{\"name\":\"getPersonaSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"ConversationPersona\",\"isStatic\":false,\"isPublic\":true},\"setPersonaSnapshot\":{\"name\":\"setPersonaSnapshot\",\"async\":false,\"parameters\":[{\"name\":\"persona\",\"type\":\"ConversationPersona\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getProcessedTurnIds\":{\"name\":\"getProcessedTurnIds\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"hasProcessedTurn\":{\"name\":\"hasProcessedTurn\",\"async\":false,\"parameters\":[{\"name\":\"turnId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"recordGatewayTurn\":{\"name\":\"recordGatewayTurn\",\"async\":false,\"parameters\":[{\"name\":\"turnId\",\"type\":\"string\",\"optional\":false},{\"name\":\"maxRememberedTurns\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_sessions\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceSession\",\"collectionExportName\":\"VoiceSessionCollection\",\"validationRules\":[{\"field\":\"gatewaySessionId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"actorProfileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"personaId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"agentSessionId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"chatRoomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"target\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"expiresAt\",\"rule\":\"required\",\"fieldType\":\"datetime\"}],\"schema\":{\"tableName\":\"voice_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"actor_profile_id\\\" UUID NOT NULL,\\n \\\"actor_user_id\\\" UUID,\\n \\\"persona_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"expires_at\\\" TIMESTAMP NOT NULL,\\n \\\"last_turn_at\\\" TIMESTAMP,\\n \\\"last_gateway_turn_id\\\" TEXT,\\n \\\"persona_snapshot\\\" TEXT DEFAULT '{}',\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"processed_turn_ids\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"actor_user_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"persona_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"unique\":false},\"last_turn_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"last_gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"persona_snapshot\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"processed_turn_ids\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"voice_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"voice_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"voice_sessions_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]},{\"name\":\"voice_sessions_actor_user_id_idx\",\"columns\":[\"actor_user_id\"]},{\"name\":\"voice_sessions_persona_id_idx\",\"columns\":[\"persona_id\"]},{\"name\":\"voice_sessions_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"voice_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]},{\"name\":\"voice_sessions_thread_id_idx\",\"columns\":[\"thread_id\"]}],\"version\":\"d5cfb90c\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-agents\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-personas\",\"@happyvertical/smrt-profiles\",\"@happyvertical/smrt-tenancy\",\"@happyvertical/smrt-users\"]}"));
11
+ ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-chat\",\"packageVersion\":\"0.49.6\",\"objects\":{\"@happyvertical/smrt-chat:AgentSessionCollection\":{\"name\":\"agentsessioncollection\",\"className\":\"AgentSessionCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:AgentSessionCollection\",\"collection\":\"agentsessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/AgentSessionCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"findActiveByParticipant\":{\"name\":\"findActiveByParticipant\",\"async\":true,\"parameters\":[{\"name\":\"participantProfileId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<AgentSession[]>\",\"isStatic\":false,\"isPublic\":true},\"findActiveSession\":{\"name\":\"findActiveSession\",\"async\":true,\"parameters\":[{\"name\":\"agentId\",\"type\":\"string\",\"optional\":false},{\"name\":\"participantProfileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]},{\"name\":\"sessionKey\",\"type\":\"string | null\",\"optional\":true,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<AgentSession | null>\",\"isStatic\":false,\"isPublic\":true},\"findOrCreate\":{\"name\":\"findOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"params\",\"type\":\"object\",\"optional\":false,\"memberTypes\":[\"string\",\"string | null\",\"string[]\"]}],\"returnType\":\"Promise<AgentSession>\",\"isStatic\":false,\"isPublic\":true},\"findByAgent\":{\"name\":\"findByAgent\",\"async\":true,\"parameters\":[{\"name\":\"agentId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<AgentSession[]>\",\"isStatic\":false,\"isPublic\":true},\"expireStale\":{\"name\":\"expireStale\",\"async\":true,\"parameters\":[{\"name\":\"olderThan\",\"type\":\"Date\",\"optional\":false},{\"name\":\"scope\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string | null\",\"string\"]}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"agent_sessions\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"AgentSession\",\"exportName\":\"AgentSessionCollection\",\"collectionExportName\":\"AgentSessionCollectionCollection\",\"schema\":{\"tableName\":\"agent_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"agent_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"agent_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"participant_profile_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID,\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"allowed_tools\\\" TEXT DEFAULT '[]',\\n \\\"session_context\\\" TEXT DEFAULT '{}',\\n \\\"system_prompt\\\" TEXT DEFAULT '',\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"total_tokens_used\\\" INTEGER DEFAULT 0,\\n \\\"max_tokens\\\" INTEGER DEFAULT 0,\\n \\\"max_messages\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"expires_at\\\" TIMESTAMP,\\n \\\"closed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"agent_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"participant_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"allowed_tools\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"},\"session_context\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"system_prompt\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"total_tokens_used\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_tokens\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_messages\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"closed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"agent_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"agent_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"agent_sessions_participant_profile_id_idx\",\"columns\":[\"participant_profile_id\"]},{\"name\":\"agent_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]}],\"version\":\"43eaea36\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatMessageCollection\":{\"name\":\"chatmessagecollection\",\"className\":\"ChatMessageCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatMessageCollection\",\"collection\":\"chatmessages\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatMessageCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByRoom\":{\"name\":\"getByRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"number\",\"string\"]}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"getByThread\":{\"name\":\"getByThread\",\"async\":true,\"parameters\":[{\"name\":\"threadId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"getByAgentSession\":{\"name\":\"getByAgentSession\",\"async\":true,\"parameters\":[{\"name\":\"agentSessionId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"search\":{\"name\":\"search\",\"async\":true,\"parameters\":[{\"name\":\"filters\",\"type\":\"any\",\"optional\":false,\"typeUnresolved\":true}],\"returnType\":\"Promise<ChatMessage[]>\",\"isStatic\":false,\"isPublic\":true},\"getUnreadCount\":{\"name\":\"getUnreadCount\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"lastReadMessageId\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"getLatestPerRoom\":{\"name\":\"getLatestPerRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomIds\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, ChatMessage>>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_messages\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatMessage\",\"exportName\":\"ChatMessageCollection\",\"collectionExportName\":\"ChatMessageCollectionCollection\",\"schema\":{\"tableName\":\"chat_messages\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_messages\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"sender_profile_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID,\\n \\\"content\\\" TEXT DEFAULT '',\\n \\\"message_type\\\" TEXT NOT NULL DEFAULT 'text',\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'user',\\n \\\"is_edited\\\" BOOLEAN DEFAULT FALSE,\\n \\\"edited_at\\\" TIMESTAMP,\\n \\\"is_deleted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"reply_to_message_id\\\" UUID,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"tool_call_data\\\" TEXT,\\n \\\"attachments\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"sender_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"content\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"text\"},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"user\"},\"is_edited\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"edited_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"is_deleted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"reply_to_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"tool_call_data\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"attachments\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"chat_messages_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_messages_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_messages_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_messages_thread_id_idx\",\"columns\":[\"thread_id\"]},{\"name\":\"chat_messages_sender_profile_id_idx\",\"columns\":[\"sender_profile_id\"]},{\"name\":\"chat_messages_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"chat_messages_reply_to_message_id_idx\",\"columns\":[\"reply_to_message_id\"]}],\"version\":\"cca14e75\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatParticipantCollection\":{\"name\":\"chatparticipantcollection\",\"className\":\"ChatParticipantCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatParticipantCollection\",\"collection\":\"chatparticipants\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatParticipantCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByRoom\":{\"name\":\"getByRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"getByProfile\":{\"name\":\"getByProfile\",\"async\":true,\"parameters\":[{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"findMembership\":{\"name\":\"findMembership\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<ChatParticipant | null>\",\"isStatic\":false,\"isPublic\":true},\"findActiveMembership\":{\"name\":\"findActiveMembership\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant | null>\",\"isStatic\":false,\"isPublic\":true},\"isActiveMember\":{\"name\":\"isActiveMember\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"getOnlineInRoom\":{\"name\":\"getOnlineInRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"getAdminsInRoom\":{\"name\":\"getAdminsInRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatParticipant[]>\",\"isStatic\":false,\"isPublic\":true},\"countInRoom\":{\"name\":\"countInRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_participants\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatParticipant\",\"exportName\":\"ChatParticipantCollection\",\"collectionExportName\":\"ChatParticipantCollectionCollection\",\"schema\":{\"tableName\":\"chat_participants\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_participants\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'member',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"online_status\\\" TEXT NOT NULL DEFAULT 'offline',\\n \\\"last_read_message_id\\\" UUID,\\n \\\"last_seen_at\\\" TIMESTAMP,\\n \\\"joined_at\\\" TIMESTAMP,\\n \\\"nickname\\\" TEXT DEFAULT '',\\n \\\"is_muted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"is_pinned\\\" BOOLEAN DEFAULT FALSE\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"member\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"online_status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"offline\"},\"last_read_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"last_seen_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"joined_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"nickname\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_muted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"is_pinned\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false}},\"indexes\":[{\"name\":\"chat_participants_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_participants_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_participants_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_participants_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"chat_participants_last_read_message_id_idx\",\"columns\":[\"last_read_message_id\"]}],\"version\":\"07714046\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatReactionCollection\":{\"name\":\"chatreactioncollection\",\"className\":\"ChatReactionCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatReactionCollection\",\"collection\":\"chatreactions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatReactionCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByMessage\":{\"name\":\"getByMessage\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatReaction[]>\",\"isStatic\":false,\"isPublic\":true},\"getReactionCounts\":{\"name\":\"getReactionCounts\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, object>>\",\"isStatic\":false,\"isPublic\":true},\"toggle\":{\"name\":\"toggle\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId\",\"type\":\"string\",\"optional\":false},{\"name\":\"emoji\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<object>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_reactions\",\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatReaction\",\"exportName\":\"ChatReactionCollection\",\"collectionExportName\":\"ChatReactionCollectionCollection\",\"schema\":{\"tableName\":\"chat_reactions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_reactions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"message_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"emoji\\\" TEXT NOT NULL DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"emoji\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"chat_reactions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_reactions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_reactions_message_id_idx\",\"columns\":[\"message_id\"]},{\"name\":\"chat_reactions_profile_id_idx\",\"columns\":[\"profile_id\"]}],\"version\":\"5b1969a6\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatRoomCollection\":{\"name\":\"chatroomcollection\",\"className\":\"ChatRoomCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatRoomCollection\",\"collection\":\"chatrooms\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatRoomCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"findByType\":{\"name\":\"findByType\",\"async\":true,\"parameters\":[{\"name\":\"roomType\",\"type\":\"ChatRoomType\",\"optional\":false}],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findPublic\":{\"name\":\"findPublic\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findDMs\":{\"name\":\"findDMs\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findAgentRooms\":{\"name\":\"findAgentRooms\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"search\":{\"name\":\"search\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"number\"]}],\"returnType\":\"Promise<ChatRoom[]>\",\"isStatic\":false,\"isPublic\":true},\"findOrCreateDM\":{\"name\":\"findOrCreateDM\",\"async\":true,\"parameters\":[{\"name\":\"profileId1\",\"type\":\"string\",\"optional\":false},{\"name\":\"profileId2\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"participants\",\"type\":\"ChatParticipantCollection\",\"optional\":false}],\"returnType\":\"Promise<ChatRoom>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_rooms\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatRoom\",\"exportName\":\"ChatRoomCollection\",\"collectionExportName\":\"ChatRoomCollectionCollection\",\"schema\":{\"tableName\":\"chat_rooms\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_rooms\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" TEXT DEFAULT '',\\n \\\"room_type\\\" TEXT NOT NULL DEFAULT 'public',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"topic\\\" TEXT DEFAULT '',\\n \\\"avatar_url\\\" TEXT DEFAULT '',\\n \\\"is_archived\\\" BOOLEAN DEFAULT FALSE,\\n \\\"max_participants\\\" INTEGER DEFAULT 0,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"created_by_profile_id\\\" UUID,\\n \\\"last_message_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"room_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"public\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"topic\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"avatar_url\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_archived\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"max_participants\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"created_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"chat_rooms_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_rooms_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_rooms_created_by_profile_id_idx\",\"columns\":[\"created_by_profile_id\"]}],\"version\":\"3665d881\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatThreadCollection\":{\"name\":\"chatthreadcollection\",\"className\":\"ChatThreadCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatThreadCollection\",\"collection\":\"chatthreads\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/ChatThreadCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getByRoom\":{\"name\":\"getByRoom\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatThread[]>\",\"isStatic\":false,\"isPublic\":true},\"getActive\":{\"name\":\"getActive\",\"async\":true,\"parameters\":[{\"name\":\"roomId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ChatThread[]>\",\"isStatic\":false,\"isPublic\":true},\"getUnresolved\":{\"name\":\"getUnresolved\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<ChatThread[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_threads\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"ChatThread\",\"exportName\":\"ChatThreadCollection\",\"collectionExportName\":\"ChatThreadCollectionCollection\",\"schema\":{\"tableName\":\"chat_threads\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_threads\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"root_message_id\\\" UUID,\\n \\\"title\\\" TEXT DEFAULT '',\\n \\\"is_resolved\\\" BOOLEAN DEFAULT FALSE,\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"participant_count\\\" INTEGER DEFAULT 0\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"root_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"title\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_resolved\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"participant_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0}},\"indexes\":[{\"name\":\"chat_threads_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_threads_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_threads_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_threads_root_message_id_idx\",\"columns\":[\"root_message_id\"]}],\"version\":\"e1ae958b\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:VoiceGatewayTurnCollection\":{\"name\":\"voicegatewayturncollection\",\"className\":\"VoiceGatewayTurnCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceGatewayTurnCollection\",\"collection\":\"voicegatewayturns\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/VoiceGatewayTurnCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"reserveTurn\":{\"name\":\"reserveTurn\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"object\",\"optional\":false,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<VoiceGatewayTurn>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_gateway_turns\",\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"VoiceGatewayTurn\",\"exportName\":\"VoiceGatewayTurnCollection\",\"collectionExportName\":\"VoiceGatewayTurnCollectionCollection\",\"schema\":{\"tableName\":\"voice_gateway_turns\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_gateway_turns\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"voice_session_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"gateway_turn_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'processing',\\n \\\"completed_at\\\" TIMESTAMP,\\n \\\"failed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"voice_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"voice_sessions\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"processing\"},\"completed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"failed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"voice_gateway_turns_voice_session_id_gateway_turn_id_idx\",\"columns\":[\"voice_session_id\",\"gateway_turn_id\"],\"unique\":true},{\"name\":\"voice_gateway_turns_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"voice_gateway_turns_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"c4d871b8\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:VoiceSessionCollection\":{\"name\":\"voicesessioncollection\",\"className\":\"VoiceSessionCollection\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceSessionCollection\",\"collection\":\"voicesessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/collections/VoiceSessionCollection.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{},\"methods\":{\"getActiveById\":{\"name\":\"getActiveById\",\"async\":true,\"parameters\":[{\"name\":\"id\",\"type\":\"string\",\"optional\":false},{\"name\":\"target\",\"type\":\"any\",\"optional\":true,\"default\":\"smrt:chat\"}],\"returnType\":\"Promise<VoiceSession | null>\",\"isStatic\":false,\"isPublic\":true},\"expireStale\":{\"name\":\"expireStale\",\"async\":true,\"parameters\":[{\"name\":\"olderThan\",\"type\":\"Date\",\"optional\":true},{\"name\":\"scope\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_sessions\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"VoiceSession\",\"exportName\":\"VoiceSessionCollection\",\"collectionExportName\":\"VoiceSessionCollectionCollection\",\"schema\":{\"tableName\":\"voice_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"actor_profile_id\\\" UUID NOT NULL,\\n \\\"actor_user_id\\\" UUID,\\n \\\"persona_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"expires_at\\\" TIMESTAMP NOT NULL,\\n \\\"last_turn_at\\\" TIMESTAMP,\\n \\\"last_gateway_turn_id\\\" TEXT,\\n \\\"persona_snapshot\\\" TEXT DEFAULT '{}',\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"processed_turn_ids\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"actor_user_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"persona_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"unique\":false},\"last_turn_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"last_gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"persona_snapshot\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"processed_turn_ids\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"voice_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"voice_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"voice_sessions_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]},{\"name\":\"voice_sessions_actor_user_id_idx\",\"columns\":[\"actor_user_id\"]},{\"name\":\"voice_sessions_persona_id_idx\",\"columns\":[\"persona_id\"]},{\"name\":\"voice_sessions_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"voice_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]},{\"name\":\"voice_sessions_thread_id_idx\",\"columns\":[\"thread_id\"]}],\"version\":\"d5cfb90c\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:AgentSession\":{\"name\":\"agentsession\",\"className\":\"AgentSession\",\"qualifiedName\":\"@happyvertical/smrt-chat:AgentSession\",\"collection\":\"agentsessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/AgentSession.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"agentId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"participantProfileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"chatRoomId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatRoom\"},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"allowedTools\":{\"type\":\"text\",\"required\":false,\"default\":\"[]\"},\"sessionContext\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"systemPrompt\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"messageCount\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"totalTokensUsed\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"maxTokens\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"maxMessages\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"lastMessageAt\":{\"type\":\"datetime\",\"required\":false},\"expiresAt\":{\"type\":\"datetime\",\"required\":false},\"closedAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getAllowedTools\":{\"name\":\"getAllowedTools\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"setAllowedTools\":{\"name\":\"setAllowedTools\",\"async\":false,\"parameters\":[{\"name\":\"tools\",\"type\":\"string[]\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"isToolAllowed\":{\"name\":\"isToolAllowed\",\"async\":false,\"parameters\":[{\"name\":\"toolName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isExpired\":{\"name\":\"isExpired\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"close\":{\"name\":\"close\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"expire\":{\"name\":\"expire\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getSessionContext\":{\"name\":\"getSessionContext\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setSessionContext\":{\"name\":\"setSessionContext\",\"async\":false,\"parameters\":[{\"name\":\"ctx\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getSessionKey\":{\"name\":\"getSessionKey\",\"async\":false,\"parameters\":[],\"returnType\":\"string | null\",\"isStatic\":false,\"isPublic\":true},\"updateSessionContext\":{\"name\":\"updateSessionContext\",\"async\":true,\"parameters\":[{\"name\":\"updates\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recordMessage\":{\"name\":\"recordMessage\",\"async\":true,\"parameters\":[{\"name\":\"tokensUsed\",\"type\":\"number\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"agent_sessions\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"AgentSession\",\"collectionExportName\":\"AgentSessionCollection\",\"validationRules\":[{\"field\":\"agentId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"participantProfileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"agent_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"agent_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"agent_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"participant_profile_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID,\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"allowed_tools\\\" TEXT DEFAULT '[]',\\n \\\"session_context\\\" TEXT DEFAULT '{}',\\n \\\"system_prompt\\\" TEXT DEFAULT '',\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"total_tokens_used\\\" INTEGER DEFAULT 0,\\n \\\"max_tokens\\\" INTEGER DEFAULT 0,\\n \\\"max_messages\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"expires_at\\\" TIMESTAMP,\\n \\\"closed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"agent_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"participant_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"allowed_tools\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"},\"session_context\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"system_prompt\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"total_tokens_used\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_tokens\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"max_messages\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"closed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"agent_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"agent_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"agent_sessions_participant_profile_id_idx\",\"columns\":[\"participant_profile_id\"]},{\"name\":\"agent_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]}],\"version\":\"43eaea36\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatMessage\":{\"name\":\"chatmessage\",\"className\":\"ChatMessage\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatMessage\",\"collection\":\"chatmessages\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatMessage.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"roomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"threadId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatThread\"},\"senderProfileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"agentSessionId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"AgentSession\"},\"content\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"messageType\":{\"type\":\"text\",\"required\":true,\"default\":\"text\",\"_meta\":{\"required\":true}},\"role\":{\"type\":\"text\",\"required\":true,\"default\":\"user\",\"_meta\":{\"required\":true}},\"isEdited\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"editedAt\":{\"type\":\"datetime\",\"required\":false},\"isDeleted\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"replyToMessageId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatMessage\"},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"toolCallData\":{\"type\":\"text\",\"required\":false},\"attachments\":{\"type\":\"text\",\"required\":false,\"default\":\"[]\"}},\"methods\":{\"getAttachments\":{\"name\":\"getAttachments\",\"async\":false,\"parameters\":[],\"returnType\":\"Array<object>\",\"isStatic\":false,\"isPublic\":true},\"setAttachments\":{\"name\":\"setAttachments\",\"async\":false,\"parameters\":[{\"name\":\"items\",\"type\":\"Array<object>\",\"optional\":false,\"memberTypes\":[\"string\",\"number\"]}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getToolCallData\":{\"name\":\"getToolCallData\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown> | null\",\"isStatic\":false,\"isPublic\":true},\"setToolCallData\":{\"name\":\"setToolCallData\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string, unknown> | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"Record<string, unknown>\"},{\"type\":\"null\"}]}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"hasAttachments\":{\"name\":\"hasAttachments\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isToolCall\":{\"name\":\"isToolCall\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isToolResult\":{\"name\":\"isToolResult\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isFromAgent\":{\"name\":\"isFromAgent\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isSystemMessage\":{\"name\":\"isSystemMessage\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"edit\":{\"name\":\"edit\",\"async\":true,\"parameters\":[{\"name\":\"newContent\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"softDelete\":{\"name\":\"softDelete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getPreview\":{\"name\":\"getPreview\",\"async\":false,\"parameters\":[{\"name\":\"maxLength\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"string\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_messages\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatMessage\",\"collectionExportName\":\"ChatMessageCollection\",\"validationRules\":[{\"field\":\"roomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"senderProfileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"messageType\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"role\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_messages\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_messages\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"sender_profile_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID,\\n \\\"content\\\" TEXT DEFAULT '',\\n \\\"message_type\\\" TEXT NOT NULL DEFAULT 'text',\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'user',\\n \\\"is_edited\\\" BOOLEAN DEFAULT FALSE,\\n \\\"edited_at\\\" TIMESTAMP,\\n \\\"is_deleted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"reply_to_message_id\\\" UUID,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"tool_call_data\\\" TEXT,\\n \\\"attachments\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"sender_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"content\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"message_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"text\"},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"user\"},\"is_edited\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"edited_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"is_deleted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"reply_to_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"tool_call_data\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"attachments\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"chat_messages_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_messages_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_messages_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_messages_thread_id_idx\",\"columns\":[\"thread_id\"]},{\"name\":\"chat_messages_sender_profile_id_idx\",\"columns\":[\"sender_profile_id\"]},{\"name\":\"chat_messages_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"chat_messages_reply_to_message_id_idx\",\"columns\":[\"reply_to_message_id\"]}],\"version\":\"cca14e75\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatParticipant\":{\"name\":\"chatparticipant\",\"className\":\"ChatParticipant\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatParticipant\",\"collection\":\"chatparticipants\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatParticipant.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"roomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"profileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"role\":{\"type\":\"text\",\"required\":true,\"default\":\"member\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"onlineStatus\":{\"type\":\"text\",\"required\":true,\"default\":\"offline\",\"_meta\":{\"required\":true}},\"lastReadMessageId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatMessage\"},\"lastSeenAt\":{\"type\":\"datetime\",\"required\":false},\"joinedAt\":{\"type\":\"datetime\",\"required\":false},\"nickname\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"isMuted\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"isPinned\":{\"type\":\"boolean\",\"required\":false,\"default\":false}},\"methods\":{\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isOwner\":{\"name\":\"isOwner\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isAdmin\":{\"name\":\"isAdmin\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"markRead\":{\"name\":\"markRead\",\"async\":true,\"parameters\":[{\"name\":\"messageId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"leave\":{\"name\":\"leave\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"setOnline\":{\"name\":\"setOnline\",\"async\":true,\"parameters\":[{\"name\":\"status\",\"type\":\"OnlineStatus\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_participants\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatParticipant\",\"collectionExportName\":\"ChatParticipantCollection\",\"validationRules\":[{\"field\":\"roomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"profileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"role\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"onlineStatus\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_participants\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_participants\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"role\\\" TEXT NOT NULL DEFAULT 'member',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"online_status\\\" TEXT NOT NULL DEFAULT 'offline',\\n \\\"last_read_message_id\\\" UUID,\\n \\\"last_seen_at\\\" TIMESTAMP,\\n \\\"joined_at\\\" TIMESTAMP,\\n \\\"nickname\\\" TEXT DEFAULT '',\\n \\\"is_muted\\\" BOOLEAN DEFAULT FALSE,\\n \\\"is_pinned\\\" BOOLEAN DEFAULT FALSE\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"role\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"member\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"online_status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"offline\"},\"last_read_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"last_seen_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"joined_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"nickname\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_muted\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"is_pinned\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false}},\"indexes\":[{\"name\":\"chat_participants_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_participants_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_participants_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_participants_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"chat_participants_last_read_message_id_idx\",\"columns\":[\"last_read_message_id\"]}],\"version\":\"07714046\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatReaction\":{\"name\":\"chatreaction\",\"className\":\"ChatReaction\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatReaction\",\"collection\":\"chatreactions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatReaction.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"messageId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatMessage\",\"_meta\":{\"required\":true}},\"profileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"emoji\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}}},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"chat_reactions\",\"api\":{\"include\":[\"list\"]},\"mcp\":{\"include\":[\"list\"]},\"cli\":false,\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatReaction\",\"collectionExportName\":\"ChatReactionCollection\",\"validationRules\":[{\"field\":\"messageId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"profileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"emoji\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_reactions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_reactions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"message_id\\\" UUID NOT NULL,\\n \\\"profile_id\\\" UUID NOT NULL,\\n \\\"emoji\\\" TEXT NOT NULL DEFAULT ''\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"emoji\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"}},\"indexes\":[{\"name\":\"chat_reactions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_reactions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_reactions_message_id_idx\",\"columns\":[\"message_id\"]},{\"name\":\"chat_reactions_profile_id_idx\",\"columns\":[\"profile_id\"]}],\"version\":\"5b1969a6\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatRoom\":{\"name\":\"chatroom\",\"className\":\"ChatRoom\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatRoom\",\"collection\":\"chatrooms\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatRoom.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"name\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"description\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"roomType\":{\"type\":\"text\",\"required\":true,\"default\":\"public\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"topic\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"avatarUrl\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"isArchived\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"maxParticipants\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"createdByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"lastMessageAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"ChatRoomMetadata\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"ChatRoomMetadata\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"updates\",\"type\":\"ChatRoomMetadata\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"isDM\":{\"name\":\"isDM\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isAgentRoom\":{\"name\":\"isAgentRoom\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isPublic\":{\"name\":\"isPublic\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"archive\":{\"name\":\"archive\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"unarchive\":{\"name\":\"unarchive\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_rooms\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatRoom\",\"collectionExportName\":\"ChatRoomCollection\",\"validationRules\":[{\"field\":\"roomType\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"chat_rooms\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_rooms\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" TEXT DEFAULT '',\\n \\\"room_type\\\" TEXT NOT NULL DEFAULT 'public',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"topic\\\" TEXT DEFAULT '',\\n \\\"avatar_url\\\" TEXT DEFAULT '',\\n \\\"is_archived\\\" BOOLEAN DEFAULT FALSE,\\n \\\"max_participants\\\" INTEGER DEFAULT 0,\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"created_by_profile_id\\\" UUID,\\n \\\"last_message_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"room_type\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"public\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"topic\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"avatar_url\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_archived\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"max_participants\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"created_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"chat_rooms_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_rooms_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_rooms_created_by_profile_id_idx\",\"columns\":[\"created_by_profile_id\"]}],\"version\":\"3665d881\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:ChatThread\":{\"name\":\"chatthread\",\"className\":\"ChatThread\",\"qualifiedName\":\"@happyvertical/smrt-chat:ChatThread\",\"collection\":\"chatthreads\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/ChatThread.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"roomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"rootMessageId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatMessage\",\"_meta\":{\"nullable\":true}},\"title\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"isResolved\":{\"type\":\"boolean\",\"required\":false,\"default\":false},\"messageCount\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"lastMessageAt\":{\"type\":\"datetime\",\"required\":false},\"participantCount\":{\"type\":\"integer\",\"required\":false,\"default\":0}},\"methods\":{\"resolve\":{\"name\":\"resolve\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"reopen\":{\"name\":\"reopen\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"chat_threads\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ChatThread\",\"collectionExportName\":\"ChatThreadCollection\",\"validationRules\":[{\"field\":\"roomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"}],\"schema\":{\"tableName\":\"chat_threads\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"chat_threads\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"room_id\\\" UUID NOT NULL,\\n \\\"root_message_id\\\" UUID,\\n \\\"title\\\" TEXT DEFAULT '',\\n \\\"is_resolved\\\" BOOLEAN DEFAULT FALSE,\\n \\\"message_count\\\" INTEGER DEFAULT 0,\\n \\\"last_message_at\\\" TIMESTAMP,\\n \\\"participant_count\\\" INTEGER DEFAULT 0\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"root_message_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_messages\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"title\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"\"},\"is_resolved\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false,\"default\":false},\"message_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0},\"last_message_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"participant_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false,\"default\":0}},\"indexes\":[{\"name\":\"chat_threads_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"chat_threads_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"chat_threads_room_id_idx\",\"columns\":[\"room_id\"]},{\"name\":\"chat_threads_root_message_id_idx\",\"columns\":[\"root_message_id\"]}],\"version\":\"e1ae958b\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:VoiceGatewayTurn\":{\"name\":\"voicegatewayturn\",\"className\":\"VoiceGatewayTurn\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceGatewayTurn\",\"collection\":\"voicegatewayturns\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/VoiceGatewayTurn.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"voiceSessionId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"VoiceSession\",\"_meta\":{\"required\":true}},\"gatewaySessionId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"gatewayTurnId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"target\":{\"type\":\"text\",\"required\":true,\"default\":\"smrt:chat\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"processing\",\"_meta\":{\"required\":true}},\"completedAt\":{\"type\":\"datetime\",\"required\":false},\"failedAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"complete\":{\"name\":\"complete\",\"async\":true,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"fail\":{\"name\":\"fail\",\"async\":true,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_gateway_turns\",\"conflictColumns\":[\"voice_session_id\",\"gateway_turn_id\"],\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":false,\"tenantScoped\":{\"mode\":\"required\"}},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceGatewayTurn\",\"collectionExportName\":\"VoiceGatewayTurnCollection\",\"validationRules\":[{\"field\":\"voiceSessionId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"gatewaySessionId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"gatewayTurnId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"target\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"voice_gateway_turns\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_gateway_turns\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"voice_session_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"gateway_turn_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'processing',\\n \\\"completed_at\\\" TIMESTAMP,\\n \\\"failed_at\\\" TIMESTAMP\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"voice_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"voice_sessions\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"processing\"},\"completed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"failed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"voice_gateway_turns_voice_session_id_gateway_turn_id_idx\",\"columns\":[\"voice_session_id\",\"gateway_turn_id\"],\"unique\":true},{\"name\":\"voice_gateway_turns_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"voice_gateway_turns_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"c4d871b8\"},\"importPath\":\"@happyvertical/smrt-chat\"},\"@happyvertical/smrt-chat:VoiceSession\":{\"name\":\"voicesession\",\"className\":\"VoiceSession\",\"qualifiedName\":\"@happyvertical/smrt-chat:VoiceSession\",\"collection\":\"voicesessions\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/chat/src/models/VoiceSession.ts\",\"packageName\":\"@happyvertical/smrt-chat\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"gatewaySessionId\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"actorProfileId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"actorUserId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-users:User\",\"_meta\":{\"nullable\":true}},\"personaId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-personas:AgentPersona\"},\"agentSessionId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"AgentSession\",\"_meta\":{\"required\":true}},\"chatRoomId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"ChatRoom\",\"_meta\":{\"required\":true}},\"threadId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"ChatThread\"},\"target\":{\"type\":\"text\",\"required\":true,\"default\":\"smrt:chat\",\"_meta\":{\"required\":true}},\"status\":{\"type\":\"text\",\"required\":true,\"default\":\"active\",\"_meta\":{\"required\":true}},\"expiresAt\":{\"type\":\"datetime\",\"required\":true,\"_meta\":{\"required\":true}},\"lastTurnAt\":{\"type\":\"datetime\",\"required\":false},\"lastGatewayTurnId\":{\"type\":\"text\",\"required\":false},\"personaSnapshot\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"{}\"},\"processedTurnIds\":{\"type\":\"text\",\"required\":false,\"default\":\"[]\"}},\"methods\":{\"isActive\":{\"name\":\"isActive\",\"async\":false,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isExpired\":{\"name\":\"isExpired\",\"async\":false,\"parameters\":[{\"name\":\"now\",\"type\":\"Date\",\"optional\":true}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"expire\":{\"name\":\"expire\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"revoke\":{\"name\":\"revoke\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getPersonaSnapshot\":{\"name\":\"getPersonaSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"ConversationPersona\",\"isStatic\":false,\"isPublic\":true},\"setPersonaSnapshot\":{\"name\":\"setPersonaSnapshot\",\"async\":false,\"parameters\":[{\"name\":\"persona\",\"type\":\"ConversationPersona\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"metadata\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getProcessedTurnIds\":{\"name\":\"getProcessedTurnIds\",\"async\":false,\"parameters\":[],\"returnType\":\"string[]\",\"isStatic\":false,\"isPublic\":true},\"hasProcessedTurn\":{\"name\":\"hasProcessedTurn\",\"async\":false,\"parameters\":[{\"name\":\"turnId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"recordGatewayTurn\":{\"name\":\"recordGatewayTurn\",\"async\":false,\"parameters\":[{\"name\":\"turnId\",\"type\":\"string\",\"optional\":false},{\"name\":\"maxRememberedTurns\",\"type\":\"any\",\"optional\":true}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"voice_sessions\",\"api\":{\"include\":[\"list\",\"get\"]},\"mcp\":{\"include\":[\"list\",\"get\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"VoiceSession\",\"collectionExportName\":\"VoiceSessionCollection\",\"validationRules\":[{\"field\":\"gatewaySessionId\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"actorProfileId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"personaId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"agentSessionId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"chatRoomId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"target\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"status\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"expiresAt\",\"rule\":\"required\",\"fieldType\":\"datetime\"}],\"schema\":{\"tableName\":\"voice_sessions\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"voice_sessions\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID NOT NULL,\\n \\\"gateway_session_id\\\" TEXT NOT NULL DEFAULT '',\\n \\\"actor_profile_id\\\" UUID NOT NULL,\\n \\\"actor_user_id\\\" UUID,\\n \\\"persona_id\\\" UUID NOT NULL,\\n \\\"agent_session_id\\\" UUID NOT NULL,\\n \\\"chat_room_id\\\" UUID NOT NULL,\\n \\\"thread_id\\\" UUID,\\n \\\"target\\\" TEXT NOT NULL DEFAULT 'smrt:chat',\\n \\\"status\\\" TEXT NOT NULL DEFAULT 'active',\\n \\\"expires_at\\\" TIMESTAMP NOT NULL,\\n \\\"last_turn_at\\\" TIMESTAMP,\\n \\\"last_gateway_turn_id\\\" TEXT,\\n \\\"persona_snapshot\\\" TEXT DEFAULT '{}',\\n \\\"metadata\\\" TEXT DEFAULT '{}',\\n \\\"processed_turn_ids\\\" TEXT DEFAULT '[]'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"gateway_session_id\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"actor_user_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"persona_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"agent_session_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"agent_sessions\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"chat_room_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"chat_rooms\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"thread_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"chat_threads\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"target\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"smrt:chat\"},\"status\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"active\"},\"expires_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"unique\":false},\"last_turn_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"last_gateway_turn_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"persona_snapshot\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"{}\"},\"processed_turn_ids\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"[]\"}},\"indexes\":[{\"name\":\"voice_sessions_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"voice_sessions_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"voice_sessions_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]},{\"name\":\"voice_sessions_actor_user_id_idx\",\"columns\":[\"actor_user_id\"]},{\"name\":\"voice_sessions_persona_id_idx\",\"columns\":[\"persona_id\"]},{\"name\":\"voice_sessions_agent_session_id_idx\",\"columns\":[\"agent_session_id\"]},{\"name\":\"voice_sessions_chat_room_id_idx\",\"columns\":[\"chat_room_id\"]},{\"name\":\"voice_sessions_thread_id_idx\",\"columns\":[\"thread_id\"]}],\"version\":\"d5cfb90c\"},\"importPath\":\"@happyvertical/smrt-chat\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-agents\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-personas\",\"@happyvertical/smrt-profiles\",\"@happyvertical/smrt-tenancy\",\"@happyvertical/smrt-users\"]}"));
12
12
  //#endregion
13
13
  //#region src/chat-feedback.ts
14
14
  async function captureChatFeedback(options) {
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-chat",
5
- "packageVersion": "0.49.4",
5
+ "packageVersion": "0.49.6",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-chat:AgentSessionCollection": {
8
8
  "name": "agentsessioncollection",
@@ -291,7 +291,8 @@
291
291
  }
292
292
  ],
293
293
  "version": "43eaea36"
294
- }
294
+ },
295
+ "importPath": "@happyvertical/smrt-chat"
295
296
  },
296
297
  "@happyvertical/smrt-chat:ChatMessageCollection": {
297
298
  "name": "chatmessagecollection",
@@ -633,7 +634,8 @@
633
634
  }
634
635
  ],
635
636
  "version": "cca14e75"
636
- }
637
+ },
638
+ "importPath": "@happyvertical/smrt-chat"
637
639
  },
638
640
  "@happyvertical/smrt-chat:ChatParticipantCollection": {
639
641
  "name": "chatparticipantcollection",
@@ -943,7 +945,8 @@
943
945
  }
944
946
  ],
945
947
  "version": "07714046"
946
- }
948
+ },
949
+ "importPath": "@happyvertical/smrt-chat"
947
950
  },
948
951
  "@happyvertical/smrt-chat:ChatReactionCollection": {
949
952
  "name": "chatreactioncollection",
@@ -1111,7 +1114,8 @@
1111
1114
  }
1112
1115
  ],
1113
1116
  "version": "5b1969a6"
1114
- }
1117
+ },
1118
+ "importPath": "@happyvertical/smrt-chat"
1115
1119
  },
1116
1120
  "@happyvertical/smrt-chat:ChatRoomCollection": {
1117
1121
  "name": "chatroomcollection",
@@ -1345,7 +1349,8 @@
1345
1349
  }
1346
1350
  ],
1347
1351
  "version": "3665d881"
1348
- }
1352
+ },
1353
+ "importPath": "@happyvertical/smrt-chat"
1349
1354
  },
1350
1355
  "@happyvertical/smrt-chat:ChatThreadCollection": {
1351
1356
  "name": "chatthreadcollection",
@@ -1520,7 +1525,8 @@
1520
1525
  }
1521
1526
  ],
1522
1527
  "version": "e1ae958b"
1523
- }
1528
+ },
1529
+ "importPath": "@happyvertical/smrt-chat"
1524
1530
  },
1525
1531
  "@happyvertical/smrt-chat:VoiceGatewayTurnCollection": {
1526
1532
  "name": "voicegatewayturncollection",
@@ -1664,7 +1670,8 @@
1664
1670
  }
1665
1671
  ],
1666
1672
  "version": "c4d871b8"
1667
- }
1673
+ },
1674
+ "importPath": "@happyvertical/smrt-chat"
1668
1675
  },
1669
1676
  "@happyvertical/smrt-chat:VoiceSessionCollection": {
1670
1677
  "name": "voicesessioncollection",
@@ -1921,7 +1928,8 @@
1921
1928
  }
1922
1929
  ],
1923
1930
  "version": "d5cfb90c"
1924
- }
1931
+ },
1932
+ "importPath": "@happyvertical/smrt-chat"
1925
1933
  },
1926
1934
  "@happyvertical/smrt-chat:AgentSession": {
1927
1935
  "name": "agentsession",
@@ -2352,7 +2360,8 @@
2352
2360
  }
2353
2361
  ],
2354
2362
  "version": "43eaea36"
2355
- }
2363
+ },
2364
+ "importPath": "@happyvertical/smrt-chat"
2356
2365
  },
2357
2366
  "@happyvertical/smrt-chat:ChatMessage": {
2358
2367
  "name": "chatmessage",
@@ -2855,7 +2864,8 @@
2855
2864
  }
2856
2865
  ],
2857
2866
  "version": "cca14e75"
2858
- }
2867
+ },
2868
+ "importPath": "@happyvertical/smrt-chat"
2859
2869
  },
2860
2870
  "@happyvertical/smrt-chat:ChatParticipant": {
2861
2871
  "name": "chatparticipant",
@@ -3215,7 +3225,8 @@
3215
3225
  }
3216
3226
  ],
3217
3227
  "version": "07714046"
3218
- }
3228
+ },
3229
+ "importPath": "@happyvertical/smrt-chat"
3219
3230
  },
3220
3231
  "@happyvertical/smrt-chat:ChatReaction": {
3221
3232
  "name": "chatreaction",
@@ -3398,7 +3409,8 @@
3398
3409
  }
3399
3410
  ],
3400
3411
  "version": "5b1969a6"
3401
- }
3412
+ },
3413
+ "importPath": "@happyvertical/smrt-chat"
3402
3414
  },
3403
3415
  "@happyvertical/smrt-chat:ChatRoom": {
3404
3416
  "name": "chatroom",
@@ -3739,7 +3751,8 @@
3739
3751
  }
3740
3752
  ],
3741
3753
  "version": "3665d881"
3742
- }
3754
+ },
3755
+ "importPath": "@happyvertical/smrt-chat"
3743
3756
  },
3744
3757
  "@happyvertical/smrt-chat:ChatThread": {
3745
3758
  "name": "chatthread",
@@ -3981,7 +3994,8 @@
3981
3994
  }
3982
3995
  ],
3983
3996
  "version": "e1ae958b"
3984
- }
3997
+ },
3998
+ "importPath": "@happyvertical/smrt-chat"
3985
3999
  },
3986
4000
  "@happyvertical/smrt-chat:VoiceGatewayTurn": {
3987
4001
  "name": "voicegatewayturn",
@@ -4247,7 +4261,8 @@
4247
4261
  }
4248
4262
  ],
4249
4263
  "version": "c4d871b8"
4250
- }
4264
+ },
4265
+ "importPath": "@happyvertical/smrt-chat"
4251
4266
  },
4252
4267
  "@happyvertical/smrt-chat:VoiceSession": {
4253
4268
  "name": "voicesession",
@@ -4766,7 +4781,8 @@
4766
4781
  }
4767
4782
  ],
4768
4783
  "version": "d5cfb90c"
4769
- }
4784
+ },
4785
+ "importPath": "@happyvertical/smrt-chat"
4770
4786
  }
4771
4787
  },
4772
4788
  "moduleType": "smrt",
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-chat",
6
- "packageVersion": "0.49.4",
6
+ "packageVersion": "0.49.6",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "811c0cf3b7760b670ec3af5cc57c8a2ac4031adbbadadb7c5bafbac3a86a79f1",
11
- "packageJson": "8bff1358fe8e56c3b158b3e95906d2abf7e9d4f709d16c254df468ee3cb7f907",
10
+ "manifest": "9c7bcd229cb5d860dbb8de7d761a3542a8748f47e30c79e0b5a07a5fdd0d4a0b",
11
+ "packageJson": "f84d81e6df2587da3328aaf5a9d73eaf1f36b958b48a842acef0ee99fa963240",
12
12
  "agents": "8d016963502a7cb53247cc366c5265c6b4d3240bc9c352242485b24a3644677c"
13
13
  },
14
14
  "exports": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-chat",
3
- "version": "0.49.4",
3
+ "version": "0.49.6",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Chat rooms, DMs, threads, and agent conversations for the SMRT framework",
6
6
  "type": "module",
@@ -70,13 +70,13 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@happyvertical/ai": "^0.89.6",
73
- "@happyvertical/smrt-agents": "0.49.4",
74
- "@happyvertical/smrt-core": "0.49.4",
75
- "@happyvertical/smrt-personas": "0.49.4",
76
- "@happyvertical/smrt-tenancy": "0.49.4",
77
- "@happyvertical/smrt-types": "0.49.4",
78
- "@happyvertical/smrt-ui": "0.49.4",
79
- "@happyvertical/smrt-users": "0.49.4",
73
+ "@happyvertical/smrt-agents": "0.49.6",
74
+ "@happyvertical/smrt-core": "0.49.6",
75
+ "@happyvertical/smrt-personas": "0.49.6",
76
+ "@happyvertical/smrt-tenancy": "0.49.6",
77
+ "@happyvertical/smrt-types": "0.49.6",
78
+ "@happyvertical/smrt-ui": "0.49.6",
79
+ "@happyvertical/smrt-users": "0.49.6",
80
80
  "@happyvertical/sql": "^0.89.6"
81
81
  },
82
82
  "peerDependencies": {
@@ -88,9 +88,9 @@
88
88
  }
89
89
  },
90
90
  "devDependencies": {
91
- "@happyvertical/smrt-playground": "0.49.4",
92
- "@happyvertical/smrt-profiles": "0.49.4",
93
- "@happyvertical/smrt-vitest": "0.49.4",
91
+ "@happyvertical/smrt-playground": "0.49.6",
92
+ "@happyvertical/smrt-profiles": "0.49.6",
93
+ "@happyvertical/smrt-vitest": "0.49.6",
94
94
  "@sveltejs/kit": "^2.69.1",
95
95
  "@sveltejs/package": "^2.5.8",
96
96
  "@sveltejs/vite-plugin-svelte": "^7.1.2",