@happyvertical/smrt-agents 0.49.2 → 0.49.4

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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-agents",
5
- "packageVersion": "0.49.2",
5
+ "packageVersion": "0.49.4",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-agents:Agent": {
8
8
  "name": "agent",
@@ -305,7 +305,8 @@
305
305
  "context",
306
306
  "_meta_type"
307
307
  ],
308
- "unique": true
308
+ "unique": true,
309
+ "nullsNotDistinct": true
309
310
  },
310
311
  {
311
312
  "name": "agents_meta_type_idx",
@@ -567,7 +568,8 @@
567
568
  "slug",
568
569
  "context"
569
570
  ],
570
- "unique": true
571
+ "unique": true,
572
+ "nullsNotDistinct": true
571
573
  },
572
574
  {
573
575
  "name": "agent_configs_tenant_id_created_at_idx",
@@ -635,7 +637,7 @@
635
637
  "collectionExportName": "AgentConfigCollectionCollection",
636
638
  "schema": {
637
639
  "tableName": "agent_configs",
638
- "ddl": "CREATE TABLE IF NOT EXISTS \"agent_configs\" (\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);",
640
+ "ddl": "CREATE TABLE IF NOT EXISTS \"agent_configs\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"agent_id\" TEXT,\n \"agent_class\" TEXT,\n \"slot_id\" TEXT,\n \"config_data\" JSON,\n \"schema_version\" INTEGER\n);",
639
641
  "columns": {
640
642
  "id": {
641
643
  "type": "UUID",
@@ -661,25 +663,59 @@
661
663
  "type": "TIMESTAMP",
662
664
  "notNull": true,
663
665
  "default": "current_timestamp"
666
+ },
667
+ "tenant_id": {
668
+ "type": "UUID",
669
+ "referenceKind": "tenantId",
670
+ "notNull": false,
671
+ "unique": false
672
+ },
673
+ "agent_id": {
674
+ "type": "TEXT",
675
+ "notNull": false,
676
+ "unique": false
677
+ },
678
+ "agent_class": {
679
+ "type": "TEXT",
680
+ "notNull": false,
681
+ "unique": false
682
+ },
683
+ "slot_id": {
684
+ "type": "TEXT",
685
+ "notNull": false,
686
+ "unique": false
687
+ },
688
+ "config_data": {
689
+ "type": "JSON",
690
+ "notNull": false,
691
+ "unique": false
692
+ },
693
+ "schema_version": {
694
+ "type": "INTEGER",
695
+ "notNull": false,
696
+ "unique": false
664
697
  }
665
698
  },
666
699
  "indexes": [
667
700
  {
668
701
  "name": "agent_configs_slug_context_idx",
669
702
  "columns": [
703
+ "tenant_id",
670
704
  "slug",
671
705
  "context"
672
706
  ],
673
- "unique": true
707
+ "unique": true,
708
+ "nullsNotDistinct": true
674
709
  },
675
710
  {
676
- "name": "agent_configs_created_at_idx",
711
+ "name": "agent_configs_tenant_id_created_at_idx",
677
712
  "columns": [
713
+ "tenant_id",
678
714
  "created_at"
679
715
  ]
680
716
  }
681
717
  ],
682
- "version": "9162bcd3"
718
+ "version": "25c6ac4c"
683
719
  }
684
720
  },
685
721
  "@happyvertical/smrt-agents:AgentSchedule": {
@@ -1068,7 +1104,8 @@
1068
1104
  "slug",
1069
1105
  "context"
1070
1106
  ],
1071
- "unique": true
1107
+ "unique": true,
1108
+ "nullsNotDistinct": true
1072
1109
  },
1073
1110
  {
1074
1111
  "name": "_smrt_agent_schedules_enabled_status_next_run_idx",
@@ -1197,7 +1234,7 @@
1197
1234
  "collectionExportName": "AgentScheduleCollectionCollection",
1198
1235
  "schema": {
1199
1236
  "tableName": "_smrt_agent_schedules",
1200
- "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_agent_schedules\" (\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);",
1237
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_agent_schedules\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"agent_type\" TEXT,\n \"agent_id\" TEXT,\n \"agent_config\" TEXT,\n \"cron\" TEXT,\n \"timezone\" TEXT,\n \"enabled\" BOOLEAN,\n \"status\" TEXT,\n \"last_run\" TIMESTAMP,\n \"next_run\" TIMESTAMP,\n \"last_status\" TEXT,\n \"last_error\" TEXT,\n \"run_count\" INTEGER,\n \"success_count\" INTEGER,\n \"failure_count\" INTEGER,\n \"max_concurrent\" INTEGER,\n \"running_count\" INTEGER,\n \"timeout\" INTEGER,\n \"method\" TEXT,\n \"method_args\" TEXT\n);",
1201
1238
  "columns": {
1202
1239
  "id": {
1203
1240
  "type": "UUID",
@@ -1223,25 +1260,137 @@
1223
1260
  "type": "TIMESTAMP",
1224
1261
  "notNull": true,
1225
1262
  "default": "current_timestamp"
1263
+ },
1264
+ "tenant_id": {
1265
+ "type": "UUID",
1266
+ "referenceKind": "tenantId",
1267
+ "notNull": false,
1268
+ "unique": false
1269
+ },
1270
+ "agent_type": {
1271
+ "type": "TEXT",
1272
+ "notNull": false,
1273
+ "unique": false
1274
+ },
1275
+ "agent_id": {
1276
+ "type": "TEXT",
1277
+ "notNull": false,
1278
+ "unique": false
1279
+ },
1280
+ "agent_config": {
1281
+ "type": "TEXT",
1282
+ "notNull": false,
1283
+ "unique": false
1284
+ },
1285
+ "cron": {
1286
+ "type": "TEXT",
1287
+ "notNull": false,
1288
+ "unique": false
1289
+ },
1290
+ "timezone": {
1291
+ "type": "TEXT",
1292
+ "notNull": false,
1293
+ "unique": false
1294
+ },
1295
+ "enabled": {
1296
+ "type": "BOOLEAN",
1297
+ "notNull": false,
1298
+ "unique": false
1299
+ },
1300
+ "status": {
1301
+ "type": "TEXT",
1302
+ "notNull": false,
1303
+ "unique": false
1304
+ },
1305
+ "last_run": {
1306
+ "type": "TIMESTAMP",
1307
+ "notNull": false,
1308
+ "unique": false
1309
+ },
1310
+ "next_run": {
1311
+ "type": "TIMESTAMP",
1312
+ "notNull": false,
1313
+ "unique": false
1314
+ },
1315
+ "last_status": {
1316
+ "type": "TEXT",
1317
+ "notNull": false,
1318
+ "unique": false
1319
+ },
1320
+ "last_error": {
1321
+ "type": "TEXT",
1322
+ "notNull": false,
1323
+ "unique": false
1324
+ },
1325
+ "run_count": {
1326
+ "type": "INTEGER",
1327
+ "notNull": false,
1328
+ "unique": false
1329
+ },
1330
+ "success_count": {
1331
+ "type": "INTEGER",
1332
+ "notNull": false,
1333
+ "unique": false
1334
+ },
1335
+ "failure_count": {
1336
+ "type": "INTEGER",
1337
+ "notNull": false,
1338
+ "unique": false
1339
+ },
1340
+ "max_concurrent": {
1341
+ "type": "INTEGER",
1342
+ "notNull": false,
1343
+ "unique": false
1344
+ },
1345
+ "running_count": {
1346
+ "type": "INTEGER",
1347
+ "notNull": false,
1348
+ "unique": false
1349
+ },
1350
+ "timeout": {
1351
+ "type": "INTEGER",
1352
+ "notNull": false,
1353
+ "unique": false
1354
+ },
1355
+ "method": {
1356
+ "type": "TEXT",
1357
+ "notNull": false,
1358
+ "unique": false
1359
+ },
1360
+ "method_args": {
1361
+ "type": "TEXT",
1362
+ "notNull": false,
1363
+ "unique": false
1226
1364
  }
1227
1365
  },
1228
1366
  "indexes": [
1229
1367
  {
1230
1368
  "name": "_smrt_agent_schedules_slug_context_idx",
1231
1369
  "columns": [
1370
+ "tenant_id",
1232
1371
  "slug",
1233
1372
  "context"
1234
1373
  ],
1235
- "unique": true
1374
+ "unique": true,
1375
+ "nullsNotDistinct": true
1236
1376
  },
1237
1377
  {
1238
- "name": "_smrt_agent_schedules_created_at_idx",
1378
+ "name": "_smrt_agent_schedules_enabled_status_next_run_idx",
1379
+ "columns": [
1380
+ "enabled",
1381
+ "status",
1382
+ "next_run"
1383
+ ]
1384
+ },
1385
+ {
1386
+ "name": "_smrt_agent_schedules_tenant_id_created_at_idx",
1239
1387
  "columns": [
1388
+ "tenant_id",
1240
1389
  "created_at"
1241
1390
  ]
1242
1391
  }
1243
1392
  ],
1244
- "version": "d45601b0"
1393
+ "version": "c21a1f29"
1245
1394
  }
1246
1395
  },
1247
1396
  "@happyvertical/smrt-agents:TenantAgent": {
@@ -1395,7 +1544,8 @@
1395
1544
  "tenant_id",
1396
1545
  "agent_class"
1397
1546
  ],
1398
- "unique": true
1547
+ "unique": true,
1548
+ "nullsNotDistinct": true
1399
1549
  },
1400
1550
  {
1401
1551
  "name": "tenant_agents_slug_context_idx",
@@ -1558,7 +1708,7 @@
1558
1708
  "collectionExportName": "TenantAgentCollectionCollection",
1559
1709
  "schema": {
1560
1710
  "tableName": "tenant_agents",
1561
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_agents\" (\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);",
1711
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_agents\" (\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 \"agent_class\" TEXT,\n \"status\" TEXT,\n \"permissions\" JSON,\n \"config\" JSON\n);",
1562
1712
  "columns": {
1563
1713
  "id": {
1564
1714
  "type": "UUID",
@@ -1584,11 +1734,475 @@
1584
1734
  "type": "TIMESTAMP",
1585
1735
  "notNull": true,
1586
1736
  "default": "current_timestamp"
1737
+ },
1738
+ "tenant_id": {
1739
+ "type": "UUID",
1740
+ "referenceKind": "tenantId",
1741
+ "notNull": true,
1742
+ "unique": false
1743
+ },
1744
+ "agent_class": {
1745
+ "type": "TEXT",
1746
+ "notNull": false,
1747
+ "unique": false
1748
+ },
1749
+ "status": {
1750
+ "type": "TEXT",
1751
+ "notNull": false,
1752
+ "unique": false
1753
+ },
1754
+ "permissions": {
1755
+ "type": "JSON",
1756
+ "notNull": false,
1757
+ "unique": false
1758
+ },
1759
+ "config": {
1760
+ "type": "JSON",
1761
+ "notNull": false,
1762
+ "unique": false
1587
1763
  }
1588
1764
  },
1589
1765
  "indexes": [
1766
+ {
1767
+ "name": "tenant_agents_tenant_id_agent_class_idx",
1768
+ "columns": [
1769
+ "tenant_id",
1770
+ "agent_class"
1771
+ ],
1772
+ "unique": true,
1773
+ "nullsNotDistinct": true
1774
+ },
1590
1775
  {
1591
1776
  "name": "tenant_agents_slug_context_idx",
1777
+ "columns": [
1778
+ "slug",
1779
+ "context"
1780
+ ]
1781
+ },
1782
+ {
1783
+ "name": "tenant_agents_tenant_id_created_at_idx",
1784
+ "columns": [
1785
+ "tenant_id",
1786
+ "created_at"
1787
+ ]
1788
+ }
1789
+ ],
1790
+ "version": "9892a054"
1791
+ }
1792
+ },
1793
+ "@happyvertical/smrt-agents:SmrtDataSurfaceActionTask": {
1794
+ "name": "smrtdatasurfaceactiontask",
1795
+ "className": "SmrtDataSurfaceActionTask",
1796
+ "qualifiedName": "@happyvertical/smrt-agents:SmrtDataSurfaceActionTask",
1797
+ "collection": "smrtdatasurfaceactiontasks",
1798
+ "filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/jobs-data-surface-action-queue.ts",
1799
+ "packageName": "@happyvertical/smrt-agents",
1800
+ "fields": {
1801
+ "tenantId": {
1802
+ "type": "text",
1803
+ "required": false,
1804
+ "_meta": {
1805
+ "sqlType": "UUID",
1806
+ "nullable": true,
1807
+ "__tenancy": {
1808
+ "isTenantIdField": true,
1809
+ "autoFilter": true,
1810
+ "required": false,
1811
+ "autoPopulate": true,
1812
+ "nullable": true,
1813
+ "mode": "optional",
1814
+ "field": "tenantId",
1815
+ "allowSuperAdminBypass": false
1816
+ }
1817
+ }
1818
+ },
1819
+ "args": {
1820
+ "type": "json",
1821
+ "required": true,
1822
+ "_meta": {
1823
+ "required": true
1824
+ }
1825
+ }
1826
+ },
1827
+ "methods": {
1828
+ "run": {
1829
+ "name": "run",
1830
+ "async": true,
1831
+ "parameters": [
1832
+ {
1833
+ "name": "args",
1834
+ "type": "DataSurfaceActionJobArgs",
1835
+ "optional": true
1836
+ },
1837
+ {
1838
+ "name": "context",
1839
+ "type": "JobExecutionContext",
1840
+ "optional": true
1841
+ }
1842
+ ],
1843
+ "returnType": "Promise<DataSurfaceActionResult>",
1844
+ "isStatic": false,
1845
+ "isPublic": true
1846
+ }
1847
+ },
1848
+ "decoratorConfig": {
1849
+ "tableName": "_smrt_data_surface_action_tasks",
1850
+ "api": false,
1851
+ "cli": false,
1852
+ "mcp": false,
1853
+ "tenantScoped": {
1854
+ "mode": "optional"
1855
+ },
1856
+ "conflictColumns": [
1857
+ "tenant_id",
1858
+ "slug",
1859
+ "context"
1860
+ ]
1861
+ },
1862
+ "extends": "SmrtObject",
1863
+ "exportName": "SmrtDataSurfaceActionTask",
1864
+ "collectionExportName": "SmrtDataSurfaceActionTaskCollection",
1865
+ "validationRules": [
1866
+ {
1867
+ "field": "args",
1868
+ "rule": "required",
1869
+ "fieldType": "json"
1870
+ }
1871
+ ],
1872
+ "schema": {
1873
+ "tableName": "_smrt_data_surface_action_tasks",
1874
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_data_surface_action_tasks\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"args\" JSON NOT NULL\n);",
1875
+ "columns": {
1876
+ "id": {
1877
+ "type": "UUID",
1878
+ "primaryKey": true,
1879
+ "referenceKind": "id",
1880
+ "notNull": true
1881
+ },
1882
+ "slug": {
1883
+ "type": "TEXT",
1884
+ "notNull": true
1885
+ },
1886
+ "context": {
1887
+ "type": "TEXT",
1888
+ "notNull": true,
1889
+ "default": ""
1890
+ },
1891
+ "created_at": {
1892
+ "type": "TIMESTAMP",
1893
+ "notNull": true,
1894
+ "default": "current_timestamp"
1895
+ },
1896
+ "updated_at": {
1897
+ "type": "TIMESTAMP",
1898
+ "notNull": true,
1899
+ "default": "current_timestamp"
1900
+ },
1901
+ "tenant_id": {
1902
+ "type": "UUID",
1903
+ "referenceKind": "tenantId",
1904
+ "notNull": false,
1905
+ "unique": false
1906
+ },
1907
+ "args": {
1908
+ "type": "JSON",
1909
+ "notNull": true,
1910
+ "unique": false
1911
+ }
1912
+ },
1913
+ "indexes": [
1914
+ {
1915
+ "name": "_smrt_data_surface_action_tasks_slug_context_idx",
1916
+ "columns": [
1917
+ "tenant_id",
1918
+ "slug",
1919
+ "context"
1920
+ ],
1921
+ "unique": true,
1922
+ "nullsNotDistinct": true
1923
+ },
1924
+ {
1925
+ "name": "_smrt_data_surface_action_tasks_tenant_id_created_at_idx",
1926
+ "columns": [
1927
+ "tenant_id",
1928
+ "created_at"
1929
+ ]
1930
+ }
1931
+ ],
1932
+ "version": "d1c4adf8"
1933
+ }
1934
+ },
1935
+ "@happyvertical/smrt-agents:DataSurfaceActionTokenState": {
1936
+ "name": "datasurfaceactiontokenstate",
1937
+ "className": "DataSurfaceActionTokenState",
1938
+ "qualifiedName": "@happyvertical/smrt-agents:DataSurfaceActionTokenState",
1939
+ "collection": "datasurfaceactiontokenstates",
1940
+ "filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/sql-data-surface-action-state.ts",
1941
+ "packageName": "@happyvertical/smrt-agents",
1942
+ "fields": {
1943
+ "tokenHash": {
1944
+ "type": "text",
1945
+ "required": true,
1946
+ "_meta": {
1947
+ "required": true,
1948
+ "unique": true
1949
+ }
1950
+ },
1951
+ "record": {
1952
+ "type": "json",
1953
+ "required": true,
1954
+ "_meta": {
1955
+ "required": true
1956
+ }
1957
+ },
1958
+ "consumedBy": {
1959
+ "type": "text",
1960
+ "required": false,
1961
+ "_meta": {
1962
+ "nullable": true
1963
+ }
1964
+ }
1965
+ },
1966
+ "methods": {},
1967
+ "decoratorConfig": {
1968
+ "tableName": "_smrt_data_surface_action_tokens",
1969
+ "api": false,
1970
+ "cli": false,
1971
+ "mcp": false
1972
+ },
1973
+ "extends": "SmrtObject",
1974
+ "exportName": "DataSurfaceActionTokenState",
1975
+ "collectionExportName": "DataSurfaceActionTokenStateCollection",
1976
+ "validationRules": [
1977
+ {
1978
+ "field": "tokenHash",
1979
+ "rule": "required",
1980
+ "fieldType": "text"
1981
+ },
1982
+ {
1983
+ "field": "record",
1984
+ "rule": "required",
1985
+ "fieldType": "json"
1986
+ }
1987
+ ],
1988
+ "schema": {
1989
+ "tableName": "_smrt_data_surface_action_tokens",
1990
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_data_surface_action_tokens\" (\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 \"token_hash\" TEXT NOT NULL UNIQUE,\n \"record\" JSON NOT NULL,\n \"consumed_by\" TEXT\n);",
1991
+ "columns": {
1992
+ "id": {
1993
+ "type": "UUID",
1994
+ "primaryKey": true,
1995
+ "referenceKind": "id",
1996
+ "notNull": true
1997
+ },
1998
+ "slug": {
1999
+ "type": "TEXT",
2000
+ "notNull": true
2001
+ },
2002
+ "context": {
2003
+ "type": "TEXT",
2004
+ "notNull": true,
2005
+ "default": ""
2006
+ },
2007
+ "created_at": {
2008
+ "type": "TIMESTAMP",
2009
+ "notNull": true,
2010
+ "default": "current_timestamp"
2011
+ },
2012
+ "updated_at": {
2013
+ "type": "TIMESTAMP",
2014
+ "notNull": true,
2015
+ "default": "current_timestamp"
2016
+ },
2017
+ "token_hash": {
2018
+ "type": "TEXT",
2019
+ "notNull": true,
2020
+ "unique": true
2021
+ },
2022
+ "record": {
2023
+ "type": "JSON",
2024
+ "notNull": true,
2025
+ "unique": false
2026
+ },
2027
+ "consumed_by": {
2028
+ "type": "TEXT",
2029
+ "notNull": false,
2030
+ "unique": false
2031
+ }
2032
+ },
2033
+ "indexes": [
2034
+ {
2035
+ "name": "_smrt_data_surface_action_tokens_slug_context_idx",
2036
+ "columns": [
2037
+ "slug",
2038
+ "context"
2039
+ ],
2040
+ "unique": true
2041
+ },
2042
+ {
2043
+ "name": "_smrt_data_surface_action_tokens_created_at_idx",
2044
+ "columns": [
2045
+ "created_at"
2046
+ ]
2047
+ }
2048
+ ],
2049
+ "version": "497cf260"
2050
+ }
2051
+ },
2052
+ "@happyvertical/smrt-agents:DataSurfaceActionIdempotencyState": {
2053
+ "name": "datasurfaceactionidempotencystate",
2054
+ "className": "DataSurfaceActionIdempotencyState",
2055
+ "qualifiedName": "@happyvertical/smrt-agents:DataSurfaceActionIdempotencyState",
2056
+ "collection": "datasurfaceactionidempotencystates",
2057
+ "filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/sql-data-surface-action-state.ts",
2058
+ "packageName": "@happyvertical/smrt-agents",
2059
+ "fields": {
2060
+ "keyHash": {
2061
+ "type": "text",
2062
+ "required": true,
2063
+ "_meta": {
2064
+ "required": true,
2065
+ "unique": true
2066
+ }
2067
+ },
2068
+ "status": {
2069
+ "type": "text",
2070
+ "required": true,
2071
+ "_meta": {
2072
+ "required": true
2073
+ }
2074
+ },
2075
+ "requestFingerprint": {
2076
+ "type": "text",
2077
+ "required": true,
2078
+ "_meta": {
2079
+ "required": true
2080
+ }
2081
+ },
2082
+ "ownerHash": {
2083
+ "type": "text",
2084
+ "required": false,
2085
+ "_meta": {
2086
+ "nullable": true
2087
+ }
2088
+ },
2089
+ "reservedAt": {
2090
+ "type": "text",
2091
+ "required": false,
2092
+ "_meta": {
2093
+ "nullable": true
2094
+ }
2095
+ },
2096
+ "result": {
2097
+ "type": "json",
2098
+ "required": false,
2099
+ "_meta": {
2100
+ "nullable": true
2101
+ }
2102
+ },
2103
+ "recovery": {
2104
+ "type": "json",
2105
+ "required": false,
2106
+ "_meta": {
2107
+ "nullable": true
2108
+ }
2109
+ }
2110
+ },
2111
+ "methods": {},
2112
+ "decoratorConfig": {
2113
+ "tableName": "_smrt_data_surface_action_idempotency",
2114
+ "api": false,
2115
+ "cli": false,
2116
+ "mcp": false
2117
+ },
2118
+ "extends": "SmrtObject",
2119
+ "exportName": "DataSurfaceActionIdempotencyState",
2120
+ "collectionExportName": "DataSurfaceActionIdempotencyStateCollection",
2121
+ "validationRules": [
2122
+ {
2123
+ "field": "keyHash",
2124
+ "rule": "required",
2125
+ "fieldType": "text"
2126
+ },
2127
+ {
2128
+ "field": "status",
2129
+ "rule": "required",
2130
+ "fieldType": "text"
2131
+ },
2132
+ {
2133
+ "field": "requestFingerprint",
2134
+ "rule": "required",
2135
+ "fieldType": "text"
2136
+ }
2137
+ ],
2138
+ "schema": {
2139
+ "tableName": "_smrt_data_surface_action_idempotency",
2140
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_data_surface_action_idempotency\" (\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 \"key_hash\" TEXT NOT NULL UNIQUE,\n \"status\" TEXT NOT NULL,\n \"request_fingerprint\" TEXT NOT NULL,\n \"owner_hash\" TEXT,\n \"reserved_at\" TEXT,\n \"result\" JSON,\n \"recovery\" JSON\n);",
2141
+ "columns": {
2142
+ "id": {
2143
+ "type": "UUID",
2144
+ "primaryKey": true,
2145
+ "referenceKind": "id",
2146
+ "notNull": true
2147
+ },
2148
+ "slug": {
2149
+ "type": "TEXT",
2150
+ "notNull": true
2151
+ },
2152
+ "context": {
2153
+ "type": "TEXT",
2154
+ "notNull": true,
2155
+ "default": ""
2156
+ },
2157
+ "created_at": {
2158
+ "type": "TIMESTAMP",
2159
+ "notNull": true,
2160
+ "default": "current_timestamp"
2161
+ },
2162
+ "updated_at": {
2163
+ "type": "TIMESTAMP",
2164
+ "notNull": true,
2165
+ "default": "current_timestamp"
2166
+ },
2167
+ "key_hash": {
2168
+ "type": "TEXT",
2169
+ "notNull": true,
2170
+ "unique": true
2171
+ },
2172
+ "status": {
2173
+ "type": "TEXT",
2174
+ "notNull": true,
2175
+ "unique": false
2176
+ },
2177
+ "request_fingerprint": {
2178
+ "type": "TEXT",
2179
+ "notNull": true,
2180
+ "unique": false
2181
+ },
2182
+ "owner_hash": {
2183
+ "type": "TEXT",
2184
+ "notNull": false,
2185
+ "unique": false
2186
+ },
2187
+ "reserved_at": {
2188
+ "type": "TEXT",
2189
+ "notNull": false,
2190
+ "unique": false
2191
+ },
2192
+ "result": {
2193
+ "type": "JSON",
2194
+ "notNull": false,
2195
+ "unique": false
2196
+ },
2197
+ "recovery": {
2198
+ "type": "JSON",
2199
+ "notNull": false,
2200
+ "unique": false
2201
+ }
2202
+ },
2203
+ "indexes": [
2204
+ {
2205
+ "name": "_smrt_data_surface_action_idempotency_slug_context_idx",
1592
2206
  "columns": [
1593
2207
  "slug",
1594
2208
  "context"
@@ -1596,19 +2210,20 @@
1596
2210
  "unique": true
1597
2211
  },
1598
2212
  {
1599
- "name": "tenant_agents_created_at_idx",
2213
+ "name": "_smrt_data_surface_action_idempotency_created_at_idx",
1600
2214
  "columns": [
1601
2215
  "created_at"
1602
2216
  ]
1603
2217
  }
1604
2218
  ],
1605
- "version": "fbe7be99"
2219
+ "version": "eb65ff1e"
1606
2220
  }
1607
2221
  }
1608
2222
  },
1609
2223
  "moduleType": "smrt",
1610
2224
  "smrtDependencies": [
1611
2225
  "@happyvertical/smrt-core",
2226
+ "@happyvertical/smrt-jobs",
1612
2227
  "@happyvertical/smrt-playbooks",
1613
2228
  "@happyvertical/smrt-reports",
1614
2229
  "@happyvertical/smrt-secrets",