@ai-ecoverse/slicc-kernel 1.175.1 → 1.176.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.
@@ -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.175.1" : "0.0.0-dev";
3121
+ KERNEL_VERSION = true ? "1.176.0" : "0.0.0-dev";
3122
3122
  OS_RELEASE = "6.0.0-slicc";
3123
3123
  }
3124
3124
  });
@@ -8,6 +8,7 @@ export interface Denial {
8
8
  path: string;
9
9
  errno: string;
10
10
  tag?: string;
11
+ kind?: string;
11
12
  expected?: string;
12
13
  actual?: string;
13
14
  }
@@ -16,7 +16,7 @@ import type { MountEntry, MountSpec } from './mount/mount-fs.js';
16
16
  import type { ProcessMountPolicy } from './mount/syscall.js';
17
17
  import type { ApproveHook } from './sudo.js';
18
18
  import { type NetworkTransport } from './transport.js';
19
- import type { Account, AddUser, Group, RemoveUser } from './users.js';
19
+ import type { Account, AddGroup, AddUser, Group, RemoveUser } from './users.js';
20
20
  export type { CdpConnection, CdpHook, CdpRequest } from './cdp/types.js';
21
21
  export { type AttachOptions, attachKernel, type ClientEnded, type ClientFetchRequest, type ClientFs, type ClientRunOptions, type ClientRunResult, type ClientTerminal, type ClientTerminalOptions, KernelCallError, type KernelClient, KernelGoneError, type ProcessEntry, type SpawnedProcess, type SpawnOptions, type WatchChange, } from './client/attach.js';
22
22
  export type { DialledSocket, DialOptions } from './client/dial-stream.js';
@@ -46,7 +46,7 @@ export type { JsTermios, JsTty, JsTtySize } from './process/js/js-tty.js';
46
46
  export type { JsWebSocket, JsWebSocketClose, JsWebSocketMessage, JsWebSocketOptions, } from './process/js/js-websocket.js';
47
47
  export type { ApproveHook, SudoAnswer, SudoDenial, SudoRequest, SudoStdin } from './sudo.js';
48
48
  export { type FetchTransportOptions, fetchTransport, type HeaderList, type NetworkExit, type NetworkRedirectPolicy, type NetworkRequest, type NetworkResponse, type NetworkTraits, type NetworkTransport, type NetworkWebSocket, type NetworkWebSocketRequest, } from './transport.js';
49
- export type { Account, AddUser, Group, RemoveUser } from './users.js';
49
+ export type { Account, AddGroup, AddUser, Group, RemoveUser } from './users.js';
50
50
  export interface NetworkOptions {
51
51
  transport?: NetworkTransport;
52
52
  uplink?: NetworkUplink;
@@ -107,6 +107,7 @@ export interface ConnectOptions {
107
107
  }
108
108
  export interface KernelGroups {
109
109
  list(): Promise<Group[]>;
110
+ add(name: string, options: AddGroup): Promise<Group>;
110
111
  addMember(group: string, user: string): Promise<Group>;
111
112
  removeMember(group: string, user: string): Promise<Group>;
112
113
  }
@@ -1,3 +1,4 @@
1
+ import type { DenialHook } from '../fs/dac.js';
1
2
  import type { UsersMode } from '../fs/types.js';
2
3
  import { KernelError, type OpenAccess, OpenFile, type PollState } from './fd-table.js';
3
4
  export declare const EMBEDDER_PATH = "/dev/embedder";
@@ -20,6 +21,7 @@ export interface EmbedderStamp {
20
21
  export interface EmbedderKindPolicy {
21
22
  group?: string;
22
23
  users?: Array<string | number>;
24
+ session?: boolean;
23
25
  }
24
26
  export type EmbedderReply = ReadableStream<Uint8Array> | Uint8Array | string | undefined | void;
25
27
  export interface EmbedderRequest {
@@ -94,6 +96,7 @@ export declare class EmbedderBroker {
94
96
  private readonly budget;
95
97
  private readonly open;
96
98
  readonly tagsOf: (pid: number) => readonly string[] | undefined;
99
+ denied: DenialHook | undefined;
97
100
  constructor(users: UsersMode, lookup: EmbedderLookup, tagsOf?: (pid: number) => readonly string[] | undefined, budget?: number);
98
101
  register(client: number, hook: EmbedderHook | undefined): () => void;
99
102
  hookFor(client: number): EmbedderHook | undefined;
@@ -109,6 +109,11 @@ export type UsersRequest = {
109
109
  } | {
110
110
  id: number;
111
111
  op: 'groups-list';
112
+ } | {
113
+ id: number;
114
+ op: 'groups-add';
115
+ name: string;
116
+ gid: number;
112
117
  } | {
113
118
  id: number;
114
119
  op: 'groups-add-member' | 'groups-remove-member';
@@ -3,7 +3,7 @@ import { type Cred } from './kernel/cred.js';
3
3
  export declare const PASSWD = "/etc/passwd";
4
4
  export declare const GROUP = "/etc/group";
5
5
  export declare const DEFAULT_PASSWD = "root:x:0:0:root:/root:/bin/bash\nnobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin\n";
6
- export declare const DEFAULT_GROUP = "root:x:0:\nsudo:x:27:\nusers:x:100:\nnogroup:x:65534:\n";
6
+ export declare const DEFAULT_GROUP = "root:x:0:\ndialout:x:20:\nsudo:x:27:\nusers:x:100:\nnogroup:x:65534:\n";
7
7
  export declare const SYSTEM_PNPM_HOME = "/usr/local/share/pnpm";
8
8
  export declare const PNPM_CONFIG = "minimumReleaseAge: 1440\n";
9
9
  export interface Account {
@@ -23,6 +23,9 @@ export interface AddUser {
23
23
  homeGroup?: string;
24
24
  homeMode?: number;
25
25
  }
26
+ export interface AddGroup {
27
+ gid: number;
28
+ }
26
29
  export interface Group {
27
30
  name: string;
28
31
  gid: number;
@@ -78,6 +81,7 @@ export declare class UserDb {
78
81
  list(): Promise<Account[]>;
79
82
  add(options: AddUser): Promise<Account>;
80
83
  groups(): Promise<Group[]>;
84
+ addGroup(name: string, gid: number): Promise<Group>;
81
85
  addMember(group: string, user: string): Promise<Group>;
82
86
  removeMember(group: string, user: string): Promise<Group>;
83
87
  private member;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-kernel",
3
- "version": "1.175.1",
3
+ "version": "1.176.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",