@happyvertical/smrt-agents 0.57.46 → 0.57.48
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/AGENTS.md +2 -21
- package/agents/lazy-config.md +35 -0
- package/dist/agent.d.ts +12 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +534 -517
- package/dist/smrt-knowledge.json +169 -163
- package/package.json +18 -18
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-agents",
|
|
5
|
-
"packageVersion": "0.57.
|
|
5
|
+
"packageVersion": "0.57.48",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-agents:Agent": {
|
|
8
8
|
"name": "agent",
|
|
@@ -663,6 +663,11 @@
|
|
|
663
663
|
"extendsTypeArg": "AgentConfig",
|
|
664
664
|
"exportName": "AgentConfigCollection",
|
|
665
665
|
"collectionExportName": "AgentConfigCollectionCollection",
|
|
666
|
+
"collectionOf": "@happyvertical/smrt-agents:AgentConfig",
|
|
667
|
+
"inheritedExposure": [
|
|
668
|
+
"api",
|
|
669
|
+
"mcp"
|
|
670
|
+
],
|
|
666
671
|
"schema": {
|
|
667
672
|
"tableName": "agent_configs",
|
|
668
673
|
"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);",
|
|
@@ -1313,6 +1318,12 @@
|
|
|
1313
1318
|
"extendsTypeArg": "AgentSchedule",
|
|
1314
1319
|
"exportName": "AgentScheduleCollection",
|
|
1315
1320
|
"collectionExportName": "AgentScheduleCollectionCollection",
|
|
1321
|
+
"collectionOf": "@happyvertical/smrt-agents:AgentSchedule",
|
|
1322
|
+
"inheritedExposure": [
|
|
1323
|
+
"api",
|
|
1324
|
+
"mcp",
|
|
1325
|
+
"cli"
|
|
1326
|
+
],
|
|
1316
1327
|
"schema": {
|
|
1317
1328
|
"tableName": "_smrt_agent_schedules",
|
|
1318
1329
|
"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);",
|
|
@@ -1475,102 +1486,88 @@
|
|
|
1475
1486
|
},
|
|
1476
1487
|
"importPath": "@happyvertical/smrt-agents"
|
|
1477
1488
|
},
|
|
1478
|
-
"@happyvertical/smrt-agents:
|
|
1479
|
-
"name": "
|
|
1480
|
-
"className": "
|
|
1481
|
-
"qualifiedName": "@happyvertical/smrt-agents:
|
|
1482
|
-
"collection": "
|
|
1483
|
-
"
|
|
1484
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/tenant-agent.ts",
|
|
1489
|
+
"@happyvertical/smrt-agents:SmrtDataSurfaceActionTask": {
|
|
1490
|
+
"name": "smrtdatasurfaceactiontask",
|
|
1491
|
+
"className": "SmrtDataSurfaceActionTask",
|
|
1492
|
+
"qualifiedName": "@happyvertical/smrt-agents:SmrtDataSurfaceActionTask",
|
|
1493
|
+
"collection": "smrtdatasurfaceactiontasks",
|
|
1494
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/jobs-data-surface-action-queue.ts",
|
|
1485
1495
|
"packageName": "@happyvertical/smrt-agents",
|
|
1486
1496
|
"fields": {
|
|
1487
1497
|
"tenantId": {
|
|
1488
1498
|
"type": "text",
|
|
1489
|
-
"required":
|
|
1499
|
+
"required": false,
|
|
1490
1500
|
"_meta": {
|
|
1491
1501
|
"sqlType": "UUID",
|
|
1502
|
+
"nullable": true,
|
|
1492
1503
|
"__tenancy": {
|
|
1493
1504
|
"isTenantIdField": true,
|
|
1494
1505
|
"autoFilter": true,
|
|
1495
|
-
"required":
|
|
1506
|
+
"required": false,
|
|
1496
1507
|
"autoPopulate": true,
|
|
1497
|
-
"nullable":
|
|
1498
|
-
"mode": "
|
|
1508
|
+
"nullable": true,
|
|
1509
|
+
"mode": "optional",
|
|
1499
1510
|
"field": "tenantId",
|
|
1500
1511
|
"allowSuperAdminBypass": false
|
|
1501
1512
|
}
|
|
1502
1513
|
}
|
|
1503
1514
|
},
|
|
1504
|
-
"
|
|
1505
|
-
"type": "text",
|
|
1506
|
-
"required": false,
|
|
1507
|
-
"_meta": {}
|
|
1508
|
-
},
|
|
1509
|
-
"status": {
|
|
1510
|
-
"type": "text",
|
|
1511
|
-
"required": false,
|
|
1512
|
-
"_meta": {},
|
|
1513
|
-
"enum": [
|
|
1514
|
-
"active",
|
|
1515
|
-
"disabled"
|
|
1516
|
-
]
|
|
1517
|
-
},
|
|
1518
|
-
"permissions": {
|
|
1515
|
+
"args": {
|
|
1519
1516
|
"type": "json",
|
|
1520
|
-
"required":
|
|
1517
|
+
"required": true,
|
|
1521
1518
|
"_meta": {
|
|
1522
|
-
"
|
|
1519
|
+
"required": true
|
|
1523
1520
|
}
|
|
1524
|
-
},
|
|
1525
|
-
"config": {
|
|
1526
|
-
"type": "json",
|
|
1527
|
-
"required": false,
|
|
1528
|
-
"_meta": {
|
|
1529
|
-
"nullable": true,
|
|
1530
|
-
"sensitive": true
|
|
1531
|
-
},
|
|
1532
|
-
"sensitive": true
|
|
1533
1521
|
}
|
|
1534
1522
|
},
|
|
1535
|
-
"methods": {
|
|
1523
|
+
"methods": {
|
|
1524
|
+
"run": {
|
|
1525
|
+
"name": "run",
|
|
1526
|
+
"async": true,
|
|
1527
|
+
"parameters": [
|
|
1528
|
+
{
|
|
1529
|
+
"name": "args",
|
|
1530
|
+
"type": "DataSurfaceActionJobArgs",
|
|
1531
|
+
"optional": true
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"name": "context",
|
|
1535
|
+
"type": "JobExecutionContext",
|
|
1536
|
+
"optional": true
|
|
1537
|
+
}
|
|
1538
|
+
],
|
|
1539
|
+
"returnType": "Promise<DataSurfaceActionResult>",
|
|
1540
|
+
"isStatic": false,
|
|
1541
|
+
"isPublic": true
|
|
1542
|
+
}
|
|
1543
|
+
},
|
|
1536
1544
|
"decoratorConfig": {
|
|
1537
|
-
"tableName": "
|
|
1538
|
-
"api":
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
"update",
|
|
1544
|
-
"delete"
|
|
1545
|
-
]
|
|
1546
|
-
},
|
|
1547
|
-
"cli": {
|
|
1548
|
-
"include": [
|
|
1549
|
-
"list",
|
|
1550
|
-
"get"
|
|
1551
|
-
]
|
|
1552
|
-
},
|
|
1553
|
-
"mcp": {
|
|
1554
|
-
"include": [
|
|
1555
|
-
"list",
|
|
1556
|
-
"get"
|
|
1557
|
-
]
|
|
1545
|
+
"tableName": "_smrt_data_surface_action_tasks",
|
|
1546
|
+
"api": false,
|
|
1547
|
+
"cli": false,
|
|
1548
|
+
"mcp": false,
|
|
1549
|
+
"tenantScoped": {
|
|
1550
|
+
"mode": "optional"
|
|
1558
1551
|
},
|
|
1559
1552
|
"conflictColumns": [
|
|
1560
1553
|
"tenant_id",
|
|
1561
|
-
"
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
"mode": "required"
|
|
1565
|
-
}
|
|
1554
|
+
"slug",
|
|
1555
|
+
"context"
|
|
1556
|
+
]
|
|
1566
1557
|
},
|
|
1567
1558
|
"extends": "SmrtObject",
|
|
1568
|
-
"exportName": "
|
|
1569
|
-
"collectionExportName": "
|
|
1570
|
-
"validationRules": [
|
|
1559
|
+
"exportName": "SmrtDataSurfaceActionTask",
|
|
1560
|
+
"collectionExportName": "SmrtDataSurfaceActionTaskCollection",
|
|
1561
|
+
"validationRules": [
|
|
1562
|
+
{
|
|
1563
|
+
"field": "args",
|
|
1564
|
+
"rule": "required",
|
|
1565
|
+
"fieldType": "json"
|
|
1566
|
+
}
|
|
1567
|
+
],
|
|
1571
1568
|
"schema": {
|
|
1572
|
-
"tableName": "
|
|
1573
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1569
|
+
"tableName": "_smrt_data_surface_action_tasks",
|
|
1570
|
+
"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);",
|
|
1574
1571
|
"columns": {
|
|
1575
1572
|
"id": {
|
|
1576
1573
|
"type": "UUID",
|
|
@@ -1600,225 +1597,94 @@
|
|
|
1600
1597
|
"tenant_id": {
|
|
1601
1598
|
"type": "UUID",
|
|
1602
1599
|
"referenceKind": "tenantId",
|
|
1603
|
-
"notNull": true,
|
|
1604
|
-
"unique": false
|
|
1605
|
-
},
|
|
1606
|
-
"agent_class": {
|
|
1607
|
-
"type": "TEXT",
|
|
1608
|
-
"notNull": false,
|
|
1609
|
-
"unique": false
|
|
1610
|
-
},
|
|
1611
|
-
"status": {
|
|
1612
|
-
"type": "TEXT",
|
|
1613
1600
|
"notNull": false,
|
|
1614
1601
|
"unique": false
|
|
1615
1602
|
},
|
|
1616
|
-
"
|
|
1617
|
-
"type": "JSON",
|
|
1618
|
-
"notNull": false,
|
|
1619
|
-
"unique": false
|
|
1620
|
-
},
|
|
1621
|
-
"config": {
|
|
1603
|
+
"args": {
|
|
1622
1604
|
"type": "JSON",
|
|
1623
|
-
"notNull":
|
|
1605
|
+
"notNull": true,
|
|
1624
1606
|
"unique": false
|
|
1625
1607
|
}
|
|
1626
1608
|
},
|
|
1627
1609
|
"indexes": [
|
|
1628
1610
|
{
|
|
1629
|
-
"name": "
|
|
1611
|
+
"name": "_smrt_data_surface_action_tasks_slug_context_idx",
|
|
1630
1612
|
"columns": [
|
|
1631
1613
|
"tenant_id",
|
|
1632
|
-
"
|
|
1614
|
+
"slug",
|
|
1615
|
+
"context"
|
|
1633
1616
|
],
|
|
1634
1617
|
"unique": true,
|
|
1635
1618
|
"nullsNotDistinct": true
|
|
1636
1619
|
},
|
|
1637
1620
|
{
|
|
1638
|
-
"name": "
|
|
1639
|
-
"columns": [
|
|
1640
|
-
"slug",
|
|
1641
|
-
"context"
|
|
1642
|
-
]
|
|
1643
|
-
},
|
|
1644
|
-
{
|
|
1645
|
-
"name": "tenant_agents_tenant_id_created_at_idx",
|
|
1621
|
+
"name": "_smrt_data_surface_action_tasks_tenant_id_created_at_idx",
|
|
1646
1622
|
"columns": [
|
|
1647
1623
|
"tenant_id",
|
|
1648
1624
|
"created_at"
|
|
1649
1625
|
]
|
|
1650
1626
|
}
|
|
1651
1627
|
],
|
|
1652
|
-
"version": "
|
|
1628
|
+
"version": "d1c4adf8"
|
|
1653
1629
|
},
|
|
1654
|
-
"importPath": "@happyvertical/smrt-agents"
|
|
1630
|
+
"importPath": "@happyvertical/smrt-agents/server"
|
|
1655
1631
|
},
|
|
1656
|
-
"@happyvertical/smrt-agents:
|
|
1657
|
-
"name": "
|
|
1658
|
-
"className": "
|
|
1659
|
-
"qualifiedName": "@happyvertical/smrt-agents:
|
|
1660
|
-
"collection": "
|
|
1661
|
-
"
|
|
1662
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/tenant-agent.ts",
|
|
1632
|
+
"@happyvertical/smrt-agents:DataSurfaceActionTokenState": {
|
|
1633
|
+
"name": "datasurfaceactiontokenstate",
|
|
1634
|
+
"className": "DataSurfaceActionTokenState",
|
|
1635
|
+
"qualifiedName": "@happyvertical/smrt-agents:DataSurfaceActionTokenState",
|
|
1636
|
+
"collection": "datasurfaceactiontokenstates",
|
|
1637
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/sql-data-surface-action-state.ts",
|
|
1663
1638
|
"packageName": "@happyvertical/smrt-agents",
|
|
1664
|
-
"fields": {
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
"
|
|
1668
|
-
"
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
"type": "string",
|
|
1673
|
-
"optional": false
|
|
1674
|
-
},
|
|
1675
|
-
{
|
|
1676
|
-
"name": "getAncestorIds",
|
|
1677
|
-
"type": "Function",
|
|
1678
|
-
"optional": false
|
|
1679
|
-
},
|
|
1680
|
-
{
|
|
1681
|
-
"name": "manifests",
|
|
1682
|
-
"type": "Map<string, AgentManifestInfo>",
|
|
1683
|
-
"optional": true
|
|
1684
|
-
}
|
|
1685
|
-
],
|
|
1686
|
-
"returnType": "Promise<ResolvedAgentAvailability[]>",
|
|
1687
|
-
"isStatic": false,
|
|
1688
|
-
"isPublic": true
|
|
1689
|
-
},
|
|
1690
|
-
"enableAgent": {
|
|
1691
|
-
"name": "enableAgent",
|
|
1692
|
-
"async": true,
|
|
1693
|
-
"parameters": [
|
|
1694
|
-
{
|
|
1695
|
-
"name": "tenantId",
|
|
1696
|
-
"type": "string",
|
|
1697
|
-
"optional": false
|
|
1698
|
-
},
|
|
1699
|
-
{
|
|
1700
|
-
"name": "agentClass",
|
|
1701
|
-
"type": "string",
|
|
1702
|
-
"optional": false
|
|
1703
|
-
}
|
|
1704
|
-
],
|
|
1705
|
-
"returnType": "Promise<TenantAgent>",
|
|
1706
|
-
"isStatic": false,
|
|
1707
|
-
"isPublic": true
|
|
1639
|
+
"fields": {
|
|
1640
|
+
"tokenHash": {
|
|
1641
|
+
"type": "text",
|
|
1642
|
+
"required": true,
|
|
1643
|
+
"_meta": {
|
|
1644
|
+
"required": true,
|
|
1645
|
+
"unique": true
|
|
1646
|
+
}
|
|
1708
1647
|
},
|
|
1709
|
-
"
|
|
1710
|
-
"
|
|
1711
|
-
"
|
|
1712
|
-
"
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
"type": "string",
|
|
1716
|
-
"optional": false
|
|
1717
|
-
},
|
|
1718
|
-
{
|
|
1719
|
-
"name": "agentClass",
|
|
1720
|
-
"type": "string",
|
|
1721
|
-
"optional": false
|
|
1722
|
-
}
|
|
1723
|
-
],
|
|
1724
|
-
"returnType": "Promise<TenantAgent>",
|
|
1725
|
-
"isStatic": false,
|
|
1726
|
-
"isPublic": true
|
|
1648
|
+
"record": {
|
|
1649
|
+
"type": "json",
|
|
1650
|
+
"required": true,
|
|
1651
|
+
"_meta": {
|
|
1652
|
+
"required": true
|
|
1653
|
+
}
|
|
1727
1654
|
},
|
|
1728
|
-
"
|
|
1729
|
-
"
|
|
1730
|
-
"
|
|
1731
|
-
"
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
"type": "string",
|
|
1735
|
-
"optional": false
|
|
1736
|
-
},
|
|
1737
|
-
{
|
|
1738
|
-
"name": "agentClass",
|
|
1739
|
-
"type": "string",
|
|
1740
|
-
"optional": false
|
|
1741
|
-
}
|
|
1742
|
-
],
|
|
1743
|
-
"returnType": "Promise<void>",
|
|
1744
|
-
"isStatic": false,
|
|
1745
|
-
"isPublic": true
|
|
1746
|
-
},
|
|
1747
|
-
"setPermissions": {
|
|
1748
|
-
"name": "setPermissions",
|
|
1749
|
-
"async": true,
|
|
1750
|
-
"parameters": [
|
|
1751
|
-
{
|
|
1752
|
-
"name": "tenantId",
|
|
1753
|
-
"type": "string",
|
|
1754
|
-
"optional": false
|
|
1755
|
-
},
|
|
1756
|
-
{
|
|
1757
|
-
"name": "agentClass",
|
|
1758
|
-
"type": "string",
|
|
1759
|
-
"optional": false
|
|
1760
|
-
},
|
|
1761
|
-
{
|
|
1762
|
-
"name": "permissions",
|
|
1763
|
-
"type": "Record<string, boolean>",
|
|
1764
|
-
"optional": false
|
|
1765
|
-
}
|
|
1766
|
-
],
|
|
1767
|
-
"returnType": "Promise<TenantAgent>",
|
|
1768
|
-
"isStatic": false,
|
|
1769
|
-
"isPublic": true
|
|
1770
|
-
},
|
|
1771
|
-
"findByTenantAndClass": {
|
|
1772
|
-
"name": "findByTenantAndClass",
|
|
1773
|
-
"async": true,
|
|
1774
|
-
"parameters": [
|
|
1775
|
-
{
|
|
1776
|
-
"name": "tenantId",
|
|
1777
|
-
"type": "string",
|
|
1778
|
-
"optional": false
|
|
1779
|
-
},
|
|
1780
|
-
{
|
|
1781
|
-
"name": "agentClass",
|
|
1782
|
-
"type": "string",
|
|
1783
|
-
"optional": false
|
|
1784
|
-
}
|
|
1785
|
-
],
|
|
1786
|
-
"returnType": "Promise<TenantAgent | null>",
|
|
1787
|
-
"isStatic": false,
|
|
1788
|
-
"isPublic": true
|
|
1655
|
+
"consumedBy": {
|
|
1656
|
+
"type": "text",
|
|
1657
|
+
"required": false,
|
|
1658
|
+
"_meta": {
|
|
1659
|
+
"nullable": true
|
|
1660
|
+
}
|
|
1789
1661
|
}
|
|
1790
1662
|
},
|
|
1663
|
+
"methods": {},
|
|
1791
1664
|
"decoratorConfig": {
|
|
1792
|
-
"tableName": "
|
|
1793
|
-
"api":
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
"
|
|
1804
|
-
|
|
1805
|
-
"get"
|
|
1806
|
-
]
|
|
1665
|
+
"tableName": "_smrt_data_surface_action_tokens",
|
|
1666
|
+
"api": false,
|
|
1667
|
+
"cli": false,
|
|
1668
|
+
"mcp": false
|
|
1669
|
+
},
|
|
1670
|
+
"extends": "SmrtObject",
|
|
1671
|
+
"exportName": "DataSurfaceActionTokenState",
|
|
1672
|
+
"collectionExportName": "DataSurfaceActionTokenStateCollection",
|
|
1673
|
+
"validationRules": [
|
|
1674
|
+
{
|
|
1675
|
+
"field": "tokenHash",
|
|
1676
|
+
"rule": "required",
|
|
1677
|
+
"fieldType": "text"
|
|
1807
1678
|
},
|
|
1808
|
-
|
|
1809
|
-
"
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
]
|
|
1679
|
+
{
|
|
1680
|
+
"field": "record",
|
|
1681
|
+
"rule": "required",
|
|
1682
|
+
"fieldType": "json"
|
|
1813
1683
|
}
|
|
1814
|
-
|
|
1815
|
-
"extends": "SmrtCollection",
|
|
1816
|
-
"extendsTypeArg": "TenantAgent",
|
|
1817
|
-
"exportName": "TenantAgentCollection",
|
|
1818
|
-
"collectionExportName": "TenantAgentCollectionCollection",
|
|
1684
|
+
],
|
|
1819
1685
|
"schema": {
|
|
1820
|
-
"tableName": "
|
|
1821
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1686
|
+
"tableName": "_smrt_data_surface_action_tokens",
|
|
1687
|
+
"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);",
|
|
1822
1688
|
"columns": {
|
|
1823
1689
|
"id": {
|
|
1824
1690
|
"type": "UUID",
|
|
@@ -1845,144 +1711,135 @@
|
|
|
1845
1711
|
"notNull": true,
|
|
1846
1712
|
"default": "current_timestamp"
|
|
1847
1713
|
},
|
|
1848
|
-
"
|
|
1849
|
-
"type": "UUID",
|
|
1850
|
-
"referenceKind": "tenantId",
|
|
1851
|
-
"notNull": true,
|
|
1852
|
-
"unique": false
|
|
1853
|
-
},
|
|
1854
|
-
"agent_class": {
|
|
1855
|
-
"type": "TEXT",
|
|
1856
|
-
"notNull": false,
|
|
1857
|
-
"unique": false
|
|
1858
|
-
},
|
|
1859
|
-
"status": {
|
|
1714
|
+
"token_hash": {
|
|
1860
1715
|
"type": "TEXT",
|
|
1861
|
-
"notNull":
|
|
1862
|
-
"unique":
|
|
1716
|
+
"notNull": true,
|
|
1717
|
+
"unique": true
|
|
1863
1718
|
},
|
|
1864
|
-
"
|
|
1719
|
+
"record": {
|
|
1865
1720
|
"type": "JSON",
|
|
1866
|
-
"notNull":
|
|
1721
|
+
"notNull": true,
|
|
1867
1722
|
"unique": false
|
|
1868
1723
|
},
|
|
1869
|
-
"
|
|
1870
|
-
"type": "
|
|
1724
|
+
"consumed_by": {
|
|
1725
|
+
"type": "TEXT",
|
|
1871
1726
|
"notNull": false,
|
|
1872
1727
|
"unique": false
|
|
1873
1728
|
}
|
|
1874
1729
|
},
|
|
1875
1730
|
"indexes": [
|
|
1876
1731
|
{
|
|
1877
|
-
"name": "
|
|
1878
|
-
"columns": [
|
|
1879
|
-
"tenant_id",
|
|
1880
|
-
"agent_class"
|
|
1881
|
-
],
|
|
1882
|
-
"unique": true,
|
|
1883
|
-
"nullsNotDistinct": true
|
|
1884
|
-
},
|
|
1885
|
-
{
|
|
1886
|
-
"name": "tenant_agents_slug_context_idx",
|
|
1732
|
+
"name": "_smrt_data_surface_action_tokens_slug_context_idx",
|
|
1887
1733
|
"columns": [
|
|
1888
1734
|
"slug",
|
|
1889
1735
|
"context"
|
|
1890
|
-
]
|
|
1736
|
+
],
|
|
1737
|
+
"unique": true
|
|
1891
1738
|
},
|
|
1892
1739
|
{
|
|
1893
|
-
"name": "
|
|
1740
|
+
"name": "_smrt_data_surface_action_tokens_created_at_idx",
|
|
1894
1741
|
"columns": [
|
|
1895
|
-
"tenant_id",
|
|
1896
1742
|
"created_at"
|
|
1897
1743
|
]
|
|
1898
1744
|
}
|
|
1899
1745
|
],
|
|
1900
|
-
"version": "
|
|
1746
|
+
"version": "497cf260"
|
|
1901
1747
|
},
|
|
1902
|
-
"importPath": "@happyvertical/smrt-agents"
|
|
1748
|
+
"importPath": "@happyvertical/smrt-agents/server"
|
|
1903
1749
|
},
|
|
1904
|
-
"@happyvertical/smrt-agents:
|
|
1905
|
-
"name": "
|
|
1906
|
-
"className": "
|
|
1907
|
-
"qualifiedName": "@happyvertical/smrt-agents:
|
|
1908
|
-
"collection": "
|
|
1909
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/
|
|
1750
|
+
"@happyvertical/smrt-agents:DataSurfaceActionIdempotencyState": {
|
|
1751
|
+
"name": "datasurfaceactionidempotencystate",
|
|
1752
|
+
"className": "DataSurfaceActionIdempotencyState",
|
|
1753
|
+
"qualifiedName": "@happyvertical/smrt-agents:DataSurfaceActionIdempotencyState",
|
|
1754
|
+
"collection": "datasurfaceactionidempotencystates",
|
|
1755
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/sql-data-surface-action-state.ts",
|
|
1910
1756
|
"packageName": "@happyvertical/smrt-agents",
|
|
1911
1757
|
"fields": {
|
|
1912
|
-
"
|
|
1758
|
+
"keyHash": {
|
|
1913
1759
|
"type": "text",
|
|
1914
|
-
"required":
|
|
1760
|
+
"required": true,
|
|
1915
1761
|
"_meta": {
|
|
1916
|
-
"
|
|
1917
|
-
"
|
|
1918
|
-
"__tenancy": {
|
|
1919
|
-
"isTenantIdField": true,
|
|
1920
|
-
"autoFilter": true,
|
|
1921
|
-
"required": false,
|
|
1922
|
-
"autoPopulate": true,
|
|
1923
|
-
"nullable": true,
|
|
1924
|
-
"mode": "optional",
|
|
1925
|
-
"field": "tenantId",
|
|
1926
|
-
"allowSuperAdminBypass": false
|
|
1927
|
-
}
|
|
1762
|
+
"required": true,
|
|
1763
|
+
"unique": true
|
|
1928
1764
|
}
|
|
1929
1765
|
},
|
|
1930
|
-
"
|
|
1931
|
-
"type": "
|
|
1766
|
+
"status": {
|
|
1767
|
+
"type": "text",
|
|
1768
|
+
"required": true,
|
|
1769
|
+
"_meta": {
|
|
1770
|
+
"required": true
|
|
1771
|
+
},
|
|
1772
|
+
"enum": [
|
|
1773
|
+
"reserved",
|
|
1774
|
+
"completed"
|
|
1775
|
+
]
|
|
1776
|
+
},
|
|
1777
|
+
"requestFingerprint": {
|
|
1778
|
+
"type": "text",
|
|
1932
1779
|
"required": true,
|
|
1933
1780
|
"_meta": {
|
|
1934
1781
|
"required": true
|
|
1935
1782
|
}
|
|
1783
|
+
},
|
|
1784
|
+
"ownerHash": {
|
|
1785
|
+
"type": "text",
|
|
1786
|
+
"required": false,
|
|
1787
|
+
"_meta": {
|
|
1788
|
+
"nullable": true
|
|
1789
|
+
}
|
|
1790
|
+
},
|
|
1791
|
+
"reservedAt": {
|
|
1792
|
+
"type": "text",
|
|
1793
|
+
"required": false,
|
|
1794
|
+
"_meta": {
|
|
1795
|
+
"nullable": true
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
"result": {
|
|
1799
|
+
"type": "json",
|
|
1800
|
+
"required": false,
|
|
1801
|
+
"_meta": {
|
|
1802
|
+
"nullable": true
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"recovery": {
|
|
1806
|
+
"type": "json",
|
|
1807
|
+
"required": false,
|
|
1808
|
+
"_meta": {
|
|
1809
|
+
"nullable": true
|
|
1810
|
+
}
|
|
1936
1811
|
}
|
|
1937
1812
|
},
|
|
1938
|
-
"methods": {
|
|
1939
|
-
"run": {
|
|
1940
|
-
"name": "run",
|
|
1941
|
-
"async": true,
|
|
1942
|
-
"parameters": [
|
|
1943
|
-
{
|
|
1944
|
-
"name": "args",
|
|
1945
|
-
"type": "DataSurfaceActionJobArgs",
|
|
1946
|
-
"optional": true
|
|
1947
|
-
},
|
|
1948
|
-
{
|
|
1949
|
-
"name": "context",
|
|
1950
|
-
"type": "JobExecutionContext",
|
|
1951
|
-
"optional": true
|
|
1952
|
-
}
|
|
1953
|
-
],
|
|
1954
|
-
"returnType": "Promise<DataSurfaceActionResult>",
|
|
1955
|
-
"isStatic": false,
|
|
1956
|
-
"isPublic": true
|
|
1957
|
-
}
|
|
1958
|
-
},
|
|
1813
|
+
"methods": {},
|
|
1959
1814
|
"decoratorConfig": {
|
|
1960
|
-
"tableName": "
|
|
1815
|
+
"tableName": "_smrt_data_surface_action_idempotency",
|
|
1961
1816
|
"api": false,
|
|
1962
1817
|
"cli": false,
|
|
1963
|
-
"mcp": false
|
|
1964
|
-
"tenantScoped": {
|
|
1965
|
-
"mode": "optional"
|
|
1966
|
-
},
|
|
1967
|
-
"conflictColumns": [
|
|
1968
|
-
"tenant_id",
|
|
1969
|
-
"slug",
|
|
1970
|
-
"context"
|
|
1971
|
-
]
|
|
1818
|
+
"mcp": false
|
|
1972
1819
|
},
|
|
1973
|
-
"extends": "SmrtObject",
|
|
1974
|
-
"exportName": "
|
|
1975
|
-
"collectionExportName": "
|
|
1820
|
+
"extends": "SmrtObject",
|
|
1821
|
+
"exportName": "DataSurfaceActionIdempotencyState",
|
|
1822
|
+
"collectionExportName": "DataSurfaceActionIdempotencyStateCollection",
|
|
1976
1823
|
"validationRules": [
|
|
1977
1824
|
{
|
|
1978
|
-
"field": "
|
|
1825
|
+
"field": "keyHash",
|
|
1979
1826
|
"rule": "required",
|
|
1980
|
-
"fieldType": "
|
|
1827
|
+
"fieldType": "text"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"field": "status",
|
|
1831
|
+
"rule": "required",
|
|
1832
|
+
"fieldType": "text"
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
"field": "requestFingerprint",
|
|
1836
|
+
"rule": "required",
|
|
1837
|
+
"fieldType": "text"
|
|
1981
1838
|
}
|
|
1982
1839
|
],
|
|
1983
1840
|
"schema": {
|
|
1984
|
-
"tableName": "
|
|
1985
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1841
|
+
"tableName": "_smrt_data_surface_action_idempotency",
|
|
1842
|
+
"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);",
|
|
1986
1843
|
"columns": {
|
|
1987
1844
|
"id": {
|
|
1988
1845
|
"type": "UUID",
|
|
@@ -2009,97 +1866,158 @@
|
|
|
2009
1866
|
"notNull": true,
|
|
2010
1867
|
"default": "current_timestamp"
|
|
2011
1868
|
},
|
|
2012
|
-
"
|
|
2013
|
-
"type": "
|
|
2014
|
-
"
|
|
1869
|
+
"key_hash": {
|
|
1870
|
+
"type": "TEXT",
|
|
1871
|
+
"notNull": true,
|
|
1872
|
+
"unique": true
|
|
1873
|
+
},
|
|
1874
|
+
"status": {
|
|
1875
|
+
"type": "TEXT",
|
|
1876
|
+
"notNull": true,
|
|
1877
|
+
"unique": false
|
|
1878
|
+
},
|
|
1879
|
+
"request_fingerprint": {
|
|
1880
|
+
"type": "TEXT",
|
|
1881
|
+
"notNull": true,
|
|
1882
|
+
"unique": false
|
|
1883
|
+
},
|
|
1884
|
+
"owner_hash": {
|
|
1885
|
+
"type": "TEXT",
|
|
2015
1886
|
"notNull": false,
|
|
2016
1887
|
"unique": false
|
|
2017
1888
|
},
|
|
2018
|
-
"
|
|
1889
|
+
"reserved_at": {
|
|
1890
|
+
"type": "TEXT",
|
|
1891
|
+
"notNull": false,
|
|
1892
|
+
"unique": false
|
|
1893
|
+
},
|
|
1894
|
+
"result": {
|
|
2019
1895
|
"type": "JSON",
|
|
2020
|
-
"notNull":
|
|
1896
|
+
"notNull": false,
|
|
1897
|
+
"unique": false
|
|
1898
|
+
},
|
|
1899
|
+
"recovery": {
|
|
1900
|
+
"type": "JSON",
|
|
1901
|
+
"notNull": false,
|
|
2021
1902
|
"unique": false
|
|
2022
1903
|
}
|
|
2023
1904
|
},
|
|
2024
1905
|
"indexes": [
|
|
2025
1906
|
{
|
|
2026
|
-
"name": "
|
|
1907
|
+
"name": "_smrt_data_surface_action_idempotency_slug_context_idx",
|
|
2027
1908
|
"columns": [
|
|
2028
|
-
"tenant_id",
|
|
2029
1909
|
"slug",
|
|
2030
1910
|
"context"
|
|
2031
1911
|
],
|
|
2032
|
-
"unique": true
|
|
2033
|
-
"nullsNotDistinct": true
|
|
1912
|
+
"unique": true
|
|
2034
1913
|
},
|
|
2035
1914
|
{
|
|
2036
|
-
"name": "
|
|
1915
|
+
"name": "_smrt_data_surface_action_idempotency_created_at_idx",
|
|
2037
1916
|
"columns": [
|
|
2038
|
-
"tenant_id",
|
|
2039
1917
|
"created_at"
|
|
2040
1918
|
]
|
|
2041
1919
|
}
|
|
2042
1920
|
],
|
|
2043
|
-
"version": "
|
|
1921
|
+
"version": "eb65ff1e"
|
|
2044
1922
|
},
|
|
2045
1923
|
"importPath": "@happyvertical/smrt-agents/server"
|
|
2046
1924
|
},
|
|
2047
|
-
"@happyvertical/smrt-agents:
|
|
2048
|
-
"name": "
|
|
2049
|
-
"className": "
|
|
2050
|
-
"qualifiedName": "@happyvertical/smrt-agents:
|
|
2051
|
-
"collection": "
|
|
2052
|
-
"
|
|
1925
|
+
"@happyvertical/smrt-agents:TenantAgent": {
|
|
1926
|
+
"name": "tenantagent",
|
|
1927
|
+
"className": "TenantAgent",
|
|
1928
|
+
"qualifiedName": "@happyvertical/smrt-agents:TenantAgent",
|
|
1929
|
+
"collection": "tenantagents",
|
|
1930
|
+
"description": "TenantAgent SmrtObject — junction between tenants and agents",
|
|
1931
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/tenant-agent.ts",
|
|
2053
1932
|
"packageName": "@happyvertical/smrt-agents",
|
|
2054
1933
|
"fields": {
|
|
2055
|
-
"
|
|
1934
|
+
"tenantId": {
|
|
2056
1935
|
"type": "text",
|
|
2057
1936
|
"required": true,
|
|
2058
1937
|
"_meta": {
|
|
2059
|
-
"
|
|
2060
|
-
"
|
|
1938
|
+
"sqlType": "UUID",
|
|
1939
|
+
"__tenancy": {
|
|
1940
|
+
"isTenantIdField": true,
|
|
1941
|
+
"autoFilter": true,
|
|
1942
|
+
"required": true,
|
|
1943
|
+
"autoPopulate": true,
|
|
1944
|
+
"nullable": false,
|
|
1945
|
+
"mode": "required",
|
|
1946
|
+
"field": "tenantId",
|
|
1947
|
+
"allowSuperAdminBypass": false
|
|
1948
|
+
}
|
|
2061
1949
|
}
|
|
2062
1950
|
},
|
|
2063
|
-
"
|
|
2064
|
-
"type": "
|
|
2065
|
-
"required":
|
|
2066
|
-
"_meta": {
|
|
2067
|
-
"required": true
|
|
2068
|
-
}
|
|
1951
|
+
"agentClass": {
|
|
1952
|
+
"type": "text",
|
|
1953
|
+
"required": false,
|
|
1954
|
+
"_meta": {}
|
|
2069
1955
|
},
|
|
2070
|
-
"
|
|
1956
|
+
"status": {
|
|
2071
1957
|
"type": "text",
|
|
2072
1958
|
"required": false,
|
|
1959
|
+
"_meta": {},
|
|
1960
|
+
"enum": [
|
|
1961
|
+
"active",
|
|
1962
|
+
"disabled"
|
|
1963
|
+
]
|
|
1964
|
+
},
|
|
1965
|
+
"permissions": {
|
|
1966
|
+
"type": "json",
|
|
1967
|
+
"required": false,
|
|
2073
1968
|
"_meta": {
|
|
2074
1969
|
"nullable": true
|
|
2075
1970
|
}
|
|
1971
|
+
},
|
|
1972
|
+
"config": {
|
|
1973
|
+
"type": "json",
|
|
1974
|
+
"required": false,
|
|
1975
|
+
"_meta": {
|
|
1976
|
+
"nullable": true,
|
|
1977
|
+
"sensitive": true
|
|
1978
|
+
},
|
|
1979
|
+
"sensitive": true
|
|
2076
1980
|
}
|
|
2077
1981
|
},
|
|
2078
1982
|
"methods": {},
|
|
2079
1983
|
"decoratorConfig": {
|
|
2080
|
-
"tableName": "
|
|
2081
|
-
"api":
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
{
|
|
2090
|
-
"field": "tokenHash",
|
|
2091
|
-
"rule": "required",
|
|
2092
|
-
"fieldType": "text"
|
|
1984
|
+
"tableName": "tenant_agents",
|
|
1985
|
+
"api": {
|
|
1986
|
+
"include": [
|
|
1987
|
+
"list",
|
|
1988
|
+
"get",
|
|
1989
|
+
"create",
|
|
1990
|
+
"update",
|
|
1991
|
+
"delete"
|
|
1992
|
+
]
|
|
2093
1993
|
},
|
|
2094
|
-
{
|
|
2095
|
-
"
|
|
2096
|
-
|
|
2097
|
-
|
|
1994
|
+
"cli": {
|
|
1995
|
+
"include": [
|
|
1996
|
+
"list",
|
|
1997
|
+
"get"
|
|
1998
|
+
]
|
|
1999
|
+
},
|
|
2000
|
+
"mcp": {
|
|
2001
|
+
"include": [
|
|
2002
|
+
"list",
|
|
2003
|
+
"get"
|
|
2004
|
+
]
|
|
2005
|
+
},
|
|
2006
|
+
"conflictColumns": [
|
|
2007
|
+
"tenant_id",
|
|
2008
|
+
"agent_class"
|
|
2009
|
+
],
|
|
2010
|
+
"tenantScoped": {
|
|
2011
|
+
"mode": "required"
|
|
2098
2012
|
}
|
|
2099
|
-
|
|
2013
|
+
},
|
|
2014
|
+
"extends": "SmrtObject",
|
|
2015
|
+
"exportName": "TenantAgent",
|
|
2016
|
+
"collectionExportName": "TenantAgentCollection",
|
|
2017
|
+
"validationRules": [],
|
|
2100
2018
|
"schema": {
|
|
2101
|
-
"tableName": "
|
|
2102
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
2019
|
+
"tableName": "tenant_agents",
|
|
2020
|
+
"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);",
|
|
2103
2021
|
"columns": {
|
|
2104
2022
|
"id": {
|
|
2105
2023
|
"type": "UUID",
|
|
@@ -2126,135 +2044,234 @@
|
|
|
2126
2044
|
"notNull": true,
|
|
2127
2045
|
"default": "current_timestamp"
|
|
2128
2046
|
},
|
|
2129
|
-
"
|
|
2130
|
-
"type": "
|
|
2047
|
+
"tenant_id": {
|
|
2048
|
+
"type": "UUID",
|
|
2049
|
+
"referenceKind": "tenantId",
|
|
2131
2050
|
"notNull": true,
|
|
2132
|
-
"unique":
|
|
2051
|
+
"unique": false
|
|
2133
2052
|
},
|
|
2134
|
-
"
|
|
2135
|
-
"type": "
|
|
2136
|
-
"notNull":
|
|
2053
|
+
"agent_class": {
|
|
2054
|
+
"type": "TEXT",
|
|
2055
|
+
"notNull": false,
|
|
2137
2056
|
"unique": false
|
|
2138
2057
|
},
|
|
2139
|
-
"
|
|
2058
|
+
"status": {
|
|
2140
2059
|
"type": "TEXT",
|
|
2141
2060
|
"notNull": false,
|
|
2142
2061
|
"unique": false
|
|
2062
|
+
},
|
|
2063
|
+
"permissions": {
|
|
2064
|
+
"type": "JSON",
|
|
2065
|
+
"notNull": false,
|
|
2066
|
+
"unique": false
|
|
2067
|
+
},
|
|
2068
|
+
"config": {
|
|
2069
|
+
"type": "JSON",
|
|
2070
|
+
"notNull": false,
|
|
2071
|
+
"unique": false
|
|
2143
2072
|
}
|
|
2144
2073
|
},
|
|
2145
2074
|
"indexes": [
|
|
2146
2075
|
{
|
|
2147
|
-
"name": "
|
|
2076
|
+
"name": "tenant_agents_tenant_id_agent_class_idx",
|
|
2148
2077
|
"columns": [
|
|
2149
|
-
"
|
|
2150
|
-
"
|
|
2078
|
+
"tenant_id",
|
|
2079
|
+
"agent_class"
|
|
2151
2080
|
],
|
|
2152
|
-
"unique": true
|
|
2081
|
+
"unique": true,
|
|
2082
|
+
"nullsNotDistinct": true
|
|
2153
2083
|
},
|
|
2154
2084
|
{
|
|
2155
|
-
"name": "
|
|
2085
|
+
"name": "tenant_agents_slug_context_idx",
|
|
2156
2086
|
"columns": [
|
|
2157
|
-
"
|
|
2087
|
+
"slug",
|
|
2088
|
+
"context"
|
|
2158
2089
|
]
|
|
2159
|
-
}
|
|
2160
|
-
],
|
|
2161
|
-
"version": "497cf260"
|
|
2162
|
-
},
|
|
2163
|
-
"importPath": "@happyvertical/smrt-agents/server"
|
|
2164
|
-
},
|
|
2165
|
-
"@happyvertical/smrt-agents:DataSurfaceActionIdempotencyState": {
|
|
2166
|
-
"name": "datasurfaceactionidempotencystate",
|
|
2167
|
-
"className": "DataSurfaceActionIdempotencyState",
|
|
2168
|
-
"qualifiedName": "@happyvertical/smrt-agents:DataSurfaceActionIdempotencyState",
|
|
2169
|
-
"collection": "datasurfaceactionidempotencystates",
|
|
2170
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/server/sql-data-surface-action-state.ts",
|
|
2171
|
-
"packageName": "@happyvertical/smrt-agents",
|
|
2172
|
-
"fields": {
|
|
2173
|
-
"keyHash": {
|
|
2174
|
-
"type": "text",
|
|
2175
|
-
"required": true,
|
|
2176
|
-
"_meta": {
|
|
2177
|
-
"required": true,
|
|
2178
|
-
"unique": true
|
|
2179
|
-
}
|
|
2180
|
-
},
|
|
2181
|
-
"status": {
|
|
2182
|
-
"type": "text",
|
|
2183
|
-
"required": true,
|
|
2184
|
-
"_meta": {
|
|
2185
|
-
"required": true
|
|
2186
2090
|
},
|
|
2187
|
-
|
|
2188
|
-
"
|
|
2189
|
-
"
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
"type": "text",
|
|
2194
|
-
"required": true,
|
|
2195
|
-
"_meta": {
|
|
2196
|
-
"required": true
|
|
2091
|
+
{
|
|
2092
|
+
"name": "tenant_agents_tenant_id_created_at_idx",
|
|
2093
|
+
"columns": [
|
|
2094
|
+
"tenant_id",
|
|
2095
|
+
"created_at"
|
|
2096
|
+
]
|
|
2197
2097
|
}
|
|
2098
|
+
],
|
|
2099
|
+
"version": "9892a054"
|
|
2100
|
+
},
|
|
2101
|
+
"importPath": "@happyvertical/smrt-agents"
|
|
2102
|
+
},
|
|
2103
|
+
"@happyvertical/smrt-agents:TenantAgentCollection": {
|
|
2104
|
+
"name": "tenantagentcollection",
|
|
2105
|
+
"className": "TenantAgentCollection",
|
|
2106
|
+
"qualifiedName": "@happyvertical/smrt-agents:TenantAgentCollection",
|
|
2107
|
+
"collection": "tenantagents",
|
|
2108
|
+
"description": "Collection for managing tenant-agent bindings",
|
|
2109
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/agents/src/tenant-agent.ts",
|
|
2110
|
+
"packageName": "@happyvertical/smrt-agents",
|
|
2111
|
+
"fields": {},
|
|
2112
|
+
"methods": {
|
|
2113
|
+
"resolveForTenant": {
|
|
2114
|
+
"name": "resolveForTenant",
|
|
2115
|
+
"async": true,
|
|
2116
|
+
"parameters": [
|
|
2117
|
+
{
|
|
2118
|
+
"name": "tenantId",
|
|
2119
|
+
"type": "string",
|
|
2120
|
+
"optional": false
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
"name": "getAncestorIds",
|
|
2124
|
+
"type": "Function",
|
|
2125
|
+
"optional": false
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"name": "manifests",
|
|
2129
|
+
"type": "Map<string, AgentManifestInfo>",
|
|
2130
|
+
"optional": true
|
|
2131
|
+
}
|
|
2132
|
+
],
|
|
2133
|
+
"returnType": "Promise<ResolvedAgentAvailability[]>",
|
|
2134
|
+
"isStatic": false,
|
|
2135
|
+
"isPublic": true
|
|
2198
2136
|
},
|
|
2199
|
-
"
|
|
2200
|
-
"
|
|
2201
|
-
"
|
|
2202
|
-
"
|
|
2203
|
-
|
|
2204
|
-
|
|
2137
|
+
"enableAgent": {
|
|
2138
|
+
"name": "enableAgent",
|
|
2139
|
+
"async": true,
|
|
2140
|
+
"parameters": [
|
|
2141
|
+
{
|
|
2142
|
+
"name": "tenantId",
|
|
2143
|
+
"type": "string",
|
|
2144
|
+
"optional": false
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
"name": "agentClass",
|
|
2148
|
+
"type": "string",
|
|
2149
|
+
"optional": false
|
|
2150
|
+
}
|
|
2151
|
+
],
|
|
2152
|
+
"returnType": "Promise<TenantAgent>",
|
|
2153
|
+
"isStatic": false,
|
|
2154
|
+
"isPublic": true
|
|
2205
2155
|
},
|
|
2206
|
-
"
|
|
2207
|
-
"
|
|
2208
|
-
"
|
|
2209
|
-
"
|
|
2210
|
-
|
|
2211
|
-
|
|
2156
|
+
"disableAgent": {
|
|
2157
|
+
"name": "disableAgent",
|
|
2158
|
+
"async": true,
|
|
2159
|
+
"parameters": [
|
|
2160
|
+
{
|
|
2161
|
+
"name": "tenantId",
|
|
2162
|
+
"type": "string",
|
|
2163
|
+
"optional": false
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
"name": "agentClass",
|
|
2167
|
+
"type": "string",
|
|
2168
|
+
"optional": false
|
|
2169
|
+
}
|
|
2170
|
+
],
|
|
2171
|
+
"returnType": "Promise<TenantAgent>",
|
|
2172
|
+
"isStatic": false,
|
|
2173
|
+
"isPublic": true
|
|
2212
2174
|
},
|
|
2213
|
-
"
|
|
2214
|
-
"
|
|
2215
|
-
"
|
|
2216
|
-
"
|
|
2217
|
-
|
|
2218
|
-
|
|
2175
|
+
"clearOverride": {
|
|
2176
|
+
"name": "clearOverride",
|
|
2177
|
+
"async": true,
|
|
2178
|
+
"parameters": [
|
|
2179
|
+
{
|
|
2180
|
+
"name": "tenantId",
|
|
2181
|
+
"type": "string",
|
|
2182
|
+
"optional": false
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
"name": "agentClass",
|
|
2186
|
+
"type": "string",
|
|
2187
|
+
"optional": false
|
|
2188
|
+
}
|
|
2189
|
+
],
|
|
2190
|
+
"returnType": "Promise<void>",
|
|
2191
|
+
"isStatic": false,
|
|
2192
|
+
"isPublic": true
|
|
2219
2193
|
},
|
|
2220
|
-
"
|
|
2221
|
-
"
|
|
2222
|
-
"
|
|
2223
|
-
"
|
|
2224
|
-
|
|
2225
|
-
|
|
2194
|
+
"setPermissions": {
|
|
2195
|
+
"name": "setPermissions",
|
|
2196
|
+
"async": true,
|
|
2197
|
+
"parameters": [
|
|
2198
|
+
{
|
|
2199
|
+
"name": "tenantId",
|
|
2200
|
+
"type": "string",
|
|
2201
|
+
"optional": false
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
"name": "agentClass",
|
|
2205
|
+
"type": "string",
|
|
2206
|
+
"optional": false
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"name": "permissions",
|
|
2210
|
+
"type": "Record<string, boolean>",
|
|
2211
|
+
"optional": false
|
|
2212
|
+
}
|
|
2213
|
+
],
|
|
2214
|
+
"returnType": "Promise<TenantAgent>",
|
|
2215
|
+
"isStatic": false,
|
|
2216
|
+
"isPublic": true
|
|
2217
|
+
},
|
|
2218
|
+
"findByTenantAndClass": {
|
|
2219
|
+
"name": "findByTenantAndClass",
|
|
2220
|
+
"async": true,
|
|
2221
|
+
"parameters": [
|
|
2222
|
+
{
|
|
2223
|
+
"name": "tenantId",
|
|
2224
|
+
"type": "string",
|
|
2225
|
+
"optional": false
|
|
2226
|
+
},
|
|
2227
|
+
{
|
|
2228
|
+
"name": "agentClass",
|
|
2229
|
+
"type": "string",
|
|
2230
|
+
"optional": false
|
|
2231
|
+
}
|
|
2232
|
+
],
|
|
2233
|
+
"returnType": "Promise<TenantAgent | null>",
|
|
2234
|
+
"isStatic": false,
|
|
2235
|
+
"isPublic": true
|
|
2226
2236
|
}
|
|
2227
2237
|
},
|
|
2228
|
-
"methods": {},
|
|
2229
2238
|
"decoratorConfig": {
|
|
2230
|
-
"tableName": "
|
|
2231
|
-
"api":
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
{
|
|
2240
|
-
"field": "keyHash",
|
|
2241
|
-
"rule": "required",
|
|
2242
|
-
"fieldType": "text"
|
|
2239
|
+
"tableName": "tenant_agents",
|
|
2240
|
+
"api": {
|
|
2241
|
+
"include": [
|
|
2242
|
+
"list",
|
|
2243
|
+
"get",
|
|
2244
|
+
"create",
|
|
2245
|
+
"update",
|
|
2246
|
+
"delete"
|
|
2247
|
+
]
|
|
2243
2248
|
},
|
|
2244
|
-
{
|
|
2245
|
-
"
|
|
2246
|
-
|
|
2247
|
-
|
|
2249
|
+
"mcp": {
|
|
2250
|
+
"include": [
|
|
2251
|
+
"list",
|
|
2252
|
+
"get"
|
|
2253
|
+
]
|
|
2248
2254
|
},
|
|
2249
|
-
{
|
|
2250
|
-
"
|
|
2251
|
-
|
|
2252
|
-
|
|
2255
|
+
"cli": {
|
|
2256
|
+
"include": [
|
|
2257
|
+
"list",
|
|
2258
|
+
"get"
|
|
2259
|
+
]
|
|
2253
2260
|
}
|
|
2261
|
+
},
|
|
2262
|
+
"extends": "SmrtCollection",
|
|
2263
|
+
"extendsTypeArg": "TenantAgent",
|
|
2264
|
+
"exportName": "TenantAgentCollection",
|
|
2265
|
+
"collectionExportName": "TenantAgentCollectionCollection",
|
|
2266
|
+
"collectionOf": "@happyvertical/smrt-agents:TenantAgent",
|
|
2267
|
+
"inheritedExposure": [
|
|
2268
|
+
"api",
|
|
2269
|
+
"mcp",
|
|
2270
|
+
"cli"
|
|
2254
2271
|
],
|
|
2255
2272
|
"schema": {
|
|
2256
|
-
"tableName": "
|
|
2257
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
2273
|
+
"tableName": "tenant_agents",
|
|
2274
|
+
"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);",
|
|
2258
2275
|
"columns": {
|
|
2259
2276
|
"id": {
|
|
2260
2277
|
"type": "UUID",
|
|
@@ -2281,37 +2298,28 @@
|
|
|
2281
2298
|
"notNull": true,
|
|
2282
2299
|
"default": "current_timestamp"
|
|
2283
2300
|
},
|
|
2284
|
-
"
|
|
2285
|
-
"type": "
|
|
2286
|
-
"
|
|
2287
|
-
"unique": true
|
|
2288
|
-
},
|
|
2289
|
-
"status": {
|
|
2290
|
-
"type": "TEXT",
|
|
2291
|
-
"notNull": true,
|
|
2292
|
-
"unique": false
|
|
2293
|
-
},
|
|
2294
|
-
"request_fingerprint": {
|
|
2295
|
-
"type": "TEXT",
|
|
2301
|
+
"tenant_id": {
|
|
2302
|
+
"type": "UUID",
|
|
2303
|
+
"referenceKind": "tenantId",
|
|
2296
2304
|
"notNull": true,
|
|
2297
2305
|
"unique": false
|
|
2298
2306
|
},
|
|
2299
|
-
"
|
|
2307
|
+
"agent_class": {
|
|
2300
2308
|
"type": "TEXT",
|
|
2301
2309
|
"notNull": false,
|
|
2302
2310
|
"unique": false
|
|
2303
2311
|
},
|
|
2304
|
-
"
|
|
2312
|
+
"status": {
|
|
2305
2313
|
"type": "TEXT",
|
|
2306
2314
|
"notNull": false,
|
|
2307
2315
|
"unique": false
|
|
2308
2316
|
},
|
|
2309
|
-
"
|
|
2317
|
+
"permissions": {
|
|
2310
2318
|
"type": "JSON",
|
|
2311
2319
|
"notNull": false,
|
|
2312
2320
|
"unique": false
|
|
2313
2321
|
},
|
|
2314
|
-
"
|
|
2322
|
+
"config": {
|
|
2315
2323
|
"type": "JSON",
|
|
2316
2324
|
"notNull": false,
|
|
2317
2325
|
"unique": false
|
|
@@ -2319,23 +2327,32 @@
|
|
|
2319
2327
|
},
|
|
2320
2328
|
"indexes": [
|
|
2321
2329
|
{
|
|
2322
|
-
"name": "
|
|
2330
|
+
"name": "tenant_agents_tenant_id_agent_class_idx",
|
|
2331
|
+
"columns": [
|
|
2332
|
+
"tenant_id",
|
|
2333
|
+
"agent_class"
|
|
2334
|
+
],
|
|
2335
|
+
"unique": true,
|
|
2336
|
+
"nullsNotDistinct": true
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
"name": "tenant_agents_slug_context_idx",
|
|
2323
2340
|
"columns": [
|
|
2324
2341
|
"slug",
|
|
2325
2342
|
"context"
|
|
2326
|
-
]
|
|
2327
|
-
"unique": true
|
|
2343
|
+
]
|
|
2328
2344
|
},
|
|
2329
2345
|
{
|
|
2330
|
-
"name": "
|
|
2346
|
+
"name": "tenant_agents_tenant_id_created_at_idx",
|
|
2331
2347
|
"columns": [
|
|
2348
|
+
"tenant_id",
|
|
2332
2349
|
"created_at"
|
|
2333
2350
|
]
|
|
2334
2351
|
}
|
|
2335
2352
|
],
|
|
2336
|
-
"version": "
|
|
2353
|
+
"version": "9892a054"
|
|
2337
2354
|
},
|
|
2338
|
-
"importPath": "@happyvertical/smrt-agents
|
|
2355
|
+
"importPath": "@happyvertical/smrt-agents"
|
|
2339
2356
|
}
|
|
2340
2357
|
},
|
|
2341
2358
|
"moduleType": "smrt",
|