@ai-ecoverse/slicc-kernel 1.172.0 → 1.172.2

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.
@@ -3118,7 +3118,7 @@ var init_version = __esm({
3118
3118
  "src/version.ts"() {
3119
3119
  "use strict";
3120
3120
  init_captured_globals();
3121
- KERNEL_VERSION = true ? "1.172.0" : "0.0.0-dev";
3121
+ KERNEL_VERSION = true ? "1.172.2" : "0.0.0-dev";
3122
3122
  OS_RELEASE = "6.0.0-slicc";
3123
3123
  }
3124
3124
  });
@@ -0,0 +1,11 @@
1
+ export type Portable<T extends FileSystemHandle> = {
2
+ handle: T;
3
+ } | {
4
+ path: string[];
5
+ };
6
+ type Top = () => Promise<FileSystemDirectoryHandle>;
7
+ export declare function clonable(handle: FileSystemHandle): boolean;
8
+ export declare function portable<T extends FileSystemHandle>(handle: T, top?: Top): Promise<Portable<T>>;
9
+ export declare function directoryAt(top: FileSystemDirectoryHandle, path: readonly string[]): Promise<FileSystemDirectoryHandle>;
10
+ export declare const samePath: (a: readonly string[], b: readonly string[]) => boolean;
11
+ export {};
@@ -1,3 +1,3 @@
1
1
  export declare const nameOf: (id: string) => string;
2
- export declare function rootId(factory: IDBFactory, root: FileSystemDirectoryHandle, locks?: LockManager | undefined): Promise<string>;
2
+ export declare function rootId(factory: IDBFactory, root: FileSystemDirectoryHandle, locks?: LockManager | undefined, top?: () => Promise<FileSystemDirectoryHandle>): Promise<string>;
3
3
  export declare function metadataName(top: FileSystemDirectoryHandle | undefined, root: FileSystemDirectoryHandle, id: (root: FileSystemDirectoryHandle) => Promise<string>): Promise<string>;
@@ -5,4 +5,6 @@ export interface MediaStore {
5
5
  }
6
6
  export declare const MEDIA_STORE = "handles";
7
7
  export declare function memoryMedia(): MediaStore;
8
- export declare function openMedia(name: string, factory: IDBFactory): Promise<MediaStore>;
8
+ type Top = () => Promise<FileSystemDirectoryHandle>;
9
+ export declare function openMedia(name: string, factory: IDBFactory, top?: Top): Promise<MediaStore>;
10
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { type LockManagerLike } from './client/protocol.js';
2
2
  import type { AttestOptions } from './fs/attest.js';
3
3
  import { type MetaStore } from './fs/meta.js';
4
+ import { type Portable } from './fs/portable.js';
4
5
  import { type ProtectInit } from './fs/protect.js';
5
6
  import { type UsersMode } from './fs/types.js';
6
7
  import type { EmbedderKindPolicy } from './kernel/embedder.js';
@@ -8,7 +9,7 @@ import type { WasmWorkerLike } from './kernel/host.js';
8
9
  import type { RouteTable } from './kernel/net/routes.js';
9
10
  import type { RealmTransportTraits } from './kernel/net/transport.js';
10
11
  import { type UplinkTraits } from './kernel/net/uplink.js';
11
- import { type ModuleUrlMaker, type RunOptions, type TerminalOptions } from './launcher.js';
12
+ import { type ModuleUrlMaker, type PendingMedium, type RunOptions, type TerminalOptions } from './launcher.js';
12
13
  import type { MediumHandle } from './mount/fsa.js';
13
14
  import type { HostfsGrant, HostfsPortGrant } from './mount/hostfs.js';
14
15
  import type { MediaStore } from './mount/media.js';
@@ -22,6 +23,7 @@ export interface InitRequest {
22
23
  id: number;
23
24
  op: 'init';
24
25
  root?: FileSystemDirectoryHandle;
26
+ rootPath?: string[];
25
27
  modules?: string;
26
28
  commands?: {
27
29
  append?: readonly string[];
@@ -133,13 +135,12 @@ export type MountRequest = {
133
135
  } | {
134
136
  id: number;
135
137
  op: 'mounts';
136
- } | {
138
+ } | ({
137
139
  id: number;
138
140
  op: 'insert';
139
141
  target: string;
140
142
  source?: string;
141
- handle: MediumHandle;
142
- };
143
+ } & Portable<MediumHandle>);
143
144
  export interface DialRequest {
144
145
  id: number;
145
146
  op: 'dial';
@@ -183,6 +184,7 @@ export type KernelRequest = {
183
184
  type WithoutId<T> = T extends unknown ? Omit<T, 'id'> : never;
184
185
  export type KernelCall = WithoutId<KernelRequest>;
185
186
  export declare function inOpfs(deps: ServeDeps, root: FileSystemDirectoryHandle): Promise<boolean>;
187
+ export declare function crossable(medium: PendingMedium): PendingMedium;
186
188
  export interface ServeDeps {
187
189
  rootId?: (root: FileSystemDirectoryHandle) => Promise<string>;
188
190
  storage: () => Promise<FileSystemDirectoryHandle>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.172.0",
3
+ "version": "1.172.2",
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",
@@ -89,7 +89,7 @@
89
89
  "@ai-ecoverse/wasm-tar": "1.35.0-9",
90
90
  "@ai-ecoverse/wasm-tls-engine": "4.2.0-12",
91
91
  "@ai-ecoverse/wasm-util-linux": "2.42.4-7",
92
- "@biomejs/biome": "2.6.2",
92
+ "@biomejs/biome": "2.6.3",
93
93
  "@types/node": "26.6.5",
94
94
  "acorn": "8.19.0",
95
95
  "esbuild": "0.28.2",