@happyvertical/smrt-jobs 0.60.13 → 0.60.15
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 +13 -6
- package/README.md +68 -0
- package/dist/chunks/{runner-CH-xLt22.js → runner-DucZ0Lvj.js} +306 -22
- package/dist/chunks/runner-DucZ0Lvj.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +306 -153
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +244 -12
- package/dist/runner.d.ts +6 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +1 -1
- package/dist/schedule-admission.d.ts +44 -0
- package/dist/schedule-admission.d.ts.map +1 -0
- package/dist/schedule-runner.d.ts +30 -15
- package/dist/schedule-runner.d.ts.map +1 -1
- package/dist/smrt-job-dedupe-slot.d.ts +19 -0
- package/dist/smrt-job-dedupe-slot.d.ts.map +1 -0
- package/dist/smrt-job.d.ts +31 -6
- package/dist/smrt-job.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +73 -7
- package/dist/smrt-knowledge.okf.md +8 -2
- package/package.json +7 -7
- package/dist/chunks/runner-CH-xLt22.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-jobs",
|
|
5
|
-
"packageVersion": "0.60.
|
|
5
|
+
"packageVersion": "0.60.15",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-jobs:ForgeDelivery": {
|
|
8
8
|
"name": "forgedelivery",
|
|
@@ -875,6 +875,206 @@
|
|
|
875
875
|
},
|
|
876
876
|
"importPath": "@happyvertical/smrt-jobs"
|
|
877
877
|
},
|
|
878
|
+
"@happyvertical/smrt-jobs:SmrtJobDedupeSlot": {
|
|
879
|
+
"name": "smrtjobdedupeslot",
|
|
880
|
+
"className": "SmrtJobDedupeSlot",
|
|
881
|
+
"qualifiedName": "@happyvertical/smrt-jobs:SmrtJobDedupeSlot",
|
|
882
|
+
"collection": "smrtjobdedupeslots",
|
|
883
|
+
"description": "Store-owned serialization row for a tenant-partitioned job deduplication key.",
|
|
884
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/jobs/src/smrt-job-dedupe-slot.ts",
|
|
885
|
+
"packageName": "@happyvertical/smrt-jobs",
|
|
886
|
+
"fields": {
|
|
887
|
+
"slotKey": {
|
|
888
|
+
"type": "text",
|
|
889
|
+
"required": true,
|
|
890
|
+
"_meta": {
|
|
891
|
+
"required": true,
|
|
892
|
+
"unique": true
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"jobId": {
|
|
896
|
+
"type": "text",
|
|
897
|
+
"required": false,
|
|
898
|
+
"_meta": {
|
|
899
|
+
"nullable": true
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"methods": {},
|
|
904
|
+
"decoratorConfig": {
|
|
905
|
+
"tableName": "_smrt_job_dedupe_slots",
|
|
906
|
+
"api": false,
|
|
907
|
+
"cli": false,
|
|
908
|
+
"mcp": false
|
|
909
|
+
},
|
|
910
|
+
"extends": "SmrtObject",
|
|
911
|
+
"exportName": "SmrtJobDedupeSlot",
|
|
912
|
+
"collectionExportName": "SmrtJobDedupeSlotCollection",
|
|
913
|
+
"validationRules": [
|
|
914
|
+
{
|
|
915
|
+
"field": "slotKey",
|
|
916
|
+
"rule": "required",
|
|
917
|
+
"fieldType": "text"
|
|
918
|
+
}
|
|
919
|
+
],
|
|
920
|
+
"schema": {
|
|
921
|
+
"tableName": "_smrt_job_dedupe_slots",
|
|
922
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_job_dedupe_slots\" (\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 \"slot_key\" TEXT NOT NULL UNIQUE,\n \"job_id\" TEXT\n);",
|
|
923
|
+
"columns": {
|
|
924
|
+
"_sync_origin_device_id": {
|
|
925
|
+
"type": "TEXT"
|
|
926
|
+
},
|
|
927
|
+
"_sync_revision": {
|
|
928
|
+
"type": "INTEGER"
|
|
929
|
+
},
|
|
930
|
+
"id": {
|
|
931
|
+
"type": "UUID",
|
|
932
|
+
"primaryKey": true,
|
|
933
|
+
"referenceKind": "id",
|
|
934
|
+
"notNull": true
|
|
935
|
+
},
|
|
936
|
+
"slug": {
|
|
937
|
+
"type": "TEXT",
|
|
938
|
+
"notNull": true
|
|
939
|
+
},
|
|
940
|
+
"context": {
|
|
941
|
+
"type": "TEXT",
|
|
942
|
+
"notNull": true,
|
|
943
|
+
"default": ""
|
|
944
|
+
},
|
|
945
|
+
"created_at": {
|
|
946
|
+
"type": "TIMESTAMP",
|
|
947
|
+
"notNull": true,
|
|
948
|
+
"default": "current_timestamp"
|
|
949
|
+
},
|
|
950
|
+
"updated_at": {
|
|
951
|
+
"type": "TIMESTAMP",
|
|
952
|
+
"notNull": true,
|
|
953
|
+
"default": "current_timestamp"
|
|
954
|
+
},
|
|
955
|
+
"slot_key": {
|
|
956
|
+
"type": "TEXT",
|
|
957
|
+
"notNull": true,
|
|
958
|
+
"unique": true
|
|
959
|
+
},
|
|
960
|
+
"job_id": {
|
|
961
|
+
"type": "TEXT",
|
|
962
|
+
"notNull": false,
|
|
963
|
+
"unique": false
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"indexes": [
|
|
967
|
+
{
|
|
968
|
+
"name": "_smrt_job_dedupe_slots_slug_context_idx",
|
|
969
|
+
"columns": [
|
|
970
|
+
"slug",
|
|
971
|
+
"context"
|
|
972
|
+
],
|
|
973
|
+
"unique": true
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"name": "_smrt_job_dedupe_slots_created_at_idx",
|
|
977
|
+
"columns": [
|
|
978
|
+
"created_at"
|
|
979
|
+
]
|
|
980
|
+
}
|
|
981
|
+
],
|
|
982
|
+
"version": "f876c2d7"
|
|
983
|
+
},
|
|
984
|
+
"importPath": "@happyvertical/smrt-jobs"
|
|
985
|
+
},
|
|
986
|
+
"@happyvertical/smrt-jobs:SmrtJobDedupeSlotCollection": {
|
|
987
|
+
"name": "smrtjobdedupeslotcollection",
|
|
988
|
+
"className": "SmrtJobDedupeSlotCollection",
|
|
989
|
+
"qualifiedName": "@happyvertical/smrt-jobs:SmrtJobDedupeSlotCollection",
|
|
990
|
+
"collection": "smrtjobdedupeslots",
|
|
991
|
+
"description": "Internal collection for provisioning the registered store-owned model.",
|
|
992
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/jobs/src/smrt-job-dedupe-slot.ts",
|
|
993
|
+
"packageName": "@happyvertical/smrt-jobs",
|
|
994
|
+
"fields": {},
|
|
995
|
+
"methods": {},
|
|
996
|
+
"decoratorConfig": {
|
|
997
|
+
"tableName": "_smrt_job_dedupe_slots",
|
|
998
|
+
"api": false,
|
|
999
|
+
"mcp": false,
|
|
1000
|
+
"cli": false
|
|
1001
|
+
},
|
|
1002
|
+
"extends": "SmrtCollection",
|
|
1003
|
+
"extendsTypeArg": "SmrtJobDedupeSlot",
|
|
1004
|
+
"exportName": "SmrtJobDedupeSlotCollection",
|
|
1005
|
+
"collectionExportName": "SmrtJobDedupeSlotCollectionCollection",
|
|
1006
|
+
"collectionOf": "@happyvertical/smrt-jobs:SmrtJobDedupeSlot",
|
|
1007
|
+
"inheritedExposure": [
|
|
1008
|
+
"api",
|
|
1009
|
+
"mcp",
|
|
1010
|
+
"cli"
|
|
1011
|
+
],
|
|
1012
|
+
"schema": {
|
|
1013
|
+
"tableName": "_smrt_job_dedupe_slots",
|
|
1014
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_job_dedupe_slots\" (\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 \"slot_key\" TEXT NOT NULL UNIQUE,\n \"job_id\" TEXT\n);",
|
|
1015
|
+
"columns": {
|
|
1016
|
+
"_sync_origin_device_id": {
|
|
1017
|
+
"type": "TEXT"
|
|
1018
|
+
},
|
|
1019
|
+
"_sync_revision": {
|
|
1020
|
+
"type": "INTEGER"
|
|
1021
|
+
},
|
|
1022
|
+
"id": {
|
|
1023
|
+
"type": "UUID",
|
|
1024
|
+
"primaryKey": true,
|
|
1025
|
+
"referenceKind": "id",
|
|
1026
|
+
"notNull": true
|
|
1027
|
+
},
|
|
1028
|
+
"slug": {
|
|
1029
|
+
"type": "TEXT",
|
|
1030
|
+
"notNull": true
|
|
1031
|
+
},
|
|
1032
|
+
"context": {
|
|
1033
|
+
"type": "TEXT",
|
|
1034
|
+
"notNull": true,
|
|
1035
|
+
"default": ""
|
|
1036
|
+
},
|
|
1037
|
+
"created_at": {
|
|
1038
|
+
"type": "TIMESTAMP",
|
|
1039
|
+
"notNull": true,
|
|
1040
|
+
"default": "current_timestamp"
|
|
1041
|
+
},
|
|
1042
|
+
"updated_at": {
|
|
1043
|
+
"type": "TIMESTAMP",
|
|
1044
|
+
"notNull": true,
|
|
1045
|
+
"default": "current_timestamp"
|
|
1046
|
+
},
|
|
1047
|
+
"slot_key": {
|
|
1048
|
+
"type": "TEXT",
|
|
1049
|
+
"notNull": true,
|
|
1050
|
+
"unique": true
|
|
1051
|
+
},
|
|
1052
|
+
"job_id": {
|
|
1053
|
+
"type": "TEXT",
|
|
1054
|
+
"notNull": false,
|
|
1055
|
+
"unique": false
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"indexes": [
|
|
1059
|
+
{
|
|
1060
|
+
"name": "_smrt_job_dedupe_slots_slug_context_idx",
|
|
1061
|
+
"columns": [
|
|
1062
|
+
"slug",
|
|
1063
|
+
"context"
|
|
1064
|
+
],
|
|
1065
|
+
"unique": true
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"name": "_smrt_job_dedupe_slots_created_at_idx",
|
|
1069
|
+
"columns": [
|
|
1070
|
+
"created_at"
|
|
1071
|
+
]
|
|
1072
|
+
}
|
|
1073
|
+
],
|
|
1074
|
+
"version": "f876c2d7"
|
|
1075
|
+
},
|
|
1076
|
+
"importPath": "@happyvertical/smrt-jobs"
|
|
1077
|
+
},
|
|
878
1078
|
"@happyvertical/smrt-jobs:SmrtJobEvent": {
|
|
879
1079
|
"name": "smrtjobevent",
|
|
880
1080
|
"className": "SmrtJobEvent",
|
|
@@ -1420,6 +1620,14 @@
|
|
|
1420
1620
|
}
|
|
1421
1621
|
}
|
|
1422
1622
|
},
|
|
1623
|
+
"dedupeKey": {
|
|
1624
|
+
"type": "text",
|
|
1625
|
+
"required": false,
|
|
1626
|
+
"_meta": {
|
|
1627
|
+
"nullable": true,
|
|
1628
|
+
"indexed": true
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1423
1631
|
"queue": {
|
|
1424
1632
|
"type": "text",
|
|
1425
1633
|
"required": true,
|
|
@@ -1633,7 +1841,13 @@
|
|
|
1633
1841
|
"retry": {
|
|
1634
1842
|
"name": "retry",
|
|
1635
1843
|
"async": true,
|
|
1636
|
-
"parameters": [
|
|
1844
|
+
"parameters": [
|
|
1845
|
+
{
|
|
1846
|
+
"name": "options",
|
|
1847
|
+
"type": "Pick<EnqueueJobOptions, 'transaction'>",
|
|
1848
|
+
"optional": true
|
|
1849
|
+
}
|
|
1850
|
+
],
|
|
1637
1851
|
"returnType": "Promise<void>",
|
|
1638
1852
|
"isStatic": false,
|
|
1639
1853
|
"isPublic": true
|
|
@@ -1752,7 +1966,7 @@
|
|
|
1752
1966
|
],
|
|
1753
1967
|
"schema": {
|
|
1754
1968
|
"tableName": "_smrt_jobs",
|
|
1755
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_jobs\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"queue\" TEXT NOT NULL DEFAULT 'default',\n \"object_type\" TEXT NOT NULL,\n \"object_id\" TEXT,\n \"method\" TEXT NOT NULL,\n \"args\" JSON,\n \"run_at\" TIMESTAMP NOT NULL,\n \"priority\" INTEGER NOT NULL DEFAULT 50,\n \"status\" TEXT NOT NULL DEFAULT 'pending',\n \"attempts\" INTEGER NOT NULL DEFAULT 0,\n \"max_attempts\" INTEGER NOT NULL DEFAULT 3,\n \"timeout\" INTEGER NOT NULL DEFAULT 300000,\n \"timeout_behavior\" TEXT NOT NULL DEFAULT 'fail',\n \"started_at\" TIMESTAMP,\n \"completed_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"result_pointer\" TEXT,\n \"task_id\" TEXT UNIQUE,\n \"task_owner_id\" TEXT,\n \"task_result\" JSON,\n \"task_input_requests\" JSON,\n \"task_input_responses\" JSON,\n \"retry_strategy\" JSON,\n \"worker_id\" TEXT,\n \"worker_heartbeat\" TIMESTAMP\n);",
|
|
1969
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_jobs\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"dedupe_key\" TEXT,\n \"queue\" TEXT NOT NULL DEFAULT 'default',\n \"object_type\" TEXT NOT NULL,\n \"object_id\" TEXT,\n \"method\" TEXT NOT NULL,\n \"args\" JSON,\n \"run_at\" TIMESTAMP NOT NULL,\n \"priority\" INTEGER NOT NULL DEFAULT 50,\n \"status\" TEXT NOT NULL DEFAULT 'pending',\n \"attempts\" INTEGER NOT NULL DEFAULT 0,\n \"max_attempts\" INTEGER NOT NULL DEFAULT 3,\n \"timeout\" INTEGER NOT NULL DEFAULT 300000,\n \"timeout_behavior\" TEXT NOT NULL DEFAULT 'fail',\n \"started_at\" TIMESTAMP,\n \"completed_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"result_pointer\" TEXT,\n \"task_id\" TEXT UNIQUE,\n \"task_owner_id\" TEXT,\n \"task_result\" JSON,\n \"task_input_requests\" JSON,\n \"task_input_responses\" JSON,\n \"retry_strategy\" JSON,\n \"worker_id\" TEXT,\n \"worker_heartbeat\" TIMESTAMP\n);",
|
|
1756
1970
|
"columns": {
|
|
1757
1971
|
"_sync_origin_device_id": {
|
|
1758
1972
|
"type": "TEXT"
|
|
@@ -1791,6 +2005,11 @@
|
|
|
1791
2005
|
"notNull": false,
|
|
1792
2006
|
"unique": false
|
|
1793
2007
|
},
|
|
2008
|
+
"dedupe_key": {
|
|
2009
|
+
"type": "TEXT",
|
|
2010
|
+
"notNull": false,
|
|
2011
|
+
"unique": false
|
|
2012
|
+
},
|
|
1794
2013
|
"queue": {
|
|
1795
2014
|
"type": "TEXT",
|
|
1796
2015
|
"notNull": true,
|
|
@@ -1930,6 +2149,12 @@
|
|
|
1930
2149
|
"unique": true,
|
|
1931
2150
|
"nullsNotDistinct": true
|
|
1932
2151
|
},
|
|
2152
|
+
{
|
|
2153
|
+
"name": "_smrt_jobs_dedupe_key_idx",
|
|
2154
|
+
"columns": [
|
|
2155
|
+
"dedupe_key"
|
|
2156
|
+
]
|
|
2157
|
+
},
|
|
1933
2158
|
{
|
|
1934
2159
|
"name": "_smrt_jobs_run_at_idx",
|
|
1935
2160
|
"columns": [
|
|
@@ -1965,7 +2190,7 @@
|
|
|
1965
2190
|
]
|
|
1966
2191
|
}
|
|
1967
2192
|
],
|
|
1968
|
-
"version": "
|
|
2193
|
+
"version": "4cc5c3e5"
|
|
1969
2194
|
},
|
|
1970
2195
|
"importPath": "@happyvertical/smrt-jobs"
|
|
1971
2196
|
},
|
|
@@ -2024,12 +2249,8 @@
|
|
|
2024
2249
|
"parameters": [
|
|
2025
2250
|
{
|
|
2026
2251
|
"name": "options",
|
|
2027
|
-
"type": "
|
|
2028
|
-
"optional": true
|
|
2029
|
-
"memberTypes": [
|
|
2030
|
-
"number",
|
|
2031
|
-
"string[]"
|
|
2032
|
-
]
|
|
2252
|
+
"type": "ListReadyOptions",
|
|
2253
|
+
"optional": true
|
|
2033
2254
|
}
|
|
2034
2255
|
],
|
|
2035
2256
|
"returnType": "Promise<SmrtJob[]>",
|
|
@@ -2149,7 +2370,7 @@
|
|
|
2149
2370
|
],
|
|
2150
2371
|
"schema": {
|
|
2151
2372
|
"tableName": "_smrt_jobs",
|
|
2152
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_jobs\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"queue\" TEXT NOT NULL DEFAULT 'default',\n \"object_type\" TEXT NOT NULL,\n \"object_id\" TEXT,\n \"method\" TEXT NOT NULL,\n \"args\" JSON,\n \"run_at\" TIMESTAMP NOT NULL,\n \"priority\" INTEGER NOT NULL DEFAULT 50,\n \"status\" TEXT NOT NULL DEFAULT 'pending',\n \"attempts\" INTEGER NOT NULL DEFAULT 0,\n \"max_attempts\" INTEGER NOT NULL DEFAULT 3,\n \"timeout\" INTEGER NOT NULL DEFAULT 300000,\n \"timeout_behavior\" TEXT NOT NULL DEFAULT 'fail',\n \"started_at\" TIMESTAMP,\n \"completed_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"result_pointer\" TEXT,\n \"task_id\" TEXT UNIQUE,\n \"task_owner_id\" TEXT,\n \"task_result\" JSON,\n \"task_input_requests\" JSON,\n \"task_input_responses\" JSON,\n \"retry_strategy\" JSON,\n \"worker_id\" TEXT,\n \"worker_heartbeat\" TIMESTAMP\n);",
|
|
2373
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_jobs\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"dedupe_key\" TEXT,\n \"queue\" TEXT NOT NULL DEFAULT 'default',\n \"object_type\" TEXT NOT NULL,\n \"object_id\" TEXT,\n \"method\" TEXT NOT NULL,\n \"args\" JSON,\n \"run_at\" TIMESTAMP NOT NULL,\n \"priority\" INTEGER NOT NULL DEFAULT 50,\n \"status\" TEXT NOT NULL DEFAULT 'pending',\n \"attempts\" INTEGER NOT NULL DEFAULT 0,\n \"max_attempts\" INTEGER NOT NULL DEFAULT 3,\n \"timeout\" INTEGER NOT NULL DEFAULT 300000,\n \"timeout_behavior\" TEXT NOT NULL DEFAULT 'fail',\n \"started_at\" TIMESTAMP,\n \"completed_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"result_pointer\" TEXT,\n \"task_id\" TEXT UNIQUE,\n \"task_owner_id\" TEXT,\n \"task_result\" JSON,\n \"task_input_requests\" JSON,\n \"task_input_responses\" JSON,\n \"retry_strategy\" JSON,\n \"worker_id\" TEXT,\n \"worker_heartbeat\" TIMESTAMP\n);",
|
|
2153
2374
|
"columns": {
|
|
2154
2375
|
"_sync_origin_device_id": {
|
|
2155
2376
|
"type": "TEXT"
|
|
@@ -2188,6 +2409,11 @@
|
|
|
2188
2409
|
"notNull": false,
|
|
2189
2410
|
"unique": false
|
|
2190
2411
|
},
|
|
2412
|
+
"dedupe_key": {
|
|
2413
|
+
"type": "TEXT",
|
|
2414
|
+
"notNull": false,
|
|
2415
|
+
"unique": false
|
|
2416
|
+
},
|
|
2191
2417
|
"queue": {
|
|
2192
2418
|
"type": "TEXT",
|
|
2193
2419
|
"notNull": true,
|
|
@@ -2327,6 +2553,12 @@
|
|
|
2327
2553
|
"unique": true,
|
|
2328
2554
|
"nullsNotDistinct": true
|
|
2329
2555
|
},
|
|
2556
|
+
{
|
|
2557
|
+
"name": "_smrt_jobs_dedupe_key_idx",
|
|
2558
|
+
"columns": [
|
|
2559
|
+
"dedupe_key"
|
|
2560
|
+
]
|
|
2561
|
+
},
|
|
2330
2562
|
{
|
|
2331
2563
|
"name": "_smrt_jobs_run_at_idx",
|
|
2332
2564
|
"columns": [
|
|
@@ -2362,7 +2594,7 @@
|
|
|
2362
2594
|
]
|
|
2363
2595
|
}
|
|
2364
2596
|
],
|
|
2365
|
-
"version": "
|
|
2597
|
+
"version": "4cc5c3e5"
|
|
2366
2598
|
},
|
|
2367
2599
|
"importPath": "@happyvertical/smrt-jobs"
|
|
2368
2600
|
},
|
package/dist/runner.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export interface TaskRunnerConfig {
|
|
|
22
22
|
concurrency?: number;
|
|
23
23
|
/** Queues to process (default: ['default']) */
|
|
24
24
|
queues?: string[];
|
|
25
|
+
/** Limit claims and orphan recovery to these tenants; [] selects none. */
|
|
26
|
+
tenantIds?: readonly (string | null)[];
|
|
25
27
|
/** Base polling interval in milliseconds, capped at the effective lease TTL. */
|
|
26
28
|
pollInterval?: number;
|
|
27
29
|
/**
|
|
@@ -109,6 +111,10 @@ export declare class JobCancelledError extends Error {
|
|
|
109
111
|
* - Embedded mode (in-process) or standalone (CLI)
|
|
110
112
|
*/
|
|
111
113
|
export declare class TaskRunner extends EventEmitter {
|
|
114
|
+
/** Tenant selection is applied before claims and recovery ownership writes. */
|
|
115
|
+
static readonly capabilities: Readonly<{
|
|
116
|
+
readonly tenantSelection: true;
|
|
117
|
+
}>;
|
|
112
118
|
readonly id: string;
|
|
113
119
|
/**
|
|
114
120
|
* Per-incarnation-unique worker key. Stored as the `worker_id` on claimed
|
package/dist/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAEA,OAAO,wBAAwB,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAY3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,gBAAgB,EAItB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAEA,OAAO,wBAAwB,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAY3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,gBAAgB,EAItB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,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AiCvB;;;;;;;OAOG;YACW,aAAa;IAuB3B;;OAEG;YACW,UAAU;IA0LxB;;OAEG;YACW,cAAc;YA2Fd,sBAAsB;IAmCpC,OAAO,CAAC,sBAAsB;YAkFhB,cAAc;IAuC5B,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,kBAAkB;IAY1B;;;OAGG;YACW,iBAAiB;IAO/B;;;;;;;;;;;;;OAaG;YACW,gBAAgB;IA8E9B;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAczB;;;;;OAKG;YACW,mBAAmB;IAgFjC,OAAO,CAAC,wBAAwB;IAQhC,2EAA2E;YAC7D,kBAAkB;IA8BhC;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAqBtB;;OAEG;YACW,iBAAiB;CAuBhC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,UAAU,CAEtE;AAED,eAAe,UAAU,CAAC"}
|
package/dist/runner.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getActiveJobExecutionContext, i as createTaskRunner, n as JobTimeoutError, o as isRunnerExecutionContext, r as TaskRunner, t as JobCancelledError } from "./chunks/runner-
|
|
1
|
+
import { a as getActiveJobExecutionContext, i as createTaskRunner, n as JobTimeoutError, o as isRunnerExecutionContext, r as TaskRunner, t as JobCancelledError } from "./chunks/runner-DucZ0Lvj.js";
|
|
2
2
|
export { JobCancelledError, JobTimeoutError, TaskRunner, TaskRunner as default, createTaskRunner, getActiveJobExecutionContext, isRunnerExecutionContext };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { DurableJobPayloadSigner } from './durable-payload-integrity.js';
|
|
2
|
+
/** Durable, versioned requirement persisted in AgentSchedule.methodArgs. */
|
|
3
|
+
export interface ScheduleAdmissionPolicy {
|
|
4
|
+
version: 1;
|
|
5
|
+
requireIntegrity: true;
|
|
6
|
+
queue: string;
|
|
7
|
+
keyId: string;
|
|
8
|
+
}
|
|
9
|
+
/** Absent policy preserves legacy behavior; any malformed present policy fails closed. */
|
|
10
|
+
export declare function getScheduleAdmissionPolicy(args: unknown): ScheduleAdmissionPolicy | null;
|
|
11
|
+
/** Purpose-separated, immutable JSON identity of one scheduler admission. */
|
|
12
|
+
export interface ScheduleAdmissionPayload {
|
|
13
|
+
purpose: 'smrt.schedule-admission';
|
|
14
|
+
version: 1;
|
|
15
|
+
keyId: string;
|
|
16
|
+
jobId: string;
|
|
17
|
+
tenantId: string | null;
|
|
18
|
+
scheduleId: string;
|
|
19
|
+
scheduledFor: string;
|
|
20
|
+
queue: string;
|
|
21
|
+
objectType: string;
|
|
22
|
+
objectId: string | null;
|
|
23
|
+
method: string;
|
|
24
|
+
args: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Build the public signature payload from an authoritative persisted job row.
|
|
28
|
+
*
|
|
29
|
+
* This pure helper never signs or acquires a key. Only `_scheduleAdmission` is
|
|
30
|
+
* omitted; every other persisted argument, including constructor/static consent
|
|
31
|
+
* metadata, participates. Lifecycle fields may change during a legitimate retry.
|
|
32
|
+
* Malformed identities or noncanonical UTC occurrence metadata throw.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getScheduleAdmissionPayload(job: unknown, keyId: string): ScheduleAdmissionPayload;
|
|
35
|
+
/**
|
|
36
|
+
* Verify one exact admitted job, failing closed on missing/unknown metadata.
|
|
37
|
+
*
|
|
38
|
+
* `signer.verify` may be a trusted keyring retaining old verification keys while
|
|
39
|
+
* `signer.keyId` selects a new minting key. Unknown or retired keys must deny.
|
|
40
|
+
* A valid signature proves admission, never current user authority, deduplication
|
|
41
|
+
* or exactly-once execution. No protection is claimed against code holding keys.
|
|
42
|
+
*/
|
|
43
|
+
export declare function verifyScheduleAdmission(job: unknown, signer: DurableJobPayloadSigner): boolean;
|
|
44
|
+
//# sourceMappingURL=schedule-admission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule-admission.d.ts","sourceRoot":"","sources":["../src/schedule-admission.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,uBAAuB,EACxB,MAAM,gCAAgC,CAAC;AAExC,4EAA4E;AAC5E,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,CAAC,CAAC;IACX,gBAAgB,EAAE,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,0FAA0F;AAC1F,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,OAAO,GACZ,uBAAuB,GAAG,IAAI,CA0BhC;AAED,6EAA6E;AAC7E,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,yBAAyB,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAeD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,MAAM,GACZ,wBAAwB,CA6C1B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CA8BT"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
3
|
+
import type { DurableJobPayloadSigner } from './durable-payload-integrity.js';
|
|
3
4
|
/**
|
|
4
5
|
* ScheduleRunner configuration
|
|
5
6
|
*/
|
|
@@ -16,6 +17,14 @@ export interface ScheduleRunnerConfig {
|
|
|
16
17
|
pollInterval?: number;
|
|
17
18
|
/** Maximum schedules to process per poll */
|
|
18
19
|
batchSize?: number;
|
|
20
|
+
/** Trusted host signer for exact occurrence/job integrity; null preserves unsigned behavior. */
|
|
21
|
+
occurrenceSigner?: DurableJobPayloadSigner | null;
|
|
22
|
+
/** Exact registered agent types this host may admit; empty means none. */
|
|
23
|
+
agentTypes?: readonly string[];
|
|
24
|
+
/** Tenant identities this host may admit; null selects global schedules. */
|
|
25
|
+
tenantIds?: readonly (string | null)[];
|
|
26
|
+
/** Queue consumed by this host's task worker (default: agents). */
|
|
27
|
+
queue?: string;
|
|
19
28
|
/**
|
|
20
29
|
* @deprecated No longer used. Slot reconciliation keys on worker liveness
|
|
21
30
|
* (the `_smrt_workers` lease), not per-job heartbeat staleness (#1474).
|
|
@@ -30,6 +39,10 @@ export interface ScheduleRunnerConfig {
|
|
|
30
39
|
* ScheduleRunner events
|
|
31
40
|
*/
|
|
32
41
|
export interface ScheduleRunnerEvents {
|
|
42
|
+
'schedule:blocked': (diagnostic: {
|
|
43
|
+
scheduleId: string;
|
|
44
|
+
reason: string;
|
|
45
|
+
}) => void;
|
|
33
46
|
'schedule:triggered': (schedule: ScheduleInfo) => void;
|
|
34
47
|
'schedule:error': (schedule: ScheduleInfo, error: Error) => void;
|
|
35
48
|
'schedule:completed': (scheduleId: string) => void;
|
|
@@ -77,15 +90,25 @@ export interface ScheduleInfo {
|
|
|
77
90
|
* ```
|
|
78
91
|
*/
|
|
79
92
|
export declare class ScheduleRunner extends EventEmitter {
|
|
93
|
+
/** Public contracts hosts may require before admitting enabled schedules. */
|
|
94
|
+
static readonly capabilities: Readonly<{
|
|
95
|
+
readonly atomicOccurrences: true;
|
|
96
|
+
readonly scopedAdmission: true;
|
|
97
|
+
readonly drain: true;
|
|
98
|
+
readonly occurrenceIntegrity: true;
|
|
99
|
+
readonly requiredOccurrenceIntegrity: true;
|
|
100
|
+
}>;
|
|
80
101
|
readonly id: string;
|
|
81
102
|
private readonly config;
|
|
82
103
|
private jobCollection;
|
|
83
|
-
private workerCollection;
|
|
84
104
|
private running;
|
|
85
105
|
private pollTimer;
|
|
106
|
+
private pollInFlight;
|
|
107
|
+
private stopping;
|
|
86
108
|
private db;
|
|
87
109
|
private logger;
|
|
88
110
|
constructor(config?: ScheduleRunnerConfig);
|
|
111
|
+
private scheduleScope;
|
|
89
112
|
/**
|
|
90
113
|
* Initialize the runner with database connection
|
|
91
114
|
*/
|
|
@@ -117,25 +140,17 @@ export declare class ScheduleRunner extends EventEmitter {
|
|
|
117
140
|
* Poll for due schedules and create jobs
|
|
118
141
|
*/
|
|
119
142
|
private poll;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
* - a schedule slot remains occupied even though no running job still exists
|
|
126
|
-
*
|
|
127
|
-
* Staleness keys on worker *liveness* (issue #1474), not per-job heartbeat
|
|
128
|
-
* freshness: a job whose `worker_id` is live in this process or holds a fresh
|
|
129
|
-
* lease in `_smrt_workers` is healthy even if its handler is holding the loop
|
|
130
|
-
* synchronously. ScheduleRunner has no in-process active-job set, so this is
|
|
131
|
-
* its entire correctness mechanism.
|
|
132
|
-
*/
|
|
143
|
+
private assertAdmissionHost;
|
|
144
|
+
private reportBlocked;
|
|
145
|
+
/** Pending retries occupy slots too; TaskRunner alone owns worker recovery. */
|
|
146
|
+
private countScheduleJobs;
|
|
147
|
+
/** Reconcile cached slots without changing TaskRunner-owned job lifecycle. */
|
|
133
148
|
private recoverStaleScheduleState;
|
|
134
|
-
private getScheduleIdFromJobArgs;
|
|
135
149
|
/**
|
|
136
150
|
* Trigger a schedule by creating a job
|
|
137
151
|
*/
|
|
138
152
|
private triggerSchedule;
|
|
153
|
+
private triggerLockedSchedule;
|
|
139
154
|
}
|
|
140
155
|
/**
|
|
141
156
|
* Validate a standard 5-field cron expression: field count plus per-field
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-runner.d.ts","sourceRoot":"","sources":["../src/schedule-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"schedule-runner.d.ts","sourceRoot":"","sources":["../src/schedule-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAgB9E;;GAEG;AACH;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,gBAAgB,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAClD,0EAA0E;IAC1E,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACvC,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kBAAkB,EAAE,CAAC,UAAU,EAAE;QAC/B,UAAU,EAAE,MAAM,CAAC;QACn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AAG,OAAO,CAAC,IAAI,CAAC;IAKtD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB5B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB3B;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;;;;OAKG;IACG,mBAAmB,CACvB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAsDhB;;OAEG;IACH,OAAO,CAAC,YAAY;IAwBpB;;OAEG;YACW,IAAI;IA+BlB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,aAAa;IAYrB,+EAA+E;YACjE,iBAAiB;IAgB/B,8EAA8E;YAChE,yBAAyB;IAmCvC;;OAEG;YACW,eAAe;YA0Ef,qBAAqB;CA2IpC;AAmID;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAa7D;AA8FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAyG5E;AAsCD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,CAAC,EAAE,oBAAoB,GAC5B,cAAc,CAEhB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SmrtCollection, SmrtObject } from '@happyvertical/smrt-core';
|
|
2
|
+
/**
|
|
3
|
+
* Store-owned serialization row for a tenant-partitioned job deduplication key.
|
|
4
|
+
*
|
|
5
|
+
* The opaque hash includes tenant identity. Job pointers deliberately have no
|
|
6
|
+
* physical FK: job retention can prune a terminal job before the key is reused.
|
|
7
|
+
* Generated access is disabled; callers use SmrtJobCollection.enqueueJob().
|
|
8
|
+
*/
|
|
9
|
+
export declare class SmrtJobDedupeSlot extends SmrtObject {
|
|
10
|
+
/** SHA-256 identity of the tenant and caller key. */
|
|
11
|
+
slotKey: string;
|
|
12
|
+
/** Last admitted job, which may already have been pruned by retention. */
|
|
13
|
+
jobId: string | null;
|
|
14
|
+
}
|
|
15
|
+
/** Internal collection for provisioning the registered store-owned model. */
|
|
16
|
+
export declare class SmrtJobDedupeSlotCollection extends SmrtCollection<SmrtJobDedupeSlot> {
|
|
17
|
+
static readonly _itemClass: typeof SmrtJobDedupeSlot;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=smrt-job-dedupe-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smrt-job-dedupe-slot.d.ts","sourceRoot":"","sources":["../src/smrt-job-dedupe-slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAElC;;;;;;GAMG;AACH,qBAMa,iBAAkB,SAAQ,UAAU;IAC/C,qDAAqD;IAErD,OAAO,EAAE,MAAM,CAAM;IAErB,0EAA0E;IAE1E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;CAC7B;AAED,6EAA6E;AAC7E,qBAAa,2BAA4B,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAChF,MAAM,CAAC,QAAQ,CAAC,UAAU,2BAAqB;CAChD"}
|