opencode-supertask 0.1.26 → 0.1.27

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.
@@ -27,6 +27,11 @@ interface WorkerEngineOptions {
27
27
  opencodeBin?: string;
28
28
  maxOutputChars?: number;
29
29
  }
30
+ interface InterruptedTaskRun {
31
+ taskId: number;
32
+ runId: number;
33
+ }
34
+ declare function assertWorkerProcessIsolationSupported(platform?: NodeJS.Platform): void;
30
35
  declare class WorkerEngine {
31
36
  private activeBatchIds;
32
37
  private runningTasks;
@@ -39,21 +44,30 @@ declare class WorkerEngine {
39
44
  private maxOutputChars;
40
45
  constructor(cfg: GatewayConfig, options?: WorkerEngineOptions);
41
46
  start(): void;
42
- stop(gracePeriodMs?: number): Promise<number[]>;
47
+ stop(gracePeriodMs?: number): Promise<InterruptedTaskRun[]>;
43
48
  getRunningTaskIds(): number[];
44
49
  getRunningCount(): number;
50
+ ownsRun(taskId: number, runId: number): boolean;
45
51
  private poll;
46
52
  private tryDispatch;
53
+ private launcherEntry;
47
54
  private spawnTask;
48
- private finishEntry;
55
+ private handleChildClose;
56
+ private settleEntry;
57
+ private commitEntry;
49
58
  private reconcileCancelledTasks;
59
+ private reconcileQuarantinedTasks;
50
60
  private cancelEntry;
51
61
  private updateHeartbeats;
62
+ private terminateForFailure;
63
+ private terminateEntry;
64
+ private completeTermination;
52
65
  private killEntry;
53
66
  private signalEntry;
54
67
  private releaseBatch;
55
68
  private resolveModel;
69
+ private runDetached;
56
70
  private logError;
57
71
  }
58
72
 
59
- export { WorkerEngine };
73
+ export { type InterruptedTaskRun, WorkerEngine, assertWorkerProcessIsolationSupported };