Skip to content

An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.

refactor: move all source under src/, split extension from daemon

Shahriar3ac92be44231
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7bb9c61..77dc4fb 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -59,7 +59,7 @@ jobs:
echo "::error::'$tag' is not a vX.Y.Z tag"
exit 1
fi
- for file in package.json mcp/package.json; do
+ for file in package.json src/daemon/package.json; do
found=$(node -p "require('./$file').version")
if [ "$found" != "$version" ]; then
echo "::error::$file says $found but the tag is $tag"
@@ -77,14 +77,14 @@ jobs:
- name: Install dependencies
# Yarn is vendored at the path .yarnrc.yml pins, so this does not depend on whichever
# yarn the runner image ships (its classic 1.x cannot read yarnPath at all). Running
- # the release through node needs nothing but node. mcp/ is a separate project with its
+ # the release through node needs nothing but node. src/daemon is a separate project with its
# own lockfile, so the root install does not cover it.
run: |
yarn_bin=$(sed -n 's/^yarnPath: *//p' .yarnrc.yml)
test -f "$yarn_bin" || { echo "::error::no vendored Yarn at '$yarn_bin'"; exit 1; }
echo "YARN=$yarn_bin" >> "$GITHUB_ENV"
node "$yarn_bin" install --immutable
- node "$yarn_bin" --cwd mcp install --immutable
+ node "$yarn_bin" --cwd src/daemon install --immutable
- name: Check
# The same gate the README asks for before a pull request: both type checks, the intent
@@ -98,7 +98,7 @@ jobs:
run: |
node "$YARN" zip
node "$YARN" zip -b firefox
- node "$YARN" mcp:build
+ node "$YARN" daemon:build
- name: Verify the build carries the tagged version
run: |
@@ -115,22 +115,22 @@ jobs:
done
- name: Pack and smoke-test the npm tarball
- # `npm pack` runs mcp/scripts/stage-extension.mjs through prepack, so this exercises
+ # `npm pack` runs src/daemon/scripts/stage-extension.mjs through prepack, so this exercises
# the same path a maintainer gets locally. Everything below runs against the real
# tarball rather than the working tree, and it runs before anything is published,
# because an npm version cannot be taken back.
run: |
- tarball="$(cd mcp && npm pack --silent)"
- echo "TARBALL=$GITHUB_WORKSPACE/mcp/$tarball" >> "$GITHUB_ENV"
+ tarball="$(cd src/daemon && npm pack --silent)"
+ echo "TARBALL=$GITHUB_WORKSPACE/src/daemon/$tarball" >> "$GITHUB_ENV"
- tar -tzf "mcp/$tarball" | grep -q 'package/extension/chrome-mv3/manifest.json' \
+ tar -tzf "src/daemon/$tarball" | grep -q 'package/extension/chrome-mv3/manifest.json' \
|| { echo "::error::the tarball carries no extension"; exit 1; }
- if tar -tzf "mcp/$tarball" | grep -q '\.map$'; then
+ if tar -tzf "src/daemon/$tarball" | grep -q '\.map$'; then
echo "::error::sourcemaps leaked into the tarball"; exit 1
fi
mkdir -p /tmp/smoke && cd /tmp/smoke && npm init -y >/dev/null
- npm i --no-audit --no-fund "$GITHUB_WORKSPACE/mcp/$tarball"
+ npm i --no-audit --no-fund "$GITHUB_WORKSPACE/src/daemon/$tarball"
# Zero runtime dependencies. This is the guard that catches someone moving a
# package back into `dependencies` and quietly restoring the 33 MB install.
@@ -203,7 +203,7 @@ jobs:
# ---------------------------------------------------------------------------------------
- name: Publish to npm
if: false
- working-directory: mcp
+ working-directory: src/daemon
env:
NPM_CONFIG_PROVENANCE: true
run: |
diff --git a/.gitignore b/.gitignore
index 3292460..07b87ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-# Dependencies. Both yarn.lock files (root and mcp/) are committed — mcp/yarn.lock is also
-# what keeps `yarn --cwd mcp` a separate project rather than part of the root install.
+# Dependencies. Both yarn.lock files (root and src/daemon/) are committed — the daemon's is also
+# what keeps `yarn --cwd src/daemon` a separate project rather than part of the root install.
node_modules/
# Yarn 4 keeps per-project state in .yarn/, and there are two projects here. install-state.gz
@@ -11,7 +11,7 @@ node_modules/
!**/.yarn/patches
.pnp.*
-# Build output — WXT writes to `dist/` (see outDir in wxt.config.ts); tsup writes to mcp/dist/.
+# Build output — WXT writes to `dist/` (see outDir in wxt.config.ts); tsup writes to src/daemon/dist/.
# The bare `dist/` pattern matches at any depth, so it covers both.
dist/
.output/
@@ -26,17 +26,17 @@ stats-*.json
web-ext.config.ts
web-ext.config.ts.timestamp-*
-# Stray `npm link` artifacts. `yarn mcp:link` links into the real npm prefix and writes
-# nothing here, but the `npm --prefix mcp link` it used to run treated mcp/ as the *global*
-# prefix and left self-referential symlinks (mcp/bin -> mcp/lib/node_modules) behind.
-mcp/bin/
-mcp/lib/
+# Stray `npm link` artifacts. `yarn daemon:link` links into the real npm prefix and writes
+# nothing here, but the `npm --prefix` form it used to run treated the package directory as
+# the *global* prefix and left self-referential bin/ -> lib/node_modules symlinks behind.
+src/daemon/bin/
+src/daemon/lib/
-# Staged by mcp/scripts/stage-extension.mjs at prepack time: a copy of the root
+# Staged by src/daemon/scripts/stage-extension.mjs at prepack time: a copy of the root
# dist/chrome-mv3 build, because npm's `files` cannot reference paths above the package
# root. Regenerated on every pack, never committed. `files` still packs it, the same way
-# mcp/dist packs despite the `dist/` rule above.
-mcp/extension/
+# src/daemon/dist packs despite the `dist/` rule above.
+src/daemon/extension/
# Secrets & environment
.env
diff --git a/components.json b/components.json
index c1ef610..d740053 100644
--- a/components.json
+++ b/components.json
@@ -5,17 +5,17 @@
"tsx": true,
"tailwind": {
"config": "",
- "css": "assets/globals.css",
+ "css": "src/extension/assets/globals.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"aliases": {
- "components": "@/components",
+ "components": "@/extension/components",
"utils": "@/lib/utils",
- "ui": "@/components/ui",
+ "ui": "@/extension/components/ui",
"lib": "@/lib",
- "hooks": "@/hooks"
+ "hooks": "@/extension/hooks"
},
"iconLibrary": "lucide"
}
diff --git a/docs/guide/install.md b/docs/guide/install.md
index f51e220..70eaf90 100644
--- a/docs/guide/install.md
+++ b/docs/guide/install.md
@@ -85,7 +85,7 @@ node scripts/setup.mjs
```
That runs four steps: extension dependencies, extension build, daemon dependencies, daemon build.
-`mcp/` is a separate Yarn project with its own lockfile, which is why the root install does not
+`src/daemon/` is a separate Yarn project with its own lockfile, which is why the root install does not
cover it. Yarn itself is not a prerequisite: the pinned Yarn 4 release ships inside the repository
and the setup script invokes it through Node.
@@ -93,11 +93,11 @@ When it finishes you have:
```
dist/chrome-mv3 the unpacked extension
-mcp/dist the daemon and MCP server
+src/daemon/dist the daemon and MCP server
```
Load `dist/chrome-mv3` directly through **Load unpacked**, or put the CLI on your `PATH` with
-`yarn mcp:link` and let `browsentic setup` install from the checkout. Either way Chrome will not
+`yarn daemon:link` and let `browsentic setup` install from the checkout. Either way Chrome will not
auto-reload the extension after a rebuild, so press ↻ on its card yourself.
---
diff --git a/docs/guide/maintenance.md b/docs/guide/maintenance.md
index 2d3c559..bb6f28d 100644
--- a/docs/guide/maintenance.md
+++ b/docs/guide/maintenance.md
@@ -25,15 +25,15 @@ is replaced.
your MCP clients the list changed — it degrades loudly rather than into tool calls that fail at the
far end — but you should fix the drift rather than run on it.
-Your pairing survives updates. `yarn mcp:link` only needs re-running if the link is broken.
+Your pairing survives updates. `yarn daemon:link` only needs re-running if the link is broken.
-### Why `yarn mcp:build` alone changes nothing
+### Why `yarn daemon:build` alone changes nothing
The daemon has no start command: the first CLI or MCP client that needs it spawns it, and it lives
until `browsentic stop` or 30 idle minutes with nothing attached. A rebuild does not touch the
process already running.
-`yarn mcp:restart` is the one that does both — it rebuilds, stops the stale daemon, and brings up
+`yarn daemon:restart` is the one that does both — it rebuilds, stops the stale daemon, and brings up
the fresh build.
---
@@ -43,7 +43,7 @@ the fresh build.
```sh
browsentic revoke # unpair every browser
browsentic stop # stop the daemon
-yarn mcp:unlink # remove browsentic from PATH
+yarn daemon:unlink # remove browsentic from PATH
rm -rf ~/.browsentic ~/browsentic
```
@@ -63,9 +63,9 @@ yarn dev # build, launch a throwaway Chrome profile, hot reload
yarn dev:firefox
yarn build # production build
yarn zip # store-ready archive
-yarn mcp:dev # rebuild the daemon on change
-yarn mcp:restart # rebuild, then swap the running daemon for the fresh build
-yarn mcp:manifest # print the tool manifest, no browser needed
+yarn daemon:dev # rebuild the daemon on change
+yarn daemon:restart # rebuild, then swap the running daemon for the fresh build
+yarn daemon:manifest # print the tool manifest, no browser needed
yarn check # both type checks plus both fixture suites
```
diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md
index db95c3b..a133fed 100644
--- a/docs/guide/troubleshooting.md
+++ b/docs/guide/troubleshooting.md
@@ -36,7 +36,7 @@ Those three answer most questions. The daemon log also lives at `~/.browsentic/d
| Tools missing from a session | The server was registered mid-session | Restart the client session — MCP servers load at start |
| A tool call is refused as needing approval | External callers cannot answer a prompt, so `confirm` becomes deny | Do it from the side panel, or set `guardrails.unattended: "allow"` — [read this first](approvals.md#callers-with-nobody-to-ask) |
| `page_extractText` with `format: "html"` is denied | `raw-html-read` is denied by default | Use the default text format, or `{"guardrails":{"rules":{"raw-html-read":"allow"}}}` |
-| `manifest: DRIFTED` | Extension and CLI built from different registries | `yarn build && yarn mcp:restart`, then reload the extension |
+| `manifest: DRIFTED` | Extension and CLI built from different registries | `yarn build && yarn daemon:restart`, then reload the extension |
## Agents
diff --git a/docs/internals/agent-runs.md b/docs/internals/agent-runs.md
index bf68373..0c0debb 100644
--- a/docs/internals/agent-runs.md
+++ b/docs/internals/agent-runs.md
@@ -11,7 +11,7 @@ the browser.
## The intent funnel
-[`lib/intent/`](../../lib/intent/) scores the utterance against a local grammar first. Rules carry a
+[`src/lib/intent/`](../../src/lib/intent/) scores the utterance against a local grammar first. Rules carry a
`certainty`, slot extraction returns a `confidence`, and the product must clear **0.75** to act
locally.
@@ -76,7 +76,7 @@ of `invokeExternal()`. It also causes `browsentic_saveSiteMap` to be published a
## Runners
`runInstruction()` hands the request to one **runner** —
-[`mcp/src/agent/runners/`](../../mcp/src/agent/runners/) — which turns it into an argv, a working
+[`src/daemon/agent/runners/`](../../src/daemon/agent/runners/) — which turns it into an argv, a working
directory and any files that CLI reads from disk. A shared driver (`runners/drive.ts`) does the
spawning, the abort wiring and the line reading; the runner only decides *what to say* and *how to
read the answer back*.
@@ -148,7 +148,7 @@ earlier by name:
| Directory | Source | Contents |
| --- | --- | --- |
-| `mcp/skills/` (bundled) | `bundled` | `browser-control` (default), `page-research`, `page-theming`, `browse-navigation`, `monitor-progress`, `site-mapper`, `captcha`, `a-eye` |
+| `src/daemon/skills/` (bundled) | `bundled` | `browser-control` (default), `page-research`, `page-theming`, `browse-navigation`, `monitor-progress`, `site-mapper`, `captcha`, `a-eye` |
| `~/.browsentic/skills/` | `user` | Hand-written overrides |
| `~/browsentic/skills/` (or `skillsDir`) | `uploaded` | Panel uploads and generated site maps |
diff --git a/docs/internals/contributing.md b/docs/internals/contributing.md
index a4e475a..d377387 100644
--- a/docs/internals/contributing.md
+++ b/docs/internals/contributing.md
@@ -14,11 +14,11 @@ Separate lockfiles.
| --- | --- | --- |
| Root | `/` | `/mcp` |
| Bundler | WXT (Vite) | tsup |
-| Output | `dist/chrome-mv3` | `mcp/dist` |
+| Output | `dist/chrome-mv3` | `src/daemon/dist` |
| Stack | React 19, Tailwind v4, shadcn/ui, zod | Node ≥20, `@modelcontextprotocol/sdk`, `ws`, zod |
-| Build | `yarn build` | `yarn mcp:build` |
+| Build | `yarn build` | `yarn daemon:build` |
-`mcp/` imports `lib/` through the `@/` alias, which is how [one registry](registry.md) ends up in two
+`src/daemon/` imports `src/lib/` through the `@/` alias, which is how [one registry](registry.md) ends up in two
bundles.
`node scripts/setup.mjs` (`yarn setup`) runs all four steps — both installs, both builds — using the
@@ -34,17 +34,17 @@ yarn dev:firefox
yarn build # production build
yarn zip # store-ready archive
yarn compile # type check the extension
-yarn mcp:compile # type check the daemon
-yarn mcp:dev # rebuild the daemon on change
-yarn mcp:restart # rebuild, then swap the running daemon for the fresh build
-yarn mcp:manifest # print the tool manifest, no browser needed
+yarn daemon:compile # type check the daemon
+yarn daemon:dev # rebuild the daemon on change
+yarn daemon:restart # rebuild, then swap the running daemon for the fresh build
+yarn daemon:manifest # print the tool manifest, no browser needed
yarn check:intent # route a fixture table of utterances through the local grammar
yarn check:security
yarn check # both type checks plus both fixture suites
```
**Run `yarn check` before opening a pull request.** If you touched the action registry, also run
-`yarn mcp:manifest` and keep [reference/tools.md](../reference/tools.md) in step with what it prints.
+`yarn daemon:manifest` and keep [reference/tools.md](../reference/tools.md) in step with what it prints.
### The daemon keeps the old build in memory
@@ -52,14 +52,14 @@ The daemon has no start command: the first CLI or MCP client that needs it spawn
until `browsentic stop` or 30 idle minutes with nothing attached.
The flip side is that **a rebuild alone changes nothing while a daemon is running**. That is what
-`yarn mcp:restart` is for: it rebuilds, stops the stale daemon and brings up the fresh build. The
+`yarn daemon:restart` is for: it rebuilds, stops the stale daemon and brings up the fresh build. The
extension cannot spawn the daemon; it only reconnects to one.
---
## Adding a capability
-Write `lib/actions/page/<name>.ts` and add it to the array in `lib/actions/registry.ts`. That single
+Write `src/lib/actions/page/<name>.ts` and add it to the array in `src/lib/actions/registry.ts`. That single
edit publishes it as an MCP tool, because the daemon bundles the same registry.
Four conventions are load-bearing at runtime rather than at compile time:
@@ -77,13 +77,13 @@ auto-reload unpacked extensions, and a stale service worker is the usual cause o
### If the capability is consequential
-Add a rule to [`mcp/src/guardrails/policy.ts`](../../mcp/src/guardrails/policy.ts) rather than a
+Add a rule to [`src/daemon/guardrails/policy.ts`](../../src/daemon/guardrails/policy.ts) rather than a
check inside the action — the policy is meant to be printable and diffable in one place. If it needs
a new predicate, add it to `CONDITIONS`; the vocabulary is closed on purpose.
### If it should be reachable from the side panel without an agent
-Add a rule to [`lib/intent/grammar.ts`](../../lib/intent/grammar.ts) and a fixture to the
+Add a rule to [`src/lib/intent/grammar.ts`](../../src/lib/intent/grammar.ts) and a fixture to the
`yarn check:intent` table. Bias toward escalating — see
[the intent funnel](agent-runs.md#the-intent-funnel).
@@ -91,12 +91,12 @@ Add a rule to [`lib/intent/grammar.ts`](../../lib/intent/grammar.ts) and a fixtu
## Adding an agent runner
-One file in [`mcp/src/agent/runners/`](../../mcp/src/agent/runners/) plus one line in
+One file in [`src/daemon/agent/runners/`](../../src/daemon/agent/runners/) plus one line in
`runners/index.ts`. The shared driver does the spawning, abort wiring and line reading; your runner
decides what to say and how to read the answer back.
You must also add a `CONTAINMENT` entry in
-[`mcp/src/guardrails/spawn.ts`](../../mcp/src/guardrails/spawn.ts) declaring which containment mode
+[`src/daemon/guardrails/spawn.ts`](../../src/daemon/guardrails/spawn.ts) declaring which containment mode
that CLI supports and what its plan must carry. `vetPlan()` refuses to spawn a runner whose plan does
not match — that is the point, and it is asserted in tests without spawning anything.
diff --git a/docs/internals/extension.md b/docs/internals/extension.md
index c8ef375..1660594 100644
--- a/docs/internals/extension.md
+++ b/docs/internals/extension.md
@@ -66,13 +66,13 @@ can size.
| | |
| --- | --- |
-| `lib/rail/events.ts` | The channel, the `RailView` the background computes, the tab list with its Lucide paths copied out, and the palette spelled in `oklch` |
-| `lib/rail/host.ts` | `exposeRail()` in the content script — builds the rail in a **closed** shadow root on `documentElement` |
-| `lib/bridge/rail.ts` | `serveRail()` and `syncRail()` in the background — what to paint, and when |
-| `lib/bridge/panel-view.ts` | `browsentic/panelCollapsed` and `browsentic/panelTab`, read by `use-panel-view.ts` in the panel |
+| `src/lib/rail/events.ts` | The channel, the `RailView` the background computes, the tab list with its Lucide paths copied out, and the palette spelled in `oklch` |
+| `src/lib/rail/host.ts` | `exposeRail()` in the content script — builds the rail in a **closed** shadow root on `documentElement` |
+| `src/lib/bridge/rail.ts` | `serveRail()` and `syncRail()` in the background — what to paint, and when |
+| `src/lib/bridge/panel-view.ts` | `browsentic/panelCollapsed` and `browsentic/panelTab`, read by `use-panel-view.ts` in the panel |
The content script carries no React and no icon package, which is why the paths and colours are
-copied rather than imported — `components/` would drag the whole panel bundle onto every page.
+copied rather than imported — `src/extension/components/` would drag the whole panel bundle onto every page.
**A closed shadow root on `documentElement` is load-bearing.** It keeps the rail out of
`body.innerText` (so `extractText` never returns it), out of the page's `querySelectorAll`, and out
diff --git a/docs/internals/guardrails.md b/docs/internals/guardrails.md
index 81b7cde..c819af3 100644
--- a/docs/internals/guardrails.md
+++ b/docs/internals/guardrails.md
@@ -1,6 +1,6 @@
# Guardrails
-[`mcp/src/guardrails/`](../../mcp/src/guardrails/) — four mechanisms, all declarative.
+[`src/daemon/guardrails/`](../../src/daemon/guardrails/) — four mechanisms, all declarative.
![decide() and its three outcomes, over the four declarative mechanisms](../assets/guardrails.png)
@@ -97,7 +97,7 @@ the consequential actions. `unattended: 'allow'` goes back to waiving them.
### The settings screen
-`guardrailSettings()` in [settings.ts](../../mcp/src/guardrails/settings.ts) describes the policy to
+`guardrailSettings()` in [settings.ts](../../src/daemon/guardrails/settings.ts) describes the policy to
the side panel's Settings tab. Everything it returns is derived from `DEFAULT_RULES` and the live
config, so a rule added to the policy appears in the screen with no second edit, and a rule whose
title or reason changes says the new thing in both places.
@@ -209,7 +209,7 @@ No model, no scoring, no dependence on what was asked — the same text always y
findings. That is not a stylistic preference: the client seals and the daemon seals again, and the
second pass can only leave the first one's work alone if both agree about what a secret is.
-Three passes, in `lib/secrets/`:
+Three passes, in `src/lib/secrets/`:
| Pass | Finds | Example |
| --- | --- | --- |
diff --git a/docs/internals/registry.md b/docs/internals/registry.md
index 34ff67e..f2c7faa 100644
--- a/docs/internals/registry.md
+++ b/docs/internals/registry.md
@@ -9,7 +9,7 @@ One definition, compiled into two bundles.
## One array, two consumers
There are **41 page capabilities**. They are defined once, in
-[`lib/actions/registry.ts`](../../lib/actions/registry.ts), and that array is compiled into **both**
+[`src/lib/actions/registry.ts`](../../src/lib/actions/registry.ts), and that array is compiled into **both**
the extension and the daemon.
Each action is a small module — a name, a description, a zod input schema, and an `execute()`:
@@ -81,7 +81,7 @@ combining daemon state with a one-element `page.getPageInfo` and the current mon
## Verifying
```sh
-yarn mcp:manifest
+yarn daemon:manifest
```
Builds the MCP server and prints every tool with its full JSON Schema. No browser needed. This is
diff --git a/docs/internals/subsystems.md b/docs/internals/subsystems.md
index cdb1794..c8fc167 100644
--- a/docs/internals/subsystems.md
+++ b/docs/internals/subsystems.md
@@ -8,7 +8,7 @@ The five things that are more than a single action.
## Monitors
-[`lib/monitor/`](../../lib/monitor/), [`lib/bridge/monitor.ts`](../../lib/bridge/monitor.ts)
+[`src/lib/monitor/`](../../src/lib/monitor/), [`src/lib/bridge/monitor.ts`](../../src/lib/bridge/monitor.ts)
Watch a pinned tab in the background for a completion condition — an element appearing or vanishing,
text or title matching a regex, a progress bar reaching a threshold.
@@ -33,7 +33,7 @@ and the daemon going away.
## Recordings
-[`lib/recordings/`](../../lib/recordings/)
+[`src/lib/recordings/`](../../src/lib/recordings/)
The reverse of a monitor: the content script observes what *you* do in one pinned tab — clicks,
fills, selects, keys, submits, scrolls, navigations — and batches the events to the background.
@@ -60,8 +60,8 @@ list them and why `page_listRecordings` / `page_readRecording` exist as tools.
## Site maps
-[`lib/skills/site-map.ts`](../../lib/skills/site-map.ts),
-[`mcp/src/agent/site-map-store.ts`](../../mcp/src/agent/site-map-store.ts)
+[`src/lib/skills/site-map.ts`](../../src/lib/skills/site-map.ts),
+[`src/daemon/agent/site-map-store.ts`](../../src/daemon/agent/site-map-store.ts)
Generated skills. A mapping run crawls one host read-only under the
[mapping gate](guardrails.md#the-mapping-gate) and finishes by calling `browsentic_saveSiteMap`
diff --git a/docs/reference/README.md b/docs/reference/README.md
index d802e9d..5284443 100644
--- a/docs/reference/README.md
+++ b/docs/reference/README.md
@@ -9,9 +9,9 @@ Lookup tables. Nothing here explains a workflow — see the [user guide](../guid
| [CLI](cli.md) | Every `browsentic` command |
| [Errors](errors.md) | Every error code, where it comes from, and what to do about it |
-The tool list is generated from [`lib/actions/registry.ts`](../../lib/actions/registry.ts). The
+The tool list is generated from [`src/lib/actions/registry.ts`](../../src/lib/actions/registry.ts). The
machine-readable copy is always one command away:
```sh
-yarn mcp:manifest
+yarn daemon:manifest
```
diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index a353e15..9fcb4a9 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -88,7 +88,7 @@ configurations written against the older name keep working.
| `browsentic help` / `--help` / `-h` | Usage |
**A rebuild does not replace a running daemon.** It keeps the old code in memory until `stop` or
-`restart`. In the repository, `yarn mcp:restart` chains the rebuild with the restart.
+`restart`. In the repository, `yarn daemon:restart` chains the rebuild with the restart.
---
@@ -99,10 +99,10 @@ Not the CLI, but frequently wanted alongside it:
| Command | Does |
| --- | --- |
| `yarn setup` | Install and build both halves |
-| `yarn mcp:link` | Put `browsentic` on your `PATH` from a source checkout |
-| `yarn mcp:unlink` | Take it off again |
-| `yarn mcp:restart` | Rebuild the daemon, then swap the running one for it |
-| `yarn mcp:manifest` | Build and print the tool manifest |
+| `yarn daemon:link` | Put `browsentic` on your `PATH` from a source checkout |
+| `yarn daemon:unlink` | Take it off again |
+| `yarn daemon:restart` | Rebuild the daemon, then swap the running one for it |
+| `yarn daemon:manifest` | Build and print the tool manifest |
| `yarn check` | Both type checks plus both fixture suites |
| `yarn check:intent "<utterance>"` | Explain how one instruction would be routed |
diff --git a/docs/reference/tools.md b/docs/reference/tools.md
index 4c6d67d..4834255 100644
--- a/docs/reference/tools.md
+++ b/docs/reference/tools.md
@@ -4,11 +4,11 @@ Every tool Browsentic publishes to an MCP client, the action behind each one, th
resources, and the reserved actions that never become tools.
The page tools are generated from the shared action registry
-([lib/actions/registry.ts](../../lib/actions/registry.ts)) — one module per action under
-[lib/actions/page/](../../lib/actions/page/), one entry in the registry, and the daemon publishes it.
+([src/lib/actions/registry.ts](../../src/lib/actions/registry.ts)) — one module per action under
+[src/lib/actions/page/](../../src/lib/actions/page/), one entry in the registry, and the daemon publishes it.
Because the extension and the MCP server are built from the same registry, a tool can never
describe something the browser cannot do. This page is the human-readable copy; the machine
-listing is always `yarn mcp:manifest` (see [Keeping this page honest](#keeping-this-page-honest)).
+listing is always `yarn daemon:manifest` (see [Keeping this page honest](#keeping-this-page-honest)).
**Names.** An action is namespaced with dots, a tool with underscores: action `page.fillInput` is
published as tool `page_fillInput`. The mapping is mechanical, so this page names each tool once
@@ -800,7 +800,7 @@ words, which is why no MCP client gets a tool for it.
The machine-readable listing is always one command away:
```sh
-yarn mcp:manifest
+yarn daemon:manifest
```
It builds the MCP server and prints every page tool with its full JSON Schema. If you add or
diff --git a/package.json b/package.json
index a73c8fc..c6a4cbe 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "browsentic",
"version": "0.3.1",
- "description": "Browsentic — agentic browsing driven by the AI agent you already run",
+ "description": "Browsentic \u2014 agentic browsing driven by the AI agent you already run",
"license": "MIT",
"private": true,
"type": "module",
@@ -16,16 +16,16 @@
"zip": "wxt zip",
"icons": "node scripts/generate-icons.mjs",
"compile": "tsc --noEmit",
- "check": "yarn compile && yarn mcp:compile && yarn check:intent && yarn check:security",
+ "check": "yarn compile && yarn daemon:compile && yarn check:intent && yarn check:security",
"check:intent": "node scripts/check-intent.mjs",
"check:security": "node scripts/check-security.mjs",
- "mcp:compile": "yarn --cwd mcp compile",
- "mcp:build": "yarn --cwd mcp build",
- "mcp:dev": "yarn --cwd mcp dev",
- "mcp:restart": "yarn mcp:build && node mcp/dist/cli.js restart",
- "mcp:manifest": "yarn mcp:build && node mcp/dist/cli.js tools",
- "mcp:link": "cd mcp && npm link",
- "mcp:unlink": "npm rm -g @browsentic/mcp"
+ "daemon:compile": "yarn --cwd src/daemon compile",
+ "daemon:build": "yarn --cwd src/daemon build",
+ "daemon:dev": "yarn --cwd src/daemon dev",
+ "daemon:restart": "yarn daemon:build && node src/daemon/dist/cli.js restart",
+ "daemon:manifest": "yarn daemon:build && node src/daemon/dist/cli.js tools",
+ "daemon:link": "cd src/daemon && npm link",
+ "daemon:unlink": "npm rm -g browsentic"
},
"dependencies": {
"@radix-ui/react-scroll-area": "^1.2.16",
diff --git a/scripts/check-intent.mjs b/scripts/check-intent.mjs
index f0f270f..3afeaa0 100644
--- a/scripts/check-intent.mjs
+++ b/scripts/check-intent.mjs
@@ -122,13 +122,13 @@ const CASES = [
const outfile = join(root, 'node_modules/.cache/browsentic/intent-check.mjs');
await mkdir(dirname(outfile), { recursive: true });
await build({
- entryPoints: [join(root, 'lib/intent/index.ts')],
+ entryPoints: [join(root, 'src/lib/intent/index.ts')],
outfile,
bundle: true,
format: 'esm',
platform: 'node',
logLevel: 'warning',
- alias: { '@': root },
+ alias: { '@': join(root, 'src') },
});
const { routeIntent, ACT_THRESHOLD } = await import(pathToFileURL(outfile).href);
diff --git a/scripts/check-security.mjs b/scripts/check-security.mjs
index b4a21c5..8b226f5 100644
--- a/scripts/check-security.mjs
+++ b/scripts/check-security.mjs
@@ -19,19 +19,19 @@ async function bundle(entry, name) {
format: 'esm',
platform: 'node',
logLevel: 'warning',
- alias: { '@': root },
+ alias: { '@': join(root, 'src') },
});
return import(pathToFileURL(outfile).href);
}
-const sitemap = await bundle('mcp/src/agent/sitemap.ts', 'sitemap');
-const guardrails = await bundle('mcp/src/guardrails/index.ts', 'guardrails');
-const redact = await bundle('lib/bridge/redact.ts', 'redact');
-const secrets = await bundle('lib/secrets/index.ts', 'secrets');
-const handshake = await bundle('lib/actions/handshake.ts', 'handshake');
-const reserved = await bundle('lib/actions/reserved.ts', 'reserved');
-const runners = await bundle('mcp/src/agent/runners/index.ts', 'runners');
-const lockfile = await bundle('mcp/src/lockfile.ts', 'lockfile');
+const sitemap = await bundle('src/daemon/agent/sitemap.ts', 'sitemap');
+const guardrails = await bundle('src/daemon/guardrails/index.ts', 'guardrails');
+const redact = await bundle('src/lib/bridge/redact.ts', 'redact');
+const secrets = await bundle('src/lib/secrets/index.ts', 'secrets');
+const handshake = await bundle('src/lib/actions/handshake.ts', 'handshake');
+const reserved = await bundle('src/lib/actions/reserved.ts', 'reserved');
+const runners = await bundle('src/daemon/agent/runners/index.ts', 'runners');
+const lockfile = await bundle('src/daemon/lockfile.ts', 'lockfile');
let failed = 0;
let ran = 0;
diff --git a/scripts/release-notes.mjs b/scripts/release-notes.mjs
index 16f5168..bb2015d 100644
--- a/scripts/release-notes.mjs
+++ b/scripts/release-notes.mjs
@@ -105,7 +105,7 @@ function renderNotes(version, commits, prevTag) {
'',
'```sh',
`git clone --branch v${version} https://github.com/${REPO}.git`,
- 'cd browsentic && yarn setup && yarn mcp:link',
+ 'cd browsentic && yarn setup && yarn daemon:link',
'browsentic setup',
'```',
'',
diff --git a/scripts/setup.mjs b/scripts/setup.mjs
index 138eb86..0a50ade 100644
--- a/scripts/setup.mjs
+++ b/scripts/setup.mjs
@@ -16,12 +16,12 @@ function yarn() {
return ['yarn', []];
}
-// mcp/ is a separate Yarn project (its own lockfile), so the root install does not cover it.
+// src/daemon is a separate Yarn project (its own lockfile), so the root install does not cover it.
const STEPS = [
['extension dependencies', ['install']],
['extension build', ['build']],
- ['daemon dependencies', ['--cwd', 'mcp', 'install']],
- ['daemon build', ['--cwd', 'mcp', 'build']],
+ ['daemon dependencies', ['--cwd', 'src/daemon', 'install']],
+ ['daemon build', ['--cwd', 'src/daemon', 'build']],
];
const [bin, prefix] = yarn();
@@ -49,10 +49,10 @@ STEPS.forEach(([label, args], i) => {
console.log(`
\x1b[32m✓ Extension built\x1b[0m dist/chrome-mv3 — load it unpacked at chrome://extensions, Developer mode on
-\x1b[32m✓ Daemon built\x1b[0m mcp/dist
+\x1b[32m✓ Daemon built\x1b[0m src/daemon/dist
Two steps are left. Both reach outside this directory, so they stay separate:
- yarn mcp:link puts \`browsentic\` on your PATH (writes to the global npm prefix)
+ yarn daemon:link puts \`browsentic\` on your PATH (writes to the global npm prefix)
browsentic pair prints a single use code, valid for 10 minutes
`);
diff --git a/mcp/.yarnrc.yml b/src/daemon/.yarnrc.yml
similarity index 91%
rename from mcp/.yarnrc.yml
rename to src/daemon/.yarnrc.yml
index 4f554ef..62ff9e7 100644
--- a/mcp/.yarnrc.yml
+++ b/src/daemon/.yarnrc.yml
@@ -4,7 +4,7 @@
#
# What actually keeps the two apart is `mcp/yarn.lock`: Yarn picks a project root by walking
# up from the cwd and stopping at the first directory holding a lockfile. Delete that file
-# and `yarn --cwd mcp` gets absorbed into the root install.
+# and `yarn --cwd src/daemon` gets absorbed into the root install.
#
# `yarnPath` is inherited from the root .yarnrc.yml (path settings resolve against the file
# that declared them, so it still points at the vendored release). Only the linker is
diff --git a/mcp/LICENSE b/src/daemon/LICENSE
similarity index 100%
rename from mcp/LICENSE
rename to src/daemon/LICENSE
diff --git a/mcp/README.md b/src/daemon/README.md
similarity index 100%
rename from mcp/README.md
rename to src/daemon/README.md
diff --git a/mcp/src/agent/agent-skills.ts b/src/daemon/agent/agent-skills.ts
similarity index 100%
rename from mcp/src/agent/agent-skills.ts
rename to src/daemon/agent/agent-skills.ts
diff --git a/mcp/src/agent/analyze.ts b/src/daemon/agent/analyze.ts
similarity index 100%
rename from mcp/src/agent/analyze.ts
rename to src/daemon/agent/analyze.ts
diff --git a/mcp/src/agent/approvals.ts b/src/daemon/agent/approvals.ts
similarity index 100%
rename from mcp/src/agent/approvals.ts
rename to src/daemon/agent/approvals.ts
diff --git a/mcp/src/agent/config.ts b/src/daemon/agent/config.ts
similarity index 98%
rename from mcp/src/agent/config.ts
rename to src/daemon/agent/config.ts
index 5f922a5..8bcf352 100644
--- a/mcp/src/agent/config.ts
+++ b/src/daemon/agent/config.ts
@@ -19,7 +19,7 @@ export interface AgentConfig {
requireApproval: string[];
/** How many tab sessions may have a run going at once. */
maxConcurrentRuns?: number;
- /** Overrides for the declared guardrail policy. See mcp/src/guardrails/policy.ts. */
+ /** Overrides for the declared guardrail policy. See guardrails/policy.ts. */
guardrails?: GuardrailConfig;
screenshotDir?: string;
skillsDir?: string;
diff --git a/mcp/src/agent/mapping.ts b/src/daemon/agent/mapping.ts
similarity index 100%
rename from mcp/src/agent/mapping.ts
rename to src/daemon/agent/mapping.ts
diff --git a/mcp/src/agent/prompt.ts b/src/daemon/agent/prompt.ts
similarity index 100%
rename from mcp/src/agent/prompt.ts
rename to src/daemon/agent/prompt.ts
diff --git a/mcp/src/agent/recording.ts b/src/daemon/agent/recording.ts
similarity index 100%
rename from mcp/src/agent/recording.ts
rename to src/daemon/agent/recording.ts
diff --git a/mcp/src/agent/runner.ts b/src/daemon/agent/runner.ts
similarity index 100%
rename from mcp/src/agent/runner.ts
rename to src/daemon/agent/runner.ts
diff --git a/mcp/src/agent/runners/antigravity.ts b/src/daemon/agent/runners/antigravity.ts
similarity index 100%
rename from mcp/src/agent/runners/antigravity.ts
rename to src/daemon/agent/runners/antigravity.ts
diff --git a/mcp/src/agent/runners/claude.ts b/src/daemon/agent/runners/claude.ts
similarity index 100%
rename from mcp/src/agent/runners/claude.ts
rename to src/daemon/agent/runners/claude.ts
diff --git a/mcp/src/agent/runners/codex.ts b/src/daemon/agent/runners/codex.ts
similarity index 100%
rename from mcp/src/agent/runners/codex.ts
rename to src/daemon/agent/runners/codex.ts
diff --git a/mcp/src/agent/runners/drive.ts b/src/daemon/agent/runners/drive.ts
similarity index 100%
rename from mcp/src/agent/runners/drive.ts
rename to src/daemon/agent/runners/drive.ts
diff --git a/mcp/src/agent/runners/index.ts b/src/daemon/agent/runners/index.ts
similarity index 100%
rename from mcp/src/agent/runners/index.ts
rename to src/daemon/agent/runners/index.ts
diff --git a/mcp/src/agent/runners/types.ts b/src/daemon/agent/runners/types.ts
similarity index 100%
rename from mcp/src/agent/runners/types.ts
rename to src/daemon/agent/runners/types.ts
diff --git a/mcp/src/agent/runners/util.ts b/src/daemon/agent/runners/util.ts
similarity index 100%
rename from mcp/src/agent/runners/util.ts
rename to src/daemon/agent/runners/util.ts
diff --git a/mcp/src/agent/service.ts b/src/daemon/agent/service.ts
similarity index 100%
rename from mcp/src/agent/service.ts
rename to src/daemon/agent/service.ts
diff --git a/mcp/src/agent/site-map-store.ts b/src/daemon/agent/site-map-store.ts
similarity index 100%
rename from mcp/src/agent/site-map-store.ts
rename to src/daemon/agent/site-map-store.ts
diff --git a/mcp/src/agent/sitemap.ts b/src/daemon/agent/sitemap.ts
similarity index 100%
rename from mcp/src/agent/sitemap.ts
rename to src/daemon/agent/sitemap.ts
diff --git a/mcp/src/agent/skill-store.ts b/src/daemon/agent/skill-store.ts
similarity index 100%
rename from mcp/src/agent/skill-store.ts
rename to src/daemon/agent/skill-store.ts
diff --git a/mcp/src/agent/skills.ts b/src/daemon/agent/skills.ts
similarity index 100%
rename from mcp/src/agent/skills.ts
rename to src/daemon/agent/skills.ts
diff --git a/mcp/src/agent/title.ts b/src/daemon/agent/title.ts
similarity index 100%
rename from mcp/src/agent/title.ts
rename to src/daemon/agent/title.ts
diff --git a/mcp/src/auth-store.ts b/src/daemon/auth-store.ts
similarity index 100%
rename from mcp/src/auth-store.ts
rename to src/daemon/auth-store.ts
diff --git a/mcp/src/cli.ts b/src/daemon/cli.ts
similarity index 99%
rename from mcp/src/cli.ts
rename to src/daemon/cli.ts
index 8ef03be..7ee7563 100644
--- a/mcp/src/cli.ts
+++ b/src/daemon/cli.ts
@@ -16,7 +16,7 @@ import { log } from './log';
import { extensionDir } from './paths';
import { RemoteBridge } from './remote-bridge';
import { createMcpServer } from './server';
-import pkg from '../package.json';
+import pkg from './package.json';
const USAGE = `browsentic ${pkg.version} — hand your real browser to the agent you already run
diff --git a/mcp/src/control.ts b/src/daemon/control.ts
similarity index 100%
rename from mcp/src/control.ts
rename to src/daemon/control.ts
diff --git a/mcp/src/daemon-main.ts b/src/daemon/daemon-main.ts
similarity index 93%
rename from mcp/src/daemon-main.ts
rename to src/daemon/daemon-main.ts
index d2b6367..b755703 100644
--- a/mcp/src/daemon-main.ts
+++ b/src/daemon/daemon-main.ts
@@ -1,6 +1,6 @@
import { startDaemon } from './daemon';
import { log } from './log';
-import pkg from '../package.json';
+import pkg from './package.json';
const daemon = await startDaemon({
version: pkg.version,
diff --git a/mcp/src/daemon.ts b/src/daemon/daemon.ts
similarity index 100%
rename from mcp/src/daemon.ts
rename to src/daemon/daemon.ts
diff --git a/mcp/src/ensure-daemon.ts b/src/daemon/ensure-daemon.ts
similarity index 100%
rename from mcp/src/ensure-daemon.ts
rename to src/daemon/ensure-daemon.ts
diff --git a/mcp/src/extension-link.ts b/src/daemon/extension-link.ts
similarity index 100%
rename from mcp/src/extension-link.ts
rename to src/daemon/extension-link.ts
diff --git a/mcp/src/guardrails/decide.ts b/src/daemon/guardrails/decide.ts
similarity index 100%
rename from mcp/src/guardrails/decide.ts
rename to src/daemon/guardrails/decide.ts
diff --git a/mcp/src/guardrails/fence.ts b/src/daemon/guardrails/fence.ts
similarity index 100%
rename from mcp/src/guardrails/fence.ts
rename to src/daemon/guardrails/fence.ts
diff --git a/mcp/src/guardrails/index.ts b/src/daemon/guardrails/index.ts
similarity index 100%
rename from mcp/src/guardrails/index.ts
rename to src/daemon/guardrails/index.ts
diff --git a/mcp/src/guardrails/policy.ts b/src/daemon/guardrails/policy.ts
similarity index 100%
rename from mcp/src/guardrails/policy.ts
rename to src/daemon/guardrails/policy.ts
diff --git a/mcp/src/guardrails/scope.ts b/src/daemon/guardrails/scope.ts
similarity index 100%
rename from mcp/src/guardrails/scope.ts
rename to src/daemon/guardrails/scope.ts
diff --git a/mcp/src/guardrails/secrets.ts b/src/daemon/guardrails/secrets.ts
similarity index 100%
rename from mcp/src/guardrails/secrets.ts
rename to src/daemon/guardrails/secrets.ts
diff --git a/mcp/src/guardrails/settings.ts b/src/daemon/guardrails/settings.ts
similarity index 100%
rename from mcp/src/guardrails/settings.ts
rename to src/daemon/guardrails/settings.ts
diff --git a/mcp/src/guardrails/spawn.ts b/src/daemon/guardrails/spawn.ts
similarity index 100%
rename from mcp/src/guardrails/spawn.ts
rename to src/daemon/guardrails/spawn.ts
diff --git a/mcp/src/install.ts b/src/daemon/install.ts
similarity index 100%
rename from mcp/src/install.ts
rename to src/daemon/install.ts
diff --git a/mcp/src/lockfile.ts b/src/daemon/lockfile.ts
similarity index 100%
rename from mcp/src/lockfile.ts
rename to src/daemon/lockfile.ts
diff --git a/mcp/src/log.ts b/src/daemon/log.ts
similarity index 100%
rename from mcp/src/log.ts
rename to src/daemon/log.ts
diff --git a/mcp/package.json b/src/daemon/package.json
similarity index 97%
rename from mcp/package.json
rename to src/daemon/package.json
index cc46694..be87797 100644
--- a/mcp/package.json
+++ b/src/daemon/package.json
@@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/imshaikot/browsentic.git",
- "directory": "mcp"
+ "directory": "src/daemon"
},
"bugs": "https://github.com/imshaikot/browsentic/issues",
"keywords": [
diff --git a/mcp/src/paths.ts b/src/daemon/paths.ts
similarity index 95%
rename from mcp/src/paths.ts
rename to src/daemon/paths.ts
index 38fd54b..043add9 100644
--- a/mcp/src/paths.ts
+++ b/src/daemon/paths.ts
@@ -50,14 +50,14 @@ export interface InstallStamp {
* 1. `<pkg>/extension/chrome-mv3` — staged into the tarball at prepack time. This is what an
* `npm i` or `npx` install has, and it mirrors how bundled skills already resolve
* (see agent/skills.ts).
- * 2. `<repo>/dist/chrome-mv3` — a source checkout, i.e. `yarn mcp:link` or running
+ * 2. `<repo>/dist/chrome-mv3` — a source checkout, i.e. `yarn daemon:link` or running
* `node mcp/dist/cli.js` directly.
*/
export function packagedExtension(): { dir: string; source: 'package' | 'repo' } | null {
const here = dirname(fileURLToPath(import.meta.url));
const candidates = [
{ dir: join(here, '..', 'extension', 'chrome-mv3'), source: 'package' as const },
- { dir: join(here, '..', '..', 'dist', 'chrome-mv3'), source: 'repo' as const },
+ { dir: join(here, '..', '..', '..', '..', 'dist', 'chrome-mv3'), source: 'repo' as const },
];
return candidates.find((c) => existsSync(join(c.dir, 'manifest.json'))) ?? null;
}
diff --git a/mcp/src/remote-bridge.ts b/src/daemon/remote-bridge.ts
similarity index 100%
rename from mcp/src/remote-bridge.ts
rename to src/daemon/remote-bridge.ts
diff --git a/mcp/src/screenshots.ts b/src/daemon/screenshots.ts
similarity index 100%
rename from mcp/src/screenshots.ts
rename to src/daemon/screenshots.ts
diff --git a/mcp/scripts/stage-extension.mjs b/src/daemon/scripts/stage-extension.mjs
similarity index 95%
rename from mcp/scripts/stage-extension.mjs
rename to src/daemon/scripts/stage-extension.mjs
index fd0cece..9b33982 100644
--- a/mcp/scripts/stage-extension.mjs
+++ b/src/daemon/scripts/stage-extension.mjs
@@ -17,7 +17,7 @@ import path from 'node:path'
import { fileURLToPath } from 'node:url'
const PKG = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
-const SOURCE = path.join(PKG, '..', 'dist', 'chrome-mv3')
+const SOURCE = path.join(PKG, '..', '..', 'dist', 'chrome-mv3')
const TARGET = path.join(PKG, 'extension', 'chrome-mv3')
const die = (message, hint) => {
@@ -36,7 +36,7 @@ if (!existsSync(manifestPath)) {
}
if (!existsSync(path.join(PKG, 'dist', 'cli.js'))) {
- die('no daemon build at mcp/dist/cli.js', 'Run `yarn mcp:build` first.')
+ die('no daemon build at src/daemon/dist/cli.js', 'Run `yarn daemon:build` first.')
}
// The one that actually bites: publishing a new daemon beside a stale extension. It installs
diff --git a/mcp/src/server.ts b/src/daemon/server.ts
similarity index 98%
rename from mcp/src/server.ts
rename to src/daemon/server.ts
index 8c2a8ff..da59db9 100644
--- a/mcp/src/server.ts
+++ b/src/daemon/server.ts
@@ -212,7 +212,7 @@ async function status(bridge: Bridge) {
const hints = [
base.manifestInSync
? ''
- : 'The extension is running an older build than the daemon, so your tool list came from the extension and is stale — capabilities that exist in this repository may be missing entirely. You cannot fix this yourself: tell the user to run `yarn build && yarn mcp:build` and then press Reload on Browsentic at chrome://extensions. Do not improvise around a tool you think should exist.',
+ : 'The extension is running an older build than the daemon, so your tool list came from the extension and is stale — capabilities that exist in this repository may be missing entirely. You cannot fix this yourself: tell the user to run `yarn build && yarn daemon:build` and then press Reload on Browsentic at chrome://extensions. Do not improvise around a tool you think should exist.',
page.ok ? '' : `Cannot read the active tab (${page.error.code}). Use page_navigate to open an http(s) page first.`,
].filter(Boolean);
diff --git a/mcp/skills/a-eye.md b/src/daemon/skills/a-eye.md
similarity index 100%
rename from mcp/skills/a-eye.md
rename to src/daemon/skills/a-eye.md
diff --git a/mcp/skills/browse-navigation.md b/src/daemon/skills/browse-navigation.md
similarity index 100%
rename from mcp/skills/browse-navigation.md
rename to src/daemon/skills/browse-navigation.md
diff --git a/mcp/skills/browser-control.md b/src/daemon/skills/browser-control.md
similarity index 100%
rename from mcp/skills/browser-control.md
rename to src/daemon/skills/browser-control.md
diff --git a/mcp/skills/captcha.md b/src/daemon/skills/captcha.md
similarity index 100%
rename from mcp/skills/captcha.md
rename to src/daemon/skills/captcha.md
diff --git a/mcp/skills/monitor-progress.md b/src/daemon/skills/monitor-progress.md
similarity index 100%
rename from mcp/skills/monitor-progress.md
rename to src/daemon/skills/monitor-progress.md
diff --git a/mcp/skills/page-research.md b/src/daemon/skills/page-research.md
similarity index 100%
rename from mcp/skills/page-research.md
rename to src/daemon/skills/page-research.md
diff --git a/mcp/skills/page-theming.md b/src/daemon/skills/page-theming.md
similarity index 100%
rename from mcp/skills/page-theming.md
rename to src/daemon/skills/page-theming.md
diff --git a/mcp/skills/scheduled-jobs.md b/src/daemon/skills/scheduled-jobs.md
similarity index 100%
rename from mcp/skills/scheduled-jobs.md
rename to src/daemon/skills/scheduled-jobs.md
diff --git a/mcp/skills/site-mapper.md b/src/daemon/skills/site-mapper.md
similarity index 100%
rename from mcp/skills/site-mapper.md
rename to src/daemon/skills/site-mapper.md
diff --git a/mcp/tsconfig.json b/src/daemon/tsconfig.json
similarity index 90%
rename from mcp/tsconfig.json
rename to src/daemon/tsconfig.json
index 4b3cc8c..01917c7 100644
--- a/mcp/tsconfig.json
+++ b/src/daemon/tsconfig.json
@@ -24,5 +24,6 @@
"zod/*": ["./node_modules/zod/*"]
}
},
- "include": ["src/**/*", "../lib/actions/**/*", "../lib/skills/**/*"]
+ "include": ["**/*.ts", "../lib/actions/**/*", "../lib/skills/**/*"],
+ "exclude": ["node_modules", "dist"]
}
diff --git a/mcp/tsup.config.ts b/src/daemon/tsup.config.ts
similarity index 97%
rename from mcp/tsup.config.ts
rename to src/daemon/tsup.config.ts
index 19e78cb..0c86d91 100644
--- a/mcp/tsup.config.ts
+++ b/src/daemon/tsup.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from 'tsup';
export default defineConfig({
- entry: ['src/cli.ts', 'src/daemon-main.ts'],
+ entry: ['cli.ts', 'daemon-main.ts'],
format: ['esm'],
target: 'node20',
platform: 'node',
diff --git a/mcp/yarn.lock b/src/daemon/yarn.lock
similarity index 100%
rename from mcp/yarn.lock
rename to src/daemon/yarn.lock
diff --git a/assets/globals.css b/src/extension/assets/globals.css
similarity index 100%
rename from assets/globals.css
rename to src/extension/assets/globals.css
diff --git a/components/agent-picker.tsx b/src/extension/components/agent-picker.tsx
similarity index 97%
rename from components/agent-picker.tsx
rename to src/extension/components/agent-picker.tsx
index 15a2edb..e8a0c00 100644
--- a/components/agent-picker.tsx
+++ b/src/extension/components/agent-picker.tsx
@@ -2,8 +2,8 @@ import { useEffect, useState } from 'react';
import { Check, Loader2, RefreshCw, ShieldCheck, TriangleAlert } from 'lucide-react';
import { browser } from 'wxt/browser';
-import { StatusDot } from '@/components/status-pill';
-import { Button } from '@/components/ui/button';
+import { StatusDot } from '@/extension/components/status-pill';
+import { Button } from '@/extension/components/ui/button';
import { BRIDGE_CHANNEL, type ActionResult } from '@/lib/actions/protocol';
import { AGENTS, AGENT_LIST, type AgentKind, type AgentState, type RunnerStatus } from '@/lib/agents/catalog';
import { useDaemonState } from '@/lib/bridge/use-daemon-state';
diff --git a/components/brand.tsx b/src/extension/components/brand.tsx
similarity index 100%
rename from components/brand.tsx
rename to src/extension/components/brand.tsx
diff --git a/components/composer.tsx b/src/extension/components/composer.tsx
similarity index 98%
rename from components/composer.tsx
rename to src/extension/components/composer.tsx
index 557c46e..fbbd953 100644
--- a/components/composer.tsx
+++ b/src/extension/components/composer.tsx
@@ -1,9 +1,9 @@
import { useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
import { FileText, FileUp, Loader2, Mic, MicOff, Paperclip, ScanEye, Send, Sparkles, Square, X } from 'lucide-react';
-import { SkillMenu, skillMenuItems, type SkillMenuItem } from '@/components/skill-menu';
-import { Button } from '@/components/ui/button';
-import { Textarea } from '@/components/ui/textarea';
+import { SkillMenu, skillMenuItems, type SkillMenuItem } from '@/extension/components/skill-menu';
+import { Button } from '@/extension/components/ui/button';
+import { Textarea } from '@/extension/components/ui/textarea';
import type { FocusedElement, SkillCatalog } from '@/lib/actions/protocol';
import { focusName } from '@/lib/bridge/aeye';
import type { StoredFileMeta } from '@/lib/bridge/file-store';
diff --git a/components/connection-sheet.tsx b/src/extension/components/connection-sheet.tsx
similarity index 77%
rename from components/connection-sheet.tsx
rename to src/extension/components/connection-sheet.tsx
index 933a0a4..ae972e2 100644
--- a/components/connection-sheet.tsx
+++ b/src/extension/components/connection-sheet.tsx
@@ -1,8 +1,8 @@
import { X } from 'lucide-react';
-import { AgentPicker } from '@/components/agent-picker';
-import { DaemonLink } from '@/components/daemon-link';
-import { Button } from '@/components/ui/button';
+import { AgentPicker } from '@/extension/components/agent-picker';
+import { DaemonLink } from '@/extension/components/daemon-link';
+import { Button } from '@/extension/components/ui/button';
export function ConnectionSheet({ onClose }: { onClose: () => void }) {
return (
diff --git a/components/daemon-link.tsx b/src/extension/components/daemon-link.tsx
similarity index 96%
rename from components/daemon-link.tsx
rename to src/extension/components/daemon-link.tsx
index c076425..86b5ce9 100644
--- a/components/daemon-link.tsx
+++ b/src/extension/components/daemon-link.tsx
@@ -2,8 +2,8 @@ import { useState } from 'react';
import { Link2, Link2Off, Loader2 } from 'lucide-react';
import { browser } from 'wxt/browser';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
+import { Button } from '@/extension/components/ui/button';
+import { Input } from '@/extension/components/ui/input';
import { BRIDGE_CHANNEL, type ActionResult } from '@/lib/actions/protocol';
import { useDaemonState } from '@/lib/bridge/use-daemon-state';
diff --git a/components/greeting.tsx b/src/extension/components/greeting.tsx
similarity index 94%
rename from components/greeting.tsx
rename to src/extension/components/greeting.tsx
index 10cedd7..e38b383 100644
--- a/components/greeting.tsx
+++ b/src/extension/components/greeting.tsx
@@ -1,8 +1,8 @@
import { BookOpen, Clapperboard, History, Settings2, type LucideIcon } from 'lucide-react';
-import { Logo } from '@/components/brand';
-import type { PanelTab } from '@/components/panel-nav';
-import type { StatusBlocker } from '@/components/status-pill';
+import { Logo } from '@/extension/components/brand';
+import type { PanelTab } from '@/extension/components/panel-nav';
+import type { StatusBlocker } from '@/extension/components/status-pill';
const SUGGESTIONS = [
'Summarise what this page says',
diff --git a/components/markdown.tsx b/src/extension/components/markdown.tsx
similarity index 100%
rename from components/markdown.tsx
rename to src/extension/components/markdown.tsx
diff --git a/components/monitor-bar.tsx b/src/extension/components/monitor-bar.tsx
similarity index 97%
rename from components/monitor-bar.tsx
rename to src/extension/components/monitor-bar.tsx
index c0e6d58..8d71286 100644
--- a/components/monitor-bar.tsx
+++ b/src/extension/components/monitor-bar.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { Radar, Square } from 'lucide-react';
-import { Button } from '@/components/ui/button';
+import { Button } from '@/extension/components/ui/button';
import { formatEta, type MonitorState } from '@/lib/monitor/events';
export function MonitorBar({ state, onStop }: { state: MonitorState; onStop: () => void }) {
diff --git a/components/panel-nav.tsx b/src/extension/components/panel-nav.tsx
similarity index 100%
rename from components/panel-nav.tsx
rename to src/extension/components/panel-nav.tsx
diff --git a/components/recording-bar.tsx b/src/extension/components/recording-bar.tsx
similarity index 96%
rename from components/recording-bar.tsx
rename to src/extension/components/recording-bar.tsx
index cdbc734..cfea592 100644
--- a/components/recording-bar.tsx
+++ b/src/extension/components/recording-bar.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { Square } from 'lucide-react';
-import { Button } from '@/components/ui/button';
+import { Button } from '@/extension/components/ui/button';
import { MAX_RECORDING_MS, type RecordingState } from '@/lib/recordings/events';
export function RecordingBar({ state, onStop }: { state: RecordingState; onStop: () => void }) {
diff --git a/components/recording-list.tsx b/src/extension/components/recording-list.tsx
similarity index 98%
rename from components/recording-list.tsx
rename to src/extension/components/recording-list.tsx
index 170f5d8..80ff4f5 100644
--- a/components/recording-list.tsx
+++ b/src/extension/components/recording-list.tsx
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { Check, Clapperboard, Globe, KeyRound, Loader2, Pencil, Play, X } from 'lucide-react';
-import { Badge } from '@/components/ui/badge';
-import { Input } from '@/components/ui/input';
+import { Badge } from '@/extension/components/ui/badge';
+import { Input } from '@/extension/components/ui/input';
import { renameRecording, type StoredRecordingMeta } from '@/lib/bridge/recording-store';
export function RecordingList({
diff --git a/components/recording-panel.tsx b/src/extension/components/recording-panel.tsx
similarity index 95%
rename from components/recording-panel.tsx
rename to src/extension/components/recording-panel.tsx
index 576f773..4e63ac1 100644
--- a/components/recording-panel.tsx
+++ b/src/extension/components/recording-panel.tsx
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { Circle, Square } from 'lucide-react';
-import { Button } from '@/components/ui/button';
-import { RecordingList } from '@/components/recording-list';
+import { Button } from '@/extension/components/ui/button';
+import { RecordingList } from '@/extension/components/recording-list';
import type { StoredRecordingMeta } from '@/lib/bridge/recording-store';
import type { RecordingState } from '@/lib/recordings/events';
import { hostnameOf } from '@/lib/skills/format';
diff --git a/components/run-timeline.tsx b/src/extension/components/run-timeline.tsx
similarity index 98%
rename from components/run-timeline.tsx
rename to src/extension/components/run-timeline.tsx
index d17cc81..c36a286 100644
--- a/components/run-timeline.tsx
+++ b/src/extension/components/run-timeline.tsx
@@ -26,8 +26,8 @@ import {
type LucideIcon,
} from 'lucide-react';
-import { Markdown } from '@/components/markdown';
-import { Button } from '@/components/ui/button';
+import { Markdown } from '@/extension/components/markdown';
+import { Button } from '@/extension/components/ui/button';
import { openScreenshot } from '@/lib/bridge/screenshot-preview';
import type { RunItem } from '@/lib/bridge/run-items';
import { cn } from '@/lib/utils';
diff --git a/components/session-list.tsx b/src/extension/components/session-list.tsx
similarity index 98%
rename from components/session-list.tsx
rename to src/extension/components/session-list.tsx
index 1af4c0b..c101560 100644
--- a/components/session-list.tsx
+++ b/src/extension/components/session-list.tsx
@@ -1,5 +1,5 @@
import { Globe, Loader2, MessagesSquare, X } from 'lucide-react';
-import { Badge } from '@/components/ui/badge';
+import { Badge } from '@/extension/components/ui/badge';
import { isNaming, type StoredSessionMeta } from '@/lib/bridge/session-store';
import { cn } from '@/lib/utils';
diff --git a/components/session-rail.tsx b/src/extension/components/session-rail.tsx
similarity index 100%
rename from components/session-rail.tsx
rename to src/extension/components/session-rail.tsx
diff --git a/components/settings-panel.tsx b/src/extension/components/settings-panel.tsx
similarity index 99%
rename from components/settings-panel.tsx
rename to src/extension/components/settings-panel.tsx
index 984abf2..c3891a6 100644
--- a/components/settings-panel.tsx
+++ b/src/extension/components/settings-panel.tsx
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from 'react';
import { Loader2, Lock, RefreshCw, ShieldCheck } from 'lucide-react';
import { browser } from 'wxt/browser';
-import { Switch } from '@/components/ui/switch';
+import { Switch } from '@/extension/components/ui/switch';
import { BRIDGE_CHANNEL, type ActionResult } from '@/lib/actions/protocol';
import { useDaemonState } from '@/lib/bridge/use-daemon-state';
import {
diff --git a/components/site-map-review.tsx b/src/extension/components/site-map-review.tsx
similarity index 96%
rename from components/site-map-review.tsx
rename to src/extension/components/site-map-review.tsx
index 9c9d100..8c991d9 100644
--- a/components/site-map-review.tsx
+++ b/src/extension/components/site-map-review.tsx
@@ -1,8 +1,8 @@
import { useState } from 'react';
import { Check, FolderOpen, Images, Trash2, TriangleAlert } from 'lucide-react';
-import { Badge } from '@/components/ui/badge';
-import { Button } from '@/components/ui/button';
+import { Badge } from '@/extension/components/ui/badge';
+import { Button } from '@/extension/components/ui/button';
import type { SiteMapDraft } from '@/lib/skills/site-map';
export function SiteMapReview({
diff --git a/components/skill-menu.tsx b/src/extension/components/skill-menu.tsx
similarity index 100%
rename from components/skill-menu.tsx
rename to src/extension/components/skill-menu.tsx
diff --git a/components/skills-panel.tsx b/src/extension/components/skills-panel.tsx
similarity index 98%
rename from components/skills-panel.tsx
rename to src/extension/components/skills-panel.tsx
index cc616ea..caef2c2 100644
--- a/components/skills-panel.tsx
+++ b/src/extension/components/skills-panel.tsx
@@ -3,9 +3,9 @@ import { BookOpen, Check, Compass, Globe, Loader2, Upload, X } from 'lucide-reac
import { browser } from 'wxt/browser';
import { BRIDGE_CHANNEL } from '@/lib/actions/protocol';
-import { Badge } from '@/components/ui/badge';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
+import { Badge } from '@/extension/components/ui/badge';
+import { Button } from '@/extension/components/ui/button';
+import { Input } from '@/extension/components/ui/input';
import { putSkill, type StoredSkillMeta } from '@/lib/bridge/skill-store';
import { useStoredSkills } from '@/lib/bridge/use-stored-skills';
import {
diff --git a/components/status-pill.tsx b/src/extension/components/status-pill.tsx
similarity index 100%
rename from components/status-pill.tsx
rename to src/extension/components/status-pill.tsx
diff --git a/components/ui/badge.tsx b/src/extension/components/ui/badge.tsx
similarity index 100%
rename from components/ui/badge.tsx
rename to src/extension/components/ui/badge.tsx
diff --git a/components/ui/button.tsx b/src/extension/components/ui/button.tsx
similarity index 100%
rename from components/ui/button.tsx
rename to src/extension/components/ui/button.tsx
diff --git a/components/ui/input.tsx b/src/extension/components/ui/input.tsx
similarity index 100%
rename from components/ui/input.tsx
rename to src/extension/components/ui/input.tsx
diff --git a/components/ui/scroll-area.tsx b/src/extension/components/ui/scroll-area.tsx
similarity index 100%
rename from components/ui/scroll-area.tsx
rename to src/extension/components/ui/scroll-area.tsx
diff --git a/components/ui/switch.tsx b/src/extension/components/ui/switch.tsx
similarity index 100%
rename from components/ui/switch.tsx
rename to src/extension/components/ui/switch.tsx
diff --git a/components/ui/textarea.tsx b/src/extension/components/ui/textarea.tsx
similarity index 100%
rename from components/ui/textarea.tsx
rename to src/extension/components/ui/textarea.tsx
diff --git a/entrypoints/background.ts b/src/extension/entrypoints/background.ts
similarity index 100%
rename from entrypoints/background.ts
rename to src/extension/entrypoints/background.ts
diff --git a/entrypoints/content.ts b/src/extension/entrypoints/content.ts
similarity index 100%
rename from entrypoints/content.ts
rename to src/extension/entrypoints/content.ts
diff --git a/entrypoints/popup/App.tsx b/src/extension/entrypoints/popup/App.tsx
similarity index 93%
rename from entrypoints/popup/App.tsx
rename to src/extension/entrypoints/popup/App.tsx
index f745fab..031629b 100644
--- a/entrypoints/popup/App.tsx
+++ b/src/extension/entrypoints/popup/App.tsx
@@ -1,12 +1,12 @@
import { useState } from 'react';
import { Mic, MicOff, PanelRightOpen, Send } from 'lucide-react';
-import { AgentPicker } from '@/components/agent-picker';
-import { Wordmark } from '@/components/brand';
-import { DaemonLink } from '@/components/daemon-link';
-import { StatusPill, describeStatus, type StatusBlocker } from '@/components/status-pill';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
+import { AgentPicker } from '@/extension/components/agent-picker';
+import { Wordmark } from '@/extension/components/brand';
+import { DaemonLink } from '@/extension/components/daemon-link';
+import { StatusPill, describeStatus, type StatusBlocker } from '@/extension/components/status-pill';
+import { Button } from '@/extension/components/ui/button';
+import { Input } from '@/extension/components/ui/input';
import { useDaemonState } from '@/lib/bridge/use-daemon-state';
import { openSidePanel } from '@/lib/bridge/side-panel';
import { useRun } from '@/lib/bridge/use-run';
diff --git a/entrypoints/popup/index.html b/src/extension/entrypoints/popup/index.html
similarity index 100%
rename from entrypoints/popup/index.html
rename to src/extension/entrypoints/popup/index.html
diff --git a/entrypoints/popup/main.tsx b/src/extension/entrypoints/popup/main.tsx
similarity index 83%
rename from entrypoints/popup/main.tsx
rename to src/extension/entrypoints/popup/main.tsx
index c4f6514..3d40648 100644
--- a/entrypoints/popup/main.tsx
+++ b/src/extension/entrypoints/popup/main.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
-import '@/assets/globals.css';
+import '@/extension/assets/globals.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
diff --git a/entrypoints/sidepanel/App.tsx b/src/extension/entrypoints/sidepanel/App.tsx
similarity index 91%
rename from entrypoints/sidepanel/App.tsx
rename to src/extension/entrypoints/sidepanel/App.tsx
index e44cce7..27bf77e 100644
--- a/entrypoints/sidepanel/App.tsx
+++ b/src/extension/entrypoints/sidepanel/App.tsx
@@ -5,23 +5,23 @@ import { browser } from 'wxt/browser';
import { invokeInActiveTab } from '@/lib/actions/client';
import { getPageInfo } from '@/lib/actions/page/get-page-info';
import { BRIDGE_CHANNEL, type FocusedElement } from '@/lib/actions/protocol';
-import { Wordmark } from '@/components/brand';
-import { Composer, type AttachedSkill } from '@/components/composer';
-import { ConnectionSheet } from '@/components/connection-sheet';
-import { Greeting } from '@/components/greeting';
-import { MonitorBar } from '@/components/monitor-bar';
-import { PanelNav, type PanelTab } from '@/components/panel-nav';
-import { RecordingBar } from '@/components/recording-bar';
-import { RecordingPanel } from '@/components/recording-panel';
-import { RunTimeline } from '@/components/run-timeline';
-import { SessionList } from '@/components/session-list';
-import { SessionRail } from '@/components/session-rail';
-import { SettingsPanel } from '@/components/settings-panel';
-import { SiteMapReview } from '@/components/site-map-review';
-import { SkillsPanel } from '@/components/skills-panel';
-import { StatusPill, describeStatus } from '@/components/status-pill';
-import { Button } from '@/components/ui/button';
-import { ScrollArea } from '@/components/ui/scroll-area';
+import { Wordmark } from '@/extension/components/brand';
+import { Composer, type AttachedSkill } from '@/extension/components/composer';
+import { ConnectionSheet } from '@/extension/components/connection-sheet';
+import { Greeting } from '@/extension/components/greeting';
+import { MonitorBar } from '@/extension/components/monitor-bar';
+import { PanelNav, type PanelTab } from '@/extension/components/panel-nav';
+import { RecordingBar } from '@/extension/components/recording-bar';
+import { RecordingPanel } from '@/extension/components/recording-panel';
+import { RunTimeline } from '@/extension/components/run-timeline';
+import { SessionList } from '@/extension/components/session-list';
+import { SessionRail } from '@/extension/components/session-rail';
+import { SettingsPanel } from '@/extension/components/settings-panel';
+import { SiteMapReview } from '@/extension/components/site-map-review';
+import { SkillsPanel } from '@/extension/components/skills-panel';
+import { StatusPill, describeStatus } from '@/extension/components/status-pill';
+import { Button } from '@/extension/components/ui/button';
+import { ScrollArea } from '@/extension/components/ui/scroll-area';
import { pickFocus } from '@/lib/bridge/aeye';
import { putFile, removeFile } from '@/lib/bridge/file-store';
import { removeRecording, type StoredRecordingMeta } from '@/lib/bridge/recording-store';
diff --git a/entrypoints/sidepanel/index.html b/src/extension/entrypoints/sidepanel/index.html
similarity index 100%
rename from entrypoints/sidepanel/index.html
rename to src/extension/entrypoints/sidepanel/index.html
diff --git a/entrypoints/sidepanel/main.tsx b/src/extension/entrypoints/sidepanel/main.tsx
similarity index 83%
rename from entrypoints/sidepanel/main.tsx
rename to src/extension/entrypoints/sidepanel/main.tsx
index c4f6514..3d40648 100644
--- a/entrypoints/sidepanel/main.tsx
+++ b/src/extension/entrypoints/sidepanel/main.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
-import '@/assets/globals.css';
+import '@/extension/assets/globals.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
diff --git a/public/icon/128.png b/src/extension/public/icon/128.png
similarity index 100%
rename from public/icon/128.png
rename to src/extension/public/icon/128.png
diff --git a/public/icon/16.png b/src/extension/public/icon/16.png
similarity index 100%
rename from public/icon/16.png
rename to src/extension/public/icon/16.png
diff --git a/public/icon/32.png b/src/extension/public/icon/32.png
similarity index 100%
rename from public/icon/32.png
rename to src/extension/public/icon/32.png
diff --git a/public/icon/48.png b/src/extension/public/icon/48.png
similarity index 100%
rename from public/icon/48.png
rename to src/extension/public/icon/48.png
diff --git a/public/icon/96.png b/src/extension/public/icon/96.png
similarity index 100%
rename from public/icon/96.png
rename to src/extension/public/icon/96.png
diff --git a/lib/actions/client.ts b/src/lib/actions/client.ts
similarity index 100%
rename from lib/actions/client.ts
rename to src/lib/actions/client.ts
diff --git a/lib/actions/core.ts b/src/lib/actions/core.ts
similarity index 100%
rename from lib/actions/core.ts
rename to src/lib/actions/core.ts
diff --git a/lib/actions/dispatch.ts b/src/lib/actions/dispatch.ts
similarity index 100%
rename from lib/actions/dispatch.ts
rename to src/lib/actions/dispatch.ts
diff --git a/lib/actions/handshake.ts b/src/lib/actions/handshake.ts
similarity index 100%
rename from lib/actions/handshake.ts
rename to src/lib/actions/handshake.ts
diff --git a/lib/actions/host.ts b/src/lib/actions/host.ts
similarity index 100%
rename from lib/actions/host.ts
rename to src/lib/actions/host.ts
diff --git a/lib/actions/index.ts b/src/lib/actions/index.ts
similarity index 100%
rename from lib/actions/index.ts
rename to src/lib/actions/index.ts
diff --git a/lib/actions/manifest.ts b/src/lib/actions/manifest.ts
similarity index 100%
rename from lib/actions/manifest.ts
rename to src/lib/actions/manifest.ts
diff --git a/lib/actions/page/apply-theme.ts b/src/lib/actions/page/apply-theme.ts
similarity index 100%
rename from lib/actions/page/apply-theme.ts
rename to src/lib/actions/page/apply-theme.ts
diff --git a/lib/actions/page/attach-file.ts b/src/lib/actions/page/attach-file.ts
similarity index 100%
rename from lib/actions/page/attach-file.ts
rename to src/lib/actions/page/attach-file.ts
diff --git a/lib/actions/page/audit-contrast.ts b/src/lib/actions/page/audit-contrast.ts
similarity index 100%
rename from lib/actions/page/audit-contrast.ts
rename to src/lib/actions/page/audit-contrast.ts
diff --git a/lib/actions/page/await-monitor.ts b/src/lib/actions/page/await-monitor.ts
similarity index 100%
rename from lib/actions/page/await-monitor.ts
rename to src/lib/actions/page/await-monitor.ts
diff --git a/lib/actions/page/captcha-vendors.ts b/src/lib/actions/page/captcha-vendors.ts
similarity index 100%
rename from lib/actions/page/captcha-vendors.ts
rename to src/lib/actions/page/captcha-vendors.ts
diff --git a/lib/actions/page/chunks.ts b/src/lib/actions/page/chunks.ts
similarity index 100%
rename from lib/actions/page/chunks.ts
rename to src/lib/actions/page/chunks.ts
diff --git a/lib/actions/page/click-element.ts b/src/lib/actions/page/click-element.ts
similarity index 100%
rename from lib/actions/page/click-element.ts
rename to src/lib/actions/page/click-element.ts
diff --git a/lib/actions/page/close-tab.ts b/src/lib/actions/page/close-tab.ts
similarity index 100%
rename from lib/actions/page/close-tab.ts
rename to src/lib/actions/page/close-tab.ts
diff --git a/lib/actions/page/color.ts b/src/lib/actions/page/color.ts
similarity index 100%
rename from lib/actions/page/color.ts
rename to src/lib/actions/page/color.ts
diff --git a/lib/actions/page/dom.ts b/src/lib/actions/page/dom.ts
similarity index 100%
rename from lib/actions/page/dom.ts
rename to src/lib/actions/page/dom.ts
diff --git a/lib/actions/page/drag-element.ts b/src/lib/actions/page/drag-element.ts
similarity index 100%
rename from lib/actions/page/drag-element.ts
rename to src/lib/actions/page/drag-element.ts
diff --git a/lib/actions/page/extract-text.ts b/src/lib/actions/page/extract-text.ts
similarity index 100%
rename from lib/actions/page/extract-text.ts
rename to src/lib/actions/page/extract-text.ts
diff --git a/lib/actions/page/fill-input.ts b/src/lib/actions/page/fill-input.ts
similarity index 100%
rename from lib/actions/page/fill-input.ts
rename to src/lib/actions/page/fill-input.ts
diff --git a/lib/actions/page/find-captcha.ts b/src/lib/actions/page/find-captcha.ts
similarity index 100%
rename from lib/actions/page/find-captcha.ts
rename to src/lib/actions/page/find-captcha.ts
diff --git a/lib/actions/page/find-progress.ts b/src/lib/actions/page/find-progress.ts
similarity index 100%
rename from lib/actions/page/find-progress.ts
rename to src/lib/actions/page/find-progress.ts
diff --git a/lib/actions/page/find-search.ts b/src/lib/actions/page/find-search.ts
similarity index 100%
rename from lib/actions/page/find-search.ts
rename to src/lib/actions/page/find-search.ts
diff --git a/lib/actions/page/focus-input.ts b/src/lib/actions/page/focus-input.ts
similarity index 100%
rename from lib/actions/page/focus-input.ts
rename to src/lib/actions/page/focus-input.ts
diff --git a/lib/actions/page/get-page-info.ts b/src/lib/actions/page/get-page-info.ts
similarity index 100%
rename from lib/actions/page/get-page-info.ts
rename to src/lib/actions/page/get-page-info.ts
diff --git a/lib/actions/page/highlight-element.ts b/src/lib/actions/page/highlight-element.ts
similarity index 100%
rename from lib/actions/page/highlight-element.ts
rename to src/lib/actions/page/highlight-element.ts
diff --git a/lib/actions/page/hover-element.ts b/src/lib/actions/page/hover-element.ts
similarity index 100%
rename from lib/actions/page/hover-element.ts
rename to src/lib/actions/page/hover-element.ts
diff --git a/lib/actions/page/keyboard.ts b/src/lib/actions/page/keyboard.ts
similarity index 100%
rename from lib/actions/page/keyboard.ts
rename to src/lib/actions/page/keyboard.ts
diff --git a/lib/actions/page/lens.ts b/src/lib/actions/page/lens.ts
similarity index 100%
rename from lib/actions/page/lens.ts
rename to src/lib/actions/page/lens.ts
diff --git a/lib/actions/page/list-files.ts b/src/lib/actions/page/list-files.ts
similarity index 100%
rename from lib/actions/page/list-files.ts
rename to src/lib/actions/page/list-files.ts
diff --git a/lib/actions/page/list-recordings.ts b/src/lib/actions/page/list-recordings.ts
similarity index 100%
rename from lib/actions/page/list-recordings.ts
rename to src/lib/actions/page/list-recordings.ts
diff --git a/lib/actions/page/monitor-status.ts b/src/lib/actions/page/monitor-status.ts
similarity index 100%
rename from lib/actions/page/monitor-status.ts
rename to src/lib/actions/page/monitor-status.ts
diff --git a/lib/actions/page/navigate.ts b/src/lib/actions/page/navigate.ts
similarity index 100%
rename from lib/actions/page/navigate.ts
rename to src/lib/actions/page/navigate.ts
diff --git a/lib/actions/page/open-tab.ts b/src/lib/actions/page/open-tab.ts
similarity index 100%
rename from lib/actions/page/open-tab.ts
rename to src/lib/actions/page/open-tab.ts
diff --git a/lib/actions/page/pick-element.ts b/src/lib/actions/page/pick-element.ts
similarity index 100%
rename from lib/actions/page/pick-element.ts
rename to src/lib/actions/page/pick-element.ts
diff --git a/lib/actions/page/pointer.ts b/src/lib/actions/page/pointer.ts
similarity index 100%
rename from lib/actions/page/pointer.ts
rename to src/lib/actions/page/pointer.ts
diff --git a/lib/actions/page/press-key.ts b/src/lib/actions/page/press-key.ts
similarity index 100%
rename from lib/actions/page/press-key.ts
rename to src/lib/actions/page/press-key.ts
diff --git a/lib/actions/page/read-recording.ts b/src/lib/actions/page/read-recording.ts
similarity index 100%
rename from lib/actions/page/read-recording.ts
rename to src/lib/actions/page/read-recording.ts
diff --git a/lib/actions/page/read-theme.ts b/src/lib/actions/page/read-theme.ts
similarity index 100%
rename from lib/actions/page/read-theme.ts
rename to src/lib/actions/page/read-theme.ts
diff --git a/lib/actions/page/screenshot.ts b/src/lib/actions/page/screenshot.ts
similarity index 100%
rename from lib/actions/page/screenshot.ts
rename to src/lib/actions/page/screenshot.ts
diff --git a/lib/actions/page/scroll-to.ts b/src/lib/actions/page/scroll-to.ts
similarity index 100%
rename from lib/actions/page/scroll-to.ts
rename to src/lib/actions/page/scroll-to.ts
diff --git a/lib/actions/page/search-site.ts b/src/lib/actions/page/search-site.ts
similarity index 100%
rename from lib/actions/page/search-site.ts
rename to src/lib/actions/page/search-site.ts
diff --git a/lib/actions/page/search.ts b/src/lib/actions/page/search.ts
similarity index 100%
rename from lib/actions/page/search.ts
rename to src/lib/actions/page/search.ts
diff --git a/lib/actions/page/select-option.ts b/src/lib/actions/page/select-option.ts
similarity index 100%
rename from lib/actions/page/select-option.ts
rename to src/lib/actions/page/select-option.ts
diff --git a/lib/actions/page/select-text.ts b/src/lib/actions/page/select-text.ts
similarity index 100%
rename from lib/actions/page/select-text.ts
rename to src/lib/actions/page/select-text.ts
diff --git a/lib/actions/page/solve-captcha.ts b/src/lib/actions/page/solve-captcha.ts
similarity index 100%
rename from lib/actions/page/solve-captcha.ts
rename to src/lib/actions/page/solve-captcha.ts
diff --git a/lib/actions/page/start-monitor.ts b/src/lib/actions/page/start-monitor.ts
similarity index 100%
rename from lib/actions/page/start-monitor.ts
rename to src/lib/actions/page/start-monitor.ts
diff --git a/lib/actions/page/start-timer.ts b/src/lib/actions/page/start-timer.ts
similarity index 100%
rename from lib/actions/page/start-timer.ts
rename to src/lib/actions/page/start-timer.ts
diff --git a/lib/actions/page/stop-monitor.ts b/src/lib/actions/page/stop-monitor.ts
similarity index 100%
rename from lib/actions/page/stop-monitor.ts
rename to src/lib/actions/page/stop-monitor.ts
diff --git a/lib/actions/page/stop-timer.ts b/src/lib/actions/page/stop-timer.ts
similarity index 100%
rename from lib/actions/page/stop-timer.ts
rename to src/lib/actions/page/stop-timer.ts
diff --git a/lib/actions/page/submit-form.ts b/src/lib/actions/page/submit-form.ts
similarity index 100%
rename from lib/actions/page/submit-form.ts
rename to src/lib/actions/page/submit-form.ts
diff --git a/lib/actions/page/switch-tab.ts b/src/lib/actions/page/switch-tab.ts
similarity index 100%
rename from lib/actions/page/switch-tab.ts
rename to src/lib/actions/page/switch-tab.ts
diff --git a/lib/actions/page/theme.ts b/src/lib/actions/page/theme.ts
similarity index 100%
rename from lib/actions/page/theme.ts
rename to src/lib/actions/page/theme.ts
diff --git a/lib/actions/page/timer-status.ts b/src/lib/actions/page/timer-status.ts
similarity index 100%
rename from lib/actions/page/timer-status.ts
rename to src/lib/actions/page/timer-status.ts
diff --git a/lib/actions/page/trusted-click.ts b/src/lib/actions/page/trusted-click.ts
similarity index 100%
rename from lib/actions/page/trusted-click.ts
rename to src/lib/actions/page/trusted-click.ts
diff --git a/lib/actions/page/type-text.ts b/src/lib/actions/page/type-text.ts
similarity index 100%
rename from lib/actions/page/type-text.ts
rename to src/lib/actions/page/type-text.ts
diff --git a/lib/actions/page/wait-for-element.ts b/src/lib/actions/page/wait-for-element.ts
similarity index 100%
rename from lib/actions/page/wait-for-element.ts
rename to src/lib/actions/page/wait-for-element.ts
diff --git a/lib/actions/protocol.ts b/src/lib/actions/protocol.ts
similarity index 100%
rename from lib/actions/protocol.ts
rename to src/lib/actions/protocol.ts
diff --git a/lib/actions/registry.ts b/src/lib/actions/registry.ts
similarity index 100%
rename from lib/actions/registry.ts
rename to src/lib/actions/registry.ts
diff --git a/lib/actions/reserved.ts b/src/lib/actions/reserved.ts
similarity index 100%
rename from lib/actions/reserved.ts
rename to src/lib/actions/reserved.ts
diff --git a/lib/actions/tool-names.ts b/src/lib/actions/tool-names.ts
similarity index 100%
rename from lib/actions/tool-names.ts
rename to src/lib/actions/tool-names.ts
diff --git a/lib/agents/catalog.ts b/src/lib/agents/catalog.ts
similarity index 100%
rename from lib/agents/catalog.ts
rename to src/lib/agents/catalog.ts
diff --git a/lib/bridge/aeye.ts b/src/lib/bridge/aeye.ts
similarity index 100%
rename from lib/bridge/aeye.ts
rename to src/lib/bridge/aeye.ts
diff --git a/lib/bridge/captcha.ts b/src/lib/bridge/captcha.ts
similarity index 100%
rename from lib/bridge/captcha.ts
rename to src/lib/bridge/captcha.ts
diff --git a/lib/bridge/cdp.ts b/src/lib/bridge/cdp.ts
similarity index 100%
rename from lib/bridge/cdp.ts
rename to src/lib/bridge/cdp.ts
diff --git a/lib/bridge/fast-path.ts b/src/lib/bridge/fast-path.ts
similarity index 100%
rename from lib/bridge/fast-path.ts
rename to src/lib/bridge/fast-path.ts
diff --git a/lib/bridge/file-store.ts b/src/lib/bridge/file-store.ts
similarity index 100%
rename from lib/bridge/file-store.ts
rename to src/lib/bridge/file-store.ts
diff --git a/lib/bridge/invoke.ts b/src/lib/bridge/invoke.ts
similarity index 100%
rename from lib/bridge/invoke.ts
rename to src/lib/bridge/invoke.ts
diff --git a/lib/bridge/monitor.ts b/src/lib/bridge/monitor.ts
similarity index 100%
rename from lib/bridge/monitor.ts
rename to src/lib/bridge/monitor.ts
diff --git a/lib/bridge/panel-view.ts b/src/lib/bridge/panel-view.ts
similarity index 100%
rename from lib/bridge/panel-view.ts
rename to src/lib/bridge/panel-view.ts
diff --git a/lib/bridge/rail.ts b/src/lib/bridge/rail.ts
similarity index 100%
rename from lib/bridge/rail.ts
rename to src/lib/bridge/rail.ts
diff --git a/lib/bridge/recorder.ts b/src/lib/bridge/recorder.ts
similarity index 100%
rename from lib/bridge/recorder.ts
rename to src/lib/bridge/recorder.ts
diff --git a/lib/bridge/recording-store.ts b/src/lib/bridge/recording-store.ts
similarity index 100%
rename from lib/bridge/recording-store.ts
rename to src/lib/bridge/recording-store.ts
diff --git a/lib/bridge/redact.ts b/src/lib/bridge/redact.ts
similarity index 100%
rename from lib/bridge/redact.ts
rename to src/lib/bridge/redact.ts
diff --git a/lib/bridge/run-indicator.ts b/src/lib/bridge/run-indicator.ts
similarity index 100%
rename from lib/bridge/run-indicator.ts
rename to src/lib/bridge/run-indicator.ts
diff --git a/lib/bridge/run-items.ts b/src/lib/bridge/run-items.ts
similarity index 100%
rename from lib/bridge/run-items.ts
rename to src/lib/bridge/run-items.ts
diff --git a/lib/bridge/run-port.ts b/src/lib/bridge/run-port.ts
similarity index 100%
rename from lib/bridge/run-port.ts
rename to src/lib/bridge/run-port.ts
diff --git a/lib/bridge/screenshot-preview.ts b/src/lib/bridge/screenshot-preview.ts
similarity index 100%
rename from lib/bridge/screenshot-preview.ts
rename to src/lib/bridge/screenshot-preview.ts
diff --git a/lib/bridge/screenshot.ts b/src/lib/bridge/screenshot.ts
similarity index 100%
rename from lib/bridge/screenshot.ts
rename to src/lib/bridge/screenshot.ts
diff --git a/lib/bridge/secret-vault.ts b/src/lib/bridge/secret-vault.ts
similarity index 100%
rename from lib/bridge/secret-vault.ts
rename to src/lib/bridge/secret-vault.ts
diff --git a/lib/bridge/session-store.ts b/src/lib/bridge/session-store.ts
similarity index 100%
rename from lib/bridge/session-store.ts
rename to src/lib/bridge/session-store.ts
diff --git a/lib/bridge/side-panel.ts b/src/lib/bridge/side-panel.ts
similarity index 100%
rename from lib/bridge/side-panel.ts
rename to src/lib/bridge/side-panel.ts
diff --git a/lib/bridge/skill-store.ts b/src/lib/bridge/skill-store.ts
similarity index 100%
rename from lib/bridge/skill-store.ts
rename to src/lib/bridge/skill-store.ts
diff --git a/lib/bridge/socket.ts b/src/lib/bridge/socket.ts
similarity index 100%
rename from lib/bridge/socket.ts
rename to src/lib/bridge/socket.ts
diff --git a/lib/bridge/tab-sessions.ts b/src/lib/bridge/tab-sessions.ts
similarity index 100%
rename from lib/bridge/tab-sessions.ts
rename to src/lib/bridge/tab-sessions.ts
diff --git a/lib/bridge/tabs.ts b/src/lib/bridge/tabs.ts
similarity index 100%
rename from lib/bridge/tabs.ts
rename to src/lib/bridge/tabs.ts
diff --git a/lib/bridge/timer.ts b/src/lib/bridge/timer.ts
similarity index 100%
rename from lib/bridge/timer.ts
rename to src/lib/bridge/timer.ts
diff --git a/lib/bridge/trusted-input.ts b/src/lib/bridge/trusted-input.ts
similarity index 100%
rename from lib/bridge/trusted-input.ts
rename to src/lib/bridge/trusted-input.ts
diff --git a/lib/bridge/use-active-tab-url.ts b/src/lib/bridge/use-active-tab-url.ts
similarity index 100%
rename from lib/bridge/use-active-tab-url.ts
rename to src/lib/bridge/use-active-tab-url.ts
diff --git a/lib/bridge/use-active-tab.ts b/src/lib/bridge/use-active-tab.ts
similarity index 100%
rename from lib/bridge/use-active-tab.ts
rename to src/lib/bridge/use-active-tab.ts
diff --git a/lib/bridge/use-daemon-state.ts b/src/lib/bridge/use-daemon-state.ts
similarity index 100%
rename from lib/bridge/use-daemon-state.ts
rename to src/lib/bridge/use-daemon-state.ts
diff --git a/lib/bridge/use-panel-view.ts b/src/lib/bridge/use-panel-view.ts
similarity index 100%
rename from lib/bridge/use-panel-view.ts
rename to src/lib/bridge/use-panel-view.ts
diff --git a/lib/bridge/use-run.ts b/src/lib/bridge/use-run.ts
similarity index 100%
rename from lib/bridge/use-run.ts
rename to src/lib/bridge/use-run.ts
diff --git a/lib/bridge/use-speech.ts b/src/lib/bridge/use-speech.ts
similarity index 100%
rename from lib/bridge/use-speech.ts
rename to src/lib/bridge/use-speech.ts
diff --git a/lib/bridge/use-stored-files.ts b/src/lib/bridge/use-stored-files.ts
similarity index 100%
rename from lib/bridge/use-stored-files.ts
rename to src/lib/bridge/use-stored-files.ts
diff --git a/lib/bridge/use-stored-recordings.ts b/src/lib/bridge/use-stored-recordings.ts
similarity index 100%
rename from lib/bridge/use-stored-recordings.ts
rename to src/lib/bridge/use-stored-recordings.ts
diff --git a/lib/bridge/use-stored-sessions.ts b/src/lib/bridge/use-stored-sessions.ts
similarity index 100%
rename from lib/bridge/use-stored-sessions.ts
rename to src/lib/bridge/use-stored-sessions.ts
diff --git a/lib/bridge/use-stored-skills.ts b/src/lib/bridge/use-stored-skills.ts
similarity index 100%
rename from lib/bridge/use-stored-skills.ts
rename to src/lib/bridge/use-stored-skills.ts
diff --git a/lib/bridge/use-tab-sessions.ts b/src/lib/bridge/use-tab-sessions.ts
similarity index 100%
rename from lib/bridge/use-tab-sessions.ts
rename to src/lib/bridge/use-tab-sessions.ts
diff --git a/lib/bridge/use-voice-composer.ts b/src/lib/bridge/use-voice-composer.ts
similarity index 100%
rename from lib/bridge/use-voice-composer.ts
rename to src/lib/bridge/use-voice-composer.ts
diff --git a/lib/indicator/events.ts b/src/lib/indicator/events.ts
similarity index 100%
rename from lib/indicator/events.ts
rename to src/lib/indicator/events.ts
diff --git a/lib/indicator/host.ts b/src/lib/indicator/host.ts
similarity index 100%
rename from lib/indicator/host.ts
rename to src/lib/indicator/host.ts
diff --git a/lib/intent/grammar.ts b/src/lib/intent/grammar.ts
similarity index 100%
rename from lib/intent/grammar.ts
rename to src/lib/intent/grammar.ts
diff --git a/lib/intent/index.ts b/src/lib/intent/index.ts
similarity index 100%
rename from lib/intent/index.ts
rename to src/lib/intent/index.ts
diff --git a/lib/intent/normalize.ts b/src/lib/intent/normalize.ts
similarity index 100%
rename from lib/intent/normalize.ts
rename to src/lib/intent/normalize.ts
diff --git a/lib/intent/route.ts b/src/lib/intent/route.ts
similarity index 100%
rename from lib/intent/route.ts
rename to src/lib/intent/route.ts
diff --git a/lib/monitor/events.ts b/src/lib/monitor/events.ts
similarity index 100%
rename from lib/monitor/events.ts
rename to src/lib/monitor/events.ts
diff --git a/lib/monitor/watch.ts b/src/lib/monitor/watch.ts
similarity index 100%
rename from lib/monitor/watch.ts
rename to src/lib/monitor/watch.ts
diff --git a/lib/rail/events.ts b/src/lib/rail/events.ts
similarity index 100%
rename from lib/rail/events.ts
rename to src/lib/rail/events.ts
diff --git a/lib/rail/host.ts b/src/lib/rail/host.ts
similarity index 100%
rename from lib/rail/host.ts
rename to src/lib/rail/host.ts
diff --git a/lib/recordings/capture.ts b/src/lib/recordings/capture.ts
similarity index 100%
rename from lib/recordings/capture.ts
rename to src/lib/recordings/capture.ts
diff --git a/lib/recordings/events.ts b/src/lib/recordings/events.ts
similarity index 100%
rename from lib/recordings/events.ts
rename to src/lib/recordings/events.ts
diff --git a/lib/recordings/host.ts b/src/lib/recordings/host.ts
similarity index 100%
rename from lib/recordings/host.ts
rename to src/lib/recordings/host.ts
diff --git a/lib/recordings/workflow.ts b/src/lib/recordings/workflow.ts
similarity index 100%
rename from lib/recordings/workflow.ts
rename to src/lib/recordings/workflow.ts
diff --git a/lib/secrets/detect.ts b/src/lib/secrets/detect.ts
similarity index 100%
rename from lib/secrets/detect.ts
rename to src/lib/secrets/detect.ts
diff --git a/lib/secrets/index.ts b/src/lib/secrets/index.ts
similarity index 100%
rename from lib/secrets/index.ts
rename to src/lib/secrets/index.ts
diff --git a/lib/secrets/release.ts b/src/lib/secrets/release.ts
similarity index 100%
rename from lib/secrets/release.ts
rename to src/lib/secrets/release.ts
diff --git a/lib/secrets/seal.ts b/src/lib/secrets/seal.ts
similarity index 100%
rename from lib/secrets/seal.ts
rename to src/lib/secrets/seal.ts
diff --git a/lib/secrets/shapes.ts b/src/lib/secrets/shapes.ts
similarity index 100%
rename from lib/secrets/shapes.ts
rename to src/lib/secrets/shapes.ts
diff --git a/lib/secrets/stream.ts b/src/lib/secrets/stream.ts
similarity index 100%
rename from lib/secrets/stream.ts
rename to src/lib/secrets/stream.ts
diff --git a/lib/settings/guardrails.ts b/src/lib/settings/guardrails.ts
similarity index 100%
rename from lib/settings/guardrails.ts
rename to src/lib/settings/guardrails.ts
diff --git a/lib/skills/format.ts b/src/lib/skills/format.ts
similarity index 100%
rename from lib/skills/format.ts
rename to src/lib/skills/format.ts
diff --git a/lib/skills/scrub.ts b/src/lib/skills/scrub.ts
similarity index 100%
rename from lib/skills/scrub.ts
rename to src/lib/skills/scrub.ts
diff --git a/lib/skills/site-map.ts b/src/lib/skills/site-map.ts
similarity index 100%
rename from lib/skills/site-map.ts
rename to src/lib/skills/site-map.ts
diff --git a/lib/timers/events.ts b/src/lib/timers/events.ts
similarity index 100%
rename from lib/timers/events.ts
rename to src/lib/timers/events.ts
diff --git a/lib/utils.ts b/src/lib/utils.ts
similarity index 100%
rename from lib/utils.ts
rename to src/lib/utils.ts
diff --git a/tsconfig.json b/tsconfig.json
index 113f1a3..f3d3fee 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -6,6 +6,7 @@
"noUnusedLocals": true,
"noUnusedParameters": true
},
- // `mcp` is a separate Node package with its own tsconfig — `yarn mcp:compile` checks it.
- "exclude": ["node_modules", "dist", ".wxt/types-check", "mcp"]
+ // src/daemon is a separate Node package with its own tsconfig, checked by
+ // `yarn daemon:compile`. It shares src/lib with the extension but nothing else.
+ "exclude": ["node_modules", "dist", ".wxt/types-check", "src/daemon"]
}
diff --git a/wxt.config.ts b/wxt.config.ts
index e306135..31a50f3 100644
--- a/wxt.config.ts
+++ b/wxt.config.ts
@@ -3,6 +3,19 @@ import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
modules: ['@wxt-dev/module-react'],
+
+ // srcDir is `src`, not `src/extension`, because WXT points its `@` alias at srcDir and
+ // the daemon shares `src/lib` with the extension. Aiming `@` at src keeps `@/lib/...`
+ // resolving from both halves. The extension's own files then live one level down, which
+ // is why entrypoints and public are named explicitly.
+ srcDir: 'src',
+ // entrypointsDir resolves against srcDir; publicDir resolves against the project root.
+ // They look inconsistent because they are, so both are written out in full here rather
+ // than relying on memory. Getting publicDir wrong silently ships an extension with no
+ // icons, because WXT discovers those from public/icon/*.png.
+ entrypointsDir: 'extension/entrypoints',
+ publicDir: 'src/extension/public',
+
outDir: 'dist',
vite: () => ({
plugins: [tailwindcss()],