@ai-ecoverse/slicc-kernel 1.133.5 → 1.134.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 +7 -1
- package/dist/kernel-worker.js +286 -47
- package/dist/kernel-worker.js.map +4 -4
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +291 -52
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +1 -1
- package/dist/types/kernel/net/sealed-pg.d.ts +27 -4
- package/dist/types/kernel/net/sealed-scram.d.ts +20 -0
- package/dist/types/kernel/sealed-session.d.ts +16 -3
- package/package.json +3 -3
package/dist/process-worker.js
CHANGED
|
@@ -2693,7 +2693,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
2693
2693
|
var init_version = __esm({
|
|
2694
2694
|
"src/version.ts"() {
|
|
2695
2695
|
"use strict";
|
|
2696
|
-
KERNEL_VERSION = true ? "1.
|
|
2696
|
+
KERNEL_VERSION = true ? "1.134.0" : "0.0.0-dev";
|
|
2697
2697
|
OS_RELEASE = "6.0.0-slicc";
|
|
2698
2698
|
}
|
|
2699
2699
|
});
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
import type { SessionScram } from '../sealed-session.js';
|
|
1
2
|
export declare const PG_MESSAGE_MAX: number;
|
|
2
|
-
export type PgAsk = (placeholders: string[]) => Promise<Record<string, string> | undefined>;
|
|
3
3
|
export declare function sniffPg(start: string): 'yes' | 'no' | 'more';
|
|
4
|
+
export interface PgExpect {
|
|
5
|
+
real: string;
|
|
6
|
+
fake: string;
|
|
7
|
+
}
|
|
4
8
|
export declare class PgServer {
|
|
5
9
|
private buffer;
|
|
6
10
|
private skip;
|
|
7
|
-
private lost;
|
|
8
11
|
cleartext: boolean;
|
|
9
|
-
|
|
12
|
+
sasl: boolean;
|
|
13
|
+
serverFirst: string | undefined;
|
|
14
|
+
expect: PgExpect | undefined;
|
|
15
|
+
failed: boolean;
|
|
16
|
+
private lost;
|
|
17
|
+
private auth;
|
|
18
|
+
private mechanisms;
|
|
19
|
+
private final;
|
|
20
|
+
private lose;
|
|
21
|
+
filter(bytes: Uint8Array): Uint8Array;
|
|
10
22
|
}
|
|
11
23
|
export interface PgFrame {
|
|
12
24
|
bytes: Uint8Array;
|
|
@@ -14,4 +26,15 @@ export interface PgFrame {
|
|
|
14
26
|
done: boolean;
|
|
15
27
|
}
|
|
16
28
|
export declare function pgLength(bytes: Uint8Array, started: boolean): number | undefined;
|
|
17
|
-
export
|
|
29
|
+
export interface PgAsks {
|
|
30
|
+
cleartext(placeholders: string[]): Promise<Record<string, string> | undefined>;
|
|
31
|
+
scram(scram: SessionScram): Promise<Record<string, string> | undefined>;
|
|
32
|
+
}
|
|
33
|
+
export declare class PgClient {
|
|
34
|
+
private clientFirst;
|
|
35
|
+
private readonly server;
|
|
36
|
+
private readonly asks;
|
|
37
|
+
constructor(server: PgServer, asks: PgAsks);
|
|
38
|
+
message(message: Uint8Array): Promise<PgFrame>;
|
|
39
|
+
private final;
|
|
40
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ScramExchange {
|
|
2
|
+
clientFirstBare: string;
|
|
3
|
+
serverFirst: string;
|
|
4
|
+
clientFinalBare: string;
|
|
5
|
+
salt: Uint8Array;
|
|
6
|
+
iterations: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ScramKeys {
|
|
9
|
+
proof: Uint8Array;
|
|
10
|
+
serverSignature: Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
export declare function base64Of(bytes: Uint8Array): string;
|
|
13
|
+
export declare function clientFirstBare(message: string): string | undefined;
|
|
14
|
+
export declare function exchangeOf(clientFirst: string, serverFirst: string, clientFinal: string): {
|
|
15
|
+
exchange: ScramExchange;
|
|
16
|
+
proof: Uint8Array;
|
|
17
|
+
} | undefined;
|
|
18
|
+
export declare function scramKeys(password: string, x: ScramExchange): Promise<ScramKeys>;
|
|
19
|
+
export declare function saslprep(password: string): string;
|
|
20
|
+
export declare function sameBytes(a: Uint8Array, b: Uint8Array): boolean;
|
|
@@ -8,6 +8,12 @@ export interface SessionHead {
|
|
|
8
8
|
method: string;
|
|
9
9
|
path: string;
|
|
10
10
|
}
|
|
11
|
+
export interface SessionScram {
|
|
12
|
+
clientFirstBare: string;
|
|
13
|
+
serverFirst: string;
|
|
14
|
+
clientFinalBare: string;
|
|
15
|
+
proof: string;
|
|
16
|
+
}
|
|
11
17
|
export interface SessionFields {
|
|
12
18
|
stamp: SealedCaller;
|
|
13
19
|
session: string;
|
|
@@ -18,8 +24,9 @@ export interface SessionFields {
|
|
|
18
24
|
verified: boolean;
|
|
19
25
|
handshakeAt: number;
|
|
20
26
|
exit: string;
|
|
21
|
-
placeholders
|
|
27
|
+
placeholders?: string[];
|
|
22
28
|
head?: SessionHead;
|
|
29
|
+
scram?: SessionScram;
|
|
23
30
|
}
|
|
24
31
|
export declare function boundHost(servername: string): string;
|
|
25
32
|
export declare function sessionAskable(f: SessionFields, now: number): boolean;
|
|
@@ -36,10 +43,16 @@ export declare function sessionRequest(f: SessionFields): {
|
|
|
36
43
|
verified: boolean;
|
|
37
44
|
handshakeAt: number;
|
|
38
45
|
exit: string;
|
|
39
|
-
placeholders
|
|
46
|
+
placeholders?: string[] | undefined;
|
|
40
47
|
head?: {
|
|
41
48
|
method: string;
|
|
42
49
|
path: string;
|
|
43
50
|
} | undefined;
|
|
51
|
+
scram?: {
|
|
52
|
+
clientFirstBare: string;
|
|
53
|
+
serverFirst: string;
|
|
54
|
+
clientFinalBare: string;
|
|
55
|
+
proof: string;
|
|
56
|
+
} | undefined;
|
|
44
57
|
};
|
|
45
|
-
export declare function sessionValues(reply: unknown, asked: readonly string[]): Record<string, string> | undefined;
|
|
58
|
+
export declare function sessionValues(reply: unknown, asked: readonly string[] | undefined): Record<string, string> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.134.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",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"@ai-ecoverse/slicc-scrub": "1.0.0",
|
|
69
69
|
"@ai-ecoverse/slicc-shared-web": "1.25.2",
|
|
70
70
|
"@ai-ecoverse/wasi-cargo": "0.99.0-3",
|
|
71
|
-
"@ai-ecoverse/wasi-pnpm": "12.9.1-
|
|
71
|
+
"@ai-ecoverse/wasi-pnpm": "12.9.1-16",
|
|
72
72
|
"@ai-ecoverse/wasi-ripgrep": "15.2.0-5",
|
|
73
73
|
"@ai-ecoverse/wasi-rustc": "1.98.1-6",
|
|
74
74
|
"@ai-ecoverse/wasi-zig": "0.16.0-17",
|
|
75
75
|
"@ai-ecoverse/wasix-python": "3.15.0-2",
|
|
76
|
-
"@ai-ecoverse/wasm-bash": "5.3.0-
|
|
76
|
+
"@ai-ecoverse/wasm-bash": "5.3.0-21",
|
|
77
77
|
"@ai-ecoverse/wasm-coreutils": "9.12.0-10",
|
|
78
78
|
"@ai-ecoverse/wasm-curl": "8.22.0-7",
|
|
79
79
|
"@ai-ecoverse/wasm-git": "2.55.0-17",
|