@ai-ecoverse/slicc-kernel 1.134.3 → 1.135.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.
- package/README.md +5 -3
- package/dist/kernel-worker.js +51 -13
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +132 -67
- package/dist/node-process-worker.js.map +4 -4
- package/dist/node.js +51 -13
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +132 -67
- package/dist/process-worker.js.map +4 -4
- package/dist/types/kernel/host.d.ts +2 -0
- package/dist/types/kernel/js-threads.d.ts +10 -0
- package/dist/types/kernel/proc-info.d.ts +1 -0
- package/dist/types/process/js/js-context.d.ts +2 -0
- package/dist/types/process/process-fds.d.ts +4 -0
- package/dist/types/process/wasi/wasi-procfs.d.ts +1 -1
- package/dist/types/realm/emscripten-held-cwd.d.ts +11 -0
- package/dist/types/realm/emscripten-vfs-hook.d.ts +2 -0
- package/package.json +4 -4
|
@@ -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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HeldCwdInit } from '../../kernel/protocol.js';
|
|
1
2
|
import { type SyncFsBridgeStat } from '../../realm/sync-fs-wire.js';
|
|
2
3
|
import { type JsChild, type JsExited, type JsSpawnOptions, type JsWaitOptions } from './js-children.js';
|
|
3
4
|
import { type JsFdType, type JsOpenOptions, type JsStatFs, type JsWriteOptions } from './js-io.js';
|
|
@@ -152,6 +153,7 @@ export interface ContextOptions {
|
|
|
152
153
|
links: boolean;
|
|
153
154
|
};
|
|
154
155
|
owned?: SharedArrayBuffer;
|
|
156
|
+
held?: HeldCwdInit | undefined;
|
|
155
157
|
failed?: () => number | undefined;
|
|
156
158
|
}
|
|
157
159
|
export interface Identity {
|
|
@@ -45,6 +45,7 @@ export interface KernelImports {
|
|
|
45
45
|
fdRead?: unknown;
|
|
46
46
|
sleepMs?: unknown;
|
|
47
47
|
flock?: unknown;
|
|
48
|
+
getcwd?: unknown;
|
|
48
49
|
}
|
|
49
50
|
export declare function importKey(namespace: WebAssembly.ModuleImports, name: keyof KernelImports, glue: KernelImports | undefined): string | undefined;
|
|
50
51
|
export declare function wrapImport(imports: WebAssembly.Imports, name: keyof KernelImports, glue: KernelImports | undefined, wrap: (original: Syscall) => Syscall, optional?: boolean): void;
|
|
@@ -89,6 +90,9 @@ export declare function accounts(env?: Record<string, string>): {
|
|
|
89
90
|
group: string;
|
|
90
91
|
};
|
|
91
92
|
export declare function useMounts(Fs: ProcessFs, env?: Record<string, string>, live?: boolean): void;
|
|
93
|
+
export declare function goneCwdGetcwd(imports: WebAssembly.Imports, fs: () => {
|
|
94
|
+
sliccCwdGone?(): boolean;
|
|
95
|
+
} | undefined, glue?: KernelImports): void;
|
|
92
96
|
export declare function kernelAccess(imports: WebAssembly.Imports, fs: () => ProcessFs | undefined, memory: () => WebAssembly.Memory | undefined, glue?: KernelImports): void;
|
|
93
97
|
export declare function kernelLink(imports: WebAssembly.Imports, fs: () => ProcessFs | undefined, memory: () => WebAssembly.Memory | undefined, glue?: KernelImports): void;
|
|
94
98
|
export declare function devCreations(imports: WebAssembly.Imports, fs: () => ProcessFs | undefined, memory: () => WebAssembly.Memory | undefined, glue?: KernelImports): void;
|
|
@@ -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'
|
|
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 {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HeldCwd, HeldCwdReply } from '../kernel/held-cwd.js';
|
|
2
|
+
export declare const DELETED = " (deleted)";
|
|
3
|
+
export declare const relativeHere: (path: string) => boolean;
|
|
4
|
+
export declare const cwdFor: (cwd: string, held: HeldCwd | undefined, path: string) => string;
|
|
5
|
+
export interface HeldCwdFs {
|
|
6
|
+
chdir?(path: string): void;
|
|
7
|
+
cwd?(): string;
|
|
8
|
+
sliccHeldCwd?(): string;
|
|
9
|
+
sliccCwdGone?(): boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function holdingCwd(Fs: HeldCwdFs, held: HeldCwd, chdirred: (path: string) => HeldCwdReply): void;
|
|
@@ -3,6 +3,8 @@ import type { SyncFsPosixBridge } from './sync-fs-wire.js';
|
|
|
3
3
|
export interface EmscriptenFsForHook extends LiveMountFsApi {
|
|
4
4
|
chdir(path: string): void;
|
|
5
5
|
sliccChdirAt?(path: string): void;
|
|
6
|
+
sliccHeldCwd?(): string;
|
|
7
|
+
sliccCwdGone?(): boolean;
|
|
6
8
|
chown?(path: string | object, uid: number, gid: number, dontFollow?: boolean): void;
|
|
7
9
|
}
|
|
8
10
|
export interface EmscriptenVfsHandle {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.135.0",
|
|
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",
|
|
@@ -63,16 +63,16 @@
|
|
|
63
63
|
"format": "biome check --write ."
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@ai-ecoverse/py-numpy": "2.5.4-
|
|
66
|
+
"@ai-ecoverse/py-numpy": "2.5.4-2",
|
|
67
67
|
"@ai-ecoverse/slicc-node": "2.5.1",
|
|
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-
|
|
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",
|
|
75
|
-
"@ai-ecoverse/wasix-python": "3.15.0-
|
|
75
|
+
"@ai-ecoverse/wasix-python": "3.15.0-3",
|
|
76
76
|
"@ai-ecoverse/wasm-bash": "5.3.0-21",
|
|
77
77
|
"@ai-ecoverse/wasm-coreutils": "9.12.0-10",
|
|
78
78
|
"@ai-ecoverse/wasm-curl": "8.22.0-7",
|