@easonwumac/computer-linker 0.1.2
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 +230 -0
- package/LICENSE +21 -0
- package/README.md +539 -0
- package/SECURITY.md +48 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +360 -0
- package/dist/audit.d.ts +70 -0
- package/dist/audit.js +102 -0
- package/dist/capabilities.d.ts +98 -0
- package/dist/capabilities.js +718 -0
- package/dist/capability-policy.d.ts +22 -0
- package/dist/capability-policy.js +103 -0
- package/dist/chatgpt.d.ts +167 -0
- package/dist/chatgpt.js +561 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +4621 -0
- package/dist/client-smoke.d.ts +44 -0
- package/dist/client-smoke.js +639 -0
- package/dist/client.d.ts +217 -0
- package/dist/client.js +357 -0
- package/dist/codex-runs.d.ts +35 -0
- package/dist/codex-runs.js +66 -0
- package/dist/computer-contract.d.ts +33 -0
- package/dist/computer-contract.js +384 -0
- package/dist/computer-operation-registry.d.ts +45 -0
- package/dist/computer-operation-registry.js +179 -0
- package/dist/config-diagnostics.d.ts +11 -0
- package/dist/config-diagnostics.js +185 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.js +69 -0
- package/dist/history-insights.d.ts +132 -0
- package/dist/history-insights.js +457 -0
- package/dist/http-auth.d.ts +3 -0
- package/dist/http-auth.js +15 -0
- package/dist/mcp-surface.d.ts +5 -0
- package/dist/mcp-surface.js +25 -0
- package/dist/oauth-provider.d.ts +52 -0
- package/dist/oauth-provider.js +325 -0
- package/dist/package-metadata.d.ts +7 -0
- package/dist/package-metadata.js +24 -0
- package/dist/permissions.d.ts +43 -0
- package/dist/permissions.js +150 -0
- package/dist/platform-shell.d.ts +28 -0
- package/dist/platform-shell.js +124 -0
- package/dist/processes.d.ts +50 -0
- package/dist/processes.js +178 -0
- package/dist/profile.d.ts +159 -0
- package/dist/profile.js +416 -0
- package/dist/screenshot.d.ts +47 -0
- package/dist/screenshot.js +302 -0
- package/dist/search.d.ts +34 -0
- package/dist/search.js +340 -0
- package/dist/security.d.ts +10 -0
- package/dist/security.js +108 -0
- package/dist/sensitive-files.d.ts +4 -0
- package/dist/sensitive-files.js +96 -0
- package/dist/server.d.ts +9 -0
- package/dist/server.js +713 -0
- package/dist/service.d.ts +125 -0
- package/dist/service.js +486 -0
- package/dist/sessions.d.ts +26 -0
- package/dist/sessions.js +34 -0
- package/dist/tunnels.d.ts +161 -0
- package/dist/tunnels.js +1243 -0
- package/dist/workspace-operations.d.ts +170 -0
- package/dist/workspace-operations.js +3219 -0
- package/dist/workspaces.d.ts +61 -0
- package/dist/workspaces.js +353 -0
- package/docs/agent-instructions.md +65 -0
- package/docs/alpha-evidence.example.json +54 -0
- package/docs/api-compatibility.md +56 -0
- package/docs/architecture.md +561 -0
- package/docs/chatgpt-setup.md +397 -0
- package/docs/client-recipes.md +98 -0
- package/docs/client-sdk.md +163 -0
- package/docs/computer-operation-v1.schema.json +143 -0
- package/docs/manual-test-plan.md +322 -0
- package/docs/product-spec.md +911 -0
- package/docs/release-checklist.md +285 -0
- package/docs/service-mode.md +99 -0
- package/examples/minimal-mcp-client.mjs +114 -0
- package/package.json +87 -0
package/README.md
ADDED
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
# Computer Linker
|
|
2
|
+
|
|
3
|
+
Computer Linker is a small local MCP server for controlling a computer through
|
|
4
|
+
an AI client.
|
|
5
|
+
|
|
6
|
+
It does two things:
|
|
7
|
+
|
|
8
|
+
1. Tell the client what this computer can do.
|
|
9
|
+
2. Run approved computer operations such as file access, search, commands,
|
|
10
|
+
Codex, screenshots, and history lookup.
|
|
11
|
+
|
|
12
|
+
It is designed for macOS, Windows, and Linux. The service runs on your own
|
|
13
|
+
computer; Cloudflare, Tailscale, or OpenAI tunnel exposure is optional.
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
Install the CLI, expose one folder, and keep the server running:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
npm install -g @easonwumac/computer-linker
|
|
21
|
+
computer-linker start C:\Projects\my-app
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Leave that terminal running. In another terminal, copy the MCP client settings
|
|
25
|
+
and verify the connection:
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
computer-linker client setup
|
|
29
|
+
computer-linker diagnose client
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`start <folder>` creates config, owner token, and a workspace entry when
|
|
33
|
+
needed. The workspace name defaults to the folder name. By default it enables
|
|
34
|
+
file edits plus approved project commands. Use `--read-only` for inspection
|
|
35
|
+
only or `--full-trust` only for folders where Codex and screen capture are
|
|
36
|
+
intended.
|
|
37
|
+
|
|
38
|
+
From this source checkout, use the same flow through the development runner:
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
npm install
|
|
42
|
+
npm run dev -- quickstart C:\Projects\my-app
|
|
43
|
+
npm run dev -- start C:\Projects\my-app
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use `client setup --show-token` only on a trusted local setup screen when the
|
|
47
|
+
client needs the bearer token.
|
|
48
|
+
|
|
49
|
+
What `start <folder>` does:
|
|
50
|
+
|
|
51
|
+
- creates config, owner token, and workspace entry when needed
|
|
52
|
+
- uses the folder name as the workspace name by default
|
|
53
|
+
- updates an existing workspace for the same folder instead of duplicating it
|
|
54
|
+
- starts the local MCP server at `http://127.0.0.1:3939/mcp`
|
|
55
|
+
- runs a startup check against health, JSON API, MCP initialize, tools/list,
|
|
56
|
+
`get_computer_info`, `computer_operation`, and operation history
|
|
57
|
+
|
|
58
|
+
`start <folder>` and `setup <folder>` default to normal coding access: file
|
|
59
|
+
edits plus approved project commands. Use `--read-only` for inspection-only
|
|
60
|
+
access, or `--full-trust` only where Codex and screen capture are intended. Add
|
|
61
|
+
`--codex` or `--screen` only for folders where those abilities are intended.
|
|
62
|
+
When shell or Codex access is enabled, Computer Linker also creates a default
|
|
63
|
+
execution policy with command allowlists and runtime/output limits.
|
|
64
|
+
File content reads and text searches block common sensitive files by default,
|
|
65
|
+
including `.env*`, private keys, credential JSON files, and cloud CLI credential
|
|
66
|
+
directories. Keep real secrets outside exposed folders.
|
|
67
|
+
|
|
68
|
+
`self-test` is safe to run before exposing real folders. It creates a temporary
|
|
69
|
+
config and workspace, starts a loopback HTTP MCP server, verifies `/healthz`,
|
|
70
|
+
the local JSON API, MCP initialize, tools/list, `get_computer_info`, and one
|
|
71
|
+
read-only `computer_operation`, then removes the temporary files.
|
|
72
|
+
|
|
73
|
+
There is no web dashboard in the product path. Human setup and management are
|
|
74
|
+
CLI-first; MCP and the JSON API are only protocol surfaces for clients,
|
|
75
|
+
automation, and smoke checks. The default help output is intentionally short;
|
|
76
|
+
use `computer-linker help advanced` for service, config, API, and compatibility
|
|
77
|
+
commands. ChatGPT-specific setup exports are compatibility helpers under
|
|
78
|
+
`computer-linker help chatgpt`; prefer the generic MCP client commands first.
|
|
79
|
+
|
|
80
|
+
`start` is local-only unless you pass `--tunnel cloudflare`, `--tunnel
|
|
81
|
+
tailscale`, or `--tunnel openai`.
|
|
82
|
+
|
|
83
|
+
## Expose To Cloud Clients
|
|
84
|
+
|
|
85
|
+
ChatGPT and other cloud MCP clients cannot connect to `127.0.0.1`. Expose the
|
|
86
|
+
local server only when you need cloud access.
|
|
87
|
+
|
|
88
|
+
OpenAI Secure MCP Tunnel does not create a public URL. Create a tunnel in the
|
|
89
|
+
OpenAI Platform tunnel settings, set an API key with Tunnels Read+Use
|
|
90
|
+
permission, then run:
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
$env:CONTROL_PLANE_API_KEY = "sk-..."
|
|
94
|
+
computer-linker start C:\Projects\my-app --tunnel openai --tunnel-id tunnel_...
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
In ChatGPT connector settings, choose the tunnel option and select or paste the
|
|
98
|
+
`tunnel_...` id. The target MCP path remains the local server path `/mcp`.
|
|
99
|
+
Do not paste the Computer Linker bearer token into ChatGPT Tunnel mode; the
|
|
100
|
+
local `tunnel-client` forwards the owner token to the private local MCP server.
|
|
101
|
+
`status` reports this as an active OpenAI Secure MCP Tunnel with no public URL;
|
|
102
|
+
`publicBaseUrl` is not required for this tunnel mode.
|
|
103
|
+
If the tunnel reports an active organization context 401, verify the API key's
|
|
104
|
+
Platform organization, Tunnels Read + Use permission, and ChatGPT workspace
|
|
105
|
+
association before changing Computer Linker config.
|
|
106
|
+
|
|
107
|
+
On first use, Computer Linker downloads the official OpenAI `tunnel-client`
|
|
108
|
+
release from `openai/tunnel-client`, verifies it against `SHA256SUMS.txt`, and
|
|
109
|
+
stores it under `~/.computer-linker/tools/openai-tunnel-client/`. It never scans
|
|
110
|
+
your Desktop for executables. To use a pinned binary instead, set
|
|
111
|
+
`COMPUTER_LINKER_OPENAI_TUNNEL_CLIENT` or pass `--tunnel-client`.
|
|
112
|
+
|
|
113
|
+
Tailscale Funnel:
|
|
114
|
+
|
|
115
|
+
```powershell
|
|
116
|
+
computer-linker start C:\Projects\my-app --tunnel tailscale
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
You do not need to type `https://<machine>.<tailnet>.ts.net` up front.
|
|
120
|
+
Computer Linker detects the Funnel URL from `tailscale funnel` output or
|
|
121
|
+
Tailscale status, prints the MCP URL, and saves the detected origin as
|
|
122
|
+
`publicBaseUrl`. The `*.ts.net` hostname is public only when Tailscale reports
|
|
123
|
+
Funnel as enabled; plain Tailscale DNS or Serve remains tailnet-only.
|
|
124
|
+
|
|
125
|
+
Cloudflare quick tunnel:
|
|
126
|
+
|
|
127
|
+
```powershell
|
|
128
|
+
computer-linker start C:\Projects\my-app --tunnel cloudflare
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Cloudflare hostname you already own:
|
|
132
|
+
|
|
133
|
+
```powershell
|
|
134
|
+
computer-linker start C:\Projects\my-app --url https://mcp.your-domain.com --tunnel cloudflare
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Tunnel commands enable `publicMcpOnly` automatically. Public-host requests to
|
|
138
|
+
`/api` and `/healthz` return 404 from Computer Linker, leaving `/mcp` as the
|
|
139
|
+
exposed product surface. If a Cloudflare hostname is configured, `setup` keeps
|
|
140
|
+
the terminal summary short; optional WAF details are available in
|
|
141
|
+
`setup --json`.
|
|
142
|
+
|
|
143
|
+
After exposure, get the current tunnel state:
|
|
144
|
+
|
|
145
|
+
```powershell
|
|
146
|
+
computer-linker tunnel status
|
|
147
|
+
computer-linker history --view connections
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For public URL based tunnels, the MCP URL is the public HTTPS URL plus `/mcp`,
|
|
151
|
+
for example:
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
https://your-public-url.example.com/mcp
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## MCP Interface
|
|
158
|
+
|
|
159
|
+
The default MCP surface is intentionally small. New clients only need three
|
|
160
|
+
tools:
|
|
161
|
+
|
|
162
|
+
| Tool | Use it for |
|
|
163
|
+
| --- | --- |
|
|
164
|
+
| `get_computer_info` | Inspect machine identity, scopes, permissions, readiness, and available ops. |
|
|
165
|
+
| `computer_operation` | Run one scoped operation through `{ scope, op, target, input, options }`. |
|
|
166
|
+
| `get_operation_history` | Review redacted connection, session, and operation history. |
|
|
167
|
+
|
|
168
|
+
Use this flow for every MCP client:
|
|
169
|
+
|
|
170
|
+
1. Call `get_computer_info`.
|
|
171
|
+
2. Pick a reported `scope`.
|
|
172
|
+
3. Call `computer_operation`.
|
|
173
|
+
4. Call `get_operation_history` when you need to inspect what happened.
|
|
174
|
+
|
|
175
|
+
For any MCP client, configure:
|
|
176
|
+
|
|
177
|
+
- Server URL: `http://127.0.0.1:3939/mcp` for local clients, or the public
|
|
178
|
+
tunnel URL plus `/mcp` for cloud clients.
|
|
179
|
+
- Auth: bearer token for public URL tunnels. OpenAI Secure MCP Tunnel is the
|
|
180
|
+
exception: choose Tunnel mode and the `tunnel_...` id; do not paste the
|
|
181
|
+
Computer Linker bearer token into ChatGPT Tunnel mode.
|
|
182
|
+
|
|
183
|
+
Use the generic CLI setup summary when configuring a client:
|
|
184
|
+
|
|
185
|
+
```powershell
|
|
186
|
+
computer-linker client setup
|
|
187
|
+
computer-linker client setup --details
|
|
188
|
+
computer-linker client setup --show-token
|
|
189
|
+
computer-linker diagnose client
|
|
190
|
+
computer-linker client smoke --allow-http --url http://127.0.0.1:3939/mcp
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`client setup` prints the short connection summary. Use `--details` for the
|
|
194
|
+
tool list, first prompt, and copy-pasteable agent instructions. Use
|
|
195
|
+
`--show-token` only on a trusted local setup screen. `client smoke` initializes
|
|
196
|
+
`/mcp`, lists tools, calls `get_computer_info`, and runs one read-only
|
|
197
|
+
`computer_operation`. `diagnose client` combines setup readiness, MCP smoke,
|
|
198
|
+
and recent connection history into one troubleshooting summary.
|
|
199
|
+
|
|
200
|
+
The repository also includes a minimal MCP client example:
|
|
201
|
+
|
|
202
|
+
```powershell
|
|
203
|
+
$env:COMPUTER_LINKER_MCP_URL = "http://127.0.0.1:3939/mcp"
|
|
204
|
+
$env:COMPUTER_LINKER_TOKEN = "<ownerToken>"
|
|
205
|
+
node examples/minimal-mcp-client.mjs
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
More client-specific recipes are in [docs/client-recipes.md](docs/client-recipes.md).
|
|
209
|
+
|
|
210
|
+
### Agent Instructions
|
|
211
|
+
|
|
212
|
+
Paste this into the connected agent when you want it to operate through
|
|
213
|
+
Computer Linker:
|
|
214
|
+
|
|
215
|
+
```text
|
|
216
|
+
You are connected to Computer Linker, a local MCP server for this computer.
|
|
217
|
+
First call get_computer_info to inspect available scopes, permissions, and safety boundaries.
|
|
218
|
+
Call computer_operation with dotted ops from computerOperationRegistry and the stable envelope {scope, op, target, input, options}.
|
|
219
|
+
Stay inside configured scopes. Prefer code.context, file.search, file.read, git.diff, and get_operation_history before write.
|
|
220
|
+
Use write, shell, command, or codex operations only when the reported permissions allow them.
|
|
221
|
+
Do not call workspace_operation, read, ls, grep, glob, or create_file unless the server explicitly exposes compatibility tools.
|
|
222
|
+
If tunnel or connection behavior is unclear, inspect get_operation_history before changing anything.
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Common Operations
|
|
226
|
+
|
|
227
|
+
Start with these before reaching for the full registry:
|
|
228
|
+
|
|
229
|
+
| Intent | `computer_operation` input |
|
|
230
|
+
| --- | --- |
|
|
231
|
+
| Project overview | `{ "scope": "app", "op": "code.context", "target": ".", "options": { "maxDepth": 2, "maxEntries": 100 } }` |
|
|
232
|
+
| List files | `{ "scope": "app", "op": "file.list", "target": ".", "options": { "maxEntries": 50 } }` |
|
|
233
|
+
| Search text | `{ "scope": "app", "op": "file.search", "target": ".", "input": { "query": "TODO" }, "options": { "maxResults": 20 } }` |
|
|
234
|
+
| Read file | `{ "scope": "app", "op": "file.read", "target": "README.md", "options": { "maxBytes": 65536 } }` |
|
|
235
|
+
| Review changes | `{ "scope": "app", "op": "git.diff", "target": ".", "options": { "maxBytes": 65536 } }` |
|
|
236
|
+
|
|
237
|
+
For verification in development scopes, use `package.run` only when the selected
|
|
238
|
+
scope allows shell/package execution:
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{ "scope": "app", "op": "package.run", "target": ".", "input": { "script": "test" }, "options": { "timeoutSeconds": 600 } }
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Operation Shape
|
|
245
|
+
|
|
246
|
+
Every operation uses the same request envelope:
|
|
247
|
+
|
|
248
|
+
```json
|
|
249
|
+
{
|
|
250
|
+
"scope": "app",
|
|
251
|
+
"op": "file.search",
|
|
252
|
+
"target": ".",
|
|
253
|
+
"input": { "query": "TODO", "glob": "*.ts" },
|
|
254
|
+
"options": { "maxResults": 20 }
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
`computer_operation` returns the same result envelope for success and failure:
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"ok": true,
|
|
263
|
+
"operationId": "op_...",
|
|
264
|
+
"scope": "app",
|
|
265
|
+
"op": "file.search",
|
|
266
|
+
"startedAt": "2026-06-23T00:00:00.000Z",
|
|
267
|
+
"durationMs": 12,
|
|
268
|
+
"data": {},
|
|
269
|
+
"warnings": []
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
The full operation registry is returned by `get_computer_info`. The stable
|
|
274
|
+
request/result schema is documented in
|
|
275
|
+
[docs/computer-operation-v1.schema.json](docs/computer-operation-v1.schema.json).
|
|
276
|
+
The compatibility policy for the public MCP surface is documented in
|
|
277
|
+
[docs/api-compatibility.md](docs/api-compatibility.md), and reusable agent
|
|
278
|
+
setup guidance is in [docs/agent-instructions.md](docs/agent-instructions.md).
|
|
279
|
+
|
|
280
|
+
Compatibility tools such as `get_capabilities`, `list_workspaces`,
|
|
281
|
+
`open_workspace`, `workspace_operation`, `read`, `ls`, `grep`, `glob`, and
|
|
282
|
+
`create_file` are hidden from the default MCP surface. Set
|
|
283
|
+
`COMPUTER_LINKER_MCP_TOOL_SURFACE=compatibility` only for older clients that
|
|
284
|
+
still need those tool names.
|
|
285
|
+
|
|
286
|
+
File operations are scoped to configured folders. Command and Codex operations
|
|
287
|
+
start in the configured scope, but they are normal local execution, so only
|
|
288
|
+
enable them for folders you trust.
|
|
289
|
+
Sensitive file content is blocked by default for direct reads and searches;
|
|
290
|
+
directory listings may still show file names so the agent can understand project
|
|
291
|
+
shape without receiving secret values.
|
|
292
|
+
|
|
293
|
+
## Configure Scopes
|
|
294
|
+
|
|
295
|
+
Scopes define what the MCP client can touch.
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
computer-linker workspace list
|
|
299
|
+
computer-linker workspace add ~/work/app --write --shell --codex --screen
|
|
300
|
+
computer-linker workspace add ~/work/app --id app --name "Main app"
|
|
301
|
+
computer-linker workspace update app --no-shell --no-screen
|
|
302
|
+
computer-linker workspace remove app
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
When `--id` or `--name` is omitted, Computer Linker derives it from the folder
|
|
306
|
+
name. Direct `workspace add` scopes default to read-only with screen capture
|
|
307
|
+
disabled. Add `--write`, `--shell`, `--codex`, or `--screen` separately only
|
|
308
|
+
where needed. For daily setup, prefer `computer-linker start <folder>`; it
|
|
309
|
+
creates a normal coding workspace and default execution policy automatically.
|
|
310
|
+
Advanced `workspace add/update` flows leave policy management explicit through
|
|
311
|
+
`config policy`.
|
|
312
|
+
|
|
313
|
+
The config lives at:
|
|
314
|
+
|
|
315
|
+
```text
|
|
316
|
+
~/.computer-linker/config.json
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
`config show` redacts the owner token by default; use `--show-token` only on a
|
|
320
|
+
trusted local setup screen.
|
|
321
|
+
|
|
322
|
+
For shell-enabled scopes, `config.json` can set or refine conservative command
|
|
323
|
+
policy:
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
{
|
|
327
|
+
"id": "app",
|
|
328
|
+
"policy": {
|
|
329
|
+
"maxRuntimeSeconds": 600,
|
|
330
|
+
"maxOutputBytes": 200000,
|
|
331
|
+
"allowedCommands": ["npm *", "pnpm *", "yarn *", "bun *", "node *", "npx *", "git *"],
|
|
332
|
+
"deniedCommands": ["rm -rf *", "del /s *", "rmdir /s *", "format *", "shutdown *"]
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
The same policy can be maintained without editing JSON by hand:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
computer-linker config policy app --allow "npm *" --allow "git *" --deny "rm -rf *" --max-runtime-seconds 600 --max-output-bytes 200000
|
|
341
|
+
computer-linker config policy app --json
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Owner-token maintenance is also CLI-managed. Status output redacts the token;
|
|
345
|
+
use `--show-token` only on a trusted local setup screen when updating an MCP
|
|
346
|
+
client:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
computer-linker init
|
|
350
|
+
computer-linker config token
|
|
351
|
+
computer-linker client setup --show-token
|
|
352
|
+
computer-linker profile --show-token
|
|
353
|
+
computer-linker config token rotate --show-token
|
|
354
|
+
computer-linker config token rotate --json
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## Run As A Service
|
|
358
|
+
|
|
359
|
+
For daily use on Windows, macOS, or Linux, install the background service after
|
|
360
|
+
your config works in the foreground:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
computer-linker service install --dry-run
|
|
364
|
+
computer-linker service install --yes
|
|
365
|
+
computer-linker service start
|
|
366
|
+
computer-linker service status
|
|
367
|
+
computer-linker service logs
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
Remove it later with:
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
computer-linker service stop
|
|
374
|
+
computer-linker service uninstall --yes
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Windows install/uninstall must run from an elevated PowerShell prompt. See
|
|
378
|
+
[docs/service-mode.md](docs/service-mode.md) for generated files and platform
|
|
379
|
+
notes.
|
|
380
|
+
|
|
381
|
+
## Check Readiness
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
computer-linker status
|
|
385
|
+
computer-linker status --details
|
|
386
|
+
computer-linker doctor
|
|
387
|
+
computer-linker doctor --json
|
|
388
|
+
computer-linker doctor --fix --dry-run
|
|
389
|
+
computer-linker doctor --fix
|
|
390
|
+
computer-linker config validate
|
|
391
|
+
computer-linker config validate --json
|
|
392
|
+
computer-linker diagnose client
|
|
393
|
+
computer-linker process list <workspace-id>
|
|
394
|
+
computer-linker process read <workspace-id> proc_...
|
|
395
|
+
computer-linker process stop <workspace-id> proc_...
|
|
396
|
+
computer-linker screen status
|
|
397
|
+
computer-linker screen status --json
|
|
398
|
+
computer-linker client chatgpt smoke --url http://127.0.0.1:3939/mcp --allow-http
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
`status` is the short daily check: readiness, connection mode, local MCP URL,
|
|
402
|
+
workspace/tunnel summary, and the next few actions. Use `status --details`
|
|
403
|
+
when you want the full workspace list, warnings, running tunnel rows, and all
|
|
404
|
+
next actions.
|
|
405
|
+
`doctor` checks platform info, Node, local tools such as `rg`, `git`, `codex`,
|
|
406
|
+
workspace permissions, config diagnostics, auth, tunnel readiness, security
|
|
407
|
+
findings, and `releaseReadiness`.
|
|
408
|
+
`doctor --fix --dry-run` previews the same repairs without writing the config.
|
|
409
|
+
`doctor --fix` applies low-risk config repairs: remove the bootstrap `current`
|
|
410
|
+
scope after explicit scopes exist, remove exact duplicate folder scopes that
|
|
411
|
+
have the same permissions and policy, and add missing default execution policy
|
|
412
|
+
fields for shell/Codex scopes.
|
|
413
|
+
`config validate` prints the config/security/release-readiness subset and exits
|
|
414
|
+
non-zero when the release status is blocked.
|
|
415
|
+
`diagnose client` runs client setup checks, a minimal MCP SDK flow, and redacted
|
|
416
|
+
connection-history inspection in one command.
|
|
417
|
+
`process list/read/stop` talks to the running local HTTP server, so it manages
|
|
418
|
+
active background command and Codex processes that were started through MCP.
|
|
419
|
+
|
|
420
|
+
The release readiness block is intended for productization gates:
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
computer-linker doctor --json
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Look for:
|
|
427
|
+
|
|
428
|
+
```json
|
|
429
|
+
{
|
|
430
|
+
"releaseReadiness": {
|
|
431
|
+
"ready": true,
|
|
432
|
+
"status": "ready",
|
|
433
|
+
"recommendedGate": "npm run product:check"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
## Build And Test
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
npm run typecheck
|
|
442
|
+
npm test
|
|
443
|
+
npm run release:validate
|
|
444
|
+
npm run build
|
|
445
|
+
npm run pack:smoke
|
|
446
|
+
npm run product:check
|
|
447
|
+
npm run alpha:check
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
`npm test` prints per-file progress and durations. Use
|
|
451
|
+
`node scripts/run-tests.mjs --list` to see the test labels, or pass a label/path
|
|
452
|
+
fragment such as `node scripts/run-tests.mjs cli` for a focused local run.
|
|
453
|
+
|
|
454
|
+
The default GitHub Actions gate is manual and cost-capped: it runs
|
|
455
|
+
`npm run product:check` on `windows-latest` with Node 22. Run it from
|
|
456
|
+
`workflow_dispatch` when Actions budget is available. Run broader OS or Node
|
|
457
|
+
coverage manually only when preparing a wider release. `npm run release:validate`
|
|
458
|
+
rejects automatic triggers, matrix jobs, non-Windows runners, and extra Node
|
|
459
|
+
versions in the default workflows.
|
|
460
|
+
|
|
461
|
+
## Productization Gate
|
|
462
|
+
|
|
463
|
+
For normal local development, the main gate is:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
npm ci
|
|
467
|
+
npm run product:check
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
For npm publishing, use the local release wrapper instead of hand-running every
|
|
471
|
+
step:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
npm run release:check
|
|
475
|
+
npm run release:dry-run
|
|
476
|
+
npm run release:publish -- --create-tag --otp <code>
|
|
477
|
+
git push origin main --follow-tags
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
`release:check` runs the local product/public package gates without publishing.
|
|
481
|
+
`release:dry-run` runs `npm publish --dry-run` and creates a temporary local
|
|
482
|
+
`v<package.version>` tag only for that dry-run when the tag is missing.
|
|
483
|
+
`release:publish` requires a clean main/master worktree, a dated changelog
|
|
484
|
+
heading, npm login, and a release tag. Pass `--create-tag` to create the tag
|
|
485
|
+
on `HEAD`; pass `--push` only when you want the script to push `HEAD` and tags
|
|
486
|
+
after a successful npm publish.
|
|
487
|
+
|
|
488
|
+
For a public alpha from this private dogfooding checkout, use the fresh public
|
|
489
|
+
snapshot path:
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
npm run public:release-ready
|
|
493
|
+
npm run public:mirror -- --remote <github-owner>/<public-repo>
|
|
494
|
+
git -C ../computer-linker-public push -u origin main --follow-tags
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
`public:release-ready` is the final local preflight before publishing the public
|
|
498
|
+
mirror. It runs the alpha readiness gate with external evidence required and
|
|
499
|
+
also requires the current `CHANGELOG.md` package heading to be dated instead of
|
|
500
|
+
`Unreleased`.
|
|
501
|
+
|
|
502
|
+
`public:mirror` runs public readiness once, accepts the known private-history
|
|
503
|
+
warning only for the detached one-commit snapshot path, then creates or updates
|
|
504
|
+
the one-commit mirror with a `v<package.version>` release tag for publish and
|
|
505
|
+
Release workflow guards. A real publishable mirror requires the matching
|
|
506
|
+
changelog heading to be dated instead of `Unreleased`; dry runs print whether
|
|
507
|
+
the real run would be blocked. Do not make this existing repo public with
|
|
508
|
+
preserved history unless the stricter direct-repo gate passes:
|
|
509
|
+
|
|
510
|
+
```bash
|
|
511
|
+
npm run public:repo-ready
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
Before announcing a public alpha, capture one real external MCP client/tunnel
|
|
515
|
+
pass:
|
|
516
|
+
|
|
517
|
+
```bash
|
|
518
|
+
npm run alpha:evidence -- preflight
|
|
519
|
+
npm run alpha:evidence -- smoke --redaction-confirmed
|
|
520
|
+
npm run alpha:check -- --require-evidence --accept-public-snapshot
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
Paste the preflight prompt into the external MCP client first. The generated
|
|
524
|
+
`.computer-linker-alpha-evidence.json` file is gitignored and must not contain
|
|
525
|
+
owner tokens, API keys, bearer headers, screenshots, or private file contents.
|
|
526
|
+
The stricter release and publish rules live in
|
|
527
|
+
[docs/release-checklist.md](docs/release-checklist.md).
|
|
528
|
+
|
|
529
|
+
## Product Boundary
|
|
530
|
+
|
|
531
|
+
Computer Linker is not a remote desktop, a cloud service, or a ChatGPT-specific
|
|
532
|
+
app. It is a local MCP program that exposes approved computer abilities.
|
|
533
|
+
|
|
534
|
+
See [docs/product-spec.md](docs/product-spec.md) for the product spec and
|
|
535
|
+
[docs/architecture.md](docs/architecture.md) for implementation notes. See
|
|
536
|
+
[docs/release-checklist.md](docs/release-checklist.md) for the alpha release
|
|
537
|
+
checklist, [docs/manual-test-plan.md](docs/manual-test-plan.md) for dogfooding,
|
|
538
|
+
and [SECURITY.md](SECURITY.md) for the current security model. Public
|
|
539
|
+
contribution and issue guidelines are in [CONTRIBUTING.md](CONTRIBUTING.md).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
Computer Linker is local-first software that exposes a user's computer to an
|
|
4
|
+
MCP client. Treat every configured scope as a trust boundary.
|
|
5
|
+
|
|
6
|
+
## Supported Versions
|
|
7
|
+
|
|
8
|
+
Computer Linker is currently pre-1.0. Security fixes are targeted at the
|
|
9
|
+
latest published version only until a stable release line exists.
|
|
10
|
+
|
|
11
|
+
## Reporting A Vulnerability
|
|
12
|
+
|
|
13
|
+
Please report vulnerabilities through GitHub Security Advisories on the
|
|
14
|
+
repository. If advisories are unavailable, open a minimal issue that does not
|
|
15
|
+
include exploit details and request a private disclosure path.
|
|
16
|
+
|
|
17
|
+
Include:
|
|
18
|
+
|
|
19
|
+
- affected version or commit
|
|
20
|
+
- operating system and Node version
|
|
21
|
+
- whether the server was loopback-only or exposed through a tunnel
|
|
22
|
+
- configured workspace permissions relevant to the issue
|
|
23
|
+
- concise reproduction steps
|
|
24
|
+
|
|
25
|
+
## Security Model
|
|
26
|
+
|
|
27
|
+
- Read, write, search, patch, and direct Git operations resolve paths inside the
|
|
28
|
+
configured workspace before touching the filesystem.
|
|
29
|
+
- Shell, package script, managed process, and Codex operations start with the
|
|
30
|
+
workspace as the current directory, but they are not OS filesystem sandboxes.
|
|
31
|
+
- Do not enable `shell` or `codex` on folders you do not trust.
|
|
32
|
+
- Use workspace `policy.allowedCommands`, `policy.deniedCommands`,
|
|
33
|
+
`policy.maxRuntimeSeconds`, and `policy.maxOutputBytes` for shell-enabled
|
|
34
|
+
scopes.
|
|
35
|
+
- Do not expose HTTP mode outside loopback without an owner token and an
|
|
36
|
+
appropriate tunnel or network access-control layer.
|
|
37
|
+
- Tokens, file contents, write payloads, and screenshot image bytes are not
|
|
38
|
+
intentionally written to the audit log, but command output can contain
|
|
39
|
+
sensitive data if a command prints it.
|
|
40
|
+
- Screenshot capture history is not directly replayable; request a fresh
|
|
41
|
+
explicit capture instead.
|
|
42
|
+
|
|
43
|
+
Before sharing a build outside local dogfooding, run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run public:check
|
|
47
|
+
node dist/cli.js config validate
|
|
48
|
+
```
|
package/dist/api.d.ts
ADDED