@bastani/atomic-natives 0.9.19-alpha.1 → 0.9.19-alpha.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/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.19-alpha.2] - 2026-09-08
6
+
7
+ ### Added
8
+
9
+ - Added replay-safe model and reasoning activity reports and retained model and thinking fields on task snapshots, including settled tasks.
10
+ - Added an environment-local `TaskSupervisor` actor with owner-sealed admission, stable task/attempt identities, replay-safe reports, observation waits, cancellation and independently acknowledged cleanup. Generated bindings expose atomic snapshot subscriptions with a byte-bounded event journal; total task/report history and output storage are not bounded by this journal ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
11
+ - Added supervised Unix pipe/PTY commands with process-group cleanup, observation-independent execution deadlines, replay-safe byte-credit stdin, resize and retained output paging. Drained output stays live beyond its cap; background file-spool overflow settles `OutputLimitExceeded` ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
12
+ - Added Windows pipe task containment with suspended launch, explicit inherited handles and kill-on-close Job Objects. Assignment failure refuses execution and confirms suspended-process cleanup; failed cleanup retains diagnostic resources. Supervised Windows PTY remains unavailable ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
13
+ - Added a read-only `taskSettlement` query for authentic terminal receipts, including cancellation, so hosts can recover completion delivery after journal resets without registering another wait. Task snapshots retain `wasBackground` after a designated wait yields, including after settlement.
14
+ - Added supervised Windows ConPTY commands with suspended launch, Job Object containment before resume, retained output and confirmed cleanup. Containment failure refuses execution without an unsupervised fallback.
15
+ - Added optional `CommandIntent.shell: { program, args }` for direct executable launch with the command as one final argv argument, and `inheritEnv` (default `true`; `false` uses exactly the supplied environment). Both participate in operation replay identity; the default native pipe shell is unchanged.
16
+
17
+ ### Changed
18
+
19
+ - Raised the minimum supported Bun runtime to 1.4.2.
20
+
21
+ ### Fixed
22
+
23
+ - Enforced the task file cap through shared supervised pipe draining on Unix and Windows, preventing stdout/stderr and descendant writes from bypassing the budget. Output page requests are clamped to 1 MiB before allocation ([#2905](https://github.com/bastani-inc/atomic/pull/2905)).
24
+ - Preserved numeric task wait budgets above the u32 range and fractional milliseconds; timer scheduling no longer wraps `4294967296` ms into an immediate yield ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
25
+ - Preserved completed/failed task exit-code numbers without i32 narrowing, including unsigned statuses, fractional values and negative zero; exact terminal replay no longer collapses distinct numeric inputs ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
26
+ - Preserved exact activity metric replay for `elapsedMs`, `toolCount` and `tokenCount`: identical NaN reports acknowledge once, while changed signed zero or omitted/present fields conflict without normalizing values ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
27
+ - Preserved S1 caller strings losslessly across owner scopes, launch/report identity, activity, results and nested output/cleanup metadata; unpaired UTF-16 surrogates no longer become replacement characters or collapse distinct replays ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
28
+ - Bounded S1 activity replay identity to the latest 256 accepted IDs with SHA-256 payload hashes instead of retaining full report history. Evicted IDs are fresh reports subject to lifecycle guards; terminal reports and receipts remain retained for the task record's lifetime ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
29
+ - Allocated trusted S1 runner terminal identities atomically against the bounded activity window, so caller report IDs cannot consume the runner's settlement identity. Caller outcome conflicts, immutable terminal replay and cancellation precedence remain unchanged ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
30
+ - Prevented accepted `NaN` task wait budgets from panicking the native timer. Such waits use bounded sleep chunks until another observation or lifecycle action finishes them; finite budgets and infinities retain their existing behavior ([#2884](https://github.com/bastani-inc/atomic/pull/2884)).
31
+ - Retry transient macOS permission errors while checking whether a terminated process group has disappeared, within the existing cleanup deadline. Unreaped zombies no longer cause immediate cleanup failure; persistent refusals still fail closed.
32
+
5
33
  ## [0.9.16] - 2026-08-29
6
34
 
7
35
  Cumulative release of the `0.9.16-alpha.1` prerelease. The summary below covers the user-visible outcome of that work; the per-change detail remains in the prerelease section below.
package/native/index.d.ts CHANGED
@@ -1,5 +1,13 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
+ export declare class HostSession {
4
+
5
+ }
6
+
7
+ export declare class OwnerLease {
8
+
9
+ }
10
+
3
11
  export declare class PtySession {
4
12
  constructor()
5
13
  start(options: PtyStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise<PtyRunResult>
@@ -23,6 +31,14 @@ export declare class RetainedPostgres {
23
31
  release(): void
24
32
  }
25
33
 
34
+ export declare class RunnerLease {
35
+
36
+ }
37
+
38
+ export declare class StdinLease {
39
+
40
+ }
41
+
26
42
  /**
27
43
  * N-API wrapper around the root-scoped Rust control plane. The host marker is
28
44
  * intentionally held by the wrapper while the cloneable core stores only a
@@ -45,6 +61,89 @@ export declare class SubagentControl {
45
61
  }
46
62
  export type NapiSubagentControl = SubagentControl
47
63
 
64
+ export declare class SubscriptionLease {
65
+
66
+ }
67
+
68
+ export declare class TaskLease {
69
+
70
+ }
71
+
72
+ /** A single serialized native actor is shared by all instances in this environment. */
73
+ export declare class TaskSupervisor {
74
+ constructor()
75
+ /** Trusted-host seam only. Host authorization must run before admission. */
76
+ bindHostSession(scope: OwnerScope): HostSession
77
+ openTaskOwner(host: HostSession, scope: OwnerScope): {ok:true,value:OwnerLease}|{ok:false,error:TaskFailure}
78
+ startAgentTask(owner: OwnerLease, intent: AgentIntent, operation: string): {ok:true,value:TaskLease}|{ok:false,error:TaskFailure}
79
+ /** Admits one owned command; waiting for this setup never imposes an execution deadline. */
80
+ startCommandTask(owner: OwnerLease, intent: CommandIntent, operation: string, options?: CommandResourceOptions | undefined | null): Promise<{ok:true,value:TaskLease}|{ok:false,error:TaskFailure}>
81
+ resizeTaskTerminal(task: TaskLease, columns: number, rows: number): {ok:true,value:undefined}|{ok:false,error:TaskFailure}
82
+ taskStdin(task: TaskLease): {ok:true,value:StdinLease}|{ok:false,error:TaskFailure}
83
+ writeTaskInput(input: StdinLease, operation: string, data: InputData): Promise<{ok:true,value:InputReceipt}|{ok:false,error:TaskFailure}>
84
+ readTaskOutput(task: TaskLease, range: OutputRange): Promise<{ok:true,value:OutputPage}|{ok:false,error:TaskFailure}>
85
+ /** Claim once after host dispatch setup; operation replay never grants a second runner. */
86
+ claimTaskRunner(task: TaskLease): {ok:true,value:RunnerLease}|{ok:false,error:TaskFailure}
87
+ taskReference(task: TaskLease): {ok:true,value:NativeTaskRef}|{ok:false,error:TaskFailure}
88
+ /** Read the retained terminal receipt without registering an observation or replaying execution. */
89
+ taskSettlement(task: TaskLease): {ok:true,value:SettlementReceipt}|{ok:false,error:TaskFailure}
90
+ lookupTask(owner: OwnerLease, taskId: string): {ok:true,value:TaskLease}|{ok:false,error:TaskFailure}
91
+ /**
92
+ * Registers the observation before returning. Await observeTaskWait separately.
93
+ * Accepts the host-resolved numeric budget without u32 narrowing; omission arms no timer.
94
+ */
95
+ waitForTask(task: TaskLease, budgetMs?: number | undefined | null, designation?: HostSession | undefined | null): {ok:true,value:WaitLease}|{ok:false,error:TaskFailure}
96
+ foregroundTask(task: TaskLease, host: HostSession, budgetMs?: number | undefined | null): {ok:true,value:WaitLease}|{ok:false,error:TaskFailure}
97
+ observeTaskWait(wait: WaitLease): Promise<{ok:true,value:WaitOutcome}|{ok:false,error:TaskFailure}>
98
+ yieldTaskWait(wait: WaitLease, reason: YieldReason): {ok:true,value:WaitOutcome}|{ok:false,error:TaskFailure}
99
+ disposeTaskWait(wait: WaitLease): {ok:true,value:undefined}|{ok:false,error:TaskFailure}
100
+ cancelTask(task: TaskLease, cause: CancelCause): {ok:true,value:CancelReceipt}|{ok:false,error:TaskFailure}
101
+ /** Seals synchronously, then awaits independent runner cleanup acknowledgements. */
102
+ closeTaskOwner(owner: OwnerLease, cause: OwnerCloseCause): Promise<{ok:true,value:OwnerCloseReceipt}|{ok:false,error:TaskFailure}>
103
+ /**
104
+ * Retains the latest 256 accepted activity IDs with SHA-256 hashes and receipts per task.
105
+ * Identical replay is duplicate; conflicts emit no events and neither refreshes retention.
106
+ * Evicted IDs are fresh reports subject to terminal/owner guards. Terminal receipts never expire
107
+ * while the task record exists; this is not a total task-history byte cap or persistence layer.
108
+ */
109
+ reportTaskActivity(runner: RunnerLease, report: ActivityReport): {ok:true,value:ReportReceipt}|{ok:false,error:TaskFailure}
110
+ reportTaskOutcome(runner: RunnerLease, report: OutcomeReport): {ok:true,value:SettlementReceipt}|{ok:false,error:TaskFailure}
111
+ /**
112
+ * Private trusted-runner support, not a model/facade domain door.
113
+ * Allocates an unused terminal report ID atomically within the bounded activity window.
114
+ * Caller report IDs are never reserved or rewritten. Replay retains the terminal receipt;
115
+ * conflicting results and cancellation still use the report_task_outcome acceptance rules.
116
+ */
117
+ reportRunnerOutcome(runner: RunnerLease, result: TaskResult): {ok:true,value:SettlementReceipt}|{ok:false,error:TaskFailure}
118
+ /** Private trusted-runner support, not a model/facade domain door. Outcome is not cleanup. */
119
+ acknowledgeTaskCleanup(runner: RunnerLease, cleanup: Cleanup): {ok:true,value:Cleanup}|{ok:false,error:TaskFailure}
120
+ /**
121
+ * The callback wakes a drain. The host must also keep one bounded reconciliation poll
122
+ * until disposal/owner closure: an oversized evicted event has no authentic wake payload.
123
+ */
124
+ watchOwnerTasks(owner: OwnerLease, callback: (event: NativeEvent) => void, cursor?: Cursor | undefined | null): {ok:true,value:NativeTaskSubscription}|{ok:false,error:TaskFailure}
125
+ drainOwnerTasks(lease: SubscriptionLease): {ok:true,value:SubscriptionDrain}|{ok:false,error:TaskFailure}
126
+ disposeSubscription(lease: SubscriptionLease): void
127
+ }
128
+ export type NapiTaskSupervisor = TaskSupervisor
129
+
130
+ export declare class WaitLease {
131
+ get waitId(): string
132
+ }
133
+
134
+ export type ActivityChange =
135
+ | { kind: 'action', tool: string, text: string }
136
+ | { kind: 'model', model?: string, thinking?: string }
137
+ | { kind: 'metrics', elapsedMs?: number, toolCount?: number, tokenCount?: number }
138
+ | { kind: 'output', offset: string, bytesBase64: string }
139
+ | { kind: 'attention-set', attention: Attention }
140
+ | { kind: 'attention-clear', requestId: string }
141
+
142
+ export interface ActivityReport {
143
+ reportId: string
144
+ change: ActivityChange
145
+ }
146
+
48
147
  export type AdmissionRefusalKind = 'depthExceeded'|
49
148
  'capacityExhausted'|
50
149
  'dispatchGuardBusy'|
@@ -52,6 +151,16 @@ export type AdmissionRefusalKind = 'depthExceeded'|
52
151
  'unknownAgent'|
53
152
  'terminalChild';
54
153
 
154
+ /** Caller-provided strings retain their exact JavaScript UTF-16 code units. */
155
+ export interface AgentIntent {
156
+ kind: AgentTaskKind
157
+ agent: string
158
+ task: string
159
+ description?: string
160
+ cwd?: string
161
+ parentTaskId?: string
162
+ }
163
+
55
164
  /** The only statuses emitted by a child status watch. */
56
165
  export type AgentStatus = 'pending'|
57
166
  'running'|
@@ -60,6 +169,13 @@ export type AgentStatus = 'pending'|
60
169
  'interrupted'|
61
170
  'continued';
62
171
 
172
+ export type AgentTaskKind = 'agent';
173
+
174
+ export type Attention =
175
+ | { kind: 'none' }
176
+ | { kind: 'input-needed', requestId: string, prompt: string, route: PromptRoute }
177
+ | { kind: 'no-recent-activity', lastActivityAt?: string }
178
+
63
179
  export interface BlockRange {
64
180
  /** 1-indexed inclusive first line of the resolved block. */
65
181
  startLine: number
@@ -83,6 +199,20 @@ export interface BlockRangeOptions {
83
199
  line: number
84
200
  }
85
201
 
202
+ export type CancelCause = 'user'|
203
+ 'owner-close'|
204
+ 'execution-timeout'|
205
+ 'output-limit'|
206
+ 'parent-handoff'|
207
+ 'shutdown';
208
+
209
+ export interface CancelReceipt {
210
+ taskId: string
211
+ decision: string
212
+ execution: Execution
213
+ cleanup: Cleanup
214
+ }
215
+
86
216
  /** Persistent identity information returned by the registry. */
87
217
  export interface ChildIdentity {
88
218
  path: string
@@ -94,6 +224,50 @@ export interface ChildIdentity {
94
224
  loaded: boolean
95
225
  }
96
226
 
227
+ export type Cleanup =
228
+ | { kind: 'active' }
229
+ | { kind: 'draining' }
230
+ | { kind: 'reaped' }
231
+ | { kind: 'failed', resources: Array<ResourceFailure> }
232
+
233
+ export interface CommandIntent {
234
+ kind: CommandTaskKind
235
+ command: string
236
+ description?: string
237
+ cwd?: string
238
+ env?: Record<string,string>
239
+ shell?: CommandShell
240
+ /** Defaults to true; false makes env the complete child environment. */
241
+ inheritEnv?: boolean
242
+ terminal: CommandTerminal
243
+ executionTimeoutMs?: number
244
+ parentTaskId?: string
245
+ }
246
+
247
+ export type CommandOutputSink = 'file-spool'|
248
+ 'drained';
249
+
250
+ /** Trusted native adapter configuration, never model input or CommandIntent fields. */
251
+ export interface CommandResourceOptions {
252
+ sink?: CommandOutputSink
253
+ diskCapBytes?: number
254
+ livePreviewBytes?: number
255
+ foregroundSpillBytes?: number
256
+ background?: boolean
257
+ }
258
+
259
+ /** Execute this program directly, appending command as one final argument. */
260
+ export interface CommandShell {
261
+ program: string
262
+ args: string[]
263
+ }
264
+
265
+ export type CommandTaskKind = 'command';
266
+
267
+ export type CommandTerminal =
268
+ | { kind: 'pipe' }
269
+ | { kind: 'pty', columns: number, rows: number }
270
+
97
271
  /** A context line (before or after a match). */
98
272
  export interface ContextLine {
99
273
  /** 1-indexed line number in the source file. */
@@ -102,6 +276,22 @@ export interface ContextLine {
102
276
  line: string
103
277
  }
104
278
 
279
+ export interface CurrentAction {
280
+ tool: string
281
+ text: string
282
+ }
283
+
284
+ export interface Cursor {
285
+ generation: string
286
+ sequence: string
287
+ }
288
+
289
+ export type Execution =
290
+ | { kind: 'queued' }
291
+ | { kind: 'running' }
292
+ | { kind: 'cancelling', cause: CancelCause }
293
+ | { kind: 'settled', result: TaskResult }
294
+
105
295
  /** Resolved filesystem entry kind for glob filters and match metadata. */
106
296
  export declare enum FileType {
107
297
  /** Regular file. */
@@ -305,6 +495,21 @@ export interface GrepResult {
305
495
  */
306
496
  export declare function hasMatch(content: string | Uint8Array, pattern: string | Uint8Array, ignoreCase?: boolean | undefined | null, multiline?: boolean | undefined | null): boolean
307
497
 
498
+ export type HostObservation =
499
+ | { kind: 'foreground', waitId: string }
500
+ | { kind: 'background', reason: string }
501
+ | { kind: 'none', reason: string }
502
+
503
+ export type InputData =
504
+ | { kind: 'bytes', bytes: Buffer }
505
+ | { kind: 'eof' }
506
+
507
+ export interface InputReceipt {
508
+ operationId: string
509
+ acceptedBytes: number
510
+ kind: string
511
+ }
512
+
308
513
  /**
309
514
  * Invalidate the filesystem scan cache.
310
515
  *
@@ -347,6 +552,14 @@ export interface NativeChildSpec {
347
552
  cwd?: string
348
553
  }
349
554
 
555
+ export interface NativeEvent {
556
+ schemaVersion: number
557
+ cursor: Cursor
558
+ ownerId: string
559
+ taskId?: string
560
+ payload: TaskEvent
561
+ }
562
+
350
563
  export interface NativeExecutionGuardResult {
351
564
  token?: number
352
565
  refusal?: NativeAdmissionRefusal
@@ -362,12 +575,94 @@ export interface NativeStatusUpdate {
362
575
  cause?: TerminationCause
363
576
  }
364
577
 
578
+ export interface NativeTaskRef {
579
+ ownerId: string
580
+ taskId: string
581
+ attemptId: string
582
+ generation: string
583
+ }
584
+
585
+ export interface NativeTaskSubscription {
586
+ lease: SubscriptionLease
587
+ snapshot: OwnerSnapshot
588
+ cursor: Cursor
589
+ }
590
+
365
591
  export interface NativeTerminationResult {
366
592
  cause: TerminationCause
367
593
  forced: boolean
368
594
  graceMs: number
369
595
  }
370
596
 
597
+ export interface OmittedRange {
598
+ start: string
599
+ end: string
600
+ }
601
+
602
+ export interface OutcomeReport {
603
+ reportId: string
604
+ result: TaskResult
605
+ }
606
+
607
+ export interface OutputChunk {
608
+ offsets: OutputOffsets
609
+ bytes: Buffer
610
+ }
611
+
612
+ export interface OutputOffsets {
613
+ start: string
614
+ end: string
615
+ }
616
+
617
+ export interface OutputPage {
618
+ requested: OutputOffsets
619
+ chunks: Array<OutputChunk>
620
+ omittedRanges: Array<OutputOffsets>
621
+ nextOffset?: string
622
+ }
623
+
624
+ export interface OutputRange {
625
+ start: string
626
+ maximumBytes: number
627
+ }
628
+
629
+ export interface OutputRef {
630
+ ownerId: string
631
+ taskId: string
632
+ artifactId: string
633
+ byteCount: string
634
+ omittedRanges: Array<OmittedRange>
635
+ }
636
+
637
+ export type OwnerCloseCause = 'session-close'|
638
+ 'stage-close'|
639
+ 'app-shutdown';
640
+
641
+ export interface OwnerCloseReceipt {
642
+ ownerId: string
643
+ state: string
644
+ tasks: Array<CancelReceipt>
645
+ }
646
+
647
+ export type OwnerScope =
648
+ | { kind: 'session', sessionId: string }
649
+ | { kind: 'workflow-stage', sessionId: string, runId: string, stageId: string, stageAttemptId: string }
650
+
651
+ export interface OwnerSnapshot {
652
+ ownerId: string
653
+ scope: OwnerScope
654
+ generation: string
655
+ state: string
656
+ tasks: Array<TaskRecord>
657
+ cursor: Cursor
658
+ }
659
+
660
+ export interface PromptRoute {
661
+ sessionId: string
662
+ promptId: string
663
+ stageAttemptId?: string
664
+ }
665
+
371
666
  export interface PtyRunResult {
372
667
  exitCode?: number
373
668
  cancelled: boolean
@@ -388,6 +683,18 @@ export interface PtyStartOptions {
388
683
  closeStdinAfterCommand?: boolean
389
684
  }
390
685
 
686
+ export interface ReportReceipt {
687
+ reportId: string
688
+ cursor: Cursor
689
+ disposition: string
690
+ }
691
+
692
+ export interface ResourceFailure {
693
+ resource: string
694
+ code: string
695
+ message: string
696
+ }
697
+
391
698
  export interface RetainedPostgresSpawnOptions {
392
699
  executable: string
393
700
  args: Array<string>
@@ -452,8 +759,76 @@ export interface SearchResult {
452
759
  error?: string
453
760
  }
454
761
 
762
+ export interface SettlementReceipt {
763
+ taskId: string
764
+ cursor: Cursor
765
+ result: TaskResult
766
+ completionId: string
767
+ }
768
+
455
769
  export declare function spawnRetainedPostgres(options: RetainedPostgresSpawnOptions): RetainedPostgres
456
770
 
771
+ export interface SubscriptionDrain {
772
+ reset: boolean
773
+ snapshot?: OwnerSnapshot
774
+ cursor: Cursor
775
+ events: Array<NativeEvent>
776
+ failed: boolean
777
+ }
778
+
779
+ export type TaskEvent =
780
+ | { kind: 'task-admitted', task: TaskRecord }
781
+ | { kind: 'task-started', ref: NativeTaskRef }
782
+ | { kind: 'wait-yielded', ref: NativeTaskRef, waitId: string, reason: YieldReason }
783
+ | { kind: 'wait-started', ref: NativeTaskRef, waitId: string, observer: string }
784
+ | { kind: 'host-observation-changed', ref: NativeTaskRef, observation: HostObservation }
785
+ | { kind: 'task-activity', ref: NativeTaskRef, activity: ActivityReport }
786
+ | { kind: 'task-cancelling', ref: NativeTaskRef, cause: CancelCause }
787
+ | { kind: 'task-settled', ref: NativeTaskRef, result: TaskResult, completionId: string }
788
+ | { kind: 'cleanup-changed', ref: NativeTaskRef, cleanup: Cleanup }
789
+ | { kind: 'owner-closing' }
790
+ | { kind: 'owner-closed' }
791
+
792
+ export interface TaskFailure {
793
+ code: string
794
+ message: string
795
+ }
796
+
797
+ /** Optional metrics preserve exact JavaScript numbers, including NaN and signed zero. */
798
+ export interface TaskMetrics {
799
+ elapsedMs?: number
800
+ toolCount?: number
801
+ tokenCount?: number
802
+ }
803
+
804
+ export interface TaskRecord {
805
+ ref: NativeTaskRef
806
+ launchOperationId: string
807
+ parentTaskId?: string
808
+ launchGroupId?: string
809
+ launchOrdinal: number
810
+ kind: string
811
+ title: string
812
+ agentName?: string
813
+ model?: string
814
+ thinking?: string
815
+ execution: Execution
816
+ observation: HostObservation
817
+ /** True after a designated observation yields; retained after settlement and snapshot resets. */
818
+ wasBackground?: boolean
819
+ attention: Attention
820
+ cleanup: Cleanup
821
+ currentAction?: CurrentAction
822
+ metrics?: TaskMetrics
823
+ output: OutputRef
824
+ }
825
+
826
+ /** Terminal numeric exit codes retain JavaScript number values without i32 narrowing. */
827
+ export type TaskResult =
828
+ | { kind: 'completed', output: OutputRef, exitCode?: number }
829
+ | { kind: 'failed', code: string, message: string, output?: OutputRef, exitCode?: number }
830
+ | { kind: 'cancelled', cause: CancelCause, output?: OutputRef }
831
+
457
832
  /**
458
833
  * Explicit termination causes. Timer/idle/wall-clock causes are intentionally
459
834
  * absent, making timer-driven termination unrepresentable.
@@ -462,3 +837,13 @@ export type TerminationCause = 'abort'|
462
837
  'interrupt'|
463
838
  'fail-fast-skip'|
464
839
  'parent-shutdown';
840
+
841
+ export type WaitOutcome =
842
+ | { kind: 'settled', taskId: string, result: TaskResult }
843
+ | { kind: 'yielded', taskId: string, waitId: string, reason: YieldReason }
844
+
845
+ export type YieldReason = 'explicit'|
846
+ 'default-background'|
847
+ 'elapsed'|
848
+ 'intercom-coordination'|
849
+ 'input-needed';
package/native/index.js CHANGED
@@ -77,8 +77,8 @@ function requireNative() {
77
77
  try {
78
78
  const binding = require('@bastani/atomic-natives-android-arm64')
79
79
  const bindingPackageVersion = require('@bastani/atomic-natives-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -93,8 +93,8 @@ function requireNative() {
93
93
  try {
94
94
  const binding = require('@bastani/atomic-natives-android-arm-eabi')
95
95
  const bindingPackageVersion = require('@bastani/atomic-natives-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -114,8 +114,8 @@ function requireNative() {
114
114
  try {
115
115
  const binding = require('@bastani/atomic-natives-win32-x64-gnu')
116
116
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -130,8 +130,8 @@ function requireNative() {
130
130
  try {
131
131
  const binding = require('@bastani/atomic-natives-win32-x64-msvc')
132
132
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('@bastani/atomic-natives-win32-ia32-msvc')
149
149
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -163,8 +163,8 @@ function requireNative() {
163
163
  try {
164
164
  const binding = require('@bastani/atomic-natives-win32-arm64-msvc')
165
165
  const bindingPackageVersion = require('@bastani/atomic-natives-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -182,8 +182,8 @@ function requireNative() {
182
182
  try {
183
183
  const binding = require('@bastani/atomic-natives-darwin-universal')
184
184
  const bindingPackageVersion = require('@bastani/atomic-natives-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -198,8 +198,8 @@ function requireNative() {
198
198
  try {
199
199
  const binding = require('@bastani/atomic-natives-darwin-x64')
200
200
  const bindingPackageVersion = require('@bastani/atomic-natives-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -214,8 +214,8 @@ function requireNative() {
214
214
  try {
215
215
  const binding = require('@bastani/atomic-natives-darwin-arm64')
216
216
  const bindingPackageVersion = require('@bastani/atomic-natives-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -234,8 +234,8 @@ function requireNative() {
234
234
  try {
235
235
  const binding = require('@bastani/atomic-natives-freebsd-x64')
236
236
  const bindingPackageVersion = require('@bastani/atomic-natives-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -250,8 +250,8 @@ function requireNative() {
250
250
  try {
251
251
  const binding = require('@bastani/atomic-natives-freebsd-arm64')
252
252
  const bindingPackageVersion = require('@bastani/atomic-natives-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -271,8 +271,8 @@ function requireNative() {
271
271
  try {
272
272
  const binding = require('@bastani/atomic-natives-linux-x64-musl')
273
273
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -287,8 +287,8 @@ function requireNative() {
287
287
  try {
288
288
  const binding = require('@bastani/atomic-natives-linux-x64-gnu')
289
289
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -305,8 +305,8 @@ function requireNative() {
305
305
  try {
306
306
  const binding = require('@bastani/atomic-natives-linux-arm64-musl')
307
307
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -321,8 +321,8 @@ function requireNative() {
321
321
  try {
322
322
  const binding = require('@bastani/atomic-natives-linux-arm64-gnu')
323
323
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -339,8 +339,8 @@ function requireNative() {
339
339
  try {
340
340
  const binding = require('@bastani/atomic-natives-linux-arm-musleabihf')
341
341
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -355,8 +355,8 @@ function requireNative() {
355
355
  try {
356
356
  const binding = require('@bastani/atomic-natives-linux-arm-gnueabihf')
357
357
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -373,8 +373,8 @@ function requireNative() {
373
373
  try {
374
374
  const binding = require('@bastani/atomic-natives-linux-loong64-musl')
375
375
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -389,8 +389,8 @@ function requireNative() {
389
389
  try {
390
390
  const binding = require('@bastani/atomic-natives-linux-loong64-gnu')
391
391
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -407,8 +407,8 @@ function requireNative() {
407
407
  try {
408
408
  const binding = require('@bastani/atomic-natives-linux-riscv64-musl')
409
409
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -423,8 +423,8 @@ function requireNative() {
423
423
  try {
424
424
  const binding = require('@bastani/atomic-natives-linux-riscv64-gnu')
425
425
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('@bastani/atomic-natives-linux-ppc64-gnu')
442
442
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('@bastani/atomic-natives-linux-s390x-gnu')
458
458
  const bindingPackageVersion = require('@bastani/atomic-natives-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -476,8 +476,8 @@ function requireNative() {
476
476
  try {
477
477
  const binding = require('@bastani/atomic-natives-openharmony-arm64')
478
478
  const bindingPackageVersion = require('@bastani/atomic-natives-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -492,8 +492,8 @@ function requireNative() {
492
492
  try {
493
493
  const binding = require('@bastani/atomic-natives-openharmony-x64')
494
494
  const bindingPackageVersion = require('@bastani/atomic-natives-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -508,8 +508,8 @@ function requireNative() {
508
508
  try {
509
509
  const binding = require('@bastani/atomic-natives-openharmony-arm')
510
510
  const bindingPackageVersion = require('@bastani/atomic-natives-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '0.9.19-alpha.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '0.9.19-alpha.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 0.9.19-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
@@ -700,19 +700,34 @@ if (!nativeBinding) {
700
700
  }
701
701
 
702
702
  module.exports = nativeBinding
703
+ module.exports.HostSession = nativeBinding.HostSession
704
+ module.exports.OwnerLease = nativeBinding.OwnerLease
703
705
  module.exports.PtySession = nativeBinding.PtySession
704
706
  module.exports.RetainedPostgres = nativeBinding.RetainedPostgres
707
+ module.exports.RunnerLease = nativeBinding.RunnerLease
708
+ module.exports.StdinLease = nativeBinding.StdinLease
705
709
  module.exports.SubagentControl = nativeBinding.SubagentControl
706
710
  module.exports.NapiSubagentControl = nativeBinding.NapiSubagentControl
711
+ module.exports.SubscriptionLease = nativeBinding.SubscriptionLease
712
+ module.exports.TaskLease = nativeBinding.TaskLease
713
+ module.exports.TaskSupervisor = nativeBinding.TaskSupervisor
714
+ module.exports.NapiTaskSupervisor = nativeBinding.NapiTaskSupervisor
715
+ module.exports.WaitLease = nativeBinding.WaitLease
707
716
  module.exports.AdmissionRefusalKind = nativeBinding.AdmissionRefusalKind
708
717
  module.exports.AgentStatus = nativeBinding.AgentStatus
718
+ module.exports.AgentTaskKind = nativeBinding.AgentTaskKind
709
719
  module.exports.blockRangeAt = nativeBinding.blockRangeAt
720
+ module.exports.CancelCause = nativeBinding.CancelCause
721
+ module.exports.CommandOutputSink = nativeBinding.CommandOutputSink
722
+ module.exports.CommandTaskKind = nativeBinding.CommandTaskKind
710
723
  module.exports.FileType = nativeBinding.FileType
711
724
  module.exports.glob = nativeBinding.glob
712
725
  module.exports.grep = nativeBinding.grep
713
726
  module.exports.GrepOutputMode = nativeBinding.GrepOutputMode
714
727
  module.exports.hasMatch = nativeBinding.hasMatch
715
728
  module.exports.invalidateFsScanCache = nativeBinding.invalidateFsScanCache
729
+ module.exports.OwnerCloseCause = nativeBinding.OwnerCloseCause
716
730
  module.exports.search = nativeBinding.search
717
731
  module.exports.spawnRetainedPostgres = nativeBinding.spawnRetainedPostgres
718
732
  module.exports.TerminationCause = nativeBinding.TerminationCause
733
+ module.exports.YieldReason = nativeBinding.YieldReason
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic-natives",
3
- "version": "0.9.19-alpha.1",
3
+ "version": "0.9.19-alpha.2",
4
4
  "description": "Native Rust bindings for Atomic via N-API",
5
5
  "homepage": "https://github.com/bastani-inc/atomic",
6
6
  "author": "Bastani",
@@ -28,10 +28,10 @@
28
28
  "prepublish:native": "napi prepublish --npm-dir npm --tag-style npm --no-gh-release"
29
29
  },
30
30
  "devDependencies": {
31
- "@napi-rs/cli": "3.8.6"
31
+ "@napi-rs/cli": "3.9.0"
32
32
  },
33
33
  "engines": {
34
- "bun": ">=1.4.0",
34
+ "bun": ">=1.4.2",
35
35
  "node": ">= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0"
36
36
  },
37
37
  "napi": {
@@ -59,13 +59,13 @@
59
59
  "access": "public"
60
60
  },
61
61
  "optionalDependencies": {
62
- "@bastani/atomic-natives-win32-x64-msvc": "0.9.19-alpha.1",
63
- "@bastani/atomic-natives-darwin-x64": "0.9.19-alpha.1",
64
- "@bastani/atomic-natives-linux-x64-gnu": "0.9.19-alpha.1",
65
- "@bastani/atomic-natives-linux-arm64-gnu": "0.9.19-alpha.1",
66
- "@bastani/atomic-natives-darwin-arm64": "0.9.19-alpha.1",
67
- "@bastani/atomic-natives-win32-arm64-msvc": "0.9.19-alpha.1",
68
- "@bastani/atomic-natives-linux-x64-musl": "0.9.19-alpha.1",
69
- "@bastani/atomic-natives-linux-arm64-musl": "0.9.19-alpha.1"
62
+ "@bastani/atomic-natives-win32-x64-msvc": "0.9.19-alpha.2",
63
+ "@bastani/atomic-natives-darwin-x64": "0.9.19-alpha.2",
64
+ "@bastani/atomic-natives-linux-x64-gnu": "0.9.19-alpha.2",
65
+ "@bastani/atomic-natives-linux-arm64-gnu": "0.9.19-alpha.2",
66
+ "@bastani/atomic-natives-darwin-arm64": "0.9.19-alpha.2",
67
+ "@bastani/atomic-natives-win32-arm64-msvc": "0.9.19-alpha.2",
68
+ "@bastani/atomic-natives-linux-x64-musl": "0.9.19-alpha.2",
69
+ "@bastani/atomic-natives-linux-arm64-musl": "0.9.19-alpha.2"
70
70
  }
71
71
  }