@ai-ecoverse/slicc-kernel 1.166.4 → 1.167.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.
@@ -3106,7 +3106,7 @@ var init_version = __esm({
3106
3106
  "src/version.ts"() {
3107
3107
  "use strict";
3108
3108
  init_captured_globals();
3109
- KERNEL_VERSION = true ? "1.166.4" : "0.0.0-dev";
3109
+ KERNEL_VERSION = true ? "1.167.0" : "0.0.0-dev";
3110
3110
  OS_RELEASE = "6.0.0-slicc";
3111
3111
  }
3112
3112
  });
@@ -55,8 +55,20 @@ export interface PeerKept {
55
55
  undoing<T>(op: () => Promise<T>): Promise<T>;
56
56
  }
57
57
  export declare const PEER_RM_MS = 1000;
58
+ export declare const SHARED_ACK_MS: number;
58
59
  export declare const PEER_RENAME_MS = 10000;
59
60
  export declare const PEER_GATE_MS: number;
61
+ export declare const SHARED_PREFIX = "shared.";
62
+ export declare const keptLock: (hidden: string) => string;
63
+ export declare function sharedKept(hidden: string): boolean;
64
+ export interface SharedLocks {
65
+ request(name: string, options: {
66
+ mode?: 'shared' | 'exclusive';
67
+ ifAvailable?: boolean;
68
+ }, callback: (lock: unknown) => Promise<unknown>): Promise<unknown>;
69
+ }
70
+ export declare function holdShared(locks: SharedLocks | undefined, name: string): Promise<() => Promise<void>>;
71
+ export declare function whenLast(locks: SharedLocks | undefined, name: string, op: () => Promise<unknown>): Promise<boolean>;
60
72
  export declare class PathGate {
61
73
  private readonly tails;
62
74
  acquire(path: string): Promise<() => void>;
@@ -111,7 +123,13 @@ export declare class UnlinkedKeeper {
111
123
  adopt(hidden: string, refs: number): KeptFile;
112
124
  peerKeep(target: string, over: boolean, valid?: () => Promise<boolean>): Promise<PeerKept>;
113
125
  private setAside;
126
+ private asideOne;
127
+ private sharedAside;
128
+ sharedFile(hidden: string, refs: number): Promise<KeptFile>;
129
+ private dropIfLast;
130
+ private sharedLocks;
114
131
  private undoing;
132
+ private rollBackAsides;
115
133
  private moveBack;
116
134
  removable(target: string, options?: {
117
135
  recursive?: boolean;
@@ -439,6 +439,7 @@ export declare class Launcher {
439
439
  private readonly peerGates;
440
440
  private peerOptions;
441
441
  private peerKept;
442
+ private adoptShared;
442
443
  private adoptKept;
443
444
  private openNodes;
444
445
  private nodeOpened;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.166.4",
3
+ "version": "1.167.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",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@ai-ecoverse/py-numpy": "2.5.4-4",
67
- "@ai-ecoverse/slicc-cdp": "1.41.15",
67
+ "@ai-ecoverse/slicc-cdp": "1.41.17",
68
68
  "@ai-ecoverse/slicc-node": "2.5.2",
69
69
  "@ai-ecoverse/slicc-scrub": "1.1.0",
70
70
  "@ai-ecoverse/slicc-shared-web": "2.12.3",