@rynx-ai/server 0.1.11-beta.1 → 0.1.11-beta.11
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/control-api.d.ts +17 -52
- package/dist/control-api.js +755 -341
- package/dist/control-web/assets/{highlighted-body-OFNGDK62-DgFZpTNw.js → highlighted-body-OFNGDK62-IdclXfSt.js} +1 -1
- package/dist/control-web/assets/index-5n6D-i-c.css +32 -0
- package/dist/control-web/assets/index-DhsO7WjD.js +709 -0
- package/dist/control-web/assets/{mermaid-GHXKKRXX-BDikE3W1.js → mermaid-GHXKKRXX-BqMPrbIZ.js} +3 -3
- package/dist/control-web/index.html +2 -2
- package/dist/control-web-dist.d.ts +1 -1
- package/dist/control-web-dist.js +4 -2
- package/dist/machine-session-service.d.ts +135 -27
- package/dist/machine-session-service.js +410 -58
- package/dist/remote-runtime-dispatcher.d.ts +12 -2
- package/dist/remote-runtime-dispatcher.js +56 -0
- package/dist/remote-runtime-session-projection.js +1 -0
- package/dist/server.d.ts +59 -29
- package/dist/server.js +158 -143
- package/dist/session-browser-service.d.ts +8 -0
- package/dist/session-browser-service.js +37 -20
- package/dist/session-portal.d.ts +42 -0
- package/dist/session-portal.js +746 -0
- package/dist/session-runtime-index.d.ts +7 -0
- package/dist/session-runtime-index.js +42 -6
- package/dist/session-terminal-host.d.ts +6 -0
- package/dist/session-terminal-host.js +56 -41
- package/dist/terminal-ws.js +8 -6
- package/package.json +7 -7
- package/dist/channel-manager.d.ts +0 -60
- package/dist/channel-manager.js +0 -106
- package/dist/control-web/assets/index-CnVtOmLv.css +0 -32
- package/dist/control-web/assets/index-Dlywgy58.js +0 -661
package/dist/control-api.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import Router from "@koa/router";
|
|
2
|
-
import { type
|
|
3
|
-
import type {
|
|
2
|
+
import { type ConversationRuntime, type MachineSessionRecord, type ResolvedExecutionSnapshot, type SessionWorkspaceSnapshot, type SessionBus, type SessionLogStore, type SkillInstallRecipe } from "@rynx-ai/core";
|
|
3
|
+
import type { ControlAgentSummary, ControlAgentRuntimeOption, ControlLocalSkillCandidate, ControlLocalSkillImportResult, SkillSummary, SkillDetail, ProviderCliId } from "@rynx-ai/protocol/control";
|
|
4
4
|
import type { SessionInteractionResolution } from "@rynx-ai/protocol";
|
|
5
5
|
import { type RemoteRuntimeRpcParams, type RemoteRuntimeRpcResultFor } from "@rynx-ai/protocol/remote-runtime-rpc";
|
|
6
|
-
import type { CodexSessionStore, InjectOutcome } from "@rynx-ai/runtime";
|
|
7
|
-
import type { ChannelManager } from "./channel-manager.js";
|
|
8
6
|
import type { DaemonManagementHost, RemoteRuntimeAdminHost, RuntimeTargetControlHost, RuntimeConnectionResolverHost, RuntimeLocalBrowserAutomationHost } from "./server.js";
|
|
9
7
|
import type { ProviderCliManagementHost } from "./provider-cli-host.js";
|
|
10
8
|
import { type DaemonRuntimeHost } from "./remote-runtime.js";
|
|
11
9
|
import { SessionRuntimeIndex } from "./session-runtime-index.js";
|
|
12
10
|
import type { SessionEmulatorService } from "./session-emulator-service.js";
|
|
13
11
|
import { type RuntimeWebAccessPolicy } from "./runtime-web-auth.js";
|
|
12
|
+
import type { MachineSessionService } from "./machine-session-service.js";
|
|
14
13
|
export interface ControlEmulatorDeps {
|
|
15
14
|
doctor(): Promise<unknown>;
|
|
16
15
|
devices(): Promise<unknown[]>;
|
|
@@ -113,42 +112,15 @@ export interface ControlEmulatorDeps {
|
|
|
113
112
|
}): Promise<unknown>;
|
|
114
113
|
}
|
|
115
114
|
export interface ControlPlaneDeps {
|
|
116
|
-
listChannelTypes(): ControlChannelType[];
|
|
117
|
-
listChannels(): ControlChannel[];
|
|
118
|
-
createChannel(input: {
|
|
119
|
-
name: string;
|
|
120
|
-
type: string;
|
|
121
|
-
options?: Record<string, unknown>;
|
|
122
|
-
}): {
|
|
123
|
-
id: string;
|
|
124
|
-
};
|
|
125
|
-
setChannel(id: string, patch: {
|
|
126
|
-
name?: string;
|
|
127
|
-
options?: Record<string, unknown>;
|
|
128
|
-
}): void;
|
|
129
|
-
removeChannel(id: string): void;
|
|
130
|
-
/** Run a channel type's authorize flow; resolves with the options to persist. */
|
|
131
|
-
authorizeChannel(type: string, context: {
|
|
132
|
-
instanceId?: string;
|
|
133
|
-
config: Record<string, unknown>;
|
|
134
|
-
}, emit: (material: AuthMaterial) => void, signal: AbortSignal): Promise<Record<string, unknown>>;
|
|
135
|
-
listInstancesConfig(): ControlInstanceConfig[];
|
|
136
|
-
createInstance(input: {
|
|
137
|
-
channelId: string;
|
|
138
|
-
agent?: string;
|
|
139
|
-
}): {
|
|
140
|
-
id: string;
|
|
141
|
-
};
|
|
142
|
-
setInstance(id: string, patch: {
|
|
143
|
-
agent?: string;
|
|
144
|
-
enabled?: boolean;
|
|
145
|
-
}): void;
|
|
146
|
-
removeInstance(id: string): void;
|
|
147
115
|
listAgents(): Promise<ControlAgentSummary[]>;
|
|
148
116
|
getAgent(name: string): Promise<unknown | null>;
|
|
149
117
|
/** Validate + persist an agent spec; throws on a schema violation (→ 400). */
|
|
150
118
|
writeAgent(name: string, spec: Record<string, unknown>): void;
|
|
151
119
|
removeAgent(name: string): boolean;
|
|
120
|
+
/** Local CLI/model discovery used by the Agent registration UI. */
|
|
121
|
+
listAgentRuntimeOptions?(options?: {
|
|
122
|
+
refresh?: boolean;
|
|
123
|
+
}): Promise<ControlAgentRuntimeOption[]>;
|
|
152
124
|
/** List skills installed in the daemon's global catalog (with install provenance). */
|
|
153
125
|
listSkills(): Promise<SkillSummary[]>;
|
|
154
126
|
/** One skill's metadata + its file tree, or null if not in the catalog. */
|
|
@@ -166,6 +138,9 @@ export interface ControlPlaneDeps {
|
|
|
166
138
|
}[]>;
|
|
167
139
|
/** Remove a catalog skill by name. */
|
|
168
140
|
removeSkill(name: string): Promise<boolean>;
|
|
141
|
+
scanLocalSkills?(runtime: ProviderCliId): Promise<ControlLocalSkillCandidate[]>;
|
|
142
|
+
importLocalSkills?(runtime: ProviderCliId, keys: string[]): Promise<ControlLocalSkillImportResult[]>;
|
|
143
|
+
importSkillArchive?(filename: string, contentBase64: string): Promise<ControlLocalSkillImportResult[]>;
|
|
169
144
|
tailLogs(instanceId: string | undefined, lines: number): Promise<string>;
|
|
170
145
|
emulator?: ControlEmulatorDeps;
|
|
171
146
|
listSessionMetas(): StoredSessionMeta[];
|
|
@@ -198,7 +173,6 @@ export interface LocalSessionResourceHost {
|
|
|
198
173
|
deleteResource(input: RemoteRuntimeRpcParams<"session.resource.delete">): Promise<RemoteRuntimeRpcResultFor<"session.resource.delete">>;
|
|
199
174
|
}
|
|
200
175
|
export declare function createControlRouter(opts: {
|
|
201
|
-
manager: ChannelManager;
|
|
202
176
|
deps: ControlPlaneDeps;
|
|
203
177
|
/** Present ⇒ the control plane can run agent sessions (see `/api/sessions`). */
|
|
204
178
|
runtime?: ConversationRuntime;
|
|
@@ -208,30 +182,19 @@ export declare function createControlRouter(opts: {
|
|
|
208
182
|
* and (codex-native live mode) bring up + inject into a session's forwarder. */
|
|
209
183
|
runnerManager?: {
|
|
210
184
|
stopRunner(localThreadId: string): void;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
runtime?: AgentRuntimeId;
|
|
216
|
-
agentName?: string;
|
|
217
|
-
agentSpec?: AgentSpec;
|
|
185
|
+
interruptLiveSession?(localThreadId: string): Promise<boolean>;
|
|
186
|
+
ensureLiveSession?(localThreadId: string, opts: {
|
|
187
|
+
workspace: SessionWorkspaceSnapshot;
|
|
188
|
+
execution: ResolvedExecutionSnapshot;
|
|
218
189
|
}): Promise<boolean>;
|
|
219
190
|
lastLiveSessionError?(localThreadId: string): string | undefined;
|
|
220
|
-
injectMessage?(localThreadId: string, text: string): Promise<
|
|
221
|
-
interruptLiveSession?(localThreadId: string): Promise<boolean>;
|
|
191
|
+
injectMessage?(localThreadId: string, text: string): Promise<"injected" | "notLive" | "notReady" | "failed">;
|
|
222
192
|
resolveInteraction?(localThreadId: string, interactionId: string, resolution: SessionInteractionResolution): Promise<{
|
|
223
193
|
disposition: "applied" | "already_resolved" | "not_found" | "invalid";
|
|
224
194
|
}>;
|
|
225
195
|
};
|
|
226
|
-
/** Global codex/claude session store. Lets the control plane resume a
|
|
227
|
-
* non-console session on its original runtime/model/cwd binding. */
|
|
228
|
-
sessionStore?: CodexSessionStore;
|
|
229
196
|
/** Trusted, cached plugin supervisor health. No plugin RPC is awaited here. */
|
|
230
197
|
pluginRuntimeStatus?: () => unknown;
|
|
231
|
-
/** Local-host-only runtime refresh used by the core CLI after a plugin command. */
|
|
232
|
-
pluginRuntimeReload?: (pluginId: string) => Promise<unknown>;
|
|
233
|
-
/** Idempotent local-host-only readiness check for an unchanged plugin runtime. */
|
|
234
|
-
pluginRuntimeEnsure?: (pluginId: string) => Promise<unknown>;
|
|
235
198
|
/** Complete local authority; its token is published only in the mode-0600 endpoint file. */
|
|
236
199
|
daemonManagement?: DaemonManagementHost;
|
|
237
200
|
/** Runtime application port shared by future Local and Direct bindings. */
|
|
@@ -246,6 +209,8 @@ export declare function createControlRouter(opts: {
|
|
|
246
209
|
runtimeConnectionResolver?: RuntimeConnectionResolverHost;
|
|
247
210
|
/** Same-daemon resource authority for the `local` selector. */
|
|
248
211
|
localSessionResources?: LocalSessionResourceHost;
|
|
212
|
+
/** Canonical same-daemon Session service used by legacy Local API aliases. */
|
|
213
|
+
localMachineSessions?: MachineSessionService;
|
|
249
214
|
sessionEmulators?: SessionEmulatorService;
|
|
250
215
|
/** Ends host-owned long-lived HTTP responses before the server drains. */
|
|
251
216
|
shutdownSignal?: AbortSignal;
|