@voyant-travel/workflows-orchestrator 0.111.9 → 0.111.11
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/dist/abort-registry.d.ts +0 -2
- package/dist/abort-registry.d.ts.map +1 -1
- package/dist/abort-registry.js +0 -4
- package/dist/in-memory-store.d.ts +1 -3
- package/dist/in-memory-store.d.ts.map +1 -1
- package/dist/node/core.d.ts +1 -1
- package/dist/node/core.d.ts.map +1 -1
- package/dist/node/core.js +6 -2
- package/dist/node/dashboard-request.d.ts.map +1 -1
- package/dist/node/dashboard-request.js +14 -8
- package/dist/node/dashboard-server.d.ts.map +1 -1
- package/dist/node/dashboard-types.d.ts +1 -2
- package/dist/node/dashboard-types.d.ts.map +1 -1
- package/dist/node/postgres-run-record-store.d.ts +2 -2
- package/dist/node/postgres-run-record-store.d.ts.map +1 -1
- package/dist/node/scheduler.d.ts.map +1 -1
- package/dist/node/scheduler.js +3 -1
- package/package.json +9 -8
- package/src/abort-registry.ts +0 -5
- package/src/in-memory-store.ts +1 -4
- package/src/node/core.ts +16 -1
- package/src/node/dashboard-request.ts +13 -7
- package/src/node/dashboard-server.ts +1 -0
- package/src/node/dashboard-types.ts +1 -3
- package/src/node/postgres-run-record-store.ts +1 -5
- package/src/node/scheduler.ts +2 -0
package/dist/abort-registry.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export declare function registerRunAbort(runId: string): AbortController;
|
|
2
2
|
export declare function signalRunAbort(runId: string, reason?: string): boolean;
|
|
3
3
|
export declare function unregisterRunAbort(runId: string): void;
|
|
4
|
-
/** For tests. */
|
|
5
|
-
export declare function __clearAbortRegistry(): void;
|
|
6
4
|
//# sourceMappingURL=abort-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abort-registry.d.ts","sourceRoot":"","sources":["../src/abort-registry.ts"],"names":[],"mappings":"AAaA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAS/D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAOtE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEtD
|
|
1
|
+
{"version":3,"file":"abort-registry.d.ts","sourceRoot":"","sources":["../src/abort-registry.ts"],"names":[],"mappings":"AAaA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAS/D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAOtE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEtD"}
|
package/dist/abort-registry.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RunRecordStore } from "./types.js";
|
|
2
2
|
export declare function createInMemoryRunStore(): RunRecordStore;
|
|
3
|
-
/** Keep the unused import happy — guards against accidental type-only drift. */
|
|
4
|
-
export type { OrchestratorRunStatus };
|
|
5
3
|
//# sourceMappingURL=in-memory-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-store.d.ts","sourceRoot":"","sources":["../src/in-memory-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"in-memory-store.d.ts","sourceRoot":"","sources":["../src/in-memory-store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3D,wBAAgB,sBAAsB,IAAI,cAAc,CA8BvD"}
|
package/dist/node/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type ConcurrencyRunHooks, createInProcessConcurrencyCoordinator, type InProcessConcurrencyCoordinator, type RuntimeConcurrencyPolicy, resolveConcurrencyKey, WorkflowConcurrencyRejectedError, } from "../concurrency.js";
|
|
2
|
-
export { type RouteEventArgs, type RouterMatch, routeEvent } from "../event-router.js";
|
|
2
|
+
export { type RouteEventArgs, type RouterMatch, routeEvent, } from "../event-router.js";
|
|
3
3
|
export { createInMemoryRunStore } from "../in-memory-store.js";
|
|
4
4
|
export { emptyJournal } from "../journal-helpers.js";
|
|
5
5
|
export { type CancelArgs, cancel, type OrchestratorDeps, type ResumeArgs, type ResumeDueAlarmsArgs, resume, resumeDueAlarms, type TriggerArgs, trigger, } from "../orchestrator.js";
|
package/dist/node/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/node/core.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/node/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACxB,qCAAqC,EAErC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAE7B,qBAAqB,EAErB,gCAAgC,GACjC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,UAAU,GACX,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAEL,KAAK,UAAU,EACf,MAAM,EAEN,KAAK,gBAAgB,EAErB,KAAK,UAAU,EAEf,KAAK,mBAAmB,EACxB,MAAM,EACN,eAAe,EACf,KAAK,WAAW,EAChB,OAAO,GACR,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,KAAK,QAAQ,EACb,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,SAAS,EAET,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,IAAI,GACL,MAAM,gBAAgB,CAAA;AACvB,cAAc,aAAa,CAAA"}
|
package/dist/node/core.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
export { createInProcessConcurrencyCoordinator,
|
|
2
|
-
|
|
1
|
+
export { createInProcessConcurrencyCoordinator,
|
|
2
|
+
// fallow-ignore-next-line unused-export
|
|
3
|
+
resolveConcurrencyKey,
|
|
4
|
+
// fallow-ignore-next-line unused-export
|
|
5
|
+
WorkflowConcurrencyRejectedError, } from "../concurrency.js";
|
|
6
|
+
export { routeEvent, } from "../event-router.js";
|
|
3
7
|
export { createInMemoryRunStore } from "../in-memory-store.js";
|
|
4
8
|
export { emptyJournal } from "../journal-helpers.js";
|
|
5
9
|
export { cancel, resume, resumeDueAlarms, trigger, } from "../orchestrator.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-request.d.ts","sourceRoot":"","sources":["../../src/node/dashboard-request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard-request.d.ts","sourceRoot":"","sources":["../../src/node/dashboard-request.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAgB,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAG7F,wBAAsB,aAAa,CACjC,GAAG,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACnD,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,eAAe,CAAC,CAiT1B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { URL } from "node:url";
|
|
2
|
+
import { validateSeedResults } from "../resume-run.js";
|
|
2
3
|
import { renderMetrics } from "./dashboard-metrics.js";
|
|
3
4
|
import { mimeFor } from "./dashboard-static.js";
|
|
4
5
|
export async function handleRequest(req, deps) {
|
|
@@ -348,13 +349,18 @@ function parseResumeRequestBody(body) {
|
|
|
348
349
|
message: "`tags` must be an array of strings when provided",
|
|
349
350
|
};
|
|
350
351
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
352
|
+
let seedResults;
|
|
353
|
+
if (parsed.seedResults !== undefined) {
|
|
354
|
+
const validation = validateSeedResults(parsed.seedResults);
|
|
355
|
+
if (!validation.ok) {
|
|
356
|
+
return {
|
|
357
|
+
ok: false,
|
|
358
|
+
status: 400,
|
|
359
|
+
error: "invalid_body",
|
|
360
|
+
message: validation.message,
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
seedResults = validation.seedResults;
|
|
358
364
|
}
|
|
359
365
|
return {
|
|
360
366
|
ok: true,
|
|
@@ -362,7 +368,7 @@ function parseResumeRequestBody(body) {
|
|
|
362
368
|
input: parsed.input,
|
|
363
369
|
workflowId: parsed.workflowId,
|
|
364
370
|
resumeFromStep: parsed.resumeFromStep,
|
|
365
|
-
seedResults
|
|
371
|
+
seedResults,
|
|
366
372
|
runId: parsed.runId,
|
|
367
373
|
tags: parsed.tags,
|
|
368
374
|
triggeredByUserId: parsed.triggeredByUserId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-server.d.ts","sourceRoot":"","sources":["../../src/node/dashboard-server.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC5E,YAAY,EACV,eAAe,
|
|
1
|
+
{"version":3,"file":"dashboard-server.d.ts","sourceRoot":"","sources":["../../src/node/dashboard-server.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC5E,YAAY,EACV,eAAe,EAEf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,EACT,WAAW,GACZ,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -3,7 +3,7 @@ import type { ServiceResolver } from "@voyant-travel/workflows/driver";
|
|
|
3
3
|
import type { WaitpointInjection } from "./core.js";
|
|
4
4
|
import type { ChunkBus } from "./dashboard-chunks.js";
|
|
5
5
|
import type { SchedulerHandle } from "./scheduler.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { SnapshotRunStore, StoredRun } from "./snapshot-run-store.js";
|
|
7
7
|
export interface ServeDeps {
|
|
8
8
|
store: SnapshotRunStore;
|
|
9
9
|
createServer: typeof createServer;
|
|
@@ -130,5 +130,4 @@ export interface SelfHostServerOptions {
|
|
|
130
130
|
wakeupLeaseMs?: number;
|
|
131
131
|
wakeupLeaseOwner?: string;
|
|
132
132
|
}
|
|
133
|
-
export type DashboardListFilter = ListFilter;
|
|
134
133
|
//# sourceMappingURL=dashboard-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-types.d.ts","sourceRoot":"","sources":["../../src/node/dashboard-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"dashboard-types.d.ts","sourceRoot":"","sources":["../../src/node/dashboard-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAE1E,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,gBAAgB,CAAA;IACvB,YAAY,EAAE,OAAO,YAAY,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,GAAG,YA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1B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { drizzle } from "drizzle-orm/node-postgres";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RunRecordStore } from "./core.js";
|
|
3
3
|
type SnapshotDb = ReturnType<typeof drizzle>;
|
|
4
4
|
export interface PostgresRunRecordStoreOptions {
|
|
5
5
|
db: SnapshotDb;
|
|
6
6
|
}
|
|
7
7
|
export declare function createPostgresRunRecordStore(opts: PostgresRunRecordStoreOptions): RunRecordStore;
|
|
8
|
-
export
|
|
8
|
+
export {};
|
|
9
9
|
//# sourceMappingURL=postgres-run-record-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-run-record-store.d.ts","sourceRoot":"","sources":["../../src/node/postgres-run-record-store.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"postgres-run-record-store.d.ts","sourceRoot":"","sources":["../../src/node/postgres-run-record-store.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,WAAW,CAAA;AAI1D,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;AAE5C,MAAM,WAAW,6BAA6B;IAC5C,EAAE,EAAE,UAAU,CAAA;CACf;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,6BAA6B,GAAG,cAAc,CAkGhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/node/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,eAAe,EACf,eAAe,
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/node/scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,eAAe,EACf,eAAe,EAEf,uBAAuB,EACvB,YAAY,EACZ,SAAS,EAET,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,IAAI,GACL,MAAM,WAAW,CAAA"}
|
package/dist/node/scheduler.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { computeNextFire, createScheduler,
|
|
1
|
+
export { computeNextFire, createScheduler,
|
|
2
|
+
// fallow-ignore-next-line unused-export
|
|
3
|
+
manifestScheduleSources, nextCronFire, parseCron, toMs, } from "./core.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/workflows-orchestrator",
|
|
3
|
-
"version": "0.111.
|
|
3
|
+
"version": "0.111.11",
|
|
4
4
|
"description": "Postgres self-host orchestrator runtime for Voyant Workflows — drives runs through the tenant step handler over the v1 wire protocol.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -48,28 +48,29 @@
|
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"drizzle-orm": "^0.45.2",
|
|
51
|
-
"pg": "^8.
|
|
52
|
-
"@voyant-travel/workflows": "^0.111.
|
|
51
|
+
"pg": "^8.22.0",
|
|
52
|
+
"@voyant-travel/workflows": "^0.111.11"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@types/node": "^
|
|
55
|
+
"@types/node": "^25.5.2",
|
|
56
56
|
"@types/pg": "^8.20.0",
|
|
57
57
|
"drizzle-kit": "^0.31.10",
|
|
58
|
-
"typescript": "^
|
|
59
|
-
"vitest": "^
|
|
58
|
+
"typescript": "^6.0.3",
|
|
59
|
+
"vitest": "^4.1.9",
|
|
60
60
|
"@voyant-travel/voyant-typescript-config": "^0.1.0"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
|
-
"build": "tsc -p tsconfig.json",
|
|
66
|
+
"build": "tsc -p tsconfig.build.json",
|
|
67
67
|
"check-types": "tsc --noEmit",
|
|
68
68
|
"db:generate": "drizzle-kit generate --config=drizzle.config.ts",
|
|
69
69
|
"db:migrate": "drizzle-kit migrate --config=drizzle.config.ts",
|
|
70
70
|
"dev": "tsc -w -p tsconfig.json",
|
|
71
71
|
"test:integration": "vitest run --maxWorkers=1 --testTimeout=30000 --hookTimeout=30000 src/node/__tests__/migrate.integration.test.ts src/node/__tests__/postgres-integration.test.ts src/node/__tests__/selfhost-server-postgres.integration.test.ts",
|
|
72
72
|
"test": "vitest run",
|
|
73
|
-
"test:watch": "vitest"
|
|
73
|
+
"test:watch": "vitest",
|
|
74
|
+
"typecheck": "tsc -p tsconfig.typecheck.json"
|
|
74
75
|
}
|
|
75
76
|
}
|
package/src/abort-registry.ts
CHANGED
|
@@ -34,8 +34,3 @@ export function signalRunAbort(runId: string, reason?: string): boolean {
|
|
|
34
34
|
export function unregisterRunAbort(runId: string): void {
|
|
35
35
|
controllers.delete(runId)
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
/** For tests. */
|
|
39
|
-
export function __clearAbortRegistry(): void {
|
|
40
|
-
controllers.clear()
|
|
41
|
-
}
|
package/src/in-memory-store.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// orchestrator harnesses. The production store is Postgres-backed
|
|
3
3
|
// and lives in voyant-cloud.
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { RunRecord, RunRecordStore } from "./types.js"
|
|
6
6
|
|
|
7
7
|
export function createInMemoryRunStore(): RunRecordStore {
|
|
8
8
|
const records = new Map<string, RunRecord>()
|
|
@@ -39,6 +39,3 @@ export function createInMemoryRunStore(): RunRecordStore {
|
|
|
39
39
|
function clone<T>(value: T): T {
|
|
40
40
|
return structuredClone(value)
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
/** Keep the unused import happy — guards against accidental type-only drift. */
|
|
44
|
-
export type { OrchestratorRunStatus }
|
package/src/node/core.ts
CHANGED
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
export {
|
|
2
|
+
// fallow-ignore-next-line unused-type
|
|
2
3
|
type ConcurrencyRunHooks,
|
|
3
4
|
createInProcessConcurrencyCoordinator,
|
|
5
|
+
// fallow-ignore-next-line unused-type
|
|
4
6
|
type InProcessConcurrencyCoordinator,
|
|
5
7
|
type RuntimeConcurrencyPolicy,
|
|
8
|
+
// fallow-ignore-next-line unused-export
|
|
6
9
|
resolveConcurrencyKey,
|
|
10
|
+
// fallow-ignore-next-line unused-export
|
|
7
11
|
WorkflowConcurrencyRejectedError,
|
|
8
12
|
} from "../concurrency.js"
|
|
9
|
-
export {
|
|
13
|
+
export {
|
|
14
|
+
// fallow-ignore-next-line unused-type
|
|
15
|
+
type RouteEventArgs,
|
|
16
|
+
// fallow-ignore-next-line unused-type
|
|
17
|
+
type RouterMatch,
|
|
18
|
+
routeEvent,
|
|
19
|
+
} from "../event-router.js"
|
|
10
20
|
export { createInMemoryRunStore } from "../in-memory-store.js"
|
|
11
21
|
export { emptyJournal } from "../journal-helpers.js"
|
|
12
22
|
export {
|
|
23
|
+
// fallow-ignore-next-line unused-type
|
|
13
24
|
type CancelArgs,
|
|
14
25
|
cancel,
|
|
26
|
+
// fallow-ignore-next-line unused-type
|
|
15
27
|
type OrchestratorDeps,
|
|
28
|
+
// fallow-ignore-next-line unused-type
|
|
16
29
|
type ResumeArgs,
|
|
30
|
+
// fallow-ignore-next-line unused-type
|
|
17
31
|
type ResumeDueAlarmsArgs,
|
|
18
32
|
resume,
|
|
19
33
|
resumeDueAlarms,
|
|
@@ -34,6 +48,7 @@ export {
|
|
|
34
48
|
manifestScheduleSources,
|
|
35
49
|
nextCronFire,
|
|
36
50
|
parseCron,
|
|
51
|
+
// fallow-ignore-next-line unused-type
|
|
37
52
|
type SchedulableDeclaration,
|
|
38
53
|
type SchedulerDeps,
|
|
39
54
|
type SchedulerHandle,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { URL } from "node:url"
|
|
2
|
+
import { validateSeedResults } from "../resume-run.js"
|
|
2
3
|
import type { WaitpointInjection } from "./core.js"
|
|
3
4
|
import { renderMetrics } from "./dashboard-metrics.js"
|
|
4
5
|
import { mimeFor } from "./dashboard-static.js"
|
|
@@ -392,13 +393,18 @@ function parseResumeRequestBody(body: string | undefined):
|
|
|
392
393
|
message: "`tags` must be an array of strings when provided",
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
396
|
+
let seedResults: Record<string, unknown> | undefined
|
|
397
|
+
if (parsed.seedResults !== undefined) {
|
|
398
|
+
const validation = validateSeedResults(parsed.seedResults)
|
|
399
|
+
if (!validation.ok) {
|
|
400
|
+
return {
|
|
401
|
+
ok: false,
|
|
402
|
+
status: 400,
|
|
403
|
+
error: "invalid_body",
|
|
404
|
+
message: validation.message,
|
|
405
|
+
}
|
|
401
406
|
}
|
|
407
|
+
seedResults = validation.seedResults
|
|
402
408
|
}
|
|
403
409
|
return {
|
|
404
410
|
ok: true,
|
|
@@ -406,7 +412,7 @@ function parseResumeRequestBody(body: string | undefined):
|
|
|
406
412
|
input: parsed.input,
|
|
407
413
|
workflowId: parsed.workflowId as string | undefined,
|
|
408
414
|
resumeFromStep: parsed.resumeFromStep,
|
|
409
|
-
seedResults
|
|
415
|
+
seedResults,
|
|
410
416
|
runId: parsed.runId,
|
|
411
417
|
tags: parsed.tags as string[] | undefined,
|
|
412
418
|
triggeredByUserId: parsed.triggeredByUserId as string | null | undefined,
|
|
@@ -7,6 +7,7 @@ export { handleRunSseStream, handleSseStream } from "./dashboard-sse.js"
|
|
|
7
7
|
export { createStaticReader, findDashboardDir } from "./dashboard-static.js"
|
|
8
8
|
export type {
|
|
9
9
|
HandlerResponse,
|
|
10
|
+
// fallow-ignore-next-line unused-type
|
|
10
11
|
HealthReport,
|
|
11
12
|
MetricsSnapshot,
|
|
12
13
|
RequestHandlerDeps,
|
|
@@ -3,7 +3,7 @@ import type { ServiceResolver } from "@voyant-travel/workflows/driver"
|
|
|
3
3
|
import type { WaitpointInjection } from "./core.js"
|
|
4
4
|
import type { ChunkBus } from "./dashboard-chunks.js"
|
|
5
5
|
import type { SchedulerHandle } from "./scheduler.js"
|
|
6
|
-
import type {
|
|
6
|
+
import type { SnapshotRunStore, StoredRun } from "./snapshot-run-store.js"
|
|
7
7
|
|
|
8
8
|
export interface ServeDeps {
|
|
9
9
|
store: SnapshotRunStore
|
|
@@ -102,5 +102,3 @@ export interface SelfHostServerOptions {
|
|
|
102
102
|
wakeupLeaseMs?: number
|
|
103
103
|
wakeupLeaseOwner?: string
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
export type DashboardListFilter = ListFilter
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { and, desc, eq } from "drizzle-orm"
|
|
18
18
|
import type { drizzle } from "drizzle-orm/node-postgres"
|
|
19
|
-
import type {
|
|
19
|
+
import type { RunRecord, RunRecordStore } from "./core.js"
|
|
20
20
|
|
|
21
21
|
import { snapshotRunsTable } from "./postgres-schema.js"
|
|
22
22
|
|
|
@@ -177,7 +177,3 @@ function normalizeRequiredJson<T>(value: T): T {
|
|
|
177
177
|
JSON.stringify(value, (_key, nested) => (typeof nested === "bigint" ? Number(nested) : nested)),
|
|
178
178
|
) as T
|
|
179
179
|
}
|
|
180
|
-
|
|
181
|
-
// Re-export for type discoverability — the orchestrator's status union
|
|
182
|
-
// shows up frequently in consumer code that filters runs by status.
|
|
183
|
-
export type { OrchestratorRunStatus }
|
package/src/node/scheduler.ts
CHANGED
|
@@ -2,9 +2,11 @@ export {
|
|
|
2
2
|
type CronSpec,
|
|
3
3
|
computeNextFire,
|
|
4
4
|
createScheduler,
|
|
5
|
+
// fallow-ignore-next-line unused-export
|
|
5
6
|
manifestScheduleSources,
|
|
6
7
|
nextCronFire,
|
|
7
8
|
parseCron,
|
|
9
|
+
// fallow-ignore-next-line unused-type
|
|
8
10
|
type SchedulableDeclaration,
|
|
9
11
|
type SchedulerDeps,
|
|
10
12
|
type SchedulerHandle,
|