@ai-ecoverse/slicc-kernel 1.173.4 → 1.174.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.
- package/README.md +3 -3
- package/dist/index.js.map +1 -1
- package/dist/kernel-worker.js +101 -20
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +101 -20
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/kernel/process.d.ts +3 -2
- package/dist/types/node.d.ts +1 -1
- package/dist/types/sudo.d.ts +10 -0
- package/package.json +2 -2
package/dist/process-worker.js
CHANGED
|
@@ -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.
|
|
3121
|
+
KERNEL_VERSION = true ? "1.174.0" : "0.0.0-dev";
|
|
3122
3122
|
OS_RELEASE = "6.0.0-slicc";
|
|
3123
3123
|
}
|
|
3124
3124
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export type { JsCred, JsSyncContext, JsSyncFile } from './process/js/js-sync.js'
|
|
|
44
44
|
export type { JsThread, JsThreadContext, JsThreadSpawnOptions } from './process/js/js-thread.js';
|
|
45
45
|
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
|
-
export type { ApproveHook, SudoAnswer, SudoDenial, SudoRequest } from './sudo.js';
|
|
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
49
|
export type { Account, AddUser, Group, RemoveUser } from './users.js';
|
|
50
50
|
export interface NetworkOptions {
|
|
@@ -6,7 +6,7 @@ import type { MountCall } from '../mount/syscall.js';
|
|
|
6
6
|
import type { LinkRecord } from '../process/wasi/wasix-linker.js';
|
|
7
7
|
import type { SourceCheck } from '../realm/sync-fs-token-registry.js';
|
|
8
8
|
import type { SyncFsResult } from '../realm/sync-fs-wire.js';
|
|
9
|
-
import type { SudoCall, SudoResult } from '../sudo.js';
|
|
9
|
+
import type { SudoCall, SudoResult, SudoStdin } from '../sudo.js';
|
|
10
10
|
import { type ChildForker, type ChildSpawner, type ChildStdio, type InheritedSlot } from './children.js';
|
|
11
11
|
import type { ClipboardBroker } from './clipboard.js';
|
|
12
12
|
import { type Cred, type CredChange } from './cred.js';
|
|
@@ -399,7 +399,7 @@ export interface WasmProcessOptions {
|
|
|
399
399
|
kill?: (pid: number, sig: number, info?: SigInfo) => boolean | Promise<boolean>;
|
|
400
400
|
writesBack?: (pid: number) => boolean;
|
|
401
401
|
processes?: () => ProcessListing;
|
|
402
|
-
sudo?: (call: SudoCall, signal: AbortSignal) => Promise<SudoResult>;
|
|
402
|
+
sudo?: (call: SudoCall, signal: AbortSignal, stdin: SudoStdin) => Promise<SudoResult>;
|
|
403
403
|
crontab?: (call: CrontabCall) => Promise<CrontabResult>;
|
|
404
404
|
openFiles?: Set<VfsNodes>;
|
|
405
405
|
nodes?: VfsNodes;
|
|
@@ -582,6 +582,7 @@ export declare class WasmProcess {
|
|
|
582
582
|
private signalSyscall;
|
|
583
583
|
private reapsChildren;
|
|
584
584
|
private sudo;
|
|
585
|
+
private stdinKind;
|
|
585
586
|
private mountSyscall;
|
|
586
587
|
private pause;
|
|
587
588
|
private alarm;
|
package/dist/types/node.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export type { ConnectorStamp } from './kernel/socket.js';
|
|
|
33
33
|
export type { HostfsEvent, HostfsGrant, HostfsGrantHook, HostfsPortGrant, HostfsTransport, } from './mount/hostfs.js';
|
|
34
34
|
export { serveHostfsPort } from './mount/hostfs.js';
|
|
35
35
|
export type { MountEntry, MountSpec } from './mount/mount-fs.js';
|
|
36
|
-
export type { ApproveHook, SudoAnswer, SudoDenial, SudoRequest } from './sudo.js';
|
|
36
|
+
export type { ApproveHook, SudoAnswer, SudoDenial, SudoRequest, SudoStdin } from './sudo.js';
|
|
37
37
|
export type { NetworkRedirectPolicy } from './transport.js';
|
|
38
38
|
export { fetchTransport, type NetworkTransport } from './transport.js';
|
|
39
39
|
export { memoryRoot };
|
package/dist/types/sudo.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ export interface SudoRequest {
|
|
|
22
22
|
createdAt: number;
|
|
23
23
|
expiresAt: number;
|
|
24
24
|
always: boolean;
|
|
25
|
+
stdin?: SudoStdin;
|
|
26
|
+
rootOnly?: Record<string, boolean>;
|
|
25
27
|
}
|
|
28
|
+
export type SudoStdin = 'tty' | 'none' | 'pipe' | 'file';
|
|
26
29
|
export type SudoAnswer = 'once' | 'always' | 'deny';
|
|
27
30
|
export interface SudoDenial {
|
|
28
31
|
answer: 'deny';
|
|
@@ -54,12 +57,14 @@ export type SudoResult = {
|
|
|
54
57
|
run: string[];
|
|
55
58
|
} | {
|
|
56
59
|
grant: SudoGrant;
|
|
60
|
+
notice?: string;
|
|
57
61
|
};
|
|
58
62
|
export interface SudoCaller {
|
|
59
63
|
cred: Cred;
|
|
60
64
|
pid: number;
|
|
61
65
|
tags?: readonly string[] | undefined;
|
|
62
66
|
tty?: string | null | undefined;
|
|
67
|
+
stdin: SudoStdin;
|
|
63
68
|
}
|
|
64
69
|
type Pattern = (string | null)[];
|
|
65
70
|
interface Command {
|
|
@@ -71,6 +76,7 @@ interface Rule {
|
|
|
71
76
|
who: string;
|
|
72
77
|
target: string;
|
|
73
78
|
cwd?: string;
|
|
79
|
+
stdin?: 'none';
|
|
74
80
|
cmnd: Command | '*';
|
|
75
81
|
}
|
|
76
82
|
export interface SudoOptions {
|
|
@@ -97,6 +103,9 @@ export declare class Sudo {
|
|
|
97
103
|
private warn;
|
|
98
104
|
provision(): Promise<void>;
|
|
99
105
|
trusted(path: string): Promise<boolean>;
|
|
106
|
+
private rootOnly;
|
|
107
|
+
private crossesLink;
|
|
108
|
+
private existing;
|
|
100
109
|
private policyFile;
|
|
101
110
|
private policy;
|
|
102
111
|
private groupIds;
|
|
@@ -107,6 +116,7 @@ export declare class Sudo {
|
|
|
107
116
|
private untrusted;
|
|
108
117
|
private locate;
|
|
109
118
|
request(caller: SudoCaller, call: SudoCall, signal: AbortSignal): Promise<SudoResult>;
|
|
119
|
+
private always;
|
|
110
120
|
private listed;
|
|
111
121
|
private ask;
|
|
112
122
|
private remember;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.174.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",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"esbuild": "0.28.2",
|
|
96
96
|
"fake-indexeddb": "6.2.6",
|
|
97
97
|
"lefthook": "2.2.2",
|
|
98
|
-
"monocart-coverage-reports": "3.
|
|
98
|
+
"monocart-coverage-reports": "3.2.0",
|
|
99
99
|
"pg-gateway": "0.3.0-beta.4",
|
|
100
100
|
"semantic-release": "25.0.9",
|
|
101
101
|
"typescript": "7.0.2",
|