@rynx-ai/runtime 0.1.11-beta.5 → 0.1.11-beta.50
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/claude/executor.d.ts +19 -5
- package/dist/claude/executor.js +56 -12
- package/dist/claude/models.d.ts +0 -5
- package/dist/claude/models.js +1 -7
- package/dist/claude/native-bridge.d.ts +103 -1
- package/dist/claude/native-bridge.js +460 -30
- package/dist/claude/native-hook-main.js +81 -1
- package/dist/claude/native-hooks.js +7 -0
- package/dist/claude/native-integration.d.ts +178 -26
- package/dist/claude/native-integration.js +1571 -170
- package/dist/claude/session-status.d.ts +39 -0
- package/dist/claude/session-status.js +163 -0
- package/dist/claude/transcript-clone.d.ts +18 -0
- package/dist/claude/transcript-clone.js +497 -0
- package/dist/claude/transcript.d.ts +27 -4
- package/dist/claude/transcript.js +183 -46
- package/dist/codex-app-server/client.d.ts +10 -6
- package/dist/codex-app-server/client.js +67 -15
- package/dist/codex-app-server/forwarder.d.ts +96 -3
- package/dist/codex-app-server/forwarder.js +542 -57
- package/dist/codex-app-server/mapping.d.ts +3 -6
- package/dist/codex-app-server/mapping.js +228 -36
- package/dist/codex-app-server/mcp-startup.d.ts +13 -0
- package/dist/codex-app-server/mcp-startup.js +63 -0
- package/dist/codex-app-server/process-registry.d.ts +36 -0
- package/dist/codex-app-server/process-registry.js +320 -0
- package/dist/codex-app-server/protocol.d.ts +68 -7
- package/dist/codex-app-server/transport.d.ts +2 -2
- package/dist/codex-app-server/transport.js +4 -0
- package/dist/codex-app-server/ws-channel.d.ts +8 -1
- package/dist/codex-app-server/ws-channel.js +113 -28
- package/dist/codex-child-env.js +3 -32
- package/dist/codex-home.d.ts +35 -3
- package/dist/codex-home.js +323 -18
- package/dist/codex-session-store.d.ts +23 -0
- package/dist/codex-session-store.js +21 -0
- package/dist/host.d.ts +106 -48
- package/dist/host.js +2024 -640
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/input-resources.d.ts +4 -0
- package/dist/input-resources.js +21 -5
- package/dist/models-catalog.js +12 -3
- package/dist/runner/child.d.ts +105 -28
- package/dist/runner/child.js +1625 -100
- package/dist/runner/manager.d.ts +114 -46
- package/dist/runner/manager.js +1523 -446
- package/dist/runner/protocol.d.ts +212 -24
- package/dist/runner/protocol.js +5 -0
- package/dist/runner/startup-policy.d.ts +7 -0
- package/dist/runner/startup-policy.js +10 -0
- package/dist/runner/transport.d.ts +18 -2
- package/dist/runner/transport.js +82 -3
- package/dist/runner-main.js +8 -3
- package/dist/terminal/codex-tui.d.ts +4 -0
- package/dist/terminal/codex-tui.js +5 -0
- package/dist/terminal/control-parser.d.ts +39 -0
- package/dist/terminal/control-parser.js +172 -0
- package/dist/terminal/registry.d.ts +18 -15
- package/dist/terminal/registry.js +44 -23
- package/dist/terminal/spool.d.ts +47 -0
- package/dist/terminal/spool.js +231 -0
- package/dist/terminal/tmux.d.ts +126 -74
- package/dist/terminal/tmux.js +807 -211
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -9,10 +9,10 @@ export type { CodexCapabilities, CapabilityResult, CodexRuntimeStatus, } from ".
|
|
|
9
9
|
export type { ClaudeForkIntent, CodexSessionStore, CodexSessionRecord, } from "./codex-session-store.js";
|
|
10
10
|
export { RunnerManager, TerminalOpenError } from "./runner/manager.js";
|
|
11
11
|
export type { RunnerManagerOptions, RunnerSessionContext, RunnerSessionContextProvider, OpenTerminalOptions, ParentTerminal, } from "./runner/manager.js";
|
|
12
|
-
export type { InjectOutcome, TerminalOpenErrorCode, TerminalRole } from "./runner/protocol.js";
|
|
12
|
+
export type { InjectOutcome, InjectResult, TerminalOpenErrorCode, TerminalRole } from "./runner/protocol.js";
|
|
13
13
|
export type { ResolveInteractionResult, RuntimeInteractionEvent, RuntimeInteractionListener, } from "./interactions.js";
|
|
14
14
|
export { probeRuntimeStatus } from "./runtime-status.js";
|
|
15
15
|
export { listRuntimeModels } from "./models-catalog.js";
|
|
16
|
-
export { TmuxTerminal, isTmuxAvailable, terminateTmuxServer, tmuxSocketPath, } from "./terminal/tmux.js";
|
|
17
|
-
export type {
|
|
16
|
+
export { TmuxTerminal, isTmuxAvailable, resolveTmuxBin, terminateTmuxServer, tmuxSocketPath, } from "./terminal/tmux.js";
|
|
17
|
+
export type { PreparedTerminalAttachment, PullTerminalAttachment, TmuxTerminalOptions, } from "./terminal/tmux.js";
|
|
18
18
|
export { TerminalRegistry } from "./terminal/registry.js";
|
package/dist/index.js
CHANGED
|
@@ -12,5 +12,5 @@ export { RunnerManager, TerminalOpenError } from "./runner/manager.js";
|
|
|
12
12
|
export { probeRuntimeStatus } from "./runtime-status.js";
|
|
13
13
|
export { listRuntimeModels } from "./models-catalog.js";
|
|
14
14
|
// Live-terminal subsystem (Phase C): tmux-backed terminals + per-runner registry.
|
|
15
|
-
export { TmuxTerminal, isTmuxAvailable, terminateTmuxServer, tmuxSocketPath, } from "./terminal/tmux.js";
|
|
15
|
+
export { TmuxTerminal, isTmuxAvailable, resolveTmuxBin, terminateTmuxServer, tmuxSocketPath, } from "./terminal/tmux.js";
|
|
16
16
|
export { TerminalRegistry } from "./terminal/registry.js";
|
|
@@ -3,6 +3,10 @@ import type { UserInput } from "./codex-app-server/protocol.js";
|
|
|
3
3
|
/** Convert the provider-native user echo back to resource references. Unknown
|
|
4
4
|
* local paths and remote URLs are deliberately omitted rather than exposed. */
|
|
5
5
|
export declare function codexUserContent(input: readonly UserInput[]): UserContentPart[];
|
|
6
|
+
/** Match the forwarder's public user echo shape exactly. Codex merges adjacent
|
|
7
|
+
* text inputs (including the internal file marker) into one string before the
|
|
8
|
+
* Host sees the completed userMessage item. */
|
|
9
|
+
export declare function codexUserEchoContent(input: readonly UserInput[]): string | UserContentPart[] | undefined;
|
|
6
10
|
/** Claude's native TUI has no structured image RPC. The target daemon supplies
|
|
7
11
|
* only managed local paths and the marker makes the transcript echo reversible. */
|
|
8
12
|
export declare function claudeInputText(input: RuntimeUserInput, attachmentToken?: string): string;
|
package/dist/input-resources.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { basename, extname } from "node:path";
|
|
3
3
|
const CLAUDE_ATTACHMENT_TOKEN = "RYNX_ATTACHMENT_SET";
|
|
4
|
-
const CLAUDE_ATTACHMENT_TOKEN_RE = /^\[RYNX_ATTACHMENT_SET (att_[0-9a-f-]{36}): inspect each RYNX_IMAGE_RESOURCE path with the Read tool before answering\.\]$/m;
|
|
4
|
+
const CLAUDE_ATTACHMENT_TOKEN_RE = /^\[RYNX_ATTACHMENT_SET (att_[0-9a-f-]{36}): inspect each RYNX_IMAGE_RESOURCE or RYNX_FILE_RESOURCE path with the Read tool before answering\.\]$/m;
|
|
5
5
|
/** Convert the provider-native user echo back to resource references. Unknown
|
|
6
6
|
* local paths and remote URLs are deliberately omitted rather than exposed. */
|
|
7
7
|
export function codexUserContent(input) {
|
|
@@ -20,21 +20,37 @@ export function codexUserContent(input) {
|
|
|
20
20
|
}
|
|
21
21
|
return parts;
|
|
22
22
|
}
|
|
23
|
+
/** Match the forwarder's public user echo shape exactly. Codex merges adjacent
|
|
24
|
+
* text inputs (including the internal file marker) into one string before the
|
|
25
|
+
* Host sees the completed userMessage item. */
|
|
26
|
+
export function codexUserEchoContent(input) {
|
|
27
|
+
const parts = codexUserContent(input);
|
|
28
|
+
if (parts.length === 0)
|
|
29
|
+
return undefined;
|
|
30
|
+
if (parts.every((part) => part.type === "input_text")) {
|
|
31
|
+
const text = parts.map((part) => part.text).join("").trim();
|
|
32
|
+
return text || undefined;
|
|
33
|
+
}
|
|
34
|
+
return parts;
|
|
35
|
+
}
|
|
23
36
|
/** Claude's native TUI has no structured image RPC. The target daemon supplies
|
|
24
37
|
* only managed local paths and the marker makes the transcript echo reversible. */
|
|
25
38
|
export function claudeInputText(input, attachmentToken = `att_${randomUUID()}`) {
|
|
26
|
-
const
|
|
39
|
+
const attachments = input.content.filter((part) => part.type !== "text");
|
|
27
40
|
const text = input.content
|
|
28
41
|
.filter((part) => part.type === "text")
|
|
29
42
|
.map((part) => part.text)
|
|
30
43
|
.join("");
|
|
31
|
-
if (
|
|
44
|
+
if (attachments.length === 0)
|
|
32
45
|
return text;
|
|
33
46
|
if (!/^att_[0-9a-f-]{36}$/.test(attachmentToken)) {
|
|
34
47
|
throw new Error("Claude attachment token is invalid");
|
|
35
48
|
}
|
|
36
|
-
const preamble = `[${CLAUDE_ATTACHMENT_TOKEN} ${attachmentToken}: inspect each RYNX_IMAGE_RESOURCE path with the Read tool before answering.]`;
|
|
37
|
-
const markers =
|
|
49
|
+
const preamble = `[${CLAUDE_ATTACHMENT_TOKEN} ${attachmentToken}: inspect each RYNX_IMAGE_RESOURCE or RYNX_FILE_RESOURCE path with the Read tool before answering.]`;
|
|
50
|
+
const markers = attachments.map((part) => `[[RYNX_${part.type === "local_image" ? "IMAGE" : "FILE"}_RESOURCE ${JSON.stringify({
|
|
51
|
+
path: part.path,
|
|
52
|
+
...(part.resource.filename ? { filename: part.resource.filename } : {}),
|
|
53
|
+
})}]]`);
|
|
38
54
|
return [preamble, ...markers, text]
|
|
39
55
|
.filter((part, index) => index <= markers.length || part.length > 0)
|
|
40
56
|
.join("\n");
|
package/dist/models-catalog.js
CHANGED
|
@@ -172,19 +172,28 @@ function normalizeTraexModels(value, configuredDefault) {
|
|
|
172
172
|
return [];
|
|
173
173
|
const models = [];
|
|
174
174
|
const seen = new Set();
|
|
175
|
+
let foundConfiguredDefault = false;
|
|
175
176
|
for (const item of value) {
|
|
176
177
|
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
177
178
|
continue;
|
|
178
179
|
const record = item;
|
|
179
|
-
const
|
|
180
|
+
const name = typeof record.name === "string" ? record.name.trim() : "";
|
|
181
|
+
// Traex 0.201.1 exposes the launchable model slug as real_name; name is its label/config alias.
|
|
182
|
+
const realName = typeof record.real_name === "string" ? record.real_name.trim() : "";
|
|
183
|
+
const id = realName || name;
|
|
180
184
|
if (!id || seen.has(id))
|
|
181
185
|
continue;
|
|
182
186
|
seen.add(id);
|
|
187
|
+
const isDefault = configuredDefault
|
|
188
|
+
? configuredDefault === id || configuredDefault === name
|
|
189
|
+
: models.length === 0;
|
|
190
|
+
foundConfiguredDefault ||= isDefault;
|
|
183
191
|
models.push({
|
|
184
192
|
id,
|
|
185
193
|
model: id,
|
|
194
|
+
...(name && name !== id ? { displayName: name } : {}),
|
|
186
195
|
...(typeof record.description === "string" ? { description: record.description } : {}),
|
|
187
|
-
isDefault
|
|
196
|
+
isDefault,
|
|
188
197
|
...(typeof record.context_window === "number" ? { contextWindow: record.context_window } : {}),
|
|
189
198
|
...(Array.isArray(record.supported_mime_types)
|
|
190
199
|
? { supportedMimeTypes: record.supported_mime_types }
|
|
@@ -192,7 +201,7 @@ function normalizeTraexModels(value, configuredDefault) {
|
|
|
192
201
|
...(record._meta && typeof record._meta === "object" ? { _meta: record._meta } : {}),
|
|
193
202
|
});
|
|
194
203
|
}
|
|
195
|
-
if (configuredDefault && !
|
|
204
|
+
if (configuredDefault && !foundConfiguredDefault) {
|
|
196
205
|
models.unshift({ id: configuredDefault, model: configuredDefault, isDefault: true });
|
|
197
206
|
}
|
|
198
207
|
return models;
|
package/dist/runner/child.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* single execution backend via the injected executor (a {@link LocalAgentHost}
|
|
4
|
-
* in production, which in a per-session process holds exactly one backend). It
|
|
5
|
-
* translates inbound {@link ToChild} control messages into the live co-drive
|
|
6
|
-
* surface (bring up the session's forwarder + TUI, inject / interrupt turns) and
|
|
7
|
-
* per-thread capabilities, answered against the same backend so the parent never
|
|
8
|
-
* needs an app-server of its own.
|
|
9
|
-
*/
|
|
10
|
-
import { type AgentCapabilities, type ResolvedExecutionSnapshot, type RuntimeUserInput, type SessionInteractionResolution, type SessionWorkspaceSnapshot } from "@rynx-ai/core";
|
|
11
|
-
import type { SessionEvent } from "@rynx-ai/core";
|
|
1
|
+
import { type AgentCapabilities, type LiveSessionFailure, type ResolvedExecutionSnapshot, type RuntimeTurnOptions, type RuntimeUserInput, type SessionCollaborationMode, type SessionInteractionResolution, type SessionWorkspaceSnapshot } from "@rynx-ai/core";
|
|
2
|
+
import { type TerminalLifecycle } from "../terminal/registry.js";
|
|
12
3
|
import type { TerminalInjector } from "../claude/native-integration.js";
|
|
4
|
+
import type { MirrorEmitter } from "../host.js";
|
|
13
5
|
import type { ResolveInteractionResult } from "../interactions.js";
|
|
14
|
-
import { type
|
|
15
|
-
import type
|
|
6
|
+
import { type InjectResult } from "./protocol.js";
|
|
7
|
+
import { type ChildTransport } from "./transport.js";
|
|
16
8
|
/** Re-target the mirror to a freshly minted rynx session (claude `/clear`·`/fork`)
|
|
17
9
|
* + record the terminal transfer with the daemon. The child owns the transport,
|
|
18
10
|
* so it supplies this to the host. */
|
|
@@ -21,7 +13,8 @@ type RetargetMirror = (newSessionId: string, meta: {
|
|
|
21
13
|
workspace: SessionWorkspaceSnapshot;
|
|
22
14
|
execution: ResolvedExecutionSnapshot;
|
|
23
15
|
parentSessionId?: string;
|
|
24
|
-
|
|
16
|
+
beforeApplied?: () => void | Promise<void>;
|
|
17
|
+
}) => void | Promise<void>;
|
|
25
18
|
/** Codex-native live-session methods the executor (a `LocalAgentHost`) exposes
|
|
26
19
|
* beyond the `AgentExecutor`/`AgentCapabilities` contract. Duck-typed so the
|
|
27
20
|
* runner works with any executor (a claude-only host simply lacks them). */
|
|
@@ -32,24 +25,47 @@ interface LiveCodexProvider {
|
|
|
32
25
|
cwd: string;
|
|
33
26
|
env?: Record<string, string>;
|
|
34
27
|
skipTraexStartupPrompts?: boolean;
|
|
28
|
+
scrollback?: number;
|
|
29
|
+
tmuxAllowPassthrough?: boolean;
|
|
30
|
+
tmuxStartOnAttach?: boolean;
|
|
31
|
+
keepAliveAfterExit?: boolean;
|
|
32
|
+
lifecycle: TerminalLifecycle;
|
|
35
33
|
} | null>;
|
|
36
|
-
ensureLiveCodexSession?(localThreadId: string, emit:
|
|
34
|
+
ensureLiveCodexSession?(localThreadId: string, emit: MirrorEmitter, opts: {
|
|
37
35
|
workspace: SessionWorkspaceSnapshot;
|
|
38
36
|
execution: ResolvedExecutionSnapshot;
|
|
39
37
|
retargetMirror?: RetargetMirror;
|
|
40
38
|
}): Promise<boolean>;
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
/** Known-thread Codex/Traex resume only: start the independent transcript
|
|
40
|
+
* observer after the replacement TUI has launched. Fresh discovery connects
|
|
41
|
+
* its listener before launch and this method is an idempotent no-op. */
|
|
42
|
+
startLiveCodexObserver?(localThreadId: string): void;
|
|
43
|
+
/** `null` delegates the deadline to RunnerManager. */
|
|
44
|
+
waitLiveReady?(localThreadId: string, timeoutMs?: number | null): Promise<boolean>;
|
|
45
|
+
/** `null` delegates the deadline to RunnerManager. */
|
|
46
|
+
waitTerminalReady?(localThreadId: string, timeoutMs?: number | null): Promise<boolean>;
|
|
43
47
|
liveSessionError?(localThreadId: string): string | undefined;
|
|
44
|
-
|
|
48
|
+
liveSessionFailure?(localThreadId: string): LiveSessionFailure | undefined;
|
|
49
|
+
failLiveStartup?(localThreadId: string, error: Error): boolean;
|
|
50
|
+
failLiveSession?(localThreadId: string, error: Error): boolean;
|
|
51
|
+
/** Codex/Traex auxiliary Terminal lifecycle: settle the current Turn, stop
|
|
52
|
+
* observer/forwarder, and evict the owned app-server while preserving the
|
|
53
|
+
* durable native-session binding for a later cold resume. */
|
|
54
|
+
teardownLiveCodexSession?(localThreadId: string, error?: Error): boolean;
|
|
55
|
+
/** Cleanup coupled runtime resources after an auxiliary terminal is
|
|
56
|
+
* intentionally idle-reaped. Unexpected auxiliary exit does not call this. */
|
|
57
|
+
teardownAuxiliaryTerminalRuntime?(localThreadId: string): Promise<void>;
|
|
58
|
+
injectMessage?(localThreadId: string, input: RuntimeUserInput | string, options?: RuntimeTurnOptions): Promise<InjectResult>;
|
|
59
|
+
updateCollaborationMode?(localThreadId: string, mode: SessionCollaborationMode): Promise<void>;
|
|
45
60
|
interruptLive?(localThreadId: string): Promise<boolean>;
|
|
46
61
|
stopLiveCodexSession?(localThreadId: string, opts?: {
|
|
47
62
|
deferClaudeInteractionCleanup?: boolean;
|
|
48
63
|
}): void;
|
|
49
|
-
finalizeStoppedLiveSessions?(): void
|
|
64
|
+
finalizeStoppedLiveSessions?(): void | Promise<void>;
|
|
50
65
|
resolveInteraction?(localThreadId: string, interactionId: string, resolution: SessionInteractionResolution): Promise<ResolveInteractionResult>;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
66
|
+
/** Hand the session's tmux pane injector to the host (which doesn't own
|
|
67
|
+
* tmux). Claude uses it for messages; Codex uses it only for TUI-local
|
|
68
|
+
* controls that the app-server cannot resolve, such as the final Plan picker. */
|
|
53
69
|
attachTerminalInjector?(localThreadId: string, injector: TerminalInjector): void;
|
|
54
70
|
/** Internal Provider operation used only by MachineSessionService through
|
|
55
71
|
* RunnerManager. It is deliberately absent from public AgentCapabilities. */
|
|
@@ -65,21 +81,44 @@ export interface RunnerSessionDeps {
|
|
|
65
81
|
/** Invoked on a `shutdown` message (default: close transport). */
|
|
66
82
|
onShutdown?: () => void;
|
|
67
83
|
}
|
|
84
|
+
/** Delivery retry schedule: 1, 2, 4, 8, 16, 30, 30… seconds.
|
|
85
|
+
* Clamp before exponentiation so an indefinitely transient outage cannot
|
|
86
|
+
* overflow after thousands of attempts. */
|
|
87
|
+
export declare function mirrorRetryDelayMs(failedAttempt: number): number;
|
|
68
88
|
export declare class RunnerSession {
|
|
69
89
|
private readonly transport;
|
|
70
90
|
private readonly executor;
|
|
71
91
|
private readonly onShutdown;
|
|
72
92
|
/** Live terminals hosted by this session, and per-attach client handles. */
|
|
73
93
|
private readonly terminals;
|
|
94
|
+
private readonly preparations;
|
|
74
95
|
private readonly attachments;
|
|
75
96
|
private readonly attachmentThreadIds;
|
|
97
|
+
private readonly attachmentRoles;
|
|
76
98
|
private readonly traexStartupWatchers;
|
|
99
|
+
private readonly traexStartupGates;
|
|
100
|
+
private readonly traexUpdateWatchers;
|
|
101
|
+
private readonly traexStartupUpdateActivity;
|
|
102
|
+
private readonly codexStartupMonitors;
|
|
103
|
+
private readonly terminalWatchers;
|
|
77
104
|
/** Opens are async; a close received before attach resolves tombstones the id. */
|
|
78
105
|
private readonly pendingTerminalOpens;
|
|
79
106
|
private readonly cancelledTerminalOpens;
|
|
80
107
|
/** Session ids with a live codex forwarder started here (stopped on shutdown). */
|
|
81
108
|
private readonly liveIds;
|
|
109
|
+
private readonly mirrorQueues;
|
|
110
|
+
private readonly mirrorAcks;
|
|
111
|
+
private readonly mirrorImageAcks;
|
|
112
|
+
private readonly mirrorRetryWaiters;
|
|
113
|
+
private readonly rotationPublishAcks;
|
|
114
|
+
private readonly rotationAppliedAcks;
|
|
115
|
+
/** Provider name retained for asynchronous Terminal-exit diagnostics. */
|
|
116
|
+
private readonly liveRuntimes;
|
|
117
|
+
private readonly terminalStatuses;
|
|
118
|
+
private consecutiveMirrorFailures;
|
|
119
|
+
private mirrorDegraded;
|
|
82
120
|
private shuttingDown;
|
|
121
|
+
private shutdownPromise;
|
|
83
122
|
constructor({ transport, executor, onShutdown }: RunnerSessionDeps);
|
|
84
123
|
private handle;
|
|
85
124
|
private get liveProvider();
|
|
@@ -90,29 +129,67 @@ export declare class RunnerSession {
|
|
|
90
129
|
* new session AND tells the daemon to alias the runner (terminal transfer) so
|
|
91
130
|
* the new session stays injectable. */
|
|
92
131
|
private mirrorChannel;
|
|
132
|
+
private transferNativeSessionResources;
|
|
133
|
+
private enqueueMirror;
|
|
134
|
+
private sendMirroredEvent;
|
|
135
|
+
private deliverMirrorImageEvent;
|
|
136
|
+
private deliverMirrorImageTransportFrame;
|
|
137
|
+
private deliverMirrorEvent;
|
|
138
|
+
private noteMirrorDeliveryFailed;
|
|
139
|
+
private noteMirrorDeliveryRecovered;
|
|
140
|
+
private sendMirrorEventFrame;
|
|
141
|
+
private abandonMirrorDelivery;
|
|
142
|
+
private waitForMirrorRetry;
|
|
143
|
+
private cancelMirrorGeneration;
|
|
144
|
+
private rejectMirrorAcks;
|
|
145
|
+
private sendMirrorImageFrame;
|
|
146
|
+
private rejectMirrorImageAcks;
|
|
147
|
+
private sendRotationFrame;
|
|
148
|
+
private sendRotationAppliedFrame;
|
|
149
|
+
private rejectRotationAcks;
|
|
93
150
|
/**
|
|
94
|
-
* Eagerly bring up a session's codex-native live view
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* so the TUI is usable immediately and its turns mirror to chat.
|
|
151
|
+
* Eagerly bring up a session's codex-native live view. Fresh sessions connect
|
|
152
|
+
* the discovery listener before launching the detached TUI; known-thread
|
|
153
|
+
* resumes preload first, launch the replacement TUI, then start their
|
|
154
|
+
* persistent observer in the background.
|
|
99
155
|
*/
|
|
100
156
|
private ensureLive;
|
|
157
|
+
private monitorCodexThreadStartup;
|
|
158
|
+
private waitForTraexThreadStartup;
|
|
159
|
+
/** Discovery failure is terminal for this partial native launch. Publish the
|
|
160
|
+
* exact cause first so an in-flight injection wakes, then drop the observer
|
|
161
|
+
* and TUI so a later task retry creates a clean launch instead of reusing an
|
|
162
|
+
* already-rejected readiness promise. */
|
|
163
|
+
private failCodexThreadStartup;
|
|
101
164
|
private inject;
|
|
165
|
+
private updateCollaborationMode;
|
|
102
166
|
private interruptLive;
|
|
167
|
+
private reapTerminal;
|
|
103
168
|
/** Launch (idempotently) the session's codex TUI pane from the executor's
|
|
104
169
|
* `codexTerminalSpec`. Shares the `${id}-main` terminal id with `term.open`,
|
|
105
170
|
* so the web attach reuses the same detached pane. */
|
|
106
171
|
private launchCodexPane;
|
|
172
|
+
private watchNativeTerminal;
|
|
107
173
|
private cancelTraexStartupWatcher;
|
|
174
|
+
private cancelTraexUpdateWatcher;
|
|
175
|
+
/** Observe update-only startup screens independently from prompt handling.
|
|
176
|
+
* The low-frequency capture spans the full normal discovery window and only
|
|
177
|
+
* remains alive longer after a positively identified update. */
|
|
178
|
+
private watchTraexStartupUpdates;
|
|
108
179
|
private skipTraexStartupPrompts;
|
|
109
180
|
private stopLive;
|
|
110
181
|
/** Stop event forwarding, kill native terminals/hooks, then synchronously
|
|
111
182
|
* scrub provider handoff files before the child process is allowed to exit. */
|
|
112
|
-
shutdown(): void
|
|
183
|
+
shutdown(): Promise<void>;
|
|
113
184
|
private openTerminal;
|
|
114
|
-
/**
|
|
185
|
+
/** Prepare captured history without starting the live control client. */
|
|
115
186
|
private attachExisting;
|
|
187
|
+
private readTerminalSeed;
|
|
188
|
+
private startTerminal;
|
|
189
|
+
private readTerminalOutput;
|
|
190
|
+
private writeTerminalInput;
|
|
191
|
+
private resizeTerminal;
|
|
192
|
+
private sendTerminalOperationError;
|
|
116
193
|
private runCap;
|
|
117
194
|
private dispatchCap;
|
|
118
195
|
}
|