@rynx-ai/server 0.1.9 → 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-ws.d.ts +2 -0
- package/dist/browser-surface-ws.js +1 -0
- package/dist/control-api.d.ts +17 -0
- package/dist/control-api.js +809 -9
- package/dist/control-web/assets/{highlighted-body-OFNGDK62-e-w61YLy.js → highlighted-body-OFNGDK62-DHu2g-rk.js} +1 -1
- 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/{mermaid-GHXKKRXX-DZn7Hbr2.js → mermaid-GHXKKRXX-CSYzOmBR.js} +3 -3
- package/dist/control-web/index.html +2 -2
- package/dist/desktop-browser-host.d.ts +20 -3
- package/dist/desktop-browser-host.js +126 -44
- 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-server.d.ts +6 -0
- package/dist/direct-runtime-server.js +29 -1
- package/dist/emulator-surface-ws.d.ts +2 -0
- package/dist/emulator-surface-ws.js +1 -0
- package/dist/machine-session-service.d.ts +88 -5
- package/dist/machine-session-service.js +283 -20
- package/dist/remote-runtime-dispatcher.d.ts +1 -1
- package/dist/remote-runtime-dispatcher.js +25 -2
- package/dist/remote-runtime-session-projection.js +10 -0
- package/dist/runtime-web-auth.d.ts +5 -0
- package/dist/runtime-web-auth.js +43 -3
- package/dist/server.d.ts +78 -8
- package/dist/server.js +42 -17
- package/dist/session-browser-service.d.ts +30 -0
- package/dist/session-browser-service.js +89 -3
- package/dist/session-browser-surface-coordinator.d.ts +4 -3
- package/dist/session-browser-surface-coordinator.js +374 -268
- package/dist/session-runtime-index.d.ts +6 -0
- package/dist/session-runtime-index.js +10 -0
- package/dist/session-terminal-host.d.ts +6 -1
- package/dist/session-terminal-host.js +18 -0
- package/dist/terminal-ws.d.ts +3 -0
- package/dist/terminal-ws.js +1 -0
- package/package.json +12 -7
- package/dist/control-web/assets/index-BQ7XVBKO.css +0 -32
- package/dist/control-web/assets/index-ClpzuBJx.js +0 -606
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Server } from "node:http";
|
|
2
2
|
import { WebSocketServer } from "ws";
|
|
3
|
+
import { type RuntimeWebAccessPolicy } from "./runtime-web-auth.js";
|
|
3
4
|
import type { RuntimeConnectionResolverHost } from "./server.js";
|
|
4
5
|
export interface BrowserSurfaceWsDeps {
|
|
5
6
|
runtimeConnectionResolver?: RuntimeConnectionResolverHost;
|
|
7
|
+
runtimeWebAccess?: RuntimeWebAccessPolicy;
|
|
6
8
|
keepAliveMs?: number;
|
|
7
9
|
peerLivenessTimeoutMs?: number;
|
|
8
10
|
}
|
|
@@ -35,6 +35,7 @@ export function attachBrowserSurfaceWs(server, deps) {
|
|
|
35
35
|
const authorization = authorizeRuntimeWebRequest(request, {
|
|
36
36
|
mutation: true,
|
|
37
37
|
capability: parsed.url.searchParams.get(RUNTIME_WEB_CAPABILITY_QUERY) ?? "",
|
|
38
|
+
access: deps.runtimeWebAccess,
|
|
38
39
|
});
|
|
39
40
|
if (authorization) {
|
|
40
41
|
rejectUpgrade(socket, authorization.status, authorization.error);
|
package/dist/control-api.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import Router from "@koa/router";
|
|
|
2
2
|
import { type AgentSpec, type AuthMaterial, type ConversationRuntime, type MachineSessionRecord, type AgentRuntimeId, type SessionBus, type SessionLogStore, type SkillInstallRecipe } from "@rynx-ai/core";
|
|
3
3
|
import type { ControlChannel, ControlChannelType, ControlInstanceConfig, ControlAgentSummary, SkillSummary, SkillDetail } from "@rynx-ai/protocol/control";
|
|
4
4
|
import type { SessionInteractionResolution } from "@rynx-ai/protocol";
|
|
5
|
+
import { type RemoteRuntimeRpcParams, type RemoteRuntimeRpcResultFor } from "@rynx-ai/protocol/remote-runtime-rpc";
|
|
5
6
|
import type { CodexSessionStore, InjectOutcome } from "@rynx-ai/runtime";
|
|
6
7
|
import type { ChannelManager } from "./channel-manager.js";
|
|
7
8
|
import type { DaemonManagementHost, RemoteRuntimeAdminHost, RuntimeTargetControlHost, RuntimeConnectionResolverHost, RuntimeLocalBrowserAutomationHost } from "./server.js";
|
|
@@ -9,6 +10,7 @@ import type { ProviderCliManagementHost } from "./provider-cli-host.js";
|
|
|
9
10
|
import { type DaemonRuntimeHost } from "./remote-runtime.js";
|
|
10
11
|
import { SessionRuntimeIndex } from "./session-runtime-index.js";
|
|
11
12
|
import type { SessionEmulatorService } from "./session-emulator-service.js";
|
|
13
|
+
import { type RuntimeWebAccessPolicy } from "./runtime-web-auth.js";
|
|
12
14
|
export interface ControlEmulatorDeps {
|
|
13
15
|
doctor(): Promise<unknown>;
|
|
14
16
|
devices(): Promise<unknown[]>;
|
|
@@ -184,6 +186,17 @@ export interface SessionResourceLifecycle {
|
|
|
184
186
|
beforeDelete?(sessionId: string): void | Promise<void>;
|
|
185
187
|
afterDelete?(sessionId: string): void | Promise<void>;
|
|
186
188
|
}
|
|
189
|
+
/** In-process Local Runtime resource authority. Direct targets continue through
|
|
190
|
+
* the bounded Remote Runtime RPC transport; Local avoids serial base64 frames. */
|
|
191
|
+
export interface LocalSessionResourceHost {
|
|
192
|
+
resourcePolicy(sessionId: string): Promise<RemoteRuntimeRpcResultFor<"session.resource.policy.get">> | RemoteRuntimeRpcResultFor<"session.resource.policy.get">;
|
|
193
|
+
beginResourceUpload(input: RemoteRuntimeRpcParams<"session.resource.upload.begin">): Promise<RemoteRuntimeRpcResultFor<"session.resource.upload.begin">>;
|
|
194
|
+
writeResourceUploadChunk(input: RemoteRuntimeRpcParams<"session.resource.upload.chunk">): Promise<RemoteRuntimeRpcResultFor<"session.resource.upload.chunk">>;
|
|
195
|
+
commitResourceUpload(input: RemoteRuntimeRpcParams<"session.resource.upload.commit">): Promise<RemoteRuntimeRpcResultFor<"session.resource.upload.commit">>;
|
|
196
|
+
getResource(input: RemoteRuntimeRpcParams<"session.resource.get">): Promise<RemoteRuntimeRpcResultFor<"session.resource.get">>;
|
|
197
|
+
readResource(input: RemoteRuntimeRpcParams<"session.resource.read">): Promise<RemoteRuntimeRpcResultFor<"session.resource.read">>;
|
|
198
|
+
deleteResource(input: RemoteRuntimeRpcParams<"session.resource.delete">): Promise<RemoteRuntimeRpcResultFor<"session.resource.delete">>;
|
|
199
|
+
}
|
|
187
200
|
export declare function createControlRouter(opts: {
|
|
188
201
|
manager: ChannelManager;
|
|
189
202
|
deps: ControlPlaneDeps;
|
|
@@ -227,8 +240,12 @@ export declare function createControlRouter(opts: {
|
|
|
227
240
|
remoteRuntimeAdmin?: RemoteRuntimeAdminHost;
|
|
228
241
|
/** Local BFF authority for Local and explicitly paired Direct Runtime targets. */
|
|
229
242
|
runtimeTargetControl?: RuntimeTargetControlHost;
|
|
243
|
+
/** Browser-facing access boundary. Internal daemon management remains loopback-only. */
|
|
244
|
+
runtimeWebAccess?: RuntimeWebAccessPolicy;
|
|
230
245
|
/** Resolves an explicit Runtime selector without exposing Direct credentials. */
|
|
231
246
|
runtimeConnectionResolver?: RuntimeConnectionResolverHost;
|
|
247
|
+
/** Same-daemon resource authority for the `local` selector. */
|
|
248
|
+
localSessionResources?: LocalSessionResourceHost;
|
|
232
249
|
sessionEmulators?: SessionEmulatorService;
|
|
233
250
|
/** Ends host-owned long-lived HTTP responses before the server drains. */
|
|
234
251
|
shutdownSignal?: AbortSignal;
|