@ai-ecoverse/slicc-kernel 1.196.18 → 1.196.19

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.
@@ -3732,7 +3732,7 @@ var init_version = __esm({
3732
3732
  "src/version.ts"() {
3733
3733
  "use strict";
3734
3734
  init_captured_globals();
3735
- KERNEL_VERSION = true ? "1.196.18" : "0.0.0-dev";
3735
+ KERNEL_VERSION = true ? "1.196.19" : "0.0.0-dev";
3736
3736
  OS_RELEASE = "6.0.0-slicc";
3737
3737
  }
3738
3738
  });
@@ -24,6 +24,7 @@ export interface MetaEntry {
24
24
  to: string;
25
25
  at: number;
26
26
  replace?: true;
27
+ privateCopy?: true;
27
28
  lock?: string;
28
29
  root?: {
29
30
  ino: number;
@@ -1,4 +1,5 @@
1
1
  import { type MetaStore, type MetaTransactions } from './meta.js';
2
+ import { PrivateRename } from './private-rename.js';
2
3
  import { type KeepHandlers, type LockManagerLike, type RemoteListener } from './remote.js';
3
4
  import { type CopyOptions, type DirectoryMatch, type FsStat, type KernelFs, type NewOwner, type OwnerChange, type PeerKeeps, type Peers, type Perm, type PwriteOptions } from './types.js';
4
5
  export type OpfsOp = 'lookup' | 'read' | 'write' | 'commit' | 'sidecar';
@@ -12,6 +13,10 @@ export declare function syncAccessHandles(scope?: object): boolean;
12
13
  export declare const FILE_TIMES_MS = 100;
13
14
  export declare class OpfsFs implements KernelFs {
14
15
  private readonly root;
16
+ readonly privateRename: PrivateRename | undefined;
17
+ private insidePrivateOp;
18
+ private privateRedirect?;
19
+ private privateSession?;
15
20
  private readonly meta;
16
21
  private readonly dirs;
17
22
  private readonly files;
@@ -246,6 +251,12 @@ export declare class OpfsFs implements KernelFs {
246
251
  private resolvedForms;
247
252
  amongPeers(): boolean;
248
253
  peerOp(name: string, args: unknown[], inner: (...args: unknown[]) => Promise<unknown>): Promise<unknown>;
254
+ privateOp(name: string, args: unknown[], inner: (...args: unknown[]) => Promise<unknown>): Promise<unknown>;
255
+ private privateCopyReady;
256
+ private usePrivateCopy;
257
+ private privateCopy;
258
+ private commitPrivateCopy;
259
+ private duplicate;
249
260
  private readonly renamingDirs;
250
261
  private intents;
251
262
  private intend;
@@ -268,6 +279,7 @@ export declare class OpfsFs implements KernelFs {
268
279
  private moved;
269
280
  private moveChild;
270
281
  private copy;
282
+ private copyBytes;
271
283
  symlink(target: string, path: string, owner?: NewOwner): Promise<void>;
272
284
  realpath(path: string, follow: boolean): Promise<string>;
273
285
  readlink(path: string): Promise<string>;
@@ -0,0 +1,25 @@
1
+ export declare class PrivatePaths {
2
+ readonly names: Set<string>;
3
+ private bound;
4
+ private shifted;
5
+ private readonly listing;
6
+ private readonly removing;
7
+ constructor(paths: string[], listing: boolean, removing: boolean);
8
+ touches(roots: Set<string>, names?: Set<string>): boolean;
9
+ bind(path: string): void;
10
+ moved(from: string, to: string): void;
11
+ redirected(from: string, to: string): Set<string>;
12
+ }
13
+ export declare class PrivateRename {
14
+ private readonly active;
15
+ private readonly barriers;
16
+ private readonly waiters;
17
+ private wait;
18
+ private wake;
19
+ private blocked;
20
+ enter(op: PrivatePaths): Promise<void>;
21
+ leave(op: PrivatePaths): void;
22
+ redirect(op: PrivatePaths, from: string, to: string): Promise<void>;
23
+ moved(from: string, to: string): void;
24
+ exclusive<T>(op: PrivatePaths, run: () => Promise<T>): Promise<T>;
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.196.18",
3
+ "version": "1.196.19",
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",