@happyvertical/smrt-chat 0.61.3 → 0.61.5
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/chunks/{ChatService-C1UBz0MR.js → ChatService-CeOVzOqN.js} +58 -15
- package/dist/chunks/ChatService-CeOVzOqN.js.map +1 -0
- package/dist/chunks/{chat-stream-CmoruxA3.js → chat-stream-5NpFBPe2.js} +6 -6
- package/dist/chunks/chat-stream-5NpFBPe2.js.map +1 -0
- package/dist/engines.js +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/agent-runtime.js +1 -1
- package/dist/manifest.json +736 -287
- package/dist/models/AgentSession.d.ts.map +1 -1
- package/dist/models/ChatMessage.d.ts.map +1 -1
- package/dist/models/ChatParticipant.d.ts.map +1 -1
- package/dist/models/ChatReaction.d.ts.map +1 -1
- package/dist/models/VoiceSession.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +4 -4
- package/dist/sveltekit.js +2 -2
- package/dist/tool-loop.d.ts.map +1 -1
- package/package.json +23 -23
- package/dist/chunks/ChatService-C1UBz0MR.js.map +0 -1
- package/dist/chunks/chat-stream-CmoruxA3.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-chat",
|
|
5
|
-
"packageVersion": "0.61.
|
|
5
|
+
"packageVersion": "0.61.5",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-chat:AgentSessionCollection": {
|
|
8
8
|
"name": "agentsessioncollection",
|
|
9
9
|
"className": "AgentSessionCollection",
|
|
10
10
|
"qualifiedName": "@happyvertical/smrt-chat:AgentSessionCollection",
|
|
11
11
|
"collection": "agentsessions",
|
|
12
|
-
"filePath": "
|
|
12
|
+
"filePath": "src/collections/AgentSessionCollection.ts",
|
|
13
13
|
"packageName": "@happyvertical/smrt-chat",
|
|
14
14
|
"fields": {},
|
|
15
15
|
"methods": {
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
"className": "ChatMessageCollection",
|
|
335
335
|
"qualifiedName": "@happyvertical/smrt-chat:ChatMessageCollection",
|
|
336
336
|
"collection": "chatmessages",
|
|
337
|
-
"filePath": "
|
|
337
|
+
"filePath": "src/collections/ChatMessageCollection.ts",
|
|
338
338
|
"packageName": "@happyvertical/smrt-chat",
|
|
339
339
|
"fields": {},
|
|
340
340
|
"methods": {
|
|
@@ -701,7 +701,7 @@
|
|
|
701
701
|
"className": "ChatParticipantCollection",
|
|
702
702
|
"qualifiedName": "@happyvertical/smrt-chat:ChatParticipantCollection",
|
|
703
703
|
"collection": "chatparticipants",
|
|
704
|
-
"filePath": "
|
|
704
|
+
"filePath": "src/collections/ChatParticipantCollection.ts",
|
|
705
705
|
"packageName": "@happyvertical/smrt-chat",
|
|
706
706
|
"fields": {},
|
|
707
707
|
"methods": {
|
|
@@ -1035,7 +1035,7 @@
|
|
|
1035
1035
|
"className": "ChatReactionCollection",
|
|
1036
1036
|
"qualifiedName": "@happyvertical/smrt-chat:ChatReactionCollection",
|
|
1037
1037
|
"collection": "chatreactions",
|
|
1038
|
-
"filePath": "
|
|
1038
|
+
"filePath": "src/collections/ChatReactionCollection.ts",
|
|
1039
1039
|
"packageName": "@happyvertical/smrt-chat",
|
|
1040
1040
|
"fields": {},
|
|
1041
1041
|
"methods": {
|
|
@@ -1226,7 +1226,7 @@
|
|
|
1226
1226
|
"className": "ChatRoomCollection",
|
|
1227
1227
|
"qualifiedName": "@happyvertical/smrt-chat:ChatRoomCollection",
|
|
1228
1228
|
"collection": "chatrooms",
|
|
1229
|
-
"filePath": "
|
|
1229
|
+
"filePath": "src/collections/ChatRoomCollection.ts",
|
|
1230
1230
|
"packageName": "@happyvertical/smrt-chat",
|
|
1231
1231
|
"fields": {},
|
|
1232
1232
|
"methods": {
|
|
@@ -1484,7 +1484,7 @@
|
|
|
1484
1484
|
"className": "ChatThreadCollection",
|
|
1485
1485
|
"qualifiedName": "@happyvertical/smrt-chat:ChatThreadCollection",
|
|
1486
1486
|
"collection": "chatthreads",
|
|
1487
|
-
"filePath": "
|
|
1487
|
+
"filePath": "src/collections/ChatThreadCollection.ts",
|
|
1488
1488
|
"packageName": "@happyvertical/smrt-chat",
|
|
1489
1489
|
"fields": {},
|
|
1490
1490
|
"methods": {
|
|
@@ -1683,7 +1683,7 @@
|
|
|
1683
1683
|
"className": "VoiceGatewayTurnCollection",
|
|
1684
1684
|
"qualifiedName": "@happyvertical/smrt-chat:VoiceGatewayTurnCollection",
|
|
1685
1685
|
"collection": "voicegatewayturns",
|
|
1686
|
-
"filePath": "
|
|
1686
|
+
"filePath": "src/collections/VoiceGatewayTurnCollection.ts",
|
|
1687
1687
|
"packageName": "@happyvertical/smrt-chat",
|
|
1688
1688
|
"fields": {},
|
|
1689
1689
|
"methods": {
|
|
@@ -1733,7 +1733,7 @@
|
|
|
1733
1733
|
],
|
|
1734
1734
|
"schema": {
|
|
1735
1735
|
"tableName": "voice_gateway_turns",
|
|
1736
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"voice_gateway_turns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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
|
|
1736
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"voice_gateway_turns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 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);",
|
|
1737
1737
|
"columns": {
|
|
1738
1738
|
"_sync_origin_device_id": {
|
|
1739
1739
|
"type": "TEXT"
|
|
@@ -1786,7 +1786,7 @@
|
|
|
1786
1786
|
},
|
|
1787
1787
|
"gateway_session_id": {
|
|
1788
1788
|
"type": "TEXT",
|
|
1789
|
-
"notNull":
|
|
1789
|
+
"notNull": false,
|
|
1790
1790
|
"unique": false,
|
|
1791
1791
|
"default": ""
|
|
1792
1792
|
},
|
|
@@ -1843,7 +1843,7 @@
|
|
|
1843
1843
|
]
|
|
1844
1844
|
}
|
|
1845
1845
|
],
|
|
1846
|
-
"version": "
|
|
1846
|
+
"version": "c27610cd"
|
|
1847
1847
|
},
|
|
1848
1848
|
"importPath": "@happyvertical/smrt-chat"
|
|
1849
1849
|
},
|
|
@@ -1852,7 +1852,7 @@
|
|
|
1852
1852
|
"className": "VoiceSessionCollection",
|
|
1853
1853
|
"qualifiedName": "@happyvertical/smrt-chat:VoiceSessionCollection",
|
|
1854
1854
|
"collection": "voicesessions",
|
|
1855
|
-
"filePath": "
|
|
1855
|
+
"filePath": "src/collections/VoiceSessionCollection.ts",
|
|
1856
1856
|
"packageName": "@happyvertical/smrt-chat",
|
|
1857
1857
|
"fields": {},
|
|
1858
1858
|
"methods": {
|
|
@@ -2134,15 +2134,12 @@
|
|
|
2134
2134
|
"qualifiedName": "@happyvertical/smrt-chat:AgentSession",
|
|
2135
2135
|
"collection": "agentsessions",
|
|
2136
2136
|
"description": "Agent conversation session.",
|
|
2137
|
-
"filePath": "
|
|
2137
|
+
"filePath": "src/models/AgentSession.ts",
|
|
2138
2138
|
"packageName": "@happyvertical/smrt-chat",
|
|
2139
2139
|
"fields": {
|
|
2140
2140
|
"tenantId": {
|
|
2141
2141
|
"type": "text",
|
|
2142
|
-
"required": false,
|
|
2143
2142
|
"_meta": {
|
|
2144
|
-
"sqlType": "UUID",
|
|
2145
|
-
"nullable": true,
|
|
2146
2143
|
"__tenancy": {
|
|
2147
2144
|
"isTenantIdField": true,
|
|
2148
2145
|
"autoFilter": true,
|
|
@@ -2152,39 +2149,79 @@
|
|
|
2152
2149
|
"mode": "optional",
|
|
2153
2150
|
"field": "tenantId",
|
|
2154
2151
|
"allowSuperAdminBypass": false
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2152
|
+
},
|
|
2153
|
+
"__statedOptions": [
|
|
2154
|
+
"sqlType",
|
|
2155
|
+
"nullable",
|
|
2156
|
+
"__tenancy",
|
|
2157
|
+
"required"
|
|
2158
|
+
],
|
|
2159
|
+
"sqlType": "UUID",
|
|
2160
|
+
"nullable": true,
|
|
2161
|
+
"required": false
|
|
2162
|
+
},
|
|
2163
|
+
"required": false
|
|
2157
2164
|
},
|
|
2158
2165
|
"agentId": {
|
|
2159
2166
|
"type": "text",
|
|
2160
|
-
"required": true,
|
|
2161
|
-
"default": "",
|
|
2162
2167
|
"_meta": {
|
|
2163
|
-
"
|
|
2164
|
-
|
|
2168
|
+
"__statedOptions": [
|
|
2169
|
+
"required",
|
|
2170
|
+
"requiredFor",
|
|
2171
|
+
"default"
|
|
2172
|
+
],
|
|
2173
|
+
"required": true,
|
|
2174
|
+
"requiredFor": "identity"
|
|
2175
|
+
},
|
|
2176
|
+
"required": true,
|
|
2177
|
+
"default": ""
|
|
2165
2178
|
},
|
|
2166
2179
|
"agentProfileId": {
|
|
2167
2180
|
"type": "crossPackageRef",
|
|
2181
|
+
"_meta": {
|
|
2182
|
+
"__statedOptions": [
|
|
2183
|
+
"related"
|
|
2184
|
+
]
|
|
2185
|
+
},
|
|
2168
2186
|
"required": false,
|
|
2169
2187
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
2170
2188
|
},
|
|
2171
2189
|
"participantProfileId": {
|
|
2172
2190
|
"type": "crossPackageRef",
|
|
2191
|
+
"_meta": {
|
|
2192
|
+
"__statedOptions": [
|
|
2193
|
+
"required",
|
|
2194
|
+
"requiredFor",
|
|
2195
|
+
"related"
|
|
2196
|
+
],
|
|
2197
|
+
"required": true,
|
|
2198
|
+
"requiredFor": "identity"
|
|
2199
|
+
},
|
|
2173
2200
|
"required": true,
|
|
2174
2201
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
2175
2202
|
},
|
|
2176
2203
|
"chatRoomId": {
|
|
2177
2204
|
"type": "foreignKey",
|
|
2205
|
+
"_meta": {
|
|
2206
|
+
"__statedOptions": [
|
|
2207
|
+
"related"
|
|
2208
|
+
]
|
|
2209
|
+
},
|
|
2178
2210
|
"required": false,
|
|
2179
2211
|
"related": "ChatRoom"
|
|
2180
2212
|
},
|
|
2181
2213
|
"status": {
|
|
2182
2214
|
"type": "text",
|
|
2183
|
-
"required": true,
|
|
2184
|
-
"default": "active",
|
|
2185
2215
|
"_meta": {
|
|
2216
|
+
"__statedOptions": [
|
|
2217
|
+
"required",
|
|
2218
|
+
"default",
|
|
2219
|
+
"enum"
|
|
2220
|
+
],
|
|
2186
2221
|
"required": true
|
|
2187
2222
|
},
|
|
2223
|
+
"required": true,
|
|
2224
|
+
"default": "active",
|
|
2188
2225
|
"enum": [
|
|
2189
2226
|
"active",
|
|
2190
2227
|
"closed",
|
|
@@ -2193,53 +2230,96 @@
|
|
|
2193
2230
|
},
|
|
2194
2231
|
"allowedTools": {
|
|
2195
2232
|
"type": "text",
|
|
2233
|
+
"_meta": {
|
|
2234
|
+
"__statedOptions": [
|
|
2235
|
+
"default"
|
|
2236
|
+
]
|
|
2237
|
+
},
|
|
2196
2238
|
"required": false,
|
|
2197
2239
|
"default": "[]"
|
|
2198
2240
|
},
|
|
2199
2241
|
"sessionContext": {
|
|
2200
2242
|
"type": "text",
|
|
2201
|
-
"required": false,
|
|
2202
|
-
"default": "{}",
|
|
2203
2243
|
"_meta": {
|
|
2244
|
+
"__statedOptions": [
|
|
2245
|
+
"sensitive",
|
|
2246
|
+
"default"
|
|
2247
|
+
],
|
|
2204
2248
|
"sensitive": true
|
|
2205
2249
|
},
|
|
2250
|
+
"required": false,
|
|
2251
|
+
"default": "{}",
|
|
2206
2252
|
"sensitive": true
|
|
2207
2253
|
},
|
|
2208
2254
|
"systemPrompt": {
|
|
2209
2255
|
"type": "text",
|
|
2256
|
+
"_meta": {
|
|
2257
|
+
"__statedOptions": [
|
|
2258
|
+
"default"
|
|
2259
|
+
]
|
|
2260
|
+
},
|
|
2210
2261
|
"required": false,
|
|
2211
2262
|
"default": ""
|
|
2212
2263
|
},
|
|
2213
2264
|
"messageCount": {
|
|
2214
2265
|
"type": "integer",
|
|
2266
|
+
"_meta": {
|
|
2267
|
+
"__statedOptions": [
|
|
2268
|
+
"default"
|
|
2269
|
+
]
|
|
2270
|
+
},
|
|
2215
2271
|
"required": false,
|
|
2216
2272
|
"default": 0
|
|
2217
2273
|
},
|
|
2218
2274
|
"totalTokensUsed": {
|
|
2219
2275
|
"type": "integer",
|
|
2276
|
+
"_meta": {
|
|
2277
|
+
"__statedOptions": [
|
|
2278
|
+
"default"
|
|
2279
|
+
]
|
|
2280
|
+
},
|
|
2220
2281
|
"required": false,
|
|
2221
2282
|
"default": 0
|
|
2222
2283
|
},
|
|
2223
2284
|
"maxTokens": {
|
|
2224
2285
|
"type": "integer",
|
|
2286
|
+
"_meta": {
|
|
2287
|
+
"__statedOptions": [
|
|
2288
|
+
"default"
|
|
2289
|
+
]
|
|
2290
|
+
},
|
|
2225
2291
|
"required": false,
|
|
2226
2292
|
"default": 0
|
|
2227
2293
|
},
|
|
2228
2294
|
"maxMessages": {
|
|
2229
2295
|
"type": "integer",
|
|
2296
|
+
"_meta": {
|
|
2297
|
+
"__statedOptions": [
|
|
2298
|
+
"default"
|
|
2299
|
+
]
|
|
2300
|
+
},
|
|
2230
2301
|
"required": false,
|
|
2231
2302
|
"default": 0
|
|
2232
2303
|
},
|
|
2233
2304
|
"lastMessageAt": {
|
|
2234
2305
|
"type": "datetime",
|
|
2306
|
+
"_meta": {
|
|
2307
|
+
"__statedOptions": []
|
|
2308
|
+
},
|
|
2235
2309
|
"required": false
|
|
2236
2310
|
},
|
|
2237
2311
|
"expiresAt": {
|
|
2238
2312
|
"type": "datetime",
|
|
2313
|
+
"_meta": {
|
|
2314
|
+
"__statedOptions": []
|
|
2315
|
+
},
|
|
2239
2316
|
"required": false
|
|
2240
2317
|
},
|
|
2241
2318
|
"closedAt": {
|
|
2242
2319
|
"type": "datetime",
|
|
2320
|
+
"_meta": {
|
|
2321
|
+
"__statedOptions": []
|
|
2322
|
+
},
|
|
2243
2323
|
"required": false
|
|
2244
2324
|
}
|
|
2245
2325
|
},
|
|
@@ -2599,14 +2679,12 @@
|
|
|
2599
2679
|
"qualifiedName": "@happyvertical/smrt-chat:ChatMessage",
|
|
2600
2680
|
"collection": "chatmessages",
|
|
2601
2681
|
"description": "Chat message. Internal model — all mutations must go through the membership-checked ChatService (S5 #1392).",
|
|
2602
|
-
"filePath": "
|
|
2682
|
+
"filePath": "src/models/ChatMessage.ts",
|
|
2603
2683
|
"packageName": "@happyvertical/smrt-chat",
|
|
2604
2684
|
"fields": {
|
|
2605
2685
|
"tenantId": {
|
|
2606
2686
|
"type": "text",
|
|
2607
|
-
"required": true,
|
|
2608
2687
|
"_meta": {
|
|
2609
|
-
"sqlType": "UUID",
|
|
2610
2688
|
"__tenancy": {
|
|
2611
2689
|
"isTenantIdField": true,
|
|
2612
2690
|
"autoFilter": true,
|
|
@@ -2616,64 +2694,105 @@
|
|
|
2616
2694
|
"mode": "required",
|
|
2617
2695
|
"field": "tenantId",
|
|
2618
2696
|
"allowSuperAdminBypass": false
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2697
|
+
},
|
|
2698
|
+
"__statedOptions": [
|
|
2699
|
+
"sqlType",
|
|
2700
|
+
"requiredFor",
|
|
2701
|
+
"__tenancy"
|
|
2702
|
+
],
|
|
2703
|
+
"sqlType": "UUID",
|
|
2704
|
+
"requiredFor": "tenant-scope"
|
|
2705
|
+
},
|
|
2706
|
+
"required": true
|
|
2621
2707
|
},
|
|
2622
2708
|
"roomId": {
|
|
2623
2709
|
"type": "foreignKey",
|
|
2624
|
-
"required": true,
|
|
2625
|
-
"related": "ChatRoom",
|
|
2626
|
-
"description": "The room in which this message was sent.",
|
|
2627
2710
|
"_meta": {
|
|
2711
|
+
"__statedOptions": [
|
|
2712
|
+
"required",
|
|
2713
|
+
"requiredFor",
|
|
2714
|
+
"description",
|
|
2715
|
+
"related"
|
|
2716
|
+
],
|
|
2717
|
+
"required": true,
|
|
2628
2718
|
"description": "The room in which this message was sent.",
|
|
2629
|
-
"
|
|
2630
|
-
}
|
|
2719
|
+
"requiredFor": "identity"
|
|
2720
|
+
},
|
|
2721
|
+
"required": true,
|
|
2722
|
+
"related": "ChatRoom",
|
|
2723
|
+
"description": "The room in which this message was sent."
|
|
2631
2724
|
},
|
|
2632
2725
|
"threadId": {
|
|
2633
2726
|
"type": "foreignKey",
|
|
2634
|
-
"required": false,
|
|
2635
|
-
"related": "ChatThread",
|
|
2636
|
-
"description": "The discussion thread containing this message, when there is one.",
|
|
2637
2727
|
"_meta": {
|
|
2728
|
+
"__statedOptions": [
|
|
2729
|
+
"description",
|
|
2730
|
+
"related"
|
|
2731
|
+
],
|
|
2638
2732
|
"description": "The discussion thread containing this message, when there is one."
|
|
2639
|
-
}
|
|
2733
|
+
},
|
|
2734
|
+
"required": false,
|
|
2735
|
+
"related": "ChatThread",
|
|
2736
|
+
"description": "The discussion thread containing this message, when there is one."
|
|
2640
2737
|
},
|
|
2641
2738
|
"senderProfileId": {
|
|
2642
2739
|
"type": "crossPackageRef",
|
|
2740
|
+
"_meta": {
|
|
2741
|
+
"__statedOptions": [
|
|
2742
|
+
"required",
|
|
2743
|
+
"requiredFor",
|
|
2744
|
+
"description",
|
|
2745
|
+
"related"
|
|
2746
|
+
],
|
|
2747
|
+
"required": true,
|
|
2748
|
+
"description": "The person or assistant who sent this message.",
|
|
2749
|
+
"requiredFor": "identity"
|
|
2750
|
+
},
|
|
2643
2751
|
"required": true,
|
|
2644
2752
|
"related": "@happyvertical/smrt-profiles:Profile",
|
|
2645
|
-
"description": "The person or assistant who sent this message."
|
|
2646
|
-
"_meta": {
|
|
2647
|
-
"description": "The person or assistant who sent this message."
|
|
2648
|
-
}
|
|
2753
|
+
"description": "The person or assistant who sent this message."
|
|
2649
2754
|
},
|
|
2650
2755
|
"agentSessionId": {
|
|
2651
2756
|
"type": "foreignKey",
|
|
2652
|
-
"required": false,
|
|
2653
|
-
"related": "AgentSession",
|
|
2654
|
-
"description": "The assistant conversation associated with this message, when applicable.",
|
|
2655
2757
|
"_meta": {
|
|
2758
|
+
"__statedOptions": [
|
|
2759
|
+
"description",
|
|
2760
|
+
"related"
|
|
2761
|
+
],
|
|
2656
2762
|
"description": "The assistant conversation associated with this message, when applicable."
|
|
2657
|
-
}
|
|
2763
|
+
},
|
|
2764
|
+
"required": false,
|
|
2765
|
+
"related": "AgentSession",
|
|
2766
|
+
"description": "The assistant conversation associated with this message, when applicable."
|
|
2658
2767
|
},
|
|
2659
2768
|
"content": {
|
|
2660
2769
|
"type": "text",
|
|
2661
|
-
"required": false,
|
|
2662
|
-
"default": "",
|
|
2663
|
-
"description": "The text of the message shared with the conversation.",
|
|
2664
2770
|
"_meta": {
|
|
2771
|
+
"__statedOptions": [
|
|
2772
|
+
"description",
|
|
2773
|
+
"default"
|
|
2774
|
+
],
|
|
2665
2775
|
"description": "The text of the message shared with the conversation."
|
|
2666
|
-
}
|
|
2776
|
+
},
|
|
2777
|
+
"required": false,
|
|
2778
|
+
"default": "",
|
|
2779
|
+
"description": "The text of the message shared with the conversation."
|
|
2667
2780
|
},
|
|
2668
2781
|
"messageType": {
|
|
2669
2782
|
"type": "text",
|
|
2670
|
-
"required": true,
|
|
2671
|
-
"default": "text",
|
|
2672
|
-
"description": "The kind of message, such as text, a file, or an activity notice.",
|
|
2673
2783
|
"_meta": {
|
|
2784
|
+
"__statedOptions": [
|
|
2785
|
+
"required",
|
|
2786
|
+
"description",
|
|
2787
|
+
"default",
|
|
2788
|
+
"enum"
|
|
2789
|
+
],
|
|
2674
2790
|
"required": true,
|
|
2675
2791
|
"description": "The kind of message, such as text, a file, or an activity notice."
|
|
2676
2792
|
},
|
|
2793
|
+
"required": true,
|
|
2794
|
+
"default": "text",
|
|
2795
|
+
"description": "The kind of message, such as text, a file, or an activity notice.",
|
|
2677
2796
|
"enum": [
|
|
2678
2797
|
"text",
|
|
2679
2798
|
"system",
|
|
@@ -2685,13 +2804,19 @@
|
|
|
2685
2804
|
},
|
|
2686
2805
|
"role": {
|
|
2687
2806
|
"type": "text",
|
|
2688
|
-
"required": true,
|
|
2689
|
-
"default": "user",
|
|
2690
|
-
"description": "Whether this message comes from a person, an assistant, or an automated action.",
|
|
2691
2807
|
"_meta": {
|
|
2808
|
+
"__statedOptions": [
|
|
2809
|
+
"required",
|
|
2810
|
+
"description",
|
|
2811
|
+
"default",
|
|
2812
|
+
"enum"
|
|
2813
|
+
],
|
|
2692
2814
|
"required": true,
|
|
2693
2815
|
"description": "Whether this message comes from a person, an assistant, or an automated action."
|
|
2694
2816
|
},
|
|
2817
|
+
"required": true,
|
|
2818
|
+
"default": "user",
|
|
2819
|
+
"description": "Whether this message comes from a person, an assistant, or an automated action.",
|
|
2695
2820
|
"enum": [
|
|
2696
2821
|
"user",
|
|
2697
2822
|
"assistant",
|
|
@@ -2701,64 +2826,90 @@
|
|
|
2701
2826
|
},
|
|
2702
2827
|
"isEdited": {
|
|
2703
2828
|
"type": "boolean",
|
|
2704
|
-
"required": false,
|
|
2705
|
-
"default": false,
|
|
2706
|
-
"description": "Whether the message has changed since it was sent.",
|
|
2707
2829
|
"_meta": {
|
|
2830
|
+
"__statedOptions": [
|
|
2831
|
+
"description",
|
|
2832
|
+
"default"
|
|
2833
|
+
],
|
|
2708
2834
|
"description": "Whether the message has changed since it was sent."
|
|
2709
|
-
}
|
|
2835
|
+
},
|
|
2836
|
+
"required": false,
|
|
2837
|
+
"default": false,
|
|
2838
|
+
"description": "Whether the message has changed since it was sent."
|
|
2710
2839
|
},
|
|
2711
2840
|
"editedAt": {
|
|
2712
2841
|
"type": "datetime",
|
|
2713
|
-
"required": false,
|
|
2714
|
-
"description": "When the message was most recently edited.",
|
|
2715
2842
|
"_meta": {
|
|
2843
|
+
"__statedOptions": [
|
|
2844
|
+
"description"
|
|
2845
|
+
],
|
|
2716
2846
|
"description": "When the message was most recently edited."
|
|
2717
|
-
}
|
|
2847
|
+
},
|
|
2848
|
+
"required": false,
|
|
2849
|
+
"description": "When the message was most recently edited."
|
|
2718
2850
|
},
|
|
2719
2851
|
"isDeleted": {
|
|
2720
2852
|
"type": "boolean",
|
|
2721
|
-
"required": false,
|
|
2722
|
-
"default": false,
|
|
2723
|
-
"description": "Whether this message has been removed from the conversation.",
|
|
2724
2853
|
"_meta": {
|
|
2854
|
+
"__statedOptions": [
|
|
2855
|
+
"description",
|
|
2856
|
+
"default"
|
|
2857
|
+
],
|
|
2725
2858
|
"description": "Whether this message has been removed from the conversation."
|
|
2726
|
-
}
|
|
2859
|
+
},
|
|
2860
|
+
"required": false,
|
|
2861
|
+
"default": false,
|
|
2862
|
+
"description": "Whether this message has been removed from the conversation."
|
|
2727
2863
|
},
|
|
2728
2864
|
"replyToMessageId": {
|
|
2729
2865
|
"type": "foreignKey",
|
|
2730
|
-
"required": false,
|
|
2731
|
-
"related": "ChatMessage",
|
|
2732
|
-
"description": "The earlier message this reply responds to.",
|
|
2733
2866
|
"_meta": {
|
|
2867
|
+
"__statedOptions": [
|
|
2868
|
+
"description",
|
|
2869
|
+
"related"
|
|
2870
|
+
],
|
|
2734
2871
|
"description": "The earlier message this reply responds to."
|
|
2735
|
-
}
|
|
2872
|
+
},
|
|
2873
|
+
"required": false,
|
|
2874
|
+
"related": "ChatMessage",
|
|
2875
|
+
"description": "The earlier message this reply responds to."
|
|
2736
2876
|
},
|
|
2737
2877
|
"metadata": {
|
|
2738
2878
|
"type": "text",
|
|
2739
|
-
"required": false,
|
|
2740
|
-
"default": "{}",
|
|
2741
|
-
"description": "Additional message details maintained by the application.",
|
|
2742
2879
|
"_meta": {
|
|
2880
|
+
"__statedOptions": [
|
|
2881
|
+
"description",
|
|
2882
|
+
"default"
|
|
2883
|
+
],
|
|
2743
2884
|
"description": "Additional message details maintained by the application."
|
|
2744
|
-
}
|
|
2885
|
+
},
|
|
2886
|
+
"required": false,
|
|
2887
|
+
"default": "{}",
|
|
2888
|
+
"description": "Additional message details maintained by the application."
|
|
2745
2889
|
},
|
|
2746
2890
|
"toolCallData": {
|
|
2747
2891
|
"type": "text",
|
|
2748
|
-
"required": false,
|
|
2749
|
-
"description": "Details of an automated action associated with this message.",
|
|
2750
2892
|
"_meta": {
|
|
2893
|
+
"__statedOptions": [
|
|
2894
|
+
"description"
|
|
2895
|
+
],
|
|
2751
2896
|
"description": "Details of an automated action associated with this message."
|
|
2752
|
-
}
|
|
2897
|
+
},
|
|
2898
|
+
"required": false,
|
|
2899
|
+
"description": "Details of an automated action associated with this message."
|
|
2753
2900
|
},
|
|
2754
2901
|
"attachments": {
|
|
2755
2902
|
"type": "text",
|
|
2756
|
-
"required": false,
|
|
2757
|
-
"default": "[]",
|
|
2758
|
-
"description": "Files shared alongside the text of this message.",
|
|
2759
2903
|
"_meta": {
|
|
2904
|
+
"__statedOptions": [
|
|
2905
|
+
"description",
|
|
2906
|
+
"default"
|
|
2907
|
+
],
|
|
2760
2908
|
"description": "Files shared alongside the text of this message."
|
|
2761
|
-
}
|
|
2909
|
+
},
|
|
2910
|
+
"required": false,
|
|
2911
|
+
"default": "[]",
|
|
2912
|
+
"description": "Files shared alongside the text of this message."
|
|
2762
2913
|
}
|
|
2763
2914
|
},
|
|
2764
2915
|
"methods": {
|
|
@@ -3174,14 +3325,12 @@
|
|
|
3174
3325
|
"qualifiedName": "@happyvertical/smrt-chat:ChatParticipant",
|
|
3175
3326
|
"collection": "chatparticipants",
|
|
3176
3327
|
"description": "Room membership row. Internal model — membership must be established and mutated only through the membership/owner-checked ChatService (S5 #1392).",
|
|
3177
|
-
"filePath": "
|
|
3328
|
+
"filePath": "src/models/ChatParticipant.ts",
|
|
3178
3329
|
"packageName": "@happyvertical/smrt-chat",
|
|
3179
3330
|
"fields": {
|
|
3180
3331
|
"tenantId": {
|
|
3181
3332
|
"type": "text",
|
|
3182
|
-
"required": true,
|
|
3183
3333
|
"_meta": {
|
|
3184
|
-
"sqlType": "UUID",
|
|
3185
3334
|
"__tenancy": {
|
|
3186
3335
|
"isTenantIdField": true,
|
|
3187
3336
|
"autoFilter": true,
|
|
@@ -3191,37 +3340,66 @@
|
|
|
3191
3340
|
"mode": "required",
|
|
3192
3341
|
"field": "tenantId",
|
|
3193
3342
|
"allowSuperAdminBypass": false
|
|
3194
|
-
}
|
|
3195
|
-
|
|
3343
|
+
},
|
|
3344
|
+
"__statedOptions": [
|
|
3345
|
+
"sqlType",
|
|
3346
|
+
"requiredFor",
|
|
3347
|
+
"__tenancy"
|
|
3348
|
+
],
|
|
3349
|
+
"sqlType": "UUID",
|
|
3350
|
+
"requiredFor": "tenant-scope"
|
|
3351
|
+
},
|
|
3352
|
+
"required": true
|
|
3196
3353
|
},
|
|
3197
3354
|
"roomId": {
|
|
3198
3355
|
"type": "foreignKey",
|
|
3199
|
-
"required": true,
|
|
3200
|
-
"related": "ChatRoom",
|
|
3201
|
-
"description": "The room to which this membership belongs.",
|
|
3202
3356
|
"_meta": {
|
|
3357
|
+
"__statedOptions": [
|
|
3358
|
+
"required",
|
|
3359
|
+
"requiredFor",
|
|
3360
|
+
"description",
|
|
3361
|
+
"related"
|
|
3362
|
+
],
|
|
3363
|
+
"required": true,
|
|
3203
3364
|
"description": "The room to which this membership belongs.",
|
|
3204
|
-
"
|
|
3205
|
-
}
|
|
3365
|
+
"requiredFor": "identity"
|
|
3366
|
+
},
|
|
3367
|
+
"required": true,
|
|
3368
|
+
"related": "ChatRoom",
|
|
3369
|
+
"description": "The room to which this membership belongs."
|
|
3206
3370
|
},
|
|
3207
3371
|
"profileId": {
|
|
3208
3372
|
"type": "crossPackageRef",
|
|
3373
|
+
"_meta": {
|
|
3374
|
+
"__statedOptions": [
|
|
3375
|
+
"required",
|
|
3376
|
+
"requiredFor",
|
|
3377
|
+
"description",
|
|
3378
|
+
"related"
|
|
3379
|
+
],
|
|
3380
|
+
"required": true,
|
|
3381
|
+
"description": "The person or assistant participating in the room.",
|
|
3382
|
+
"requiredFor": "identity"
|
|
3383
|
+
},
|
|
3209
3384
|
"required": true,
|
|
3210
3385
|
"related": "@happyvertical/smrt-profiles:Profile",
|
|
3211
|
-
"description": "The person or assistant participating in the room."
|
|
3212
|
-
"_meta": {
|
|
3213
|
-
"description": "The person or assistant participating in the room."
|
|
3214
|
-
}
|
|
3386
|
+
"description": "The person or assistant participating in the room."
|
|
3215
3387
|
},
|
|
3216
3388
|
"role": {
|
|
3217
3389
|
"type": "text",
|
|
3218
|
-
"required": true,
|
|
3219
|
-
"default": "member",
|
|
3220
|
-
"description": "The member role that determines what they can do in the room.",
|
|
3221
3390
|
"_meta": {
|
|
3391
|
+
"__statedOptions": [
|
|
3392
|
+
"required",
|
|
3393
|
+
"description",
|
|
3394
|
+
"default",
|
|
3395
|
+
"enum"
|
|
3396
|
+
],
|
|
3222
3397
|
"required": true,
|
|
3223
3398
|
"description": "The member role that determines what they can do in the room."
|
|
3224
3399
|
},
|
|
3400
|
+
"required": true,
|
|
3401
|
+
"default": "member",
|
|
3402
|
+
"description": "The member role that determines what they can do in the room.",
|
|
3225
3403
|
"enum": [
|
|
3226
3404
|
"owner",
|
|
3227
3405
|
"admin",
|
|
@@ -3231,13 +3409,19 @@
|
|
|
3231
3409
|
},
|
|
3232
3410
|
"status": {
|
|
3233
3411
|
"type": "text",
|
|
3234
|
-
"required": true,
|
|
3235
|
-
"default": "active",
|
|
3236
|
-
"description": "Whether this member is active, has left, was removed, or is banned.",
|
|
3237
3412
|
"_meta": {
|
|
3413
|
+
"__statedOptions": [
|
|
3414
|
+
"required",
|
|
3415
|
+
"description",
|
|
3416
|
+
"default",
|
|
3417
|
+
"enum"
|
|
3418
|
+
],
|
|
3238
3419
|
"required": true,
|
|
3239
3420
|
"description": "Whether this member is active, has left, was removed, or is banned."
|
|
3240
3421
|
},
|
|
3422
|
+
"required": true,
|
|
3423
|
+
"default": "active",
|
|
3424
|
+
"description": "Whether this member is active, has left, was removed, or is banned.",
|
|
3241
3425
|
"enum": [
|
|
3242
3426
|
"active",
|
|
3243
3427
|
"left",
|
|
@@ -3247,13 +3431,19 @@
|
|
|
3247
3431
|
},
|
|
3248
3432
|
"onlineStatus": {
|
|
3249
3433
|
"type": "text",
|
|
3250
|
-
"required": true,
|
|
3251
|
-
"default": "offline",
|
|
3252
|
-
"description": "The availability shown for this member, such as online or away.",
|
|
3253
3434
|
"_meta": {
|
|
3435
|
+
"__statedOptions": [
|
|
3436
|
+
"required",
|
|
3437
|
+
"description",
|
|
3438
|
+
"default",
|
|
3439
|
+
"enum"
|
|
3440
|
+
],
|
|
3254
3441
|
"required": true,
|
|
3255
3442
|
"description": "The availability shown for this member, such as online or away."
|
|
3256
3443
|
},
|
|
3444
|
+
"required": true,
|
|
3445
|
+
"default": "offline",
|
|
3446
|
+
"description": "The availability shown for this member, such as online or away.",
|
|
3257
3447
|
"enum": [
|
|
3258
3448
|
"online",
|
|
3259
3449
|
"away",
|
|
@@ -3263,55 +3453,77 @@
|
|
|
3263
3453
|
},
|
|
3264
3454
|
"lastReadMessageId": {
|
|
3265
3455
|
"type": "foreignKey",
|
|
3266
|
-
"required": false,
|
|
3267
|
-
"related": "ChatMessage",
|
|
3268
|
-
"description": "The most recent message this member has read.",
|
|
3269
3456
|
"_meta": {
|
|
3457
|
+
"__statedOptions": [
|
|
3458
|
+
"description",
|
|
3459
|
+
"related"
|
|
3460
|
+
],
|
|
3270
3461
|
"description": "The most recent message this member has read."
|
|
3271
|
-
}
|
|
3462
|
+
},
|
|
3463
|
+
"required": false,
|
|
3464
|
+
"related": "ChatMessage",
|
|
3465
|
+
"description": "The most recent message this member has read."
|
|
3272
3466
|
},
|
|
3273
3467
|
"lastSeenAt": {
|
|
3274
3468
|
"type": "datetime",
|
|
3275
|
-
"required": false,
|
|
3276
|
-
"description": "When this member was last seen in the conversation.",
|
|
3277
3469
|
"_meta": {
|
|
3470
|
+
"__statedOptions": [
|
|
3471
|
+
"description"
|
|
3472
|
+
],
|
|
3278
3473
|
"description": "When this member was last seen in the conversation."
|
|
3279
|
-
}
|
|
3474
|
+
},
|
|
3475
|
+
"required": false,
|
|
3476
|
+
"description": "When this member was last seen in the conversation."
|
|
3280
3477
|
},
|
|
3281
3478
|
"joinedAt": {
|
|
3282
3479
|
"type": "datetime",
|
|
3283
|
-
"required": false,
|
|
3284
|
-
"description": "When this member joined the room.",
|
|
3285
3480
|
"_meta": {
|
|
3481
|
+
"__statedOptions": [
|
|
3482
|
+
"description"
|
|
3483
|
+
],
|
|
3286
3484
|
"description": "When this member joined the room."
|
|
3287
|
-
}
|
|
3485
|
+
},
|
|
3486
|
+
"required": false,
|
|
3487
|
+
"description": "When this member joined the room."
|
|
3288
3488
|
},
|
|
3289
3489
|
"nickname": {
|
|
3290
3490
|
"type": "text",
|
|
3291
|
-
"required": false,
|
|
3292
|
-
"default": "",
|
|
3293
|
-
"description": "The display name this member uses within the room.",
|
|
3294
3491
|
"_meta": {
|
|
3492
|
+
"__statedOptions": [
|
|
3493
|
+
"description",
|
|
3494
|
+
"default"
|
|
3495
|
+
],
|
|
3295
3496
|
"description": "The display name this member uses within the room."
|
|
3296
|
-
}
|
|
3497
|
+
},
|
|
3498
|
+
"required": false,
|
|
3499
|
+
"default": "",
|
|
3500
|
+
"description": "The display name this member uses within the room."
|
|
3297
3501
|
},
|
|
3298
3502
|
"isMuted": {
|
|
3299
3503
|
"type": "boolean",
|
|
3300
|
-
"required": false,
|
|
3301
|
-
"default": false,
|
|
3302
|
-
"description": "Whether notifications for this room are muted for this member.",
|
|
3303
3504
|
"_meta": {
|
|
3505
|
+
"__statedOptions": [
|
|
3506
|
+
"description",
|
|
3507
|
+
"default"
|
|
3508
|
+
],
|
|
3304
3509
|
"description": "Whether notifications for this room are muted for this member."
|
|
3305
|
-
}
|
|
3510
|
+
},
|
|
3511
|
+
"required": false,
|
|
3512
|
+
"default": false,
|
|
3513
|
+
"description": "Whether notifications for this room are muted for this member."
|
|
3306
3514
|
},
|
|
3307
3515
|
"isPinned": {
|
|
3308
3516
|
"type": "boolean",
|
|
3309
|
-
"required": false,
|
|
3310
|
-
"default": false,
|
|
3311
|
-
"description": "Whether this room is pinned for this member.",
|
|
3312
3517
|
"_meta": {
|
|
3518
|
+
"__statedOptions": [
|
|
3519
|
+
"description",
|
|
3520
|
+
"default"
|
|
3521
|
+
],
|
|
3313
3522
|
"description": "Whether this room is pinned for this member."
|
|
3314
|
-
}
|
|
3523
|
+
},
|
|
3524
|
+
"required": false,
|
|
3525
|
+
"default": false,
|
|
3526
|
+
"description": "Whether this room is pinned for this member."
|
|
3315
3527
|
}
|
|
3316
3528
|
},
|
|
3317
3529
|
"methods": {
|
|
@@ -3596,14 +3808,12 @@
|
|
|
3596
3808
|
"qualifiedName": "@happyvertical/smrt-chat:ChatReaction",
|
|
3597
3809
|
"collection": "chatreactions",
|
|
3598
3810
|
"description": "Message reaction. Internal model — reactions must be added/removed only through the membership-checked ChatService (S5 #1392).",
|
|
3599
|
-
"filePath": "
|
|
3811
|
+
"filePath": "src/models/ChatReaction.ts",
|
|
3600
3812
|
"packageName": "@happyvertical/smrt-chat",
|
|
3601
3813
|
"fields": {
|
|
3602
3814
|
"tenantId": {
|
|
3603
3815
|
"type": "text",
|
|
3604
|
-
"required": true,
|
|
3605
3816
|
"_meta": {
|
|
3606
|
-
"sqlType": "UUID",
|
|
3607
3817
|
"__tenancy": {
|
|
3608
3818
|
"isTenantIdField": true,
|
|
3609
3819
|
"autoFilter": true,
|
|
@@ -3613,37 +3823,67 @@
|
|
|
3613
3823
|
"mode": "required",
|
|
3614
3824
|
"field": "tenantId",
|
|
3615
3825
|
"allowSuperAdminBypass": false
|
|
3616
|
-
}
|
|
3617
|
-
|
|
3618
|
-
|
|
3826
|
+
},
|
|
3827
|
+
"__statedOptions": [
|
|
3828
|
+
"sqlType",
|
|
3829
|
+
"requiredFor",
|
|
3830
|
+
"__tenancy"
|
|
3831
|
+
],
|
|
3832
|
+
"sqlType": "UUID",
|
|
3833
|
+
"requiredFor": "tenant-scope"
|
|
3834
|
+
},
|
|
3835
|
+
"required": true
|
|
3836
|
+
},
|
|
3619
3837
|
"messageId": {
|
|
3620
3838
|
"type": "foreignKey",
|
|
3621
|
-
"required": true,
|
|
3622
|
-
"related": "ChatMessage",
|
|
3623
|
-
"description": "The message to which this reaction was added.",
|
|
3624
3839
|
"_meta": {
|
|
3840
|
+
"__statedOptions": [
|
|
3841
|
+
"required",
|
|
3842
|
+
"requiredFor",
|
|
3843
|
+
"description",
|
|
3844
|
+
"related"
|
|
3845
|
+
],
|
|
3846
|
+
"required": true,
|
|
3625
3847
|
"description": "The message to which this reaction was added.",
|
|
3626
|
-
"
|
|
3627
|
-
}
|
|
3848
|
+
"requiredFor": "identity"
|
|
3849
|
+
},
|
|
3850
|
+
"required": true,
|
|
3851
|
+
"related": "ChatMessage",
|
|
3852
|
+
"description": "The message to which this reaction was added."
|
|
3628
3853
|
},
|
|
3629
3854
|
"profileId": {
|
|
3630
3855
|
"type": "crossPackageRef",
|
|
3856
|
+
"_meta": {
|
|
3857
|
+
"__statedOptions": [
|
|
3858
|
+
"required",
|
|
3859
|
+
"requiredFor",
|
|
3860
|
+
"description",
|
|
3861
|
+
"related"
|
|
3862
|
+
],
|
|
3863
|
+
"required": true,
|
|
3864
|
+
"description": "The person who added this reaction.",
|
|
3865
|
+
"requiredFor": "identity"
|
|
3866
|
+
},
|
|
3631
3867
|
"required": true,
|
|
3632
3868
|
"related": "@happyvertical/smrt-profiles:Profile",
|
|
3633
|
-
"description": "The person who added this reaction."
|
|
3634
|
-
"_meta": {
|
|
3635
|
-
"description": "The person who added this reaction."
|
|
3636
|
-
}
|
|
3869
|
+
"description": "The person who added this reaction."
|
|
3637
3870
|
},
|
|
3638
3871
|
"emoji": {
|
|
3639
3872
|
"type": "text",
|
|
3640
|
-
"required": true,
|
|
3641
|
-
"default": "",
|
|
3642
|
-
"description": "The symbol chosen to express a response to the message.",
|
|
3643
3873
|
"_meta": {
|
|
3874
|
+
"__statedOptions": [
|
|
3875
|
+
"required",
|
|
3876
|
+
"requiredFor",
|
|
3877
|
+
"description",
|
|
3878
|
+
"default"
|
|
3879
|
+
],
|
|
3644
3880
|
"required": true,
|
|
3645
|
-
"description": "The symbol chosen to express a response to the message."
|
|
3646
|
-
|
|
3881
|
+
"description": "The symbol chosen to express a response to the message.",
|
|
3882
|
+
"requiredFor": "identity"
|
|
3883
|
+
},
|
|
3884
|
+
"required": true,
|
|
3885
|
+
"default": "",
|
|
3886
|
+
"description": "The symbol chosen to express a response to the message."
|
|
3647
3887
|
}
|
|
3648
3888
|
},
|
|
3649
3889
|
"methods": {},
|
|
@@ -3795,14 +4035,12 @@
|
|
|
3795
4035
|
"qualifiedName": "@happyvertical/smrt-chat:ChatRoom",
|
|
3796
4036
|
"collection": "chatrooms",
|
|
3797
4037
|
"description": "Chat room supporting public channels, private groups, DMs, and agent conversations.",
|
|
3798
|
-
"filePath": "
|
|
4038
|
+
"filePath": "src/models/ChatRoom.ts",
|
|
3799
4039
|
"packageName": "@happyvertical/smrt-chat",
|
|
3800
4040
|
"fields": {
|
|
3801
4041
|
"tenantId": {
|
|
3802
4042
|
"type": "text",
|
|
3803
|
-
"required": true,
|
|
3804
4043
|
"_meta": {
|
|
3805
|
-
"sqlType": "UUID",
|
|
3806
4044
|
"__tenancy": {
|
|
3807
4045
|
"isTenantIdField": true,
|
|
3808
4046
|
"autoFilter": true,
|
|
@@ -3812,36 +4050,58 @@
|
|
|
3812
4050
|
"mode": "required",
|
|
3813
4051
|
"field": "tenantId",
|
|
3814
4052
|
"allowSuperAdminBypass": false
|
|
3815
|
-
}
|
|
3816
|
-
|
|
4053
|
+
},
|
|
4054
|
+
"__statedOptions": [
|
|
4055
|
+
"sqlType",
|
|
4056
|
+
"requiredFor",
|
|
4057
|
+
"__tenancy"
|
|
4058
|
+
],
|
|
4059
|
+
"sqlType": "UUID",
|
|
4060
|
+
"requiredFor": "tenant-scope"
|
|
4061
|
+
},
|
|
4062
|
+
"required": true
|
|
3817
4063
|
},
|
|
3818
4064
|
"name": {
|
|
3819
4065
|
"type": "text",
|
|
3820
|
-
"required": false,
|
|
3821
|
-
"default": "",
|
|
3822
|
-
"description": "A recognizable name that helps teammates find this room.",
|
|
3823
4066
|
"_meta": {
|
|
4067
|
+
"__statedOptions": [
|
|
4068
|
+
"description",
|
|
4069
|
+
"default"
|
|
4070
|
+
],
|
|
3824
4071
|
"description": "A recognizable name that helps teammates find this room."
|
|
3825
|
-
}
|
|
4072
|
+
},
|
|
4073
|
+
"required": false,
|
|
4074
|
+
"default": "",
|
|
4075
|
+
"description": "A recognizable name that helps teammates find this room."
|
|
3826
4076
|
},
|
|
3827
4077
|
"description": {
|
|
3828
4078
|
"type": "text",
|
|
3829
|
-
"required": false,
|
|
3830
|
-
"default": "",
|
|
3831
|
-
"description": "Explain the purpose of the room and who should join.",
|
|
3832
4079
|
"_meta": {
|
|
4080
|
+
"__statedOptions": [
|
|
4081
|
+
"description",
|
|
4082
|
+
"default"
|
|
4083
|
+
],
|
|
3833
4084
|
"description": "Explain the purpose of the room and who should join."
|
|
3834
|
-
}
|
|
4085
|
+
},
|
|
4086
|
+
"required": false,
|
|
4087
|
+
"default": "",
|
|
4088
|
+
"description": "Explain the purpose of the room and who should join."
|
|
3835
4089
|
},
|
|
3836
4090
|
"roomType": {
|
|
3837
4091
|
"type": "text",
|
|
3838
|
-
"required": true,
|
|
3839
|
-
"default": "public",
|
|
3840
|
-
"description": "Whether the room is public, private, a direct message, or an assistant conversation.",
|
|
3841
4092
|
"_meta": {
|
|
4093
|
+
"__statedOptions": [
|
|
4094
|
+
"required",
|
|
4095
|
+
"description",
|
|
4096
|
+
"default",
|
|
4097
|
+
"enum"
|
|
4098
|
+
],
|
|
3842
4099
|
"required": true,
|
|
3843
4100
|
"description": "Whether the room is public, private, a direct message, or an assistant conversation."
|
|
3844
4101
|
},
|
|
4102
|
+
"required": true,
|
|
4103
|
+
"default": "public",
|
|
4104
|
+
"description": "Whether the room is public, private, a direct message, or an assistant conversation.",
|
|
3845
4105
|
"enum": [
|
|
3846
4106
|
"public",
|
|
3847
4107
|
"private",
|
|
@@ -3851,13 +4111,19 @@
|
|
|
3851
4111
|
},
|
|
3852
4112
|
"status": {
|
|
3853
4113
|
"type": "text",
|
|
3854
|
-
"required": true,
|
|
3855
|
-
"default": "active",
|
|
3856
|
-
"description": "Whether this room is active, archived, or deleted.",
|
|
3857
4114
|
"_meta": {
|
|
4115
|
+
"__statedOptions": [
|
|
4116
|
+
"required",
|
|
4117
|
+
"description",
|
|
4118
|
+
"default",
|
|
4119
|
+
"enum"
|
|
4120
|
+
],
|
|
3858
4121
|
"required": true,
|
|
3859
4122
|
"description": "Whether this room is active, archived, or deleted."
|
|
3860
4123
|
},
|
|
4124
|
+
"required": true,
|
|
4125
|
+
"default": "active",
|
|
4126
|
+
"description": "Whether this room is active, archived, or deleted.",
|
|
3861
4127
|
"enum": [
|
|
3862
4128
|
"active",
|
|
3863
4129
|
"archived",
|
|
@@ -3866,65 +4132,92 @@
|
|
|
3866
4132
|
},
|
|
3867
4133
|
"topic": {
|
|
3868
4134
|
"type": "text",
|
|
3869
|
-
"required": false,
|
|
3870
|
-
"default": "",
|
|
3871
|
-
"description": "The current subject or focus of the room.",
|
|
3872
4135
|
"_meta": {
|
|
4136
|
+
"__statedOptions": [
|
|
4137
|
+
"description",
|
|
4138
|
+
"default"
|
|
4139
|
+
],
|
|
3873
4140
|
"description": "The current subject or focus of the room."
|
|
3874
|
-
}
|
|
4141
|
+
},
|
|
4142
|
+
"required": false,
|
|
4143
|
+
"default": "",
|
|
4144
|
+
"description": "The current subject or focus of the room."
|
|
3875
4145
|
},
|
|
3876
4146
|
"avatarUrl": {
|
|
3877
4147
|
"type": "text",
|
|
3878
|
-
"required": false,
|
|
3879
|
-
"default": "",
|
|
3880
|
-
"description": "The address of the image used to represent this room.",
|
|
3881
4148
|
"_meta": {
|
|
4149
|
+
"__statedOptions": [
|
|
4150
|
+
"description",
|
|
4151
|
+
"default"
|
|
4152
|
+
],
|
|
3882
4153
|
"description": "The address of the image used to represent this room."
|
|
3883
|
-
}
|
|
4154
|
+
},
|
|
4155
|
+
"required": false,
|
|
4156
|
+
"default": "",
|
|
4157
|
+
"description": "The address of the image used to represent this room."
|
|
3884
4158
|
},
|
|
3885
4159
|
"isArchived": {
|
|
3886
4160
|
"type": "boolean",
|
|
3887
|
-
"required": false,
|
|
3888
|
-
"default": false,
|
|
3889
|
-
"description": "Whether the room has been archived from active conversations.",
|
|
3890
4161
|
"_meta": {
|
|
4162
|
+
"__statedOptions": [
|
|
4163
|
+
"description",
|
|
4164
|
+
"default"
|
|
4165
|
+
],
|
|
3891
4166
|
"description": "Whether the room has been archived from active conversations."
|
|
3892
|
-
}
|
|
4167
|
+
},
|
|
4168
|
+
"required": false,
|
|
4169
|
+
"default": false,
|
|
4170
|
+
"description": "Whether the room has been archived from active conversations."
|
|
3893
4171
|
},
|
|
3894
4172
|
"maxParticipants": {
|
|
3895
4173
|
"type": "integer",
|
|
3896
|
-
"required": false,
|
|
3897
|
-
"default": 0,
|
|
3898
|
-
"description": "The maximum number of members; zero means no configured limit.",
|
|
3899
4174
|
"_meta": {
|
|
4175
|
+
"__statedOptions": [
|
|
4176
|
+
"description",
|
|
4177
|
+
"default"
|
|
4178
|
+
],
|
|
3900
4179
|
"description": "The maximum number of members; zero means no configured limit."
|
|
3901
|
-
}
|
|
4180
|
+
},
|
|
4181
|
+
"required": false,
|
|
4182
|
+
"default": 0,
|
|
4183
|
+
"description": "The maximum number of members; zero means no configured limit."
|
|
3902
4184
|
},
|
|
3903
4185
|
"metadata": {
|
|
3904
4186
|
"type": "text",
|
|
3905
|
-
"required": false,
|
|
3906
|
-
"default": "{}",
|
|
3907
|
-
"description": "Additional room details maintained by the application.",
|
|
3908
4187
|
"_meta": {
|
|
4188
|
+
"__statedOptions": [
|
|
4189
|
+
"description",
|
|
4190
|
+
"default"
|
|
4191
|
+
],
|
|
3909
4192
|
"description": "Additional room details maintained by the application."
|
|
3910
|
-
}
|
|
4193
|
+
},
|
|
4194
|
+
"required": false,
|
|
4195
|
+
"default": "{}",
|
|
4196
|
+
"description": "Additional room details maintained by the application."
|
|
3911
4197
|
},
|
|
3912
4198
|
"createdByProfileId": {
|
|
3913
4199
|
"type": "crossPackageRef",
|
|
3914
|
-
"required": false,
|
|
3915
|
-
"related": "@happyvertical/smrt-profiles:Profile",
|
|
3916
|
-
"description": "The person who originally created this room.",
|
|
3917
4200
|
"_meta": {
|
|
4201
|
+
"__statedOptions": [
|
|
4202
|
+
"description",
|
|
4203
|
+
"related"
|
|
4204
|
+
],
|
|
3918
4205
|
"description": "The person who originally created this room."
|
|
3919
|
-
}
|
|
4206
|
+
},
|
|
4207
|
+
"required": false,
|
|
4208
|
+
"related": "@happyvertical/smrt-profiles:Profile",
|
|
4209
|
+
"description": "The person who originally created this room."
|
|
3920
4210
|
},
|
|
3921
4211
|
"lastMessageAt": {
|
|
3922
4212
|
"type": "datetime",
|
|
3923
|
-
"required": false,
|
|
3924
|
-
"description": "When the most recent message was sent in this room.",
|
|
3925
4213
|
"_meta": {
|
|
4214
|
+
"__statedOptions": [
|
|
4215
|
+
"description"
|
|
4216
|
+
],
|
|
3926
4217
|
"description": "When the most recent message was sent in this room."
|
|
3927
|
-
}
|
|
4218
|
+
},
|
|
4219
|
+
"required": false,
|
|
4220
|
+
"description": "When the most recent message was sent in this room."
|
|
3928
4221
|
}
|
|
3929
4222
|
},
|
|
3930
4223
|
"methods": {
|
|
@@ -4198,14 +4491,12 @@
|
|
|
4198
4491
|
"qualifiedName": "@happyvertical/smrt-chat:ChatThread",
|
|
4199
4492
|
"collection": "chatthreads",
|
|
4200
4493
|
"description": "Conversation thread. Internal model — threads must be created/mutated only through the membership-checked ChatService (S5 #1392).",
|
|
4201
|
-
"filePath": "
|
|
4494
|
+
"filePath": "src/models/ChatThread.ts",
|
|
4202
4495
|
"packageName": "@happyvertical/smrt-chat",
|
|
4203
4496
|
"fields": {
|
|
4204
4497
|
"tenantId": {
|
|
4205
4498
|
"type": "text",
|
|
4206
|
-
"required": true,
|
|
4207
4499
|
"_meta": {
|
|
4208
|
-
"sqlType": "UUID",
|
|
4209
4500
|
"__tenancy": {
|
|
4210
4501
|
"isTenantIdField": true,
|
|
4211
4502
|
"autoFilter": true,
|
|
@@ -4215,72 +4506,113 @@
|
|
|
4215
4506
|
"mode": "required",
|
|
4216
4507
|
"field": "tenantId",
|
|
4217
4508
|
"allowSuperAdminBypass": false
|
|
4218
|
-
}
|
|
4219
|
-
|
|
4509
|
+
},
|
|
4510
|
+
"__statedOptions": [
|
|
4511
|
+
"sqlType",
|
|
4512
|
+
"requiredFor",
|
|
4513
|
+
"__tenancy"
|
|
4514
|
+
],
|
|
4515
|
+
"sqlType": "UUID",
|
|
4516
|
+
"requiredFor": "tenant-scope"
|
|
4517
|
+
},
|
|
4518
|
+
"required": true
|
|
4220
4519
|
},
|
|
4221
4520
|
"roomId": {
|
|
4222
4521
|
"type": "foreignKey",
|
|
4223
|
-
"required": true,
|
|
4224
|
-
"related": "ChatRoom",
|
|
4225
|
-
"description": "The room containing this discussion thread.",
|
|
4226
4522
|
"_meta": {
|
|
4523
|
+
"__statedOptions": [
|
|
4524
|
+
"required",
|
|
4525
|
+
"requiredFor",
|
|
4526
|
+
"description",
|
|
4527
|
+
"related"
|
|
4528
|
+
],
|
|
4529
|
+
"required": true,
|
|
4227
4530
|
"description": "The room containing this discussion thread.",
|
|
4228
|
-
"
|
|
4229
|
-
}
|
|
4531
|
+
"requiredFor": "identity"
|
|
4532
|
+
},
|
|
4533
|
+
"required": true,
|
|
4534
|
+
"related": "ChatRoom",
|
|
4535
|
+
"description": "The room containing this discussion thread."
|
|
4230
4536
|
},
|
|
4231
4537
|
"rootMessageId": {
|
|
4232
4538
|
"type": "foreignKey",
|
|
4233
|
-
"required": false,
|
|
4234
|
-
"related": "ChatMessage",
|
|
4235
|
-
"description": "The message that started this thread, when it began as a reply.",
|
|
4236
4539
|
"_meta": {
|
|
4540
|
+
"__statedOptions": [
|
|
4541
|
+
"nullable",
|
|
4542
|
+
"description",
|
|
4543
|
+
"related",
|
|
4544
|
+
"required"
|
|
4545
|
+
],
|
|
4237
4546
|
"description": "The message that started this thread, when it began as a reply.",
|
|
4238
|
-
"nullable": true
|
|
4239
|
-
|
|
4547
|
+
"nullable": true,
|
|
4548
|
+
"required": false
|
|
4549
|
+
},
|
|
4550
|
+
"required": false,
|
|
4551
|
+
"related": "ChatMessage",
|
|
4552
|
+
"description": "The message that started this thread, when it began as a reply."
|
|
4240
4553
|
},
|
|
4241
4554
|
"title": {
|
|
4242
4555
|
"type": "text",
|
|
4243
|
-
"required": false,
|
|
4244
|
-
"default": "",
|
|
4245
|
-
"description": "A short title describing the subject of this thread.",
|
|
4246
4556
|
"_meta": {
|
|
4557
|
+
"__statedOptions": [
|
|
4558
|
+
"description",
|
|
4559
|
+
"default"
|
|
4560
|
+
],
|
|
4247
4561
|
"description": "A short title describing the subject of this thread."
|
|
4248
|
-
}
|
|
4562
|
+
},
|
|
4563
|
+
"required": false,
|
|
4564
|
+
"default": "",
|
|
4565
|
+
"description": "A short title describing the subject of this thread."
|
|
4249
4566
|
},
|
|
4250
4567
|
"isResolved": {
|
|
4251
4568
|
"type": "boolean",
|
|
4252
|
-
"required": false,
|
|
4253
|
-
"default": false,
|
|
4254
|
-
"description": "Whether the discussion has reached a resolution.",
|
|
4255
4569
|
"_meta": {
|
|
4570
|
+
"__statedOptions": [
|
|
4571
|
+
"description",
|
|
4572
|
+
"default"
|
|
4573
|
+
],
|
|
4256
4574
|
"description": "Whether the discussion has reached a resolution."
|
|
4257
|
-
}
|
|
4575
|
+
},
|
|
4576
|
+
"required": false,
|
|
4577
|
+
"default": false,
|
|
4578
|
+
"description": "Whether the discussion has reached a resolution."
|
|
4258
4579
|
},
|
|
4259
4580
|
"messageCount": {
|
|
4260
4581
|
"type": "integer",
|
|
4261
|
-
"required": false,
|
|
4262
|
-
"default": 0,
|
|
4263
|
-
"description": "The number of messages in this thread.",
|
|
4264
4582
|
"_meta": {
|
|
4583
|
+
"__statedOptions": [
|
|
4584
|
+
"description",
|
|
4585
|
+
"default"
|
|
4586
|
+
],
|
|
4265
4587
|
"description": "The number of messages in this thread."
|
|
4266
|
-
}
|
|
4588
|
+
},
|
|
4589
|
+
"required": false,
|
|
4590
|
+
"default": 0,
|
|
4591
|
+
"description": "The number of messages in this thread."
|
|
4267
4592
|
},
|
|
4268
4593
|
"lastMessageAt": {
|
|
4269
4594
|
"type": "datetime",
|
|
4270
|
-
"required": false,
|
|
4271
|
-
"description": "When the most recent message was sent in this thread.",
|
|
4272
4595
|
"_meta": {
|
|
4596
|
+
"__statedOptions": [
|
|
4597
|
+
"description"
|
|
4598
|
+
],
|
|
4273
4599
|
"description": "When the most recent message was sent in this thread."
|
|
4274
|
-
}
|
|
4600
|
+
},
|
|
4601
|
+
"required": false,
|
|
4602
|
+
"description": "When the most recent message was sent in this thread."
|
|
4275
4603
|
},
|
|
4276
4604
|
"participantCount": {
|
|
4277
4605
|
"type": "integer",
|
|
4278
|
-
"required": false,
|
|
4279
|
-
"default": 0,
|
|
4280
|
-
"description": "The number of people participating in this thread.",
|
|
4281
4606
|
"_meta": {
|
|
4607
|
+
"__statedOptions": [
|
|
4608
|
+
"description",
|
|
4609
|
+
"default"
|
|
4610
|
+
],
|
|
4282
4611
|
"description": "The number of people participating in this thread."
|
|
4283
|
-
}
|
|
4612
|
+
},
|
|
4613
|
+
"required": false,
|
|
4614
|
+
"default": 0,
|
|
4615
|
+
"description": "The number of people participating in this thread."
|
|
4284
4616
|
}
|
|
4285
4617
|
},
|
|
4286
4618
|
"methods": {
|
|
@@ -4473,14 +4805,12 @@
|
|
|
4473
4805
|
"qualifiedName": "@happyvertical/smrt-chat:VoiceGatewayTurn",
|
|
4474
4806
|
"collection": "voicegatewayturns",
|
|
4475
4807
|
"description": "Durable reservation for a gateway turn. The natural key makes turn_id replay checks concurrency-safe before transcript messages are written.",
|
|
4476
|
-
"filePath": "
|
|
4808
|
+
"filePath": "src/models/VoiceGatewayTurn.ts",
|
|
4477
4809
|
"packageName": "@happyvertical/smrt-chat",
|
|
4478
4810
|
"fields": {
|
|
4479
4811
|
"tenantId": {
|
|
4480
4812
|
"type": "text",
|
|
4481
|
-
"required": true,
|
|
4482
4813
|
"_meta": {
|
|
4483
|
-
"sqlType": "UUID",
|
|
4484
4814
|
"__tenancy": {
|
|
4485
4815
|
"isTenantIdField": true,
|
|
4486
4816
|
"autoFilter": true,
|
|
@@ -4490,48 +4820,79 @@
|
|
|
4490
4820
|
"mode": "required",
|
|
4491
4821
|
"field": "tenantId",
|
|
4492
4822
|
"allowSuperAdminBypass": false
|
|
4493
|
-
}
|
|
4494
|
-
|
|
4823
|
+
},
|
|
4824
|
+
"__statedOptions": [
|
|
4825
|
+
"sqlType",
|
|
4826
|
+
"requiredFor",
|
|
4827
|
+
"__tenancy"
|
|
4828
|
+
],
|
|
4829
|
+
"sqlType": "UUID",
|
|
4830
|
+
"requiredFor": "tenant-scope"
|
|
4831
|
+
},
|
|
4832
|
+
"required": true
|
|
4495
4833
|
},
|
|
4496
4834
|
"voiceSessionId": {
|
|
4497
4835
|
"type": "foreignKey",
|
|
4498
|
-
"required": true,
|
|
4499
|
-
"related": "VoiceSession",
|
|
4500
4836
|
"_meta": {
|
|
4501
|
-
"
|
|
4502
|
-
|
|
4837
|
+
"__statedOptions": [
|
|
4838
|
+
"required",
|
|
4839
|
+
"requiredFor",
|
|
4840
|
+
"related"
|
|
4841
|
+
],
|
|
4842
|
+
"required": true,
|
|
4843
|
+
"requiredFor": "idempotency"
|
|
4844
|
+
},
|
|
4845
|
+
"required": true,
|
|
4846
|
+
"related": "VoiceSession"
|
|
4503
4847
|
},
|
|
4504
4848
|
"gatewaySessionId": {
|
|
4505
4849
|
"type": "text",
|
|
4506
|
-
"required": true,
|
|
4507
|
-
"default": "",
|
|
4508
4850
|
"_meta": {
|
|
4509
|
-
"
|
|
4510
|
-
|
|
4851
|
+
"__statedOptions": [
|
|
4852
|
+
"default"
|
|
4853
|
+
]
|
|
4854
|
+
},
|
|
4855
|
+
"required": false,
|
|
4856
|
+
"default": ""
|
|
4511
4857
|
},
|
|
4512
4858
|
"gatewayTurnId": {
|
|
4513
4859
|
"type": "text",
|
|
4514
|
-
"required": true,
|
|
4515
|
-
"default": "",
|
|
4516
4860
|
"_meta": {
|
|
4517
|
-
"
|
|
4518
|
-
|
|
4861
|
+
"__statedOptions": [
|
|
4862
|
+
"required",
|
|
4863
|
+
"requiredFor",
|
|
4864
|
+
"default"
|
|
4865
|
+
],
|
|
4866
|
+
"required": true,
|
|
4867
|
+
"requiredFor": "idempotency"
|
|
4868
|
+
},
|
|
4869
|
+
"required": true,
|
|
4870
|
+
"default": ""
|
|
4519
4871
|
},
|
|
4520
4872
|
"target": {
|
|
4521
4873
|
"type": "text",
|
|
4522
|
-
"required": true,
|
|
4523
|
-
"default": "smrt:chat",
|
|
4524
4874
|
"_meta": {
|
|
4875
|
+
"__statedOptions": [
|
|
4876
|
+
"required",
|
|
4877
|
+
"default"
|
|
4878
|
+
],
|
|
4525
4879
|
"required": true
|
|
4526
|
-
}
|
|
4880
|
+
},
|
|
4881
|
+
"required": true,
|
|
4882
|
+
"default": "smrt:chat"
|
|
4527
4883
|
},
|
|
4528
4884
|
"status": {
|
|
4529
4885
|
"type": "text",
|
|
4530
|
-
"required": true,
|
|
4531
|
-
"default": "processing",
|
|
4532
4886
|
"_meta": {
|
|
4887
|
+
"__statedOptions": [
|
|
4888
|
+
"required",
|
|
4889
|
+
"default",
|
|
4890
|
+
"enum"
|
|
4891
|
+
],
|
|
4533
4892
|
"required": true
|
|
4534
4893
|
},
|
|
4894
|
+
"required": true,
|
|
4895
|
+
"default": "processing",
|
|
4535
4896
|
"enum": [
|
|
4536
4897
|
"processing",
|
|
4537
4898
|
"completed",
|
|
@@ -4540,10 +4901,16 @@
|
|
|
4540
4901
|
},
|
|
4541
4902
|
"completedAt": {
|
|
4542
4903
|
"type": "datetime",
|
|
4904
|
+
"_meta": {
|
|
4905
|
+
"__statedOptions": []
|
|
4906
|
+
},
|
|
4543
4907
|
"required": false
|
|
4544
4908
|
},
|
|
4545
4909
|
"failedAt": {
|
|
4546
4910
|
"type": "datetime",
|
|
4911
|
+
"_meta": {
|
|
4912
|
+
"__statedOptions": []
|
|
4913
|
+
},
|
|
4547
4914
|
"required": false
|
|
4548
4915
|
}
|
|
4549
4916
|
},
|
|
@@ -4609,11 +4976,6 @@
|
|
|
4609
4976
|
"rule": "required",
|
|
4610
4977
|
"fieldType": "foreignKey"
|
|
4611
4978
|
},
|
|
4612
|
-
{
|
|
4613
|
-
"field": "gatewaySessionId",
|
|
4614
|
-
"rule": "required",
|
|
4615
|
-
"fieldType": "text"
|
|
4616
|
-
},
|
|
4617
4979
|
{
|
|
4618
4980
|
"field": "gatewayTurnId",
|
|
4619
4981
|
"rule": "required",
|
|
@@ -4632,7 +4994,7 @@
|
|
|
4632
4994
|
],
|
|
4633
4995
|
"schema": {
|
|
4634
4996
|
"tableName": "voice_gateway_turns",
|
|
4635
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"voice_gateway_turns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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
|
|
4997
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"voice_gateway_turns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 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);",
|
|
4636
4998
|
"columns": {
|
|
4637
4999
|
"_sync_origin_device_id": {
|
|
4638
5000
|
"type": "TEXT"
|
|
@@ -4685,7 +5047,7 @@
|
|
|
4685
5047
|
},
|
|
4686
5048
|
"gateway_session_id": {
|
|
4687
5049
|
"type": "TEXT",
|
|
4688
|
-
"notNull":
|
|
5050
|
+
"notNull": false,
|
|
4689
5051
|
"unique": false,
|
|
4690
5052
|
"default": ""
|
|
4691
5053
|
},
|
|
@@ -4742,7 +5104,7 @@
|
|
|
4742
5104
|
]
|
|
4743
5105
|
}
|
|
4744
5106
|
],
|
|
4745
|
-
"version": "
|
|
5107
|
+
"version": "c27610cd"
|
|
4746
5108
|
},
|
|
4747
5109
|
"importPath": "@happyvertical/smrt-chat"
|
|
4748
5110
|
},
|
|
@@ -4752,14 +5114,12 @@
|
|
|
4752
5114
|
"qualifiedName": "@happyvertical/smrt-chat:VoiceSession",
|
|
4753
5115
|
"collection": "voicesessions",
|
|
4754
5116
|
"description": "Short-lived binding proving a voice gateway turn belongs to an authenticated SMRT actor, persona, and chat session.",
|
|
4755
|
-
"filePath": "
|
|
5117
|
+
"filePath": "src/models/VoiceSession.ts",
|
|
4756
5118
|
"packageName": "@happyvertical/smrt-chat",
|
|
4757
5119
|
"fields": {
|
|
4758
5120
|
"tenantId": {
|
|
4759
5121
|
"type": "text",
|
|
4760
|
-
"required": true,
|
|
4761
5122
|
"_meta": {
|
|
4762
|
-
"sqlType": "UUID",
|
|
4763
5123
|
"__tenancy": {
|
|
4764
5124
|
"isTenantIdField": true,
|
|
4765
5125
|
"autoFilter": true,
|
|
@@ -4769,71 +5129,135 @@
|
|
|
4769
5129
|
"mode": "required",
|
|
4770
5130
|
"field": "tenantId",
|
|
4771
5131
|
"allowSuperAdminBypass": false
|
|
4772
|
-
}
|
|
4773
|
-
|
|
5132
|
+
},
|
|
5133
|
+
"__statedOptions": [
|
|
5134
|
+
"sqlType",
|
|
5135
|
+
"requiredFor",
|
|
5136
|
+
"__tenancy"
|
|
5137
|
+
],
|
|
5138
|
+
"sqlType": "UUID",
|
|
5139
|
+
"requiredFor": "tenant-scope"
|
|
5140
|
+
},
|
|
5141
|
+
"required": true
|
|
4774
5142
|
},
|
|
4775
5143
|
"gatewaySessionId": {
|
|
4776
5144
|
"type": "text",
|
|
4777
|
-
"required": true,
|
|
4778
|
-
"default": "",
|
|
4779
5145
|
"_meta": {
|
|
4780
|
-
"
|
|
4781
|
-
|
|
5146
|
+
"__statedOptions": [
|
|
5147
|
+
"required",
|
|
5148
|
+
"requiredFor",
|
|
5149
|
+
"default"
|
|
5150
|
+
],
|
|
5151
|
+
"required": true,
|
|
5152
|
+
"requiredFor": "identity"
|
|
5153
|
+
},
|
|
5154
|
+
"required": true,
|
|
5155
|
+
"default": ""
|
|
4782
5156
|
},
|
|
4783
5157
|
"actorProfileId": {
|
|
4784
5158
|
"type": "crossPackageRef",
|
|
5159
|
+
"_meta": {
|
|
5160
|
+
"__statedOptions": [
|
|
5161
|
+
"required",
|
|
5162
|
+
"requiredFor",
|
|
5163
|
+
"related"
|
|
5164
|
+
],
|
|
5165
|
+
"required": true,
|
|
5166
|
+
"requiredFor": "identity"
|
|
5167
|
+
},
|
|
4785
5168
|
"required": true,
|
|
4786
5169
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
4787
5170
|
},
|
|
4788
5171
|
"actorUserId": {
|
|
4789
5172
|
"type": "crossPackageRef",
|
|
4790
|
-
"required": false,
|
|
4791
|
-
"related": "@happyvertical/smrt-users:User",
|
|
4792
5173
|
"_meta": {
|
|
4793
|
-
"
|
|
4794
|
-
|
|
5174
|
+
"__statedOptions": [
|
|
5175
|
+
"nullable",
|
|
5176
|
+
"related",
|
|
5177
|
+
"required"
|
|
5178
|
+
],
|
|
5179
|
+
"nullable": true,
|
|
5180
|
+
"required": false
|
|
5181
|
+
},
|
|
5182
|
+
"required": false,
|
|
5183
|
+
"related": "@happyvertical/smrt-users:User"
|
|
4795
5184
|
},
|
|
4796
5185
|
"personaId": {
|
|
4797
5186
|
"type": "crossPackageRef",
|
|
5187
|
+
"_meta": {
|
|
5188
|
+
"__statedOptions": [
|
|
5189
|
+
"required",
|
|
5190
|
+
"requiredFor",
|
|
5191
|
+
"related"
|
|
5192
|
+
],
|
|
5193
|
+
"required": true,
|
|
5194
|
+
"requiredFor": "identity"
|
|
5195
|
+
},
|
|
4798
5196
|
"required": true,
|
|
4799
5197
|
"related": "@happyvertical/smrt-personas:AgentPersona"
|
|
4800
5198
|
},
|
|
4801
5199
|
"agentSessionId": {
|
|
4802
5200
|
"type": "foreignKey",
|
|
4803
|
-
"required": true,
|
|
4804
|
-
"related": "AgentSession",
|
|
4805
5201
|
"_meta": {
|
|
4806
|
-
"
|
|
4807
|
-
|
|
5202
|
+
"__statedOptions": [
|
|
5203
|
+
"required",
|
|
5204
|
+
"requiredFor",
|
|
5205
|
+
"related"
|
|
5206
|
+
],
|
|
5207
|
+
"required": true,
|
|
5208
|
+
"requiredFor": "identity"
|
|
5209
|
+
},
|
|
5210
|
+
"required": true,
|
|
5211
|
+
"related": "AgentSession"
|
|
4808
5212
|
},
|
|
4809
5213
|
"chatRoomId": {
|
|
4810
5214
|
"type": "foreignKey",
|
|
4811
|
-
"required": true,
|
|
4812
|
-
"related": "ChatRoom",
|
|
4813
5215
|
"_meta": {
|
|
4814
|
-
"
|
|
4815
|
-
|
|
5216
|
+
"__statedOptions": [
|
|
5217
|
+
"required",
|
|
5218
|
+
"requiredFor",
|
|
5219
|
+
"related"
|
|
5220
|
+
],
|
|
5221
|
+
"required": true,
|
|
5222
|
+
"requiredFor": "identity"
|
|
5223
|
+
},
|
|
5224
|
+
"required": true,
|
|
5225
|
+
"related": "ChatRoom"
|
|
4816
5226
|
},
|
|
4817
5227
|
"threadId": {
|
|
4818
5228
|
"type": "foreignKey",
|
|
5229
|
+
"_meta": {
|
|
5230
|
+
"__statedOptions": [
|
|
5231
|
+
"related"
|
|
5232
|
+
]
|
|
5233
|
+
},
|
|
4819
5234
|
"required": false,
|
|
4820
5235
|
"related": "ChatThread"
|
|
4821
5236
|
},
|
|
4822
5237
|
"target": {
|
|
4823
5238
|
"type": "text",
|
|
4824
|
-
"required": true,
|
|
4825
|
-
"default": "smrt:chat",
|
|
4826
5239
|
"_meta": {
|
|
5240
|
+
"__statedOptions": [
|
|
5241
|
+
"required",
|
|
5242
|
+
"default"
|
|
5243
|
+
],
|
|
4827
5244
|
"required": true
|
|
4828
|
-
}
|
|
5245
|
+
},
|
|
5246
|
+
"required": true,
|
|
5247
|
+
"default": "smrt:chat"
|
|
4829
5248
|
},
|
|
4830
5249
|
"status": {
|
|
4831
5250
|
"type": "text",
|
|
4832
|
-
"required": true,
|
|
4833
|
-
"default": "active",
|
|
4834
5251
|
"_meta": {
|
|
5252
|
+
"__statedOptions": [
|
|
5253
|
+
"required",
|
|
5254
|
+
"default",
|
|
5255
|
+
"enum"
|
|
5256
|
+
],
|
|
4835
5257
|
"required": true
|
|
4836
5258
|
},
|
|
5259
|
+
"required": true,
|
|
5260
|
+
"default": "active",
|
|
4837
5261
|
"enum": [
|
|
4838
5262
|
"active",
|
|
4839
5263
|
"expired",
|
|
@@ -4842,31 +5266,55 @@
|
|
|
4842
5266
|
},
|
|
4843
5267
|
"expiresAt": {
|
|
4844
5268
|
"type": "datetime",
|
|
4845
|
-
"required": true,
|
|
4846
5269
|
"_meta": {
|
|
5270
|
+
"__statedOptions": [
|
|
5271
|
+
"required"
|
|
5272
|
+
],
|
|
4847
5273
|
"required": true
|
|
4848
|
-
}
|
|
5274
|
+
},
|
|
5275
|
+
"required": true
|
|
4849
5276
|
},
|
|
4850
5277
|
"lastTurnAt": {
|
|
4851
5278
|
"type": "datetime",
|
|
5279
|
+
"_meta": {
|
|
5280
|
+
"__statedOptions": []
|
|
5281
|
+
},
|
|
4852
5282
|
"required": false
|
|
4853
5283
|
},
|
|
4854
5284
|
"lastGatewayTurnId": {
|
|
4855
5285
|
"type": "text",
|
|
5286
|
+
"_meta": {
|
|
5287
|
+
"__statedOptions": []
|
|
5288
|
+
},
|
|
4856
5289
|
"required": false
|
|
4857
5290
|
},
|
|
4858
5291
|
"personaSnapshot": {
|
|
4859
5292
|
"type": "text",
|
|
5293
|
+
"_meta": {
|
|
5294
|
+
"__statedOptions": [
|
|
5295
|
+
"default"
|
|
5296
|
+
]
|
|
5297
|
+
},
|
|
4860
5298
|
"required": false,
|
|
4861
5299
|
"default": "{}"
|
|
4862
5300
|
},
|
|
4863
5301
|
"metadata": {
|
|
4864
5302
|
"type": "text",
|
|
5303
|
+
"_meta": {
|
|
5304
|
+
"__statedOptions": [
|
|
5305
|
+
"default"
|
|
5306
|
+
]
|
|
5307
|
+
},
|
|
4865
5308
|
"required": false,
|
|
4866
5309
|
"default": "{}"
|
|
4867
5310
|
},
|
|
4868
5311
|
"processedTurnIds": {
|
|
4869
5312
|
"type": "text",
|
|
5313
|
+
"_meta": {
|
|
5314
|
+
"__statedOptions": [
|
|
5315
|
+
"default"
|
|
5316
|
+
]
|
|
5317
|
+
},
|
|
4870
5318
|
"required": false,
|
|
4871
5319
|
"default": "[]"
|
|
4872
5320
|
}
|
|
@@ -5495,5 +5943,6 @@
|
|
|
5495
5943
|
"@happyvertical/smrt-users"
|
|
5496
5944
|
]
|
|
5497
5945
|
},
|
|
5946
|
+
"schemaFingerprint": "f5ef732143d108fe2da19ca72189d2b34c8fb717e3883c5525a84a6e10c0f011",
|
|
5498
5947
|
"stampsConstructors": true
|
|
5499
5948
|
}
|