@ai-ecoverse/slicc-kernel 1.167.4 → 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.
- package/README.md +24 -1
- package/dist/index.js.map +1 -1
- package/dist/kernel-worker.js +332 -87
- package/dist/kernel-worker.js.map +4 -4
- package/dist/meta.js +61 -2
- package/dist/meta.js.map +3 -3
- package/dist/node-process-worker.cjs +3 -1
- package/dist/node-process-worker.cjs.map +2 -2
- package/dist/node-process-worker.js +3 -1
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +486 -241
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +3 -1
- package/dist/process-worker.js.map +2 -2
- package/dist/types/fs/opfs.d.ts +1 -0
- package/dist/types/fs/remote.d.ts +1 -0
- package/dist/types/fs/types.d.ts +2 -0
- package/dist/types/kernel/package-swaps.d.ts +25 -0
- package/dist/types/kernel/proc-info.d.ts +6 -0
- package/dist/types/kernel/replacing.d.ts +18 -0
- package/dist/types/launcher.d.ts +9 -0
- package/dist/types/meta.d.ts +4 -0
- package/package.json +3 -3
package/dist/types/fs/opfs.d.ts
CHANGED
package/dist/types/fs/types.d.ts
CHANGED
|
@@ -104,7 +104,9 @@ export interface KernelFs {
|
|
|
104
104
|
to: string;
|
|
105
105
|
};
|
|
106
106
|
content?: true;
|
|
107
|
+
outside?: true;
|
|
107
108
|
}) => void): () => void;
|
|
109
|
+
refresh?(trees: readonly string[]): void;
|
|
108
110
|
peers?(): Peers | undefined;
|
|
109
111
|
crossings?(mounted: (path: string) => boolean): void;
|
|
110
112
|
ancestry?(path: string): Promise<Array<Perm | undefined>>;
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const REPLACING_LOCK = "slicc-kernel-replacing:v1:";
|
|
2
|
+
export declare const REPLACED_WAIT_MS = 150;
|
|
3
|
+
export interface ReplacingLocks {
|
|
4
|
+
request(name: string, options: {
|
|
5
|
+
mode: 'shared' | 'exclusive';
|
|
6
|
+
ifAvailable?: boolean;
|
|
7
|
+
}, callback: (lock: unknown) => unknown): Promise<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare function replacingLocks(scope?: object): ReplacingLocks | undefined;
|
|
10
|
+
export declare function replacingLock(metadata: string, root: string): string;
|
|
11
|
+
export declare function exclusively<T>(locks: ReplacingLocks, names: readonly string[], run: () => Promise<T>): Promise<T>;
|
|
12
|
+
export declare class PackageLocks {
|
|
13
|
+
private readonly locks;
|
|
14
|
+
private readonly metadata;
|
|
15
|
+
constructor(metadata: string, locks?: ReplacingLocks | undefined);
|
|
16
|
+
loading<T>(roots: readonly string[], run: (waited: boolean) => Promise<T>): Promise<T>;
|
|
17
|
+
holding(root: string): Promise<() => void>;
|
|
18
|
+
}
|
package/dist/types/launcher.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export interface LauncherOptions {
|
|
|
76
76
|
protect?: Protection;
|
|
77
77
|
cron?: CronOptions;
|
|
78
78
|
moduleUrl?: ModuleUrlMaker;
|
|
79
|
+
packageLocks?: string;
|
|
79
80
|
}
|
|
80
81
|
export interface ModuleUrl {
|
|
81
82
|
url: string;
|
|
@@ -204,6 +205,8 @@ export declare class Launcher {
|
|
|
204
205
|
private readonly sudoer;
|
|
205
206
|
private readonly jobs;
|
|
206
207
|
private readonly locks;
|
|
208
|
+
private readonly packageLocks;
|
|
209
|
+
private readonly swaps;
|
|
207
210
|
private readonly fifos;
|
|
208
211
|
private readonly memories;
|
|
209
212
|
private readonly sems;
|
|
@@ -280,6 +283,8 @@ export declare class Launcher {
|
|
|
280
283
|
private roots;
|
|
281
284
|
private rootOnlyPath;
|
|
282
285
|
private trustedAppended;
|
|
286
|
+
private remoteChanged;
|
|
287
|
+
private catalogChanged;
|
|
283
288
|
private resetCatalogs;
|
|
284
289
|
private userScopes;
|
|
285
290
|
private userCommandDir;
|
|
@@ -338,6 +343,10 @@ export declare class Launcher {
|
|
|
338
343
|
private exeId;
|
|
339
344
|
private program;
|
|
340
345
|
private launch;
|
|
346
|
+
private loadPlanned;
|
|
347
|
+
private packageRootIs;
|
|
348
|
+
private packageRoots;
|
|
349
|
+
private loadedUnder;
|
|
341
350
|
groupSession(pgid: number): number | undefined;
|
|
342
351
|
private loopbackFor;
|
|
343
352
|
private sourceCheck;
|
package/dist/types/meta.d.ts
CHANGED
|
@@ -15,3 +15,7 @@ export interface PostFsNoticeOptions {
|
|
|
15
15
|
metadata?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare function postFsNotice(notice: FsNotice, options?: PostFsNoticeOptions): void;
|
|
18
|
+
export interface ReplacingOptions {
|
|
19
|
+
metadata?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function replacing<T>(paths: readonly string[], task: () => T | Promise<T>, options?: ReplacingOptions): Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
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",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@ai-ecoverse/py-numpy": "2.5.4-4",
|
|
73
|
-
"@ai-ecoverse/slicc-cdp": "1.42.
|
|
73
|
+
"@ai-ecoverse/slicc-cdp": "1.42.2",
|
|
74
74
|
"@ai-ecoverse/slicc-node": "2.5.2",
|
|
75
75
|
"@ai-ecoverse/slicc-scrub": "1.1.0",
|
|
76
|
-
"@ai-ecoverse/slicc-shared-web": "2.13.
|
|
76
|
+
"@ai-ecoverse/slicc-shared-web": "2.13.3",
|
|
77
77
|
"@ai-ecoverse/wasi-cargo": "0.99.0-6",
|
|
78
78
|
"@ai-ecoverse/wasi-pnpm": "12.9.1-21",
|
|
79
79
|
"@ai-ecoverse/wasi-ripgrep": "15.2.0-5",
|