@ai-ecoverse/slicc-kernel 1.168.0 → 1.168.1

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,25 @@
1
+ import type { KernelFs } from '../fs/types.js';
2
+ export declare const SWAP_GAP_MS = 2000;
3
+ export interface SwapCounts {
4
+ swaps: number;
5
+ longestMs: number;
6
+ waits: number;
7
+ waitedMs: number;
8
+ }
9
+ export declare class PackageSwaps {
10
+ private readonly gaps;
11
+ private readonly isRoot;
12
+ private readonly hold;
13
+ private readonly closed;
14
+ private readonly gapMs;
15
+ private readonly tally;
16
+ constructor(isRoot: (path: string) => boolean, hold: (root: string) => Promise<() => void>, closed: () => void, gapMs?: number);
17
+ counts(): SwapCounts;
18
+ settled(): Promise<void>;
19
+ wrap(fs: KernelFs): KernelFs;
20
+ private rename;
21
+ private open;
22
+ private arm;
23
+ private close;
24
+ private land;
25
+ }
@@ -62,6 +62,12 @@ export interface ProcessListing {
62
62
  sent: number;
63
63
  held?: readonly string[];
64
64
  };
65
+ swaps?: {
66
+ swaps: number;
67
+ longestMs: number;
68
+ waits: number;
69
+ waitedMs: number;
70
+ };
65
71
  renameAcks?: {
66
72
  acks: number;
67
73
  busy: number;
@@ -14,4 +14,5 @@ export declare class PackageLocks {
14
14
  private readonly metadata;
15
15
  constructor(metadata: string, locks?: ReplacingLocks | undefined);
16
16
  loading<T>(roots: readonly string[], run: (waited: boolean) => Promise<T>): Promise<T>;
17
+ holding(root: string): Promise<() => void>;
17
18
  }
@@ -206,6 +206,7 @@ export declare class Launcher {
206
206
  private readonly jobs;
207
207
  private readonly locks;
208
208
  private readonly packageLocks;
209
+ private readonly swaps;
209
210
  private readonly fifos;
210
211
  private readonly memories;
211
212
  private readonly sems;
@@ -343,6 +344,7 @@ export declare class Launcher {
343
344
  private program;
344
345
  private launch;
345
346
  private loadPlanned;
347
+ private packageRootIs;
346
348
  private packageRoots;
347
349
  private loadedUnder;
348
350
  groupSession(pgid: number): number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.168.0",
3
+ "version": "1.168.1",
4
4
  "description": "SLICC's wasm-realm kernel: run Emscripten programs in the browser against OPFS, with fork, spawn, pipes and waitpid",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",