@solidactions/sdk 0.1.0
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/.claude/settings.local.json +7 -0
- package/.clavix/outputs/dbos-http-sdk/full-prd.md +142 -0
- package/.clavix/outputs/dbos-http-sdk/quick-prd.md +12 -0
- package/.clavix/outputs/dbos-http-sdk/tasks.md +630 -0
- package/.clavix/outputs/prompts/dbos-http-api-20260110-033219.md +91 -0
- package/.husky/pre-commit +1 -0
- package/.prettierignore +3 -0
- package/.prettierrc +9 -0
- package/CODE_OF_CONDUCT.md +49 -0
- package/CONTRIBUTING.md +47 -0
- package/LICENSE +21 -0
- package/README.md +172 -0
- package/dist/dbos-config.schema.json +132 -0
- package/dist/schemas/system_db_schema.d.ts +73 -0
- package/dist/schemas/system_db_schema.d.ts.map +1 -0
- package/dist/schemas/system_db_schema.js +3 -0
- package/dist/schemas/system_db_schema.js.map +1 -0
- package/dist/src/adminserver.d.ts +79 -0
- package/dist/src/adminserver.d.ts.map +1 -0
- package/dist/src/adminserver.js +495 -0
- package/dist/src/adminserver.js.map +1 -0
- package/dist/src/authdecorators.d.ts +2 -0
- package/dist/src/authdecorators.d.ts.map +1 -0
- package/dist/src/authdecorators.js +48 -0
- package/dist/src/authdecorators.js.map +1 -0
- package/dist/src/cli/cli.d.ts +9 -0
- package/dist/src/cli/cli.d.ts.map +1 -0
- package/dist/src/cli/cli.js +116 -0
- package/dist/src/cli/cli.js.map +1 -0
- package/dist/src/cli/commands.d.ts +3 -0
- package/dist/src/cli/commands.d.ts.map +1 -0
- package/dist/src/cli/commands.js +46 -0
- package/dist/src/cli/commands.js.map +1 -0
- package/dist/src/client.d.ts +85 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +186 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/conductor/conductor.d.ts +28 -0
- package/dist/src/conductor/conductor.d.ts.map +1 -0
- package/dist/src/conductor/conductor.js +376 -0
- package/dist/src/conductor/conductor.js.map +1 -0
- package/dist/src/conductor/protocol.d.ts +238 -0
- package/dist/src/conductor/protocol.d.ts.map +1 -0
- package/dist/src/conductor/protocol.js +353 -0
- package/dist/src/conductor/protocol.js.map +1 -0
- package/dist/src/config.d.ts +91 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +199 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/context.d.ts +62 -0
- package/dist/src/context.d.ts.map +1 -0
- package/dist/src/context.js +118 -0
- package/dist/src/context.js.map +1 -0
- package/dist/src/database_utils.d.ts +17 -0
- package/dist/src/database_utils.d.ts.map +1 -0
- package/dist/src/database_utils.js +53 -0
- package/dist/src/database_utils.js.map +1 -0
- package/dist/src/datasource.d.ts +109 -0
- package/dist/src/datasource.d.ts.map +1 -0
- package/dist/src/datasource.js +204 -0
- package/dist/src/datasource.js.map +1 -0
- package/dist/src/dbos-executor.d.ts +189 -0
- package/dist/src/dbos-executor.d.ts.map +1 -0
- package/dist/src/dbos-executor.js +817 -0
- package/dist/src/dbos-executor.js.map +1 -0
- package/dist/src/dbos.d.ts +519 -0
- package/dist/src/dbos.d.ts.map +1 -0
- package/dist/src/dbos.js +1282 -0
- package/dist/src/dbos.js.map +1 -0
- package/dist/src/debouncer.d.ts +33 -0
- package/dist/src/debouncer.d.ts.map +1 -0
- package/dist/src/debouncer.js +170 -0
- package/dist/src/debouncer.js.map +1 -0
- package/dist/src/debugpoint.d.ts +26 -0
- package/dist/src/debugpoint.d.ts.map +1 -0
- package/dist/src/debugpoint.js +65 -0
- package/dist/src/debugpoint.js.map +1 -0
- package/dist/src/decorators.d.ts +219 -0
- package/dist/src/decorators.d.ts.map +1 -0
- package/dist/src/decorators.js +873 -0
- package/dist/src/decorators.js.map +1 -0
- package/dist/src/error.d.ts +130 -0
- package/dist/src/error.d.ts.map +1 -0
- package/dist/src/error.js +290 -0
- package/dist/src/error.js.map +1 -0
- package/dist/src/http_client.d.ts +82 -0
- package/dist/src/http_client.d.ts.map +1 -0
- package/dist/src/http_client.js +286 -0
- package/dist/src/http_client.js.map +1 -0
- package/dist/src/http_system_database.d.ts +84 -0
- package/dist/src/http_system_database.d.ts.map +1 -0
- package/dist/src/http_system_database.js +429 -0
- package/dist/src/http_system_database.js.map +1 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +53 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/scheduler/crontab.d.ts +14 -0
- package/dist/src/scheduler/crontab.d.ts.map +1 -0
- package/dist/src/scheduler/crontab.js +308 -0
- package/dist/src/scheduler/crontab.js.map +1 -0
- package/dist/src/scheduler/scheduler.d.ts +41 -0
- package/dist/src/scheduler/scheduler.d.ts.map +1 -0
- package/dist/src/scheduler/scheduler.js +165 -0
- package/dist/src/scheduler/scheduler.js.map +1 -0
- package/dist/src/serialization.d.ts +57 -0
- package/dist/src/serialization.d.ts.map +1 -0
- package/dist/src/serialization.js +306 -0
- package/dist/src/serialization.js.map +1 -0
- package/dist/src/solidactions-executor.d.ts +177 -0
- package/dist/src/solidactions-executor.d.ts.map +1 -0
- package/dist/src/solidactions-executor.js +817 -0
- package/dist/src/solidactions-executor.js.map +1 -0
- package/dist/src/solidactions.d.ts +519 -0
- package/dist/src/solidactions.d.ts.map +1 -0
- package/dist/src/solidactions.js +1284 -0
- package/dist/src/solidactions.js.map +1 -0
- package/dist/src/step.d.ts +16 -0
- package/dist/src/step.d.ts.map +1 -0
- package/dist/src/step.js +3 -0
- package/dist/src/step.js.map +1 -0
- package/dist/src/system_database.d.ts +141 -0
- package/dist/src/system_database.d.ts.map +1 -0
- package/dist/src/system_database.js +25 -0
- package/dist/src/system_database.js.map +1 -0
- package/dist/src/telemetry/collector.d.ts +13 -0
- package/dist/src/telemetry/collector.d.ts.map +1 -0
- package/dist/src/telemetry/collector.js +63 -0
- package/dist/src/telemetry/collector.js.map +1 -0
- package/dist/src/telemetry/exporters.d.ts +13 -0
- package/dist/src/telemetry/exporters.d.ts.map +1 -0
- package/dist/src/telemetry/exporters.js +101 -0
- package/dist/src/telemetry/exporters.js.map +1 -0
- package/dist/src/telemetry/logs.d.ts +52 -0
- package/dist/src/telemetry/logs.d.ts.map +1 -0
- package/dist/src/telemetry/logs.js +287 -0
- package/dist/src/telemetry/logs.js.map +1 -0
- package/dist/src/telemetry/traces.d.ts +52 -0
- package/dist/src/telemetry/traces.d.ts.map +1 -0
- package/dist/src/telemetry/traces.js +150 -0
- package/dist/src/telemetry/traces.js.map +1 -0
- package/dist/src/utils.d.ts +26 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +136 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/src/wfqueue.d.ts +64 -0
- package/dist/src/wfqueue.d.ts.map +1 -0
- package/dist/src/wfqueue.js +147 -0
- package/dist/src/wfqueue.js.map +1 -0
- package/dist/src/workflow.d.ts +154 -0
- package/dist/src/workflow.d.ts.map +1 -0
- package/dist/src/workflow.js +99 -0
- package/dist/src/workflow.js.map +1 -0
- package/dist/src/workflow_management.d.ts +15 -0
- package/dist/src/workflow_management.d.ts.map +1 -0
- package/dist/src/workflow_management.js +87 -0
- package/dist/src/workflow_management.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/api-schema.md +1441 -0
- package/docs/migration-guide.md +460 -0
- package/docs/phase-14-changes.md +156 -0
- package/docs/solidsteps-ai-prompt.md +534 -0
- package/eslint.config.cjs +50 -0
- package/package.json +84 -0
- package/solidactions-ai-prompt.md +1504 -0
- package/solidactions-config.schema.json +132 -0
- package/solidactions-test-config.yaml +15 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Conductor = void 0;
|
|
30
|
+
const utils_1 = require("../utils");
|
|
31
|
+
const ws_1 = __importDefault(require("ws"));
|
|
32
|
+
const protocol = __importStar(require("./protocol"));
|
|
33
|
+
const node_os_1 = require("node:os");
|
|
34
|
+
const workflow_management_1 = require("../workflow_management");
|
|
35
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
36
|
+
class Conductor {
|
|
37
|
+
solidActionsExec;
|
|
38
|
+
conductorKey;
|
|
39
|
+
conductorURL;
|
|
40
|
+
url;
|
|
41
|
+
websocket = undefined;
|
|
42
|
+
isShuttingDown = false; // Is in the process of shutting down the connection
|
|
43
|
+
isClosed = false; // Has the connection been fully closed
|
|
44
|
+
pingPeriodMs = 20000; // Time in milliseconds to wait before sending a ping message to the conductor
|
|
45
|
+
pingTimeoutMs = 15000; // Time in milliseconds to wait for a response to a ping message before considering the connection dead
|
|
46
|
+
pingIntervalTimeout = undefined; // Combined interval and timeout for pinging Conductor
|
|
47
|
+
reconnectDelayMs = 1000;
|
|
48
|
+
reconnectTimeout = undefined;
|
|
49
|
+
constructor(solidActionsExec, conductorKey, conductorURL) {
|
|
50
|
+
this.solidActionsExec = solidActionsExec;
|
|
51
|
+
this.conductorKey = conductorKey;
|
|
52
|
+
this.conductorURL = conductorURL;
|
|
53
|
+
const appName = solidActionsExec.appName;
|
|
54
|
+
(0, node_assert_1.default)(appName, 'Application name must be set in configuration in order to use SolidActions Conductor');
|
|
55
|
+
const cleanConductorURL = conductorURL.replace(/\/+$/, '');
|
|
56
|
+
this.url = `${cleanConductorURL}/websocket/${appName}/${conductorKey}`;
|
|
57
|
+
}
|
|
58
|
+
resetWebsocket(currWebsocket, currPing) {
|
|
59
|
+
clearInterval(currPing?.interval);
|
|
60
|
+
clearTimeout(currPing?.timeout);
|
|
61
|
+
if (currWebsocket) {
|
|
62
|
+
currWebsocket.terminate(); // Terminate the existing connection
|
|
63
|
+
if (this.websocket === currWebsocket) {
|
|
64
|
+
// Only clear if it's the same websocket
|
|
65
|
+
this.websocket = undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (this.reconnectTimeout || this.isShuttingDown) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.solidActionsExec.logger.debug(`Reconnecting in ${this.reconnectDelayMs / 1000} second`);
|
|
72
|
+
this.reconnectTimeout = setTimeout(() => {
|
|
73
|
+
this.dispatchLoop();
|
|
74
|
+
}, this.reconnectDelayMs);
|
|
75
|
+
}
|
|
76
|
+
setPingInterval(currWebsocket, currPing) {
|
|
77
|
+
// Clear any existing ping interval to avoid multiple intervals being set
|
|
78
|
+
clearInterval(currPing.interval);
|
|
79
|
+
clearTimeout(currPing.timeout);
|
|
80
|
+
currPing.interval = setInterval(() => {
|
|
81
|
+
// Set ping timeout before sending ping. This prevents the socket from hanging at a non-open state indefinitely
|
|
82
|
+
currPing.timeout = setTimeout(() => {
|
|
83
|
+
if (this.isShuttingDown) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
else if (this.reconnectTimeout === undefined) {
|
|
87
|
+
// Otherwise, try to reconnect if we haven't already
|
|
88
|
+
this.solidActionsExec.logger.warn('Connection to conductor lost. Reconnecting...');
|
|
89
|
+
this.resetWebsocket(currWebsocket, currPing);
|
|
90
|
+
}
|
|
91
|
+
}, this.pingTimeoutMs);
|
|
92
|
+
// Only ping if the connection is open
|
|
93
|
+
if (currWebsocket.readyState === ws_1.default.OPEN) {
|
|
94
|
+
this.solidActionsExec.logger.debug('Sending ping to conductor');
|
|
95
|
+
currWebsocket.ping();
|
|
96
|
+
}
|
|
97
|
+
}, this.pingPeriodMs);
|
|
98
|
+
}
|
|
99
|
+
dispatchLoop() {
|
|
100
|
+
if (this.websocket &&
|
|
101
|
+
(this.websocket.readyState === ws_1.default.OPEN || this.websocket.readyState === ws_1.default.CONNECTING)) {
|
|
102
|
+
this.solidActionsExec.logger.warn('Conductor websocket already exists');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
clearTimeout(this.pingIntervalTimeout?.timeout);
|
|
106
|
+
clearInterval(this.pingIntervalTimeout?.interval);
|
|
107
|
+
clearTimeout(this.reconnectTimeout);
|
|
108
|
+
this.reconnectTimeout = undefined;
|
|
109
|
+
if (this.isShuttingDown) {
|
|
110
|
+
this.solidActionsExec.logger.debug('Not starting dispatch loop as conductor is shutting down');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
this.solidActionsExec.logger.debug(`Connecting to conductor at ${this.url}`);
|
|
115
|
+
// Start a new websocket connection
|
|
116
|
+
const currWebsocket = new ws_1.default(this.url, { handshakeTimeout: 5000 });
|
|
117
|
+
this.websocket = currWebsocket;
|
|
118
|
+
// Start ping interval
|
|
119
|
+
const currPing = { interval: undefined, timeout: undefined };
|
|
120
|
+
this.setPingInterval(currWebsocket, currPing);
|
|
121
|
+
this.pingIntervalTimeout = currPing;
|
|
122
|
+
currWebsocket.on('open', () => {
|
|
123
|
+
this.solidActionsExec.logger.debug('Opened connection to SolidActions conductor');
|
|
124
|
+
clearTimeout(currPing.timeout);
|
|
125
|
+
});
|
|
126
|
+
currWebsocket.on('pong', () => {
|
|
127
|
+
this.solidActionsExec.logger.debug('Received pong from conductor');
|
|
128
|
+
clearTimeout(currPing.timeout);
|
|
129
|
+
});
|
|
130
|
+
currWebsocket.on('message', async (data) => {
|
|
131
|
+
this.solidActionsExec.logger.debug(`Received message from conductor: ${data}`);
|
|
132
|
+
const baseMsg = JSON.parse(data);
|
|
133
|
+
const msgType = baseMsg.type;
|
|
134
|
+
let errorMsg = undefined;
|
|
135
|
+
clearTimeout(currPing.timeout);
|
|
136
|
+
switch (msgType) {
|
|
137
|
+
case protocol.MessageType.EXECUTOR_INFO:
|
|
138
|
+
const infoResp = new protocol.ExecutorInfoResponse(baseMsg.request_id, utils_1.globalParams.executorID, utils_1.globalParams.appVersion, (0, node_os_1.hostname)(), 'typescript', utils_1.globalParams.solidActionsVersion);
|
|
139
|
+
currWebsocket.send(JSON.stringify(infoResp));
|
|
140
|
+
this.solidActionsExec.logger.info('Connected to SolidActions conductor');
|
|
141
|
+
break;
|
|
142
|
+
case protocol.MessageType.RECOVERY:
|
|
143
|
+
const recoveryMsg = baseMsg;
|
|
144
|
+
let success = true;
|
|
145
|
+
try {
|
|
146
|
+
await this.solidActionsExec.recoverPendingWorkflows(recoveryMsg.executor_ids);
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
errorMsg = `Exception encountered when recovering workflows: ${e.message}`;
|
|
150
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
151
|
+
success = false;
|
|
152
|
+
}
|
|
153
|
+
const recoveryResp = new protocol.RecoveryResponse(baseMsg.request_id, success, errorMsg);
|
|
154
|
+
currWebsocket.send(JSON.stringify(recoveryResp));
|
|
155
|
+
break;
|
|
156
|
+
case protocol.MessageType.CANCEL:
|
|
157
|
+
const cancelMsg = baseMsg;
|
|
158
|
+
let cancelSuccess = true;
|
|
159
|
+
try {
|
|
160
|
+
await this.solidActionsExec.cancelWorkflow(cancelMsg.workflow_id);
|
|
161
|
+
}
|
|
162
|
+
catch (e) {
|
|
163
|
+
errorMsg = `Exception encountered when cancelling workflow ${cancelMsg.workflow_id}: ${e.message}`;
|
|
164
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
165
|
+
cancelSuccess = false;
|
|
166
|
+
}
|
|
167
|
+
const cancelResp = new protocol.CancelResponse(baseMsg.request_id, cancelSuccess, errorMsg);
|
|
168
|
+
currWebsocket.send(JSON.stringify(cancelResp));
|
|
169
|
+
break;
|
|
170
|
+
case protocol.MessageType.RESUME:
|
|
171
|
+
const resumeMsg = baseMsg;
|
|
172
|
+
let resumeSuccess = true;
|
|
173
|
+
try {
|
|
174
|
+
await this.solidActionsExec.resumeWorkflow(resumeMsg.workflow_id);
|
|
175
|
+
}
|
|
176
|
+
catch (e) {
|
|
177
|
+
errorMsg = `Exception encountered when resuming workflow ${resumeMsg.workflow_id}: ${e.message}`;
|
|
178
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
179
|
+
resumeSuccess = false;
|
|
180
|
+
}
|
|
181
|
+
const resumeResp = new protocol.ResumeResponse(baseMsg.request_id, resumeSuccess, errorMsg);
|
|
182
|
+
currWebsocket.send(JSON.stringify(resumeResp));
|
|
183
|
+
break;
|
|
184
|
+
case protocol.MessageType.RESTART:
|
|
185
|
+
const restartMsg = baseMsg;
|
|
186
|
+
let restartSuccess = true;
|
|
187
|
+
try {
|
|
188
|
+
await this.solidActionsExec.forkWorkflow(restartMsg.workflow_id, 0);
|
|
189
|
+
}
|
|
190
|
+
catch (e) {
|
|
191
|
+
errorMsg = `Exception encountered when restarting workflow ${restartMsg.workflow_id}: ${e.message}`;
|
|
192
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
193
|
+
restartSuccess = false;
|
|
194
|
+
}
|
|
195
|
+
const restartResp = new protocol.RestartResponse(baseMsg.request_id, restartSuccess, errorMsg);
|
|
196
|
+
currWebsocket.send(JSON.stringify(restartResp));
|
|
197
|
+
break;
|
|
198
|
+
case protocol.MessageType.FORK_WORKFLOW:
|
|
199
|
+
const forkMsg = baseMsg;
|
|
200
|
+
let newWorkflowID = forkMsg.body.new_workflow_id;
|
|
201
|
+
try {
|
|
202
|
+
newWorkflowID = await this.solidActionsExec.forkWorkflow(forkMsg.body.workflow_id, forkMsg.body.start_step, {
|
|
203
|
+
newWorkflowID: newWorkflowID,
|
|
204
|
+
applicationVersion: forkMsg.body.application_version,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
errorMsg = `Exception encountered when forking workflow ${forkMsg.body.workflow_id} to new workflow ${newWorkflowID} on step ${forkMsg.body.start_step}, app version ${forkMsg.body.application_version}: ${e.message}`;
|
|
209
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
210
|
+
newWorkflowID = undefined;
|
|
211
|
+
}
|
|
212
|
+
const forkResp = new protocol.ForkWorkflowResponse(baseMsg.request_id, newWorkflowID, errorMsg);
|
|
213
|
+
currWebsocket.send(JSON.stringify(forkResp));
|
|
214
|
+
break;
|
|
215
|
+
case protocol.MessageType.LIST_WORKFLOWS:
|
|
216
|
+
const listWFMsg = baseMsg;
|
|
217
|
+
const body = listWFMsg.body;
|
|
218
|
+
const listWFReq = {
|
|
219
|
+
workflowIDs: body.workflow_uuids,
|
|
220
|
+
workflowName: body.workflow_name,
|
|
221
|
+
authenticatedUser: body.authenticated_user,
|
|
222
|
+
startTime: body.start_time,
|
|
223
|
+
endTime: body.end_time,
|
|
224
|
+
status: body.status,
|
|
225
|
+
applicationVersion: body.application_version,
|
|
226
|
+
forkedFrom: body.forked_from,
|
|
227
|
+
limit: body.limit,
|
|
228
|
+
offset: body.offset,
|
|
229
|
+
sortDesc: body.sort_desc,
|
|
230
|
+
loadInput: body.load_input ?? false, // Default to false if not provided
|
|
231
|
+
loadOutput: body.load_output ?? false, // Default to false if not provided
|
|
232
|
+
};
|
|
233
|
+
let workflowsOutput = [];
|
|
234
|
+
try {
|
|
235
|
+
const workflows = await this.solidActionsExec.listWorkflows(listWFReq);
|
|
236
|
+
workflowsOutput = workflows.map((wf) => new protocol.WorkflowsOutput(wf));
|
|
237
|
+
}
|
|
238
|
+
catch (e) {
|
|
239
|
+
errorMsg = `Exception encountered when listing workflows: ${e.message}`;
|
|
240
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
241
|
+
}
|
|
242
|
+
const wfsResp = new protocol.ListWorkflowsResponse(listWFMsg.request_id, workflowsOutput, errorMsg);
|
|
243
|
+
currWebsocket.send(JSON.stringify(wfsResp));
|
|
244
|
+
break;
|
|
245
|
+
case protocol.MessageType.GET_WORKFLOW:
|
|
246
|
+
const getWFMsg = baseMsg;
|
|
247
|
+
let wfOutput = undefined;
|
|
248
|
+
try {
|
|
249
|
+
const workflow = await this.solidActionsExec.getWorkflowStatus(getWFMsg.workflow_id);
|
|
250
|
+
if (workflow) {
|
|
251
|
+
wfOutput = new protocol.WorkflowsOutput(workflow);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
catch (e) {
|
|
255
|
+
errorMsg = `Exception encountered when getting workflow ${getWFMsg.workflow_id}: ${e.message}`;
|
|
256
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
257
|
+
}
|
|
258
|
+
const getWFResp = new protocol.GetWorkflowResponse(getWFMsg.request_id, wfOutput, errorMsg);
|
|
259
|
+
currWebsocket.send(JSON.stringify(getWFResp));
|
|
260
|
+
break;
|
|
261
|
+
case protocol.MessageType.EXIST_PENDING_WORKFLOWS:
|
|
262
|
+
const existPendingMsg = baseMsg;
|
|
263
|
+
let hasPendingWFs = false;
|
|
264
|
+
try {
|
|
265
|
+
const pendingWFs = await this.solidActionsExec.systemDatabase.getPendingWorkflows(existPendingMsg.executor_id, existPendingMsg.application_version);
|
|
266
|
+
hasPendingWFs = pendingWFs.length > 0;
|
|
267
|
+
}
|
|
268
|
+
catch (e) {
|
|
269
|
+
errorMsg = `Exception encountered when checking for pending workflows: ${e.message}`;
|
|
270
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
271
|
+
}
|
|
272
|
+
const existPendingResp = new protocol.ExistPendingWorkflowsResponse(baseMsg.request_id, hasPendingWFs, errorMsg);
|
|
273
|
+
currWebsocket.send(JSON.stringify(existPendingResp));
|
|
274
|
+
break;
|
|
275
|
+
case protocol.MessageType.LIST_STEPS:
|
|
276
|
+
const listStepsMessage = baseMsg;
|
|
277
|
+
let workflowSteps = undefined;
|
|
278
|
+
try {
|
|
279
|
+
const stepsInfo = await this.solidActionsExec.listWorkflowSteps(listStepsMessage.workflow_id);
|
|
280
|
+
workflowSteps = stepsInfo?.map((i) => new protocol.WorkflowSteps(i));
|
|
281
|
+
}
|
|
282
|
+
catch (e) {
|
|
283
|
+
errorMsg = `Exception encountered when listing steps ${listStepsMessage.workflow_id}: ${e.message}`;
|
|
284
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
285
|
+
}
|
|
286
|
+
const listStepsResponse = new protocol.ListStepsResponse(listStepsMessage.request_id, workflowSteps, errorMsg);
|
|
287
|
+
currWebsocket.send(JSON.stringify(listStepsResponse));
|
|
288
|
+
break;
|
|
289
|
+
case protocol.MessageType.RETENTION:
|
|
290
|
+
const retentionMessage = baseMsg;
|
|
291
|
+
let retentionSuccess = true;
|
|
292
|
+
try {
|
|
293
|
+
await this.solidActionsExec.systemDatabase.garbageCollect(retentionMessage.body.gc_cutoff_epoch_ms, retentionMessage.body.gc_rows_threshold);
|
|
294
|
+
if (retentionMessage.body.timeout_cutoff_epoch_ms) {
|
|
295
|
+
await (0, workflow_management_1.globalTimeout)(this.solidActionsExec.systemDatabase, retentionMessage.body.timeout_cutoff_epoch_ms);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
catch (e) {
|
|
299
|
+
retentionSuccess = false;
|
|
300
|
+
errorMsg = `Exception encountered during enforcing retention policy: ${e.message}`;
|
|
301
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
302
|
+
}
|
|
303
|
+
const retentionResponse = new protocol.RetentionResponse(retentionMessage.request_id, retentionSuccess, errorMsg);
|
|
304
|
+
currWebsocket.send(JSON.stringify(retentionResponse));
|
|
305
|
+
break;
|
|
306
|
+
case protocol.MessageType.GET_METRICS:
|
|
307
|
+
const getMetricsMessage = baseMsg;
|
|
308
|
+
this.solidActionsExec.logger.debug(`Received metrics request for time range ${getMetricsMessage.start_time} to ${getMetricsMessage.end_time}`);
|
|
309
|
+
let metricsData = [];
|
|
310
|
+
if (getMetricsMessage.metric_class === 'workflow_step_count') {
|
|
311
|
+
try {
|
|
312
|
+
const sysMetrics = await this.solidActionsExec.systemDatabase.getMetrics(getMetricsMessage.start_time, getMetricsMessage.end_time);
|
|
313
|
+
metricsData = sysMetrics.map((m) => new protocol.MetricDataOutput(m.metricType, m.metricName, m.value));
|
|
314
|
+
}
|
|
315
|
+
catch (e) {
|
|
316
|
+
errorMsg = `Exception encountered when getting metrics: ${e.message}`;
|
|
317
|
+
this.solidActionsExec.logger.error(errorMsg);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
errorMsg = `Unexpected metric class: ${getMetricsMessage.metric_class}`;
|
|
322
|
+
this.solidActionsExec.logger.warn(errorMsg);
|
|
323
|
+
}
|
|
324
|
+
const getMetricsResponse = new protocol.GetMetricsResponse(getMetricsMessage.request_id, metricsData, errorMsg);
|
|
325
|
+
currWebsocket.send(JSON.stringify(getMetricsResponse));
|
|
326
|
+
break;
|
|
327
|
+
default:
|
|
328
|
+
this.solidActionsExec.logger.warn(`Unknown message type: ${baseMsg.type}`);
|
|
329
|
+
// Still need to send a response to the conductor
|
|
330
|
+
const unknownResp = new protocol.BaseResponse(baseMsg.type, baseMsg.request_id, 'Unknown message type');
|
|
331
|
+
currWebsocket.send(JSON.stringify(unknownResp));
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
currWebsocket.on('close', () => {
|
|
335
|
+
if (this.isShuttingDown) {
|
|
336
|
+
this.solidActionsExec.logger.info('Shutdown Conductor connection');
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
else if (this.reconnectTimeout === undefined) {
|
|
340
|
+
this.solidActionsExec.logger.warn('Connection to conductor lost. Reconnecting.');
|
|
341
|
+
this.resetWebsocket(currWebsocket, currPing);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
currWebsocket.on('unexpected-response', (_, res) => {
|
|
345
|
+
this.solidActionsExec.logger.warn(`Unexpected response from conductor: ${res.statusCode} ${res.statusMessage}}`);
|
|
346
|
+
if (this.reconnectTimeout === undefined) {
|
|
347
|
+
this.resetWebsocket(currWebsocket, currPing);
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
currWebsocket.on('error', (err) => {
|
|
351
|
+
this.solidActionsExec.logger.warn(`Unexpected exception in connection to conductor. Reconnecting: ${err.message}`);
|
|
352
|
+
if (this.reconnectTimeout === undefined) {
|
|
353
|
+
this.resetWebsocket(currWebsocket, currPing);
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
catch (e) {
|
|
358
|
+
this.solidActionsExec.logger.warn(`Error in conductor loop. Reconnecting: ${e.message}`);
|
|
359
|
+
if (this.reconnectTimeout === undefined) {
|
|
360
|
+
this.resetWebsocket(this.websocket, this.pingIntervalTimeout);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
stop() {
|
|
365
|
+
this.isShuttingDown = true;
|
|
366
|
+
clearInterval(this.pingIntervalTimeout?.interval);
|
|
367
|
+
clearTimeout(this.pingIntervalTimeout?.timeout);
|
|
368
|
+
clearTimeout(this.reconnectTimeout);
|
|
369
|
+
if (this.websocket) {
|
|
370
|
+
this.websocket.close();
|
|
371
|
+
}
|
|
372
|
+
this.isClosed = true;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
exports.Conductor = Conductor;
|
|
376
|
+
//# sourceMappingURL=conductor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conductor.js","sourceRoot":"","sources":["../../../src/conductor/conductor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oCAAwC;AACxC,4CAA2B;AAC3B,qDAAuC;AAEvC,qCAAmC;AACnC,gEAAuD;AACvD,8DAAiC;AAOjC,MAAa,SAAS;IAYT;IACA;IACA;IAbX,GAAG,CAAS;IACZ,SAAS,GAA0B,SAAS,CAAC;IAC7C,cAAc,GAAG,KAAK,CAAC,CAAC,oDAAoD;IAC5E,QAAQ,GAAG,KAAK,CAAC,CAAC,uCAAuC;IACzD,YAAY,GAAG,KAAK,CAAC,CAAC,8EAA8E;IACpG,aAAa,GAAG,KAAK,CAAC,CAAC,uGAAuG;IAC9H,mBAAmB,GAAgC,SAAS,CAAC,CAAC,sDAAsD;IACpH,gBAAgB,GAAG,IAAI,CAAC;IACxB,gBAAgB,GAA+B,SAAS,CAAC;IAEzD,YACW,gBAAsC,EACtC,YAAoB,EACpB,YAAoB;QAFpB,qBAAgB,GAAhB,gBAAgB,CAAsB;QACtC,iBAAY,GAAZ,YAAY,CAAQ;QACpB,iBAAY,GAAZ,YAAY,CAAQ;QAE7B,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;QACzC,IAAA,qBAAM,EAAC,OAAO,EAAE,sFAAsF,CAAC,CAAC;QACxG,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,GAAG,GAAG,GAAG,iBAAiB,cAAc,OAAO,IAAI,YAAY,EAAE,CAAC;IACzE,CAAC;IAED,cAAc,CAAC,aAAyB,EAAE,QAA0B;QAClE,aAAa,CAAC,QAAQ,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MAAM,CAAC,IAAI,CAC/B,kEAAkE,GAAG,CAAC,OAAO,EAAE,CAChF,CAAC;gBACF,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;oBACxC,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;gBAC/C,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA2C,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACpG,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACxC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI;QACF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;QAClD,YAAY,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QAChD,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACpC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACzB,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CACF;AA9XD,8BA8XC"}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import type { StepInfo, WorkflowStatus } from '../workflow';
|
|
2
|
+
export declare enum MessageType {
|
|
3
|
+
EXECUTOR_INFO = "executor_info",
|
|
4
|
+
RECOVERY = "recovery",
|
|
5
|
+
CANCEL = "cancel",
|
|
6
|
+
LIST_WORKFLOWS = "list_workflows",
|
|
7
|
+
LIST_QUEUED_WORKFLOWS = "list_queued_workflows",
|
|
8
|
+
RESUME = "resume",
|
|
9
|
+
RESTART = "restart",
|
|
10
|
+
GET_WORKFLOW = "get_workflow",
|
|
11
|
+
EXIST_PENDING_WORKFLOWS = "exist_pending_workflows",
|
|
12
|
+
LIST_STEPS = "list_steps",
|
|
13
|
+
FORK_WORKFLOW = "fork_workflow",
|
|
14
|
+
RETENTION = "retention",
|
|
15
|
+
GET_METRICS = "get_metrics"
|
|
16
|
+
}
|
|
17
|
+
export interface BaseMessage {
|
|
18
|
+
type: MessageType;
|
|
19
|
+
request_id: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class BaseResponse implements BaseMessage {
|
|
22
|
+
type: MessageType;
|
|
23
|
+
request_id: string;
|
|
24
|
+
error_message?: string;
|
|
25
|
+
constructor(type: MessageType, request_id: string, error_message?: string);
|
|
26
|
+
}
|
|
27
|
+
export declare class ExecutorInfoResponse extends BaseResponse {
|
|
28
|
+
executor_id: string;
|
|
29
|
+
application_version: string;
|
|
30
|
+
hostname: string;
|
|
31
|
+
language: string;
|
|
32
|
+
solidactions_version: string;
|
|
33
|
+
constructor(request_id: string, executor_id: string, application_version: string, hostname: string, language: string, solidactions_version: string, error_message?: string);
|
|
34
|
+
}
|
|
35
|
+
export declare class RecoveryRequest implements BaseMessage {
|
|
36
|
+
type: MessageType;
|
|
37
|
+
request_id: string;
|
|
38
|
+
executor_ids: string[];
|
|
39
|
+
constructor(request_id: string, executor_ids: string[]);
|
|
40
|
+
}
|
|
41
|
+
export declare class RecoveryResponse extends BaseResponse {
|
|
42
|
+
success: boolean;
|
|
43
|
+
constructor(request_id: string, success: boolean, error_message?: string);
|
|
44
|
+
}
|
|
45
|
+
export declare class CancelRequest implements BaseMessage {
|
|
46
|
+
type: MessageType;
|
|
47
|
+
request_id: string;
|
|
48
|
+
workflow_id: string;
|
|
49
|
+
constructor(request_id: string, workflow_id: string);
|
|
50
|
+
}
|
|
51
|
+
export declare class CancelResponse extends BaseResponse {
|
|
52
|
+
success: boolean;
|
|
53
|
+
constructor(request_id: string, success: boolean, error_message?: string);
|
|
54
|
+
}
|
|
55
|
+
export declare class ResumeRequest implements BaseMessage {
|
|
56
|
+
type: MessageType;
|
|
57
|
+
request_id: string;
|
|
58
|
+
workflow_id: string;
|
|
59
|
+
constructor(request_id: string, workflow_id: string);
|
|
60
|
+
}
|
|
61
|
+
export declare class ResumeResponse extends BaseResponse {
|
|
62
|
+
success: boolean;
|
|
63
|
+
constructor(request_id: string, success: boolean, error_message?: string);
|
|
64
|
+
}
|
|
65
|
+
export declare class RestartRequest implements BaseMessage {
|
|
66
|
+
type: MessageType;
|
|
67
|
+
request_id: string;
|
|
68
|
+
workflow_id: string;
|
|
69
|
+
constructor(request_id: string, workflow_id: string);
|
|
70
|
+
}
|
|
71
|
+
export declare class RestartResponse extends BaseResponse {
|
|
72
|
+
success: boolean;
|
|
73
|
+
constructor(request_id: string, success: boolean, error_message?: string);
|
|
74
|
+
}
|
|
75
|
+
export interface ListWorkflowsBody {
|
|
76
|
+
workflow_uuids: string[];
|
|
77
|
+
workflow_name?: string;
|
|
78
|
+
authenticated_user?: string;
|
|
79
|
+
start_time?: string;
|
|
80
|
+
end_time?: string;
|
|
81
|
+
status?: string;
|
|
82
|
+
application_version?: string;
|
|
83
|
+
forked_from?: string;
|
|
84
|
+
limit?: number;
|
|
85
|
+
offset?: number;
|
|
86
|
+
sort_desc: boolean;
|
|
87
|
+
load_input?: boolean;
|
|
88
|
+
load_output?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export declare class WorkflowsOutput {
|
|
91
|
+
WorkflowUUID: string;
|
|
92
|
+
Status?: string;
|
|
93
|
+
WorkflowName?: string;
|
|
94
|
+
WorkflowClassName?: string;
|
|
95
|
+
WorkflowConfigName?: string;
|
|
96
|
+
AuthenticatedUser?: string;
|
|
97
|
+
AssumedRole?: string;
|
|
98
|
+
AuthenticatedRoles?: string;
|
|
99
|
+
Input?: string;
|
|
100
|
+
Output?: string;
|
|
101
|
+
Request?: string;
|
|
102
|
+
Error?: string;
|
|
103
|
+
CreatedAt?: string;
|
|
104
|
+
UpdatedAt?: string;
|
|
105
|
+
QueueName?: string;
|
|
106
|
+
ApplicationVersion?: string;
|
|
107
|
+
ExecutorID?: string;
|
|
108
|
+
WorkflowTimeoutMS?: string;
|
|
109
|
+
WorkflowDeadlineEpochMS?: string;
|
|
110
|
+
DeduplicationID?: string;
|
|
111
|
+
Priority?: string;
|
|
112
|
+
QueuePartitionKey?: string;
|
|
113
|
+
ForkedFrom?: string;
|
|
114
|
+
constructor(info: WorkflowStatus);
|
|
115
|
+
}
|
|
116
|
+
export declare class WorkflowSteps {
|
|
117
|
+
function_id: number;
|
|
118
|
+
function_name: string;
|
|
119
|
+
output?: string;
|
|
120
|
+
error?: string;
|
|
121
|
+
child_workflow_id?: string;
|
|
122
|
+
started_at_epoch_ms?: string;
|
|
123
|
+
completed_at_epoch_ms?: string;
|
|
124
|
+
constructor(info: StepInfo);
|
|
125
|
+
}
|
|
126
|
+
export declare class ListWorkflowsRequest implements BaseMessage {
|
|
127
|
+
type: MessageType;
|
|
128
|
+
request_id: string;
|
|
129
|
+
body: ListWorkflowsBody;
|
|
130
|
+
constructor(request_id: string, body: ListWorkflowsBody);
|
|
131
|
+
}
|
|
132
|
+
export declare class ListWorkflowsResponse extends BaseResponse {
|
|
133
|
+
output: WorkflowsOutput[];
|
|
134
|
+
constructor(request_id: string, output: WorkflowsOutput[], error_message?: string);
|
|
135
|
+
}
|
|
136
|
+
export interface ListQueuedWorkflowsBody {
|
|
137
|
+
workflow_name?: string;
|
|
138
|
+
start_time?: string;
|
|
139
|
+
end_time?: string;
|
|
140
|
+
status?: string;
|
|
141
|
+
forked_from?: string;
|
|
142
|
+
queue_name?: string;
|
|
143
|
+
limit?: number;
|
|
144
|
+
offset?: number;
|
|
145
|
+
sort_desc: boolean;
|
|
146
|
+
load_input?: boolean;
|
|
147
|
+
}
|
|
148
|
+
export declare class ListQueuedWorkflowsRequest implements BaseMessage {
|
|
149
|
+
type: MessageType;
|
|
150
|
+
request_id: string;
|
|
151
|
+
body: ListQueuedWorkflowsBody;
|
|
152
|
+
constructor(request_id: string, body: ListQueuedWorkflowsBody);
|
|
153
|
+
}
|
|
154
|
+
export declare class ListQueuedWorkflowsResponse extends BaseResponse {
|
|
155
|
+
output: WorkflowsOutput[];
|
|
156
|
+
constructor(request_id: string, output: WorkflowsOutput[], error_message?: string);
|
|
157
|
+
}
|
|
158
|
+
export declare class GetWorkflowRequest implements BaseMessage {
|
|
159
|
+
type: MessageType;
|
|
160
|
+
request_id: string;
|
|
161
|
+
workflow_id: string;
|
|
162
|
+
constructor(request_id: string, workflow_id: string);
|
|
163
|
+
}
|
|
164
|
+
export declare class GetWorkflowResponse extends BaseResponse {
|
|
165
|
+
output?: WorkflowsOutput;
|
|
166
|
+
constructor(request_id: string, output?: WorkflowsOutput, error_message?: string);
|
|
167
|
+
}
|
|
168
|
+
export declare class ExistPendingWorkflowsRequest implements BaseMessage {
|
|
169
|
+
type: MessageType;
|
|
170
|
+
request_id: string;
|
|
171
|
+
executor_id: string;
|
|
172
|
+
application_version: string;
|
|
173
|
+
constructor(request_id: string, executor_id: string, application_version: string);
|
|
174
|
+
}
|
|
175
|
+
export declare class ExistPendingWorkflowsResponse extends BaseResponse {
|
|
176
|
+
exist: boolean;
|
|
177
|
+
constructor(request_id: string, exist: boolean, error_message?: string);
|
|
178
|
+
}
|
|
179
|
+
export declare class ListStepsRequest implements BaseMessage {
|
|
180
|
+
type: MessageType;
|
|
181
|
+
request_id: string;
|
|
182
|
+
workflow_id: string;
|
|
183
|
+
constructor(request_id: string, workflow_id: string);
|
|
184
|
+
}
|
|
185
|
+
export declare class ListStepsResponse extends BaseResponse {
|
|
186
|
+
output?: WorkflowSteps[];
|
|
187
|
+
constructor(request_id: string, output?: WorkflowSteps[], error_message?: string);
|
|
188
|
+
}
|
|
189
|
+
export interface ForkWorkflowBody {
|
|
190
|
+
workflow_id: string;
|
|
191
|
+
start_step: number;
|
|
192
|
+
application_version?: string;
|
|
193
|
+
new_workflow_id?: string;
|
|
194
|
+
}
|
|
195
|
+
export declare class ForkWorkflowRequest implements BaseMessage {
|
|
196
|
+
type: MessageType;
|
|
197
|
+
request_id: string;
|
|
198
|
+
body: ForkWorkflowBody;
|
|
199
|
+
constructor(request_id: string, body: ForkWorkflowBody);
|
|
200
|
+
}
|
|
201
|
+
export declare class ForkWorkflowResponse extends BaseResponse {
|
|
202
|
+
new_workflow_id?: string;
|
|
203
|
+
constructor(request_id: string, new_workflow_id?: string, error_message?: string);
|
|
204
|
+
}
|
|
205
|
+
export interface RetentionBody {
|
|
206
|
+
gc_cutoff_epoch_ms?: number;
|
|
207
|
+
gc_rows_threshold?: number;
|
|
208
|
+
timeout_cutoff_epoch_ms?: number;
|
|
209
|
+
}
|
|
210
|
+
export declare class RetentionRequest implements BaseMessage {
|
|
211
|
+
type: MessageType;
|
|
212
|
+
request_id: string;
|
|
213
|
+
body: RetentionBody;
|
|
214
|
+
constructor(request_id: string, body: RetentionBody);
|
|
215
|
+
}
|
|
216
|
+
export declare class RetentionResponse extends BaseResponse {
|
|
217
|
+
success: boolean;
|
|
218
|
+
constructor(request_id: string, success: boolean, error_message?: string);
|
|
219
|
+
}
|
|
220
|
+
export declare class GetMetricsRequest implements BaseMessage {
|
|
221
|
+
type: MessageType;
|
|
222
|
+
request_id: string;
|
|
223
|
+
start_time: string;
|
|
224
|
+
end_time: string;
|
|
225
|
+
metric_class: string;
|
|
226
|
+
constructor(request_id: string, start_time: string, end_time: string, metric_class: string);
|
|
227
|
+
}
|
|
228
|
+
export declare class MetricDataOutput {
|
|
229
|
+
metric_type: string;
|
|
230
|
+
metric_name: string;
|
|
231
|
+
value: number;
|
|
232
|
+
constructor(metric_type: string, metric_name: string, value: number);
|
|
233
|
+
}
|
|
234
|
+
export declare class GetMetricsResponse extends BaseResponse {
|
|
235
|
+
metrics: MetricDataOutput[];
|
|
236
|
+
constructor(request_id: string, metrics: MetricDataOutput[], error_message?: string);
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/conductor/protocol.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE5D,oBAAY,WAAW;IACrB,aAAa,kBAAkB;IAC/B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,qBAAqB,0BAA0B;IAC/C,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,uBAAuB,4BAA4B;IACnD,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,YAAa,YAAW,WAAW;IAC9C,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;gBACX,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM;CAK1E;AAED,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;gBAE3B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,MAAM,EAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,oBAAoB,EAAE,MAAM,EAC5B,aAAa,CAAC,EAAE,MAAM;CASzB;AAED,qBAAa,eAAgB,YAAW,WAAW;IACjD,IAAI,cAA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