@ai-ecoverse/slicc-kernel 1.155.0 → 1.157.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 +2 -0
- package/dist/kernel-worker.js +41 -8
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-driver-worker.js.map +2 -2
- package/dist/node-process-worker.js +21 -2
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +41 -8
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +12 -2
- package/dist/process-worker.js.map +2 -2
- package/dist/types/kernel/net/tls-client.d.ts +2 -0
- package/dist/types/process/js/js-context.d.ts +6 -0
- package/dist/types/process/js/js-sync.d.ts +7 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { KernelError } from '../fd-table.js';
|
|
1
2
|
import { type TlsCipher } from './tls-ciphers.js';
|
|
2
3
|
import { type TlsEngine, type TlsLeaf, type TlsSession, type TlsStore } from './tls-engine.js';
|
|
3
4
|
import type { UplinkConn } from './uplink.js';
|
|
@@ -35,6 +36,7 @@ export interface TlsClientOptions {
|
|
|
35
36
|
}
|
|
36
37
|
export declare function clientFlags(o: TlsClientOptions): number;
|
|
37
38
|
export declare function openSession(o: TlsClientOptions): TlsSession;
|
|
39
|
+
export declare function recordRefusal(opening: Uint8Array): KernelError | undefined;
|
|
38
40
|
export declare function verdictOf(o: TlsClientOptions, session: TlsSession): boolean;
|
|
39
41
|
export declare function tlsClient(conn: UplinkConn, o: TlsClientOptions, taken?: Uint8Array): Promise<{
|
|
40
42
|
conn: UplinkConn;
|
|
@@ -43,6 +43,11 @@ export interface JsAsyncContext {
|
|
|
43
43
|
getStore(): unknown;
|
|
44
44
|
enterWith(store: unknown): void;
|
|
45
45
|
}
|
|
46
|
+
export interface JsScriptResult {
|
|
47
|
+
value: unknown;
|
|
48
|
+
completion: boolean;
|
|
49
|
+
}
|
|
50
|
+
export type JsRunScript = (source: string, filename: string) => JsScriptResult;
|
|
46
51
|
export interface JsProgramContext {
|
|
47
52
|
readonly kernel: JsKernelInfo;
|
|
48
53
|
memory(): JsMemory;
|
|
@@ -165,6 +170,7 @@ export interface ContextOptions {
|
|
|
165
170
|
thread: JsThreadContext;
|
|
166
171
|
memory?: (() => JsMemory) | undefined;
|
|
167
172
|
asyncContext?: (() => JsAsyncContext) | undefined;
|
|
173
|
+
runScript?: JsRunScript | undefined;
|
|
168
174
|
fs?: {
|
|
169
175
|
owners: boolean;
|
|
170
176
|
links: boolean;
|
|
@@ -43,6 +43,12 @@ export interface JsSyncContext {
|
|
|
43
43
|
cred(): JsCred;
|
|
44
44
|
umask(mask?: number): number;
|
|
45
45
|
setcred(change: Partial<JsCred>): JsCred;
|
|
46
|
+
runScript(source: string, options?: {
|
|
47
|
+
filename?: string;
|
|
48
|
+
}): {
|
|
49
|
+
value: unknown;
|
|
50
|
+
completion: boolean;
|
|
51
|
+
} | undefined;
|
|
46
52
|
read(fd: number, max?: number): Uint8Array;
|
|
47
53
|
write(fd: number, data: Uint8Array | string, options?: JsWriteOptions): number;
|
|
48
54
|
close(fd: number): void;
|
|
@@ -98,6 +104,6 @@ export declare class JsSyncKernel {
|
|
|
98
104
|
bytes(req: SyncSabRequestBody): Uint8Array;
|
|
99
105
|
blocking(req: SyncSabRequestBody): SyncFsResult;
|
|
100
106
|
}
|
|
101
|
-
export declare function syncOps(kernel: JsSyncKernel, shared: SyncShared): Omit<JsSyncContext, 'run' | 'spawn' | 'exit' | 'kill' | 'cred' | 'setcred' | 'kernel' | 'umask' | 'fs' | 'tty' | 'wasi' | 'net'> & {
|
|
107
|
+
export declare function syncOps(kernel: JsSyncKernel, shared: SyncShared): Omit<JsSyncContext, 'run' | 'spawn' | 'exit' | 'kill' | 'cred' | 'setcred' | 'kernel' | 'umask' | 'fs' | 'tty' | 'wasi' | 'net' | 'runScript'> & {
|
|
102
108
|
fs: Omit<JsSyncContext['fs'], 'watch'>;
|
|
103
109
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.157.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",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@ai-ecoverse/py-numpy": "2.5.4-4",
|
|
67
|
-
"@ai-ecoverse/slicc-cdp": "1.
|
|
67
|
+
"@ai-ecoverse/slicc-cdp": "1.41.0",
|
|
68
68
|
"@ai-ecoverse/slicc-node": "2.5.2",
|
|
69
69
|
"@ai-ecoverse/slicc-scrub": "1.1.0",
|
|
70
70
|
"@ai-ecoverse/slicc-shared-web": "2.12.0",
|