@ai-ecoverse/slicc-kernel 1.167.4 → 1.168.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.
@@ -104,6 +104,7 @@ export declare class OpfsFs implements KernelFs {
104
104
  private io;
105
105
  private fresh;
106
106
  private exactly;
107
+ refresh(trees: readonly string[]): void;
107
108
  private forget;
108
109
  private missed;
109
110
  private remember;
@@ -6,6 +6,7 @@ export interface RemoteChange {
6
6
  to: string;
7
7
  };
8
8
  content?: true;
9
+ outside?: true;
9
10
  }
10
11
  export interface PeerRename {
11
12
  from: string;
@@ -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,17 @@
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
+ }
@@ -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,7 @@ export declare class Launcher {
204
205
  private readonly sudoer;
205
206
  private readonly jobs;
206
207
  private readonly locks;
208
+ private readonly packageLocks;
207
209
  private readonly fifos;
208
210
  private readonly memories;
209
211
  private readonly sems;
@@ -280,6 +282,8 @@ export declare class Launcher {
280
282
  private roots;
281
283
  private rootOnlyPath;
282
284
  private trustedAppended;
285
+ private remoteChanged;
286
+ private catalogChanged;
283
287
  private resetCatalogs;
284
288
  private userScopes;
285
289
  private userCommandDir;
@@ -338,6 +342,9 @@ export declare class Launcher {
338
342
  private exeId;
339
343
  private program;
340
344
  private launch;
345
+ private loadPlanned;
346
+ private packageRoots;
347
+ private loadedUnder;
341
348
  groupSession(pgid: number): number | undefined;
342
349
  private loopbackFor;
343
350
  private sourceCheck;
@@ -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.167.4",
3
+ "version": "1.168.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",
@@ -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.0",
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.0",
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",