codex-computer-use-mcp 0.3.3 → 0.4.0
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/README.md +38 -121
- package/SECURITY.md +5 -63
- package/dist/audit.d.ts +1 -7
- package/dist/audit.js +4 -12
- package/dist/audit.js.map +1 -1
- package/dist/direct-broker.d.ts +18 -30
- package/dist/direct-broker.js +87 -161
- package/dist/direct-broker.js.map +1 -1
- package/dist/direct-service.d.ts +13 -21
- package/dist/direct-service.js +82 -301
- package/dist/direct-service.js.map +1 -1
- package/dist/mcp-elicitation.d.ts +1 -2
- package/dist/mcp-elicitation.js +18 -23
- package/dist/mcp-elicitation.js.map +1 -1
- package/dist/mcp-server.js +34 -38
- package/dist/mcp-server.js.map +1 -1
- package/dist/session-executor.d.ts +22 -0
- package/dist/session-executor.js +89 -0
- package/dist/session-executor.js.map +1 -0
- package/dist/tools.d.ts +743 -81
- package/dist/tools.js +55 -178
- package/dist/tools.js.map +1 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/integrations/pi/index.ts +99 -244
- package/package.json +13 -26
- package/ARCHITECTURE.md +0 -162
- package/CHANGELOG.md +0 -13
- package/CONTRIBUTING.md +0 -33
- package/MIGRATION.md +0 -125
- package/PROOF.md +0 -160
- package/dist/config.d.ts +0 -12
- package/dist/config.js +0 -10
- package/dist/config.js.map +0 -1
- package/dist/lock.d.ts +0 -17
- package/dist/lock.js +0 -137
- package/dist/lock.js.map +0 -1
- package/dist/system.d.ts +0 -27
- package/dist/system.js +0 -215
- package/dist/system.js.map +0 -1
- package/docs/adr/0001-standalone-code-mode-mcp.md +0 -45
- package/integrations/pi/README.md +0 -73
- package/integrations/pi/mcp.json.example +0 -15
- package/npm-shrinkwrap.json +0 -4827
package/dist/mcp-server.js
CHANGED
|
@@ -2,68 +2,65 @@
|
|
|
2
2
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
-
import {
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { getDirectStatus } from "./direct-service.js";
|
|
6
7
|
import { forwardOfficialElicitationToMcpClient } from "./mcp-elicitation.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
console.log(JSON.stringify(await getDirectStatus(), null, 2));
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
throw new Error("Usage: codex-computer-use-mcp [--status]. The durable no-permissions interface has no alternate mode or configuration command.");
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
if (await handleCli())
|
|
8
|
+
import { DirectSessionExecutor } from "./session-executor.js";
|
|
9
|
+
import { COMPUTER_USE_METHODS, TOOL_INPUT_SCHEMAS, TOOL_METADATA, isDirectMethod, } from "./tools.js";
|
|
10
|
+
import { PACKAGE_VERSION } from "./version.js";
|
|
11
|
+
const cliArgs = process.argv.slice(2);
|
|
12
|
+
if (cliArgs.length > 0) {
|
|
13
|
+
if (cliArgs.length === 1 && cliArgs[0] === "--status") {
|
|
14
|
+
console.log(JSON.stringify(getDirectStatus(), null, 2));
|
|
21
15
|
process.exit(0);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
console.error(error instanceof Error ? error.message : "Invalid command");
|
|
16
|
+
}
|
|
17
|
+
console.error("Usage: codex-computer-use-mcp [--status]");
|
|
25
18
|
process.exit(1);
|
|
26
19
|
}
|
|
27
|
-
const server = new Server({ name: "codex-computer-use-mcp", version }, { capabilities: {
|
|
28
|
-
const
|
|
20
|
+
const server = new Server({ name: "codex-computer-use-mcp", version: PACKAGE_VERSION }, { capabilities: { tools: {} } });
|
|
21
|
+
const sessionExecutor = new DirectSessionExecutor({ idleTimeoutMs: 120_000 });
|
|
22
|
+
server.onclose = () => {
|
|
23
|
+
void sessionExecutor.close().catch(() => { process.exitCode = 1; });
|
|
24
|
+
};
|
|
25
|
+
const toolDefinitions = COMPUTER_USE_METHODS.map((method) => ({
|
|
29
26
|
name: method,
|
|
30
|
-
description:
|
|
31
|
-
inputSchema:
|
|
32
|
-
annotations:
|
|
27
|
+
description: TOOL_METADATA[method].description,
|
|
28
|
+
inputSchema: TOOL_INPUT_SCHEMAS[method],
|
|
29
|
+
annotations: TOOL_METADATA[method].annotations,
|
|
33
30
|
}));
|
|
34
31
|
const statusToolDefinition = {
|
|
35
32
|
name: "computer_use_status",
|
|
36
33
|
title: "Computer Use Status",
|
|
37
|
-
description: "Show
|
|
34
|
+
description: "Show Computer Use status.",
|
|
38
35
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
39
36
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
40
37
|
};
|
|
41
|
-
server.setRequestHandler(ListToolsRequestSchema,
|
|
42
|
-
tools: [...
|
|
38
|
+
server.setRequestHandler(ListToolsRequestSchema, () => Promise.resolve({
|
|
39
|
+
tools: [...toolDefinitions, statusToolDefinition],
|
|
43
40
|
}));
|
|
44
41
|
server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
45
42
|
if (request.params.name === statusToolDefinition.name) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return { content: [{ type: "text", text: JSON.stringify(status, null, 2) }], structuredContent: status };
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
return { content: [{ type: "text", text: error instanceof Error ? error.message : "Could not read status" }], isError: true };
|
|
52
|
-
}
|
|
43
|
+
const status = getDirectStatus();
|
|
44
|
+
return { content: [{ type: "text", text: JSON.stringify(status, null, 2) }], structuredContent: status };
|
|
53
45
|
}
|
|
54
46
|
if (!isDirectMethod(request.params.name)) {
|
|
55
47
|
throw new McpError(ErrorCode.InvalidParams, `Unknown tool: ${request.params.name}`);
|
|
56
48
|
}
|
|
57
49
|
try {
|
|
58
|
-
const
|
|
50
|
+
const args = z.record(z.string(), z.json()).parse(request.params.arguments ?? {});
|
|
51
|
+
const response = await sessionExecutor.execute(request.params.name, args, {
|
|
59
52
|
signal: extra.signal,
|
|
60
53
|
onElicitation: (elicitation) => forwardOfficialElicitationToMcpClient(server, elicitation, extra.signal),
|
|
61
54
|
});
|
|
62
|
-
|
|
55
|
+
const result = {
|
|
56
|
+
// SAFETY: app-server returns MCP CallToolResult content blocks; the broker already verifies the JSON object envelope.
|
|
63
57
|
content: response.content,
|
|
64
|
-
structuredContent: response.details,
|
|
65
58
|
isError: response.isError,
|
|
66
59
|
};
|
|
60
|
+
const structuredContent = z.record(z.string(), z.json()).safeParse(response.structuredContent);
|
|
61
|
+
if (structuredContent.success)
|
|
62
|
+
result.structuredContent = structuredContent.data;
|
|
63
|
+
return result;
|
|
67
64
|
}
|
|
68
65
|
catch (error) {
|
|
69
66
|
return {
|
|
@@ -72,6 +69,5 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
72
69
|
};
|
|
73
70
|
}
|
|
74
71
|
});
|
|
75
|
-
|
|
76
|
-
await server.connect(transport);
|
|
72
|
+
await server.connect(new StdioServerTransport());
|
|
77
73
|
//# sourceMappingURL=mcp-server.js.map
|
package/dist/mcp-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACN,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,QAAQ,
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE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AM,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,IAAI,CAAC;QACjF,OAAO,MAAM,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,EAAE,CAAC;YACxG,OAAO,EAAE,IAAI;SACb,CAAC;IACH,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createOfficialDirectToolSession } from "./direct-broker.ts";
|
|
2
|
+
import { type DirectResponse, type DirectServiceDependencies } from "./direct-service.ts";
|
|
3
|
+
import type { DirectMethod, DirectToolArguments } from "./tools.ts";
|
|
4
|
+
interface DirectSessionExecutorDependencies {
|
|
5
|
+
createSession?: typeof createOfficialDirectToolSession;
|
|
6
|
+
idleTimeoutMs?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class DirectSessionExecutor {
|
|
9
|
+
private queue;
|
|
10
|
+
private session?;
|
|
11
|
+
private idleTimer?;
|
|
12
|
+
private idleFailure?;
|
|
13
|
+
private readonly dependencies;
|
|
14
|
+
constructor(dependencies?: DirectSessionExecutorDependencies);
|
|
15
|
+
private runExclusive;
|
|
16
|
+
private clearIdleTimer;
|
|
17
|
+
private closeSession;
|
|
18
|
+
private scheduleIdleClose;
|
|
19
|
+
execute(method: DirectMethod, params: DirectToolArguments, dependencies: DirectServiceDependencies): Promise<DirectResponse>;
|
|
20
|
+
close(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { createOfficialDirectToolSession, } from "./direct-broker.js";
|
|
2
|
+
import { executeDirectTool, } from "./direct-service.js";
|
|
3
|
+
export class DirectSessionExecutor {
|
|
4
|
+
queue = Promise.resolve();
|
|
5
|
+
session;
|
|
6
|
+
idleTimer;
|
|
7
|
+
idleFailure;
|
|
8
|
+
dependencies;
|
|
9
|
+
constructor(dependencies = {}) {
|
|
10
|
+
this.dependencies = dependencies;
|
|
11
|
+
}
|
|
12
|
+
runExclusive(operation) {
|
|
13
|
+
const result = this.queue.then(operation);
|
|
14
|
+
this.queue = result.then(() => undefined, () => undefined);
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
clearIdleTimer() {
|
|
18
|
+
if (this.idleTimer)
|
|
19
|
+
clearTimeout(this.idleTimer);
|
|
20
|
+
this.idleTimer = undefined;
|
|
21
|
+
}
|
|
22
|
+
async closeSession() {
|
|
23
|
+
this.clearIdleTimer();
|
|
24
|
+
const session = this.session;
|
|
25
|
+
this.session = undefined;
|
|
26
|
+
await session?.close();
|
|
27
|
+
}
|
|
28
|
+
scheduleIdleClose() {
|
|
29
|
+
this.clearIdleTimer();
|
|
30
|
+
if (!this.dependencies.idleTimeoutMs || !this.session)
|
|
31
|
+
return;
|
|
32
|
+
const timer = setTimeout(() => {
|
|
33
|
+
void this.runExclusive(async () => {
|
|
34
|
+
if (this.idleTimer !== timer)
|
|
35
|
+
return;
|
|
36
|
+
await this.closeSession();
|
|
37
|
+
}).catch((error) => {
|
|
38
|
+
this.idleFailure = error instanceof Error ? error : new Error(String(error));
|
|
39
|
+
});
|
|
40
|
+
}, this.dependencies.idleTimeoutMs);
|
|
41
|
+
this.idleTimer = timer;
|
|
42
|
+
timer.unref();
|
|
43
|
+
}
|
|
44
|
+
async execute(method, params, dependencies) {
|
|
45
|
+
return this.runExclusive(async () => {
|
|
46
|
+
if (this.idleFailure) {
|
|
47
|
+
const failure = this.idleFailure;
|
|
48
|
+
this.idleFailure = undefined;
|
|
49
|
+
throw failure;
|
|
50
|
+
}
|
|
51
|
+
this.clearIdleTimer();
|
|
52
|
+
const session = this.session;
|
|
53
|
+
try {
|
|
54
|
+
const response = await executeDirectTool({ method, arguments: params }, session ? {
|
|
55
|
+
...dependencies,
|
|
56
|
+
callTool: (directMethod, args, options) => session.call(directMethod, args, options),
|
|
57
|
+
} : method === "get_app_state" ? {
|
|
58
|
+
...dependencies,
|
|
59
|
+
callTool: async (directMethod, args, options) => {
|
|
60
|
+
this.session = await (this.dependencies.createSession ?? createOfficialDirectToolSession)({
|
|
61
|
+
supportsOpenAiFormElicitation: dependencies.supportsOpenAiFormElicitation === true,
|
|
62
|
+
});
|
|
63
|
+
return this.session.call(directMethod, args, options);
|
|
64
|
+
},
|
|
65
|
+
} : dependencies);
|
|
66
|
+
if (response.isError)
|
|
67
|
+
await this.closeSession();
|
|
68
|
+
else
|
|
69
|
+
this.scheduleIdleClose();
|
|
70
|
+
return response;
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
await this.closeSession();
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
async close() {
|
|
79
|
+
await this.runExclusive(async () => {
|
|
80
|
+
await this.closeSession();
|
|
81
|
+
if (this.idleFailure) {
|
|
82
|
+
const failure = this.idleFailure;
|
|
83
|
+
this.idleFailure = undefined;
|
|
84
|
+
throw failure;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=session-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-executor.js","sourceRoot":"","sources":["../src/session-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,+BAA+B,GAE/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,iBAAiB,GAGjB,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,OAAO,qBAAqB;IACzB,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,OAAO,CAA6B;IACpC,SAAS,CAAkB;IAC3B,WAAW,CAAS;IACX,YAAY,C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