@ai-ecoverse/slicc-kernel 1.124.6 → 1.124.8
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 +1 -1
- package/dist/kernel-worker.js +187 -67
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.js +52 -19
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +187 -67
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +52 -19
- package/dist/process-worker.js.map +2 -2
- package/dist/types/fs/unlinked.d.ts +15 -1
- package/dist/types/kernel/host.d.ts +2 -1
- package/dist/types/kernel/process.d.ts +7 -0
- package/dist/types/kernel/vfs-file.d.ts +3 -1
- package/dist/types/mount/mount-fs.d.ts +1 -0
- package/dist/types/process/kernel-streams.d.ts +1 -0
- package/dist/types/realm/sync-fs-dispatch.d.ts +1 -0
- package/dist/types/realm/sync-fs-token-registry.d.ts +2 -1
- package/dist/types/realm/sync-fs-wire.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type KernelFs, type NewOwner } from './types.js';
|
|
2
2
|
export declare const UNLINKED_DIR = ".slicc-unlinked";
|
|
3
|
+
export interface Replacements {
|
|
4
|
+
settled(path: string): Promise<void>;
|
|
5
|
+
missed(path: string): boolean;
|
|
6
|
+
generation(): number;
|
|
7
|
+
changedSince(path: string, gen: number): boolean;
|
|
8
|
+
}
|
|
3
9
|
export interface KeptFile {
|
|
4
10
|
readonly hidden: string;
|
|
5
11
|
release(): void;
|
|
@@ -51,6 +57,9 @@ export declare class UnlinkedKeeper {
|
|
|
51
57
|
private queue;
|
|
52
58
|
private count;
|
|
53
59
|
private readonly replacing;
|
|
60
|
+
private gen;
|
|
61
|
+
private floor;
|
|
62
|
+
private readonly touched;
|
|
54
63
|
private replaced;
|
|
55
64
|
private readonly links;
|
|
56
65
|
private readonly linked;
|
|
@@ -63,9 +72,14 @@ export declare class UnlinkedKeeper {
|
|
|
63
72
|
});
|
|
64
73
|
private serial;
|
|
65
74
|
wrap(fs?: KernelFs): KernelFs;
|
|
75
|
+
settled(path: string): Promise<void>;
|
|
76
|
+
generation(): number;
|
|
77
|
+
changedSince(path: string, gen: number): boolean;
|
|
78
|
+
private touch;
|
|
79
|
+
missed(path: string): boolean;
|
|
66
80
|
settle(pinned: Pinned, op: () => Promise<void>): Promise<void>;
|
|
67
81
|
private heldWithin;
|
|
68
|
-
pin(target: string, gated?: () => void): Promise<Pinned>;
|
|
82
|
+
pin(target: string, gated?: () => void, sealed?: () => void): Promise<Pinned>;
|
|
69
83
|
private keptFile;
|
|
70
84
|
private hide;
|
|
71
85
|
closed(path: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Dac } from '../fs/dac.js';
|
|
2
|
-
import { type PathGate } from '../fs/unlinked.js';
|
|
2
|
+
import { type PathGate, type Replacements } from '../fs/unlinked.js';
|
|
3
3
|
import { HeldPaths } from '../mount/mount-fs.js';
|
|
4
4
|
import { type SourceCheck, type SyncFsTokenEntry } from '../realm/sync-fs-token-registry.js';
|
|
5
5
|
import { type BlockedMask } from '../realm/sync-sab-wire.js';
|
|
@@ -82,6 +82,7 @@ export interface SpawnWasmOptions {
|
|
|
82
82
|
umount?: WasmProcessOptions['umount'];
|
|
83
83
|
held?: Set<HeldPaths>;
|
|
84
84
|
unlinkGate?: PathGate;
|
|
85
|
+
replacements?: Replacements;
|
|
85
86
|
jobs?: JobTable;
|
|
86
87
|
ptys?: PtyTable;
|
|
87
88
|
net?: LoopbackNet;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type CrontabCall, type CrontabResult } from '../cron/crontab.js';
|
|
2
2
|
import { type Created, type Dac } from '../fs/dac.js';
|
|
3
3
|
import type { KernelFs } from '../fs/types.js';
|
|
4
|
+
import type { Replacements } from '../fs/unlinked.js';
|
|
4
5
|
import type { MountCall } from '../mount/syscall.js';
|
|
5
6
|
import type { LinkRecord } from '../process/wasi/wasix-linker.js';
|
|
6
7
|
import type { SourceCheck } from '../realm/sync-fs-token-registry.js';
|
|
@@ -62,6 +63,7 @@ export type WasmSyscall = {
|
|
|
62
63
|
existing?: boolean;
|
|
63
64
|
pin?: VersionPin;
|
|
64
65
|
handle?: number;
|
|
66
|
+
ino?: number;
|
|
65
67
|
fifo?: boolean;
|
|
66
68
|
} | {
|
|
67
69
|
op: 'fd-pread';
|
|
@@ -202,6 +204,7 @@ export type WasmSyscall = {
|
|
|
202
204
|
dirty?: boolean;
|
|
203
205
|
pin?: VersionPin;
|
|
204
206
|
handle?: number;
|
|
207
|
+
ino?: number;
|
|
205
208
|
} | {
|
|
206
209
|
op: 'fd-open-tty';
|
|
207
210
|
name?: string;
|
|
@@ -517,6 +520,10 @@ export declare class WasmProcess {
|
|
|
517
520
|
keptPath?: (path: string) => string | undefined;
|
|
518
521
|
holds(path: string): Promise<boolean>;
|
|
519
522
|
keptHandle?: (handle: number) => string | undefined;
|
|
523
|
+
holdsHandle?: (handle: number) => boolean;
|
|
524
|
+
replacements?: Replacements;
|
|
525
|
+
private unmissed;
|
|
526
|
+
private stillOpen;
|
|
520
527
|
private keptOr;
|
|
521
528
|
private promote;
|
|
522
529
|
private reserve;
|
|
@@ -35,6 +35,7 @@ export interface VfsFileOptions {
|
|
|
35
35
|
truncate?: boolean;
|
|
36
36
|
create?: boolean;
|
|
37
37
|
id?: string;
|
|
38
|
+
ino?: number;
|
|
38
39
|
}
|
|
39
40
|
export interface VersionPin {
|
|
40
41
|
version: string;
|
|
@@ -58,6 +59,7 @@ export declare class VfsNode {
|
|
|
58
59
|
path: string;
|
|
59
60
|
orphaned: boolean;
|
|
60
61
|
id: string | undefined;
|
|
62
|
+
ino: number | undefined;
|
|
61
63
|
onDirty: (() => void) | undefined;
|
|
62
64
|
onDirtyState: ((on: boolean) => void) | undefined;
|
|
63
65
|
private counted;
|
|
@@ -125,7 +127,7 @@ export declare class VfsNodes implements UnlinkHolder {
|
|
|
125
127
|
holding(path: string): VfsNode | undefined;
|
|
126
128
|
private named;
|
|
127
129
|
private create;
|
|
128
|
-
open(path: string, pin?: VersionPin, writable?: boolean, id?: string): VfsNode;
|
|
130
|
+
open(path: string, pin?: VersionPin, writable?: boolean, id?: string, ino?: number): VfsNode;
|
|
129
131
|
adopt(path: string, contents: Uint8Array, dirty: boolean, writable?: boolean, id?: string): VfsNode;
|
|
130
132
|
holds(prefix: string): boolean;
|
|
131
133
|
writes(prefix: string): boolean;
|
|
@@ -73,6 +73,7 @@ export declare class HeldPaths extends Map<string, number> implements UnlinkHold
|
|
|
73
73
|
isKept(path: string): boolean;
|
|
74
74
|
private handlesAt;
|
|
75
75
|
keptFor(handle: number): KeptFile | undefined;
|
|
76
|
+
holdsHandle(handle: number): boolean;
|
|
76
77
|
keeps(hidden: string): boolean;
|
|
77
78
|
keep(path: string, file: KeptFile): void;
|
|
78
79
|
unkeep(path: string, file: KeptFile): void;
|
|
@@ -3,6 +3,7 @@ import { type SyncFsTokenEntry } from './sync-fs-token-registry.js';
|
|
|
3
3
|
import { type SyncFsRequest, type SyncFsResult } from './sync-fs-wire.js';
|
|
4
4
|
export declare function toErrno(err: unknown): SyncFsResult;
|
|
5
5
|
export interface SyncFsStatJson {
|
|
6
|
+
gen?: number;
|
|
6
7
|
isDirectory: boolean;
|
|
7
8
|
isFile: boolean;
|
|
8
9
|
isSymbolicLink: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Created, Dac } from '../fs/dac.js';
|
|
2
2
|
import type { KernelFs } from '../fs/types.js';
|
|
3
|
-
import type { KeptFile } from '../fs/unlinked.js';
|
|
3
|
+
import type { KeptFile, Replacements } from '../fs/unlinked.js';
|
|
4
4
|
import type { Cred } from '../kernel/cred.js';
|
|
5
5
|
export interface SyncFsTokenEntry {
|
|
6
6
|
fs: KernelFs;
|
|
@@ -24,6 +24,7 @@ export interface SyncFsTokenEntry {
|
|
|
24
24
|
links?: number;
|
|
25
25
|
created?: Created;
|
|
26
26
|
holdsKept?: (path: string) => Promise<boolean>;
|
|
27
|
+
replacements?: Replacements;
|
|
27
28
|
fresh?: (path: string) => void;
|
|
28
29
|
source?: SourceCheck;
|
|
29
30
|
}
|
|
@@ -18,6 +18,7 @@ export interface SyncFsRequest {
|
|
|
18
18
|
length?: number;
|
|
19
19
|
version?: string;
|
|
20
20
|
handle?: number;
|
|
21
|
+
gen?: number;
|
|
21
22
|
uid?: number;
|
|
22
23
|
gid?: number;
|
|
23
24
|
exclusive?: boolean;
|
|
@@ -64,6 +65,7 @@ export interface SyncFsBridgeStat {
|
|
|
64
65
|
version?: string;
|
|
65
66
|
uid?: number;
|
|
66
67
|
gid?: number;
|
|
68
|
+
gen?: number;
|
|
67
69
|
}
|
|
68
70
|
export interface SyncFsUsage {
|
|
69
71
|
quota: number;
|
|
@@ -99,7 +101,9 @@ export interface SyncFsPosixBridge {
|
|
|
99
101
|
chmod(path: string, mode: number): void;
|
|
100
102
|
utimes(path: string, atimeMs: number, mtimeMs: number, now?: boolean): void;
|
|
101
103
|
lutimes(path: string, atimeMs: number, mtimeMs: number, now?: boolean): void;
|
|
102
|
-
hold?(path: string, held: boolean, open?: boolean, handle?: number, want?: number
|
|
104
|
+
hold?(path: string, held: boolean, open?: boolean, handle?: number, want?: number, seen?: {
|
|
105
|
+
gen?: number;
|
|
106
|
+
}): number | undefined;
|
|
103
107
|
access?(path: string, mode: number, kind?: AccessKind, nofollow?: boolean): void;
|
|
104
108
|
create?(path: string, mode?: number, opening?: boolean): void;
|
|
105
109
|
mkfifo?(path: string, mode: number): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.124.
|
|
3
|
+
"version": "1.124.8",
|
|
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",
|