@voyantjs/workflows-orchestrator-node 0.107.5 → 0.107.6
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/dashboard-chunks.d.ts +17 -0
- package/dist/dashboard-chunks.d.ts.map +1 -0
- package/dist/dashboard-chunks.js +19 -0
- package/dist/dashboard-http-server.d.ts +6 -0
- package/dist/dashboard-http-server.d.ts.map +1 -0
- package/dist/dashboard-http-server.js +99 -0
- package/dist/dashboard-metrics.d.ts +3 -0
- package/dist/dashboard-metrics.d.ts.map +1 -0
- package/dist/dashboard-metrics.js +26 -0
- package/dist/dashboard-request.d.ts +7 -0
- package/dist/dashboard-request.d.ts.map +1 -0
- package/dist/dashboard-request.js +436 -0
- package/dist/dashboard-server.d.ts +9 -171
- package/dist/dashboard-server.d.ts.map +1 -1
- package/dist/dashboard-server.js +7 -1229
- package/dist/dashboard-sse.d.ts +7 -0
- package/dist/dashboard-sse.d.ts.map +1 -0
- package/dist/dashboard-sse.js +134 -0
- package/dist/dashboard-static.d.ts +7 -0
- package/dist/dashboard-static.d.ts.map +1 -0
- package/dist/dashboard-static.js +89 -0
- package/dist/dashboard-types.d.ts +134 -0
- package/dist/dashboard-types.d.ts.map +1 -0
- package/dist/dashboard-types.js +1 -0
- package/dist/node-selfhost-defaults.d.ts +7 -0
- package/dist/node-selfhost-defaults.d.ts.map +1 -0
- package/dist/node-selfhost-defaults.js +8 -0
- package/dist/node-selfhost-deps.d.ts +4 -0
- package/dist/node-selfhost-deps.d.ts.map +1 -0
- package/dist/node-selfhost-deps.js +403 -0
- package/dist/node-selfhost-resume-input.d.ts +4 -0
- package/dist/node-selfhost-resume-input.d.ts.map +1 -0
- package/dist/node-selfhost-resume-input.js +20 -0
- package/dist/node-standalone-driver.d.ts.map +1 -1
- package/dist/node-standalone-driver.js +40 -3
- package/dist/node-step-runner.d.ts +3 -0
- package/dist/node-step-runner.d.ts.map +1 -0
- package/dist/node-step-runner.js +26 -0
- package/dist/postgres-manifest-store.d.ts.map +1 -1
- package/dist/postgres-manifest-store.js +6 -2
- package/dist/postgres-run-record-store.js +1 -1
- package/dist/postgres-schema.d.ts.map +1 -1
- package/dist/postgres-schema.js +2 -0
- package/dist/sleep-alarm-manager.d.ts.map +1 -1
- package/dist/sleep-alarm-manager.js +9 -1
- package/dist/store-stream.d.ts.map +1 -1
- package/dist/store-stream.js +9 -1
- package/dist/wakeup-poller.d.ts.map +1 -1
- package/dist/wakeup-poller.js +9 -1
- package/package.json +3 -3
- package/src/dashboard-chunks.ts +35 -0
- package/src/dashboard-http-server.ts +118 -0
- package/src/dashboard-metrics.ts +39 -0
- package/src/dashboard-request.ts +488 -0
- package/src/dashboard-server.ts +17 -1535
- package/src/dashboard-sse.ts +150 -0
- package/src/dashboard-static.ts +88 -0
- package/src/dashboard-types.ts +106 -0
- package/src/node-selfhost-defaults.ts +9 -0
- package/src/node-selfhost-deps.ts +495 -0
- package/src/node-selfhost-resume-input.ts +27 -0
- package/src/node-standalone-driver.ts +59 -3
- package/src/node-step-runner.ts +28 -0
- package/src/postgres-manifest-store.ts +2 -0
- package/src/postgres-run-record-store.ts +1 -1
- package/src/postgres-schema.ts +2 -0
- package/src/sleep-alarm-manager.ts +12 -1
- package/src/store-stream.ts +12 -1
- package/src/wakeup-poller.ts +12 -1
|
@@ -1,172 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
shutdown?: () => void | Promise<void>;
|
|
11
|
-
healthCheck?: () => Promise<HealthReport> | HealthReport;
|
|
12
|
-
readinessCheck?: () => Promise<HealthReport> | HealthReport;
|
|
13
|
-
collectMetrics?: () => Promise<string> | string;
|
|
14
|
-
staticDir?: string;
|
|
15
|
-
readStatic?: (path: string) => Promise<Uint8Array | null>;
|
|
16
|
-
triggerRun?: (args: {
|
|
17
|
-
workflowId: string;
|
|
18
|
-
input: unknown;
|
|
19
|
-
runId?: string;
|
|
20
|
-
tags?: string[];
|
|
21
|
-
triggeredByUserId?: string | null;
|
|
22
|
-
}) => Promise<{
|
|
23
|
-
ok: true;
|
|
24
|
-
saved: StoredRun;
|
|
25
|
-
} | {
|
|
26
|
-
ok: false;
|
|
27
|
-
message: string;
|
|
28
|
-
exitCode: number;
|
|
29
|
-
}>;
|
|
30
|
-
resumeRun?: (args: {
|
|
31
|
-
parentRunId: string;
|
|
32
|
-
workflowId?: string;
|
|
33
|
-
input?: unknown;
|
|
34
|
-
resumeFromStep?: string;
|
|
35
|
-
seedResults?: Record<string, unknown>;
|
|
36
|
-
runId?: string;
|
|
37
|
-
tags?: string[];
|
|
38
|
-
triggeredByUserId?: string | null;
|
|
39
|
-
}) => Promise<{
|
|
40
|
-
ok: true;
|
|
41
|
-
saved: StoredRun;
|
|
42
|
-
parentRunId: string;
|
|
43
|
-
resumeFromStep: string;
|
|
44
|
-
} | {
|
|
45
|
-
ok: false;
|
|
46
|
-
message: string;
|
|
47
|
-
exitCode: number;
|
|
48
|
-
}>;
|
|
49
|
-
listWorkflows?: () => {
|
|
50
|
-
id: string;
|
|
51
|
-
description?: string;
|
|
52
|
-
}[];
|
|
53
|
-
injectWaitpoint?: (args: {
|
|
54
|
-
runId: string;
|
|
55
|
-
injection: WaitpointInjection;
|
|
56
|
-
}) => Promise<{
|
|
57
|
-
ok: true;
|
|
58
|
-
saved: StoredRun;
|
|
59
|
-
} | {
|
|
60
|
-
ok: false;
|
|
61
|
-
message: string;
|
|
62
|
-
exitCode: number;
|
|
63
|
-
}>;
|
|
64
|
-
scheduler?: SchedulerHandle;
|
|
65
|
-
listSchedules?: () => {
|
|
66
|
-
workflowId: string;
|
|
67
|
-
name?: string;
|
|
68
|
-
nextAt: number;
|
|
69
|
-
done: boolean;
|
|
70
|
-
}[];
|
|
71
|
-
cancelRun?: (args: {
|
|
72
|
-
runId: string;
|
|
73
|
-
}) => Promise<{
|
|
74
|
-
ok: true;
|
|
75
|
-
saved: StoredRun;
|
|
76
|
-
} | {
|
|
77
|
-
ok: false;
|
|
78
|
-
message: string;
|
|
79
|
-
exitCode: number;
|
|
80
|
-
}>;
|
|
81
|
-
chunkBus?: ChunkBus;
|
|
82
|
-
}
|
|
83
|
-
export interface ChunkEvent {
|
|
84
|
-
runId: string;
|
|
85
|
-
chunk: {
|
|
86
|
-
streamId: string;
|
|
87
|
-
seq: number;
|
|
88
|
-
encoding: "text" | "json" | "base64";
|
|
89
|
-
chunk: unknown;
|
|
90
|
-
final: boolean;
|
|
91
|
-
at: number;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
export interface ChunkBus {
|
|
95
|
-
publish(event: ChunkEvent): void;
|
|
96
|
-
subscribe(fn: (event: ChunkEvent) => void): () => void;
|
|
97
|
-
}
|
|
98
|
-
export declare function createChunkBus(): ChunkBus;
|
|
99
|
-
export interface RequestHandlerDeps {
|
|
100
|
-
store: SnapshotRunStore;
|
|
101
|
-
healthCheck?: ServeDeps["healthCheck"];
|
|
102
|
-
readinessCheck?: ServeDeps["readinessCheck"];
|
|
103
|
-
collectMetrics?: ServeDeps["collectMetrics"];
|
|
104
|
-
readStatic?: (path: string) => Promise<Uint8Array | null>;
|
|
105
|
-
hasStaticDashboard?: boolean;
|
|
106
|
-
triggerRun?: ServeDeps["triggerRun"];
|
|
107
|
-
resumeRun?: ServeDeps["resumeRun"];
|
|
108
|
-
listWorkflows?: ServeDeps["listWorkflows"];
|
|
109
|
-
injectWaitpoint?: ServeDeps["injectWaitpoint"];
|
|
110
|
-
listSchedules?: ServeDeps["listSchedules"];
|
|
111
|
-
cancelRun?: ServeDeps["cancelRun"];
|
|
112
|
-
}
|
|
113
|
-
export interface HandlerResponse {
|
|
114
|
-
status: number;
|
|
115
|
-
headers: Record<string, string>;
|
|
116
|
-
body: string | Uint8Array;
|
|
117
|
-
}
|
|
118
|
-
export interface HealthReport {
|
|
119
|
-
ok: boolean;
|
|
120
|
-
service?: string;
|
|
121
|
-
checks?: Record<string, "ok" | "error">;
|
|
122
|
-
details?: Record<string, unknown>;
|
|
123
|
-
}
|
|
124
|
-
export interface MetricsSnapshot {
|
|
125
|
-
workflowsRegistered: number;
|
|
126
|
-
schedulesRegistered: number;
|
|
127
|
-
runsTotal: number;
|
|
128
|
-
wakeupsTotal: number;
|
|
129
|
-
runsByStatus: Record<string, number>;
|
|
130
|
-
generatedAtMs: number;
|
|
131
|
-
}
|
|
132
|
-
export declare function handleRequest(req: {
|
|
133
|
-
method: string;
|
|
134
|
-
url: string;
|
|
135
|
-
body?: string;
|
|
136
|
-
}, deps: RequestHandlerDeps): Promise<HandlerResponse>;
|
|
137
|
-
export declare function createStaticReader(rootDir: string): (path: string) => Promise<Uint8Array | null>;
|
|
138
|
-
export declare function findDashboardDir(startFrom: string): Promise<string | undefined>;
|
|
139
|
-
export interface ServeHandle {
|
|
140
|
-
close: () => Promise<void>;
|
|
141
|
-
url: string;
|
|
142
|
-
}
|
|
143
|
-
export declare function startServer(options: {
|
|
144
|
-
port: number;
|
|
145
|
-
host: string;
|
|
146
|
-
}, deps: ServeDeps): Promise<ServeHandle>;
|
|
147
|
-
export declare function handleSseStream(res: ServerResponse, stream: StoreStream, chunkBus?: ChunkBus): void;
|
|
148
|
-
export declare function handleRunSseStream(res: ServerResponse, runId: string, stream: StoreStream, chunkBus: ChunkBus | undefined, store: SnapshotRunStore): void;
|
|
149
|
-
export interface NodeSelfHostServerOptions {
|
|
150
|
-
entryFile: string;
|
|
151
|
-
port?: number;
|
|
152
|
-
host?: string;
|
|
153
|
-
staticDir?: string;
|
|
154
|
-
cacheBustEntry?: boolean;
|
|
155
|
-
/**
|
|
156
|
-
* Read-only service resolver surfaced to workflow bodies as `ctx.services`.
|
|
157
|
-
*
|
|
158
|
-
* Use this when the loaded entry file registers package workflows that
|
|
159
|
-
* resolve host-provided services, for example
|
|
160
|
-
* `ctx.services.resolve("promotions:bulk-reindex-products")`.
|
|
161
|
-
*/
|
|
162
|
-
services?: ServiceResolver;
|
|
163
|
-
store?: SnapshotRunStore;
|
|
164
|
-
databaseUrl?: string;
|
|
165
|
-
wakeupPollIntervalMs?: number;
|
|
166
|
-
wakeupLeaseMs?: number;
|
|
167
|
-
wakeupLeaseOwner?: string;
|
|
168
|
-
}
|
|
169
|
-
export declare function startNodeSelfHostServer(opts: NodeSelfHostServerOptions): Promise<ServeHandle>;
|
|
170
|
-
export declare function createNodeSelfHostDeps(opts: Pick<NodeSelfHostServerOptions, "entryFile" | "staticDir" | "cacheBustEntry" | "services" | "store" | "databaseUrl" | "wakeupPollIntervalMs" | "wakeupLeaseMs" | "wakeupLeaseOwner">): Promise<ServeDeps>;
|
|
171
|
-
export declare function renderMetrics(snapshot: MetricsSnapshot): string;
|
|
1
|
+
export type { ChunkBus, ChunkEvent } from "./dashboard-chunks.js";
|
|
2
|
+
export { createChunkBus } from "./dashboard-chunks.js";
|
|
3
|
+
export { startServer } from "./dashboard-http-server.js";
|
|
4
|
+
export { renderMetrics } from "./dashboard-metrics.js";
|
|
5
|
+
export { handleRequest } from "./dashboard-request.js";
|
|
6
|
+
export { handleRunSseStream, handleSseStream } from "./dashboard-sse.js";
|
|
7
|
+
export { createStaticReader, findDashboardDir } from "./dashboard-static.js";
|
|
8
|
+
export type { HandlerResponse, HealthReport, MetricsSnapshot, NodeSelfHostServerOptions, RequestHandlerDeps, ServeDeps, ServeHandle, } from "./dashboard-types.js";
|
|
9
|
+
export { createNodeSelfHostDeps, startNodeSelfHostServer } from "./node-selfhost-deps.js";
|
|
172
10
|
//# sourceMappingURL=dashboard-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-server.d.ts","sourceRoot":"","sources":["../src/dashboard-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard-server.d.ts","sourceRoot":"","sources":["../src/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,EACf,YAAY,EACZ,eAAe,EACf,yBAAyB,EACzB,kBAAkB,EAClB,SAAS,EACT,WAAW,GACZ,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA"}
|