@myagentroam/node 0.1.2 → 0.1.4
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-agent-sdk.d.ts +1 -15
- package/dist/claude-agent-sdk.js +9 -77
- package/dist/claude-agent-sdk.js.map +1 -1
- package/dist/codex-app-server.d.ts +4 -0
- package/dist/codex-app-server.js +18 -4
- package/dist/codex-app-server.js.map +1 -1
- package/dist/connector/node-connector-options.d.ts +23 -0
- package/dist/connector/node-connector-options.js +2 -0
- package/dist/connector/node-connector-options.js.map +1 -0
- package/dist/connector/node-operation-router.d.ts +9 -0
- package/dist/connector/node-operation-router.js +23 -0
- package/dist/connector/node-operation-router.js.map +1 -0
- package/dist/connector.d.ts +59 -353
- package/dist/connector.js +614 -5936
- package/dist/connector.js.map +1 -1
- package/dist/control-outbound-scheduler.d.ts +26 -0
- package/dist/control-outbound-scheduler.js +122 -0
- package/dist/control-outbound-scheduler.js.map +1 -0
- package/dist/database.js +1 -1
- package/dist/database.js.map +1 -1
- package/dist/native-jsonl-reader.d.ts +14 -0
- package/dist/native-jsonl-reader.js +98 -0
- package/dist/native-jsonl-reader.js.map +1 -0
- package/dist/native-session-history.d.ts +22 -3
- package/dist/native-session-history.js +281 -157
- package/dist/native-session-history.js.map +1 -1
- package/dist/runner/abstract-runner.d.ts +148 -0
- package/dist/runner/abstract-runner.js +139 -0
- package/dist/runner/abstract-runner.js.map +1 -0
- package/dist/runner/claude/managed-run-controller.d.ts +52 -0
- package/dist/runner/claude/managed-run-controller.js +307 -0
- package/dist/runner/claude/managed-run-controller.js.map +1 -0
- package/dist/runner/claude-code-runner.d.ts +68 -0
- package/dist/runner/claude-code-runner.js +268 -0
- package/dist/runner/claude-code-runner.js.map +1 -0
- package/dist/runner/codex/conversation-parser.d.ts +61 -0
- package/dist/runner/codex/conversation-parser.js +676 -0
- package/dist/runner/codex/conversation-parser.js.map +1 -0
- package/dist/runner/codex/managed-run-controller.d.ts +79 -0
- package/dist/runner/codex/managed-run-controller.js +379 -0
- package/dist/runner/codex/managed-run-controller.js.map +1 -0
- package/dist/runner/codex-runner.d.ts +81 -0
- package/dist/runner/codex-runner.js +342 -0
- package/dist/runner/codex-runner.js.map +1 -0
- package/dist/runner/fake-test-runner.d.ts +26 -0
- package/dist/runner/fake-test-runner.js +48 -0
- package/dist/runner/fake-test-runner.js.map +1 -0
- package/dist/runner/runner-registry.d.ts +17 -0
- package/dist/runner/runner-registry.js +66 -0
- package/dist/runner/runner-registry.js.map +1 -0
- package/dist/runner-command-engine.d.ts +9 -0
- package/dist/runner-command-engine.js +24 -0
- package/dist/runner-command-engine.js.map +1 -1
- package/dist/runner-profiles.js +12 -0
- package/dist/runner-profiles.js.map +1 -1
- package/dist/runner-usage.d.ts +2 -2
- package/dist/runner-usage.js +3 -5
- package/dist/runner-usage.js.map +1 -1
- package/dist/runtime-state.js +6 -5
- package/dist/runtime-state.js.map +1 -1
- package/dist/service/attachment-domain-state.d.ts +5 -0
- package/dist/service/attachment-domain-state.js +6 -0
- package/dist/service/attachment-domain-state.js.map +1 -0
- package/dist/service/conversation-history-service.d.ts +34 -0
- package/dist/service/conversation-history-service.js +159 -0
- package/dist/service/conversation-history-service.js.map +1 -0
- package/dist/service/external-session-resume-service.d.ts +32 -0
- package/dist/service/external-session-resume-service.js +99 -0
- package/dist/service/external-session-resume-service.js.map +1 -0
- package/dist/service/fake-managed-run-service.d.ts +29 -0
- package/dist/service/fake-managed-run-service.js +63 -0
- package/dist/service/fake-managed-run-service.js.map +1 -0
- package/dist/service/managed-runner-session-service.d.ts +10 -0
- package/dist/service/managed-runner-session-service.js +31 -0
- package/dist/service/managed-runner-session-service.js.map +1 -0
- package/dist/service/native-session-projection-service.d.ts +50 -0
- package/dist/service/native-session-projection-service.js +268 -0
- package/dist/service/native-session-projection-service.js.map +1 -0
- package/dist/service/native-session-watch-service.d.ts +37 -0
- package/dist/service/native-session-watch-service.js +151 -0
- package/dist/service/native-session-watch-service.js.map +1 -0
- package/dist/service/node-connection-lifecycle-service.d.ts +37 -0
- package/dist/service/node-connection-lifecycle-service.js +84 -0
- package/dist/service/node-connection-lifecycle-service.js.map +1 -0
- package/dist/service/node-control-channel.d.ts +32 -0
- package/dist/service/node-control-channel.js +84 -0
- package/dist/service/node-control-channel.js.map +1 -0
- package/dist/service/node-control-message-service.d.ts +28 -0
- package/dist/service/node-control-message-service.js +105 -0
- package/dist/service/node-control-message-service.js.map +1 -0
- package/dist/service/node-request-service.d.ts +14 -0
- package/dist/service/node-request-service.js +51 -0
- package/dist/service/node-request-service.js.map +1 -0
- package/dist/service/node-run-event-bridge.d.ts +38 -0
- package/dist/service/node-run-event-bridge.js +80 -0
- package/dist/service/node-run-event-bridge.js.map +1 -0
- package/dist/service/node-terminal-channel.d.ts +29 -0
- package/dist/service/node-terminal-channel.js +176 -0
- package/dist/service/node-terminal-channel.js.map +1 -0
- package/dist/service/node-workspace-coordinator.d.ts +32 -0
- package/dist/service/node-workspace-coordinator.js +81 -0
- package/dist/service/node-workspace-coordinator.js.map +1 -0
- package/dist/service/run-attachment-service.d.ts +37 -0
- package/dist/service/run-attachment-service.js +161 -0
- package/dist/service/run-attachment-service.js.map +1 -0
- package/dist/service/run-domain-state.d.ts +4 -0
- package/dist/service/run-domain-state.js +5 -0
- package/dist/service/run-domain-state.js.map +1 -0
- package/dist/service/run-event-service.d.ts +31 -0
- package/dist/service/run-event-service.js +103 -0
- package/dist/service/run-event-service.js.map +1 -0
- package/dist/service/run-workbench-service.d.ts +27 -0
- package/dist/service/run-workbench-service.js +114 -0
- package/dist/service/run-workbench-service.js.map +1 -0
- package/dist/service/runner-channel-message-service.d.ts +13 -0
- package/dist/service/runner-channel-message-service.js +21 -0
- package/dist/service/runner-channel-message-service.js.map +1 -0
- package/dist/service/runner-interaction-service.d.ts +40 -0
- package/dist/service/runner-interaction-service.js +245 -0
- package/dist/service/runner-interaction-service.js.map +1 -0
- package/dist/service/runner-service.d.ts +43 -0
- package/dist/service/runner-service.js +55 -0
- package/dist/service/runner-service.js.map +1 -0
- package/dist/service/session-catalog-service.d.ts +30 -0
- package/dist/service/session-catalog-service.js +145 -0
- package/dist/service/session-catalog-service.js.map +1 -0
- package/dist/service/session-command-service.d.ts +23 -0
- package/dist/service/session-command-service.js +70 -0
- package/dist/service/session-command-service.js.map +1 -0
- package/dist/service/session-context-service.d.ts +34 -0
- package/dist/service/session-context-service.js +88 -0
- package/dist/service/session-context-service.js.map +1 -0
- package/dist/service/session-domain-state.d.ts +8 -0
- package/dist/service/session-domain-state.js +9 -0
- package/dist/service/session-domain-state.js.map +1 -0
- package/dist/service/session-identity-service.d.ts +24 -0
- package/dist/service/session-identity-service.js +87 -0
- package/dist/service/session-identity-service.js.map +1 -0
- package/dist/service/session-lifecycle-service.d.ts +31 -0
- package/dist/service/session-lifecycle-service.js +236 -0
- package/dist/service/session-lifecycle-service.js.map +1 -0
- package/dist/service/session-message-service.d.ts +33 -0
- package/dist/service/session-message-service.js +158 -0
- package/dist/service/session-message-service.js.map +1 -0
- package/dist/service/session-presentation-service.d.ts +33 -0
- package/dist/service/session-presentation-service.js +37 -0
- package/dist/service/session-presentation-service.js.map +1 -0
- package/dist/service/session-query-service.d.ts +31 -0
- package/dist/service/session-query-service.js +78 -0
- package/dist/service/session-query-service.js.map +1 -0
- package/dist/service/terminal-relay-state.d.ts +6 -0
- package/dist/service/terminal-relay-state.js +4 -0
- package/dist/service/terminal-relay-state.js.map +1 -0
- package/dist/service/terminal-service.d.ts +12 -0
- package/dist/service/terminal-service.js +53 -0
- package/dist/service/terminal-service.js.map +1 -0
- package/dist/service/workbench-event-service.d.ts +21 -0
- package/dist/service/workbench-event-service.js +54 -0
- package/dist/service/workbench-event-service.js.map +1 -0
- package/dist/service/workbench-manifest-service.d.ts +88 -0
- package/dist/service/workbench-manifest-service.js +69 -0
- package/dist/service/workbench-manifest-service.js.map +1 -0
- package/dist/service/workspace-change-service.d.ts +9 -0
- package/dist/service/workspace-change-service.js +86 -0
- package/dist/service/workspace-change-service.js.map +1 -0
- package/dist/service/workspace-domain-state.d.ts +75 -0
- package/dist/service/workspace-domain-state.js +41 -0
- package/dist/service/workspace-domain-state.js.map +1 -0
- package/dist/service/workspace-file-service.d.ts +14 -0
- package/dist/service/workspace-file-service.js +77 -0
- package/dist/service/workspace-file-service.js.map +1 -0
- package/dist/service/workspace-queue-workbench-service.d.ts +55 -0
- package/dist/service/workspace-queue-workbench-service.js +227 -0
- package/dist/service/workspace-queue-workbench-service.js.map +1 -0
- package/dist/service/workspace-service.d.ts +15 -0
- package/dist/service/workspace-service.js +54 -0
- package/dist/service/workspace-service.js.map +1 -0
- package/dist/service/workspace-session-service.d.ts +23 -0
- package/dist/service/workspace-session-service.js +140 -0
- package/dist/service/workspace-session-service.js.map +1 -0
- package/dist/service/workspace-upload-service.d.ts +37 -0
- package/dist/service/workspace-upload-service.js +241 -0
- package/dist/service/workspace-upload-service.js.map +1 -0
- package/dist/service/workspace-watch-service.d.ts +18 -0
- package/dist/service/workspace-watch-service.js +121 -0
- package/dist/service/workspace-watch-service.js.map +1 -0
- package/dist/service/workspace-workbench-service.d.ts +38 -0
- package/dist/service/workspace-workbench-service.js +156 -0
- package/dist/service/workspace-workbench-service.js.map +1 -0
- package/dist/terminal.d.ts +1 -0
- package/dist/terminal.js +1 -1
- package/dist/terminal.js.map +1 -1
- package/dist/util/node-operation-parsers.d.ts +91 -0
- package/dist/util/node-operation-parsers.js +380 -0
- package/dist/util/node-operation-parsers.js.map +1 -0
- package/dist/util/runner-native-session-parsers.d.ts +72 -0
- package/dist/util/runner-native-session-parsers.js +337 -0
- package/dist/util/runner-native-session-parsers.js.map +1 -0
- package/dist/util/secret-environment.d.ts +1 -0
- package/dist/util/secret-environment.js +26 -0
- package/dist/util/secret-environment.js.map +1 -0
- package/dist/workspace.d.ts +9 -2
- package/dist/workspace.js +41 -0
- package/dist/workspace.js.map +1 -1
- package/package.json +2 -2
package/dist/connector.d.ts
CHANGED
|
@@ -1,44 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { CodexAppServerClient } from './codex-app-server.js';
|
|
5
|
-
import { ClaudeAgentSdkAdapter } from './claude-agent-sdk.js';
|
|
6
|
-
import { NodeDatabase } from './database.js';
|
|
7
|
-
import { TerminalManager } from './terminal.js';
|
|
8
|
-
import { RunnerUsageReader } from './runner-usage.js';
|
|
1
|
+
import type { NodeConnectorOptions } from './connector/node-connector-options.js';
|
|
2
|
+
export type { NodeConnectorOptions } from './connector/node-connector-options.js';
|
|
3
|
+
export { nodeConnectEndpoint, validatedCapabilities } from './runner/codex/conversation-parser.js';
|
|
9
4
|
export declare function nextReconnectDelay(attempt: number): number;
|
|
10
|
-
export interface NodeConnectorOptions {
|
|
11
|
-
readonly configPath?: string;
|
|
12
|
-
readonly config?: NodeConfig;
|
|
13
|
-
readonly capabilities?: NodeCapabilities;
|
|
14
|
-
/** Test injection only; production probes the local Runner commands. */
|
|
15
|
-
readonly capabilityDetector?: () => NodeCapabilities | Promise<NodeCapabilities>;
|
|
16
|
-
readonly reconnect?: boolean;
|
|
17
|
-
/** Test injection only; production capability reporting remains unchanged. */
|
|
18
|
-
readonly fakeRunner?: FakeRunner;
|
|
19
|
-
readonly fakeScript?: (input: unknown, runId: string) => readonly FakeRunnerStep[];
|
|
20
|
-
readonly codexClient?: CodexAppServerClient;
|
|
21
|
-
/** Test injection only; the default uses the official Claude Agent SDK. */
|
|
22
|
-
readonly claudeClient?: ClaudeAgentSdkAdapter;
|
|
23
|
-
/** Test injection; production opens the SQLite path from NodeConfig. */
|
|
24
|
-
readonly database?: NodeDatabase;
|
|
25
|
-
/** Test-only override. Production approvals always have a ten-minute expiry. */
|
|
26
|
-
readonly claudeApprovalTimeoutMs?: number;
|
|
27
|
-
/** Test injection; production uses node-pty/ConPTY through TerminalManager. */
|
|
28
|
-
readonly terminalManager?: TerminalManager;
|
|
29
|
-
/** Test injection; production reads OAuth credentials only on the local Node. */
|
|
30
|
-
readonly runnerUsageReader?: RunnerUsageReader;
|
|
31
|
-
}
|
|
32
5
|
export declare class NodeConnector {
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
private terminalReconnectTimer;
|
|
40
|
-
private attempts;
|
|
41
|
-
private terminalAttempts;
|
|
6
|
+
private readonly controlChannel;
|
|
7
|
+
private readonly controlMessages;
|
|
8
|
+
private readonly nodeRequests;
|
|
9
|
+
private readonly connectionLifecycle;
|
|
10
|
+
/** @internal Existing contract tests inject their socket through this boundary. */
|
|
11
|
+
private set socket(value);
|
|
42
12
|
private stopped;
|
|
43
13
|
private config;
|
|
44
14
|
private readonly capabilitiesProvided;
|
|
@@ -47,335 +17,71 @@ export declare class NodeConnector {
|
|
|
47
17
|
private readonly configPath;
|
|
48
18
|
private readonly reconnect;
|
|
49
19
|
private readonly claudeApprovalTimeoutMs;
|
|
50
|
-
private readonly
|
|
51
|
-
/** A global sequence lets one Admin page merge every business callback. */
|
|
52
|
-
private workbenchEventSequence;
|
|
53
|
-
/** Bounded process-local history used only to bridge a browser reconnect. */
|
|
54
|
-
private readonly workbenchEvents;
|
|
20
|
+
private readonly workbenchEventService;
|
|
55
21
|
private readonly fakeRunner;
|
|
56
22
|
private readonly fakeScript;
|
|
57
|
-
private readonly
|
|
58
|
-
|
|
59
|
-
private readonly
|
|
60
|
-
private readonly
|
|
61
|
-
private readonly
|
|
62
|
-
|
|
63
|
-
private readonly
|
|
64
|
-
|
|
65
|
-
private readonly
|
|
66
|
-
private readonly
|
|
67
|
-
private readonly
|
|
68
|
-
|
|
69
|
-
private readonly
|
|
70
|
-
|
|
71
|
-
private readonly
|
|
72
|
-
|
|
73
|
-
private readonly
|
|
74
|
-
|
|
75
|
-
private readonly runAttachmentDirectories;
|
|
23
|
+
private readonly runState;
|
|
24
|
+
private readonly runEventBridge;
|
|
25
|
+
private readonly workspaceCoordinator;
|
|
26
|
+
private readonly sessionState;
|
|
27
|
+
private readonly sessionIdentityService;
|
|
28
|
+
private readonly nativeSessionProjectionService;
|
|
29
|
+
private readonly conversationHistoryService;
|
|
30
|
+
private readonly runnerInteractionService;
|
|
31
|
+
private readonly runnerChannelMessages;
|
|
32
|
+
private readonly managedRunnerSessions;
|
|
33
|
+
private readonly sessionPresentationService;
|
|
34
|
+
private readonly sessionLifecycleService;
|
|
35
|
+
private readonly externalSessionResumeService;
|
|
36
|
+
private readonly sessionMessageService;
|
|
37
|
+
private readonly sessionCatalogService;
|
|
38
|
+
private readonly sessionCommandService;
|
|
39
|
+
private readonly runAttachmentService;
|
|
40
|
+
private readonly terminalChannel;
|
|
76
41
|
private readonly codexClient;
|
|
77
|
-
private readonly
|
|
78
|
-
/** App Server turn ID → current-process managed Run; never persisted. */
|
|
79
|
-
private readonly managedCodexTurns;
|
|
80
|
-
private readonly codexApprovals;
|
|
81
|
-
private readonly codexUserInputs;
|
|
42
|
+
private readonly codexRunController;
|
|
82
43
|
private readonly claudeClient;
|
|
83
|
-
private readonly
|
|
84
|
-
|
|
85
|
-
private readonly
|
|
86
|
-
|
|
87
|
-
private readonly
|
|
88
|
-
|
|
89
|
-
private readonly
|
|
90
|
-
|
|
91
|
-
private readonly
|
|
92
|
-
|
|
93
|
-
private readonly
|
|
94
|
-
/** Maps a direct external projection to its process-local resumed session for message retries. */
|
|
95
|
-
private readonly resumedSessionByDirectId;
|
|
96
|
-
/** Last rejected explicit takeover reason for an external direct projection. */
|
|
97
|
-
private readonly externalResumeFailures;
|
|
98
|
-
/** Bounded Runner diagnostic paired with a fixed external resume reason code. */
|
|
99
|
-
private readonly externalResumeFailureDetails;
|
|
100
|
-
private readonly claudeApprovals;
|
|
44
|
+
private readonly claudeRunController;
|
|
45
|
+
private readonly runners;
|
|
46
|
+
private readonly sessionContextService;
|
|
47
|
+
private readonly runWorkbenchService;
|
|
48
|
+
private readonly sessionQueryService;
|
|
49
|
+
private readonly workspaceQueueWorkbenchService;
|
|
50
|
+
private readonly operationRouter;
|
|
51
|
+
private readonly runnerService;
|
|
52
|
+
private readonly workbenchManifestService;
|
|
53
|
+
private readonly terminalService;
|
|
54
|
+
private readonly workspaceService;
|
|
101
55
|
private readonly commandStates;
|
|
102
56
|
private readonly runnerUsageReader;
|
|
103
|
-
private codexFastEnabled;
|
|
104
57
|
private readonly terminalManager;
|
|
105
|
-
private readonly
|
|
106
|
-
|
|
107
|
-
private readonly
|
|
108
|
-
|
|
109
|
-
private readonly
|
|
110
|
-
|
|
111
|
-
private readonly
|
|
112
|
-
private readonly workspaceChangesCache;
|
|
113
|
-
private readonly workspaceChangesVersions;
|
|
114
|
-
private readonly workspaceFileIndexes;
|
|
115
|
-
/** Tab-scoped Workspace observation leases; no state survives a Node restart. */
|
|
116
|
-
private readonly workspaceWatches;
|
|
117
|
-
private readonly workspaceWatchRevisions;
|
|
118
|
-
private readonly workspaceSessionWatchTimers;
|
|
119
|
-
private readonly workspaceSessionWatchSignatures;
|
|
120
|
-
private readonly workspaceSessionWatchReads;
|
|
121
|
-
/** Runner-native session discovery is expensive; cache only its short-lived baseline. */
|
|
122
|
-
private readonly workspaceSessionCache;
|
|
123
|
-
private readonly workspaceSessionCacheReads;
|
|
124
|
-
private readonly workspaceChangesLimiter;
|
|
58
|
+
private readonly workspaceState;
|
|
59
|
+
private readonly workspaceWatchService;
|
|
60
|
+
private readonly workspaceSessionService;
|
|
61
|
+
private readonly workspaceFileService;
|
|
62
|
+
private readonly workspaceUploadService;
|
|
63
|
+
private readonly workspaceChangeService;
|
|
64
|
+
private readonly workspaceWorkbenchService;
|
|
125
65
|
private database;
|
|
126
66
|
/** Runtime/session state is intentionally not persisted to Node SQLite. */
|
|
127
67
|
private readonly runtime;
|
|
128
68
|
private readonly metrics;
|
|
69
|
+
private readonly runEventService;
|
|
70
|
+
private readonly nativeSessionWatchService;
|
|
129
71
|
constructor(options?: NodeConnectorOptions);
|
|
130
72
|
start(): Promise<void>;
|
|
131
73
|
stop(): void;
|
|
132
|
-
|
|
133
|
-
private
|
|
134
|
-
private
|
|
135
|
-
private
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
private connectTerminal;
|
|
143
|
-
private scheduleTerminalReconnect;
|
|
144
|
-
private handleTerminalMessage;
|
|
145
|
-
private publishTerminalFrame;
|
|
146
|
-
private sendTerminalFrame;
|
|
147
|
-
private sendTerminal;
|
|
148
|
-
private handleMessage;
|
|
149
|
-
private connected;
|
|
150
|
-
/** Executes only the closed Admin-facing operation set forwarded by Server. */
|
|
151
|
-
private handleNodeRequest;
|
|
74
|
+
/** @internal Thin compatibility delegates; all behavior remains in the extracted services. */
|
|
75
|
+
private readonly handleMessage;
|
|
76
|
+
private readonly emitRunEvent;
|
|
77
|
+
private readonly emitConversationItem;
|
|
78
|
+
private readonly emitWorkbenchEvent;
|
|
79
|
+
private readonly discoverWorkspaceSessions;
|
|
80
|
+
private readonly invalidateWorkspaceWatchTopics;
|
|
81
|
+
private readonly reconcilePersistedRuns;
|
|
82
|
+
private readonly startCapabilityRefresh;
|
|
83
|
+
private readonly refreshCapabilities;
|
|
152
84
|
private executeNodeOperation;
|
|
153
|
-
private requireWorkspace;
|
|
154
|
-
private parseWorkspaceWatchTopics;
|
|
155
|
-
private workspaceWatchKey;
|
|
156
|
-
private workspaceWatchSessionHash;
|
|
157
|
-
private createWorkspaceWatch;
|
|
158
|
-
private renewWorkspaceWatch;
|
|
159
|
-
private removeWorkspaceWatch;
|
|
160
|
-
private clearWorkspaceWatches;
|
|
161
|
-
private ensureWorkspaceSessionWatch;
|
|
162
|
-
private stopWorkspaceSessionWatch;
|
|
163
|
-
private cachedWorkspaceSessions;
|
|
164
|
-
private refreshWorkspaceSessionWatch;
|
|
165
|
-
private performWorkspaceSessionWatchRefresh;
|
|
166
|
-
private workspaceWatchTopicActive;
|
|
167
|
-
private invalidateWorkspaceWatchTopics;
|
|
168
|
-
private invalidateWorkspaceChanges;
|
|
169
|
-
private listFilesForWorkspace;
|
|
170
|
-
private readFileForWorkspace;
|
|
171
|
-
private searchFilesForWorkspace;
|
|
172
|
-
private workspaceFileIndex;
|
|
173
|
-
private preflightWorkspaceUploads;
|
|
174
|
-
private createWorkspaceUpload;
|
|
175
|
-
private writeWorkspaceUploadChunk;
|
|
176
|
-
private workspaceUploadStatus;
|
|
177
|
-
private completeWorkspaceUpload;
|
|
178
|
-
private cancelWorkspaceUpload;
|
|
179
|
-
private requireWorkspaceUpload;
|
|
180
|
-
private removeWorkspaceUpload;
|
|
181
|
-
private composerAttachmentTarget;
|
|
182
|
-
private resolveComposerAttachments;
|
|
183
|
-
private currentChangesForWorkspace;
|
|
184
|
-
private persistTerminalSession;
|
|
185
|
-
/**
|
|
186
|
-
* Discovers only the Codex sources that App Server itself identifies as CLI
|
|
187
|
-
* or VS Code. Discovery reads native history but never copies it into MAR's
|
|
188
|
-
* message table and never grants write control.
|
|
189
|
-
*/
|
|
190
|
-
private discoverCodexSessions;
|
|
191
|
-
private directClaudeSessions;
|
|
192
|
-
private listDirectNativeSessions;
|
|
193
|
-
private discoverWorkspaceSessions;
|
|
194
|
-
private resolveDirectNativeSession;
|
|
195
|
-
/**
|
|
196
|
-
* A rename is Node-local metadata, so an external transcript receives a
|
|
197
|
-
* process-local projection without resuming or taking control of its Runner.
|
|
198
|
-
*/
|
|
199
|
-
private createMetadataProjection;
|
|
200
|
-
/**
|
|
201
|
-
* Native Runner history does not reliably expose the Composer settings that
|
|
202
|
-
* should govern MAR's next Turn. A resumed projection therefore keeps an
|
|
203
|
-
* already-valid local choice, otherwise takes this Runner's saved Node
|
|
204
|
-
* default. Defaults never cross Runner boundaries.
|
|
205
|
-
*/
|
|
206
|
-
private resumedSessionConfiguration;
|
|
207
|
-
private ensureResumedSessionConfiguration;
|
|
208
|
-
private rememberDirectNativeSessions;
|
|
209
|
-
/** Returns exact native IDs of a managed Session, including verified Claude aliases only. */
|
|
210
|
-
private nativeSessionIdsForProjection;
|
|
211
|
-
/** Clears only projections proven to represent the just-deleted native transcripts. */
|
|
212
|
-
private forgetNativeSessionProjection;
|
|
213
|
-
private readDirectNativeHistory;
|
|
214
|
-
private readConversationHistoryPage;
|
|
215
|
-
private conversationHistoryPage;
|
|
216
|
-
private readOfficialCodexConversation;
|
|
217
|
-
private managedCodexTurn;
|
|
218
|
-
private refreshCodexExternalActivity;
|
|
219
|
-
private watchNativeSession;
|
|
220
|
-
private renewNativeSessionWatch;
|
|
221
|
-
private stopNativeSessionWatch;
|
|
222
|
-
private refreshWatchedSession;
|
|
223
|
-
private performWatchedSessionRefresh;
|
|
224
|
-
/**
|
|
225
|
-
* Resumes only an externally idle Codex thread. The final official read is
|
|
226
|
-
* intentionally adjacent to resume so an external active turn can never be
|
|
227
|
-
* raced into a MAR-controlled message.
|
|
228
|
-
*/
|
|
229
|
-
private resumeExternalCodexSession;
|
|
230
|
-
/**
|
|
231
|
-
* Claude's SDK has no cross-process activity status. A visible CLI history
|
|
232
|
-
* is therefore resumable on first message, but only after `sessionInfo`
|
|
233
|
-
* verifies the exact native ID and cwd. The map makes retries idempotently
|
|
234
|
-
* target the same process-local managed projection.
|
|
235
|
-
*/
|
|
236
|
-
private resumeExternalClaudeSession;
|
|
237
|
-
private clearExternalResumeFailure;
|
|
238
|
-
private setExternalResumeFailure;
|
|
239
|
-
private externalResumeFailure;
|
|
240
|
-
private resolveSessionForMessage;
|
|
241
|
-
private directNativeSession;
|
|
242
|
-
/** A pending Codex rename shields the UI from stale discovery until Runner confirms it. */
|
|
243
|
-
private nativeSessionRunnerTitle;
|
|
244
|
-
/** Runner-specific title persistence: Codex owns its thread name; Claude metadata is Node-local. */
|
|
245
|
-
private renameRunnerSession;
|
|
246
|
-
/**
|
|
247
|
-
* External sessions are followed from their append-only local transcript.
|
|
248
|
-
* A managed active Run is intentionally excluded: its durable projection is
|
|
249
|
-
* fed by the Runner event stream and is therefore the live authority.
|
|
250
|
-
*/
|
|
251
|
-
private hasManagedActiveRun;
|
|
252
|
-
private syncExternalTranscript;
|
|
253
|
-
private startFakeRun;
|
|
254
|
-
private startCodexRun;
|
|
255
|
-
private startClaudeRun;
|
|
256
|
-
private deliverClaudeChannelMessage;
|
|
257
|
-
/**
|
|
258
|
-
* `STEERED` means that the SDK AsyncIterable consumed the message, rather
|
|
259
|
-
* than merely accepting it into a Node-side queue. Reusing a client message
|
|
260
|
-
* ID is idempotent and never writes a second input to Claude.
|
|
261
|
-
*/
|
|
262
|
-
private deliverClaudeChannel;
|
|
263
|
-
private cancelCodexTurn;
|
|
264
|
-
private respondCodexUserInput;
|
|
265
|
-
/** Returns true when cancellation already made this Run terminal. */
|
|
266
|
-
private completeCancelledRun;
|
|
267
|
-
private presentSession;
|
|
268
|
-
/**
|
|
269
|
-
* Discovery always keeps the native record in the local cache so a stale
|
|
270
|
-
* direct ID remains readable, but the response must not reintroduce it in
|
|
271
|
-
* the Workbench once this process has already resumed that native session.
|
|
272
|
-
*/
|
|
273
|
-
private presentDiscoveredSessions;
|
|
274
|
-
/**
|
|
275
|
-
* Claude can report a native session ID distinct from the ID used to start
|
|
276
|
-
* a verified resume. Keep that observed ID as a process-local alias of the
|
|
277
|
-
* same managed projection, without treating a `conversation_reset` ID as
|
|
278
|
-
* an alias.
|
|
279
|
-
*/
|
|
280
|
-
private rememberManagedClaudeNativeSession;
|
|
281
|
-
/**
|
|
282
|
-
* Refresh the title once this Claude Session's own turn has flushed its
|
|
283
|
-
* native transcript. `externalSessionId` originates from that managed
|
|
284
|
-
* stream, never from a title-based discovery match.
|
|
285
|
-
*/
|
|
286
|
-
private syncManagedClaudeRunnerTitle;
|
|
287
|
-
/**
|
|
288
|
-
* Resolves a native discovery record only to its exact managed projection:
|
|
289
|
-
* same runner, same Workspace and same native Session ID. Claude's only
|
|
290
|
-
* exception is a Session ID observed from that managed SDK resume stream.
|
|
291
|
-
* A title is never an identity or matching input.
|
|
292
|
-
*/
|
|
293
|
-
private managedSessionForNativeRecord;
|
|
294
|
-
/**
|
|
295
|
-
* A custom-title projection can be external, but must still match the same
|
|
296
|
-
* native identity so session polling neither restores the old title nor
|
|
297
|
-
* inserts a duplicate direct record.
|
|
298
|
-
*/
|
|
299
|
-
private sessionProjectionForNativeRecord;
|
|
300
|
-
private isManagedProjectionForNativeRecord;
|
|
301
|
-
/**
|
|
302
|
-
* Context occupancy is an observed Runner fact. Codex persists its latest
|
|
303
|
-
* prompt/window pair in the native transcript; Claude exposes it through
|
|
304
|
-
* the official SDK control channel. Neither path estimates tokens in MAR.
|
|
305
|
-
*/
|
|
306
|
-
private readSessionContextUsage;
|
|
307
|
-
private probeClaudeContextUsage;
|
|
308
|
-
/** Executes only Node-declared interactions; the browser never supplies behavior. */
|
|
309
|
-
private executeRunnerCommand;
|
|
310
|
-
/** Claude `/compact` is a native SDK command, represented as a Run but never as a user bubble. */
|
|
311
|
-
private startClaudeCompaction;
|
|
312
|
-
/** Compaction is an App Server Turn, so keep a normal Run lifecycle for the Web spinner. */
|
|
313
|
-
private startCodexCompaction;
|
|
314
|
-
private runnerProfiles;
|
|
315
|
-
private workbenchManifest;
|
|
316
|
-
private resumeDelivery;
|
|
317
|
-
private requestClaudeApproval;
|
|
318
|
-
/**
|
|
319
|
-
* An approval is an individual Runner callback. Keep its exact payload in
|
|
320
|
-
* the process-local snapshot and emit a Run event so an already open
|
|
321
|
-
* Workbench refreshes immediately instead of waiting for a page reload.
|
|
322
|
-
*/
|
|
323
|
-
private publishApprovalRequest;
|
|
324
|
-
private emitRunEvent;
|
|
325
|
-
private enqueueTextDelta;
|
|
326
|
-
private flushTextDelta;
|
|
327
|
-
private emitRunEventNow;
|
|
328
|
-
/**
|
|
329
|
-
* Browser callbacks are multiplexed on one Admin Workbench connection. The
|
|
330
|
-
* Server adds the Node identity and never interprets this business payload.
|
|
331
|
-
*/
|
|
332
|
-
private emitWorkbenchEvent;
|
|
333
|
-
private workbenchPayloadSessionId;
|
|
334
|
-
private emitWorkspaceQueue;
|
|
335
|
-
/** Promote every Connector-owned Session key together with Runtime state. */
|
|
336
|
-
private promoteManagedSessionIdentity;
|
|
337
|
-
private waitForNativeSessionIdentity;
|
|
338
|
-
private rejectBootstrapSessionIdentity;
|
|
339
|
-
/**
|
|
340
|
-
* Shared replacement primitive for Ctrl+Enter and queue "execute now".
|
|
341
|
-
* The queued Run remains authoritative until the interrupted Run emits its
|
|
342
|
-
* terminal event and releases the Session lease.
|
|
343
|
-
*/
|
|
344
|
-
private replaceCurrentRunWithQueued;
|
|
345
|
-
private dispatchSessionQueue;
|
|
346
|
-
/** Let the operation response leave the Node before Runner callbacks can close or flood the socket. */
|
|
347
|
-
private scheduleSessionQueueDispatch;
|
|
348
|
-
private presentWorkspaceQueue;
|
|
349
|
-
private openQueuePauseWindow;
|
|
350
|
-
private clearQueuePauseWindow;
|
|
351
|
-
private materializeCodexAttachments;
|
|
352
|
-
/**
|
|
353
|
-
* Non-image Composer files are intentionally Workspace-visible so both
|
|
354
|
-
* runners can read the exact bytes with their normal file tools. Unlike
|
|
355
|
-
* Codex localImage files, these are not deleted on Run completion.
|
|
356
|
-
*/
|
|
357
|
-
private persistNonImageAttachments;
|
|
358
|
-
private cleanupRunAttachments;
|
|
359
|
-
/** Image bytes never enter conversation history. Keep them Node-local for one hour after Run end. */
|
|
360
|
-
private readonly runImageCache;
|
|
361
|
-
private cacheRunImages;
|
|
362
|
-
private readRunImage;
|
|
363
|
-
private expireRunImageCacheAfterTtl;
|
|
364
|
-
private clearRunImageCache;
|
|
365
|
-
/**
|
|
366
|
-
* Only send a bounded, user-readable projection. Raw SDK/JSON-RPC records
|
|
367
|
-
* and hidden reasoning must never cross this boundary into the Workbench.
|
|
368
|
-
*/
|
|
369
|
-
private emitConversationItem;
|
|
370
|
-
private handleCodexNotification;
|
|
371
|
-
private reconcileRuns;
|
|
372
|
-
/** A process restart cannot safely reattach a native in-flight SDK stream. */
|
|
373
|
-
private reconcilePersistedRuns;
|
|
374
|
-
private inspectWorkspace;
|
|
375
|
-
private captureRunSnapshot;
|
|
376
85
|
private send;
|
|
377
86
|
private sendEnvelope;
|
|
378
87
|
}
|
|
379
|
-
export declare function validatedCapabilities(value: unknown): NodeCapabilities;
|
|
380
|
-
export declare function nodeConnectEndpoint(serverUrl: string): string;
|
|
381
|
-
export declare function nodeTerminalConnectEndpoint(serverUrl: string): string;
|