@luckydraw/cumulus 0.31.0 → 0.31.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.31.0
4
+ - Bug fixes and stability improvements
5
+
6
+
3
7
  ## v0.31.0
4
8
 
5
9
  - Removed unused remote-executor dispatch subsystem (~1700 lines): `executor.ts`, `device-mcp.ts`, `/api/executors`, `/api/device/:executorId/tool`, `/ws/executor` WebSocket, and related config fields (`executor`, `executorPaths`, `devices`, `gitRemoteUrl`). Pure dead-code removal — no behavior change.
File without changes
package/dist/mcp/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luckydraw/cumulus",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "RLM-based CLI chat wrapper for Claude with external history context management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "cumulus-gateway": "./dist/gateway/daemon.js"
34
34
  },
35
35
  "scripts": {
36
- "build": "tsc && rm -rf dist/gateway/static && cp -r src/gateway/static dist/gateway/static && cp node_modules/@luckydraw/blex/dist/blex.min.global.js dist/gateway/static/blex.min.js && cp node_modules/@luckydraw/blex/dist/blex-chart.min.global.js dist/gateway/static/blex-chart.min.js",
36
+ "build": "rm -rf dist && tsc && cp -r src/gateway/static dist/gateway/static && cp node_modules/@luckydraw/blex/dist/blex.min.global.js dist/gateway/static/blex.min.js && cp node_modules/@luckydraw/blex/dist/blex-chart.min.global.js dist/gateway/static/blex-chart.min.js",
37
37
  "dev": "tsc --watch",
38
38
  "lint": "eslint src",
39
39
  "lint:fix": "eslint src --fix",
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Device MCP Server
4
- *
5
- * Stdio-based MCP server that gives Claude subprocesses running on the gateway
6
- * the ability to read/write files and execute commands on a remote device
7
- * (e.g., the user's Mac) via the gateway's device routing API.
8
- *
9
- * Environment variables (set by generateMcpConfig):
10
- * GATEWAY_API_URL - Gateway HTTP base URL (e.g., http://127.0.0.1:8090)
11
- * GATEWAY_API_KEY - API key for authentication
12
- * DEVICE_EXECUTOR_ID - Target device executor ID (e.g., "mac-karl")
13
- *
14
- * Tools:
15
- * device_read_file - Read a file from the remote device
16
- * device_write_file - Write content to a file on the remote device
17
- * device_list_directory - List files in a directory on the remote device
18
- * device_execute_command - Execute a shell command on the remote device
19
- */
20
- export {};
21
- //# sourceMappingURL=device-mcp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device-mcp.d.ts","sourceRoot":"","sources":["../../src/gateway/device-mcp.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,165 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Device MCP Server
4
- *
5
- * Stdio-based MCP server that gives Claude subprocesses running on the gateway
6
- * the ability to read/write files and execute commands on a remote device
7
- * (e.g., the user's Mac) via the gateway's device routing API.
8
- *
9
- * Environment variables (set by generateMcpConfig):
10
- * GATEWAY_API_URL - Gateway HTTP base URL (e.g., http://127.0.0.1:8090)
11
- * GATEWAY_API_KEY - API key for authentication
12
- * DEVICE_EXECUTOR_ID - Target device executor ID (e.g., "mac-karl")
13
- *
14
- * Tools:
15
- * device_read_file - Read a file from the remote device
16
- * device_write_file - Write content to a file on the remote device
17
- * device_list_directory - List files in a directory on the remote device
18
- * device_execute_command - Execute a shell command on the remote device
19
- */
20
- import * as http from 'http';
21
- import { Server } from '@modelcontextprotocol/sdk/server/index.js';
22
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
23
- import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
24
- const API_URL = process.env.GATEWAY_API_URL || 'http://127.0.0.1:8090';
25
- const API_KEY = process.env.GATEWAY_API_KEY || '';
26
- const DEVICE_ID = process.env.DEVICE_EXECUTOR_ID || 'unknown';
27
- function apiRequest(method, urlPath, body) {
28
- return new Promise(resolve => {
29
- const url = new URL(urlPath, API_URL);
30
- const options = {
31
- hostname: url.hostname,
32
- port: url.port,
33
- path: url.pathname + url.search,
34
- method,
35
- headers: {
36
- 'Content-Type': 'application/json',
37
- 'X-API-Key': API_KEY,
38
- },
39
- };
40
- const req = http.request(options, res => {
41
- let data = '';
42
- res.on('data', (chunk) => (data += chunk.toString()));
43
- res.on('end', () => {
44
- try {
45
- resolve(JSON.parse(data));
46
- }
47
- catch {
48
- resolve({ error: 'Invalid JSON response' });
49
- }
50
- });
51
- });
52
- req.on('error', (err) => {
53
- resolve({ error: `Request failed: ${err.message}` });
54
- });
55
- if (body) {
56
- req.write(JSON.stringify(body));
57
- }
58
- req.end();
59
- });
60
- }
61
- // ─── MCP Server ─────────────────────────────────────────────────────────────
62
- const server = new Server({ name: `device-${DEVICE_ID}`, version: '1.0.0' }, { capabilities: { tools: {} } });
63
- server.setRequestHandler(ListToolsRequestSchema, async () => ({
64
- tools: [
65
- {
66
- name: 'device_read_file',
67
- description: `Read the contents of a file on the remote device "${DEVICE_ID}". Returns the file content as text.`,
68
- inputSchema: {
69
- type: 'object',
70
- properties: {
71
- path: {
72
- type: 'string',
73
- description: 'Absolute file path on the device',
74
- },
75
- },
76
- required: ['path'],
77
- },
78
- },
79
- {
80
- name: 'device_write_file',
81
- description: `Write content to a file on the remote device "${DEVICE_ID}". Creates parent directories if needed.`,
82
- inputSchema: {
83
- type: 'object',
84
- properties: {
85
- path: {
86
- type: 'string',
87
- description: 'Absolute file path on the device',
88
- },
89
- content: {
90
- type: 'string',
91
- description: 'File content to write',
92
- },
93
- },
94
- required: ['path', 'content'],
95
- },
96
- },
97
- {
98
- name: 'device_list_directory',
99
- description: `List files and directories at a path on the remote device "${DEVICE_ID}".`,
100
- inputSchema: {
101
- type: 'object',
102
- properties: {
103
- path: {
104
- type: 'string',
105
- description: 'Absolute directory path on the device',
106
- },
107
- },
108
- required: ['path'],
109
- },
110
- },
111
- {
112
- name: 'device_execute_command',
113
- description: `Execute a shell command on the remote device "${DEVICE_ID}". Returns stdout, stderr, and exit code. Use for builds, git, local tools, etc.`,
114
- inputSchema: {
115
- type: 'object',
116
- properties: {
117
- command: {
118
- type: 'string',
119
- description: 'Shell command to execute',
120
- },
121
- cwd: {
122
- type: 'string',
123
- description: 'Working directory for the command (optional)',
124
- },
125
- timeout: {
126
- type: 'number',
127
- description: 'Timeout in milliseconds (default: 30000)',
128
- },
129
- },
130
- required: ['command'],
131
- },
132
- },
133
- ],
134
- }));
135
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
136
- const { name, arguments: args } = request.params;
137
- const result = await apiRequest('POST', `/api/device/${encodeURIComponent(DEVICE_ID)}/tool`, {
138
- tool: name,
139
- args: args || {},
140
- });
141
- if (result.error) {
142
- return {
143
- content: [{ type: 'text', text: `Device error: ${result.error}` }],
144
- isError: true,
145
- };
146
- }
147
- return {
148
- content: [
149
- {
150
- type: 'text',
151
- text: typeof result.result === 'string'
152
- ? result.result
153
- : JSON.stringify(result.result, null, 2),
154
- },
155
- ],
156
- isError: !!result.isError,
157
- };
158
- });
159
- // ─── Start ──────────────────────────────────────────────────────────────────
160
- const transport = new StdioServerTransport();
161
- server.connect(transport).catch((err) => {
162
- console.error(`[device-mcp] Failed to start: ${err.message}`);
163
- process.exit(1);
164
- });
165
- //# sourceMappingURL=device-mcp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device-mcp.js","sourceRoot":"","sources":["../../src/gateway/device-mcp.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAA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CAAC;YAClE,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EACF,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ;oBAC/B,CAAC,CAAC,MAAM,CAAC,MAAM;oBACf,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aAC7C;SACF;QACD,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;KAC1B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,+EAA+E;AAE/E,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;IAC7C,OAAO,CAAC,KAAK,CAAC,iCAAiC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,168 +0,0 @@
1
- /**
2
- * Executor registry and dispatch — manages remote machines that can run Claude.
3
- *
4
- * The gateway always owns conversation state (history, RAG, prompt assembly).
5
- * Executors are registered machines (thundercat, mac-karl, etc.) that run Claude
6
- * subprocesses. The gateway dispatches assembled prompts to executors and
7
- * streams tokens back.
8
- */
9
- import type { WebSocket } from 'ws';
10
- /** Payload sent from gateway to executor to run Claude */
11
- export interface ExecutePayload {
12
- type: 'execute';
13
- requestId: string;
14
- threadName: string;
15
- /** Fully assembled system prompt (identity + RAG + always-include + recent context) */
16
- systemPrompt: string;
17
- /** User message with FILE_READ_REMINDER prepended */
18
- userMessage: string;
19
- /** Base64-encoded images */
20
- imageBlocks?: Array<{
21
- type: string;
22
- source: {
23
- type: string;
24
- media_type: string;
25
- data: string;
26
- };
27
- }>;
28
- /** MCP server configs — gateway-proxy entries are resolved locally by executor */
29
- mcpServers: Record<string, McpServerDispatchConfig>;
30
- /** Working directory on the executor machine */
31
- cwd: string;
32
- /** Claude CLI args (--print, --verbose, etc.) */
33
- claudeArgs: string[];
34
- }
35
- /** MCP server config in dispatch payload */
36
- export type McpServerDispatchConfig = {
37
- /** Run locally on the executor — command + args provided */
38
- type: 'local';
39
- command: string;
40
- args: string[];
41
- env: Record<string, string>;
42
- } | {
43
- /** Proxy back to gateway's shared MCP server */
44
- type: 'gateway-proxy';
45
- sharedUrl: string;
46
- threadName: string;
47
- } | {
48
- /** Proxy back to gateway's agents MCP */
49
- type: 'gateway-agents-proxy';
50
- apiUrl: string;
51
- apiKey: string;
52
- agentName: string;
53
- };
54
- /** Abort message sent from gateway to executor */
55
- export interface ExecuteAbortPayload {
56
- type: 'execute_abort';
57
- requestId: string;
58
- }
59
- /** Token streamed from executor to gateway */
60
- export interface ExecuteTokenMessage {
61
- type: 'execute_token';
62
- requestId: string;
63
- /** Raw stream-json line from Claude stdout */
64
- line: string;
65
- }
66
- /** Execution completed */
67
- export interface ExecuteDoneMessage {
68
- type: 'execute_done';
69
- requestId: string;
70
- exitCode: number;
71
- }
72
- /** Execution error */
73
- export interface ExecuteErrorMessage {
74
- type: 'execute_error';
75
- requestId: string;
76
- error: string;
77
- }
78
- /** Device MCP tool call routed to a remote device */
79
- export interface DeviceToolCallMessage {
80
- type: 'device_tool_call';
81
- callId: string;
82
- executorId: string;
83
- tool: string;
84
- args: Record<string, unknown>;
85
- }
86
- /** Device MCP tool result */
87
- export interface DeviceToolResultMessage {
88
- type: 'device_tool_result';
89
- callId: string;
90
- result: unknown;
91
- isError?: boolean;
92
- }
93
- /** Registration message from executor to gateway */
94
- export interface ExecutorRegisterMessage {
95
- type: 'executor_register';
96
- executorId: string;
97
- hostname: string;
98
- projectRoot: string;
99
- }
100
- /** Registration confirmation from gateway to executor */
101
- export interface ExecutorRegisteredMessage {
102
- type: 'executor_registered';
103
- executorId: string;
104
- }
105
- /** All messages that can be sent over the executor WebSocket */
106
- export type ExecutorMessage = ExecutorRegisterMessage | ExecutorRegisteredMessage | ExecutePayload | ExecuteAbortPayload | ExecuteTokenMessage | ExecuteDoneMessage | ExecuteErrorMessage | DeviceToolCallMessage | DeviceToolResultMessage | {
107
- type: 'ping';
108
- } | {
109
- type: 'pong';
110
- };
111
- export interface ExecutionResult {
112
- requestId: string;
113
- exitCode: number;
114
- lines: string[];
115
- }
116
- export declare class ExecutorRegistry {
117
- private executors;
118
- private pendingExecutions;
119
- private pendingDeviceCalls;
120
- private pingIntervals;
121
- private deviceCallCounter;
122
- /** Register a new executor from an incoming WebSocket connection */
123
- register(msg: ExecutorRegisterMessage, ws: WebSocket): void;
124
- /** Unregister an executor */
125
- unregister(executorId: string): void;
126
- /** Check if an executor is online */
127
- isOnline(executorId: string): boolean;
128
- /** Get executor info */
129
- getExecutor(executorId: string): {
130
- hostname: string;
131
- projectRoot: string;
132
- } | null;
133
- /** List all registered executors with online status */
134
- listExecutors(): Array<{
135
- executorId: string;
136
- hostname: string;
137
- projectRoot: string;
138
- online: boolean;
139
- connectedAt: number;
140
- activeRequests: number;
141
- }>;
142
- /**
143
- * Dispatch an execution request to a remote executor.
144
- * Returns a promise that resolves when the executor completes.
145
- */
146
- dispatch(executorId: string, payload: ExecutePayload, callbacks?: {
147
- onLine?: (line: string) => void;
148
- onError?: (error: string) => void;
149
- }): Promise<ExecutionResult>;
150
- /** Abort an in-flight execution */
151
- abort(requestId: string): void;
152
- /**
153
- * Route a device tool call to a remote executor.
154
- * Returns a promise that resolves with the tool result.
155
- * Timeout: 60s (for long-running commands like builds).
156
- */
157
- deviceToolCall(executorId: string, tool: string, args: Record<string, unknown>): Promise<{
158
- result: unknown;
159
- isError?: boolean;
160
- }>;
161
- /** Shut down all connections */
162
- shutdown(): void;
163
- private handleExecutorMessage;
164
- private handleDisconnect;
165
- private cleanupExecutor;
166
- private send;
167
- }
168
- //# sourceMappingURL=executor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":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AE,cAAc,EACvB,SAAS,CAAC,EAAE;QACV,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;KACnC,GACA,OAAO,CAAC,eAAe,CAAC;IA2B3B,mCAAmC;IACnC,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAU9B;;;;OAIG;IACH,cAAc,CACZ,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAyClD,gCAAgC;IAChC,QAAQ,IAAI,IAAI;IAYhB,OAAO,CAAC,qBAAqB;IAmD7B,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,IAAI;CAKb"}
@@ -1,284 +0,0 @@
1
- /**
2
- * Executor registry and dispatch — manages remote machines that can run Claude.
3
- *
4
- * The gateway always owns conversation state (history, RAG, prompt assembly).
5
- * Executors are registered machines (thundercat, mac-karl, etc.) that run Claude
6
- * subprocesses. The gateway dispatches assembled prompts to executors and
7
- * streams tokens back.
8
- */
9
- export class ExecutorRegistry {
10
- executors = new Map();
11
- pendingExecutions = new Map();
12
- pendingDeviceCalls = new Map();
13
- pingIntervals = new Map();
14
- deviceCallCounter = 0;
15
- /** Register a new executor from an incoming WebSocket connection */
16
- register(msg, ws) {
17
- const existing = this.executors.get(msg.executorId);
18
- if (existing) {
19
- // Close old connection if still open
20
- try {
21
- existing.ws.close();
22
- }
23
- catch {
24
- // ignore
25
- }
26
- this.cleanupExecutor(msg.executorId);
27
- }
28
- const executor = {
29
- executorId: msg.executorId,
30
- hostname: msg.hostname,
31
- projectRoot: msg.projectRoot,
32
- ws,
33
- connectedAt: Date.now(),
34
- activeRequests: new Set(),
35
- };
36
- this.executors.set(msg.executorId, executor);
37
- // Set up ping/pong keepalive
38
- const interval = setInterval(() => {
39
- if (ws.readyState === ws.OPEN) {
40
- this.send(ws, { type: 'ping' });
41
- }
42
- }, 30_000);
43
- this.pingIntervals.set(msg.executorId, interval);
44
- // Handle disconnect
45
- ws.on('close', () => this.handleDisconnect(msg.executorId));
46
- ws.on('error', () => this.handleDisconnect(msg.executorId));
47
- // Handle incoming messages from executor
48
- ws.on('message', (raw) => {
49
- try {
50
- const data = JSON.parse(raw.toString());
51
- this.handleExecutorMessage(msg.executorId, data);
52
- }
53
- catch {
54
- // ignore malformed messages
55
- }
56
- });
57
- // Confirm registration
58
- this.send(ws, { type: 'executor_registered', executorId: msg.executorId });
59
- console.log(`[ExecutorRegistry] Registered executor "${msg.executorId}" (${msg.hostname}), projectRoot: ${msg.projectRoot}`);
60
- }
61
- /** Unregister an executor */
62
- unregister(executorId) {
63
- const executor = this.executors.get(executorId);
64
- if (executor) {
65
- try {
66
- executor.ws.close();
67
- }
68
- catch {
69
- // ignore
70
- }
71
- }
72
- this.cleanupExecutor(executorId);
73
- }
74
- /** Check if an executor is online */
75
- isOnline(executorId) {
76
- if (executorId === 'thundercat')
77
- return true; // local executor is always online
78
- const executor = this.executors.get(executorId);
79
- return !!executor && executor.ws.readyState === executor.ws.OPEN;
80
- }
81
- /** Get executor info */
82
- getExecutor(executorId) {
83
- const executor = this.executors.get(executorId);
84
- if (!executor)
85
- return null;
86
- return { hostname: executor.hostname, projectRoot: executor.projectRoot };
87
- }
88
- /** List all registered executors with online status */
89
- listExecutors() {
90
- const result = [];
91
- // Always include thundercat as local
92
- result.push({
93
- executorId: 'thundercat',
94
- hostname: 'thundercat',
95
- projectRoot: '', // resolved at runtime
96
- online: true,
97
- connectedAt: 0,
98
- activeRequests: 0,
99
- });
100
- for (const [, executor] of this.executors) {
101
- result.push({
102
- executorId: executor.executorId,
103
- hostname: executor.hostname,
104
- projectRoot: executor.projectRoot,
105
- online: executor.ws.readyState === executor.ws.OPEN,
106
- connectedAt: executor.connectedAt,
107
- activeRequests: executor.activeRequests.size,
108
- });
109
- }
110
- return result;
111
- }
112
- /**
113
- * Dispatch an execution request to a remote executor.
114
- * Returns a promise that resolves when the executor completes.
115
- */
116
- dispatch(executorId, payload, callbacks) {
117
- const executor = this.executors.get(executorId);
118
- if (!executor) {
119
- return Promise.reject(new Error(`Executor "${executorId}" is not registered`));
120
- }
121
- if (executor.ws.readyState !== executor.ws.OPEN) {
122
- return Promise.reject(new Error(`Executor "${executorId}" is offline`));
123
- }
124
- return new Promise((resolve, reject) => {
125
- const pending = {
126
- requestId: payload.requestId,
127
- threadName: payload.threadName,
128
- executorId,
129
- resolve,
130
- reject,
131
- lines: [],
132
- onLine: callbacks?.onLine,
133
- onError: callbacks?.onError,
134
- };
135
- this.pendingExecutions.set(payload.requestId, pending);
136
- executor.activeRequests.add(payload.requestId);
137
- this.send(executor.ws, payload);
138
- });
139
- }
140
- /** Abort an in-flight execution */
141
- abort(requestId) {
142
- const pending = this.pendingExecutions.get(requestId);
143
- if (!pending)
144
- return;
145
- const executor = this.executors.get(pending.executorId);
146
- if (executor && executor.ws.readyState === executor.ws.OPEN) {
147
- this.send(executor.ws, { type: 'execute_abort', requestId });
148
- }
149
- }
150
- /**
151
- * Route a device tool call to a remote executor.
152
- * Returns a promise that resolves with the tool result.
153
- * Timeout: 60s (for long-running commands like builds).
154
- */
155
- deviceToolCall(executorId, tool, args) {
156
- const executor = this.executors.get(executorId);
157
- if (!executor) {
158
- return Promise.reject(new Error(`Device "${executorId}" is not registered`));
159
- }
160
- if (executor.ws.readyState !== executor.ws.OPEN) {
161
- return Promise.reject(new Error(`Device "${executorId}" is offline`));
162
- }
163
- const callId = `dtc-${++this.deviceCallCounter}-${Date.now()}`;
164
- return new Promise((resolve, reject) => {
165
- const timeout = setTimeout(() => {
166
- this.pendingDeviceCalls.delete(callId);
167
- reject(new Error(`Device tool call timed out after 60s: ${tool}`));
168
- }, 60_000);
169
- const pending = {
170
- callId,
171
- executorId,
172
- resolve: result => {
173
- clearTimeout(timeout);
174
- resolve(result);
175
- },
176
- reject: err => {
177
- clearTimeout(timeout);
178
- reject(err);
179
- },
180
- };
181
- this.pendingDeviceCalls.set(callId, pending);
182
- this.send(executor.ws, {
183
- type: 'device_tool_call',
184
- callId,
185
- executorId,
186
- tool,
187
- args,
188
- });
189
- });
190
- }
191
- /** Shut down all connections */
192
- shutdown() {
193
- for (const [id] of this.executors) {
194
- this.unregister(id);
195
- }
196
- for (const [, interval] of this.pingIntervals) {
197
- clearInterval(interval);
198
- }
199
- this.pingIntervals.clear();
200
- }
201
- // ─── Internal ──────────────────────────────────────────────────────────────
202
- handleExecutorMessage(executorId, msg) {
203
- switch (msg.type) {
204
- case 'execute_token': {
205
- const pending = this.pendingExecutions.get(msg.requestId);
206
- if (pending) {
207
- pending.lines.push(msg.line);
208
- pending.onLine?.(msg.line);
209
- }
210
- break;
211
- }
212
- case 'execute_done': {
213
- const pending = this.pendingExecutions.get(msg.requestId);
214
- if (pending) {
215
- this.pendingExecutions.delete(msg.requestId);
216
- const executor = this.executors.get(executorId);
217
- executor?.activeRequests.delete(msg.requestId);
218
- pending.resolve({
219
- requestId: msg.requestId,
220
- exitCode: msg.exitCode,
221
- lines: pending.lines,
222
- });
223
- }
224
- break;
225
- }
226
- case 'execute_error': {
227
- const pending = this.pendingExecutions.get(msg.requestId);
228
- if (pending) {
229
- this.pendingExecutions.delete(msg.requestId);
230
- const executor = this.executors.get(executorId);
231
- executor?.activeRequests.delete(msg.requestId);
232
- pending.onError?.(msg.error);
233
- pending.reject(new Error(msg.error));
234
- }
235
- break;
236
- }
237
- case 'pong':
238
- // keepalive response, nothing to do
239
- break;
240
- case 'device_tool_result': {
241
- const pendingCall = this.pendingDeviceCalls.get(msg.callId);
242
- if (pendingCall) {
243
- this.pendingDeviceCalls.delete(msg.callId);
244
- pendingCall.resolve({ result: msg.result, isError: msg.isError });
245
- }
246
- break;
247
- }
248
- default:
249
- break;
250
- }
251
- }
252
- handleDisconnect(executorId) {
253
- console.log(`[ExecutorRegistry] Executor "${executorId}" disconnected`);
254
- // Fail all pending executions for this executor
255
- for (const [requestId, pending] of this.pendingExecutions) {
256
- if (pending.executorId === executorId) {
257
- this.pendingExecutions.delete(requestId);
258
- pending.reject(new Error(`Executor "${executorId}" disconnected during execution`));
259
- }
260
- }
261
- // Fail all pending device tool calls for this executor
262
- for (const [callId, pending] of this.pendingDeviceCalls) {
263
- if (pending.executorId === executorId) {
264
- this.pendingDeviceCalls.delete(callId);
265
- pending.reject(new Error(`Device "${executorId}" disconnected during tool call`));
266
- }
267
- }
268
- this.cleanupExecutor(executorId);
269
- }
270
- cleanupExecutor(executorId) {
271
- this.executors.delete(executorId);
272
- const interval = this.pingIntervals.get(executorId);
273
- if (interval) {
274
- clearInterval(interval);
275
- this.pingIntervals.delete(executorId);
276
- }
277
- }
278
- send(ws, msg) {
279
- if (ws.readyState === ws.OPEN) {
280
- ws.send(JSON.stringify(msg));
281
- }
282
- }
283
- }
284
- //# sourceMappingURL=executor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/lib/executor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoKH,MAAM,OAAO,gBAAgB;IACnB,SAAS,GAAG,IAAI,GAAG,EAA8B,CAAC;IAClD,iBAAiB,GAAG,IAAI,GAAG,EAA4B,CAAC;IACxD,kBAAkB,GAAG,IAAI,GAAG,EAAiC,CAAC;IAC9D,aAAa,GAAG,IAAI,GAAG,EAA0C,CAAC;IAClE,iBAAiB,GAAG,CAAC,CAAC;IAE9B,oEAAoE;IACpE,QAAQ,CAAC,GAA4B,EAAE,EAAa;QAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACpD,IAAI,QAAQ,EAAE,CAAC;YACb,qCAAqC;YACrC,I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