@ai-ecoverse/slicc-kernel 1.177.0 → 1.178.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 +20 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +192 -72
- package/dist/kernel-worker.js.map +4 -4
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +187 -67
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/kernel/sealed-oauth.d.ts +74 -0
- package/dist/types/kernel/sealed.d.ts +1 -0
- package/dist/types/node.d.ts +1 -0
- package/package.json +2 -2
package/dist/process-worker.js
CHANGED
|
@@ -3180,7 +3180,7 @@ var init_version = __esm({
|
|
|
3180
3180
|
"src/version.ts"() {
|
|
3181
3181
|
"use strict";
|
|
3182
3182
|
init_captured_globals();
|
|
3183
|
-
KERNEL_VERSION = true ? "1.
|
|
3183
|
+
KERNEL_VERSION = true ? "1.178.0" : "0.0.0-dev";
|
|
3184
3184
|
OS_RELEASE = "6.0.0-slicc";
|
|
3185
3185
|
}
|
|
3186
3186
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type { RouteTable } from './kernel/net/routes.js';
|
|
|
30
30
|
export { SEALED_FETCH_VERSION, type SealedFetchHook, type SealedFetchRequest, type SealedOption, } from './kernel/net/sealed-fetch.js';
|
|
31
31
|
export type { NetworkUplink, ResolveAnswer, ResolveFamily, UplinkTraits, } from './kernel/net/uplink.js';
|
|
32
32
|
export type { SealedAbortReason, SealedCaller, SealedHook, SealedRequest, SealedRequester, } from './kernel/sealed.js';
|
|
33
|
+
export type { SealedOAuthConfig, SealedOAuthError, SealedOAuthIdentity, SealedOAuthReply, SealedOAuthRequest, SealedOAuthState, SealedOAuthStatus, } from './kernel/sealed-oauth.js';
|
|
33
34
|
export type { ConnectorStamp } from './kernel/socket.js';
|
|
34
35
|
export type { HostfsEvent, HostfsGrant, HostfsGrantHook, HostfsPortGrant, HostfsTransport, } from './mount/hostfs.js';
|
|
35
36
|
export { serveHostfsPort } from './mount/hostfs.js';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const SEALED_OAUTH_TIMEOUT_MS = 45000;
|
|
2
|
+
export declare const SEALED_OAUTH_OPS: ReadonlySet<string>;
|
|
3
|
+
export interface SealedOAuthIdentity {
|
|
4
|
+
name: string;
|
|
5
|
+
provider: string;
|
|
6
|
+
account: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SealedOAuthConfig {
|
|
9
|
+
tokenUrl: string;
|
|
10
|
+
clientId: string;
|
|
11
|
+
authMethod: 'none';
|
|
12
|
+
scope?: string;
|
|
13
|
+
resource?: string;
|
|
14
|
+
}
|
|
15
|
+
export type SealedOAuthRequest = {
|
|
16
|
+
v: 1;
|
|
17
|
+
} & ({
|
|
18
|
+
op: 'capabilities';
|
|
19
|
+
} | (SealedOAuthIdentity & {
|
|
20
|
+
op: 'oauthGrant';
|
|
21
|
+
accessToken: string;
|
|
22
|
+
refreshToken?: string;
|
|
23
|
+
tokenType?: string;
|
|
24
|
+
expiresAt?: number;
|
|
25
|
+
oauth: SealedOAuthConfig;
|
|
26
|
+
}) | (SealedOAuthIdentity & {
|
|
27
|
+
op: 'oauthStatus' | 'oauthRefresh' | 'oauthRemove';
|
|
28
|
+
}));
|
|
29
|
+
export type SealedOAuthState = 'ready' | 'refreshing' | 'expired' | 'reauth-required' | 'removed' | 'locked';
|
|
30
|
+
export interface SealedOAuthStatus {
|
|
31
|
+
v: 1;
|
|
32
|
+
placeholder: string;
|
|
33
|
+
state: SealedOAuthState;
|
|
34
|
+
expiresAt: number | null;
|
|
35
|
+
refreshable: boolean;
|
|
36
|
+
}
|
|
37
|
+
declare const MESSAGES: {
|
|
38
|
+
readonly EINVAL: 'Invalid OAuth request';
|
|
39
|
+
readonly ENOENT: 'OAuth credential not found';
|
|
40
|
+
readonly EEXIST: 'OAuth credential identity conflicts';
|
|
41
|
+
readonly EACCES: 'OAuth operation refused';
|
|
42
|
+
readonly EAGAIN: 'OAuth credential changed; try again';
|
|
43
|
+
readonly ENOTSUP: 'OAuth operation is not supported';
|
|
44
|
+
readonly ENOTCONN: 'Vault is unavailable';
|
|
45
|
+
readonly ETIMEDOUT: 'Vault request timed out';
|
|
46
|
+
readonly EIO: 'Invalid vault reply';
|
|
47
|
+
};
|
|
48
|
+
declare const CAUSES: {
|
|
49
|
+
readonly 'vault-locked': 'Vault is locked';
|
|
50
|
+
readonly 'oauth-reauth-required': 'OAuth sign-in is required';
|
|
51
|
+
readonly 'oauth-refresh-failed': 'OAuth refresh failed';
|
|
52
|
+
};
|
|
53
|
+
export interface SealedOAuthError {
|
|
54
|
+
v: 1;
|
|
55
|
+
error: {
|
|
56
|
+
code: keyof typeof MESSAGES;
|
|
57
|
+
cause?: keyof typeof CAUSES;
|
|
58
|
+
message: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export type SealedOAuthReply = SealedOAuthStatus | {
|
|
62
|
+
v: 1;
|
|
63
|
+
removed: true;
|
|
64
|
+
} | {
|
|
65
|
+
v: 1;
|
|
66
|
+
capabilities: {
|
|
67
|
+
kernelOAuth?: 1;
|
|
68
|
+
};
|
|
69
|
+
} | SealedOAuthError;
|
|
70
|
+
export declare function sealedOAuthOperation(op: string): boolean;
|
|
71
|
+
export declare function validateSealedOAuth(req: Record<string, unknown>): void;
|
|
72
|
+
export declare function sealedOAuthError(code?: keyof typeof MESSAGES, cause?: keyof typeof CAUSES): SealedOAuthError;
|
|
73
|
+
export declare function sealedOAuthReply(op: string, value: unknown): SealedOAuthReply;
|
|
74
|
+
export {};
|
|
@@ -89,6 +89,7 @@ export declare class SealedBroker {
|
|
|
89
89
|
readonly tickets: TicketBook;
|
|
90
90
|
readonly sessions: SessionScrubs;
|
|
91
91
|
askTimeoutMs: number;
|
|
92
|
+
oauthTimeoutMs: number;
|
|
92
93
|
userOf: (uid: number) => Promise<string | undefined>;
|
|
93
94
|
factsOf: (pid: number) => Promise<SealedProcessFacts | undefined>;
|
|
94
95
|
constructor(hook: SealedHook | undefined, users: UsersMode, timeoutMs?: number, tagOf?: (pid: number) => readonly string[] | undefined);
|
package/dist/types/node.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export type { ClipboardHook, ClipboardStamp } from './kernel/clipboard.js';
|
|
|
29
29
|
export type { EmbedderHook, EmbedderKindPolicy, EmbedderReply, EmbedderRequest, EmbedderStamp, } from './kernel/embedder.js';
|
|
30
30
|
export { SEALED_FETCH_VERSION, type SealedFetchHook, type SealedFetchRequest, type SealedOption, } from './kernel/net/sealed-fetch.js';
|
|
31
31
|
export type { SealedAbortReason, SealedCaller, SealedHook, SealedRequest, SealedRequester, } from './kernel/sealed.js';
|
|
32
|
+
export type { SealedOAuthConfig, SealedOAuthError, SealedOAuthIdentity, SealedOAuthReply, SealedOAuthRequest, SealedOAuthState, SealedOAuthStatus, } from './kernel/sealed-oauth.js';
|
|
32
33
|
export type { ConnectorStamp } from './kernel/socket.js';
|
|
33
34
|
export type { HostfsEvent, HostfsGrant, HostfsGrantHook, HostfsPortGrant, HostfsTransport, } from './mount/hostfs.js';
|
|
34
35
|
export { serveHostfsPort } from './mount/hostfs.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.178.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",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@ai-ecoverse/py-numpy": "2.5.4-4",
|
|
73
|
-
"@ai-ecoverse/slicc-cdp": "1.47.
|
|
73
|
+
"@ai-ecoverse/slicc-cdp": "1.47.4",
|
|
74
74
|
"@ai-ecoverse/slicc-scrub": "1.1.0",
|
|
75
75
|
"@ai-ecoverse/slicc-shared-web": "2.13.10",
|
|
76
76
|
"@ai-ecoverse/wasi-cargo": "0.99.0-6",
|