@ai-ecoverse/slicc-kernel 1.195.30 → 1.195.31

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.
@@ -3498,7 +3498,7 @@ var init_version = __esm({
3498
3498
  "src/version.ts"() {
3499
3499
  "use strict";
3500
3500
  init_captured_globals();
3501
- KERNEL_VERSION = true ? "1.195.30" : "0.0.0-dev";
3501
+ KERNEL_VERSION = true ? "1.195.31" : "0.0.0-dev";
3502
3502
  OS_RELEASE = "6.0.0-slicc";
3503
3503
  }
3504
3504
  });
@@ -64,6 +64,6 @@ export interface BinfmtRule {
64
64
  export declare function binfmtHex(bytes: Uint8Array): string;
65
65
  export declare function magicRule(name: string, pkg: string, declared: unknown): BinfmtRule | undefined;
66
66
  export declare function magicMatches(rule: BinfmtRule, head: Uint8Array): boolean;
67
- export declare function scanBinfmts(fs: KernelFs, modules: string | string[], warn?: (message: string) => void, readManifest?: (path: string) => Promise<string>): Promise<BinfmtRule[]>;
67
+ export declare function scanBinfmts(fs: KernelFs, modules: string | string[], warn?: (message: string) => void): Promise<BinfmtRule[]>;
68
68
  export declare function binfmtFor(rules: readonly BinfmtRule[], path: string, head?: Uint8Array): BinfmtRule | undefined;
69
69
  export {};
@@ -41,6 +41,7 @@ export declare class Integrity {
41
41
  key?: string;
42
42
  }>;
43
43
  checkSnapshot(path: string, real: string, bytes: Uint8Array, caller: IntegrityCaller, asked?: string): Promise<void>;
44
+ checkManifest(path: string, real: string, hash: string, caller: IntegrityCaller): Promise<void>;
44
45
  get readsChecked(): boolean;
45
46
  readSource(path: string, caller: IntegrityCaller, plain: () => Promise<Uint8Array>): Promise<Uint8Array>;
46
47
  openSource(path: string, caller: IntegrityCaller, real?: string): Promise<void>;
@@ -48,6 +49,7 @@ export declare class Integrity {
48
49
  private pass;
49
50
  private source;
50
51
  private verify;
52
+ private checkHash;
51
53
  forget(path?: string): void;
52
54
  private expected;
53
55
  private say;
@@ -242,9 +242,8 @@ export declare class Launcher {
242
242
  private readonly appended;
243
243
  private readonly reportedRoots;
244
244
  private readonly env;
245
- private readonly catalogs;
246
- private readonly ownCatalogs;
247
- private readonly binfmts;
245
+ private catalog;
246
+ private readonly planCatalogs;
248
247
  private scopes;
249
248
  private unwatchScopes;
250
249
  private readonly warned;
@@ -352,7 +351,10 @@ export declare class Launcher {
352
351
  private announcedTraits;
353
352
  onTraits(listener: () => void): () => void;
354
353
  updateTransportTraits(): boolean;
355
- commands(scope?: string): Promise<Map<string, Command>>;
354
+ private catalogOf;
355
+ private scanFs;
356
+ private sudoFs;
357
+ commands(scope?: string, reads?: SudoReads): Promise<Map<string, Command>>;
356
358
  private readonly refusedOf;
357
359
  private refusals;
358
360
  private ownCommands;
@@ -595,6 +597,7 @@ export declare class Launcher {
595
597
  private entryTarget;
596
598
  private moved;
597
599
  private processChain;
600
+ private processView;
598
601
  private starting;
599
602
  openTerminal(argv: string[], options: TerminalOptions): Promise<TerminalSession>;
600
603
  run(argv: string[], options?: RunOptions): Promise<RunResult>;
@@ -4,6 +4,7 @@ export interface SudoFiles {
4
4
  hashes: FileMap;
5
5
  routes: FileMap;
6
6
  routeSha256?: string;
7
+ chainSha256?: string;
7
8
  scripts?: string[];
8
9
  }
9
10
  interface FileAccess {
@@ -15,15 +16,23 @@ export declare class SudoReads {
15
16
  private readonly access;
16
17
  private readonly reads;
17
18
  private readonly names;
19
+ private readonly documents;
20
+ private readonly manifestFiles;
21
+ private readonly observed;
22
+ readonly interpreters: string[][];
23
+ chainSha256?: string;
18
24
  readonly operandsFromEnd: Map<number, string>;
19
25
  readonly snapshots: ReadonlyMap<string, Uint8Array>;
20
26
  constructor(access: FileAccess, snapshots?: ReadonlyMap<string, Uint8Array>);
21
27
  private bytes;
22
28
  private raw;
23
- manifest(path: string, verify: (real: string, bytes: Uint8Array) => Promise<void>): Promise<string>;
29
+ manifest(path: string, verify: (real: string, hash: string) => Promise<void>, raw: (real: string) => Promise<Uint8Array>): Promise<string>;
30
+ private readManifest;
31
+ private document;
24
32
  private saw;
25
33
  through(path: string, resolved: string): Promise<void>;
26
34
  head(path: string): Promise<Uint8Array | undefined>;
35
+ private inputs;
27
36
  bind(paths: readonly string[]): Promise<SudoFiles>;
28
37
  }
29
38
  export {};
@@ -30,6 +30,7 @@ export interface SudoRequest {
30
30
  rootOnly?: Record<string, boolean>;
31
31
  userWritable?: SudoFile[];
32
32
  routeSha256?: string;
33
+ chainSha256?: string;
33
34
  validate?: true;
34
35
  timestamp?: true;
35
36
  }
@@ -37,7 +38,7 @@ export interface SudoFile {
37
38
  path: string;
38
39
  sha256: string;
39
40
  }
40
- export type SudoReplay = Pick<SudoRequest, 'id' | 'user' | 'uid' | 'target' | 'argv' | 'path' | 'cwd' | 'stdin' | 'rootOnly' | 'userWritable' | 'routeSha256' | 'tag' | 'tags' | 'validate'>;
41
+ export type SudoReplay = Pick<SudoRequest, 'id' | 'user' | 'uid' | 'target' | 'argv' | 'path' | 'cwd' | 'stdin' | 'rootOnly' | 'userWritable' | 'routeSha256' | 'chainSha256' | 'tag' | 'tags' | 'validate'>;
41
42
  export interface SudoReplayed {
42
43
  grant: SudoGrant;
43
44
  caller: Account;
@@ -116,6 +117,7 @@ type Failure = {
116
117
  };
117
118
  export interface SudoOptions {
118
119
  fs: KernelFs;
120
+ planFs?: (reads: SudoReads) => KernelFs;
119
121
  users: UserDb;
120
122
  mode: UsersMode;
121
123
  hostname: string;
@@ -137,7 +139,7 @@ export declare class Sudo {
137
139
  private warn;
138
140
  provision(): Promise<void>;
139
141
  trusted(path: string): Promise<boolean>;
140
- trustedThrough(path: string, destination?: string): Promise<boolean>;
142
+ trustedThrough(path: string, destination?: string, fs?: KernelFs): Promise<boolean>;
141
143
  private rootOnly;
142
144
  private crossesLink;
143
145
  private existing;
@@ -152,6 +154,7 @@ export declare class Sudo {
152
154
  reachable(cred: Cred, cwd: string): Promise<boolean>;
153
155
  real(file: string): Promise<string>;
154
156
  moved({ routes }: SudoFiles, loading?: boolean): Promise<string | undefined>;
157
+ missingBacking(hashes: Readonly<Record<string, string>>, except?: string): Promise<string | undefined>;
155
158
  reads(snapshots?: ReadonlyMap<string, Uint8Array>): SudoReads;
156
159
  private bound;
157
160
  private writable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.195.30",
3
+ "version": "1.195.31",
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",