opencode-supertask 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.
@@ -0,0 +1,44 @@
1
+ interface GatewayConfig {
2
+ worker: {
3
+ maxConcurrency: number;
4
+ pollIntervalMs: number;
5
+ heartbeatIntervalMs: number;
6
+ taskTimeoutMs: number;
7
+ defaultModel: string;
8
+ };
9
+ scheduler: {
10
+ enabled: boolean;
11
+ checkIntervalMs: number;
12
+ catchUp: 'next' | 'all' | 'latest';
13
+ };
14
+ watchdog: {
15
+ heartbeatTimeoutMs: number;
16
+ cleanupIntervalMs: number;
17
+ retentionDays: number;
18
+ };
19
+ logging: {
20
+ level: string;
21
+ format: 'json' | 'text';
22
+ };
23
+ }
24
+
25
+ declare class WorkerEngine {
26
+ private activeBatchIds;
27
+ private runningTasks;
28
+ private stopped;
29
+ private pollTimer;
30
+ private heartbeatTimer;
31
+ private cfg;
32
+ constructor(cfg: GatewayConfig);
33
+ start(): void;
34
+ stop(): Promise<void>;
35
+ getRunningTaskIds(): number[];
36
+ getRunningCount(): number;
37
+ private poll;
38
+ private tryDispatch;
39
+ private updateHeartbeats;
40
+ private killEntry;
41
+ private resolveModel;
42
+ }
43
+
44
+ export { WorkerEngine };