@ai-ecoverse/slicc-kernel 1.108.1 → 1.108.3

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.
@@ -27,6 +27,7 @@ export interface JsProgram {
27
27
  abi: 'js';
28
28
  glue: string;
29
29
  path: string;
30
+ url?: string;
30
31
  }
31
32
  export type Program = WasmProgram | JsProgram;
32
33
  export interface ForkState {
@@ -62,7 +62,15 @@ export interface LauncherOptions {
62
62
  sudoTimeoutMs?: number;
63
63
  protect?: Protection;
64
64
  cron?: CronOptions;
65
+ moduleUrl?: ModuleUrlMaker;
65
66
  }
67
+ export interface ModuleUrl {
68
+ url: string;
69
+ revoke(): void;
70
+ }
71
+ export type ModuleUrlMaker = (source: string) => ModuleUrl;
72
+ export declare function dataModuleUrl(source: string): ModuleUrl;
73
+ export declare function blobModuleUrl(source: string): ModuleUrl;
66
74
  export interface CronOptions {
67
75
  clock?: CronClock;
68
76
  lock?: string;
@@ -137,6 +145,9 @@ export declare class Launcher {
137
145
  private readonly unlinkOwnerOption;
138
146
  private readonly base;
139
147
  private readonly createWorker;
148
+ private readonly moduleUrl;
149
+ private readonly moduleUrls;
150
+ private readonly urlsInUse;
140
151
  private readonly modulesDir;
141
152
  private readonly appended;
142
153
  private readonly reportedRoots;
@@ -270,6 +281,9 @@ export declare class Launcher {
270
281
  private module;
271
282
  private checkedSources;
272
283
  private text;
284
+ private urlFor;
285
+ private heldUrl;
286
+ private releaseUrl;
273
287
  private names;
274
288
  private program;
275
289
  private launch;
@@ -6,7 +6,7 @@ import type { WasmWorkerLike } from './kernel/host.js';
6
6
  import type { RouteTable } from './kernel/net/routes.js';
7
7
  import type { RealmTransportTraits } from './kernel/net/transport.js';
8
8
  import { type UplinkTraits } from './kernel/net/uplink.js';
9
- import { type RunOptions, type TerminalOptions } from './launcher.js';
9
+ import { type ModuleUrlMaker, type RunOptions, type TerminalOptions } from './launcher.js';
10
10
  import type { MediumHandle } from './mount/fsa.js';
11
11
  import type { HostfsGrant, HostfsPortGrant } from './mount/hostfs.js';
12
12
  import type { MediaStore } from './mount/media.js';
@@ -176,6 +176,7 @@ export interface ServeDeps {
176
176
  syncAccess?: boolean;
177
177
  createWorker: () => WasmWorkerLike;
178
178
  createDriverWorker?: () => WasmWorkerLike;
179
+ moduleUrl?: ModuleUrlMaker;
179
180
  metadata?: (name: string) => Promise<MetaStore>;
180
181
  media?: (name: string) => Promise<MediaStore>;
181
182
  locks?: LockManagerLike | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.108.1",
3
+ "version": "1.108.3",
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",