@ai-ecoverse/slicc-kernel 1.134.4 → 1.135.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.
@@ -11,6 +11,7 @@ import { type FdTable, type OpenFile } from './fd-table.js';
11
11
  import type { FifoTable } from './fifo.js';
12
12
  import { type CwdAnswer, type HeldCwdReply } from './held-cwd.js';
13
13
  import type { JobTable } from './jobs.js';
14
+ import { type Admission } from './js-threads.js';
14
15
  import type { KernelLocks } from './lock-service.js';
15
16
  import type { HttpHandles } from './net/http-syscalls.js';
16
17
  import type { Resolver } from './net/resolver.js';
@@ -31,6 +32,7 @@ export interface WasmWorkerLike {
31
32
  }
32
33
  export interface SpawnWasmOptions {
33
34
  pid: number;
35
+ admission: Admission;
34
36
  changes?: SharedArrayBuffer;
35
37
  cwds?: SharedArrayBuffer;
36
38
  cwdSlot?: number;
@@ -20,6 +20,12 @@ export interface JsThreadDeps {
20
20
  };
21
21
  dispatch: Dispatch;
22
22
  clocks: Pick<ProcessClocks, 'thread' | 'threadEnded' | 'timed'>;
23
+ admission: Admission;
24
+ }
25
+ export interface Admission {
26
+ admit(): Promise<void>;
27
+ started(): void;
28
+ ended(): void;
23
29
  }
24
30
  export declare class JsThreads {
25
31
  private readonly deps;
@@ -30,7 +36,11 @@ export declare class JsThreads {
30
36
  private closed;
31
37
  constructor(deps: JsThreadDeps);
32
38
  get size(): number;
39
+ private pending;
40
+ private get admission();
33
41
  spawn(msg: JsThreadSpawnMsg): void;
42
+ private refuse;
43
+ private begin;
34
44
  private crashed;
35
45
  stopped(stopped: boolean): void;
36
46
  close(): void;
@@ -0,0 +1 @@
1
+ export declare function prepFails(prepared: string): boolean;
@@ -32,6 +32,6 @@ export declare function procAlias(fs: {
32
32
  readlink?(path: string): Promise<string>;
33
33
  lstat?(path: string): Promise<unknown>;
34
34
  }, path: string, follow: boolean): Promise<string | undefined | ProcRefusal>;
35
- export declare function physicalProc(fs: Pick<SyncFsPosixBridge, 'stat' | 'changes'>): () => boolean;
35
+ export declare function physicalProc(fs: Pick<SyncFsPosixBridge, 'stat' | 'changes'>, now?: () => number): () => boolean;
36
36
  export declare function procfsBridge<T extends SyncFsPosixBridge>(fs: T, tree: ProcTree): T;
37
37
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.134.4",
3
+ "version": "1.135.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",
@@ -68,7 +68,7 @@
68
68
  "@ai-ecoverse/slicc-scrub": "1.0.0",
69
69
  "@ai-ecoverse/slicc-shared-web": "1.27.0",
70
70
  "@ai-ecoverse/wasi-cargo": "0.99.0-3",
71
- "@ai-ecoverse/wasi-pnpm": "12.9.1-16",
71
+ "@ai-ecoverse/wasi-pnpm": "12.9.1-17",
72
72
  "@ai-ecoverse/wasi-ripgrep": "15.2.0-5",
73
73
  "@ai-ecoverse/wasi-rustc": "1.98.1-6",
74
74
  "@ai-ecoverse/wasi-zig": "0.16.0-17",