@rynx-ai/server 0.1.0 → 0.1.10-beta.2
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/dist/browser-surface-control-queue.d.ts +42 -0
- package/dist/browser-surface-control-queue.js +187 -0
- package/dist/browser-surface-ws.d.ts +16 -0
- package/dist/browser-surface-ws.js +356 -0
- package/dist/control-api.d.ts +76 -4
- package/dist/control-api.js +3014 -133
- package/dist/control-web/assets/highlighted-body-OFNGDK62-DHu2g-rk.js +1 -0
- package/dist/control-web/assets/index-B6Pb5j9M.js +666 -0
- package/dist/control-web/assets/index-BU-_Qud_.css +32 -0
- package/dist/control-web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/control-web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/control-web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/control-web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/control-web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/control-web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/control-web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/control-web/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/control-web/assets/mermaid-GHXKKRXX-CSYzOmBR.js +131 -0
- package/dist/control-web/assets/rynx-wordmark-LL1QRYHD.png +0 -0
- package/dist/control-web/favicon.png +0 -0
- package/dist/control-web/favicon.svg +38 -0
- package/dist/control-web/index.html +16 -0
- package/dist/control-web-dist.d.ts +1 -1
- package/dist/control-web-dist.js +19 -14
- package/dist/desktop-browser-host.d.ts +170 -0
- package/dist/desktop-browser-host.js +1018 -0
- package/dist/direct-runtime-browser-inspect-server.d.ts +72 -0
- package/dist/direct-runtime-browser-inspect-server.js +749 -0
- package/dist/direct-runtime-browser-surface-server.d.ts +74 -0
- package/dist/direct-runtime-browser-surface-server.js +821 -0
- package/dist/direct-runtime-server.d.ts +143 -0
- package/dist/direct-runtime-server.js +1959 -0
- package/dist/emulator-surface-ws.d.ts +8 -0
- package/dist/emulator-surface-ws.js +198 -0
- package/dist/machine-session-service.d.ts +265 -0
- package/dist/machine-session-service.js +822 -0
- package/dist/provider-cli-host.d.ts +10 -0
- package/dist/provider-cli-host.js +1 -0
- package/dist/remote-runtime-dispatcher.d.ts +94 -0
- package/dist/remote-runtime-dispatcher.js +403 -0
- package/dist/remote-runtime-session-projection.d.ts +19 -0
- package/dist/remote-runtime-session-projection.js +566 -0
- package/dist/remote-runtime.d.ts +22 -0
- package/dist/remote-runtime.js +32 -0
- package/dist/runtime-web-auth.d.ts +26 -0
- package/dist/runtime-web-auth.js +132 -0
- package/dist/server.d.ts +364 -12
- package/dist/server.js +341 -100
- package/dist/session-browser-service.d.ts +248 -0
- package/dist/session-browser-service.js +772 -0
- package/dist/session-browser-surface-coordinator.d.ts +24 -0
- package/dist/session-browser-surface-coordinator.js +669 -0
- package/dist/session-emulator-service.d.ts +167 -0
- package/dist/session-emulator-service.js +464 -0
- package/dist/session-runtime-index.d.ts +23 -0
- package/dist/session-runtime-index.js +96 -0
- package/dist/session-terminal-host.d.ts +51 -0
- package/dist/session-terminal-host.js +270 -0
- package/dist/terminal-ws.d.ts +12 -20
- package/dist/terminal-ws.js +421 -97
- package/package.json +14 -7
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Server as HttpServer } from "node:http";
|
|
2
|
+
import { DIRECT_RUNTIME_BROWSER_INSPECT_PATH } from "@rynx-ai/protocol/direct-runtime";
|
|
3
|
+
import { type RuntimeBrowserInspectClosedReason, type RuntimeBrowserInspectMessage, type RuntimeBrowserInspectTarget } from "@rynx-ai/protocol/runtime-browser-inspect";
|
|
4
|
+
import { WebSocket } from "ws";
|
|
5
|
+
import type { DirectRuntimeAuthenticator, DirectRuntimePeer } from "./direct-runtime-server.js";
|
|
6
|
+
export type DirectRuntimeBrowserInspectTransportCloseReason = "client_closed" | "transport_error" | "grant_revoked" | "server_shutdown";
|
|
7
|
+
/**
|
|
8
|
+
* A resolved local page stream. Implementations connect only after the host has
|
|
9
|
+
* resolved the semantic tuple to its own loopback CDP endpoint.
|
|
10
|
+
*/
|
|
11
|
+
export interface DirectRuntimeBrowserInspectAttachment {
|
|
12
|
+
readonly messages: AsyncIterable<RuntimeBrowserInspectMessage>;
|
|
13
|
+
send(message: RuntimeBrowserInspectMessage): void | Promise<void>;
|
|
14
|
+
close(reason: DirectRuntimeBrowserInspectTransportCloseReason): void | Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Deliberately exposes no URL/host/port input: callers can request only an
|
|
18
|
+
* exact Session generation page owned by this runtime.
|
|
19
|
+
*/
|
|
20
|
+
export interface DirectRuntimeBrowserInspectHost {
|
|
21
|
+
open(target: RuntimeBrowserInspectTarget, context: {
|
|
22
|
+
peer: DirectRuntimePeer;
|
|
23
|
+
signal: AbortSignal;
|
|
24
|
+
}): DirectRuntimeBrowserInspectAttachment | Promise<DirectRuntimeBrowserInspectAttachment>;
|
|
25
|
+
}
|
|
26
|
+
export declare class DirectRuntimeBrowserInspectHostError extends Error {
|
|
27
|
+
readonly reason: RuntimeBrowserInspectClosedReason;
|
|
28
|
+
constructor(reason: RuntimeBrowserInspectClosedReason, message: string, options?: ErrorOptions);
|
|
29
|
+
}
|
|
30
|
+
export interface DirectRuntimeBrowserInspectServerLimits {
|
|
31
|
+
authenticationTimeoutMs: number;
|
|
32
|
+
maxConnections: number;
|
|
33
|
+
maxUnauthenticatedConnectionsPerSource: number;
|
|
34
|
+
maxAuthenticationAttemptsPerSource: number;
|
|
35
|
+
authenticationAttemptWindowMs: number;
|
|
36
|
+
maxTrackedAuthenticationSources: number;
|
|
37
|
+
maxConnectionsPerGrant: number;
|
|
38
|
+
maxQueuedBytes: number;
|
|
39
|
+
maxBufferedBytes: number;
|
|
40
|
+
heartbeatIntervalMs: number;
|
|
41
|
+
peerLivenessTimeoutMs: number;
|
|
42
|
+
shutdownDeadlineMs: number;
|
|
43
|
+
}
|
|
44
|
+
export interface DirectRuntimeBrowserInspectConnectionHub {
|
|
45
|
+
registerWithinLimit(grantId: string, connection: {
|
|
46
|
+
ws: WebSocket;
|
|
47
|
+
close(code: number, reason: string): void;
|
|
48
|
+
}, maxConnections: number): "registered" | "revoked" | "capacity";
|
|
49
|
+
unregister(connection: {
|
|
50
|
+
ws: WebSocket;
|
|
51
|
+
close(code: number, reason: string): void;
|
|
52
|
+
}): void;
|
|
53
|
+
}
|
|
54
|
+
export interface AttachDirectRuntimeBrowserInspectServerOptions {
|
|
55
|
+
e2ee: {
|
|
56
|
+
serverPublicKey: string;
|
|
57
|
+
deriveSharedSecret(clientEphemeralPublicKey: string): Uint8Array;
|
|
58
|
+
};
|
|
59
|
+
authenticator: DirectRuntimeAuthenticator;
|
|
60
|
+
host: DirectRuntimeBrowserInspectHost;
|
|
61
|
+
isPeerActive(peer: DirectRuntimePeer): boolean | Promise<boolean>;
|
|
62
|
+
connectionHub: DirectRuntimeBrowserInspectConnectionHub;
|
|
63
|
+
limits?: Partial<DirectRuntimeBrowserInspectServerLimits>;
|
|
64
|
+
onError?: (error: unknown, context: string) => void;
|
|
65
|
+
}
|
|
66
|
+
export interface DirectRuntimeBrowserInspectServer {
|
|
67
|
+
readonly path: typeof DIRECT_RUNTIME_BROWSER_INSPECT_PATH;
|
|
68
|
+
readonly activeConnectionCount: number;
|
|
69
|
+
shutdown(): Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
/** Attach only the V5 dedicated Browser Inspect route to a Direct listener. */
|
|
72
|
+
export declare function attachDirectRuntimeBrowserInspectServer(server: HttpServer, options: AttachDirectRuntimeBrowserInspectServerOptions): DirectRuntimeBrowserInspectServer;
|