@happyvertical/smrt-jobs 0.61.3 → 0.61.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.
- package/AGENTS.md +3 -3
- package/dist/chunks/{runner-DdonPDQV.js → runner-BRwm00s-.js} +160 -25
- package/dist/chunks/runner-BRwm00s-.js.map +1 -0
- package/dist/index.js +13 -15
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +797 -500
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +1 -1
- package/dist/schedule-runner.d.ts.map +1 -1
- package/dist/smrt-job-dedupe-slot.d.ts.map +1 -1
- package/dist/smrt-job-event.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +138 -132
- package/dist/smrt-knowledge.okf.md +6 -2
- package/dist/terminal-outcome.d.ts.map +1 -1
- package/dist/worker-liveness-thread.js +11 -3
- package/dist/worker-liveness-thread.js.map +1 -1
- package/dist/worker-liveness-ticker.d.ts +23 -8
- package/dist/worker-liveness-ticker.d.ts.map +1 -1
- package/dist/worker-liveness.d.ts +37 -7
- package/dist/worker-liveness.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/chunks/runner-DdonPDQV.js.map +0 -1
- package/dist/chunks/worker-liveness-C1Gjnhax.js +0 -58
- package/dist/chunks/worker-liveness-C1Gjnhax.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { ObjectRegistry, SmrtCollection, SmrtObject, detectEngine, field, smrt } from "@happyvertical/smrt-core";
|
|
1
|
+
import { A as JOB_EVENTS_RETENTION_TASK, B as DEFAULT_TENANT_JOB_CAP, C as taskFromJob, D as DEFAULT_JOB_RETENTION, E as redactErrorMessage, F as SmrtJobCollection, G as clampRetries, H as TenantJobCapExceededError, I as countScheduleJobs, J as markBackgroundEligible, K as getBackgroundEligibleMethods, L as SmrtJobEvent, M as startRetentionSweeper, N as unregisterJobRetentionTasks, O as DEFAULT_RETENTION_SWEEP_INTERVAL_MS, P as SmrtJob, R as SmrtJobEventCollection, S as requestMcpTaskInput, T as redactErrorForPersistence, U as assertWithinTenantCreationCap, V as MAX_JOB_RETRIES, W as backgroundEligible, _ as McpTaskStore, a as getActiveJobExecutionContext, b as getMcpTaskMarker, c as isWorkerAlive, d as DEFAULT_TASK_HEARTBEAT_INTERVAL_MS, f as SmrtWorker, g as McpTaskNotFoundError, h as McpTaskCancelledError, i as createTaskRunner, j as registerJobRetentionTasks, k as JOBS_RETENTION_TASK, l as registerLiveWorker, m as MCP_TASKS_EXTENSION, n as JobTimeoutError, o as isRunnerExecutionContext, p as SmrtWorkerCollection, q as isBackgroundEligibleMethod, r as TaskRunner, s as createWorkerKey, t as JobCancelledError, u as unregisterLiveWorker, v as McpTaskSuspendedError, w as JobContextLogger, x as requestMcpTaskContinuation, y as createMcpTaskResult, z as SmrtJobDedupeSlot } from "./chunks/runner-BRwm00s-.js";
|
|
2
|
+
import { ObjectRegistry, SmrtCollection, SmrtObject, assertDatabaseMigratedForBuild, detectEngine, field, smrt } from "@happyvertical/smrt-core";
|
|
4
3
|
import { createLogger } from "@happyvertical/logger";
|
|
5
4
|
import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
6
5
|
import { TenantScoped, requireTenant, tenantId, withTenant } from "@happyvertical/smrt-tenancy";
|
|
@@ -102,11 +101,13 @@ __publicField(ForgeDelivery, "__smrtPackage__", "@happyvertical/smrt-jobs");
|
|
|
102
101
|
__decorateClass([tenantId()], ForgeDelivery.prototype, "tenantId", 2);
|
|
103
102
|
__decorateClass([field({
|
|
104
103
|
type: "text",
|
|
105
|
-
required: true
|
|
104
|
+
required: true,
|
|
105
|
+
requiredFor: "identity"
|
|
106
106
|
})], ForgeDelivery.prototype, "provider", 2);
|
|
107
107
|
__decorateClass([field({
|
|
108
108
|
type: "text",
|
|
109
|
-
required: true
|
|
109
|
+
required: true,
|
|
110
|
+
requiredFor: "identity"
|
|
110
111
|
})], ForgeDelivery.prototype, "deliveryId", 2);
|
|
111
112
|
__decorateClass([field({
|
|
112
113
|
type: "text",
|
|
@@ -116,10 +117,7 @@ __decorateClass([field({
|
|
|
116
117
|
type: "text",
|
|
117
118
|
nullable: true
|
|
118
119
|
})], ForgeDelivery.prototype, "repositoryKey", 2);
|
|
119
|
-
__decorateClass([field({
|
|
120
|
-
type: "text",
|
|
121
|
-
required: true
|
|
122
|
-
})], ForgeDelivery.prototype, "eventName", 2);
|
|
120
|
+
__decorateClass([field({ type: "text" })], ForgeDelivery.prototype, "eventName", 2);
|
|
123
121
|
__decorateClass([field({ type: "json" })], ForgeDelivery.prototype, "payload", 2);
|
|
124
122
|
__decorateClass([field({
|
|
125
123
|
type: "text",
|
|
@@ -199,20 +197,19 @@ __publicField(ForgeProjectionCheckpoint, "__smrtPackage__", "@happyvertical/smrt
|
|
|
199
197
|
__decorateClass([tenantId()], ForgeProjectionCheckpoint.prototype, "tenantId", 2);
|
|
200
198
|
__decorateClass([field({
|
|
201
199
|
type: "text",
|
|
202
|
-
required: true
|
|
200
|
+
required: true,
|
|
201
|
+
requiredFor: "identity"
|
|
203
202
|
})], ForgeProjectionCheckpoint.prototype, "projection", 2);
|
|
204
203
|
__decorateClass([field({
|
|
205
204
|
type: "text",
|
|
206
|
-
required: true
|
|
205
|
+
required: true,
|
|
206
|
+
requiredFor: "identity"
|
|
207
207
|
})], ForgeProjectionCheckpoint.prototype, "subjectKey", 2);
|
|
208
208
|
__decorateClass([field({
|
|
209
209
|
type: "integer",
|
|
210
210
|
required: true
|
|
211
211
|
})], ForgeProjectionCheckpoint.prototype, "observationVersion", 2);
|
|
212
|
-
__decorateClass([field({
|
|
213
|
-
type: "text",
|
|
214
|
-
required: true
|
|
215
|
-
})], ForgeProjectionCheckpoint.prototype, "deliveryId", 2);
|
|
212
|
+
__decorateClass([field({ type: "text" })], ForgeProjectionCheckpoint.prototype, "deliveryId", 2);
|
|
216
213
|
__decorateClass([field({
|
|
217
214
|
type: "datetime",
|
|
218
215
|
required: true
|
|
@@ -1025,6 +1022,7 @@ var ScheduleRunner = class extends EventEmitter {
|
|
|
1025
1022
|
if (this.running) return;
|
|
1026
1023
|
if (!this.db) throw new Error("ScheduleRunner not initialized. Call initialize() first.");
|
|
1027
1024
|
if (!this.db.transaction) throw new Error("ScheduleRunner requires transaction support");
|
|
1025
|
+
await assertDatabaseMigratedForBuild(this.db);
|
|
1028
1026
|
this.running = true;
|
|
1029
1027
|
this.startPolling();
|
|
1030
1028
|
this.emit("runner:started");
|