free-computer-use 0.1.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.
Files changed (135) hide show
  1. package/.env.example +31 -0
  2. package/CHANGELOG.md +19 -0
  3. package/CONTRIBUTING.md +66 -0
  4. package/LICENSE +21 -0
  5. package/README.md +140 -0
  6. package/SECURITY.md +133 -0
  7. package/artifacts/benchmark-public.json +797 -0
  8. package/assets/readme/hero.svg +53 -0
  9. package/assets/readme/incident-demo.gif +0 -0
  10. package/assets/readme/incident-evidence.json +52 -0
  11. package/dist/actions/compiler.d.ts +5 -0
  12. package/dist/actions/compiler.js +16 -0
  13. package/dist/actions/compiler.js.map +1 -0
  14. package/dist/actions/executor.d.ts +38 -0
  15. package/dist/actions/executor.js +305 -0
  16. package/dist/actions/executor.js.map +1 -0
  17. package/dist/actions/policy.d.ts +4 -0
  18. package/dist/actions/policy.js +18 -0
  19. package/dist/actions/policy.js.map +1 -0
  20. package/dist/actions/schema.d.ts +4149 -0
  21. package/dist/actions/schema.js +59 -0
  22. package/dist/actions/schema.js.map +1 -0
  23. package/dist/adapters/generic.d.ts +14 -0
  24. package/dist/adapters/generic.js +33 -0
  25. package/dist/adapters/generic.js.map +1 -0
  26. package/dist/agent/Agent.d.ts +69 -0
  27. package/dist/agent/Agent.js +375 -0
  28. package/dist/agent/Agent.js.map +1 -0
  29. package/dist/agent/Control.d.ts +23 -0
  30. package/dist/agent/Control.js +51 -0
  31. package/dist/agent/Control.js.map +1 -0
  32. package/dist/agent/TokenBudget.d.ts +52 -0
  33. package/dist/agent/TokenBudget.js +47 -0
  34. package/dist/agent/TokenBudget.js.map +1 -0
  35. package/dist/agent/goalCriteria.d.ts +2 -0
  36. package/dist/agent/goalCriteria.js +13 -0
  37. package/dist/agent/goalCriteria.js.map +1 -0
  38. package/dist/browser/Browser.d.ts +72 -0
  39. package/dist/browser/Browser.js +378 -0
  40. package/dist/browser/Browser.js.map +1 -0
  41. package/dist/browser/DomExtractor.d.ts +6 -0
  42. package/dist/browser/DomExtractor.js +134 -0
  43. package/dist/browser/DomExtractor.js.map +1 -0
  44. package/dist/browser/Interaction.d.ts +43 -0
  45. package/dist/browser/Interaction.js +225 -0
  46. package/dist/browser/Interaction.js.map +1 -0
  47. package/dist/browser/NetworkGuardProxy.d.ts +31 -0
  48. package/dist/browser/NetworkGuardProxy.js +331 -0
  49. package/dist/browser/NetworkGuardProxy.js.map +1 -0
  50. package/dist/browser/Observer.d.ts +12 -0
  51. package/dist/browser/Observer.js +31 -0
  52. package/dist/browser/Observer.js.map +1 -0
  53. package/dist/browser/PageCompressor.d.ts +47 -0
  54. package/dist/browser/PageCompressor.js +62 -0
  55. package/dist/browser/PageCompressor.js.map +1 -0
  56. package/dist/browser/SecurityBoundaryError.d.ts +3 -0
  57. package/dist/browser/SecurityBoundaryError.js +4 -0
  58. package/dist/browser/SecurityBoundaryError.js.map +1 -0
  59. package/dist/browser/SelectorEngine.d.ts +18 -0
  60. package/dist/browser/SelectorEngine.js +72 -0
  61. package/dist/browser/SelectorEngine.js.map +1 -0
  62. package/dist/browser/types.d.ts +38 -0
  63. package/dist/browser/types.js +2 -0
  64. package/dist/browser/types.js.map +1 -0
  65. package/dist/cli/index.d.ts +2 -0
  66. package/dist/cli/index.js +284 -0
  67. package/dist/cli/index.js.map +1 -0
  68. package/dist/config.d.ts +11 -0
  69. package/dist/config.js +77 -0
  70. package/dist/config.js.map +1 -0
  71. package/dist/history/TraceStore.d.ts +29 -0
  72. package/dist/history/TraceStore.js +53 -0
  73. package/dist/history/TraceStore.js.map +1 -0
  74. package/dist/index.d.ts +18 -0
  75. package/dist/index.js +16 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/llm/ClaudeSubscriptionProvider.d.ts +26 -0
  78. package/dist/llm/ClaudeSubscriptionProvider.js +182 -0
  79. package/dist/llm/ClaudeSubscriptionProvider.js.map +1 -0
  80. package/dist/llm/CodexSubscriptionProvider.d.ts +26 -0
  81. package/dist/llm/CodexSubscriptionProvider.js +168 -0
  82. package/dist/llm/CodexSubscriptionProvider.js.map +1 -0
  83. package/dist/llm/FlashProvider.d.ts +27 -0
  84. package/dist/llm/FlashProvider.js +103 -0
  85. package/dist/llm/FlashProvider.js.map +1 -0
  86. package/dist/llm/LLMProvider.d.ts +37 -0
  87. package/dist/llm/LLMProvider.js +2 -0
  88. package/dist/llm/LLMProvider.js.map +1 -0
  89. package/dist/llm/cliEnvironment.d.ts +5 -0
  90. package/dist/llm/cliEnvironment.js +21 -0
  91. package/dist/llm/cliEnvironment.js.map +1 -0
  92. package/dist/llm/prompts.d.ts +4 -0
  93. package/dist/llm/prompts.js +12 -0
  94. package/dist/llm/prompts.js.map +1 -0
  95. package/dist/llm/structuredOutput.d.ts +3 -0
  96. package/dist/llm/structuredOutput.js +58 -0
  97. package/dist/llm/structuredOutput.js.map +1 -0
  98. package/dist/mcp/index.d.ts +13 -0
  99. package/dist/mcp/index.js +243 -0
  100. package/dist/mcp/index.js.map +1 -0
  101. package/dist/profile/ProfileStore.d.ts +7 -0
  102. package/dist/profile/ProfileStore.js +52 -0
  103. package/dist/profile/ProfileStore.js.map +1 -0
  104. package/dist/profile/VariableResolver.d.ts +15 -0
  105. package/dist/profile/VariableResolver.js +50 -0
  106. package/dist/profile/VariableResolver.js.map +1 -0
  107. package/dist/server/index.d.ts +14 -0
  108. package/dist/server/index.js +239 -0
  109. package/dist/server/index.js.map +1 -0
  110. package/dist/ui/app.js +132 -0
  111. package/dist/ui/index.html +29 -0
  112. package/dist/ui/logo.svg +5 -0
  113. package/dist/ui/results.js +59 -0
  114. package/dist/ui/style.css +33 -0
  115. package/dist/verification/Verifier.d.ts +72 -0
  116. package/dist/verification/Verifier.js +87 -0
  117. package/dist/verification/Verifier.js.map +1 -0
  118. package/dist/workflows/WorkflowEngine.d.ts +23 -0
  119. package/dist/workflows/WorkflowEngine.js +52 -0
  120. package/dist/workflows/WorkflowEngine.js.map +1 -0
  121. package/docs/ADOPTION.md +61 -0
  122. package/docs/ARCHITECTURE.md +65 -0
  123. package/docs/BENCHMARKS.md +64 -0
  124. package/docs/IMPLEMENTATION.md +93 -0
  125. package/docs/LOCAL_DATA.md +98 -0
  126. package/docs/LOCAL_VALIDATION.md +87 -0
  127. package/docs/MCP.md +81 -0
  128. package/docs/PROVIDERS.md +150 -0
  129. package/docs/RELEASE_CHECKLIST.md +37 -0
  130. package/docs/REQUIREMENTS.md +39 -0
  131. package/docs/SUPPORT_MATRIX.md +193 -0
  132. package/docs/THREAT_MODEL.md +108 -0
  133. package/docs/USEFUL_EXAMPLES.md +151 -0
  134. package/docs/brand-mark.svg +12 -0
  135. package/package.json +90 -0
@@ -0,0 +1,98 @@
1
+ # Local data
2
+
3
+ FreeComputerUse stores run history, learned workflows, the local profile, browser
4
+ session data and downloaded files in its data directory. By default this is
5
+ `.fcu` under the directory from which the CLI starts. `FCU_DATA_DIR` overrides
6
+ that path; relative overrides are also resolved from the starting directory.
7
+ Choose a dedicated directory. The app rejects a symlink or shared system/workspace
8
+ root at this configured path and restricts it to owner access on POSIX systems.
9
+ Direct library use of `TraceStore` requires a private parent directory (mode
10
+ `0700`); it refuses a shared parent without changing that directory's permissions.
11
+
12
+ The project-root `.env` file is separate. It can contain provider credentials
13
+ and is not included when you copy `.fcu`.
14
+
15
+ ## Inspect
16
+
17
+ Stop the browser task first. In the project directory, inspect `.fcu` with your
18
+ file manager or list its contents in a terminal. The `profile.json` file stores
19
+ the values you entered; `history.sqlite` stores run traces and learned workflows;
20
+ `browser/` contains the persistent browser session; `downloads/` contains files
21
+ saved by tasks. These files are local and are not encrypted.
22
+
23
+ Before a URL is sent in model context, saved in a new trace, or shown in
24
+ dashboard state and CLI history, credentials in URL queries/fragments and
25
+ bearer-shaped tokens are replaced with `REDACTED`. The browser still opens the
26
+ original URL. A replay that depended on a hidden URL credential needs a fresh
27
+ starting URL. This name-based filter cannot recognize every secret; review local
28
+ data and screenshots before sharing.
29
+
30
+ To inspect run summaries and learned workflows from a source checkout:
31
+
32
+ ```sh
33
+ npm run agent -- history
34
+ npm run agent -- workflows
35
+ ```
36
+
37
+ Treat full traces, profile values, browser data and downloads as private. Do not
38
+ attach them to an issue or share them without reviewing their contents.
39
+
40
+ ## Retention
41
+
42
+ There is no automatic expiry or pruning. Run history, learned workflows, browser
43
+ sessions and downloads remain in the data directory until you remove it. The
44
+ CLI/dashboard history limits only limit how many summaries they display; they
45
+ do not delete older traces.
46
+
47
+ ## Export
48
+
49
+ Stop FreeComputerUse, then copy the entire data directory to a private backup
50
+ location. Include hidden files. For a custom `FCU_DATA_DIR`, copy that directory
51
+ instead of `.fcu`. Keep the backup on storage protected by your OS account; it
52
+ contains browser sessions and may contain personal information.
53
+
54
+ macOS:
55
+
56
+ ```sh
57
+ ditto .fcu /path/to/private-backup/fcu-data
58
+ ```
59
+
60
+ Linux:
61
+
62
+ ```sh
63
+ cp -a .fcu /path/to/private-backup/fcu-data
64
+ ```
65
+
66
+ Windows PowerShell:
67
+
68
+ ```powershell
69
+ Copy-Item -LiteralPath .fcu -Destination C:\path\to\private-backup\fcu-data -Recurse
70
+ ```
71
+
72
+ ## Delete
73
+
74
+ Stop FreeComputerUse and confirm the exact data directory before deleting it.
75
+ The following removes the default `.fcu` directory from the current project; it
76
+ does not remove `.env` or a custom `FCU_DATA_DIR` elsewhere.
77
+
78
+ macOS/Linux:
79
+
80
+ ```sh
81
+ rm -r -- .fcu
82
+ ```
83
+
84
+ Windows PowerShell:
85
+
86
+ ```powershell
87
+ Remove-Item -LiteralPath .fcu -Recurse
88
+ ```
89
+
90
+ To delete data stored at a custom `FCU_DATA_DIR`, substitute its resolved path
91
+ after checking that it is the intended directory. Removing this folder deletes
92
+ profiles, history, workflows, browser cookies/session data and task downloads.
93
+
94
+ On macOS 26.6 with Node 25.9.0, the `ditto` backup and `rm -r --` deletion
95
+ commands were checked against a disposable directory containing synthetic
96
+ profile/history files. The copied contents matched; after deletion, the app's
97
+ directory initializer recreated an empty data directory. Linux and Windows
98
+ commands have not been run here.
@@ -0,0 +1,87 @@
1
+ # Local validation only
2
+
3
+ The project has no GitHub CI workflow. The former validation workflow is disabled
4
+ on GitHub, and its source definition has been removed at the owner's request.
5
+ Do not enable or dispatch GitHub validation runs.
6
+
7
+ ## Full local gate
8
+
9
+ Use a clean checkout with Git history, Node `>=22.13.0`, npm, and an installed
10
+ Chrome or Edge browser. No provider key is needed. From the checkout root:
11
+
12
+ ```bash
13
+ npm ci
14
+ FCU_BROWSER_CHANNEL=chrome npm run validate
15
+ ```
16
+
17
+ `npm ci` installs package dependencies; it does not download a browser. The
18
+ installed-browser channel is best-effort because Playwright may not match that
19
+ browser build. Use `FCU_BROWSER_CHANNEL=msedge` if Edge is installed instead.
20
+
21
+ `npm run validate` runs these checks in order:
22
+
23
+ 1. `lab:build` regenerates `docs/lab` and preserves the product landing page at
24
+ `docs/index.html`.
25
+ 2. `check` type-checks source, tests, fixtures, and scripts.
26
+ 3. `test` runs the serial unit, provider-contract, CLI, and browser suite against
27
+ local fixtures; it does not make live model-provider calls.
28
+ 4. `build` compiles the package and copies its UI assets.
29
+ 5. `security` scans tracked worktree files and unique blobs and paths reachable
30
+ from Git refs for known credential patterns and private-state paths. This is
31
+ a pattern scan, not a complete security audit.
32
+ 6. `npm audit --omit=dev --audit-level=high` checks production dependencies and
33
+ needs registry access.
34
+
35
+ A passing run exits with code `0`, all tests passing, a `Security scan passed`
36
+ summary, and no high-severity production dependency findings. Test totals and
37
+ scan counts vary with repository contents. Keep the terminal output with the
38
+ commit hash and environment when recording a validation result; never record API
39
+ keys, cookies, or user data.
40
+
41
+ On 24 September 2026, a clean checkout completed `npm ci --offline
42
+ --no-audit --no-fund` without a browser download, then passed the complete gate
43
+ on macOS `26.6`, Node `25.9.0`, and system Chrome `154.0.8037.57` at commit
44
+ `1ca1006`: 101/101 tests in 151.35 seconds, 157.19 seconds total, build passed,
45
+ the scan checked 248 worktree files plus 250 unique historical paths and 948
46
+ unique blobs, and npm audit reported zero vulnerabilities. The latest full
47
+ validation at commit `d978b06` passed 102/102 tests, build, the security scan
48
+ (255 worktree files, 257 historical paths, 980 blobs) and npm audit with zero
49
+ vulnerabilities, using an empty `LLM_API_KEY`. The latest run on `main` at
50
+ commit `aa9500d` passed 106/106 tests in 190.06 seconds, build, security scan
51
+ (260 worktree files, 262 historical paths, 1,014 blobs) and npm audit with zero
52
+ vulnerabilities. The latest run on `main` at commit `3fa3d6f` passed 106/106
53
+ tests in 161.24 seconds, build, security scan (260 worktree files, 262
54
+ historical paths, 1,020 blobs) and npm audit with zero vulnerabilities. Both
55
+ runs used macOS `26.6`, Node `25.9.0`, and system Chrome `154.0.8037.57`; the
56
+ test gate made no live provider calls and triggered no GitHub Actions workflow.
57
+ An earlier run had been stopped after 2
58
+ minutes 30 seconds in the former per-file history scan; the batched object scan
59
+ and deleted-secret regression test resolved that bottleneck.
60
+
61
+ One earlier clean run failed 100/101 on a transient dashboard `502`; the first
62
+ assertion reported only Chrome’s generic console message. The test now asserts
63
+ captured HTTP 5xx paths before generic console errors. A focused rerun and two
64
+ subsequent complete suites passed, but the original failure did not recur, so
65
+ its source remains unknown. See the [support matrix](SUPPORT_MATRIX.md) for
66
+ platform limits.
67
+
68
+ Live-provider benchmarks are separate, opt-in commands and may spend API
69
+ tokens: `npm run benchmark -- --live`, `npm run benchmark:public`,
70
+ `npm run benchmark:complex -- --live`, and `npm run benchmark:real`. The
71
+ `security:wss` smoke makes a network request to Postman Echo but uses no model
72
+ key. None of these commands is part of `npm run validate`.
73
+
74
+ `FCU_BROWSER_CHANNEL=chrome npm run security:wss` is an optional live network
75
+ check. It uses installed Chrome to connect to Postman Echo over WSS, relies on
76
+ Chrome’s default TLS validation, and sends one fixed synthetic string. It does not
77
+ use a model key and is excluded from `npm run validate`; endpoint availability
78
+ can change.
79
+
80
+ `FCU_BROWSER_CHANNEL=chrome npm run ui:smoke` is a local no-provider first-run
81
+ smoke. It checks visible control names, text contrast (4.5:1 for normal text and 3:1
82
+ for large text), approval before site navigation, a sandbox extraction and
83
+ result, browser console output, and dashboard widths 320, 390, 768 and 1600 px.
84
+ It does not validate a live model provider or screen-reader behavior.
85
+
86
+ GitHub Pages is the existing host for the public static lab. Hosting publication
87
+ is separate from the removed CI checks.
package/docs/MCP.md ADDED
@@ -0,0 +1,81 @@
1
+ # MCP integration
2
+
3
+ FreeComputerUse can run as a local Model Context Protocol server over `stdio`.
4
+ It does not open an HTTP listener. A compatible MCP host starts the process and
5
+ exposes four tools:
6
+
7
+ | Tool | Purpose |
8
+ | --- | --- |
9
+ | `start_task` | Start one user-requested task with the configured provider and normal safety policy. |
10
+ | `inspect_page` | Read the latest observed page for a task; does not navigate or act. |
11
+ | `follow_task` | Follow progress and receive a human approval request when needed; reports the verified result. |
12
+ | `stop_task` | Stop an active task without changing permissions. |
13
+
14
+ `start_task` accepts only a goal and an HTTP(S) URL. It does not accept an
15
+ approval policy, Ultra mode, arbitrary action list or permission override. The
16
+ existing Agent handles site access and sensitive-action approvals. The MCP
17
+ server asks the host to collect a human decision through form elicitation; it
18
+ has no `approve` tool. Missing, invalid, declined or expired responses reject
19
+ the pending operation. Approval expires after ten minutes, and only one browser
20
+ task can run at a time.
21
+
22
+ The host must support local `stdio` servers and form elicitation. Page content
23
+ is untrusted. FreeComputerUse sends task/page context to the provider configured
24
+ in its local environment; results also pass through the MCP host. Browser
25
+ profiles, history and downloads stay in the configured local data directory.
26
+ Do not add API keys to an MCP config or share the MCP process with an
27
+ untrusted host.
28
+
29
+ ## Run from a source checkout
30
+
31
+ Use Node.js 22.13 or later, npm and an installed browser. The checked platform
32
+ is macOS 26.6 on Apple Silicon with Node 25.9.0 and system Chrome 154.0.8037.57.
33
+ Other platforms and browser combinations remain unverified.
34
+
35
+ ```sh
36
+ git clone https://github.com/OthmaneBlial/FreeComputerUse.git
37
+ cd FreeComputerUse
38
+ npm ci
39
+ npm run build
40
+ ```
41
+
42
+ Add the local command to the MCP host's server configuration. Replace both
43
+ paths with the absolute path to your checkout:
44
+
45
+ ```json
46
+ {
47
+ "mcpServers": {
48
+ "free-computer-use": {
49
+ "command": "node",
50
+ "args": ["/absolute/path/FreeComputerUse/dist/cli/index.js", "mcp"],
51
+ "cwd": "/absolute/path/FreeComputerUse",
52
+ "env": {
53
+ "FCU_BROWSER_CHANNEL": "chrome",
54
+ "FCU_DATA_DIR": "/absolute/path/free-computer-use-data"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ The `.env` file is read from `cwd`; follow [provider setup](PROVIDERS.md) to
62
+ configure a provider. The `FCU_DATA_DIR` must be a dedicated local directory,
63
+ not the workspace or a shared system directory. Restart the host after changing
64
+ its MCP configuration.
65
+
66
+ When asked to approve a site or sensitive action, inspect the displayed origin
67
+ and operation. Explicitly confirm only actions you intended. A refusal stops
68
+ the pending action. To stop a running task, call `stop_task`.
69
+
70
+ ## Validation status
71
+
72
+ The local tests use the official TypeScript MCP client SDK. They cover bounded
73
+ tool discovery, task execution against synthetic local pages, site and
74
+ sensitive-form approvals, refusal before the site receives a request, malformed
75
+ URL rejection, and the modern `stdio` transport. A live UI check also connected
76
+ the built CLI to MCP Inspector 2.8.0 over `stdio`, displayed the site's form
77
+ elicitation and declined it. The task failed safely with zero model calls and
78
+ zero requests to the local fixture. This verifies the reference client only;
79
+ compatibility with other desktop agent hosts remains unverified. The npm
80
+ package is not published; use the source checkout until a public installation
81
+ is verified.
@@ -0,0 +1,150 @@
1
+ # Model providers
2
+
3
+ FreeComputerUse sends the page context and task to the configured model service.
4
+ Browser actions still run locally. A ChatGPT or Claude subscription connection
5
+ uses that provider's local CLI, but its model request is still processed by the
6
+ provider and subject to the plan's limits. A consumer subscription is separate
7
+ from API billing.
8
+
9
+ ## API key setup
10
+
11
+ Copy `.env.example` to `.env`, restrict it to your account (`chmod 600 .env` on
12
+ macOS/Linux), then set `LLM_API_KEY`, `LLM_MODEL` and `LLM_BASE_URL`. The local
13
+ environment loader also strips group/other permission bits before reading a
14
+ regular `.env` file on macOS/Linux and rejects symlinks. Never commit `.env` or
15
+ paste a key into an issue, screenshot or log. Use the model ID shown in the
16
+ provider account or current provider documentation.
17
+
18
+ The default route is OpenAI Chat Completions-compatible:
19
+
20
+ ```dotenv
21
+ LLM_PROVIDER=openai-compatible
22
+ LLM_API_KEY=
23
+ LLM_MODEL=
24
+ LLM_BASE_URL=https://api.deepseek.com
25
+ LLM_RESPONSE_FORMAT=json_object
26
+ ```
27
+
28
+ Set the endpoint for the service you chose:
29
+
30
+ | Service | `LLM_BASE_URL` | Notes |
31
+ | --- | --- | --- |
32
+ | OpenAI API | `https://api.openai.com/v1` | Use an API key and model enabled for that API project. |
33
+ | xAI / Grok API | `https://api.x.ai/v1` | Use an xAI API key and model ID from the xAI API. |
34
+ | Gemini API | `https://generativelanguage.googleapis.com/v1beta/openai/` | This is Google's OpenAI-compatible endpoint. |
35
+ | DeepSeek API | `https://api.deepseek.com` | The repo default model is `deepseek-flash`; model aliases may change. |
36
+ | Mistral API | `https://api.mistral.ai/v1` | Choose a model available to your API account. |
37
+ | OpenRouter | `https://openrouter.ai/api/v1` | Set `LLM_MODEL` to an available `provider/model` slug. |
38
+
39
+ The application appends `/chat/completions` and sends a bearer key, chat
40
+ messages, a completion limit and JSON response format. It uses
41
+ `max_completion_tokens` for `api.openai.com` and `max_tokens` for other
42
+ OpenAI-compatible endpoints. Set `LLM_MAX_OUTPUT_TOKENS_PARAM` to override that
43
+ choice for an endpoint with different requirements. The `json_schema` option
44
+ converts optional fields to required nullable fields, `oneOf` to `anyOf`, and
45
+ record selectors to a bounded list that is restored after the response;
46
+ `json_object` remains the broader default. Provider compatibility does not
47
+ guarantee every model accepts every parameter or returns the expected response
48
+ shape. These examples are not live certifications; see the
49
+ [support matrix](SUPPORT_MATRIX.md).
50
+
51
+ For Anthropic Messages API, switch to its native route:
52
+
53
+ ```dotenv
54
+ LLM_PROVIDER=anthropic
55
+ LLM_API_KEY=
56
+ LLM_MODEL=
57
+ LLM_BASE_URL=https://api.anthropic.com/v1
58
+ LLM_RESPONSE_FORMAT=json_object
59
+ ```
60
+
61
+ Anthropic mode sends `POST /messages` with `x-api-key`, the Messages API version,
62
+ `system`, one user message and `max_tokens`. JSON is requested in the prompt and
63
+ then validated locally. `json_schema` is rejected because the action schema has
64
+ dynamic record keys.
65
+
66
+ ### Check an API configuration
67
+
68
+ ```sh
69
+ npm run agent -- doctor
70
+ npm run agent -- doctor --api
71
+ ```
72
+
73
+ `doctor` launches the configured Playwright browser and reports the runtime; it
74
+ makes no provider request. Success exits with status 0. A failed check prints a
75
+ short corrective error and exits nonzero. `doctor --api` additionally makes a
76
+ network request: API modes request `/models` and look for the configured model;
77
+ subscription modes check CLI authentication. It does not make a model
78
+ completion. An endpoint whose model-list response is not compatible with this
79
+ check can still require a separate provider-specific smoke test. Local CLI tests
80
+ use only a loopback server and fake provider responses.
81
+
82
+ ## Existing ChatGPT or Claude subscriptions
83
+
84
+ These modes require the official CLI to be installed and already authenticated.
85
+ They do not use an API key and do not bypass account or plan limits.
86
+
87
+ ### ChatGPT through Codex CLI
88
+
89
+ Install [OpenAI Codex CLI](https://github.com/openai/codex), authenticate with
90
+ `codex login` using ChatGPT, then configure:
91
+
92
+ ```dotenv
93
+ LLM_PROVIDER=codex-subscription
94
+ # Optional if `codex` is not on PATH:
95
+ # CODEX_CLI_PATH=/absolute/path/to/codex
96
+ ```
97
+
98
+ Run `npm run agent -- doctor --api` to check the CLI version and login. Planning
99
+ runs an ephemeral Codex request in a temporary directory, with a read-only
100
+ sandbox, structured output and Codex tools/MCP disabled. The adapter maps action
101
+ unions and optional fields to Codex's strict output schema, represents record
102
+ selectors as a list for the model, then restores the local action shape before
103
+ Zod validation. This provider restriction does not disable the separate local
104
+ FreeComputerUse MCP server; see [MCP setup](MCP.md).
105
+
106
+ A live smoke passed on 23 September 2026 with Codex CLI `0.156.1` and an existing
107
+ ChatGPT login. One bounded request produced a valid plan for synthetic page
108
+ content. The local budget estimated 7,022 input and 97 output tokens; the CLI
109
+ route did not report a model ID or provider token usage. No browser action ran.
110
+ This verifies one plan completion on the installed CLI/account only.
111
+
112
+ ### Claude Pro or Max through Claude Code
113
+
114
+ Install [Claude Code](https://docs.anthropic.com/en/docs/claude-code/getting-started)
115
+ and authenticate with `claude auth login` using the Claude account, not Console
116
+ API credentials. The [CLI reference](https://code.claude.com/docs/en/cli-usage)
117
+ documents `claude --version` and `claude auth status`. Configure:
118
+
119
+ ```dotenv
120
+ LLM_PROVIDER=claude-subscription
121
+ # Optional if `claude` is not on PATH:
122
+ # CLAUDE_CLI_PATH=/absolute/path/to/claude
123
+ ```
124
+
125
+ The project requires Claude Code `2.1.248+`; `doctor --api` checks and reports
126
+ the CLI version before checking first-party authentication. If the CLI cannot
127
+ start or report a version, update it before troubleshooting account login.
128
+ Planning uses print mode, disables local tools and MCP, avoids session
129
+ persistence, and limits the request to one turn. The fake-CLI tests do not
130
+ authenticate against Anthropic. This restriction does not disable the separate
131
+ local FreeComputerUse MCP server; see [MCP setup](MCP.md).
132
+
133
+ ## Current evidence
134
+
135
+ Offline request-contract results and unverified vendor combinations are listed
136
+ in the [support matrix](SUPPORT_MATRIX.md). Do not treat a successful `doctor
137
+ --api` model-list lookup as proof that a completion, structured output or a
138
+ browser task works. Live completions should be run explicitly against a
139
+ sandboxed task, with the provider, model, date and budget recorded.
140
+
141
+ ## Official provider references
142
+
143
+ - [OpenAI Chat Completions](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)
144
+ - [xAI API reference](https://docs.x.ai/developers/rest-api-reference/inference) and [OpenAI-compatible endpoint examples](https://docs.x.ai/developers/tools/advanced-usage)
145
+ - [Gemini OpenAI compatibility](https://ai.google.dev/gemini-api/docs/openai)
146
+ - [DeepSeek Chat Completions](https://api-docs.deepseek.com/api/create-chat-completion/) and [JSON output](https://api-docs.deepseek.com/guides/json_mode/)
147
+ - [Mistral migration guide](https://docs.mistral.ai/resources/migration-guides)
148
+ - [OpenRouter quickstart](https://openrouter.ai/docs/quickstart)
149
+ - [Anthropic Messages API](https://docs.anthropic.com/en/api/messages)
150
+ - [Claude Code CLI reference](https://docs.anthropic.com/en/docs/claude-code/cli-usage)
@@ -0,0 +1,37 @@
1
+ # Release checklist
2
+
3
+ Use this checklist for every npm or GitHub release. npm and GitHub publication are separate steps. A local package build is not a public release.
4
+
5
+ ## Before packaging
6
+
7
+ - [ ] Confirm the release version in `package.json`, `package-lock.json`, `CHANGELOG.md`, and the proposed Git tag.
8
+ - [ ] Review the versioned notes in `release-notes/`; remove any draft-only wording only after each external publication gate passes.
9
+ - [ ] Review the changelog against the exact commit; keep unverified providers, platforms, and workflows labelled accurately.
10
+ - [ ] Start from a clean checkout of that commit and record Node, npm, Playwright, and system browser versions.
11
+ - [ ] Run `npm ci` and `npm run validate` on the supported platform.
12
+ - [ ] Review `npm pack --dry-run --json`; confirm runtime files, UI assets, license, security guidance, README-linked docs, and images are present. Confirm `.env`, profiles, traces, browser data, caches, and user reports are absent.
13
+
14
+ ## Verify the tarball
15
+
16
+ - [ ] Create the tarball with `npm pack` and record its SHA-256 and npm integrity value.
17
+ - [ ] Install that tarball into a new temporary directory, outside the checkout.
18
+ - [ ] With no `LLM_API_KEY`, run `agent --help` and `FCU_BROWSER_CHANNEL=chrome agent doctor`.
19
+ - [ ] Run the documented read-only practice workflow through the installed CLI and confirm its result, one browser action, and zero model calls.
20
+ - [ ] Start the installed dashboard and complete its sandbox workflow; check the browser console and responsive layout.
21
+ - [ ] Check the published installation instructions against the tarball and registry state. Do not present an unpublished package as installable from npm.
22
+
23
+ ## Publish and verify npm
24
+
25
+ - [ ] Confirm the package name and version are not already published; check the registry owner and intended access.
26
+ - [ ] Publish only the reviewed version from the clean release commit. Do not publish credentials or local user data.
27
+ - [ ] Query the exact version from npm; record its tarball URL and integrity metadata.
28
+ - [ ] Download and install the registry tarball in a fresh temporary directory; repeat the CLI, doctor, and sandbox checks.
29
+ - [ ] Update installation instructions only after the registry install succeeds.
30
+
31
+ ## GitHub release
32
+
33
+ - [ ] Create a version tag that points to the validated commit; verify the tag resolves to that commit.
34
+ - [ ] Publish reviewed notes from `release-notes/` and attach only artifacts that passed the target-specific install checks.
35
+ - [ ] Include SHA-256 checksums and platform requirements for every downloadable asset.
36
+ - [ ] Download each release asset again, verify its checksum, and repeat its installation smoke test.
37
+ - [ ] Verify the public release page, assets, links, and matching npm version before describing the release as complete.
@@ -0,0 +1,39 @@
1
+ # MVP requirement audit
2
+
3
+ Provider and runtime claims are scoped by the dated [support matrix](SUPPORT_MATRIX.md).
4
+ Historical benchmark evidence, repository test coverage and current live
5
+ provider checks are separate evidence categories.
6
+
7
+ This audit maps the original numbered brief to implemented behavior and explicitly
8
+ planned work. Source files alone are not considered evidence: the repository has
9
+ Chromium integration tests, real Flash runs and result-checked benchmark traces.
10
+
11
+ | Brief requirements | Result and evidence |
12
+ | --- | --- |
13
+ | 1–5: DOM-first browser agent, real tasks, local execution, Playwright | Implemented in `Agent`, `Browser`, `Observer`, `Executor`; real API contact/job and free public scenarios |
14
+ | 6–10: useful DOM, refs, selector ranking, compression, progressive context | Visible controls/forms/headings/tables/dialogs, frames/open shadow DOM, stable per-document refs, local ranking, bounded compression/diffs; accessibility and sanitized HTML escalation |
15
+ | 11–18: action DSL, compiler, planning, execution, verification, repair, diffs | All listed actions implemented; strict Zod plans/repairs; deterministic conditions, receipts and targeted repairs; Chromium tests |
16
+ | 19–20: caching and workflow learning | Bounded page/selector caches, local form aliases/strategies, SQLite semantic workflows; exact-compatible zero-provider repeats verified |
17
+ | 21: optional adapters | Generic local adapter and replaceable interface implemented. Named platform adapters planned; no external platform integration claimed |
18
+ | 22–25: metrics, budgets, inexpensive provider, routing | Actual usage/calls/timing, configured price estimates, conservative concurrent admissions, provider abstraction and live DeepSeek Flash. Multi-model routing planned as permitted for the first version |
19
+ | 26–28: screenshot fallback, accessibility, regions | Local screenshots/preview and manual control, accessibility snapshot and region observation implemented. Model vision and visual-only control planned |
20
+ | 29–35: forms, local vault/variables, sensitive actions, human control, sessions/auth | Required/options/errors/state extraction, aliases, normal website and action approvals, explicit Ultra, pause/resume/edit/manual/stop; persistent contexts, human security-check handoff; no CAPTCHA bypass |
21
+ | 36–41: CLI, interactive CLI, local UI, debugging, replay, history | run/open/inspect/replay/workflows/history/config/doctor/ui; three-column dashboard, loaded browser preview, events/budgets, private SQLite traces and provider-disabled replay |
22
+ | 42–48: modules, validation/security/injection, goal tracking, loops/hashes | Separate replaceable modules, fixed browser API, escaped untrusted content, preserved original goal, trusted criteria, max steps/repairs/repeated states/navigation checks |
23
+ | 49–60: KPIs, benchmark suite, zero-call reuse, local intelligence, compact structured context | Metrics/reports; six local plus fourteen public scenarios; result oracles and provider-free compatible repeats; semantic workflows, local similarity/form mapping, JSON outputs, bounded completed-action summary |
24
+ | 61–63: demo, README and diagrams | Real multi-page synthetic application plus contact/demo, broader free sandbox cases, runnable README and architecture diagram, actual UI screenshots |
25
+ | 64–65: naming and developer experience | Existing workspace name retained; GitHub repo created; local npm install/config/dev, source and built CLI, browser install documented; public npm package not verified |
26
+ | 66–68: real tests, local website, failures | Chromium unit/integration/UI checks with local lab; missing/replaced/duplicate controls, delayed content, validation, frame/tab changes, approval rejection, schema/budget failures and repair |
27
+ | 69–70: incremental phases and working MVP | Incremental main commits pushed. Actual API tasks open/observe/compress/plan/execute/verify/repair, print metrics and store traces |
28
+ | 71–74: deterministic-first philosophy and compiler-like vision | Local strategies and workflow matching precede provider calls. Arbitrary-site permanent workflow transfer remains a longer-term goal |
29
+ | 77: usable end-to-end implementation | Built and exercised with real Flash, private traces, human gates and result-checked local/public tasks |
30
+ | 75–76: no fabricated results and credentials | Scripted vs real runs labeled; benchmark outputs use independent correctness checks; no screenshot baseline claim; `.env` and `.fcu` ignored, known values redacted, tracked/history credential checks |
31
+
32
+ ## Boundaries
33
+
34
+ The MVP automates browsers, not the full desktop. Compatibility is bounded by DOM
35
+ access, model planning and site behavior. A successful completion condition is not
36
+ a universal proof of natural-language task correctness. Human approvals and origin
37
+ restrictions reduce risk but do not make an allowed website trustworthy. Vault
38
+ storage is private by filesystem permissions, not encrypted. These limits are part
39
+ of the product documentation, not hidden behind a passing build.