@happyvertical/smrt-app-shell 0.0.0-stage → 0.60.16

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.
Files changed (56) hide show
  1. package/AGENTS.md +99 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +173 -2
  5. package/agents/engine.md +85 -0
  6. package/dist/engine/app-runtime.d.ts +138 -0
  7. package/dist/engine/app-runtime.js +545 -0
  8. package/dist/engine/app-worker.d.ts +1 -0
  9. package/dist/engine/app-worker.js +62 -0
  10. package/dist/engine/commands.d.ts +94 -0
  11. package/dist/engine/commands.js +30 -0
  12. package/dist/engine/definition.d.ts +192 -0
  13. package/dist/engine/definition.js +497 -0
  14. package/dist/engine/errors.d.ts +23 -0
  15. package/dist/engine/errors.js +35 -0
  16. package/dist/engine/host.d.ts +153 -0
  17. package/dist/engine/host.js +791 -0
  18. package/dist/engine/index.d.ts +6 -0
  19. package/dist/engine/index.js +7 -0
  20. package/dist/engine/sandbox.d.ts +60 -0
  21. package/dist/engine/sandbox.js +260 -0
  22. package/dist/engine/snapshots.d.ts +7 -0
  23. package/dist/engine/snapshots.js +54 -0
  24. package/dist/engine/store.d.ts +39 -0
  25. package/dist/engine/store.js +32 -0
  26. package/dist/engine/worker-handle.d.ts +29 -0
  27. package/dist/engine/worker-handle.js +89 -0
  28. package/dist/engine/worker-protocol.d.ts +22 -0
  29. package/dist/engine/worker-protocol.js +20 -0
  30. package/dist/lib/objects/App.d.ts +60 -0
  31. package/dist/lib/objects/App.js +273 -0
  32. package/dist/lib/objects/AppVersion.d.ts +22 -0
  33. package/dist/lib/objects/AppVersion.js +62 -0
  34. package/dist/lib/objects/Approval.d.ts +39 -0
  35. package/dist/lib/objects/Approval.js +101 -0
  36. package/dist/lib/objects/AssistantMessage.d.ts +24 -0
  37. package/dist/lib/objects/AssistantMessage.js +63 -0
  38. package/dist/lib/objects/AssistantThread.d.ts +16 -0
  39. package/dist/lib/objects/AssistantThread.js +44 -0
  40. package/dist/lib/objects/index.d.ts +5 -0
  41. package/dist/lib/objects/index.js +5 -0
  42. package/dist/lib/server/approvals.d.ts +69 -0
  43. package/dist/lib/server/approvals.js +239 -0
  44. package/dist/lib/server/builder.d.ts +16 -0
  45. package/dist/lib/server/builder.js +71 -0
  46. package/dist/lib/server/events.d.ts +16 -0
  47. package/dist/lib/server/events.js +14 -0
  48. package/dist/lib/server/host.d.ts +22 -0
  49. package/dist/lib/server/host.js +96 -0
  50. package/dist/lib/server/owner.d.ts +33 -0
  51. package/dist/lib/server/owner.js +92 -0
  52. package/dist/lib/server/version-store.d.ts +20 -0
  53. package/dist/lib/server/version-store.js +115 -0
  54. package/dist/manifest.json +1680 -0
  55. package/dist/smrt-knowledge.okf.md +95 -0
  56. package/package.json +80 -3
@@ -0,0 +1,1680 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 0,
4
+ "packageName": "@happyvertical/smrt-app-shell",
5
+ "packageVersion": "0.60.16",
6
+ "objects": {
7
+ "@happyvertical/smrt-app-shell:App": {
8
+ "name": "app",
9
+ "className": "App",
10
+ "qualifiedName": "@happyvertical/smrt-app-shell:App",
11
+ "collection": "apps",
12
+ "description": "The shell's one app: a singleton row holding the current definition. Its static methods are the builder operations (so smrt generates their REST, MCP and CLI). All are owner only.",
13
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/App.ts",
14
+ "packageName": "@happyvertical/smrt-app-shell",
15
+ "fields": {
16
+ "name": {
17
+ "type": "text",
18
+ "required": false,
19
+ "_meta": {}
20
+ },
21
+ "currentVersion": {
22
+ "type": "integer",
23
+ "required": false,
24
+ "_meta": {}
25
+ },
26
+ "definition": {
27
+ "type": "text",
28
+ "required": false,
29
+ "_meta": {}
30
+ }
31
+ },
32
+ "methods": {
33
+ "defineModel": {
34
+ "name": "defineModel",
35
+ "async": true,
36
+ "parameters": [
37
+ {
38
+ "name": "name",
39
+ "type": "string",
40
+ "optional": false
41
+ },
42
+ {
43
+ "name": "fields",
44
+ "type": "Record<string, FieldDef>",
45
+ "optional": true
46
+ },
47
+ {
48
+ "name": "label",
49
+ "type": "string",
50
+ "optional": true
51
+ }
52
+ ],
53
+ "returnType": "any",
54
+ "isStatic": true,
55
+ "isPublic": true
56
+ },
57
+ "addField": {
58
+ "name": "addField",
59
+ "async": true,
60
+ "parameters": [
61
+ {
62
+ "name": "model",
63
+ "type": "string",
64
+ "optional": false
65
+ },
66
+ {
67
+ "name": "field",
68
+ "type": "string",
69
+ "optional": false
70
+ },
71
+ {
72
+ "name": "definition",
73
+ "type": "FieldDef",
74
+ "optional": false
75
+ }
76
+ ],
77
+ "returnType": "any",
78
+ "isStatic": true,
79
+ "isPublic": true
80
+ },
81
+ "hideField": {
82
+ "name": "hideField",
83
+ "async": true,
84
+ "parameters": [
85
+ {
86
+ "name": "model",
87
+ "type": "string",
88
+ "optional": false
89
+ },
90
+ {
91
+ "name": "field",
92
+ "type": "string",
93
+ "optional": false
94
+ }
95
+ ],
96
+ "returnType": "any",
97
+ "isStatic": true,
98
+ "isPublic": true
99
+ },
100
+ "renameField": {
101
+ "name": "renameField",
102
+ "async": true,
103
+ "parameters": [
104
+ {
105
+ "name": "model",
106
+ "type": "string",
107
+ "optional": false
108
+ },
109
+ {
110
+ "name": "from",
111
+ "type": "string",
112
+ "optional": false
113
+ },
114
+ {
115
+ "name": "to",
116
+ "type": "string",
117
+ "optional": false
118
+ }
119
+ ],
120
+ "returnType": "any",
121
+ "isStatic": true,
122
+ "isPublic": true
123
+ },
124
+ "removeField": {
125
+ "name": "removeField",
126
+ "async": true,
127
+ "parameters": [
128
+ {
129
+ "name": "model",
130
+ "type": "string",
131
+ "optional": false
132
+ },
133
+ {
134
+ "name": "field",
135
+ "type": "string",
136
+ "optional": false
137
+ }
138
+ ],
139
+ "returnType": "any",
140
+ "isStatic": true,
141
+ "isPublic": true
142
+ },
143
+ "changeFieldType": {
144
+ "name": "changeFieldType",
145
+ "async": true,
146
+ "parameters": [
147
+ {
148
+ "name": "model",
149
+ "type": "string",
150
+ "optional": false
151
+ },
152
+ {
153
+ "name": "field",
154
+ "type": "string",
155
+ "optional": false
156
+ },
157
+ {
158
+ "name": "definition",
159
+ "type": "FieldDef",
160
+ "optional": false
161
+ }
162
+ ],
163
+ "returnType": "any",
164
+ "isStatic": true,
165
+ "isPublic": true
166
+ },
167
+ "removeModel": {
168
+ "name": "removeModel",
169
+ "async": true,
170
+ "parameters": [
171
+ {
172
+ "name": "model",
173
+ "type": "string",
174
+ "optional": false
175
+ }
176
+ ],
177
+ "returnType": "any",
178
+ "isStatic": true,
179
+ "isPublic": true
180
+ },
181
+ "addMethod": {
182
+ "name": "addMethod",
183
+ "async": true,
184
+ "parameters": [
185
+ {
186
+ "name": "model",
187
+ "type": "string",
188
+ "optional": false
189
+ },
190
+ {
191
+ "name": "name",
192
+ "type": "string",
193
+ "optional": false
194
+ },
195
+ {
196
+ "name": "method",
197
+ "type": "MethodDef",
198
+ "optional": false
199
+ }
200
+ ],
201
+ "returnType": "any",
202
+ "isStatic": true,
203
+ "isPublic": true
204
+ },
205
+ "enableRecipe": {
206
+ "name": "enableRecipe",
207
+ "async": true,
208
+ "parameters": [
209
+ {
210
+ "name": "recipe",
211
+ "type": "string",
212
+ "optional": false
213
+ }
214
+ ],
215
+ "returnType": "any",
216
+ "isStatic": true,
217
+ "isPublic": true
218
+ },
219
+ "undo": {
220
+ "name": "undo",
221
+ "async": true,
222
+ "parameters": [],
223
+ "returnType": "any",
224
+ "isStatic": true,
225
+ "isPublic": true
226
+ },
227
+ "cleanUp": {
228
+ "name": "cleanUp",
229
+ "async": true,
230
+ "parameters": [
231
+ {
232
+ "name": "keep",
233
+ "type": "number",
234
+ "optional": true
235
+ }
236
+ ],
237
+ "returnType": "any",
238
+ "isStatic": true,
239
+ "isPublic": true
240
+ },
241
+ "exportTemplate": {
242
+ "name": "exportTemplate",
243
+ "async": true,
244
+ "parameters": [
245
+ {
246
+ "name": "includeRecords",
247
+ "type": "boolean",
248
+ "optional": true
249
+ }
250
+ ],
251
+ "returnType": "any",
252
+ "isStatic": true,
253
+ "isPublic": true
254
+ },
255
+ "importTemplate": {
256
+ "name": "importTemplate",
257
+ "async": true,
258
+ "parameters": [
259
+ {
260
+ "name": "data",
261
+ "type": "Record<string, unknown>",
262
+ "optional": false
263
+ }
264
+ ],
265
+ "returnType": "any",
266
+ "isStatic": true,
267
+ "isPublic": true
268
+ },
269
+ "describe": {
270
+ "name": "describe",
271
+ "async": true,
272
+ "parameters": [],
273
+ "returnType": "any",
274
+ "isStatic": true,
275
+ "isPublic": true
276
+ },
277
+ "history": {
278
+ "name": "history",
279
+ "async": true,
280
+ "parameters": [],
281
+ "returnType": "any",
282
+ "isStatic": true,
283
+ "isPublic": true
284
+ }
285
+ },
286
+ "decoratorConfig": {
287
+ "tableName": "apps",
288
+ "conflictColumns": [
289
+ "id"
290
+ ],
291
+ "api": {
292
+ "include": [
293
+ "defineModel",
294
+ "addField",
295
+ "hideField",
296
+ "renameField",
297
+ "removeField",
298
+ "changeFieldType",
299
+ "removeModel",
300
+ "addMethod",
301
+ "enableRecipe",
302
+ "undo",
303
+ "cleanUp",
304
+ "exportTemplate",
305
+ "importTemplate",
306
+ "describe",
307
+ "history"
308
+ ]
309
+ },
310
+ "mcp": {
311
+ "include": [
312
+ "defineModel",
313
+ "addField",
314
+ "hideField",
315
+ "renameField",
316
+ "removeField",
317
+ "changeFieldType",
318
+ "removeModel",
319
+ "addMethod",
320
+ "enableRecipe",
321
+ "undo",
322
+ "cleanUp",
323
+ "exportTemplate",
324
+ "importTemplate",
325
+ "describe",
326
+ "history"
327
+ ]
328
+ },
329
+ "cli": {
330
+ "include": [
331
+ "defineModel",
332
+ "addField",
333
+ "hideField",
334
+ "renameField",
335
+ "removeField",
336
+ "changeFieldType",
337
+ "removeModel",
338
+ "addMethod",
339
+ "enableRecipe",
340
+ "undo",
341
+ "cleanUp",
342
+ "exportTemplate",
343
+ "importTemplate",
344
+ "describe",
345
+ "history"
346
+ ]
347
+ },
348
+ "operationPermissions": {
349
+ "defineModel": {
350
+ "action": "update"
351
+ },
352
+ "addField": {
353
+ "action": "update"
354
+ },
355
+ "hideField": {
356
+ "action": "update"
357
+ },
358
+ "renameField": {
359
+ "action": "update"
360
+ },
361
+ "removeField": {
362
+ "action": "update"
363
+ },
364
+ "changeFieldType": {
365
+ "action": "update"
366
+ },
367
+ "removeModel": {
368
+ "action": "update"
369
+ },
370
+ "addMethod": {
371
+ "action": "update"
372
+ },
373
+ "enableRecipe": {
374
+ "action": "update"
375
+ },
376
+ "undo": {
377
+ "action": "update"
378
+ },
379
+ "cleanUp": {
380
+ "action": "update"
381
+ },
382
+ "exportTemplate": {
383
+ "action": "read"
384
+ },
385
+ "importTemplate": {
386
+ "action": "update"
387
+ },
388
+ "describe": {
389
+ "action": "read"
390
+ },
391
+ "history": {
392
+ "action": "read"
393
+ }
394
+ }
395
+ },
396
+ "extends": "SmrtObject",
397
+ "exportName": "App",
398
+ "collectionExportName": "AppCollection",
399
+ "displayLabelField": "name",
400
+ "schema": {
401
+ "tableName": "apps",
402
+ "ddl": "CREATE TABLE IF NOT EXISTS \"apps\" (\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 \"name\" TEXT,\n \"current_version\" INTEGER,\n \"definition\" TEXT\n);",
403
+ "columns": {
404
+ "_sync_origin_device_id": {
405
+ "type": "TEXT"
406
+ },
407
+ "_sync_revision": {
408
+ "type": "INTEGER"
409
+ },
410
+ "id": {
411
+ "type": "UUID",
412
+ "primaryKey": true,
413
+ "referenceKind": "id",
414
+ "notNull": true
415
+ },
416
+ "slug": {
417
+ "type": "TEXT",
418
+ "notNull": true
419
+ },
420
+ "context": {
421
+ "type": "TEXT",
422
+ "notNull": true,
423
+ "default": ""
424
+ },
425
+ "created_at": {
426
+ "type": "TIMESTAMP",
427
+ "notNull": true,
428
+ "default": "current_timestamp"
429
+ },
430
+ "updated_at": {
431
+ "type": "TIMESTAMP",
432
+ "notNull": true,
433
+ "default": "current_timestamp"
434
+ },
435
+ "name": {
436
+ "type": "TEXT",
437
+ "notNull": false,
438
+ "unique": false
439
+ },
440
+ "current_version": {
441
+ "type": "INTEGER",
442
+ "notNull": false,
443
+ "unique": false
444
+ },
445
+ "definition": {
446
+ "type": "TEXT",
447
+ "notNull": false,
448
+ "unique": false
449
+ }
450
+ },
451
+ "indexes": [
452
+ {
453
+ "name": "apps_slug_context_idx",
454
+ "columns": [
455
+ "slug",
456
+ "context"
457
+ ]
458
+ },
459
+ {
460
+ "name": "apps_created_at_idx",
461
+ "columns": [
462
+ "created_at"
463
+ ]
464
+ }
465
+ ],
466
+ "version": "22515a7d"
467
+ },
468
+ "importPath": "@happyvertical/smrt-app-shell"
469
+ },
470
+ "@happyvertical/smrt-app-shell:AppCollection": {
471
+ "name": "appcollection",
472
+ "className": "AppCollection",
473
+ "qualifiedName": "@happyvertical/smrt-app-shell:AppCollection",
474
+ "collection": "apps",
475
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/App.ts",
476
+ "packageName": "@happyvertical/smrt-app-shell",
477
+ "fields": {},
478
+ "methods": {},
479
+ "decoratorConfig": {
480
+ "tableName": "apps",
481
+ "api": {
482
+ "include": []
483
+ },
484
+ "mcp": {
485
+ "include": []
486
+ },
487
+ "cli": {
488
+ "include": []
489
+ }
490
+ },
491
+ "extends": "SmrtCollection",
492
+ "extendsTypeArg": "App",
493
+ "exportName": "AppCollection",
494
+ "collectionExportName": "AppCollectionCollection",
495
+ "collectionOf": "@happyvertical/smrt-app-shell:App",
496
+ "inheritedExposure": [
497
+ "api",
498
+ "mcp",
499
+ "cli"
500
+ ],
501
+ "schema": {
502
+ "tableName": "apps",
503
+ "ddl": "CREATE TABLE IF NOT EXISTS \"apps\" (\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 \"name\" TEXT,\n \"current_version\" INTEGER,\n \"definition\" TEXT\n);",
504
+ "columns": {
505
+ "_sync_origin_device_id": {
506
+ "type": "TEXT"
507
+ },
508
+ "_sync_revision": {
509
+ "type": "INTEGER"
510
+ },
511
+ "id": {
512
+ "type": "UUID",
513
+ "primaryKey": true,
514
+ "referenceKind": "id",
515
+ "notNull": true
516
+ },
517
+ "slug": {
518
+ "type": "TEXT",
519
+ "notNull": true
520
+ },
521
+ "context": {
522
+ "type": "TEXT",
523
+ "notNull": true,
524
+ "default": ""
525
+ },
526
+ "created_at": {
527
+ "type": "TIMESTAMP",
528
+ "notNull": true,
529
+ "default": "current_timestamp"
530
+ },
531
+ "updated_at": {
532
+ "type": "TIMESTAMP",
533
+ "notNull": true,
534
+ "default": "current_timestamp"
535
+ },
536
+ "name": {
537
+ "type": "TEXT",
538
+ "notNull": false,
539
+ "unique": false
540
+ },
541
+ "current_version": {
542
+ "type": "INTEGER",
543
+ "notNull": false,
544
+ "unique": false
545
+ },
546
+ "definition": {
547
+ "type": "TEXT",
548
+ "notNull": false,
549
+ "unique": false
550
+ }
551
+ },
552
+ "indexes": [
553
+ {
554
+ "name": "apps_slug_context_idx",
555
+ "columns": [
556
+ "slug",
557
+ "context"
558
+ ]
559
+ },
560
+ {
561
+ "name": "apps_created_at_idx",
562
+ "columns": [
563
+ "created_at"
564
+ ]
565
+ }
566
+ ],
567
+ "version": "22515a7d"
568
+ },
569
+ "importPath": "@happyvertical/smrt-app-shell"
570
+ },
571
+ "@happyvertical/smrt-app-shell:AppVersion": {
572
+ "name": "appversion",
573
+ "className": "AppVersion",
574
+ "qualifiedName": "@happyvertical/smrt-app-shell:AppVersion",
575
+ "collection": "appversions",
576
+ "description": "One version of the user app's definition (shell.db). Never deleted: an old version's migration is marked purged once its archives are cleaned up.",
577
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/AppVersion.ts",
578
+ "packageName": "@happyvertical/smrt-app-shell",
579
+ "fields": {
580
+ "version": {
581
+ "type": "integer",
582
+ "required": true,
583
+ "_meta": {
584
+ "required": true
585
+ }
586
+ },
587
+ "parent": {
588
+ "type": "integer",
589
+ "required": false,
590
+ "_meta": {}
591
+ },
592
+ "author": {
593
+ "type": "text",
594
+ "required": false,
595
+ "_meta": {}
596
+ },
597
+ "summary": {
598
+ "type": "text",
599
+ "required": false,
600
+ "_meta": {}
601
+ },
602
+ "definition": {
603
+ "type": "text",
604
+ "required": false,
605
+ "_meta": {}
606
+ },
607
+ "migration": {
608
+ "type": "text",
609
+ "required": false,
610
+ "_meta": {}
611
+ },
612
+ "createdAt": {
613
+ "type": "text",
614
+ "required": false,
615
+ "_meta": {}
616
+ },
617
+ "purged": {
618
+ "type": "boolean",
619
+ "required": false,
620
+ "_meta": {}
621
+ }
622
+ },
623
+ "methods": {},
624
+ "decoratorConfig": {
625
+ "tableName": "app_versions",
626
+ "api": false,
627
+ "mcp": false,
628
+ "cli": false,
629
+ "conflictColumns": [
630
+ "id"
631
+ ]
632
+ },
633
+ "extends": "SmrtObject",
634
+ "exportName": "AppVersion",
635
+ "collectionExportName": "AppVersionCollection",
636
+ "validationRules": [
637
+ {
638
+ "field": "version",
639
+ "rule": "required",
640
+ "fieldType": "integer"
641
+ }
642
+ ],
643
+ "schema": {
644
+ "tableName": "app_versions",
645
+ "ddl": "CREATE TABLE IF NOT EXISTS \"app_versions\" (\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 \"version\" INTEGER NOT NULL,\n \"parent\" INTEGER,\n \"author\" TEXT,\n \"summary\" TEXT,\n \"definition\" TEXT,\n \"migration\" TEXT,\n \"purged\" BOOLEAN\n);",
646
+ "columns": {
647
+ "_sync_origin_device_id": {
648
+ "type": "TEXT"
649
+ },
650
+ "_sync_revision": {
651
+ "type": "INTEGER"
652
+ },
653
+ "id": {
654
+ "type": "UUID",
655
+ "primaryKey": true,
656
+ "referenceKind": "id",
657
+ "notNull": true
658
+ },
659
+ "slug": {
660
+ "type": "TEXT",
661
+ "notNull": true
662
+ },
663
+ "context": {
664
+ "type": "TEXT",
665
+ "notNull": true,
666
+ "default": ""
667
+ },
668
+ "created_at": {
669
+ "type": "TIMESTAMP",
670
+ "notNull": true,
671
+ "default": "current_timestamp"
672
+ },
673
+ "updated_at": {
674
+ "type": "TIMESTAMP",
675
+ "notNull": true,
676
+ "default": "current_timestamp"
677
+ },
678
+ "version": {
679
+ "type": "INTEGER",
680
+ "notNull": true,
681
+ "unique": false
682
+ },
683
+ "parent": {
684
+ "type": "INTEGER",
685
+ "notNull": false,
686
+ "unique": false
687
+ },
688
+ "author": {
689
+ "type": "TEXT",
690
+ "notNull": false,
691
+ "unique": false
692
+ },
693
+ "summary": {
694
+ "type": "TEXT",
695
+ "notNull": false,
696
+ "unique": false
697
+ },
698
+ "definition": {
699
+ "type": "TEXT",
700
+ "notNull": false,
701
+ "unique": false
702
+ },
703
+ "migration": {
704
+ "type": "TEXT",
705
+ "notNull": false,
706
+ "unique": false
707
+ },
708
+ "purged": {
709
+ "type": "BOOLEAN",
710
+ "notNull": false,
711
+ "unique": false
712
+ }
713
+ },
714
+ "indexes": [
715
+ {
716
+ "name": "app_versions_slug_context_idx",
717
+ "columns": [
718
+ "slug",
719
+ "context"
720
+ ]
721
+ },
722
+ {
723
+ "name": "app_versions_created_at_idx",
724
+ "columns": [
725
+ "created_at"
726
+ ]
727
+ }
728
+ ],
729
+ "version": "1304bd62"
730
+ },
731
+ "importPath": "@happyvertical/smrt-app-shell"
732
+ },
733
+ "@happyvertical/smrt-app-shell:AppVersionCollection": {
734
+ "name": "appversioncollection",
735
+ "className": "AppVersionCollection",
736
+ "qualifiedName": "@happyvertical/smrt-app-shell:AppVersionCollection",
737
+ "collection": "appversions",
738
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/AppVersion.ts",
739
+ "packageName": "@happyvertical/smrt-app-shell",
740
+ "fields": {},
741
+ "methods": {},
742
+ "decoratorConfig": {
743
+ "tableName": "app_versions",
744
+ "api": false,
745
+ "mcp": false,
746
+ "cli": false
747
+ },
748
+ "extends": "SmrtCollection",
749
+ "extendsTypeArg": "AppVersion",
750
+ "exportName": "AppVersionCollection",
751
+ "collectionExportName": "AppVersionCollectionCollection",
752
+ "collectionOf": "@happyvertical/smrt-app-shell:AppVersion",
753
+ "inheritedExposure": [
754
+ "api",
755
+ "mcp",
756
+ "cli"
757
+ ],
758
+ "schema": {
759
+ "tableName": "app_versions",
760
+ "ddl": "CREATE TABLE IF NOT EXISTS \"app_versions\" (\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 \"version\" INTEGER NOT NULL,\n \"parent\" INTEGER,\n \"author\" TEXT,\n \"summary\" TEXT,\n \"definition\" TEXT,\n \"migration\" TEXT,\n \"purged\" BOOLEAN\n);",
761
+ "columns": {
762
+ "_sync_origin_device_id": {
763
+ "type": "TEXT"
764
+ },
765
+ "_sync_revision": {
766
+ "type": "INTEGER"
767
+ },
768
+ "id": {
769
+ "type": "UUID",
770
+ "primaryKey": true,
771
+ "referenceKind": "id",
772
+ "notNull": true
773
+ },
774
+ "slug": {
775
+ "type": "TEXT",
776
+ "notNull": true
777
+ },
778
+ "context": {
779
+ "type": "TEXT",
780
+ "notNull": true,
781
+ "default": ""
782
+ },
783
+ "created_at": {
784
+ "type": "TIMESTAMP",
785
+ "notNull": true,
786
+ "default": "current_timestamp"
787
+ },
788
+ "updated_at": {
789
+ "type": "TIMESTAMP",
790
+ "notNull": true,
791
+ "default": "current_timestamp"
792
+ },
793
+ "version": {
794
+ "type": "INTEGER",
795
+ "notNull": true,
796
+ "unique": false
797
+ },
798
+ "parent": {
799
+ "type": "INTEGER",
800
+ "notNull": false,
801
+ "unique": false
802
+ },
803
+ "author": {
804
+ "type": "TEXT",
805
+ "notNull": false,
806
+ "unique": false
807
+ },
808
+ "summary": {
809
+ "type": "TEXT",
810
+ "notNull": false,
811
+ "unique": false
812
+ },
813
+ "definition": {
814
+ "type": "TEXT",
815
+ "notNull": false,
816
+ "unique": false
817
+ },
818
+ "migration": {
819
+ "type": "TEXT",
820
+ "notNull": false,
821
+ "unique": false
822
+ },
823
+ "purged": {
824
+ "type": "BOOLEAN",
825
+ "notNull": false,
826
+ "unique": false
827
+ }
828
+ },
829
+ "indexes": [
830
+ {
831
+ "name": "app_versions_slug_context_idx",
832
+ "columns": [
833
+ "slug",
834
+ "context"
835
+ ]
836
+ },
837
+ {
838
+ "name": "app_versions_created_at_idx",
839
+ "columns": [
840
+ "created_at"
841
+ ]
842
+ }
843
+ ],
844
+ "version": "1304bd62"
845
+ },
846
+ "importPath": "@happyvertical/smrt-app-shell"
847
+ },
848
+ "@happyvertical/smrt-app-shell:Approval": {
849
+ "name": "approval",
850
+ "className": "Approval",
851
+ "qualifiedName": "@happyvertical/smrt-app-shell:Approval",
852
+ "collection": "approvals",
853
+ "description": "A risky change waiting for the owner.",
854
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/Approval.ts",
855
+ "packageName": "@happyvertical/smrt-app-shell",
856
+ "fields": {
857
+ "command": {
858
+ "type": "text",
859
+ "required": false,
860
+ "_meta": {}
861
+ },
862
+ "actionKey": {
863
+ "type": "text",
864
+ "required": false,
865
+ "_meta": {}
866
+ },
867
+ "summary": {
868
+ "type": "text",
869
+ "required": false,
870
+ "_meta": {}
871
+ },
872
+ "preview": {
873
+ "type": "text",
874
+ "required": false,
875
+ "_meta": {}
876
+ },
877
+ "status": {
878
+ "type": "text",
879
+ "required": false,
880
+ "_meta": {},
881
+ "enum": [
882
+ "pending",
883
+ "approved",
884
+ "denied",
885
+ "failed"
886
+ ]
887
+ },
888
+ "requestedBy": {
889
+ "type": "text",
890
+ "required": false,
891
+ "_meta": {}
892
+ },
893
+ "decidedBy": {
894
+ "type": "text",
895
+ "required": false,
896
+ "_meta": {}
897
+ },
898
+ "decidedAt": {
899
+ "type": "text",
900
+ "required": false,
901
+ "_meta": {}
902
+ },
903
+ "result": {
904
+ "type": "text",
905
+ "required": false,
906
+ "_meta": {}
907
+ },
908
+ "createdAt": {
909
+ "type": "text",
910
+ "required": false,
911
+ "_meta": {}
912
+ }
913
+ },
914
+ "methods": {
915
+ "decide": {
916
+ "name": "decide",
917
+ "async": true,
918
+ "parameters": [
919
+ {
920
+ "name": "approve",
921
+ "type": "boolean",
922
+ "optional": false
923
+ }
924
+ ],
925
+ "returnType": "Promise<ApprovalOutcome>",
926
+ "isStatic": false,
927
+ "isPublic": true
928
+ },
929
+ "pending": {
930
+ "name": "pending",
931
+ "async": true,
932
+ "parameters": [],
933
+ "returnType": "any",
934
+ "isStatic": true,
935
+ "isPublic": true
936
+ }
937
+ },
938
+ "decoratorConfig": {
939
+ "tableName": "approvals",
940
+ "conflictColumns": [
941
+ "id"
942
+ ],
943
+ "api": {
944
+ "include": [
945
+ "decide",
946
+ "pending"
947
+ ]
948
+ },
949
+ "mcp": {
950
+ "include": [
951
+ "decide",
952
+ "pending"
953
+ ]
954
+ },
955
+ "cli": false,
956
+ "operationPermissions": {
957
+ "decide": {
958
+ "action": "update"
959
+ },
960
+ "pending": {
961
+ "action": "read"
962
+ }
963
+ }
964
+ },
965
+ "extends": "SmrtObject",
966
+ "exportName": "Approval",
967
+ "collectionExportName": "ApprovalCollection",
968
+ "schema": {
969
+ "tableName": "approvals",
970
+ "ddl": "CREATE TABLE IF NOT EXISTS \"approvals\" (\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 \"command\" TEXT,\n \"action_key\" TEXT,\n \"summary\" TEXT,\n \"preview\" TEXT,\n \"status\" TEXT,\n \"requested_by\" TEXT,\n \"decided_by\" TEXT,\n \"decided_at\" TEXT,\n \"result\" TEXT\n);",
971
+ "columns": {
972
+ "_sync_origin_device_id": {
973
+ "type": "TEXT"
974
+ },
975
+ "_sync_revision": {
976
+ "type": "INTEGER"
977
+ },
978
+ "id": {
979
+ "type": "UUID",
980
+ "primaryKey": true,
981
+ "referenceKind": "id",
982
+ "notNull": true
983
+ },
984
+ "slug": {
985
+ "type": "TEXT",
986
+ "notNull": true
987
+ },
988
+ "context": {
989
+ "type": "TEXT",
990
+ "notNull": true,
991
+ "default": ""
992
+ },
993
+ "created_at": {
994
+ "type": "TIMESTAMP",
995
+ "notNull": true,
996
+ "default": "current_timestamp"
997
+ },
998
+ "updated_at": {
999
+ "type": "TIMESTAMP",
1000
+ "notNull": true,
1001
+ "default": "current_timestamp"
1002
+ },
1003
+ "command": {
1004
+ "type": "TEXT",
1005
+ "notNull": false,
1006
+ "unique": false
1007
+ },
1008
+ "action_key": {
1009
+ "type": "TEXT",
1010
+ "notNull": false,
1011
+ "unique": false
1012
+ },
1013
+ "summary": {
1014
+ "type": "TEXT",
1015
+ "notNull": false,
1016
+ "unique": false
1017
+ },
1018
+ "preview": {
1019
+ "type": "TEXT",
1020
+ "notNull": false,
1021
+ "unique": false
1022
+ },
1023
+ "status": {
1024
+ "type": "TEXT",
1025
+ "notNull": false,
1026
+ "unique": false
1027
+ },
1028
+ "requested_by": {
1029
+ "type": "TEXT",
1030
+ "notNull": false,
1031
+ "unique": false
1032
+ },
1033
+ "decided_by": {
1034
+ "type": "TEXT",
1035
+ "notNull": false,
1036
+ "unique": false
1037
+ },
1038
+ "decided_at": {
1039
+ "type": "TEXT",
1040
+ "notNull": false,
1041
+ "unique": false
1042
+ },
1043
+ "result": {
1044
+ "type": "TEXT",
1045
+ "notNull": false,
1046
+ "unique": false
1047
+ }
1048
+ },
1049
+ "indexes": [
1050
+ {
1051
+ "name": "approvals_slug_context_idx",
1052
+ "columns": [
1053
+ "slug",
1054
+ "context"
1055
+ ]
1056
+ },
1057
+ {
1058
+ "name": "approvals_created_at_idx",
1059
+ "columns": [
1060
+ "created_at"
1061
+ ]
1062
+ }
1063
+ ],
1064
+ "version": "e2e76206"
1065
+ },
1066
+ "importPath": "@happyvertical/smrt-app-shell"
1067
+ },
1068
+ "@happyvertical/smrt-app-shell:ApprovalCollection": {
1069
+ "name": "approvalcollection",
1070
+ "className": "ApprovalCollection",
1071
+ "qualifiedName": "@happyvertical/smrt-app-shell:ApprovalCollection",
1072
+ "collection": "approvals",
1073
+ "description": "Undecorated on purpose: the item class carries the whole surface (core applies the collection's config to the item class, so a decorated collection would have to repeat it exactly).",
1074
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/Approval.ts",
1075
+ "packageName": "@happyvertical/smrt-app-shell",
1076
+ "fields": {},
1077
+ "methods": {},
1078
+ "decoratorConfig": {
1079
+ "tableName": "approvals",
1080
+ "api": {
1081
+ "include": []
1082
+ },
1083
+ "mcp": {
1084
+ "include": []
1085
+ },
1086
+ "cli": false
1087
+ },
1088
+ "extends": "SmrtCollection",
1089
+ "extendsTypeArg": "Approval",
1090
+ "exportName": "ApprovalCollection",
1091
+ "collectionExportName": "ApprovalCollectionCollection",
1092
+ "collectionOf": "@happyvertical/smrt-app-shell:Approval",
1093
+ "inheritedExposure": [
1094
+ "api",
1095
+ "mcp",
1096
+ "cli"
1097
+ ],
1098
+ "schema": {
1099
+ "tableName": "approvals",
1100
+ "ddl": "CREATE TABLE IF NOT EXISTS \"approvals\" (\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 \"command\" TEXT,\n \"action_key\" TEXT,\n \"summary\" TEXT,\n \"preview\" TEXT,\n \"status\" TEXT,\n \"requested_by\" TEXT,\n \"decided_by\" TEXT,\n \"decided_at\" TEXT,\n \"result\" TEXT\n);",
1101
+ "columns": {
1102
+ "_sync_origin_device_id": {
1103
+ "type": "TEXT"
1104
+ },
1105
+ "_sync_revision": {
1106
+ "type": "INTEGER"
1107
+ },
1108
+ "id": {
1109
+ "type": "UUID",
1110
+ "primaryKey": true,
1111
+ "referenceKind": "id",
1112
+ "notNull": true
1113
+ },
1114
+ "slug": {
1115
+ "type": "TEXT",
1116
+ "notNull": true
1117
+ },
1118
+ "context": {
1119
+ "type": "TEXT",
1120
+ "notNull": true,
1121
+ "default": ""
1122
+ },
1123
+ "created_at": {
1124
+ "type": "TIMESTAMP",
1125
+ "notNull": true,
1126
+ "default": "current_timestamp"
1127
+ },
1128
+ "updated_at": {
1129
+ "type": "TIMESTAMP",
1130
+ "notNull": true,
1131
+ "default": "current_timestamp"
1132
+ },
1133
+ "command": {
1134
+ "type": "TEXT",
1135
+ "notNull": false,
1136
+ "unique": false
1137
+ },
1138
+ "action_key": {
1139
+ "type": "TEXT",
1140
+ "notNull": false,
1141
+ "unique": false
1142
+ },
1143
+ "summary": {
1144
+ "type": "TEXT",
1145
+ "notNull": false,
1146
+ "unique": false
1147
+ },
1148
+ "preview": {
1149
+ "type": "TEXT",
1150
+ "notNull": false,
1151
+ "unique": false
1152
+ },
1153
+ "status": {
1154
+ "type": "TEXT",
1155
+ "notNull": false,
1156
+ "unique": false
1157
+ },
1158
+ "requested_by": {
1159
+ "type": "TEXT",
1160
+ "notNull": false,
1161
+ "unique": false
1162
+ },
1163
+ "decided_by": {
1164
+ "type": "TEXT",
1165
+ "notNull": false,
1166
+ "unique": false
1167
+ },
1168
+ "decided_at": {
1169
+ "type": "TEXT",
1170
+ "notNull": false,
1171
+ "unique": false
1172
+ },
1173
+ "result": {
1174
+ "type": "TEXT",
1175
+ "notNull": false,
1176
+ "unique": false
1177
+ }
1178
+ },
1179
+ "indexes": [
1180
+ {
1181
+ "name": "approvals_slug_context_idx",
1182
+ "columns": [
1183
+ "slug",
1184
+ "context"
1185
+ ]
1186
+ },
1187
+ {
1188
+ "name": "approvals_created_at_idx",
1189
+ "columns": [
1190
+ "created_at"
1191
+ ]
1192
+ }
1193
+ ],
1194
+ "version": "e2e76206"
1195
+ },
1196
+ "importPath": "@happyvertical/smrt-app-shell"
1197
+ },
1198
+ "@happyvertical/smrt-app-shell:AssistantMessage": {
1199
+ "name": "assistantmessage",
1200
+ "className": "AssistantMessage",
1201
+ "qualifiedName": "@happyvertical/smrt-app-shell:AssistantMessage",
1202
+ "collection": "assistantmessages",
1203
+ "description": "One message of an assistant thread (shell.db): the owner's text, the model's reply (with the tool calls it asked for) or a tool result.",
1204
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/AssistantMessage.ts",
1205
+ "packageName": "@happyvertical/smrt-app-shell",
1206
+ "fields": {
1207
+ "threadId": {
1208
+ "type": "text",
1209
+ "required": false,
1210
+ "_meta": {}
1211
+ },
1212
+ "seq": {
1213
+ "type": "integer",
1214
+ "required": false,
1215
+ "_meta": {}
1216
+ },
1217
+ "role": {
1218
+ "type": "text",
1219
+ "required": false,
1220
+ "_meta": {},
1221
+ "enum": [
1222
+ "user",
1223
+ "assistant",
1224
+ "tool"
1225
+ ]
1226
+ },
1227
+ "content": {
1228
+ "type": "text",
1229
+ "required": false,
1230
+ "_meta": {}
1231
+ },
1232
+ "toolCalls": {
1233
+ "type": "text",
1234
+ "required": false,
1235
+ "_meta": {}
1236
+ },
1237
+ "toolCallId": {
1238
+ "type": "text",
1239
+ "required": false,
1240
+ "_meta": {}
1241
+ },
1242
+ "meta": {
1243
+ "type": "text",
1244
+ "required": false,
1245
+ "_meta": {}
1246
+ },
1247
+ "createdAt": {
1248
+ "type": "text",
1249
+ "required": false,
1250
+ "_meta": {}
1251
+ }
1252
+ },
1253
+ "methods": {},
1254
+ "decoratorConfig": {
1255
+ "tableName": "assistant_messages",
1256
+ "api": false,
1257
+ "mcp": false,
1258
+ "cli": false,
1259
+ "conflictColumns": [
1260
+ "id"
1261
+ ]
1262
+ },
1263
+ "extends": "SmrtObject",
1264
+ "exportName": "AssistantMessage",
1265
+ "collectionExportName": "AssistantMessageCollection",
1266
+ "schema": {
1267
+ "tableName": "assistant_messages",
1268
+ "ddl": "CREATE TABLE IF NOT EXISTS \"assistant_messages\" (\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 \"thread_id\" TEXT,\n \"seq\" INTEGER,\n \"role\" TEXT,\n \"content\" TEXT,\n \"tool_calls\" TEXT,\n \"tool_call_id\" TEXT,\n \"meta\" TEXT\n);",
1269
+ "columns": {
1270
+ "_sync_origin_device_id": {
1271
+ "type": "TEXT"
1272
+ },
1273
+ "_sync_revision": {
1274
+ "type": "INTEGER"
1275
+ },
1276
+ "id": {
1277
+ "type": "UUID",
1278
+ "primaryKey": true,
1279
+ "referenceKind": "id",
1280
+ "notNull": true
1281
+ },
1282
+ "slug": {
1283
+ "type": "TEXT",
1284
+ "notNull": true
1285
+ },
1286
+ "context": {
1287
+ "type": "TEXT",
1288
+ "notNull": true,
1289
+ "default": ""
1290
+ },
1291
+ "created_at": {
1292
+ "type": "TIMESTAMP",
1293
+ "notNull": true,
1294
+ "default": "current_timestamp"
1295
+ },
1296
+ "updated_at": {
1297
+ "type": "TIMESTAMP",
1298
+ "notNull": true,
1299
+ "default": "current_timestamp"
1300
+ },
1301
+ "thread_id": {
1302
+ "type": "TEXT",
1303
+ "notNull": false,
1304
+ "unique": false
1305
+ },
1306
+ "seq": {
1307
+ "type": "INTEGER",
1308
+ "notNull": false,
1309
+ "unique": false
1310
+ },
1311
+ "role": {
1312
+ "type": "TEXT",
1313
+ "notNull": false,
1314
+ "unique": false
1315
+ },
1316
+ "content": {
1317
+ "type": "TEXT",
1318
+ "notNull": false,
1319
+ "unique": false
1320
+ },
1321
+ "tool_calls": {
1322
+ "type": "TEXT",
1323
+ "notNull": false,
1324
+ "unique": false
1325
+ },
1326
+ "tool_call_id": {
1327
+ "type": "TEXT",
1328
+ "notNull": false,
1329
+ "unique": false
1330
+ },
1331
+ "meta": {
1332
+ "type": "TEXT",
1333
+ "notNull": false,
1334
+ "unique": false
1335
+ }
1336
+ },
1337
+ "indexes": [
1338
+ {
1339
+ "name": "assistant_messages_slug_context_idx",
1340
+ "columns": [
1341
+ "slug",
1342
+ "context"
1343
+ ]
1344
+ },
1345
+ {
1346
+ "name": "assistant_messages_created_at_idx",
1347
+ "columns": [
1348
+ "created_at"
1349
+ ]
1350
+ }
1351
+ ],
1352
+ "version": "e85f28ba"
1353
+ },
1354
+ "importPath": "@happyvertical/smrt-app-shell"
1355
+ },
1356
+ "@happyvertical/smrt-app-shell:AssistantMessageCollection": {
1357
+ "name": "assistantmessagecollection",
1358
+ "className": "AssistantMessageCollection",
1359
+ "qualifiedName": "@happyvertical/smrt-app-shell:AssistantMessageCollection",
1360
+ "collection": "assistantmessages",
1361
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/AssistantMessage.ts",
1362
+ "packageName": "@happyvertical/smrt-app-shell",
1363
+ "fields": {},
1364
+ "methods": {},
1365
+ "decoratorConfig": {
1366
+ "tableName": "assistant_messages",
1367
+ "api": false,
1368
+ "mcp": false,
1369
+ "cli": false
1370
+ },
1371
+ "extends": "SmrtCollection",
1372
+ "extendsTypeArg": "AssistantMessage",
1373
+ "exportName": "AssistantMessageCollection",
1374
+ "collectionExportName": "AssistantMessageCollectionCollection",
1375
+ "collectionOf": "@happyvertical/smrt-app-shell:AssistantMessage",
1376
+ "inheritedExposure": [
1377
+ "api",
1378
+ "mcp",
1379
+ "cli"
1380
+ ],
1381
+ "schema": {
1382
+ "tableName": "assistant_messages",
1383
+ "ddl": "CREATE TABLE IF NOT EXISTS \"assistant_messages\" (\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 \"thread_id\" TEXT,\n \"seq\" INTEGER,\n \"role\" TEXT,\n \"content\" TEXT,\n \"tool_calls\" TEXT,\n \"tool_call_id\" TEXT,\n \"meta\" TEXT\n);",
1384
+ "columns": {
1385
+ "_sync_origin_device_id": {
1386
+ "type": "TEXT"
1387
+ },
1388
+ "_sync_revision": {
1389
+ "type": "INTEGER"
1390
+ },
1391
+ "id": {
1392
+ "type": "UUID",
1393
+ "primaryKey": true,
1394
+ "referenceKind": "id",
1395
+ "notNull": true
1396
+ },
1397
+ "slug": {
1398
+ "type": "TEXT",
1399
+ "notNull": true
1400
+ },
1401
+ "context": {
1402
+ "type": "TEXT",
1403
+ "notNull": true,
1404
+ "default": ""
1405
+ },
1406
+ "created_at": {
1407
+ "type": "TIMESTAMP",
1408
+ "notNull": true,
1409
+ "default": "current_timestamp"
1410
+ },
1411
+ "updated_at": {
1412
+ "type": "TIMESTAMP",
1413
+ "notNull": true,
1414
+ "default": "current_timestamp"
1415
+ },
1416
+ "thread_id": {
1417
+ "type": "TEXT",
1418
+ "notNull": false,
1419
+ "unique": false
1420
+ },
1421
+ "seq": {
1422
+ "type": "INTEGER",
1423
+ "notNull": false,
1424
+ "unique": false
1425
+ },
1426
+ "role": {
1427
+ "type": "TEXT",
1428
+ "notNull": false,
1429
+ "unique": false
1430
+ },
1431
+ "content": {
1432
+ "type": "TEXT",
1433
+ "notNull": false,
1434
+ "unique": false
1435
+ },
1436
+ "tool_calls": {
1437
+ "type": "TEXT",
1438
+ "notNull": false,
1439
+ "unique": false
1440
+ },
1441
+ "tool_call_id": {
1442
+ "type": "TEXT",
1443
+ "notNull": false,
1444
+ "unique": false
1445
+ },
1446
+ "meta": {
1447
+ "type": "TEXT",
1448
+ "notNull": false,
1449
+ "unique": false
1450
+ }
1451
+ },
1452
+ "indexes": [
1453
+ {
1454
+ "name": "assistant_messages_slug_context_idx",
1455
+ "columns": [
1456
+ "slug",
1457
+ "context"
1458
+ ]
1459
+ },
1460
+ {
1461
+ "name": "assistant_messages_created_at_idx",
1462
+ "columns": [
1463
+ "created_at"
1464
+ ]
1465
+ }
1466
+ ],
1467
+ "version": "e85f28ba"
1468
+ },
1469
+ "importPath": "@happyvertical/smrt-app-shell"
1470
+ },
1471
+ "@happyvertical/smrt-app-shell:AssistantThread": {
1472
+ "name": "assistantthread",
1473
+ "className": "AssistantThread",
1474
+ "qualifiedName": "@happyvertical/smrt-app-shell:AssistantThread",
1475
+ "collection": "assistantthreads",
1476
+ "description": "One assistant conversation (shell.db). Written only by the assistant's thread store ($lib/server/assistant/threads), owner scoped; no generated surface.",
1477
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/AssistantThread.ts",
1478
+ "packageName": "@happyvertical/smrt-app-shell",
1479
+ "fields": {
1480
+ "ownerId": {
1481
+ "type": "text",
1482
+ "required": false,
1483
+ "_meta": {}
1484
+ },
1485
+ "title": {
1486
+ "type": "text",
1487
+ "required": false,
1488
+ "_meta": {}
1489
+ },
1490
+ "createdAt": {
1491
+ "type": "text",
1492
+ "required": false,
1493
+ "_meta": {}
1494
+ },
1495
+ "updatedAt": {
1496
+ "type": "text",
1497
+ "required": false,
1498
+ "_meta": {}
1499
+ }
1500
+ },
1501
+ "methods": {},
1502
+ "decoratorConfig": {
1503
+ "tableName": "assistant_threads",
1504
+ "api": false,
1505
+ "mcp": false,
1506
+ "cli": false,
1507
+ "conflictColumns": [
1508
+ "id"
1509
+ ]
1510
+ },
1511
+ "extends": "SmrtObject",
1512
+ "exportName": "AssistantThread",
1513
+ "collectionExportName": "AssistantThreadCollection",
1514
+ "displayLabelField": "title",
1515
+ "schema": {
1516
+ "tableName": "assistant_threads",
1517
+ "ddl": "CREATE TABLE IF NOT EXISTS \"assistant_threads\" (\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 \"owner_id\" TEXT,\n \"title\" TEXT\n);",
1518
+ "columns": {
1519
+ "_sync_origin_device_id": {
1520
+ "type": "TEXT"
1521
+ },
1522
+ "_sync_revision": {
1523
+ "type": "INTEGER"
1524
+ },
1525
+ "id": {
1526
+ "type": "UUID",
1527
+ "primaryKey": true,
1528
+ "referenceKind": "id",
1529
+ "notNull": true
1530
+ },
1531
+ "slug": {
1532
+ "type": "TEXT",
1533
+ "notNull": true
1534
+ },
1535
+ "context": {
1536
+ "type": "TEXT",
1537
+ "notNull": true,
1538
+ "default": ""
1539
+ },
1540
+ "created_at": {
1541
+ "type": "TIMESTAMP",
1542
+ "notNull": true,
1543
+ "default": "current_timestamp"
1544
+ },
1545
+ "updated_at": {
1546
+ "type": "TIMESTAMP",
1547
+ "notNull": true,
1548
+ "default": "current_timestamp"
1549
+ },
1550
+ "owner_id": {
1551
+ "type": "TEXT",
1552
+ "notNull": false,
1553
+ "unique": false
1554
+ },
1555
+ "title": {
1556
+ "type": "TEXT",
1557
+ "notNull": false,
1558
+ "unique": false
1559
+ }
1560
+ },
1561
+ "indexes": [
1562
+ {
1563
+ "name": "assistant_threads_slug_context_idx",
1564
+ "columns": [
1565
+ "slug",
1566
+ "context"
1567
+ ]
1568
+ },
1569
+ {
1570
+ "name": "assistant_threads_created_at_idx",
1571
+ "columns": [
1572
+ "created_at"
1573
+ ]
1574
+ }
1575
+ ],
1576
+ "version": "86b6f682"
1577
+ },
1578
+ "importPath": "@happyvertical/smrt-app-shell"
1579
+ },
1580
+ "@happyvertical/smrt-app-shell:AssistantThreadCollection": {
1581
+ "name": "assistantthreadcollection",
1582
+ "className": "AssistantThreadCollection",
1583
+ "qualifiedName": "@happyvertical/smrt-app-shell:AssistantThreadCollection",
1584
+ "collection": "assistantthreads",
1585
+ "filePath": "/home/runner/work/smrt/smrt/packages/app-shell/src/lib/objects/AssistantThread.ts",
1586
+ "packageName": "@happyvertical/smrt-app-shell",
1587
+ "fields": {},
1588
+ "methods": {},
1589
+ "decoratorConfig": {
1590
+ "tableName": "assistant_threads",
1591
+ "api": false,
1592
+ "mcp": false,
1593
+ "cli": false
1594
+ },
1595
+ "extends": "SmrtCollection",
1596
+ "extendsTypeArg": "AssistantThread",
1597
+ "exportName": "AssistantThreadCollection",
1598
+ "collectionExportName": "AssistantThreadCollectionCollection",
1599
+ "collectionOf": "@happyvertical/smrt-app-shell:AssistantThread",
1600
+ "inheritedExposure": [
1601
+ "api",
1602
+ "mcp",
1603
+ "cli"
1604
+ ],
1605
+ "schema": {
1606
+ "tableName": "assistant_threads",
1607
+ "ddl": "CREATE TABLE IF NOT EXISTS \"assistant_threads\" (\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 \"owner_id\" TEXT,\n \"title\" TEXT\n);",
1608
+ "columns": {
1609
+ "_sync_origin_device_id": {
1610
+ "type": "TEXT"
1611
+ },
1612
+ "_sync_revision": {
1613
+ "type": "INTEGER"
1614
+ },
1615
+ "id": {
1616
+ "type": "UUID",
1617
+ "primaryKey": true,
1618
+ "referenceKind": "id",
1619
+ "notNull": true
1620
+ },
1621
+ "slug": {
1622
+ "type": "TEXT",
1623
+ "notNull": true
1624
+ },
1625
+ "context": {
1626
+ "type": "TEXT",
1627
+ "notNull": true,
1628
+ "default": ""
1629
+ },
1630
+ "created_at": {
1631
+ "type": "TIMESTAMP",
1632
+ "notNull": true,
1633
+ "default": "current_timestamp"
1634
+ },
1635
+ "updated_at": {
1636
+ "type": "TIMESTAMP",
1637
+ "notNull": true,
1638
+ "default": "current_timestamp"
1639
+ },
1640
+ "owner_id": {
1641
+ "type": "TEXT",
1642
+ "notNull": false,
1643
+ "unique": false
1644
+ },
1645
+ "title": {
1646
+ "type": "TEXT",
1647
+ "notNull": false,
1648
+ "unique": false
1649
+ }
1650
+ },
1651
+ "indexes": [
1652
+ {
1653
+ "name": "assistant_threads_slug_context_idx",
1654
+ "columns": [
1655
+ "slug",
1656
+ "context"
1657
+ ]
1658
+ },
1659
+ {
1660
+ "name": "assistant_threads_created_at_idx",
1661
+ "columns": [
1662
+ "created_at"
1663
+ ]
1664
+ }
1665
+ ],
1666
+ "version": "86b6f682"
1667
+ },
1668
+ "importPath": "@happyvertical/smrt-app-shell"
1669
+ }
1670
+ },
1671
+ "moduleType": "smrt",
1672
+ "smrtDependencies": [
1673
+ "@happyvertical/smrt-app-mcp",
1674
+ "@happyvertical/smrt-app-runtime",
1675
+ "@happyvertical/smrt-core",
1676
+ "@happyvertical/smrt-profiles",
1677
+ "@happyvertical/smrt-tenancy",
1678
+ "@happyvertical/smrt-users"
1679
+ ]
1680
+ }