@tasker-systems/tasker 0.1.0-alpha.1 → 0.1.2
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/README.md +118 -0
- package/dist/events/index.d.ts +2 -2
- package/dist/ffi/index.d.ts +136 -136
- package/dist/ffi/index.js +36 -36
- package/dist/ffi/index.js.map +1 -1
- package/dist/{index-B3BcknlZ.d.ts → index-CTl8lGpU.d.ts} +1 -1
- package/dist/index.d.ts +167 -7
- package/dist/index.js +182 -37
- package/dist/index.js.map +1 -1
- package/dist/{runtime-interface-CE4viUt7.d.ts → runtime-interface-D940vUzy.d.ts} +1 -1
- package/package.json +5 -1
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# @tasker-systems/tasker
|
|
2
|
+
|
|
3
|
+
TypeScript worker for the Tasker workflow orchestration system. Supports Bun (native FFI), Node.js (via koffi), and Deno runtimes.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Production ready. TypeScript worker bindings provide full step handler execution via FFI to the shared Rust `tasker-worker` infrastructure.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Bun (recommended - native FFI support)
|
|
13
|
+
bun add @tasker-systems/tasker
|
|
14
|
+
|
|
15
|
+
# Node.js (requires koffi for FFI)
|
|
16
|
+
npm install @tasker-systems/tasker koffi
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { TaskerWorker } from "@tasker-systems/tasker";
|
|
23
|
+
|
|
24
|
+
const worker = new TaskerWorker({
|
|
25
|
+
workerName: "my-worker",
|
|
26
|
+
namespaces: ["default"],
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Register a step handler
|
|
30
|
+
worker.registerHandler("process_payment", async (step) => {
|
|
31
|
+
const result = await processPayment(step.context);
|
|
32
|
+
return { status: "complete", data: result };
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Start the worker
|
|
36
|
+
await worker.start();
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Development
|
|
40
|
+
|
|
41
|
+
### Prerequisites
|
|
42
|
+
|
|
43
|
+
- Bun 1.0+ (recommended) or Node.js 18+
|
|
44
|
+
- Rust 1.70+ (for building the FFI library)
|
|
45
|
+
|
|
46
|
+
### Setup
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Install dependencies
|
|
50
|
+
bun install
|
|
51
|
+
|
|
52
|
+
# Build TypeScript
|
|
53
|
+
bun run build
|
|
54
|
+
|
|
55
|
+
# Run tests
|
|
56
|
+
bun test
|
|
57
|
+
|
|
58
|
+
# Type checking
|
|
59
|
+
bun run typecheck
|
|
60
|
+
|
|
61
|
+
# Linting
|
|
62
|
+
bun run check
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Building the FFI Library
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Build the Rust FFI shared library
|
|
69
|
+
cargo build --release -p tasker-worker-ts
|
|
70
|
+
|
|
71
|
+
# The library will be at target/release/libtasker_worker_ts.{dylib,so,dll}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Project Structure
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
workers/typescript/
|
|
78
|
+
├── src/ # TypeScript source
|
|
79
|
+
│ ├── bootstrap/ # Worker initialization
|
|
80
|
+
│ ├── events/ # Event system integration
|
|
81
|
+
│ ├── ffi/ # FFI bindings to Rust
|
|
82
|
+
│ ├── handler/ # Step handler base classes
|
|
83
|
+
│ ├── logging/ # Structured logging (pino)
|
|
84
|
+
│ ├── registry/ # Handler registry
|
|
85
|
+
│ ├── server/ # HTTP/gRPC server
|
|
86
|
+
│ ├── subscriber/ # Queue subscriber
|
|
87
|
+
│ ├── types/ # Type definitions
|
|
88
|
+
│ └── index.ts # Package entry point
|
|
89
|
+
├── src-rust/ # Rust FFI source
|
|
90
|
+
│ └── lib.rs # Neon/FFI module
|
|
91
|
+
├── tests/ # Test suite
|
|
92
|
+
├── Cargo.toml # Rust crate configuration
|
|
93
|
+
├── package.json # npm package configuration
|
|
94
|
+
├── tsconfig.json # TypeScript configuration
|
|
95
|
+
└── biome.json # Linting configuration
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Technology Stack
|
|
99
|
+
|
|
100
|
+
- **FFI Layer**: Bun native FFI / koffi (Node.js)
|
|
101
|
+
- **Build Tool**: tsup
|
|
102
|
+
- **Runtime**: Bun, Node.js 18+, or Deno
|
|
103
|
+
- **Testing**: Bun test runner
|
|
104
|
+
- **Linting**: Biome
|
|
105
|
+
- **Logging**: pino
|
|
106
|
+
- **Events**: eventemitter3
|
|
107
|
+
|
|
108
|
+
## Runtime Support
|
|
109
|
+
|
|
110
|
+
| Runtime | FFI Mechanism | Status |
|
|
111
|
+
|---------|---------------|--------|
|
|
112
|
+
| Bun | Native `bun:ffi` | Recommended |
|
|
113
|
+
| Node.js | koffi | Supported |
|
|
114
|
+
| Deno | `Deno.dlopen` | Experimental |
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
MIT
|
package/dist/events/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { y as ErrorCallback, n as EventName, o as EventNames, d as EventPoller, z as EventPollerConfig, f as EventSystem, F as EventSystemConfig, G as EventSystemStats, A as MetricsCallback, p as MetricsEventName, q as MetricsEventNames, M as MetricsPayload, P as PollerCyclePayload, r as PollerEventName, s as PollerEventNames, C as PollerState, g as StepCompletionSentPayload, D as StepEventCallback, t as StepEventName, u as StepEventNames, h as StepExecutionCompletedPayload, i as StepExecutionFailedPayload, j as StepExecutionReceivedPayload, k as StepExecutionStartedPayload, T as TaskerEventEmitter, l as TaskerEventMap, W as WorkerErrorPayload, v as WorkerEventName, w as WorkerEventNames, m as WorkerEventPayload, x as createEventPoller } from '../index-
|
|
1
|
+
export { y as ErrorCallback, n as EventName, o as EventNames, d as EventPoller, z as EventPollerConfig, f as EventSystem, F as EventSystemConfig, G as EventSystemStats, A as MetricsCallback, p as MetricsEventName, q as MetricsEventNames, M as MetricsPayload, P as PollerCyclePayload, r as PollerEventName, s as PollerEventNames, C as PollerState, g as StepCompletionSentPayload, D as StepEventCallback, t as StepEventName, u as StepEventNames, h as StepExecutionCompletedPayload, i as StepExecutionFailedPayload, j as StepExecutionReceivedPayload, k as StepExecutionStartedPayload, T as TaskerEventEmitter, l as TaskerEventMap, W as WorkerErrorPayload, v as WorkerEventName, w as WorkerEventNames, m as WorkerEventPayload, x as createEventPoller } from '../index-CTl8lGpU.js';
|
|
2
2
|
import 'eventemitter3';
|
|
3
|
-
import '../runtime-interface-
|
|
3
|
+
import '../runtime-interface-D940vUzy.js';
|
package/dist/ffi/index.d.ts
CHANGED
|
@@ -1,139 +1,5 @@
|
|
|
1
|
-
import { B as BaseTaskerRuntime,
|
|
2
|
-
export { D as DependencyResult, u as FfiDomainEventMetadata, m as HandlerDefinition, O as OrchestrationMetadata, R as RetryConfiguration, S as StepDefinition, n as StepExecutionError, o as StepExecutionMetadata, r as Task, s as WorkflowStep } from '../runtime-interface-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Node.js FFI runtime adapter using koffi.
|
|
6
|
-
*
|
|
7
|
-
* This adapter uses the koffi package to interface with the Rust native library.
|
|
8
|
-
* Koffi is a modern, actively maintained FFI library with prebuilt binaries.
|
|
9
|
-
*
|
|
10
|
-
* Install: npm install koffi
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Node.js FFI runtime implementation using koffi
|
|
15
|
-
*/
|
|
16
|
-
declare class NodeRuntime extends BaseTaskerRuntime {
|
|
17
|
-
readonly name: string;
|
|
18
|
-
private lib;
|
|
19
|
-
private koffi;
|
|
20
|
-
get isLoaded(): boolean;
|
|
21
|
-
load(libraryPath: string): Promise<void>;
|
|
22
|
-
unload(): void;
|
|
23
|
-
private ensureLoaded;
|
|
24
|
-
/**
|
|
25
|
-
* Read a C string from a pointer and free the Rust-allocated memory.
|
|
26
|
-
*
|
|
27
|
-
* Uses koffi.decode with 'char' type and -1 length for null-terminated strings.
|
|
28
|
-
*/
|
|
29
|
-
private readAndFreeRustString;
|
|
30
|
-
getVersion(): string;
|
|
31
|
-
getRustVersion(): string;
|
|
32
|
-
healthCheck(): boolean;
|
|
33
|
-
bootstrapWorker(config?: BootstrapConfig): BootstrapResult;
|
|
34
|
-
isWorkerRunning(): boolean;
|
|
35
|
-
getWorkerStatus(): WorkerStatus;
|
|
36
|
-
stopWorker(): StopResult;
|
|
37
|
-
transitionToGracefulShutdown(): StopResult;
|
|
38
|
-
pollStepEvents(): FfiStepEvent | null;
|
|
39
|
-
pollInProcessEvents(): FfiDomainEvent | null;
|
|
40
|
-
completeStepEvent(eventId: string, result: StepExecutionResult): boolean;
|
|
41
|
-
checkpointYieldStepEvent(eventId: string, checkpointData: CheckpointYieldData): boolean;
|
|
42
|
-
getFfiDispatchMetrics(): FfiDispatchMetrics;
|
|
43
|
-
checkStarvationWarnings(): void;
|
|
44
|
-
cleanupTimeouts(): void;
|
|
45
|
-
logError(message: string, fields?: LogFields): void;
|
|
46
|
-
logWarn(message: string, fields?: LogFields): void;
|
|
47
|
-
logInfo(message: string, fields?: LogFields): void;
|
|
48
|
-
logDebug(message: string, fields?: LogFields): void;
|
|
49
|
-
logTrace(message: string, fields?: LogFields): void;
|
|
50
|
-
private parseClientResult;
|
|
51
|
-
clientCreateTask(requestJson: string): ClientResult;
|
|
52
|
-
clientGetTask(taskUuid: string): ClientResult;
|
|
53
|
-
clientListTasks(paramsJson: string): ClientResult;
|
|
54
|
-
clientCancelTask(taskUuid: string): ClientResult;
|
|
55
|
-
clientListTaskSteps(taskUuid: string): ClientResult;
|
|
56
|
-
clientGetStep(taskUuid: string, stepUuid: string): ClientResult;
|
|
57
|
-
clientGetStepAuditHistory(taskUuid: string, stepUuid: string): ClientResult;
|
|
58
|
-
clientHealthCheck(): ClientResult;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Bun FFI runtime adapter using koffi (via Node-API).
|
|
63
|
-
*
|
|
64
|
-
* Bun supports Node-API modules natively, so we use koffi (the same FFI
|
|
65
|
-
* library as NodeRuntime) rather than bun:ffi. This gives us:
|
|
66
|
-
* - Stable, well-tested string/pointer handling
|
|
67
|
-
* - Identical behavior across Node.js and Bun
|
|
68
|
-
* - No manual Buffer→pointer conversion bugs
|
|
69
|
-
*
|
|
70
|
-
* See: https://bun.sh/docs/runtime/node-api
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Bun FFI runtime implementation using koffi (Node-API).
|
|
75
|
-
*
|
|
76
|
-
* Extends NodeRuntime since both use koffi for FFI. The only difference
|
|
77
|
-
* is the runtime name identifier used for logging and diagnostics.
|
|
78
|
-
*/
|
|
79
|
-
declare class BunRuntime extends NodeRuntime {
|
|
80
|
-
readonly name = "bun";
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Deno FFI runtime adapter using Deno.dlopen.
|
|
85
|
-
*
|
|
86
|
-
* This adapter uses Deno's built-in FFI to interface with the Rust native library.
|
|
87
|
-
* It requires --unstable-ffi and --allow-ffi flags.
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Deno FFI runtime implementation using Deno.dlopen
|
|
92
|
-
*/
|
|
93
|
-
declare class DenoRuntime extends BaseTaskerRuntime {
|
|
94
|
-
readonly name = "deno";
|
|
95
|
-
private lib;
|
|
96
|
-
private encoder;
|
|
97
|
-
get isLoaded(): boolean;
|
|
98
|
-
load(libraryPath: string): Promise<void>;
|
|
99
|
-
unload(): void;
|
|
100
|
-
private ensureLoaded;
|
|
101
|
-
/**
|
|
102
|
-
* Creates a null-terminated C string buffer.
|
|
103
|
-
* With 'buffer' FFI type, we return Uint8Array directly.
|
|
104
|
-
*/
|
|
105
|
-
private toCString;
|
|
106
|
-
private fromCString;
|
|
107
|
-
getVersion(): string;
|
|
108
|
-
getRustVersion(): string;
|
|
109
|
-
healthCheck(): boolean;
|
|
110
|
-
bootstrapWorker(config?: BootstrapConfig): BootstrapResult;
|
|
111
|
-
isWorkerRunning(): boolean;
|
|
112
|
-
getWorkerStatus(): WorkerStatus;
|
|
113
|
-
stopWorker(): StopResult;
|
|
114
|
-
transitionToGracefulShutdown(): StopResult;
|
|
115
|
-
pollStepEvents(): FfiStepEvent | null;
|
|
116
|
-
pollInProcessEvents(): FfiDomainEvent | null;
|
|
117
|
-
completeStepEvent(eventId: string, result: StepExecutionResult): boolean;
|
|
118
|
-
checkpointYieldStepEvent(eventId: string, checkpointData: CheckpointYieldData): boolean;
|
|
119
|
-
getFfiDispatchMetrics(): FfiDispatchMetrics;
|
|
120
|
-
checkStarvationWarnings(): void;
|
|
121
|
-
cleanupTimeouts(): void;
|
|
122
|
-
logError(message: string, fields?: LogFields): void;
|
|
123
|
-
logWarn(message: string, fields?: LogFields): void;
|
|
124
|
-
logInfo(message: string, fields?: LogFields): void;
|
|
125
|
-
logDebug(message: string, fields?: LogFields): void;
|
|
126
|
-
logTrace(message: string, fields?: LogFields): void;
|
|
127
|
-
private parseClientResult;
|
|
128
|
-
clientCreateTask(requestJson: string): ClientResult;
|
|
129
|
-
clientGetTask(taskUuid: string): ClientResult;
|
|
130
|
-
clientListTasks(paramsJson: string): ClientResult;
|
|
131
|
-
clientCancelTask(taskUuid: string): ClientResult;
|
|
132
|
-
clientListTaskSteps(taskUuid: string): ClientResult;
|
|
133
|
-
clientGetStep(taskUuid: string, stepUuid: string): ClientResult;
|
|
134
|
-
clientGetStepAuditHistory(taskUuid: string, stepUuid: string): ClientResult;
|
|
135
|
-
clientHealthCheck(): ClientResult;
|
|
136
|
-
}
|
|
1
|
+
import { T as TaskerRuntime, B as BaseTaskerRuntime, e as BootstrapConfig, f as BootstrapResult, W as WorkerStatus, q as StopResult, l as FfiStepEvent, F as FfiDomainEvent, p as StepExecutionResult, t as CheckpointYieldData, k as FfiDispatchMetrics, L as LogFields, h as ClientResult } from '../runtime-interface-D940vUzy.js';
|
|
2
|
+
export { D as DependencyResult, u as FfiDomainEventMetadata, m as HandlerDefinition, O as OrchestrationMetadata, R as RetryConfiguration, S as StepDefinition, n as StepExecutionError, o as StepExecutionMetadata, r as Task, s as WorkflowStep } from '../runtime-interface-D940vUzy.js';
|
|
137
3
|
|
|
138
4
|
/**
|
|
139
5
|
* Runtime detection for TypeScript/JavaScript workers.
|
|
@@ -305,4 +171,138 @@ declare class FfiLayer {
|
|
|
305
171
|
private createRuntime;
|
|
306
172
|
}
|
|
307
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Node.js FFI runtime adapter using koffi.
|
|
176
|
+
*
|
|
177
|
+
* This adapter uses the koffi package to interface with the Rust native library.
|
|
178
|
+
* Koffi is a modern, actively maintained FFI library with prebuilt binaries.
|
|
179
|
+
*
|
|
180
|
+
* Install: npm install koffi
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Node.js FFI runtime implementation using koffi
|
|
185
|
+
*/
|
|
186
|
+
declare class NodeRuntime extends BaseTaskerRuntime {
|
|
187
|
+
readonly name: string;
|
|
188
|
+
private lib;
|
|
189
|
+
private koffi;
|
|
190
|
+
get isLoaded(): boolean;
|
|
191
|
+
load(libraryPath: string): Promise<void>;
|
|
192
|
+
unload(): void;
|
|
193
|
+
private ensureLoaded;
|
|
194
|
+
/**
|
|
195
|
+
* Read a C string from a pointer and free the Rust-allocated memory.
|
|
196
|
+
*
|
|
197
|
+
* Uses koffi.decode with 'char' type and -1 length for null-terminated strings.
|
|
198
|
+
*/
|
|
199
|
+
private readAndFreeRustString;
|
|
200
|
+
getVersion(): string;
|
|
201
|
+
getRustVersion(): string;
|
|
202
|
+
healthCheck(): boolean;
|
|
203
|
+
bootstrapWorker(config?: BootstrapConfig): BootstrapResult;
|
|
204
|
+
isWorkerRunning(): boolean;
|
|
205
|
+
getWorkerStatus(): WorkerStatus;
|
|
206
|
+
stopWorker(): StopResult;
|
|
207
|
+
transitionToGracefulShutdown(): StopResult;
|
|
208
|
+
pollStepEvents(): FfiStepEvent | null;
|
|
209
|
+
pollInProcessEvents(): FfiDomainEvent | null;
|
|
210
|
+
completeStepEvent(eventId: string, result: StepExecutionResult): boolean;
|
|
211
|
+
checkpointYieldStepEvent(eventId: string, checkpointData: CheckpointYieldData): boolean;
|
|
212
|
+
getFfiDispatchMetrics(): FfiDispatchMetrics;
|
|
213
|
+
checkStarvationWarnings(): void;
|
|
214
|
+
cleanupTimeouts(): void;
|
|
215
|
+
logError(message: string, fields?: LogFields): void;
|
|
216
|
+
logWarn(message: string, fields?: LogFields): void;
|
|
217
|
+
logInfo(message: string, fields?: LogFields): void;
|
|
218
|
+
logDebug(message: string, fields?: LogFields): void;
|
|
219
|
+
logTrace(message: string, fields?: LogFields): void;
|
|
220
|
+
private parseClientResult;
|
|
221
|
+
clientCreateTask(requestJson: string): ClientResult;
|
|
222
|
+
clientGetTask(taskUuid: string): ClientResult;
|
|
223
|
+
clientListTasks(paramsJson: string): ClientResult;
|
|
224
|
+
clientCancelTask(taskUuid: string): ClientResult;
|
|
225
|
+
clientListTaskSteps(taskUuid: string): ClientResult;
|
|
226
|
+
clientGetStep(taskUuid: string, stepUuid: string): ClientResult;
|
|
227
|
+
clientGetStepAuditHistory(taskUuid: string, stepUuid: string): ClientResult;
|
|
228
|
+
clientHealthCheck(): ClientResult;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Bun FFI runtime adapter using koffi (via Node-API).
|
|
233
|
+
*
|
|
234
|
+
* Bun supports Node-API modules natively, so we use koffi (the same FFI
|
|
235
|
+
* library as NodeRuntime) rather than bun:ffi. This gives us:
|
|
236
|
+
* - Stable, well-tested string/pointer handling
|
|
237
|
+
* - Identical behavior across Node.js and Bun
|
|
238
|
+
* - No manual Buffer→pointer conversion bugs
|
|
239
|
+
*
|
|
240
|
+
* See: https://bun.sh/docs/runtime/node-api
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Bun FFI runtime implementation using koffi (Node-API).
|
|
245
|
+
*
|
|
246
|
+
* Extends NodeRuntime since both use koffi for FFI. The only difference
|
|
247
|
+
* is the runtime name identifier used for logging and diagnostics.
|
|
248
|
+
*/
|
|
249
|
+
declare class BunRuntime extends NodeRuntime {
|
|
250
|
+
readonly name = "bun";
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Deno FFI runtime adapter using Deno.dlopen.
|
|
255
|
+
*
|
|
256
|
+
* This adapter uses Deno's built-in FFI to interface with the Rust native library.
|
|
257
|
+
* It requires --unstable-ffi and --allow-ffi flags.
|
|
258
|
+
*/
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Deno FFI runtime implementation using Deno.dlopen
|
|
262
|
+
*/
|
|
263
|
+
declare class DenoRuntime extends BaseTaskerRuntime {
|
|
264
|
+
readonly name = "deno";
|
|
265
|
+
private lib;
|
|
266
|
+
private encoder;
|
|
267
|
+
get isLoaded(): boolean;
|
|
268
|
+
load(libraryPath: string): Promise<void>;
|
|
269
|
+
unload(): void;
|
|
270
|
+
private ensureLoaded;
|
|
271
|
+
/**
|
|
272
|
+
* Creates a null-terminated C string buffer.
|
|
273
|
+
* With 'buffer' FFI type, we return Uint8Array directly.
|
|
274
|
+
*/
|
|
275
|
+
private toCString;
|
|
276
|
+
private fromCString;
|
|
277
|
+
getVersion(): string;
|
|
278
|
+
getRustVersion(): string;
|
|
279
|
+
healthCheck(): boolean;
|
|
280
|
+
bootstrapWorker(config?: BootstrapConfig): BootstrapResult;
|
|
281
|
+
isWorkerRunning(): boolean;
|
|
282
|
+
getWorkerStatus(): WorkerStatus;
|
|
283
|
+
stopWorker(): StopResult;
|
|
284
|
+
transitionToGracefulShutdown(): StopResult;
|
|
285
|
+
pollStepEvents(): FfiStepEvent | null;
|
|
286
|
+
pollInProcessEvents(): FfiDomainEvent | null;
|
|
287
|
+
completeStepEvent(eventId: string, result: StepExecutionResult): boolean;
|
|
288
|
+
checkpointYieldStepEvent(eventId: string, checkpointData: CheckpointYieldData): boolean;
|
|
289
|
+
getFfiDispatchMetrics(): FfiDispatchMetrics;
|
|
290
|
+
checkStarvationWarnings(): void;
|
|
291
|
+
cleanupTimeouts(): void;
|
|
292
|
+
logError(message: string, fields?: LogFields): void;
|
|
293
|
+
logWarn(message: string, fields?: LogFields): void;
|
|
294
|
+
logInfo(message: string, fields?: LogFields): void;
|
|
295
|
+
logDebug(message: string, fields?: LogFields): void;
|
|
296
|
+
logTrace(message: string, fields?: LogFields): void;
|
|
297
|
+
private parseClientResult;
|
|
298
|
+
clientCreateTask(requestJson: string): ClientResult;
|
|
299
|
+
clientGetTask(taskUuid: string): ClientResult;
|
|
300
|
+
clientListTasks(paramsJson: string): ClientResult;
|
|
301
|
+
clientCancelTask(taskUuid: string): ClientResult;
|
|
302
|
+
clientListTaskSteps(taskUuid: string): ClientResult;
|
|
303
|
+
clientGetStep(taskUuid: string, stepUuid: string): ClientResult;
|
|
304
|
+
clientGetStepAuditHistory(taskUuid: string, stepUuid: string): ClientResult;
|
|
305
|
+
clientHealthCheck(): ClientResult;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
308
|
export { BaseTaskerRuntime, BootstrapConfig, BootstrapResult, BunRuntime, DenoRuntime, FfiDispatchMetrics, FfiDomainEvent, FfiLayer, type FfiLayerConfig, FfiStepEvent, LogFields, NodeRuntime, type RuntimeInfo, type RuntimeType, StepExecutionResult, StopResult, TaskerRuntime, WorkerStatus, detectRuntime, getLibraryPath, getRuntimeInfo, isBun, isDeno, isNode };
|
package/dist/ffi/index.js
CHANGED
|
@@ -75,9 +75,9 @@ var init_koffi = __esm({
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
// node-file:/
|
|
78
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/darwin_arm64/koffi.node
|
|
79
79
|
var require_koffi = __commonJS2({
|
|
80
|
-
"node-file:/
|
|
80
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/darwin_arm64/koffi.node"(exports2, module2) {
|
|
81
81
|
init_koffi();
|
|
82
82
|
try {
|
|
83
83
|
module2.exports = __require(koffi_default);
|
|
@@ -94,9 +94,9 @@ var init_koffi2 = __esm({
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
// node-file:/
|
|
97
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/darwin_x64/koffi.node
|
|
98
98
|
var require_koffi2 = __commonJS2({
|
|
99
|
-
"node-file:/
|
|
99
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/darwin_x64/koffi.node"(exports2, module2) {
|
|
100
100
|
init_koffi2();
|
|
101
101
|
try {
|
|
102
102
|
module2.exports = __require(koffi_default2);
|
|
@@ -113,9 +113,9 @@ var init_koffi3 = __esm({
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
// node-file:/
|
|
116
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/freebsd_arm64/koffi.node
|
|
117
117
|
var require_koffi3 = __commonJS2({
|
|
118
|
-
"node-file:/
|
|
118
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/freebsd_arm64/koffi.node"(exports2, module2) {
|
|
119
119
|
init_koffi3();
|
|
120
120
|
try {
|
|
121
121
|
module2.exports = __require(koffi_default3);
|
|
@@ -132,9 +132,9 @@ var init_koffi4 = __esm({
|
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
-
// node-file:/
|
|
135
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/freebsd_ia32/koffi.node
|
|
136
136
|
var require_koffi4 = __commonJS2({
|
|
137
|
-
"node-file:/
|
|
137
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/freebsd_ia32/koffi.node"(exports2, module2) {
|
|
138
138
|
init_koffi4();
|
|
139
139
|
try {
|
|
140
140
|
module2.exports = __require(koffi_default4);
|
|
@@ -151,9 +151,9 @@ var init_koffi5 = __esm({
|
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
|
|
154
|
-
// node-file:/
|
|
154
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/freebsd_x64/koffi.node
|
|
155
155
|
var require_koffi5 = __commonJS2({
|
|
156
|
-
"node-file:/
|
|
156
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/freebsd_x64/koffi.node"(exports2, module2) {
|
|
157
157
|
init_koffi5();
|
|
158
158
|
try {
|
|
159
159
|
module2.exports = __require(koffi_default5);
|
|
@@ -170,9 +170,9 @@ var init_koffi6 = __esm({
|
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
-
// node-file:/
|
|
173
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_armhf/koffi.node
|
|
174
174
|
var require_koffi6 = __commonJS2({
|
|
175
|
-
"node-file:/
|
|
175
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_armhf/koffi.node"(exports2, module2) {
|
|
176
176
|
init_koffi6();
|
|
177
177
|
try {
|
|
178
178
|
module2.exports = __require(koffi_default6);
|
|
@@ -189,9 +189,9 @@ var init_koffi7 = __esm({
|
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
|
|
192
|
-
// node-file:/
|
|
192
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_arm64/koffi.node
|
|
193
193
|
var require_koffi7 = __commonJS2({
|
|
194
|
-
"node-file:/
|
|
194
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_arm64/koffi.node"(exports2, module2) {
|
|
195
195
|
init_koffi7();
|
|
196
196
|
try {
|
|
197
197
|
module2.exports = __require(koffi_default7);
|
|
@@ -208,9 +208,9 @@ var init_koffi8 = __esm({
|
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
|
|
211
|
-
// node-file:/
|
|
211
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_ia32/koffi.node
|
|
212
212
|
var require_koffi8 = __commonJS2({
|
|
213
|
-
"node-file:/
|
|
213
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_ia32/koffi.node"(exports2, module2) {
|
|
214
214
|
init_koffi8();
|
|
215
215
|
try {
|
|
216
216
|
module2.exports = __require(koffi_default8);
|
|
@@ -227,9 +227,9 @@ var init_koffi9 = __esm({
|
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
// node-file:/
|
|
230
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_loong64/koffi.node
|
|
231
231
|
var require_koffi9 = __commonJS2({
|
|
232
|
-
"node-file:/
|
|
232
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_loong64/koffi.node"(exports2, module2) {
|
|
233
233
|
init_koffi9();
|
|
234
234
|
try {
|
|
235
235
|
module2.exports = __require(koffi_default9);
|
|
@@ -246,9 +246,9 @@ var init_koffi10 = __esm({
|
|
|
246
246
|
}
|
|
247
247
|
});
|
|
248
248
|
|
|
249
|
-
// node-file:/
|
|
249
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_riscv64d/koffi.node
|
|
250
250
|
var require_koffi10 = __commonJS2({
|
|
251
|
-
"node-file:/
|
|
251
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_riscv64d/koffi.node"(exports2, module2) {
|
|
252
252
|
init_koffi10();
|
|
253
253
|
try {
|
|
254
254
|
module2.exports = __require(koffi_default10);
|
|
@@ -265,9 +265,9 @@ var init_koffi11 = __esm({
|
|
|
265
265
|
}
|
|
266
266
|
});
|
|
267
267
|
|
|
268
|
-
// node-file:/
|
|
268
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_x64/koffi.node
|
|
269
269
|
var require_koffi11 = __commonJS2({
|
|
270
|
-
"node-file:/
|
|
270
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/linux_x64/koffi.node"(exports2, module2) {
|
|
271
271
|
init_koffi11();
|
|
272
272
|
try {
|
|
273
273
|
module2.exports = __require(koffi_default11);
|
|
@@ -284,9 +284,9 @@ var init_koffi12 = __esm({
|
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
286
|
|
|
287
|
-
// node-file:/
|
|
287
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/openbsd_ia32/koffi.node
|
|
288
288
|
var require_koffi12 = __commonJS2({
|
|
289
|
-
"node-file:/
|
|
289
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/openbsd_ia32/koffi.node"(exports2, module2) {
|
|
290
290
|
init_koffi12();
|
|
291
291
|
try {
|
|
292
292
|
module2.exports = __require(koffi_default12);
|
|
@@ -303,9 +303,9 @@ var init_koffi13 = __esm({
|
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
|
|
306
|
-
// node-file:/
|
|
306
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/openbsd_x64/koffi.node
|
|
307
307
|
var require_koffi13 = __commonJS2({
|
|
308
|
-
"node-file:/
|
|
308
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/openbsd_x64/koffi.node"(exports2, module2) {
|
|
309
309
|
init_koffi13();
|
|
310
310
|
try {
|
|
311
311
|
module2.exports = __require(koffi_default13);
|
|
@@ -322,9 +322,9 @@ var init_koffi14 = __esm({
|
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
324
|
|
|
325
|
-
// node-file:/
|
|
325
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/win32_arm64/koffi.node
|
|
326
326
|
var require_koffi14 = __commonJS2({
|
|
327
|
-
"node-file:/
|
|
327
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/win32_arm64/koffi.node"(exports2, module2) {
|
|
328
328
|
init_koffi14();
|
|
329
329
|
try {
|
|
330
330
|
module2.exports = __require(koffi_default14);
|
|
@@ -341,9 +341,9 @@ var init_koffi15 = __esm({
|
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
|
|
344
|
-
// node-file:/
|
|
344
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/win32_ia32/koffi.node
|
|
345
345
|
var require_koffi15 = __commonJS2({
|
|
346
|
-
"node-file:/
|
|
346
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/win32_ia32/koffi.node"(exports2, module2) {
|
|
347
347
|
init_koffi15();
|
|
348
348
|
try {
|
|
349
349
|
module2.exports = __require(koffi_default15);
|
|
@@ -360,9 +360,9 @@ var init_koffi16 = __esm({
|
|
|
360
360
|
}
|
|
361
361
|
});
|
|
362
362
|
|
|
363
|
-
// node-file:/
|
|
363
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/win32_x64/koffi.node
|
|
364
364
|
var require_koffi16 = __commonJS2({
|
|
365
|
-
"node-file:/
|
|
365
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/win32_x64/koffi.node"(exports2, module2) {
|
|
366
366
|
init_koffi16();
|
|
367
367
|
try {
|
|
368
368
|
module2.exports = __require(koffi_default16);
|
|
@@ -379,9 +379,9 @@ var init_koffi17 = __esm({
|
|
|
379
379
|
}
|
|
380
380
|
});
|
|
381
381
|
|
|
382
|
-
// node-file:/
|
|
382
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/musl_arm64/koffi.node
|
|
383
383
|
var require_koffi17 = __commonJS2({
|
|
384
|
-
"node-file:/
|
|
384
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/musl_arm64/koffi.node"(exports2, module2) {
|
|
385
385
|
init_koffi17();
|
|
386
386
|
try {
|
|
387
387
|
module2.exports = __require(koffi_default17);
|
|
@@ -398,9 +398,9 @@ var init_koffi18 = __esm({
|
|
|
398
398
|
}
|
|
399
399
|
});
|
|
400
400
|
|
|
401
|
-
// node-file:/
|
|
401
|
+
// node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/musl_x64/koffi.node
|
|
402
402
|
var require_koffi18 = __commonJS2({
|
|
403
|
-
"node-file:/
|
|
403
|
+
"node-file:/home/runner/work/tasker-core/tasker-core/workers/typescript/node_modules/koffi/build/koffi/musl_x64/koffi.node"(exports2, module2) {
|
|
404
404
|
init_koffi18();
|
|
405
405
|
try {
|
|
406
406
|
module2.exports = __require(koffi_default18);
|