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.
- package/.env.example +31 -0
- package/CHANGELOG.md +19 -0
- package/CONTRIBUTING.md +66 -0
- package/LICENSE +21 -0
- package/README.md +140 -0
- package/SECURITY.md +133 -0
- package/artifacts/benchmark-public.json +797 -0
- package/assets/readme/hero.svg +53 -0
- package/assets/readme/incident-demo.gif +0 -0
- package/assets/readme/incident-evidence.json +52 -0
- package/dist/actions/compiler.d.ts +5 -0
- package/dist/actions/compiler.js +16 -0
- package/dist/actions/compiler.js.map +1 -0
- package/dist/actions/executor.d.ts +38 -0
- package/dist/actions/executor.js +305 -0
- package/dist/actions/executor.js.map +1 -0
- package/dist/actions/policy.d.ts +4 -0
- package/dist/actions/policy.js +18 -0
- package/dist/actions/policy.js.map +1 -0
- package/dist/actions/schema.d.ts +4149 -0
- package/dist/actions/schema.js +59 -0
- package/dist/actions/schema.js.map +1 -0
- package/dist/adapters/generic.d.ts +14 -0
- package/dist/adapters/generic.js +33 -0
- package/dist/adapters/generic.js.map +1 -0
- package/dist/agent/Agent.d.ts +69 -0
- package/dist/agent/Agent.js +375 -0
- package/dist/agent/Agent.js.map +1 -0
- package/dist/agent/Control.d.ts +23 -0
- package/dist/agent/Control.js +51 -0
- package/dist/agent/Control.js.map +1 -0
- package/dist/agent/TokenBudget.d.ts +52 -0
- package/dist/agent/TokenBudget.js +47 -0
- package/dist/agent/TokenBudget.js.map +1 -0
- package/dist/agent/goalCriteria.d.ts +2 -0
- package/dist/agent/goalCriteria.js +13 -0
- package/dist/agent/goalCriteria.js.map +1 -0
- package/dist/browser/Browser.d.ts +72 -0
- package/dist/browser/Browser.js +378 -0
- package/dist/browser/Browser.js.map +1 -0
- package/dist/browser/DomExtractor.d.ts +6 -0
- package/dist/browser/DomExtractor.js +134 -0
- package/dist/browser/DomExtractor.js.map +1 -0
- package/dist/browser/Interaction.d.ts +43 -0
- package/dist/browser/Interaction.js +225 -0
- package/dist/browser/Interaction.js.map +1 -0
- package/dist/browser/NetworkGuardProxy.d.ts +31 -0
- package/dist/browser/NetworkGuardProxy.js +331 -0
- package/dist/browser/NetworkGuardProxy.js.map +1 -0
- package/dist/browser/Observer.d.ts +12 -0
- package/dist/browser/Observer.js +31 -0
- package/dist/browser/Observer.js.map +1 -0
- package/dist/browser/PageCompressor.d.ts +47 -0
- package/dist/browser/PageCompressor.js +62 -0
- package/dist/browser/PageCompressor.js.map +1 -0
- package/dist/browser/SecurityBoundaryError.d.ts +3 -0
- package/dist/browser/SecurityBoundaryError.js +4 -0
- package/dist/browser/SecurityBoundaryError.js.map +1 -0
- package/dist/browser/SelectorEngine.d.ts +18 -0
- package/dist/browser/SelectorEngine.js +72 -0
- package/dist/browser/SelectorEngine.js.map +1 -0
- package/dist/browser/types.d.ts +38 -0
- package/dist/browser/types.js +2 -0
- package/dist/browser/types.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +284 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.js +77 -0
- package/dist/config.js.map +1 -0
- package/dist/history/TraceStore.d.ts +29 -0
- package/dist/history/TraceStore.js +53 -0
- package/dist/history/TraceStore.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/ClaudeSubscriptionProvider.d.ts +26 -0
- package/dist/llm/ClaudeSubscriptionProvider.js +182 -0
- package/dist/llm/ClaudeSubscriptionProvider.js.map +1 -0
- package/dist/llm/CodexSubscriptionProvider.d.ts +26 -0
- package/dist/llm/CodexSubscriptionProvider.js +168 -0
- package/dist/llm/CodexSubscriptionProvider.js.map +1 -0
- package/dist/llm/FlashProvider.d.ts +27 -0
- package/dist/llm/FlashProvider.js +103 -0
- package/dist/llm/FlashProvider.js.map +1 -0
- package/dist/llm/LLMProvider.d.ts +37 -0
- package/dist/llm/LLMProvider.js +2 -0
- package/dist/llm/LLMProvider.js.map +1 -0
- package/dist/llm/cliEnvironment.d.ts +5 -0
- package/dist/llm/cliEnvironment.js +21 -0
- package/dist/llm/cliEnvironment.js.map +1 -0
- package/dist/llm/prompts.d.ts +4 -0
- package/dist/llm/prompts.js +12 -0
- package/dist/llm/prompts.js.map +1 -0
- package/dist/llm/structuredOutput.d.ts +3 -0
- package/dist/llm/structuredOutput.js +58 -0
- package/dist/llm/structuredOutput.js.map +1 -0
- package/dist/mcp/index.d.ts +13 -0
- package/dist/mcp/index.js +243 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/profile/ProfileStore.d.ts +7 -0
- package/dist/profile/ProfileStore.js +52 -0
- package/dist/profile/ProfileStore.js.map +1 -0
- package/dist/profile/VariableResolver.d.ts +15 -0
- package/dist/profile/VariableResolver.js +50 -0
- package/dist/profile/VariableResolver.js.map +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.js +239 -0
- package/dist/server/index.js.map +1 -0
- package/dist/ui/app.js +132 -0
- package/dist/ui/index.html +29 -0
- package/dist/ui/logo.svg +5 -0
- package/dist/ui/results.js +59 -0
- package/dist/ui/style.css +33 -0
- package/dist/verification/Verifier.d.ts +72 -0
- package/dist/verification/Verifier.js +87 -0
- package/dist/verification/Verifier.js.map +1 -0
- package/dist/workflows/WorkflowEngine.d.ts +23 -0
- package/dist/workflows/WorkflowEngine.js +52 -0
- package/dist/workflows/WorkflowEngine.js.map +1 -0
- package/docs/ADOPTION.md +61 -0
- package/docs/ARCHITECTURE.md +65 -0
- package/docs/BENCHMARKS.md +64 -0
- package/docs/IMPLEMENTATION.md +93 -0
- package/docs/LOCAL_DATA.md +98 -0
- package/docs/LOCAL_VALIDATION.md +87 -0
- package/docs/MCP.md +81 -0
- package/docs/PROVIDERS.md +150 -0
- package/docs/RELEASE_CHECKLIST.md +37 -0
- package/docs/REQUIREMENTS.md +39 -0
- package/docs/SUPPORT_MATRIX.md +193 -0
- package/docs/THREAT_MODEL.md +108 -0
- package/docs/USEFUL_EXAMPLES.md +151 -0
- package/docs/brand-mark.svg +12 -0
- package/package.json +90 -0
package/.env.example
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# openai-compatible, anthropic, codex-subscription or claude-subscription
|
|
2
|
+
LLM_PROVIDER=openai-compatible
|
|
3
|
+
LLM_API_KEY=
|
|
4
|
+
LLM_MODEL=
|
|
5
|
+
LLM_BASE_URL=https://api.deepseek.com
|
|
6
|
+
# json_schema | json_object
|
|
7
|
+
LLM_RESPONSE_FORMAT=json_object
|
|
8
|
+
# Optional override. Defaults to max_completion_tokens for api.openai.com,
|
|
9
|
+
# max_tokens for other OpenAI-compatible APIs.
|
|
10
|
+
# LLM_MAX_OUTPUT_TOKENS_PARAM=max_tokens
|
|
11
|
+
# For Anthropic Messages API, use LLM_PROVIDER=anthropic, set LLM_MODEL and
|
|
12
|
+
# LLM_API_KEY, and keep LLM_RESPONSE_FORMAT=json_object.
|
|
13
|
+
# Default base URL: https://api.anthropic.com/v1
|
|
14
|
+
# For a ChatGPT plan, install Codex CLI, run `codex login`, then set
|
|
15
|
+
# LLM_PROVIDER=codex-subscription. No LLM_API_KEY is needed for this mode.
|
|
16
|
+
# Optional: set CODEX_CLI_PATH if `codex` is not on PATH.
|
|
17
|
+
# For Claude Pro/Max, install Claude Code, run `claude auth login` without
|
|
18
|
+
# `--console`, then set LLM_PROVIDER=claude-subscription. No API key is needed.
|
|
19
|
+
# Claude Code v2.1.248+ is required. Optional: set CLAUDE_CLI_PATH if needed.
|
|
20
|
+
# Optional: use an installed Chrome/Edge instead of Playwright's bundled Chromium.
|
|
21
|
+
# FCU_BROWSER_CHANNEL=chrome
|
|
22
|
+
# Optional prices, USD per million tokens. Leave blank for unknown cost.
|
|
23
|
+
LLM_INPUT_PRICE=
|
|
24
|
+
LLM_OUTPUT_PRICE=
|
|
25
|
+
LLM_CACHED_INPUT_PRICE=
|
|
26
|
+
# Local state; browser cookies, profile, traces and workflows stay here.
|
|
27
|
+
FCU_DATA_DIR=.fcu
|
|
28
|
+
# Optional total limits for a task. Unset means no model-call or token cap.
|
|
29
|
+
# FCU_MAX_LLM_CALLS=100
|
|
30
|
+
# FCU_MAX_INPUT_TOKENS=250000
|
|
31
|
+
# FCU_MAX_OUTPUT_TOKENS=30000
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Local Playwright browser workspace with explicit origin permissions, sensitive
|
|
8
|
+
action confirmation, result checks and compatible workflow replay.
|
|
9
|
+
- API-key provider routes and local Codex / Claude Code subscription CLI routes.
|
|
10
|
+
- Local dashboard, command-line diagnostics, synthetic practice lab and public
|
|
11
|
+
evidence reports.
|
|
12
|
+
- Support, provider, security, local-data and reproducible validation guides.
|
|
13
|
+
|
|
14
|
+
### Security and privacy
|
|
15
|
+
|
|
16
|
+
- Browser profiles, traces, workflows and downloads stay in local storage, which
|
|
17
|
+
is not encrypted and has no automatic expiry.
|
|
18
|
+
- Provider support and tested platform limits are listed in
|
|
19
|
+
[the support matrix](docs/SUPPORT_MATRIX.md).
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for helping make browser automation safer and easier to verify. Keep
|
|
4
|
+
changes focused, preserve the local permission model, and include evidence for
|
|
5
|
+
behavior changes.
|
|
6
|
+
|
|
7
|
+
## Development setup
|
|
8
|
+
|
|
9
|
+
The package declares Node.js `>=22.13.0`; only the environment in the
|
|
10
|
+
[support matrix](docs/SUPPORT_MATRIX.md) is currently validated. Install Node,
|
|
11
|
+
npm and a browser Playwright can launch. To use an already installed Chrome
|
|
12
|
+
without downloading a browser, set `FCU_BROWSER_CHANNEL=chrome`.
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
git clone https://github.com/OthmaneBlial/FreeComputerUse.git
|
|
16
|
+
cd FreeComputerUse
|
|
17
|
+
npm ci
|
|
18
|
+
cp .env.example .env
|
|
19
|
+
chmod 600 .env
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Run `npm run agent -- doctor` to check the local runtime, then `npm run dev` and
|
|
23
|
+
open `http://127.0.0.1:4318`. The deterministic practice task works without a
|
|
24
|
+
provider key. See [provider setup](docs/PROVIDERS.md) before opting into a live
|
|
25
|
+
provider request.
|
|
26
|
+
|
|
27
|
+
## Before opening a pull request
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm run check
|
|
31
|
+
FCU_BROWSER_CHANNEL=chrome npm test
|
|
32
|
+
npm run validate
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`npm run validate` is the full local gate and includes the serial tests, build,
|
|
36
|
+
security scan and production dependency audit. It needs registry access for the
|
|
37
|
+
audit. The ordinary test suite uses local fixtures and does not call a model.
|
|
38
|
+
The optional live benchmarks can spend API tokens; do not run them in a change
|
|
39
|
+
that only needs deterministic coverage. See [local validation](docs/LOCAL_VALIDATION.md)
|
|
40
|
+
for the exact scope and known limits.
|
|
41
|
+
|
|
42
|
+
For browser behavior, add a focused regression test using the existing fixture
|
|
43
|
+
helpers. Check both the denied case and an authorized case where applicable.
|
|
44
|
+
For UI changes, run `FCU_BROWSER_CHANNEL=chrome npm run ui:smoke` or
|
|
45
|
+
`npm run lab:smoke` and inspect any changed screenshots. Do not include real
|
|
46
|
+
browser profiles, cookies, API keys or personal data in fixtures or reports.
|
|
47
|
+
|
|
48
|
+
Use the existing TypeScript, Playwright and Zod patterns. Explain any new
|
|
49
|
+
dependency and keep provider/network tests opt-in. GitHub Actions is disabled
|
|
50
|
+
by owner instruction; do not add or dispatch workflows.
|
|
51
|
+
|
|
52
|
+
## Issues and security reports
|
|
53
|
+
|
|
54
|
+
Use the repository's bug or feature form. Include a small reproduction and
|
|
55
|
+
versions, but remove API keys, tokens, cookies, private URLs and personal data
|
|
56
|
+
from logs and screenshots. Report vulnerabilities privately through GitHub's
|
|
57
|
+
private vulnerability reporting when it is enabled; do not file them as public
|
|
58
|
+
issues.
|
|
59
|
+
|
|
60
|
+
## Review and support policy
|
|
61
|
+
|
|
62
|
+
Pull requests target `main` and should state the problem, behavior change,
|
|
63
|
+
validation run and remaining limitation. There are no published releases or
|
|
64
|
+
release branches yet, so `main` is the only maintained line. After the first
|
|
65
|
+
release, the latest stable release and current `main` are the supported lines;
|
|
66
|
+
older releases have no promised maintenance window. There is no LTS policy.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FreeComputerUse contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<h1><img src="docs/brand-mark.svg" alt="" width="40" height="40" align="absmiddle"> FreeComputerUse</h1>
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/badge/license-MIT-c4e967?style=flat-square&labelColor=18251f"></a>
|
|
7
|
+
<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-3178c6?style=flat-square&labelColor=18251f">
|
|
8
|
+
<img alt="Playwright" src="https://img.shields.io/badge/Playwright-45ba4b?style=flat-square&labelColor=18251f">
|
|
9
|
+
<img alt="Local-first" src="https://img.shields.io/badge/local--first-browser_runs-c4e967?style=flat-square&labelColor=18251f">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="#quick-start">Quick start</a> ·
|
|
14
|
+
<a href="https://othmaneblial.github.io/FreeComputerUse/">Project site</a> ·
|
|
15
|
+
<a href="https://othmaneblial.github.io/FreeComputerUse/lab/index.html">Try the task lab</a> ·
|
|
16
|
+
<a href="SECURITY.md">Security</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
**Your browser. Your model. Your call.** Tell it what done looks like, then stay in control of every step.
|
|
20
|
+
|
|
21
|
+
FreeComputerUse is a local-first AI browser automation agent. A model plans small action batches; TypeScript and Playwright execute and verify them in your browser. Compatible workflows can be learned once and replayed later with **zero model calls**.
|
|
22
|
+
|
|
23
|
+
## Watch a real run
|
|
24
|
+
|
|
25
|
+
[](https://othmaneblial.github.io/FreeComputerUse/#watch)
|
|
26
|
+
|
|
27
|
+
One goal led through six pages to a verified incident brief: **21 successful actions, 10 model calls, one repaired failure**. The configured cost estimate was **$0.00650**. This is one recorded synthetic task, not a general success-rate claim. [Watch the full recording](https://othmaneblial.github.io/FreeComputerUse/lab/media/incident-demo.mp4) · [Inspect the evidence](assets/readme/incident-evidence.json).
|
|
28
|
+
|
|
29
|
+
## How it works
|
|
30
|
+
|
|
31
|
+
1. **Observe** the page’s DOM and accessible controls.
|
|
32
|
+
2. **Plan** a bounded batch with the model you choose.
|
|
33
|
+
3. **Execute** browser actions locally with Playwright; direct navigation to a new origin asks for approval.
|
|
34
|
+
4. **Verify** results, repair only what failed, then reuse compatible learned workflows.
|
|
35
|
+
|
|
36
|
+
The model does not run shell commands or arbitrary JavaScript. Browser previews stay local; the goal and selected page context are sent to your configured model provider.
|
|
37
|
+
|
|
38
|
+
## Quick start
|
|
39
|
+
|
|
40
|
+
Requires **Node.js 22.13+**, npm and an installed browser. The verified setup is macOS 26.6 (Apple Silicon), Node 25.9.0 and system Chrome 154.0.8037.57; the complete serial validation passed on this combination. The declared Node minimum and other OS/browser combinations remain unverified. This setup selects installed Chrome and avoids a separate Playwright browser download; see the [support matrix](docs/SUPPORT_MATRIX.md) for exact coverage and limits.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git clone https://github.com/OthmaneBlial/FreeComputerUse.git
|
|
44
|
+
cd FreeComputerUse
|
|
45
|
+
npm ci
|
|
46
|
+
cp .env.example .env
|
|
47
|
+
chmod 600 .env
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Set `FCU_BROWSER_CHANNEL=chrome` in `.env` to use the verified installed-Chrome path without downloading a browser binary.
|
|
51
|
+
|
|
52
|
+
For model-planned tasks, configure a provider in `.env`. The browser sandbox task below works without a model key:
|
|
53
|
+
|
|
54
|
+
```dotenv
|
|
55
|
+
FCU_BROWSER_CHANNEL=chrome
|
|
56
|
+
LLM_PROVIDER=openai-compatible
|
|
57
|
+
LLM_API_KEY=your-key
|
|
58
|
+
LLM_BASE_URL=https://api.deepseek.com
|
|
59
|
+
LLM_MODEL=deepseek-flash
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm run agent -- doctor
|
|
64
|
+
npm run dev
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Open **http://127.0.0.1:4318**, enter a starting URL and goal, then approve site access.
|
|
68
|
+
|
|
69
|
+
**Try it without an API key:** open [the practice revenue table](https://othmaneblial.github.io/FreeComputerUse/lab/reports.html) and run the goal `Extract the table`. This narrow workflow has a deterministic local strategy; general tasks need a model provider.
|
|
70
|
+
|
|
71
|
+
## Troubleshooting
|
|
72
|
+
|
|
73
|
+
- **The browser does not start:** install Chrome, set `FCU_BROWSER_CHANNEL=chrome` in `.env`, then run `npm run agent -- doctor`. See the [verified platform limits](docs/SUPPORT_MATRIX.md); other OS/browser combinations are not certified here.
|
|
74
|
+
- **The dashboard says no model is configured:** the practice revenue-table task works without a provider. For model planning, configure one route from [Pick your model](#pick-your-model). `npm run agent -- doctor --api` makes an opt-in request to the configured provider; use it only when you want that network check.
|
|
75
|
+
- **A site is blocked or asks for approval:** normal mode asks before a new origin and blocks private/reserved DNS answers. Approve only the site needed for the task. Ultra mode disables those protections; do not use it as a workaround for a blocked destination.
|
|
76
|
+
- **The run finishes without proving the goal:** inspect the result checks and use a narrower goal. Browser clicks alone do not mean the requested outcome was verified.
|
|
77
|
+
- **You need to find or remove local data:** see [local storage, export, retention and deletion](docs/LOCAL_DATA.md). Data is not encrypted and is not automatically expired.
|
|
78
|
+
|
|
79
|
+
## Pick your model
|
|
80
|
+
|
|
81
|
+
Use a provider API key, or sign in through the official CLI for a supported subscription. API usage and consumer subscriptions are separate billing products.
|
|
82
|
+
|
|
83
|
+
| Provider | Configuration |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| OpenAI, xAI Grok, DeepSeek, Mistral or another OpenAI-compatible API | `LLM_PROVIDER=openai-compatible`; set `LLM_API_KEY`, `LLM_MODEL` and `LLM_BASE_URL` |
|
|
86
|
+
| Google Gemini API | OpenAI-compatible mode with `LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/` and your Gemini API key |
|
|
87
|
+
| OpenRouter | OpenAI-compatible mode with `LLM_BASE_URL=https://openrouter.ai/api/v1` and the chosen `provider/model` slug |
|
|
88
|
+
| Anthropic API | `LLM_PROVIDER=anthropic`; set `LLM_API_KEY` and `LLM_MODEL` |
|
|
89
|
+
| ChatGPT plan | Install Codex CLI, sign in with `codex login`, set `LLM_PROVIDER=codex-subscription` |
|
|
90
|
+
| Claude Pro/Max plan | Install Claude Code 2.1.248+, sign in with `claude auth login` (not Console), set `LLM_PROVIDER=claude-subscription` |
|
|
91
|
+
|
|
92
|
+
The provider API routes have not all been live-tested here; DeepSeek Flash is the measured default. Subscription modes use the local CLI sign-in, need no API key and respect plan limits. Their local agent tools and MCP servers are disabled while planning. See [provider setup and limits](docs/PROVIDERS.md), the [support matrix](docs/SUPPORT_MATRIX.md) and [.env.example](.env.example) for route-specific setup, tests and live-evidence status.
|
|
93
|
+
|
|
94
|
+
## Connect an MCP host
|
|
95
|
+
|
|
96
|
+
Run FreeComputerUse as a local MCP server over `stdio` with `agent mcp`. It
|
|
97
|
+
provides tools to start a task, inspect the observed page, follow and verify the
|
|
98
|
+
result, and stop a task. Site and sensitive-action approvals still require a
|
|
99
|
+
human response in an MCP host that supports form elicitation. No HTTP endpoint
|
|
100
|
+
is opened. See the [MCP setup and validation limits](docs/MCP.md). The separate
|
|
101
|
+
provider CLI adapters keep their own tools and MCP disabled while planning.
|
|
102
|
+
|
|
103
|
+
## FAQ
|
|
104
|
+
|
|
105
|
+
**Can I try it without a model key?** Yes, the practice revenue-table workflow runs with a deterministic local strategy. General tasks need a configured model.
|
|
106
|
+
|
|
107
|
+
**Which providers have live evidence?** The current matrix records DeepSeek Flash and one synthetic plan through Codex CLI `0.156.1` with ChatGPT. Contract tests do not certify a live provider; see the [dated support matrix](docs/SUPPORT_MATRIX.md).
|
|
108
|
+
|
|
109
|
+
**Does the model receive screenshots or browser profiles?** No screenshots are sent. The task and selected page context go to your provider; browser execution, profiles, history and downloads stay local. Local data is not encrypted.
|
|
110
|
+
|
|
111
|
+
**Which platform is verified?** macOS 26.6 on Apple Silicon, Node 25.9.0 and system Chrome 154. Other OS, Node and browser combinations remain unverified in the [support matrix](docs/SUPPORT_MATRIX.md).
|
|
112
|
+
|
|
113
|
+
## Control and privacy
|
|
114
|
+
|
|
115
|
+
- Normal mode asks before direct navigation to a new origin and blocks hostnames resolving to private or reserved address ranges, including private IPv4 embedded in a discovered NAT64 prefix. A loopback-only proxy connects to the vetted numeric address, closing the DNS lookup-to-connection rebinding gap for browser HTTP(S) and WebSocket traffic. Explicit IP destinations require an exact origin grant. Ultra mode and the low-level `allowExternal` option opt out of origin and private-address checks. Chrome 154 tests cover redirect denial, simulated DNS rebinding, approved/blocked plain WebSockets, and approved/blocked browser-originated WSS. The WSS fixture uses a generated local certificate and ignores its certificate error only in the test; a separate opt-in smoke verifies Chrome TLS and an echo against one public WSS endpoint. Other WSS endpoints, live network-specific NAT64 discovery and other browser builds remain unverified. Sensitive actions have a separate confirmation gate. Ultra mode is explicit and off by default.
|
|
116
|
+
- Browser execution, profiles, history and downloads stay on your machine. Page context needed for a plan goes to the chosen model provider; screenshots are not sent.
|
|
117
|
+
- The planner receives aliases for local profile and file values, not their contents. Local storage is **not encrypted**.
|
|
118
|
+
- Chromium profiles disable WebRTC UDP that the proxy cannot carry. Sites needing direct UDP for voice/video may fail; one local Chrome STUN fixture confirms no direct packet reached its receiver. Other non-HTTP traffic remains unverified.
|
|
119
|
+
- Runs record actions, checks, repairs, token estimates and workflow reuse so you can inspect what happened.
|
|
120
|
+
|
|
121
|
+
Read [the security boundaries](SECURITY.md) before using personal or sensitive data.
|
|
122
|
+
See [where local data is stored and how to inspect, export or delete it](docs/LOCAL_DATA.md).
|
|
123
|
+
|
|
124
|
+
## Evidence
|
|
125
|
+
|
|
126
|
+
In a focused public suite recorded **18 September 2026**, 14/14 first-run results and 14/14 compatible learned repeats passed independent checks. First runs used 18 model calls; repeats used zero. These single-trial sandbox results do not predict success on arbitrary websites. [Report](artifacts/benchmark-public.json) · [Method and limitations](docs/BENCHMARKS.md).
|
|
127
|
+
|
|
128
|
+
## Explore and contribute
|
|
129
|
+
|
|
130
|
+
- [Project site and task library](https://othmaneblial.github.io/FreeComputerUse/)
|
|
131
|
+
- [Frequently asked questions](https://othmaneblial.github.io/FreeComputerUse/#faq)
|
|
132
|
+
- [Useful browser-task examples](docs/USEFUL_EXAMPLES.md)
|
|
133
|
+
- [Implementation notes](docs/IMPLEMENTATION.md)
|
|
134
|
+
- [Architecture](docs/ARCHITECTURE.md)
|
|
135
|
+
- [Local validation commands](docs/LOCAL_VALIDATION.md)
|
|
136
|
+
- [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
|
|
137
|
+
|
|
138
|
+
Useful contributions: reproducible browser tasks, safer permission scopes and checks that make results easier to trust. Keep shared examples synthetic or read-only; remove credentials and personal data from traces.
|
|
139
|
+
|
|
140
|
+
[MIT License](LICENSE) · Built with TypeScript and Playwright.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Security model
|
|
2
|
+
|
|
3
|
+
See the [threat model](docs/THREAT_MODEL.md) for assets, trust boundaries,
|
|
4
|
+
verified controls, residual risks and prioritized follow-up work.
|
|
5
|
+
|
|
6
|
+
Report vulnerabilities privately through GitHub's private vulnerability reporting
|
|
7
|
+
when enabled. Never include credentials or real browser profile data in an issue.
|
|
8
|
+
|
|
9
|
+
## Permission model
|
|
10
|
+
|
|
11
|
+
Normal mode requires a human to approve each website origin before its first
|
|
12
|
+
document request. The grant covers the requested task in that browser session,
|
|
13
|
+
including subsequent pages on the same origin. New origins need another grant.
|
|
14
|
+
Rejecting an initial grant leaves the target website unvisited. Cached workflows
|
|
15
|
+
and replay do not bypass site grants or sensitive-action policy.
|
|
16
|
+
|
|
17
|
+
With the default `sensitive` policy, explicit submit actions and controls marked
|
|
18
|
+
sensitive are gated separately; label and form heuristics catch some additional
|
|
19
|
+
high-impact actions. Detection cannot identify every ambiguously named or
|
|
20
|
+
adversarial control. Use `--confirmation always` in normal mode when every
|
|
21
|
+
action needs review. `--confirmation never` and Ultra mode skip action prompts.
|
|
22
|
+
|
|
23
|
+
**Ultra mode is explicit, off by default.** It skips website/action approvals and
|
|
24
|
+
allows external HTTP(S) destinations. It does not add shell access, arbitrary
|
|
25
|
+
JavaScript execution, arbitrary local-file access, or remove step/token budgets.
|
|
26
|
+
The model still cannot read environment variables or supply an arbitrary upload
|
|
27
|
+
path. User restrictions and final completion criteria still apply.
|
|
28
|
+
|
|
29
|
+
## Execution and network boundary
|
|
30
|
+
|
|
31
|
+
- Every model plan/action/repair passes strict Zod validation.
|
|
32
|
+
- Browser operations use a fixed Playwright action API; there is no eval/exec DSL.
|
|
33
|
+
- Page text has an escaped untrusted-content boundary and cannot replace the
|
|
34
|
+
original goal. Local warnings flag common injection phrases.
|
|
35
|
+
- In normal mode, local vault aliases require a goal authorizing profile, details,
|
|
36
|
+
credentials, resume/CV or local files. Vault values cannot appear in navigation
|
|
37
|
+
URL templates. Uploads require an explicit `{{files.alias}}` defined locally.
|
|
38
|
+
- HTTP(S) only; URL credentials are rejected. `Agent` grants origins after
|
|
39
|
+
approval, while the low-level exported `Browser` denies all network requests
|
|
40
|
+
unless the caller supplies `allowedOrigins` or explicitly opts into
|
|
41
|
+
`allowExternal`. Cross-origin resources and WebSockets follow that policy.
|
|
42
|
+
A loopback-only Chromium DevTools Protocol connection attaches to each page
|
|
43
|
+
before its first navigation and checks redirect hops; redirected document
|
|
44
|
+
navigations use the same approval callback, and redirected subresources need
|
|
45
|
+
an approved origin. A local Chrome 154 test confirms an unapproved fast popup
|
|
46
|
+
redirect is stopped before the target server receives it, then succeeds after
|
|
47
|
+
approval. A loopback-only proxy resolves hostnames and connects to the vetted
|
|
48
|
+
numeric address for HTTP, HTTPS tunnels and WebSockets. In normal mode,
|
|
49
|
+
private/reserved answers and private IPv4 addresses embedded in the
|
|
50
|
+
system-resolver's discovered NAT64 prefix are blocked, including when the
|
|
51
|
+
hostname is allowlisted. Discovery uses `ipv4only.arpa`; if the resolver does
|
|
52
|
+
not return synthesized AAAA records, network-specific prefixes cannot be
|
|
53
|
+
checked. Explicit IP destinations still use exact origin permissions. Ultra
|
|
54
|
+
mode and the low-level `allowExternal` option bypass
|
|
55
|
+
origin and private-address checks. A synthetic public-to-loopback DNS change
|
|
56
|
+
test confirms the proxy rejects the connection before the target receives it;
|
|
57
|
+
system Chrome `154.0.8037.57` also passes approved and denied plain WebSocket
|
|
58
|
+
tests. Chrome 154 also completes an approved WSS handshake/frame through the
|
|
59
|
+
proxy and blocks an unapproved WSS origin before the target receives a TCP
|
|
60
|
+
connection. That fixture ignores errors from its generated local certificate;
|
|
61
|
+
it does not verify public certificate trust. The separate opt-in
|
|
62
|
+
`FCU_BROWSER_CHANNEL=chrome npm run security:wss` smoke connected to Postman
|
|
63
|
+
Echo using Chrome's normal TLS validation and received its fixed synthetic
|
|
64
|
+
payload on 24 September 2026; this covers one endpoint/runtime only.
|
|
65
|
+
Chromium's persistent profile
|
|
66
|
+
disables WebRTC UDP the proxy cannot carry. A Chrome 154 local STUN fixture
|
|
67
|
+
received no packets, but sites requiring direct UDP for voice/video may fail.
|
|
68
|
+
Network-specific NAT64 prefixes, other non-HTTP traffic and other browser
|
|
69
|
+
builds remain unverified. The
|
|
70
|
+
DevTools endpoint is available only on loopback while the browser runs; a
|
|
71
|
+
process under the same OS account is outside this boundary. Service workers
|
|
72
|
+
are blocked.
|
|
73
|
+
- Selector ambiguity is rejected for mutations; collection extraction may select
|
|
74
|
+
several nodes. Browser dialogs are dismissed by default.
|
|
75
|
+
- A failed click/submit with an uncertain outcome requires human review before
|
|
76
|
+
repair. Replay has no provider and stops on incompatible state.
|
|
77
|
+
|
|
78
|
+
Prompt isolation, origin restrictions and approval gates reduce injection risk;
|
|
79
|
+
they do not mathematically establish that a model always follows the goal, nor
|
|
80
|
+
that an allowed website is trustworthy. Websites still run their own JavaScript
|
|
81
|
+
inside Chromium and can access data intentionally entered on them. No CAPTCHA or
|
|
82
|
+
security bypass is implemented. Do not automate a site without authorization.
|
|
83
|
+
|
|
84
|
+
## Local data
|
|
85
|
+
|
|
86
|
+
The default data directory, its contents, backup and deletion steps are listed
|
|
87
|
+
in [Local data](docs/LOCAL_DATA.md).
|
|
88
|
+
|
|
89
|
+
`.env`, `.fcu`, profiles, session cookies, localStorage, downloads and SQLite traces
|
|
90
|
+
are ignored by Git. On macOS/Linux, the environment loader rejects a symlinked
|
|
91
|
+
`.env` and removes group/other permission bits before reading it; set mode `0600`
|
|
92
|
+
before editing or running other tools. App-written profile/history files use
|
|
93
|
+
mode `0600`; state/profile directories use mode `0700` on verified filesystems.
|
|
94
|
+
The configured app data directory must be a dedicated real directory, not a
|
|
95
|
+
shared system/workspace root. Direct `TraceStore` use requires a private parent
|
|
96
|
+
directory and refuses shared parents rather than changing their permissions;
|
|
97
|
+
SQLite files are created owner-only and symbolic-link database paths are
|
|
98
|
+
rejected.
|
|
99
|
+
Profile JSON imports are schema-checked, reject symbolic-link files and replace
|
|
100
|
+
saved data atomically. This is local storage with file permissions, **not
|
|
101
|
+
encrypted storage**. Browser session data and extracted website content can be
|
|
102
|
+
sensitive; use an OS-protected account/disk. History, workflows, browser sessions
|
|
103
|
+
and downloads have no automatic expiry; see [retention and deletion steps](docs/LOCAL_DATA.md#retention).
|
|
104
|
+
On macOS, download directories use mode `0700` and saved download files use mode
|
|
105
|
+
`0600`; Windows/Linux data-directory permissions remain unverified.
|
|
106
|
+
|
|
107
|
+
Known profile/file values are redacted from prompts, event logs and traces and
|
|
108
|
+
resolve locally during actions. Common credentials in URL queries and fragments,
|
|
109
|
+
as well as bearer-shaped tokens, are redacted before model requests, new trace
|
|
110
|
+
saves and dashboard/CLI history output; the browser still opens the original URL.
|
|
111
|
+
Secret-looking key strings are also redacted. Records extraction omits
|
|
112
|
+
password/payment field values. These filters do not identify every possible
|
|
113
|
+
secret in arbitrary website content. Do not publish local traces, browser
|
|
114
|
+
profiles or screenshots from a real account. Replays that depended on a
|
|
115
|
+
redacted URL credential need a fresh starting URL.
|
|
116
|
+
|
|
117
|
+
## Dashboard boundary
|
|
118
|
+
|
|
119
|
+
The UI binds only to `127.0.0.1`; Host checks prevent simple DNS rebinding. API
|
|
120
|
+
requests require a random HttpOnly SameSite=Strict session cookie. Mutations also
|
|
121
|
+
require the exact local Origin and an unguessable CSRF header. No CORS access is
|
|
122
|
+
enabled. CSP restricts assets/connections to the same local origin. API keys are
|
|
123
|
+
never exposed through the UI or API. A process/user already controlling the local
|
|
124
|
+
OS account is outside this boundary; the loopback UI is not a multi-user service.
|
|
125
|
+
|
|
126
|
+
## Verification evidence
|
|
127
|
+
|
|
128
|
+
`npm test` includes rejection-before-network, normal/Ultra permission separation,
|
|
129
|
+
strict code rejection, upload alias confinement, origin restrictions, duplicate
|
|
130
|
+
selectors, concurrent token reservations, redaction, local UI authorization/CSRF,
|
|
131
|
+
approval and zero-provider replay. Public benchmarks use only read-only sandbox
|
|
132
|
+
tasks or browser-only simulations on the project-owned lab. They never send a
|
|
133
|
+
message, purchase, create an account or modify a real user's account.
|