codex-computer-use-mcp 0.1.0 → 0.3.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/ARCHITECTURE.md +150 -0
- package/CONTRIBUTING.md +16 -10
- package/MIGRATION.md +94 -0
- package/PROOF.md +128 -54
- package/README.md +97 -115
- package/SECURITY.md +45 -22
- package/dist/audit.d.ts +15 -14
- package/dist/audit.js +1 -1
- package/dist/audit.js.map +1 -1
- package/dist/config.d.ts +8 -8
- package/dist/config.js +8 -103
- package/dist/config.js.map +1 -1
- package/dist/direct-broker.d.ts +71 -0
- package/dist/direct-broker.js +652 -0
- package/dist/direct-broker.js.map +1 -0
- package/dist/direct-service.d.ts +33 -0
- package/dist/direct-service.js +350 -0
- package/dist/direct-service.js.map +1 -0
- package/dist/lock.d.ts +1 -0
- package/dist/lock.js +32 -3
- package/dist/lock.js.map +1 -1
- package/dist/mcp-elicitation.d.ts +8 -0
- package/dist/mcp-elicitation.js +47 -0
- package/dist/mcp-elicitation.js.map +1 -0
- package/dist/mcp-server.js +43 -100
- package/dist/mcp-server.js.map +1 -1
- package/dist/system.d.ts +0 -1
- package/dist/system.js +12 -37
- package/dist/system.js.map +1 -1
- package/dist/tools.d.ts +84 -0
- package/dist/tools.js +262 -0
- package/dist/tools.js.map +1 -0
- package/docs/adr/0001-standalone-code-mode-mcp.md +45 -0
- package/integrations/pi/README.md +51 -27
- package/integrations/pi/index.ts +237 -125
- package/integrations/pi/mcp.json.example +3 -3
- package/npm-shrinkwrap.json +3275 -48
- package/package.json +41 -13
- package/dist/policy.d.ts +0 -42
- package/dist/policy.js +0 -428
- package/dist/policy.js.map +0 -1
- package/dist/prompt.d.ts +0 -62
- package/dist/prompt.js +0 -119
- package/dist/prompt.js.map +0 -1
- package/dist/runner.d.ts +0 -55
- package/dist/runner.js +0 -494
- package/dist/runner.js.map +0 -1
- package/dist/service.d.ts +0 -17
- package/dist/service.js +0 -382
- package/dist/service.js.map +0 -1
package/dist/tools.js
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const app = z.string().describe("App name, full app path, or unambiguous bundle identifier");
|
|
3
|
+
const selectTextApp = z.string().describe("App name or bundle identifier");
|
|
4
|
+
export const DIRECT_TOOL_SCHEMAS = {
|
|
5
|
+
list_apps: z.object({}).strict(),
|
|
6
|
+
get_app_state: z.object({ app }).strict(),
|
|
7
|
+
click: z
|
|
8
|
+
.object({
|
|
9
|
+
app,
|
|
10
|
+
click_count: z.number().refine(Number.isInteger).describe("Number of clicks. Defaults to 1").optional(),
|
|
11
|
+
element_index: z.string().describe("Element index to click").optional(),
|
|
12
|
+
mouse_button: z.enum(["left", "right", "middle"]).describe("Mouse button to click. Defaults to left.").optional(),
|
|
13
|
+
x: z.number().describe("X coordinate in screenshot pixel coordinates").optional(),
|
|
14
|
+
y: z.number().describe("Y coordinate in screenshot pixel coordinates").optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict(),
|
|
17
|
+
perform_secondary_action: z
|
|
18
|
+
.object({
|
|
19
|
+
app,
|
|
20
|
+
element_index: z.string().describe("Element identifier"),
|
|
21
|
+
action: z.string().describe("Secondary accessibility action name"),
|
|
22
|
+
})
|
|
23
|
+
.strict(),
|
|
24
|
+
set_value: z
|
|
25
|
+
.object({
|
|
26
|
+
app,
|
|
27
|
+
element_index: z.string().describe("Element identifier"),
|
|
28
|
+
value: z.string().describe("Value to assign"),
|
|
29
|
+
})
|
|
30
|
+
.strict(),
|
|
31
|
+
select_text: z
|
|
32
|
+
.object({
|
|
33
|
+
app: selectTextApp,
|
|
34
|
+
element_index: z.string().describe("Text element identifier"),
|
|
35
|
+
text: z.string().describe("Target text as shown in the accessibility tree"),
|
|
36
|
+
prefix: z.string().describe("Optional text immediately before the target, used to disambiguate repeated matches").optional(),
|
|
37
|
+
selection: z.enum(["text", "cursor_before", "cursor_after"]).describe("Whether to select the text or place the cursor before or after it. Defaults to text.").optional(),
|
|
38
|
+
suffix: z.string().describe("Optional text immediately after the target, used to disambiguate repeated matches").optional(),
|
|
39
|
+
})
|
|
40
|
+
.strict(),
|
|
41
|
+
scroll: z
|
|
42
|
+
.object({
|
|
43
|
+
app,
|
|
44
|
+
element_index: z.string().describe("Element identifier"),
|
|
45
|
+
direction: z.string().describe("Scroll direction: up, down, left, or right"),
|
|
46
|
+
pages: z.number().describe("Number of pages to scroll. Fractional values are supported. Defaults to 1").optional(),
|
|
47
|
+
})
|
|
48
|
+
.strict(),
|
|
49
|
+
drag: z
|
|
50
|
+
.object({
|
|
51
|
+
app,
|
|
52
|
+
from_x: z.number().describe("Start X coordinate"),
|
|
53
|
+
from_y: z.number().describe("Start Y coordinate"),
|
|
54
|
+
to_x: z.number().describe("End X coordinate"),
|
|
55
|
+
to_y: z.number().describe("End Y coordinate"),
|
|
56
|
+
})
|
|
57
|
+
.strict(),
|
|
58
|
+
press_key: z.object({ app, key: z.string().describe("Key or key combination to press") }).strict(),
|
|
59
|
+
type_text: z.object({ app, text: z.string().describe("Literal text to type") }).strict(),
|
|
60
|
+
};
|
|
61
|
+
export const OFFICIAL_METHODS = Object.freeze(Object.keys(DIRECT_TOOL_SCHEMAS));
|
|
62
|
+
const readAnnotations = Object.freeze({
|
|
63
|
+
destructiveHint: false,
|
|
64
|
+
idempotentHint: true,
|
|
65
|
+
openWorldHint: false,
|
|
66
|
+
readOnlyHint: true,
|
|
67
|
+
});
|
|
68
|
+
const actionAnnotations = Object.freeze({
|
|
69
|
+
destructiveHint: false,
|
|
70
|
+
idempotentHint: false,
|
|
71
|
+
openWorldHint: false,
|
|
72
|
+
readOnlyHint: false,
|
|
73
|
+
});
|
|
74
|
+
/** Exact upstream descriptions and annotations exposed by the signed Computer Use helper. */
|
|
75
|
+
export const OFFICIAL_TOOL_METADATA = Object.freeze({
|
|
76
|
+
list_apps: {
|
|
77
|
+
description: "List the apps on this computer. Returns the set of apps that are currently running, as well as any that have been used in the last 14 days, including details on usage frequency",
|
|
78
|
+
annotations: readAnnotations,
|
|
79
|
+
},
|
|
80
|
+
get_app_state: {
|
|
81
|
+
description: "Start an app use session if needed, then get the state of the app's key window and return a screenshot and accessibility tree. This must be called once per assistant turn before interacting with the app",
|
|
82
|
+
annotations: readAnnotations,
|
|
83
|
+
},
|
|
84
|
+
click: {
|
|
85
|
+
description: "Click an element by index or pixel coordinates from screenshot",
|
|
86
|
+
annotations: actionAnnotations,
|
|
87
|
+
},
|
|
88
|
+
perform_secondary_action: {
|
|
89
|
+
description: "Invoke a secondary accessibility action exposed by an element",
|
|
90
|
+
annotations: actionAnnotations,
|
|
91
|
+
},
|
|
92
|
+
set_value: {
|
|
93
|
+
description: "Set the value of a settable accessibility element",
|
|
94
|
+
annotations: actionAnnotations,
|
|
95
|
+
},
|
|
96
|
+
select_text: {
|
|
97
|
+
description: "Select text inside a text element, or place the text cursor before or after it. Provide text exactly as it appears in the accessibility tree, including any Markdown formatting. If the text is not unique, provide surrounding prefix or suffix text to disambiguate it.",
|
|
98
|
+
annotations: actionAnnotations,
|
|
99
|
+
},
|
|
100
|
+
scroll: {
|
|
101
|
+
description: "Scroll an element in a direction by a number of pages",
|
|
102
|
+
annotations: actionAnnotations,
|
|
103
|
+
},
|
|
104
|
+
drag: {
|
|
105
|
+
description: "Drag from one point to another using pixel coordinates",
|
|
106
|
+
annotations: actionAnnotations,
|
|
107
|
+
},
|
|
108
|
+
press_key: {
|
|
109
|
+
description: "Press a key or key-combination on the keyboard, including modifier and navigation keys.\n - This supports xdotool's `key` syntax.\n - Examples: \"a\", \"Return\", \"Tab\", \"super+c\", \"Up\", \"KP_0\" (for the numpad 0 key).",
|
|
110
|
+
annotations: actionAnnotations,
|
|
111
|
+
},
|
|
112
|
+
type_text: {
|
|
113
|
+
description: "Type literal text using keyboard input",
|
|
114
|
+
annotations: actionAnnotations,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
export const READ_ONLY_METHODS = new Set(OFFICIAL_METHODS.filter((method) => OFFICIAL_TOOL_METADATA[method].annotations.readOnlyHint));
|
|
118
|
+
export const MUTATING_METHODS = new Set(OFFICIAL_METHODS.filter((method) => !READ_ONLY_METHODS.has(method)));
|
|
119
|
+
export function isDirectMethod(value) {
|
|
120
|
+
return OFFICIAL_METHODS.includes(value);
|
|
121
|
+
}
|
|
122
|
+
const KEY_ALIASES = {
|
|
123
|
+
cmd: "Meta_L",
|
|
124
|
+
command: "Meta_L",
|
|
125
|
+
meta: "Meta_L",
|
|
126
|
+
ctrl: "Control_L",
|
|
127
|
+
control: "Control_L",
|
|
128
|
+
shift: "Shift_L",
|
|
129
|
+
alt: "Alt_L",
|
|
130
|
+
option: "Alt_L",
|
|
131
|
+
enter: "Return",
|
|
132
|
+
return: "Return",
|
|
133
|
+
esc: "Escape",
|
|
134
|
+
escape: "Escape",
|
|
135
|
+
backspace: "BackSpace",
|
|
136
|
+
delete: "Delete",
|
|
137
|
+
pageup: "Page_Up",
|
|
138
|
+
pagedown: "Page_Down",
|
|
139
|
+
arrowup: "Up",
|
|
140
|
+
arrowdown: "Down",
|
|
141
|
+
arrowleft: "Left",
|
|
142
|
+
arrowright: "Right",
|
|
143
|
+
};
|
|
144
|
+
export function normalizeKeyExpression(value) {
|
|
145
|
+
return value
|
|
146
|
+
.split("+")
|
|
147
|
+
.map((part) => {
|
|
148
|
+
const trimmed = part.trim();
|
|
149
|
+
const alias = KEY_ALIASES[trimmed.toLowerCase()];
|
|
150
|
+
if (alias)
|
|
151
|
+
return alias;
|
|
152
|
+
return /^[A-Z]$/.test(trimmed) ? trimmed.toLowerCase() : trimmed;
|
|
153
|
+
})
|
|
154
|
+
.join("+");
|
|
155
|
+
}
|
|
156
|
+
export function validateDirectArguments(method, value) {
|
|
157
|
+
const parsed = DIRECT_TOOL_SCHEMAS[method].parse(value);
|
|
158
|
+
if (method === "press_key")
|
|
159
|
+
return { ...parsed, key: normalizeKeyExpression(parsed.key) };
|
|
160
|
+
return parsed;
|
|
161
|
+
}
|
|
162
|
+
export function targetAppFor(method, args) {
|
|
163
|
+
return method === "list_apps" ? undefined : args.app;
|
|
164
|
+
}
|
|
165
|
+
/** Exact upstream MCP schemas observed from the signed helper. Drift fails closed before dispatch. */
|
|
166
|
+
export const EXPECTED_OFFICIAL_INPUT_SCHEMAS = {
|
|
167
|
+
list_apps: { type: "object", properties: {}, additionalProperties: false },
|
|
168
|
+
get_app_state: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: { app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" } },
|
|
171
|
+
required: ["app"],
|
|
172
|
+
additionalProperties: false,
|
|
173
|
+
},
|
|
174
|
+
click: {
|
|
175
|
+
type: "object",
|
|
176
|
+
properties: {
|
|
177
|
+
app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" },
|
|
178
|
+
click_count: { description: "Number of clicks. Defaults to 1", type: "integer" },
|
|
179
|
+
element_index: { description: "Element index to click", type: "string" },
|
|
180
|
+
mouse_button: { description: "Mouse button to click. Defaults to left.", enum: ["left", "right", "middle"], type: "string" },
|
|
181
|
+
x: { description: "X coordinate in screenshot pixel coordinates", type: "number" },
|
|
182
|
+
y: { description: "Y coordinate in screenshot pixel coordinates", type: "number" },
|
|
183
|
+
},
|
|
184
|
+
required: ["app"],
|
|
185
|
+
additionalProperties: false,
|
|
186
|
+
},
|
|
187
|
+
perform_secondary_action: {
|
|
188
|
+
type: "object",
|
|
189
|
+
properties: {
|
|
190
|
+
action: { description: "Secondary accessibility action name", type: "string" },
|
|
191
|
+
app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" },
|
|
192
|
+
element_index: { description: "Element identifier", type: "string" },
|
|
193
|
+
},
|
|
194
|
+
required: ["app", "element_index", "action"],
|
|
195
|
+
additionalProperties: false,
|
|
196
|
+
},
|
|
197
|
+
set_value: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" },
|
|
201
|
+
element_index: { description: "Element identifier", type: "string" },
|
|
202
|
+
value: { description: "Value to assign", type: "string" },
|
|
203
|
+
},
|
|
204
|
+
required: ["app", "element_index", "value"],
|
|
205
|
+
additionalProperties: false,
|
|
206
|
+
},
|
|
207
|
+
select_text: {
|
|
208
|
+
type: "object",
|
|
209
|
+
properties: {
|
|
210
|
+
app: { description: "App name or bundle identifier", type: "string" },
|
|
211
|
+
element_index: { description: "Text element identifier", type: "string" },
|
|
212
|
+
prefix: { description: "Optional text immediately before the target, used to disambiguate repeated matches", type: "string" },
|
|
213
|
+
selection: { description: "Whether to select the text or place the cursor before or after it. Defaults to text.", enum: ["text", "cursor_before", "cursor_after"], type: "string" },
|
|
214
|
+
suffix: { description: "Optional text immediately after the target, used to disambiguate repeated matches", type: "string" },
|
|
215
|
+
text: { description: "Target text as shown in the accessibility tree", type: "string" },
|
|
216
|
+
},
|
|
217
|
+
required: ["app", "element_index", "text"],
|
|
218
|
+
additionalProperties: false,
|
|
219
|
+
},
|
|
220
|
+
scroll: {
|
|
221
|
+
type: "object",
|
|
222
|
+
properties: {
|
|
223
|
+
app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" },
|
|
224
|
+
direction: { description: "Scroll direction: up, down, left, or right", type: "string" },
|
|
225
|
+
element_index: { description: "Element identifier", type: "string" },
|
|
226
|
+
pages: { description: "Number of pages to scroll. Fractional values are supported. Defaults to 1", type: "number" },
|
|
227
|
+
},
|
|
228
|
+
required: ["app", "element_index", "direction"],
|
|
229
|
+
additionalProperties: false,
|
|
230
|
+
},
|
|
231
|
+
drag: {
|
|
232
|
+
type: "object",
|
|
233
|
+
properties: {
|
|
234
|
+
app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" },
|
|
235
|
+
from_x: { description: "Start X coordinate", type: "number" },
|
|
236
|
+
from_y: { description: "Start Y coordinate", type: "number" },
|
|
237
|
+
to_x: { description: "End X coordinate", type: "number" },
|
|
238
|
+
to_y: { description: "End Y coordinate", type: "number" },
|
|
239
|
+
},
|
|
240
|
+
required: ["app", "from_x", "from_y", "to_x", "to_y"],
|
|
241
|
+
additionalProperties: false,
|
|
242
|
+
},
|
|
243
|
+
press_key: {
|
|
244
|
+
type: "object",
|
|
245
|
+
properties: {
|
|
246
|
+
app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" },
|
|
247
|
+
key: { description: "Key or key combination to press", type: "string" },
|
|
248
|
+
},
|
|
249
|
+
required: ["app", "key"],
|
|
250
|
+
additionalProperties: false,
|
|
251
|
+
},
|
|
252
|
+
type_text: {
|
|
253
|
+
type: "object",
|
|
254
|
+
properties: {
|
|
255
|
+
app: { description: "App name, full app path, or unambiguous bundle identifier", type: "string" },
|
|
256
|
+
text: { description: "Literal text to type", type: "string" },
|
|
257
|
+
},
|
|
258
|
+
required: ["app", "text"],
|
|
259
|
+
additionalProperties: false,
|
|
260
|
+
},
|
|
261
|
+
};
|
|
262
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC,CAAC;AAC7F,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;IAChC,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACzC,KAAK,EAAE,CAAC;SACN,MAAM,CAAC;QACP,GAAG;QACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,iCAAiC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AC;QACzB,oBAAoB,EAAE,KAAK;KAC3B;CACD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ADR 0001: Keep Code Mode in a standalone MCP process
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-07-15
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
Codex can compose MCP tools through JavaScript Code Mode. Pi's progressive tool disclosure reduces schema context but does not let generated code invoke arbitrary Pi tools. Adding an executor, loader, or batch method here would also break this repository's exact ten-tool Computer Use contract.
|
|
9
|
+
|
|
10
|
+
We considered existing Pi and MCP implementations:
|
|
11
|
+
|
|
12
|
+
- `pi-mcp-adapter` has the strongest Pi-facing MCP configuration, OAuth, elicitation, lifecycle, metadata, and rich-result handling, but no Code Mode executor.
|
|
13
|
+
- `dmmulroy/pi-mcp` has a clean MCP manager but no Code Mode, no published package, and no detected licence.
|
|
14
|
+
- `Hor1zonZzz/pi-codeMode` demonstrates Pi-side JavaScript orchestration but supports only reconstructed built-ins and has no MCP support or tests.
|
|
15
|
+
- `pi-code-tool` is a tested Pi-native pattern, but uses Python/Monty and does not aggregate MCP servers.
|
|
16
|
+
- Cloudflare's Code Mode packages are strong design references, but their secure executor depends on Cloudflare Dynamic Workers; `cloudflare/mcp` is specific to the Cloudflare API.
|
|
17
|
+
- `tool-sandbox` and `tool-sandbox-mcp` provide QuickJS-based execution, but impose a separate capability boundary and the server primarily targets one upstream HTTP gateway.
|
|
18
|
+
- `cmcp` is the closest standalone multi-server implementation, but lacks the OAuth, elicitation, sampling, roots, and notification fidelity required here.
|
|
19
|
+
|
|
20
|
+
## Decision
|
|
21
|
+
|
|
22
|
+
If we add Code Mode for Pi, implement it as a **separate stdio MCP server** loaded through Pi's existing MCP adapter.
|
|
23
|
+
|
|
24
|
+
- Do not modify Pi core.
|
|
25
|
+
- Do not add Code Mode methods to `codex-computer-use-mcp`; its public Computer Use surface remains the exact ten official tools.
|
|
26
|
+
- Let the Code Mode process connect to upstream MCP servers and expose a compact code-execution surface for discovery and composition.
|
|
27
|
+
- Give generated code the same filesystem, network, environment, and process authority as the Code Mode server's surrounding Pi environment. Do not add a stricter capability/security sandbox solely around Code Mode.
|
|
28
|
+
- Use the standalone MCP process as the fault-containment boundary. Pi can time out, terminate, and restart it if generated code wedges the process. Do not add a child process or isolate per execution without operational evidence that the server boundary is insufficient.
|
|
29
|
+
- Preserve upstream MCP behavior across the nested boundary, especially OAuth, cancellation, rich content, and elicitation responses. Never fabricate `accept` or `decline`; unsupported interaction returns `cancel`.
|
|
30
|
+
|
|
31
|
+
Normal Pi tools remain available directly. This decision adds MCP composition; it does not attempt to turn every Pi tool into a nested Code Mode function.
|
|
32
|
+
|
|
33
|
+
## Rationale
|
|
34
|
+
|
|
35
|
+
The process boundary provides the practical reliability benefit—one malformed snippet cannot freeze Pi—without creating an artificial authority mismatch between Pi and Code Mode. A separate security sandbox would constrain only one route while the same agent can already use Pi's deliberately unrestricted tools.
|
|
36
|
+
|
|
37
|
+
Keeping Code Mode separate also preserves this package's upstream contract, works with agent-agnostic MCP clients, and avoids coupling the implementation to Pi internals.
|
|
38
|
+
|
|
39
|
+
## Consequences
|
|
40
|
+
|
|
41
|
+
- Code Mode is a separate package and lifecycle from Computer Use.
|
|
42
|
+
- The first implementation must close the protocol-fidelity gaps found in existing standalone proxies rather than adopting one unchanged.
|
|
43
|
+
- Pi's MCP adapter remains responsible for the outer client connection and UI; the Code Mode server remains responsible for its upstream MCP connections and execution lifecycle.
|
|
44
|
+
- Process timeout, termination, restart, cleanup, and end-to-end elicitation tests are release requirements.
|
|
45
|
+
- Additional execution isolation remains an evidence-driven future option, not a default architectural requirement.
|
|
@@ -1,50 +1,74 @@
|
|
|
1
|
-
# Pi
|
|
1
|
+
# Pi integration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The native Pi adapter is the primary 0.3 path. It registers ten namespaced typed tools so Pi itself chooses each official Computer Use method and argument. Pi 0.80.7 or newer exposes them progressively without changing the ten-tool contract.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Source checkout acceptance
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npm ci
|
|
9
|
+
npm run build
|
|
10
|
+
CODEX_COMPUTER_USE_HOME="$(mktemp -d)" \
|
|
11
|
+
pi -ne -e /absolute/path/to/codex-computer-use-mcp/integrations/pi/index.ts
|
|
9
12
|
```
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
`-ne` prevents an installed 0.1 adapter from loading at the same time. This source workflow does not install or switch live Pi configuration.
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
- `/background-computer-use-status`
|
|
15
|
-
- `/background-computer-use-mode`
|
|
16
|
-
|
|
17
|
-
The adapter imports the same compiled service used by the MCP server; it does not fork the security-critical runner or policy. Pi signals tool failures by thrown error, so cancellation text carries observed methods and non-retry guidance while the complete structured method list remains in the private audit.
|
|
18
|
-
|
|
19
|
-
For a local checkout:
|
|
16
|
+
For normal installation, use the exact version 0.3.0 npm package:
|
|
20
17
|
|
|
21
18
|
```bash
|
|
22
|
-
|
|
23
|
-
pi -ne -e /absolute/path/to/codex-computer-use-mcp/integrations/pi/index.ts
|
|
19
|
+
pi install npm:codex-computer-use-mcp@0.3.0
|
|
24
20
|
```
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
Use the source workflow only when you need to test an exact reviewed commit. Follow the rollback procedure in `MIGRATION.md` when replacing version 0.1.
|
|
23
|
+
|
|
24
|
+
## Registered surface
|
|
25
|
+
|
|
26
|
+
Initially active:
|
|
27
|
+
|
|
28
|
+
- `computer_use_list_apps`
|
|
29
|
+
- `computer_use_get_app_state`
|
|
30
|
+
|
|
31
|
+
Registered and activated after a successful `get_app_state` call:
|
|
32
|
+
|
|
33
|
+
- `computer_use_click`
|
|
34
|
+
- `computer_use_perform_secondary_action`
|
|
35
|
+
- `computer_use_set_value`
|
|
36
|
+
- `computer_use_select_text`
|
|
37
|
+
- `computer_use_scroll`
|
|
38
|
+
- `computer_use_drag`
|
|
39
|
+
- `computer_use_press_key`
|
|
40
|
+
- `computer_use_type_text`
|
|
41
|
+
|
|
42
|
+
Command:
|
|
43
|
+
|
|
44
|
+
- `/computer-use-status`
|
|
45
|
+
|
|
46
|
+
The session-start narrowing preserves every active tool owned by Pi or another extension. Activation after inspection is purely additive: both inspection tools remain active, and the adapter does not remove or replace any tool in that call. The lazily activated tools rely on their official descriptions and omit `promptSnippet` and `promptGuidelines`, so native deferred schema loading does not rebuild the system prompt. Supported Anthropic and OpenAI models receive the definitions at the inspection result; other models receive Pi's normal active-tool fallback on the next request.
|
|
27
47
|
|
|
28
|
-
|
|
48
|
+
No-permissions is the only policy: all ten tools are registered and available through this lifecycle with no wrapper permission prompts, mode selector, or app/intent/action gate. The signed host runs with Codex Full access (`approvalPolicy: "never"`, `sandbox: "danger-full-access"`), so normal empty-schema Computer Use app approvals are accepted by Codex before they reach Pi. Pi renders any form, OpenAI-form, or URL elicitation app-server does emit. The user's `accept`, `decline`, or `cancel` response is returned unchanged; the adapter never fabricates one.
|
|
29
49
|
|
|
30
|
-
|
|
50
|
+
## Generic MCP gateway
|
|
31
51
|
|
|
32
|
-
|
|
52
|
+
Merge `mcp.json.example` only for the exact 0.3.0 package or after building an exact reviewed source commit. `directTools: false` is intentional; it keeps this powerful generic MCP surface behind Pi's gateway.
|
|
33
53
|
|
|
34
|
-
For a
|
|
54
|
+
For a source checkout:
|
|
35
55
|
|
|
36
56
|
```json
|
|
37
57
|
{
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
"mcpServers": {
|
|
59
|
+
"computer-use-direct-source": {
|
|
60
|
+
"command": "node",
|
|
61
|
+
"args": ["/absolute/path/to/codex-computer-use-mcp/dist/mcp-server.js"],
|
|
62
|
+
"lifecycle": "lazy",
|
|
63
|
+
"requestTimeoutMs": 180000,
|
|
64
|
+
"directTools": false
|
|
65
|
+
}
|
|
66
|
+
}
|
|
43
67
|
}
|
|
44
68
|
```
|
|
45
69
|
|
|
46
|
-
|
|
70
|
+
Do not load the native adapter and generic MCP adapter into the same acceptance process unless tool names are intentionally isolated.
|
|
47
71
|
|
|
48
|
-
|
|
72
|
+
The generic MCP path uses the same durable no-permissions and official Full access policy: all ten methods and no wrapper permission gate. App-access approvals resolve inside Codex. Any standard form or URL elicitation app-server emits is forwarded to the invoking MCP client; an unsupported or headless client returns `cancel` rather than a fabricated decision.
|
|
49
73
|
|
|
50
|
-
|
|
74
|
+
See the root `MIGRATION.md` before replacing an installed 0.1 adapter.
|