@myagentroam/node 0.9.9 → 0.9.10

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.
Files changed (214) hide show
  1. package/dist/capabilities.js +2 -92
  2. package/dist/claude-agent-sdk.js +2 -330
  3. package/dist/claude-channel.js +2 -44
  4. package/dist/codex-app-server.js +2 -503
  5. package/dist/config.js +2 -56
  6. package/dist/connector/node-connector-options.js +2 -1
  7. package/dist/connector/node-operation-router.js +2 -22
  8. package/dist/connector.js +2 -845
  9. package/dist/control-outbound-scheduler.js +2 -154
  10. package/dist/database.js +2 -1418
  11. package/dist/event-buffer.js +2 -19
  12. package/dist/fake-runner.js +2 -129
  13. package/dist/health.js +2 -3
  14. package/dist/main.js +2 -54
  15. package/dist/migrations/v001.js +3 -144
  16. package/dist/migrations/v002.js +2 -143
  17. package/dist/migrations/v003.js +2 -44
  18. package/dist/migrations/v004.js +34 -30
  19. package/dist/native-jsonl-reader.js +2 -186
  20. package/dist/native-session-history.js +2 -1119
  21. package/dist/opencode-runtime.js +2 -80
  22. package/dist/opencode-server.js +2 -263
  23. package/dist/operational.js +2 -122
  24. package/dist/process-tree.js +2 -18
  25. package/dist/rotating-log.js +2 -67
  26. package/dist/runner/abstract-runner.js +2 -232
  27. package/dist/runner/claude/managed-run-controller.js +2 -345
  28. package/dist/runner/claude-code-runner.js +2 -303
  29. package/dist/runner/codex/composer-image-markers.js +2 -0
  30. package/dist/runner/codex/conversation-parser.js +2 -861
  31. package/dist/runner/codex/managed-run-controller.js +2 -460
  32. package/dist/runner/codex-runner.js +2 -628
  33. package/dist/runner/fake-test-runner.js +2 -47
  34. package/dist/runner/opencode/conversation-parser.js +2 -221
  35. package/dist/runner/opencode/managed-run-controller.js +2 -537
  36. package/dist/runner/opencode-runner.js +2 -448
  37. package/dist/runner/runner-registry.js +2 -90
  38. package/dist/runner-command-engine.js +2 -70
  39. package/dist/runner-profiles.js +2 -215
  40. package/dist/runner-usage.js +2 -190
  41. package/dist/runtime-command-detector.js +2 -73
  42. package/dist/runtime-state.js +2 -982
  43. package/dist/service/attachment-domain-state.js +2 -7
  44. package/dist/service/conversation-history-service.js +2 -457
  45. package/dist/service/conversation-segment-service.js +2 -162
  46. package/dist/service/external-session-resume-service.js +2 -118
  47. package/dist/service/fake-managed-run-service.js +2 -60
  48. package/dist/service/managed-runner-session-service.js +2 -35
  49. package/dist/service/mcp-installation-verifier.js +2 -87
  50. package/dist/service/mcp-node-operation-service.js +2 -90
  51. package/dist/service/mcp-package-installer.js +2 -136
  52. package/dist/service/native-session-projection-service.js +2 -280
  53. package/dist/service/native-session-watch-service.js +2 -383
  54. package/dist/service/node-connection-lifecycle-service.js +2 -84
  55. package/dist/service/node-control-channel.js +2 -85
  56. package/dist/service/node-control-message-service.js +2 -107
  57. package/dist/service/node-request-service.js +2 -52
  58. package/dist/service/node-run-event-bridge.js +2 -83
  59. package/dist/service/node-terminal-channel.js +2 -182
  60. package/dist/service/node-upgrade-coordinator.js +2 -137
  61. package/dist/service/node-workspace-coordinator.js +2 -70
  62. package/dist/service/recent-run-projection-service.js +2 -78
  63. package/dist/service/run-attachment-service.js +2 -194
  64. package/dist/service/run-domain-state.js +2 -4
  65. package/dist/service/run-event-service.js +2 -193
  66. package/dist/service/run-workbench-service.js +2 -104
  67. package/dist/service/runner-channel-message-service.js +2 -20
  68. package/dist/service/runner-interaction-service.js +2 -243
  69. package/dist/service/runner-service.js +2 -71
  70. package/dist/service/session-catalog-service.js +2 -224
  71. package/dist/service/session-command-service.js +2 -76
  72. package/dist/service/session-context-service.js +2 -101
  73. package/dist/service/session-domain-state.js +2 -9
  74. package/dist/service/session-identity-service.js +2 -86
  75. package/dist/service/session-lifecycle-service.js +2 -240
  76. package/dist/service/session-message-service.js +2 -173
  77. package/dist/service/session-presentation-service.js +2 -43
  78. package/dist/service/session-query-service.js +2 -82
  79. package/dist/service/skill-directory-service.js +2 -238
  80. package/dist/service/skill-install-service.js +2 -434
  81. package/dist/service/skill-node-operation-service.js +2 -206
  82. package/dist/service/terminal-relay-state.js +2 -3
  83. package/dist/service/terminal-service.js +2 -52
  84. package/dist/service/workbench-event-service.js +2 -19
  85. package/dist/service/workbench-manifest-service.js +2 -69
  86. package/dist/service/workspace-change-service.js +2 -86
  87. package/dist/service/workspace-content-search-service.js +2 -477
  88. package/dist/service/workspace-domain-state.js +2 -41
  89. package/dist/service/workspace-file-service.js +2 -122
  90. package/dist/service/workspace-git-exclude-service.js +2 -119
  91. package/dist/service/workspace-queue-workbench-service.js +2 -304
  92. package/dist/service/workspace-service.js +2 -69
  93. package/dist/service/workspace-session-service.js +2 -139
  94. package/dist/service/workspace-upload-service.js +2 -262
  95. package/dist/service/workspace-watch-service.js +2 -146
  96. package/dist/service/workspace-workbench-service.js +2 -405
  97. package/dist/service.js +2 -38
  98. package/dist/storage.js +2 -32
  99. package/dist/supervisor.js +2 -136
  100. package/dist/terminal.js +2 -416
  101. package/dist/util/node-operation-parsers.js +2 -382
  102. package/dist/util/personal-instructions.js +2 -31
  103. package/dist/util/runner-error.js +2 -52
  104. package/dist/util/runner-native-session-parsers.js +2 -490
  105. package/dist/util/safe-error.js +2 -5
  106. package/dist/util/secret-environment.js +2 -25
  107. package/dist/workspace.js +2 -1519
  108. package/package.json +3 -3
  109. package/dist/capabilities.d.ts +0 -12
  110. package/dist/claude-agent-sdk.d.ts +0 -92
  111. package/dist/claude-channel.d.ts +0 -28
  112. package/dist/codex-app-server.d.ts +0 -133
  113. package/dist/config.d.ts +0 -18
  114. package/dist/connector/node-connector-options.d.ts +0 -27
  115. package/dist/connector/node-operation-router.d.ts +0 -9
  116. package/dist/connector.d.ts +0 -94
  117. package/dist/control-outbound-scheduler.d.ts +0 -29
  118. package/dist/database.d.ts +0 -305
  119. package/dist/event-buffer.d.ts +0 -9
  120. package/dist/fake-runner.d.ts +0 -42
  121. package/dist/health.d.ts +0 -4
  122. package/dist/main.d.ts +0 -2
  123. package/dist/migrations/v001.d.ts +0 -3
  124. package/dist/migrations/v002.d.ts +0 -4
  125. package/dist/migrations/v003.d.ts +0 -4
  126. package/dist/migrations/v004.d.ts +0 -4
  127. package/dist/native-jsonl-reader.d.ts +0 -35
  128. package/dist/native-session-history.d.ts +0 -126
  129. package/dist/opencode-runtime.d.ts +0 -33
  130. package/dist/opencode-server.d.ts +0 -49
  131. package/dist/operational.d.ts +0 -39
  132. package/dist/process-tree.d.ts +0 -9
  133. package/dist/rotating-log.d.ts +0 -17
  134. package/dist/runner/abstract-runner.d.ts +0 -172
  135. package/dist/runner/claude/managed-run-controller.d.ts +0 -51
  136. package/dist/runner/claude-code-runner.d.ts +0 -72
  137. package/dist/runner/codex/conversation-parser.d.ts +0 -59
  138. package/dist/runner/codex/managed-run-controller.d.ts +0 -90
  139. package/dist/runner/codex-runner.d.ts +0 -103
  140. package/dist/runner/fake-test-runner.d.ts +0 -26
  141. package/dist/runner/opencode/conversation-parser.d.ts +0 -31
  142. package/dist/runner/opencode/managed-run-controller.d.ts +0 -82
  143. package/dist/runner/opencode-runner.d.ts +0 -71
  144. package/dist/runner/runner-registry.d.ts +0 -19
  145. package/dist/runner-command-engine.d.ts +0 -28
  146. package/dist/runner-profiles.d.ts +0 -15
  147. package/dist/runner-usage.d.ts +0 -33
  148. package/dist/runtime-command-detector.d.ts +0 -3
  149. package/dist/runtime-state.d.ts +0 -171
  150. package/dist/service/attachment-domain-state.d.ts +0 -7
  151. package/dist/service/conversation-history-service.d.ts +0 -43
  152. package/dist/service/conversation-segment-service.d.ts +0 -20
  153. package/dist/service/external-session-resume-service.d.ts +0 -34
  154. package/dist/service/fake-managed-run-service.d.ts +0 -28
  155. package/dist/service/managed-runner-session-service.d.ts +0 -12
  156. package/dist/service/mcp-installation-verifier.d.ts +0 -9
  157. package/dist/service/mcp-node-operation-service.d.ts +0 -11
  158. package/dist/service/mcp-package-installer.d.ts +0 -8
  159. package/dist/service/native-session-projection-service.d.ts +0 -52
  160. package/dist/service/native-session-watch-service.d.ts +0 -62
  161. package/dist/service/node-connection-lifecycle-service.d.ts +0 -36
  162. package/dist/service/node-control-channel.d.ts +0 -32
  163. package/dist/service/node-control-message-service.d.ts +0 -27
  164. package/dist/service/node-request-service.d.ts +0 -14
  165. package/dist/service/node-run-event-bridge.d.ts +0 -40
  166. package/dist/service/node-terminal-channel.d.ts +0 -29
  167. package/dist/service/node-upgrade-coordinator.d.ts +0 -29
  168. package/dist/service/node-workspace-coordinator.d.ts +0 -29
  169. package/dist/service/recent-run-projection-service.d.ts +0 -14
  170. package/dist/service/run-attachment-service.d.ts +0 -38
  171. package/dist/service/run-domain-state.d.ts +0 -4
  172. package/dist/service/run-event-service.d.ts +0 -33
  173. package/dist/service/run-workbench-service.d.ts +0 -25
  174. package/dist/service/runner-channel-message-service.d.ts +0 -13
  175. package/dist/service/runner-interaction-service.d.ts +0 -39
  176. package/dist/service/runner-service.d.ts +0 -46
  177. package/dist/service/session-catalog-service.d.ts +0 -45
  178. package/dist/service/session-command-service.d.ts +0 -24
  179. package/dist/service/session-context-service.d.ts +0 -35
  180. package/dist/service/session-domain-state.d.ts +0 -9
  181. package/dist/service/session-identity-service.d.ts +0 -24
  182. package/dist/service/session-lifecycle-service.d.ts +0 -31
  183. package/dist/service/session-message-service.d.ts +0 -33
  184. package/dist/service/session-presentation-service.d.ts +0 -34
  185. package/dist/service/session-query-service.d.ts +0 -35
  186. package/dist/service/skill-directory-service.d.ts +0 -20
  187. package/dist/service/skill-install-service.d.ts +0 -21
  188. package/dist/service/skill-node-operation-service.d.ts +0 -44
  189. package/dist/service/terminal-relay-state.d.ts +0 -6
  190. package/dist/service/terminal-service.d.ts +0 -12
  191. package/dist/service/workbench-event-service.d.ts +0 -9
  192. package/dist/service/workbench-manifest-service.d.ts +0 -90
  193. package/dist/service/workspace-change-service.d.ts +0 -9
  194. package/dist/service/workspace-content-search-service.d.ts +0 -14
  195. package/dist/service/workspace-domain-state.d.ts +0 -79
  196. package/dist/service/workspace-file-service.d.ts +0 -18
  197. package/dist/service/workspace-git-exclude-service.d.ts +0 -4
  198. package/dist/service/workspace-queue-workbench-service.d.ts +0 -86
  199. package/dist/service/workspace-service.d.ts +0 -15
  200. package/dist/service/workspace-session-service.d.ts +0 -23
  201. package/dist/service/workspace-upload-service.d.ts +0 -39
  202. package/dist/service/workspace-watch-service.d.ts +0 -23
  203. package/dist/service/workspace-workbench-service.d.ts +0 -58
  204. package/dist/service.d.ts +0 -4
  205. package/dist/storage.d.ts +0 -2
  206. package/dist/supervisor.d.ts +0 -1
  207. package/dist/terminal.d.ts +0 -133
  208. package/dist/util/node-operation-parsers.d.ts +0 -92
  209. package/dist/util/personal-instructions.d.ts +0 -2
  210. package/dist/util/runner-error.d.ts +0 -6
  211. package/dist/util/runner-native-session-parsers.d.ts +0 -74
  212. package/dist/util/safe-error.d.ts +0 -2
  213. package/dist/util/secret-environment.d.ts +0 -1
  214. package/dist/workspace.d.ts +0 -217
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@myagentroam/node",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "MyAgentRoam Node runtime CLI.",
5
5
  "type": "module",
6
6
  "files": [
7
- "dist",
7
+ "dist/**/*.js",
8
8
  "README.md"
9
9
  ],
10
10
  "bin": {
@@ -24,7 +24,7 @@
24
24
  "node-pty": "1.1.0",
25
25
  "ws": "^8.21.3",
26
26
  "zod": "4.4.3",
27
- "@myagentroam/protocol": "^0.9.9"
27
+ "@myagentroam/protocol": "^0.9.10"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/ws": "^8.18.1"
@@ -1,12 +0,0 @@
1
- import type { NodeCapabilities } from '@myagentroam/protocol';
2
- export declare function unavailableCapabilities(): NodeCapabilities;
3
- export declare function detectCapabilities(commands?: {
4
- readonly codex?: string;
5
- readonly claudeCode?: string;
6
- readonly openCode?: string;
7
- }): NodeCapabilities;
8
- export declare function detectCapabilitiesAsync(commands?: {
9
- readonly codex?: string;
10
- readonly claudeCode?: string;
11
- readonly openCode?: string;
12
- }): Promise<NodeCapabilities>;
@@ -1,92 +0,0 @@
1
- import { forkSession, type CanUseTool, type Options, type PermissionResult, type Query, type SDKMessage, type SDKSessionInfo, type SDKUserMessage, type SessionMessage } from '@anthropic-ai/claude-agent-sdk';
2
- export interface ClaudeCodeProbe {
3
- readonly available: boolean;
4
- readonly compatible: boolean;
5
- readonly version?: string;
6
- readonly authenticated: boolean;
7
- readonly channel: {
8
- readonly researchPreview: true;
9
- readonly requiresExplicitOptIn: true;
10
- readonly organizationPolicy: 'UNKNOWN';
11
- };
12
- }
13
- export interface ClaudeQueryInput {
14
- readonly prompt: string;
15
- readonly cwd: string;
16
- readonly resumeSessionId?: string;
17
- readonly model?: string | null;
18
- readonly effort?: string | null;
19
- readonly access?: string | null;
20
- readonly attachments?: readonly ClaudeImageAttachment[];
21
- readonly onPermission: CanUseTool;
22
- readonly onMessage: (message: SDKMessage) => void;
23
- readonly onChannelReply?: (content: string) => void;
24
- readonly environment?: Readonly<Record<string, string>>;
25
- readonly mcpServers?: NonNullable<Options['mcpServers']>;
26
- readonly personalInstructions?: string;
27
- }
28
- /** Image blocks accepted by the Claude Agent SDK message input. */
29
- export interface ClaudeImageAttachment {
30
- readonly mime: 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp';
31
- readonly dataBase64: string;
32
- }
33
- export interface ClaudeRunHandle {
34
- readonly completed: Promise<void>;
35
- interrupt(): Promise<void>;
36
- cancel(): void;
37
- }
38
- /** A live, SDK-owned session accepts input only after the SDK consumes it. */
39
- export interface ClaudeChannelRunHandle extends ClaudeRunHandle {
40
- deliver(content: string): Promise<void>;
41
- }
42
- /** The small injectable surface prevents tests from depending on authentication. */
43
- export interface ClaudeSdkBindings {
44
- readonly query: (input: {
45
- readonly prompt: string | AsyncIterable<SDKUserMessage>;
46
- readonly options: Options;
47
- }) => Query;
48
- readonly listSessions: (options: {
49
- readonly dir?: string;
50
- readonly includeWorktrees?: boolean;
51
- }) => Promise<SDKSessionInfo[]>;
52
- readonly getSessionInfo: (sessionId: string, options: {
53
- readonly dir?: string;
54
- }) => Promise<SDKSessionInfo | undefined>;
55
- readonly getSessionMessages: (sessionId: string, options: {
56
- readonly dir?: string;
57
- }) => Promise<SessionMessage[]>;
58
- readonly forkSession?: typeof forkSession;
59
- }
60
- /**
61
- * Adapter for the supported Agent SDK APIs only. It neither parses nor writes
62
- * Claude JSONL transcripts. A caller must serialize resume operations itself.
63
- */
64
- export declare class ClaudeAgentSdkAdapter {
65
- private readonly sdk;
66
- constructor(sdk?: ClaudeSdkBindings);
67
- start(input: ClaudeQueryInput): ClaudeRunHandle;
68
- /**
69
- * Opens one managed SDK stream and leaves it alive for verified Channel
70
- * input. This is never used for foreign CLI/VS Code sessions.
71
- */
72
- startChannel(input: ClaudeQueryInput): ClaudeChannelRunHandle;
73
- private startWithPrompt;
74
- listSessions(cwd: string): Promise<SDKSessionInfo[]>;
75
- readSession(sessionId: string, cwd: string): Promise<SessionMessage[]>;
76
- forkSession(sessionId: string, cwd: string, upToMessageId: string, title: string): Promise<string>;
77
- sessionInfo(sessionId: string, cwd: string): Promise<SDKSessionInfo | undefined>;
78
- /**
79
- * The SDK publishes the authoritative, session-specific command list in its
80
- * first system/init record. Keep the input stream empty and stop as soon as
81
- * that record arrives so discovery never submits a user prompt.
82
- */
83
- discoverSlashCommands(cwd: string): Promise<readonly string[]>;
84
- }
85
- /**
86
- * Channel availability deliberately remains conservative. The CLI does not
87
- * expose an API to read organization allowlists, so a successful executable
88
- * probe must never be interpreted as permission to activate a channel.
89
- */
90
- export declare function probeClaudeCode(command?: string): ClaudeCodeProbe;
91
- export declare function probeClaudeCodeAsync(command?: string): Promise<ClaudeCodeProbe>;
92
- export declare function denyPermission(message?: string): PermissionResult;
@@ -1,28 +0,0 @@
1
- export type ChannelDelivery = 'PENDING_RECEIPT' | 'STEERED' | 'QUEUED_NEXT_TURN' | 'REJECTED';
2
- export interface ClaudeChannelMessage {
3
- readonly id: string;
4
- readonly senderId: string;
5
- readonly token: string;
6
- readonly content: string;
7
- }
8
- export interface ClaudeChannelReceipt {
9
- readonly messageId: string;
10
- readonly result: Exclude<ChannelDelivery, 'PENDING_RECEIPT'>;
11
- }
12
- /**
13
- * Per-session authorization and receipt bookkeeping for a Channel MCP plugin.
14
- * A transport may acknowledge only that it wrote an event; callers must wait
15
- * for acknowledge() before displaying a steering success.
16
- */
17
- export declare class ClaudeChannelGate {
18
- readonly sessionId: string;
19
- readonly token: string;
20
- private readonly expiresAt;
21
- private readonly now;
22
- private readonly allowedSenders;
23
- private readonly deliveries;
24
- constructor(sessionId: string, token?: string, senders?: readonly string[], expiresAt?: number, now?: () => number);
25
- accept(message: ClaudeChannelMessage): ChannelDelivery;
26
- acknowledge(receipt: ClaudeChannelReceipt): ChannelDelivery;
27
- delivery(messageId: string): ChannelDelivery | undefined;
28
- }
@@ -1,133 +0,0 @@
1
- import { type ChildProcessWithoutNullStreams } from 'node:child_process';
2
- export interface CodexProbe {
3
- readonly available: boolean;
4
- readonly version?: string;
5
- readonly compatible: boolean;
6
- }
7
- /**
8
- * The visible control state of a Codex thread. This deliberately models a
9
- * verified transport, not a guess based on a transcript file.
10
- */
11
- export type CodexSessionControlLevel = 'MANAGED' | 'SHARED_CONTROL' | 'OBSERVE_ONLY' | 'RESUMABLE' | 'UNAVAILABLE';
12
- export interface CodexSessionControl {
13
- readonly level: CodexSessionControlLevel;
14
- readonly capabilities: readonly ('history.read' | 'events.live' | 'turn.start' | 'turn.steer' | 'turn.interrupt')[];
15
- }
16
- /**
17
- * Maps the facts that the Node can actually establish to user-visible
18
- * controls. In particular, seeing an external thread never implies that it
19
- * is safe to write to its active turn.
20
- */
21
- export declare function codexSessionControl(input: {
22
- readonly available: boolean;
23
- readonly nativeThreadId: string | null;
24
- readonly nativeControl: 'MAR_MANAGED' | 'EXTERNAL';
25
- readonly activeTurn: boolean;
26
- readonly sharedControl?: boolean;
27
- }): CodexSessionControl;
28
- export interface JsonRpcNotification {
29
- readonly method: string;
30
- readonly params: unknown;
31
- readonly requestId?: string | number;
32
- }
33
- export interface CodexAppServerOptions {
34
- readonly command?: string;
35
- readonly args?: readonly string[];
36
- readonly cwd?: string;
37
- readonly timeoutMs?: number;
38
- /** `auto` uses a private Unix socket on Linux and stdio on Windows. */
39
- readonly transport?: 'auto' | 'stdio' | 'unix';
40
- readonly socketPath?: string;
41
- readonly spawnProcess?: (command: string, args: readonly string[], options: {
42
- readonly cwd?: string;
43
- readonly env?: NodeJS.ProcessEnv;
44
- }) => ChildProcessWithoutNullStreams;
45
- }
46
- export interface CodexRunConfiguration {
47
- readonly model?: string | null;
48
- readonly effort?: string | null;
49
- readonly access?: string | null;
50
- readonly serviceTier?: 'fast';
51
- readonly collaborationMode?: 'default' | 'plan';
52
- readonly mcpServers?: unknown;
53
- readonly developerInstructions?: string;
54
- }
55
- interface CodexRpcErrorPayload {
56
- readonly code?: unknown;
57
- readonly message?: unknown;
58
- readonly data?: unknown;
59
- }
60
- export declare class CodexAppServerRpcError extends Error {
61
- readonly code: unknown;
62
- readonly rpcMessage: string;
63
- readonly data: unknown;
64
- constructor(payload: CodexRpcErrorPayload);
65
- }
66
- export declare function isCodexRolloutMissingError(error: unknown): boolean;
67
- /** Public App Server turn inputs supported by the Workbench Composer. */
68
- export type CodexComposerInput = {
69
- readonly type: 'text';
70
- readonly text: string;
71
- } | {
72
- readonly type: 'localImage';
73
- readonly path: string;
74
- };
75
- /**
76
- * Local JSON-RPC client for a Node-supervised Codex App Server. Linux uses a
77
- * private Unix socket by default; Windows uses stdio. Neither is exposed to
78
- * MAR Server or the browser.
79
- */
80
- export declare class CodexAppServerClient {
81
- private readonly options;
82
- private child;
83
- private transport;
84
- private socketPath;
85
- private nextId;
86
- private readonly pending;
87
- private readonly pendingDrainWaiters;
88
- private readonly notifications;
89
- private environment;
90
- private starting;
91
- private restarting;
92
- private lifecycleRevision;
93
- constructor(options?: CodexAppServerOptions);
94
- configureEnvironment(environment: Readonly<Record<string, string>>): void;
95
- clearEnvironment(): void;
96
- start(): Promise<void>;
97
- restart(): Promise<void>;
98
- private startManaged;
99
- private restartManaged;
100
- stop(): void;
101
- private stopManaged;
102
- onNotification(listener: (notification: JsonRpcNotification) => void): () => void;
103
- request(method: string, params: unknown): Promise<unknown>;
104
- private requestDirect;
105
- private waitForPendingRequests;
106
- private resolvePendingDrain;
107
- notify(method: string, params: unknown): void;
108
- respond(requestId: string | number, result: unknown): void;
109
- startThread(cwd: string, configuration?: CodexRunConfiguration): Promise<unknown>;
110
- listThreads(): Promise<unknown>;
111
- listCollaborationModes(): Promise<unknown>;
112
- listModels(params: {
113
- readonly cursor: string | null;
114
- readonly limit: number;
115
- readonly includeHidden: boolean;
116
- }): Promise<unknown>;
117
- readThread(threadId: string, includeTurns?: boolean): Promise<unknown>;
118
- forkThread(threadId: string, cwd: string, lastTurnId: string, configuration?: CodexRunConfiguration): Promise<unknown>;
119
- setThreadName(threadId: string, name: string): Promise<unknown>;
120
- resumeThread(threadId: string, cwd: string, configuration?: CodexRunConfiguration): Promise<unknown>;
121
- startTurn(threadId: string, text: string, cwd: string, configuration?: CodexRunConfiguration, attachments?: readonly Extract<CodexComposerInput, {
122
- readonly type: 'localImage';
123
- }>[]): Promise<unknown>;
124
- steerTurn(threadId: string, expectedTurnId: string, text: string): Promise<unknown>;
125
- interruptTurn(threadId: string, turnId: string): Promise<unknown>;
126
- private handleLine;
127
- private failAll;
128
- private transportMode;
129
- }
130
- export declare function probeCodex(command?: string): CodexProbe;
131
- export declare function probeCodexAsync(command?: string): Promise<CodexProbe>;
132
- export declare function isSupportedCodexVersion(version: string): boolean;
133
- export {};
package/dist/config.d.ts DELETED
@@ -1,18 +0,0 @@
1
- export interface NodeConfig {
2
- readonly serverUrl: string;
3
- /** Explicit roots or the platform default resolved while loading the config. */
4
- readonly allowedRoots: readonly string[];
5
- /** Absolute or config-relative root for SQLite, upgrades and other private Node data. */
6
- readonly dataDirectory?: string;
7
- readonly nodeId?: string;
8
- readonly credential?: string;
9
- readonly registrationToken?: string;
10
- }
11
- export declare function nodeConfigPath(): string;
12
- export declare function loadNodeConfig(path?: string): Promise<NodeConfig>;
13
- /** Uses the Node service account's scope when no Workspace roots are configured. */
14
- export declare function defaultAllowedRoots(platform?: NodeJS.Platform, homePath?: string, currentDirectory?: string): readonly string[];
15
- export declare function nodeDatabasePath(config: NodeConfig, configPath?: string): string;
16
- export declare function nodeDataDirectory(config: NodeConfig, configPath?: string): string;
17
- /** Credentials are always written with owner-only POSIX permissions where supported. */
18
- export declare function saveNodeConfig(config: NodeConfig, path?: string): Promise<void>;
@@ -1,27 +0,0 @@
1
- import type { NodeCapabilities } from '@myagentroam/protocol';
2
- import type { ClaudeAgentSdkAdapter } from '../claude-agent-sdk.js';
3
- import type { CodexAppServerClient } from '../codex-app-server.js';
4
- import type { NodeConfig } from '../config.js';
5
- import type { NodeDatabase } from '../database.js';
6
- import type { FakeRunner, FakeRunnerStep } from '../fake-runner.js';
7
- import type { RunnerUsageReader } from '../runner-usage.js';
8
- import type { TerminalManager } from '../terminal.js';
9
- import type { OpenCodeServerClient } from '../opencode-server.js';
10
- export interface NodeConnectorOptions {
11
- readonly configPath?: string;
12
- readonly config?: NodeConfig;
13
- readonly capabilities?: NodeCapabilities;
14
- readonly capabilityDetector?: () => NodeCapabilities | Promise<NodeCapabilities>;
15
- readonly reconnect?: boolean;
16
- readonly fakeRunner?: FakeRunner;
17
- readonly fakeScript?: (input: unknown, runId: string) => readonly FakeRunnerStep[];
18
- readonly codexClient?: CodexAppServerClient;
19
- readonly codexProfileClientFactory?: () => CodexAppServerClient;
20
- readonly claudeClient?: ClaudeAgentSdkAdapter;
21
- readonly openCodeClient?: OpenCodeServerClient;
22
- readonly database?: NodeDatabase;
23
- readonly claudeApprovalTimeoutMs?: number;
24
- readonly terminalManager?: TerminalManager;
25
- readonly runnerUsageReader?: RunnerUsageReader;
26
- readonly upgradeReady?: () => void;
27
- }
@@ -1,9 +0,0 @@
1
- export type NodeOperationHandler = (data: unknown) => Promise<unknown> | unknown;
2
- /** Exact allow-list dispatcher for protocol-defined Node operations. */
3
- export declare class NodeOperationRouter {
4
- private readonly handlers;
5
- register(operation: string, handler: NodeOperationHandler): void;
6
- registerAll(handlers: Readonly<Record<string, NodeOperationHandler>>): void;
7
- has(operation: string): boolean;
8
- execute(operation: string, data: unknown): Promise<unknown>;
9
- }
@@ -1,94 +0,0 @@
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';
4
- export declare function nextReconnectDelay(attempt: number): number;
5
- export declare class NodeConnector {
6
- private readonly nodeGeneration;
7
- private readonly controlChannel;
8
- private readonly controlMessages;
9
- private readonly nodeRequests;
10
- private readonly connectionLifecycle;
11
- /** @internal Existing contract tests inject their socket through this boundary. */
12
- private set socket(value);
13
- private stopped;
14
- private config;
15
- private readonly capabilitiesProvided;
16
- private capabilities;
17
- private readonly capabilityDetector;
18
- private readonly configPath;
19
- private readonly reconnect;
20
- private readonly claudeApprovalTimeoutMs;
21
- private readonly workbenchEventService;
22
- private readonly fakeRunner;
23
- private readonly fakeScript;
24
- private readonly runState;
25
- private readonly runEventBridge;
26
- private readonly workspaceCoordinator;
27
- private readonly sessionState;
28
- private readonly sessionIdentityService;
29
- private readonly nativeSessionProjectionService;
30
- private readonly conversationHistoryService;
31
- private readonly conversationSegmentService;
32
- private readonly runnerInteractionService;
33
- private readonly runnerChannelMessages;
34
- private readonly managedRunnerSessions;
35
- private readonly sessionPresentationService;
36
- private readonly sessionLifecycleService;
37
- private readonly externalSessionResumeService;
38
- private readonly sessionMessageService;
39
- private readonly sessionCatalogService;
40
- private readonly sessionCommandService;
41
- private readonly runAttachmentService;
42
- private readonly terminalChannel;
43
- private readonly codexClient;
44
- private readonly codexRunController;
45
- private readonly claudeClient;
46
- private readonly openCodeClient;
47
- private readonly openCodeRunController;
48
- private readonly claudeRunController;
49
- private readonly runners;
50
- private readonly sessionContextService;
51
- private readonly runWorkbenchService;
52
- private readonly sessionQueryService;
53
- private readonly workspaceQueueWorkbenchService;
54
- private readonly operationRouter;
55
- private readonly runnerService;
56
- private readonly workbenchManifestService;
57
- private readonly terminalService;
58
- private readonly workspaceService;
59
- private readonly commandStates;
60
- private readonly runnerUsageReader;
61
- private readonly terminalManager;
62
- private readonly upgradeCoordinator;
63
- private readonly workspaceState;
64
- private readonly workspaceWatchService;
65
- private readonly workspaceSessionService;
66
- private readonly workspaceFileService;
67
- private readonly workspaceUploadService;
68
- private readonly workspaceChangeService;
69
- private readonly workspaceWorkbenchService;
70
- private database;
71
- private readonly recentRunProjectionService;
72
- /** Runtime/session state is intentionally not persisted to Node SQLite. */
73
- private readonly runtime;
74
- private readonly metrics;
75
- private readonly runEventService;
76
- private readonly nativeSessionWatchService;
77
- constructor(options?: NodeConnectorOptions);
78
- start(): Promise<void>;
79
- stop(): void;
80
- /** @internal Thin compatibility delegates; all behavior remains in the extracted services. */
81
- private readonly handleMessage;
82
- private readonly emitRunEvent;
83
- private readonly emitConversationItem;
84
- private readonly emitConversationTurn;
85
- private readonly emitWorkbenchEvent;
86
- private readonly discoverWorkspaceSessions;
87
- private readonly invalidateWorkspaceWatchTopics;
88
- private readonly reconcilePersistedRuns;
89
- private readonly startCapabilityRefresh;
90
- private readonly refreshCapabilities;
91
- private executeNodeOperation;
92
- private send;
93
- private sendEnvelope;
94
- }
@@ -1,29 +0,0 @@
1
- import type { NodeEnvelope } from '@myagentroam/protocol';
2
- interface WritableControlSocket {
3
- readonly readyState: number;
4
- readonly bufferedAmount: number;
5
- send(value: string): void;
6
- }
7
- /** Keeps control responses responsive while reliable Workbench events are busy. */
8
- export declare class ControlOutboundScheduler {
9
- private readonly socket;
10
- private readonly onExpired;
11
- private readonly high;
12
- private readonly normal;
13
- private scheduled;
14
- private retryTimer;
15
- private expiryTimer;
16
- private backpressureStartedAt;
17
- private backpressureLogged;
18
- private maximumHighDepth;
19
- private maximumNormalDepth;
20
- constructor(socket: () => WritableControlSocket | undefined, onExpired?: () => void);
21
- enqueue(envelope: NodeEnvelope, priority: 'high' | 'normal'): void;
22
- reset(): void;
23
- private schedule;
24
- private flush;
25
- private waitForBackpressure;
26
- private finishBackpressure;
27
- private scheduleExpiry;
28
- }
29
- export {};