@ai-ecoverse/slicc-kernel 1.122.2 → 1.123.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 +10 -0
- package/dist/kernel-worker.js +159 -13
- package/dist/kernel-worker.js.map +4 -4
- package/dist/node-process-worker.js +74 -8
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +159 -13
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +74 -8
- package/dist/process-worker.js.map +3 -3
- package/dist/types/kernel/host.d.ts +2 -0
- package/dist/types/kernel/proc-info.d.ts +4 -0
- package/dist/types/kernel/protocol.d.ts +1 -0
- package/dist/types/kernel/wasm-memories.d.ts +20 -0
- package/dist/types/launcher.d.ts +6 -0
- package/dist/types/process/procfs.d.ts +4 -2
- package/dist/types/realm/live-vfs-fs.d.ts +1 -0
- package/package.json +1 -1
|
@@ -60,6 +60,7 @@ export interface SpawnWasmOptions {
|
|
|
60
60
|
noLinks: SyncFsTokenEntry['fs'];
|
|
61
61
|
createWorker: () => WasmWorkerLike;
|
|
62
62
|
onError?: (message: string) => void;
|
|
63
|
+
onOom?: () => boolean;
|
|
63
64
|
spawner?: ChildSpawner;
|
|
64
65
|
forker?: ChildForker;
|
|
65
66
|
fork?: ForkState;
|
|
@@ -114,6 +115,7 @@ export interface WasmProcessHandle {
|
|
|
114
115
|
tid: number;
|
|
115
116
|
state: 'R' | 'S';
|
|
116
117
|
}>;
|
|
118
|
+
ready?: Promise<boolean>;
|
|
117
119
|
}
|
|
118
120
|
export declare const KILL_GRACE_MS = 2000;
|
|
119
121
|
export declare const KILL_HARD_MS = 5000;
|
|
@@ -7,6 +7,7 @@ import type { DeviceMeta, KernelFdKind } from './fd-table.js';
|
|
|
7
7
|
export declare const WASM_PROCESS_INIT = "wasm-process-init";
|
|
8
8
|
export declare const WASM_PROCESS_EXIT = "wasm-process-exit";
|
|
9
9
|
export declare const WASM_PROCESS_ERROR = "wasm-process-error";
|
|
10
|
+
export declare const WASM_PROCESS_READY = "wasm-process-ready";
|
|
10
11
|
export declare const WASM_THREAD_SPAWN = "wasm-thread-spawn";
|
|
11
12
|
export declare const WASM_THREAD_INIT = "wasm-thread-init";
|
|
12
13
|
export declare const WASM_THREAD_EXIT = "wasm-thread-exit";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const DEFAULT_CEILING = 112;
|
|
2
|
+
export interface WasmMemoryCount {
|
|
3
|
+
live: number;
|
|
4
|
+
ceiling: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class WasmMemories {
|
|
7
|
+
private live;
|
|
8
|
+
private ceiling;
|
|
9
|
+
private waiters;
|
|
10
|
+
private readonly idleMs;
|
|
11
|
+
constructor(ceiling: number | undefined, idleMs?: number);
|
|
12
|
+
count(): WasmMemoryCount;
|
|
13
|
+
ended(): void;
|
|
14
|
+
learn(): void;
|
|
15
|
+
near(): boolean;
|
|
16
|
+
admit(): Promise<void>;
|
|
17
|
+
private progress;
|
|
18
|
+
private changed;
|
|
19
|
+
}
|
|
20
|
+
export declare function defaultCeiling(): number | undefined;
|
package/dist/types/launcher.d.ts
CHANGED
|
@@ -56,6 +56,10 @@ export interface LauncherOptions {
|
|
|
56
56
|
uplink?: NetworkUplink;
|
|
57
57
|
hostname?: string;
|
|
58
58
|
users?: UsersMode;
|
|
59
|
+
wasmMemories?: {
|
|
60
|
+
ceiling?: number;
|
|
61
|
+
idleMs?: number;
|
|
62
|
+
};
|
|
59
63
|
onDenial?: DenialHook;
|
|
60
64
|
sealed?: SealedHook;
|
|
61
65
|
clipboard?: ClipboardHook;
|
|
@@ -181,6 +185,7 @@ export declare class Launcher {
|
|
|
181
185
|
private readonly jobs;
|
|
182
186
|
private readonly locks;
|
|
183
187
|
private readonly fifos;
|
|
188
|
+
private readonly memories;
|
|
184
189
|
private readonly sems;
|
|
185
190
|
private readonly settling;
|
|
186
191
|
private readonly ptys;
|
|
@@ -299,6 +304,7 @@ export declare class Launcher {
|
|
|
299
304
|
private sourceCheck;
|
|
300
305
|
private treeScrubs;
|
|
301
306
|
private marks;
|
|
307
|
+
private admitted;
|
|
302
308
|
private start;
|
|
303
309
|
private shownIds;
|
|
304
310
|
private forget;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { MountLine, ProcessInfo, ProcessListing } from '../kernel/proc-info.js';
|
|
2
2
|
export declare const PID_FILES: readonly ['cmdline', 'comm', 'stat', 'statm', 'status'];
|
|
3
3
|
export declare const SYSTEM_FILES: readonly ['loadavg', 'meminfo', 'stat', 'uptime', 'version'];
|
|
4
|
+
export type ProcSysFile = string | ((listing: ProcessListing) => string);
|
|
4
5
|
export interface ProcSysTree {
|
|
5
|
-
readonly [name: string]:
|
|
6
|
+
readonly [name: string]: ProcSysFile | ProcSysTree;
|
|
6
7
|
}
|
|
7
8
|
export declare const SYS_TREE: ProcSysTree;
|
|
8
|
-
export declare function sysEntry(parts: readonly string[]):
|
|
9
|
+
export declare function sysEntry(parts: readonly string[]): ProcSysFile | ProcSysTree | undefined;
|
|
10
|
+
export declare function sysText(file: ProcSysFile, listing: () => ProcessListing): string;
|
|
9
11
|
type PidFile = (typeof PID_FILES)[number];
|
|
10
12
|
type SystemFile = (typeof SYSTEM_FILES)[number];
|
|
11
13
|
export interface ProcSys {
|
|
@@ -135,6 +135,7 @@ export interface LiveMountFsApi extends LiveFsApi {
|
|
|
135
135
|
sliccRename?: true;
|
|
136
136
|
sliccKept?: true;
|
|
137
137
|
sliccStale?: true;
|
|
138
|
+
sliccVanished?: true;
|
|
138
139
|
open?(path: string, flags: number, mode?: number): unknown;
|
|
139
140
|
statfsNode?(node: LiveFsNode): Record<string, number>;
|
|
140
141
|
sliccStatfs?: true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.123.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",
|