@ai-ecoverse/slicc-kernel 1.143.6 → 1.144.1

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 SpawnOptions {
27
27
  stdin?: string | Uint8Array;
28
28
  group?: 'new';
29
29
  pgid?: number;
30
+ tag?: string;
30
31
  onStdout?: (bytes: Uint8Array) => void;
31
32
  onStderr?: (bytes: Uint8Array) => void;
32
33
  }
@@ -46,6 +47,7 @@ export interface ClientRunOptions {
46
47
  user?: string | number;
47
48
  env?: Record<string, string>;
48
49
  stdin?: string | Uint8Array;
50
+ tag?: string;
49
51
  onStdout?: (text: string) => void;
50
52
  onStderr?: (text: string) => void;
51
53
  }
@@ -62,6 +64,7 @@ export interface ClientTerminalOptions {
62
64
  env?: Record<string, string>;
63
65
  cols?: number;
64
66
  rows?: number;
67
+ tag?: string;
65
68
  onData?: (bytes: Uint8Array) => void;
66
69
  }
67
70
  export interface ClientTerminal {
@@ -21,6 +21,7 @@ export interface SpawnRequestOptions {
21
21
  env?: Record<string, string>;
22
22
  stdin?: Uint8Array;
23
23
  pgid?: number;
24
+ tag?: string;
24
25
  }
25
26
  export interface TerminalRequestOptions {
26
27
  cwd?: string;
@@ -28,6 +29,7 @@ export interface TerminalRequestOptions {
28
29
  env?: Record<string, string>;
29
30
  cols?: number;
30
31
  rows?: number;
32
+ tag?: string;
31
33
  }
32
34
  export type TerminalAction = {
33
35
  action: 'write';
@@ -139,6 +141,7 @@ export interface ProcessEntry {
139
141
  uid?: number;
140
142
  gid?: number;
141
143
  tag?: string;
144
+ tags?: string[];
142
145
  }
143
146
  export interface MessagePortLike {
144
147
  postMessage(message: unknown, transfer?: Transferable[]): void;
@@ -1,5 +1,5 @@
1
1
  import type { RealmTransport } from '../kernel/net/transport.js';
2
- import type { Launcher } from '../launcher.js';
2
+ import { type Launcher } from '../launcher.js';
3
3
  import { type LockManagerLike, type MessagePortLike } from './protocol.js';
4
4
  export interface ClientHost {
5
5
  scope?: 'transport';
@@ -2,6 +2,17 @@ import type { KernelFs } from '../fs/types.js';
2
2
  import type { Cred } from '../kernel/cred.js';
3
3
  import type { Account } from '../users.js';
4
4
  export declare const CRONTAB_MAX: number;
5
+ export declare const TAGS_PATH = "/var/spool/cron/tags";
6
+ export interface JobTags {
7
+ tags: string[];
8
+ base: number;
9
+ }
10
+ export interface CrontabCaller {
11
+ tags?: readonly string[] | undefined;
12
+ base?: number | undefined;
13
+ }
14
+ export type TableTags = Record<string, Record<string, JobTags>>;
15
+ export declare function readTags(fs: KernelFs): Promise<TableTags>;
5
16
  export interface CrontabCall {
6
17
  op: 'proc-crontab';
7
18
  action: 'list' | 'remove' | 'install';
@@ -22,6 +33,7 @@ export declare function crontabCall(req: Partial<CrontabCall>): CrontabCall | un
22
33
  export declare class Crontabs {
23
34
  private readonly o;
24
35
  constructor(options: CrontabsOptions);
25
- request(cred: Readonly<Cred>, call: CrontabCall): Promise<CrontabResult>;
36
+ request(cred: Readonly<Cred>, call: CrontabCall, caller?: CrontabCaller): Promise<CrontabResult>;
37
+ private retag;
26
38
  private install;
27
39
  }
@@ -21,6 +21,8 @@ export interface CronRun {
21
21
  cwd: string;
22
22
  env: Record<string, string>;
23
23
  output: (bytes: Uint8Array) => void;
24
+ tags?: readonly string[];
25
+ tagBase?: number;
24
26
  }
25
27
  export interface CronHost {
26
28
  fs: KernelFs;
@@ -20,8 +20,10 @@ export declare class Dac {
20
20
  private readonly seen;
21
21
  private suppressed;
22
22
  tagOf: (pid: number) => string | undefined;
23
+ fenced: (pid: number, path: string) => boolean;
23
24
  constructor(mode: 'report' | 'enforce', hook?: DenialHook, log?: (line: string) => void);
24
25
  get enforcing(): boolean;
26
+ fence(denial: Denial): never;
25
27
  denied(given: Denial): void;
26
28
  private note;
27
29
  }
@@ -10,6 +10,7 @@ export interface ClipboardStamp {
10
10
  gid: number;
11
11
  users: UsersMode;
12
12
  tag?: string;
13
+ tags?: string[];
13
14
  }
14
15
  export interface ClipboardHook {
15
16
  read(stamp: ClipboardStamp): Promise<string>;
@@ -41,8 +42,8 @@ export declare class ClipboardBroker {
41
42
  readonly hook: ClipboardHook | undefined;
42
43
  readonly users: UsersMode;
43
44
  readonly timeoutMs: number;
44
- readonly tagOf: (pid: number) => string | undefined;
45
- constructor(hook: ClipboardHook | undefined, users: UsersMode, timeoutMs?: number, tagOf?: (pid: number) => string | undefined);
45
+ readonly tagOf: (pid: number) => readonly string[] | undefined;
46
+ constructor(hook: ClipboardHook | undefined, users: UsersMode, timeoutMs?: number, tagOf?: (pid: number) => readonly string[] | undefined);
46
47
  ask<T>(work: (hook: ClipboardHook) => Promise<T>): Promise<T>;
47
48
  open(access: OpenAccess, stamp: ClipboardStamp): OpenFile;
48
49
  }
@@ -26,6 +26,7 @@ export interface ProcessInfo {
26
26
  sigCgt?: number;
27
27
  sigBlk?: number;
28
28
  tag?: string;
29
+ tags?: string[];
29
30
  }
30
31
  export interface MountLine {
31
32
  type: string;
@@ -23,7 +23,7 @@ import type { MountLine, ProcessListing } from './proc-info.js';
23
23
  import type { DlState, ForkState } from './protocol.js';
24
24
  import { type PtySyscall, type PtyTable } from './pty.js';
25
25
  import { type RunRequest } from './run-child.js';
26
- import type { SealedBroker, SealedCaller } from './sealed.js';
26
+ import { type SealedBroker, type SealedCaller } from './sealed.js';
27
27
  import { type SemSyscall, type SemTable } from './sem.js';
28
28
  import { type DefaultAction, type SigInfo } from './signals.js';
29
29
  import { LoopbackNet } from './socket.js';
@@ -18,7 +18,12 @@ export interface SealedCaller {
18
18
  groups: number[];
19
19
  users: UsersMode;
20
20
  tag?: string;
21
+ tags?: string[];
21
22
  }
23
+ export declare function tagFields(tags: readonly string[] | undefined): {
24
+ tag?: string;
25
+ tags?: string[];
26
+ };
22
27
  export type SealedRequest = {
23
28
  v: 1;
24
29
  op: string;
@@ -63,15 +68,15 @@ export declare class SealedBroker {
63
68
  readonly hook: SealedHook | undefined;
64
69
  readonly users: UsersMode;
65
70
  readonly timeoutMs: number;
66
- readonly tagOf: (pid: number) => string | undefined;
71
+ readonly tagOf: (pid: number) => readonly string[] | undefined;
67
72
  readonly tickets: TicketBook;
68
73
  readonly sessions: SessionScrubs;
69
74
  userOf: (uid: number) => Promise<string | undefined>;
70
- constructor(hook: SealedHook | undefined, users: UsersMode, timeoutMs?: number, tagOf?: (pid: number) => string | undefined);
75
+ constructor(hook: SealedHook | undefined, users: UsersMode, timeoutMs?: number, tagOf?: (pid: number) => readonly string[] | undefined);
71
76
  stamp(ids: {
72
77
  pid: number;
73
78
  ppid: number;
74
- }, cred: Readonly<Cred>, tag: string | undefined): Promise<SealedCaller>;
79
+ }, cred: Readonly<Cred>, tags: readonly string[] | undefined): Promise<SealedCaller>;
75
80
  consume(fields: ConsumeFields): Promise<Swap | undefined>;
76
81
  sessionMaterialize(fields: SessionFields, now?: number): Promise<Record<string, string> | undefined>;
77
82
  sessionAnchors(fields: SessionAnchorFields): Promise<Anchors | undefined>;
@@ -98,6 +98,8 @@ export interface RunOptions {
98
98
  pgid?: number;
99
99
  user?: string | number | Account;
100
100
  tag?: string;
101
+ tags?: readonly string[];
102
+ tagBase?: number;
101
103
  login?: boolean;
102
104
  }
103
105
  export interface TerminalOptions {
@@ -107,6 +109,8 @@ export interface TerminalOptions {
107
109
  rows?: number;
108
110
  user?: string | number | Account;
109
111
  tag?: string;
112
+ tags?: readonly string[];
113
+ tagBase?: number;
110
114
  onData: (bytes: Uint8Array) => void;
111
115
  }
112
116
  export interface TerminalSession {
@@ -140,6 +144,8 @@ interface Target {
140
144
  copy?: string;
141
145
  }
142
146
  export declare function tagOption(tag: unknown): void;
147
+ export declare function withTag(tags: readonly string[] | undefined, tag: string | undefined): readonly string[] | undefined;
148
+ export declare function cronPath(path: string): boolean;
143
149
  export declare function expandDefaults(defaults: Readonly<Record<string, string>> | undefined, env: Readonly<Record<string, string>>): Record<string, string>;
144
150
  export declare class Launcher {
145
151
  readonly fs: KernelFs;
@@ -179,6 +185,7 @@ export declare class Launcher {
179
185
  private readonly described;
180
186
  private readonly creds;
181
187
  private readonly tags;
188
+ private readonly tagBases;
182
189
  private readonly links;
183
190
  private readonly freshModules;
184
191
  private readonly granted;
@@ -363,6 +370,8 @@ export declare class Launcher {
363
370
  private imageOf;
364
371
  credOf(pid: number): Cred;
365
372
  tagOf(pid: number): string | undefined;
373
+ tagsOf(pid: number): readonly string[] | undefined;
374
+ private wireDac;
366
375
  private released;
367
376
  private signalMasksOf;
368
377
  private controlsJobs;
@@ -404,7 +413,7 @@ export declare class Launcher {
404
413
  private terminalAccount;
405
414
  private identity;
406
415
  fsFor(tag: string | undefined): KernelFs;
407
- isWriter(tag: string | undefined): boolean;
416
+ isWriter(tags: readonly string[] | undefined, base?: number): boolean;
408
417
  private stackFor;
409
418
  private flushingPeers;
410
419
  private rewritten;
@@ -130,7 +130,9 @@ export declare class WasiFds {
130
130
  private joined;
131
131
  private openKernelDevice;
132
132
  private openCharDevice;
133
- open(path: string, oflags: number, rights: bigint, fdflags: number, mode?: number): number;
133
+ open(path: string, oflags: number, rights: bigint, fdflags: number, mode?: number, nofollow?: boolean): number;
134
+ private nofollow;
135
+ private openSpecial;
134
136
  private escaped;
135
137
  private regular;
136
138
  private kernelHolds;
@@ -111,6 +111,7 @@ export interface SyncFsPosixBridge {
111
111
  lutimes(path: string, atimeMs: number, mtimeMs: number, now?: boolean): void;
112
112
  hold?(path: string, held: boolean, open?: boolean, handle?: number, want?: number, seen?: {
113
113
  gen?: number;
114
+ nofollow?: boolean;
114
115
  }): number | undefined;
115
116
  access?(path: string, mode: number, kind?: AccessKind, nofollow?: boolean): void;
116
117
  create?(path: string, mode?: number, opening?: boolean): SyncFsCreated | undefined | void;
@@ -17,6 +17,7 @@ export interface SudoRequest {
17
17
  cwd: string;
18
18
  pid: number;
19
19
  tag?: string;
20
+ tags?: string[];
20
21
  tty?: string;
21
22
  createdAt: number;
22
23
  expiresAt: number;
@@ -53,7 +54,7 @@ export type SudoResult = {
53
54
  export interface SudoCaller {
54
55
  cred: Cred;
55
56
  pid: number;
56
- tag?: string | undefined;
57
+ tags?: readonly string[] | undefined;
57
58
  tty?: string | null | undefined;
58
59
  }
59
60
  interface Rule {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.143.6",
3
+ "version": "1.144.1",
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",
@@ -66,9 +66,9 @@
66
66
  "@ai-ecoverse/py-numpy": "2.5.4-4",
67
67
  "@ai-ecoverse/slicc-node": "2.5.2",
68
68
  "@ai-ecoverse/slicc-scrub": "1.0.0",
69
- "@ai-ecoverse/slicc-shared-web": "1.30.2",
69
+ "@ai-ecoverse/slicc-shared-web": "1.30.6",
70
70
  "@ai-ecoverse/wasi-cargo": "0.99.0-6",
71
- "@ai-ecoverse/wasi-pnpm": "12.9.1-20",
71
+ "@ai-ecoverse/wasi-pnpm": "12.9.1-21",
72
72
  "@ai-ecoverse/wasi-ripgrep": "15.2.0-5",
73
73
  "@ai-ecoverse/wasi-rustc": "1.98.1-10",
74
74
  "@ai-ecoverse/wasi-zig": "0.16.0-20",
@@ -80,10 +80,10 @@
80
80
  "@ai-ecoverse/wasm-gmake": "4.4.1-9",
81
81
  "@ai-ecoverse/wasm-procps": "4.0.7-4",
82
82
  "@ai-ecoverse/wasm-sqlite3": "3.54.0-7",
83
- "@ai-ecoverse/wasm-tar": "1.35.0-8",
83
+ "@ai-ecoverse/wasm-tar": "1.35.0-9",
84
84
  "@ai-ecoverse/wasm-tls-engine": "4.2.0-7",
85
85
  "@ai-ecoverse/wasm-tree": "2.3.2-7",
86
- "@ai-ecoverse/wasm-util-linux": "2.42.4-5",
86
+ "@ai-ecoverse/wasm-util-linux": "2.42.4-6",
87
87
  "@biomejs/biome": "2.5.15",
88
88
  "@types/node": "24.19.2",
89
89
  "esbuild": "0.28.2",