Skip to content

Self-improving AI Employees for everyone

docs: sweep pnpm references to bun across contributor and internal docs

trohitgb0f3380929d7
diff --git a/CLAUDE.md b/CLAUDE.md
index be5ae454..daddf3fa 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -43,7 +43,7 @@ This is a React Flow-based workflow automation platform implementing n8n-inspire
| **[Translate / Transliterate / Detect](./docs-internal/speech_provider_rfc.md#8-what-this-pattern-should-absorb-next)** | The second application of the multi-vendor pattern, and the one that retired `nodes/sarvam/`. Three nodes (`translateText`, `transliterateText`, `detectLanguage`) in [`server/nodes/translate/`](./server/nodes/translate/), backed by **three registries — one per capability**, because the asymmetry is sharper than speech's: DeepL translates and does nothing else, while Sarvam and LLM-backed providers do all three. Membership makes an unsupported selection unrepresentable rather than a runtime failure inside a paid call. Providers: **deepl** (`Authorization: DeepL-Auth-Key`, `text` is an array, free keys ending `:fx` route to a different host, and it returns `billed_characters` so cost is the provider's own figure), **sarvam** (all three over dedicated REST), **openai** (all three via `ChatUnifier` — proves the Protocol does not care what a provider does internally; billing deliberately NOT recorded because that path bills tokens the LLM layer already costs). Capabilities in `server/config/translate_defaults.json`. |
| **[CI/CD Pipeline](./docs-internal/ci_cd.md)** | GitHub Actions workflows, predeploy validation, release publishing, and composite setup action |
| **[Performance](./docs-internal/performance.md)** | Cold-start measurements (Application startup complete 2.90 s warm, 21.5 s cold post-`company clean` — was 71 s before the 2026-07-14 boot-delay fixes; first WS connect 8.29 s) + warm and cold per-phase timelines + optimisation history (lazy LangChain imports, lazy LLM-SDK exception refs, esbuild sidecar bundle, bytecode-at-build, PartySocket reconnect, TanStack Query auth bootstrap, `manualChunks`, Vite dep-cache preservation, off-loop Temporal build-id hash) + bottleneck inventory + reproduction commands + anti-patterns to never reintroduce (incl. eager SDK import at LLM provider registration, unconditional `.vite` wipe, synchronous `Worker()` on the event loop). Pairs with the build-time pipeline doc below. |
-| **[Release Build Pipeline](./docs-internal/release_build_pipeline.md)** | npm-distribution build pipeline: `typescript@7` (native Go compiler, exact-pinned in **root** devDependencies — client keeps `typescript@^5.x` because typescript-eslint's peer range excludes 6/7, and one manifest cannot declare `typescript` twice) for type-check, measured 5.9× faster than tsc 5.9.3 (820 ms vs 4830 ms); `pnpm --filter react-flow-client run typecheck` delegates up to the root gate, Vite `manualChunks` + `target: 'es2022'`, esbuild Node.js sidecar bundle (drops `tsx` interpreter cost), bytecode pre-compile in two halves — `[tool.uv] compile-bytecode = true` (uv sync compiles `.venv/` site-packages) + `python -m compileall` for project source (plain `.pyc`, **no `-O`** — per PEP 488 the non-`-O` runtimes never load `.opt-1.pyc`; excludes `.venv/`, `tests/`). Single source of truth for the bytecode-compile path list: `cli.commands.build.COMPILEALL_SOURCE_DIRS`. |
+| **[Release Build Pipeline](./docs-internal/release_build_pipeline.md)** | npm-distribution build pipeline: `typescript@7` (native Go compiler, exact-pinned in **root** devDependencies — client keeps `typescript@^5.x` because typescript-eslint's peer range excludes 6/7, and one manifest cannot declare `typescript` twice) for type-check, measured 5.9× faster than tsc 5.9.3 (820 ms vs 4830 ms); `bun run --filter react-flow-client typecheck` delegates up to the root gate, Vite `manualChunks` + `target: 'es2022'`, esbuild Node.js sidecar bundle (drops `tsx` interpreter cost), bytecode pre-compile in two halves — `[tool.uv] compile-bytecode = true` (uv sync compiles `.venv/` site-packages) + `python -m compileall` for project source (plain `.pyc`, **no `-O`** — per PEP 488 the non-`-O` runtimes never load `.opt-1.pyc`; excludes `.venv/`, `tests/`). Single source of truth for the bytecode-compile path list: `cli.commands.build.COMPILEALL_SOURCE_DIRS`. |
| **[Workflow Schema](./docs-internal/workflow-schema.md)** | JSON schema for workflows, edge handle conventions, config node architecture |
| **[Execution Engine Design](./docs-internal/DESIGN.md)** | Architecture patterns, design standards, and implementation details for the workflow execution engine |
| **[Execution Roadmap](./docs-internal/ROADMAP.md)** | Implementation status, completed phases, and pending features |
@@ -1193,8 +1193,8 @@ Full reference — agent loop, skill injection, tool building, input/auto-prompt
curl -I http://localhost:${PYTHON_BACKEND_PORT:-5678}
# TypeScript validation — the gate is TypeScript 7 (native Go) at the REPO ROOT.
-pnpm run typecheck # root: tsc --noEmit -p client/tsconfig.json
-pnpm --filter react-flow-client run typecheck # what CI runs; delegates up to the same gate
+bun run typecheck # root: tsc --noEmit -p client/tsconfig.json
+bun run --filter react-flow-client typecheck # what CI runs; delegates up to the same gate
# NOT `npx tsc --noEmit` — there is no root tsconfig.json.
# NOT client's `typecheck:tsc` — that resolves [email protected], kept only because
# typescript-eslint's peer range excludes 6/7. It is a second opinion, not the gate.
@@ -2770,7 +2770,7 @@ This function:
- **Plugin-folder location for plugin-specific CloudEvents factories** (RFC §6.4): when a typed event is owned by one plugin (telegram, whatsapp, android, email, google, master_skill, agent_builder, webhook_trigger, chat_trigger, agent), the factory + `broadcast_<event>` wrapper live in [`server/nodes/<plugin>/_events.py`](./server/nodes), NOT on `WorkflowEvent` / `StatusBroadcaster` directly. Telegram's [`_events.py`](./server/nodes/telegram/_events.py) is the canonical template — `broadcast_telegram_status` constructs the envelope via a plain factory function and calls `get_status_broadcaster().broadcast(...)` itself. Latest example: [`server/nodes/skill/master_skill/_events.py`](./server/nodes/skill/master_skill/_events.py) (`broadcast_skill_lifecycle("created" \| "updated" \| "deleted" \| "content_saved", name=..., **data_extra)`) — replaces four raw-dict broadcasts in `handle_create_user_skill` / `handle_update_user_skill` / `handle_delete_user_skill` / `handle_save_skill_content` (the last one was previously silent). FE routes wire key `skill_lifecycle` to invalidate `userSkills` + `folderSkills` queries and drop the `skillContent` cache on delete + content_saved so the Master Skill panel refreshes live across every connected client. Cross-cutting events (credential, workflow_lifecycle, agent_progress, agent_capability, node_parameters_updated) keep their `WorkflowEvent` classmethods + `StatusBroadcaster` wrappers — only plugin-scoped events move to the plugin folder.
- **Operator-metadata fields in credential panels** (f746ddf): when a credential panel needs a non-credential follow-up field (e.g. Telegram bot token + owner chat id), declare it as a second entry in the provider's `fields` array in `server/config/credential_providers.json`. The first field stays the validate/connect target; subsequent fields render below as plain text inputs via `SecondaryFieldRow` in `ApiKeyPanel.tsx` (shadcn `Input` + `Label` + `<ActionButton intent="save">`). Each field carries an optional `help` slot (`FieldDef.help` / `ServerFieldDef.help`) for always-visible explanatory text under the input. Save writes via `panel.actions.save(field.key, value)` → `auth_service.store_api_key` (which is permissive about provider string). The credential class must declare the new key in `extra_fields` (`Credential` subclass attribute) so the storage layer accepts it. Reference: `telegram_owner_chat_id` field.
- **Telegram owner detection — three layers** (f746ddf): the bot owner is captured by THREE independent paths so the realistic setup flows all converge to a working state. (1) **Explicit field**: secondary `FieldDef` in the credentials modal lets the user paste their Telegram user ID directly (recommended; works without DM'ing the bot). (2) **Pre-poll peek** in `connect()` via `_capture_owner_from_pending_updates()` — calls `bot.get_updates(timeout=0)` BEFORE `start_polling(drop_pending_updates=True)` discards the queue, scans for any historical private DM, captures + persists atomically. (3) **Atomic write-through in `_on_message_received`** — persists FIRST, sets in-memory ONLY on success. Invariant: "in-memory has owner ⇒ DB has owner" so a process restart can re-capture cleanly. Failure logged at `ERROR` with `exc_info=True` (was `WARNING` previously, masking persist failures). The lazy fallback in `telegram_send.py` (read DB → `service.set_owner`) sits on top of all three.
-- **Supervisor Job Object loud-failure (cli/tree.py + cli/supervisor.py)** (8a64eb9): the Windows process-tree mechanism depends entirely on a Job Object with `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE` (no fallback — `start_new_session` is POSIX-only). `pywin32>=308` is a hard supervisor dependency on Windows; the declaration in the root `pyproject.toml` (where `opencompany-cli` lives — `cli/pyproject.toml` was removed as a stale duplicate) carries an inline comment so future maintainers don't drop it. `_JobObject.__init__` splits failures into explicit `ImportError` (with reinstall command) and `Exception` (with `repr`) branches — both write to `stderr` instead of swallowing. `_JobObject.add()` verifies enrollment via `win32job.IsProcessInJob(handle, self._handle)` after assignment; on mismatch it queries `IsProcessInJob(handle, None)` so the warning explicitly names the wrapper-job hypothesis (npm / pnpm / conhost wrappers occasionally place us in their own non-nesting Job). `supervisor._spawn_once` checks `add_to_job` return value and emits a yellow `WARN: pid=N not enrolled in Job Object` per child if False. Without these guards, a stale pywin32 install or a wrapping Job Object silently leaks orphan Python processes on every Ctrl-C and they accumulate to the point of holding SQLite locks that block subsequent backend startup.
+- **Supervisor Job Object loud-failure (cli/tree.py + cli/supervisor.py)** (8a64eb9): the Windows process-tree mechanism depends entirely on a Job Object with `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE` (no fallback — `start_new_session` is POSIX-only). `pywin32>=308` is a hard supervisor dependency on Windows; the declaration in the root `pyproject.toml` (where `opencompany-cli` lives — `cli/pyproject.toml` was removed as a stale duplicate) carries an inline comment so future maintainers don't drop it. `_JobObject.__init__` splits failures into explicit `ImportError` (with reinstall command) and `Exception` (with `repr`) branches — both write to `stderr` instead of swallowing. `_JobObject.add()` verifies enrollment via `win32job.IsProcessInJob(handle, self._handle)` after assignment; on mismatch it queries `IsProcessInJob(handle, None)` so the warning explicitly names the wrapper-job hypothesis (npm / bun / conhost wrappers occasionally place us in their own non-nesting Job). `supervisor._spawn_once` checks `add_to_job` return value and emits a yellow `WARN: pid=N not enrolled in Job Object` per child if False. Without these guards, a stale pywin32 install or a wrapping Job Object silently leaks orphan Python processes on every Ctrl-C and they accumulate to the point of holding SQLite locks that block subsequent backend startup.
- **Credentials envelope-shape invariant** (dc94cde): the `useCredentialPanel` query stores `{values: CredentialFormValues, hadStored: boolean}` (an envelope, NOT a flat dict). The earlier `writeValues` called `setQueryData<CredentialFormValues>` with a spread `(prev) => ({...prev, [key]: value})`, which at runtime merged the typed character at the envelope level next to `values` and `hadStored` instead of inside `.values` — the input selector `panel.values[field.key]` re-rendered with the original (server) value on every keystroke and the input felt frozen. Fix: `writeValues` now preserves the envelope shape and updates only the inner `values` dict; `hadStored` is preserved verbatim (it reflects real server state, not local edits). When introducing other queries shaped as `{data, meta}` envelopes, follow the same pattern — never spread `prev` as if it were the inner payload.
- **`core.paths` is the SSOT for on-disk locations**: only generic helpers (`data_path` / `packages_dir` / `package_dir(name)` / `daemons_dir` / `workspaces_dir` / `workspace_dir(workflow_id)` / `example_workflows_dir`). Plugin-specific subpaths are composed inline at the plugin's call site — adding a new package never requires touching `core.paths`. Reference subtree under `opencompany_root()` (= `~/.opencompany/` per default `DATA_DIR`): `workspaces/<slug>/` (per-workflow scratch), `daemons/` (supervised event-source daemon cwds — `stripe listen` etc.; shared root by default, no per-namespace subdir), `claude/` (Claude Code's `CLAUDE_CONFIG_DIR` state — composed as `data_path("claude")` in `nodes/agent/claude_code_agent/_oauth.py`), `packages/` (OpenCompany-managed install root). `packages/` holds a **single shared npm tree** — one `package.json` + `package-lock.json` + `node_modules/` covering every OpenCompany-managed npm package (`@anthropic-ai/claude-code`, `edgymeow`, `agent-browser`). Each plugin's `_install.py` runs `npm install <pkg> --prefix <packages_dir>` which extends the shared tree idempotently; npm manages everything else. Non-npm binaries (Stripe CLI, Temporal CLI) sit under sibling subdirs `packages/stripe/`, `packages/temporal/` via `package_dir(name)`. Also under `<DATA_DIR>/`: `whatsapp/` (WhatsApp session DB), `credentials.db` / `workflow.db` / `temporal.db`. Pre-fix `packages_dir()` routed through `platformdirs.user_cache_path("OpenCompany")` (`~/.cache/OpenCompany/` etc.) and the Temporal CLI sat in its own `pooch.os_cache("opencompany-temporal")` namespace — operators reported both as "not local". The WhatsApp Go bridge (`edgymeow`) used to be a top-level pnpm dep at `<repo>/node_modules/edgymeow/`; now OpenCompany-managed via `nodes/whatsapp/_install.py` like the other CLIs. Daemon cwds used to live under `workspaces/_<namespace>/` and polluted per-workflow scratch with framework state. Out of scope: globally-installed binaries (Himalaya — system package manager). Shipped seed workflows are the lone exception — `example_workflows_dir()` is hardcoded to `<repo>/.opencompany/workflows/` (git-tracked seeds, NOT under `DATA_DIR`) so they survive `company clean` and stay at the same path across `DATA_DIR=~/.opencompany` vs `DATA_DIR=.opencompany` configs.
- **`company clean` preserves `.opencompany/{workflows,deploy,packages}/`**: `cli/commands/clean.py` iterates the canonical `<repo>/.opencompany/` and pre-rebrand `<repo>/.machina/` roots and skips anything in `_OPENCOMPANY_KEEP = frozenset({"workflows", "deploy", "packages"})`. Wipes `claude/`, `workspaces/`, `*.db` as before. `workflows/` holds the shipped seed JSONs (git-tracked); `deploy/` holds Terraform state for LIVE cloud resources (only `company deploy destroy` removes it); `packages/` holds the OpenCompany-managed binaries (Temporal CLI ~114 MB, Stripe CLI, shared npm tree) — re-fetchable but expensive, so clean+build cycles stay offline-safe cache hits. Test `cli/tests/test_clean.py::test_opencompany_keep_preserves_workflows_deploy_and_packages` locks the keep-list.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5e241205..4b3f8761 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -125,18 +125,24 @@ The diagram above shows the full lifecycle of a workflow node: one self-containe
## Local Dev Quick Reference
-Development from source uses **pnpm** (not npm). The `scripts/preinstall.js` hook enforces this when `pnpm-workspace.yaml` is present. Install pnpm once with `npm install -g pnpm`.
+Development from source uses **bun** (not npm). The `scripts/preinstall.js` hook enforces this when `bunfig.toml` is present (it keys on the file plus a `bun` user agent; end-user npm tarball installs are unaffected because `bunfig.toml` is not shipped in the package). Install bun once from https://bun.sh — Windows: `powershell -c "irm bun.sh/install.ps1 | iex"`; macOS/Linux: `curl -fsSL https://bun.sh/install | bash`.
```bash
-pnpm install # install workspace dependencies
-pnpm run dev # start the app (Vite HMR + backend; Temporal starts from the backend when TEMPORAL_ENABLED, WhatsApp only on demand)
-pnpm run stop # stop everything
-pnpm run build # production build
-pnpm --filter react-flow-client run typecheck # THE gate: TypeScript 7 (native Go). Same command CI runs.
-pnpm --filter react-flow-client run typecheck:tsc # second opinion under tsc 5.9 — for triaging a red gate, not a substitute
+bun install # install workspace dependencies
+bun run dev # start the app (Vite HMR + backend; Temporal starts from the backend when TEMPORAL_ENABLED, WhatsApp only on demand)
+bun run stop # stop everything
+bun run build # production build
+bun run --filter react-flow-client typecheck # THE gate: TypeScript 7 (native Go). Same command CI runs.
+bun run --filter react-flow-client typecheck:tsc # second opinion under tsc 5.9 — for triaging a red gate, not a substitute
uv run pytest # run backend tests (from server/, uv-managed venv)
```
+**Known differences from pnpm** (the workspace migrated from pnpm@9 to [email protected]):
+
+- **No strict-peer-dependencies equivalent.** bun never errors on peer conflicts, so the check that kept client `typescript` inside typescript-eslint's peer range is gone from install time — the CLI test locking client `typescript` to `^5` (`cli/tests/test_release_pipeline_config.py`) is now the only guard.
+- **Dependabot's `bun` ecosystem does version updates only — no security-update PRs.** Alerts still fire; remediation goes through the top-level `overrides` block in the root `package.json` (the pins formerly under `pnpm.overrides`).
+- **`--bun` is not enabled anywhere.** Node 22 remains the runtime for vite/vitest/eslint/the sidecar. A trial of `--bun` for `vite dev` only is a documented follow-up once the package-manager migration proves stable — never for vitest/eslint (known bun-runtime breakage: oven-sh/bun#20762, #13346).
+
Full setup and scripts reference: [SETUP.md](docs-internal/SETUP.md) - [SCRIPTS.md](docs-internal/SCRIPTS.md)
## Full Documentation Index
diff --git a/README.md b/README.md
index 7ac23b71..e4fdf4fc 100644
--- a/README.md
+++ b/README.md
@@ -28,11 +28,13 @@ Open http://localhost:5678 and click the key icon (**API Credentials**) in the t
<summary><b>Run from source (for contributors)</b></summary>
```bash
-npm install -g pnpm
+# install bun (https://bun.sh) — Windows: powershell -c "irm bun.sh/install.ps1 | iex"
+curl -fsSL https://bun.sh/install | bash
git clone https://github.com/zeenie-ai/OpenCompany.git OpenCompany
cd OpenCompany
-pnpm run build
-pnpm run dev
+bun install
+bun run build
+bun run dev
```
The `dev` task starts the Vite client (with HMR) at http://localhost:5678 — the same URL as production — proxying API/WebSocket traffic to the Python backend on :5679; optional daemons (WhatsApp, Temporal) are spawned by the backend on demand. Every port is declared in `.env.template` and overridable in `.env`; nothing is hardcoded. See [SETUP.md](docs-internal/SETUP.md) and [SCRIPTS.md](docs-internal/SCRIPTS.md) for details, and [CONTRIBUTING.md](CONTRIBUTING.md) for the codebase map and contribution recipes.
diff --git a/cli/README.md b/cli/README.md
index ca1b80f3..36fe5136 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -3,11 +3,11 @@
Project supervisor CLI for the OpenCompany stack. The public command is
`company`; the npm package is `@zeenie-ai/opencompany`, and the legacy `machina` bin
remains as a deprecated compatibility alias. It is also backwards-compatible
-with `pnpm run start`/`dev`/`stop`/etc.
+with `bun run start`/`dev`/`stop`/etc.
## Install
-Done automatically in `scripts/postinstall.js` after `pnpm install`. To
+Done automatically in `scripts/postinstall.js` after `bun install`. To
install manually:
```sh
@@ -24,7 +24,7 @@ company stop # kill ports + orphans + temporal
Or via the npm scripts (which now invoke the same Python CLI):
```sh
-pnpm run stop
+bun run stop
```
## Cross-platform notes
diff --git a/cli/terraform/gcp/startup.sh.tftpl b/cli/terraform/gcp/startup.sh.tftpl
index 458b826a..dea0ca09 100644
--- a/cli/terraform/gcp/startup.sh.tftpl
+++ b/cli/terraform/gcp/startup.sh.tftpl
@@ -16,7 +16,6 @@ apt-get update
apt-get install -y curl ca-certificates git build-essential pkg-config libffi-dev libssl-dev
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
-corepack enable || true
# uv on a stable system path (company build uses it to sync the Python venv).
curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/usr/local/bin sh
diff --git a/client/scripts/audit-bundle.py b/client/scripts/audit-bundle.py
index 3bb24a79..5dc42b56 100644
--- a/client/scripts/audit-bundle.py
+++ b/client/scripts/audit-bundle.py
@@ -1,7 +1,7 @@
"""Bundle audit — prints top contributors to the main chunk sourcemap.
Usage:
- cd client && ANALYZE=1 pnpm run build && python scripts/audit-bundle.py
+ ANALYZE=1 bun run --filter react-flow-client build && cd client && python scripts/audit-bundle.py
"""
from __future__ import annotations
@@ -17,7 +17,7 @@ def main() -> int:
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
matches = glob.glob("dist/assets/index-*.js.map")
if not matches:
- print("no dist/assets/index-*.js.map found; run ANALYZE=1 pnpm run build first")
+ print("no dist/assets/index-*.js.map found; run ANALYZE=1 bun run --filter react-flow-client build first")
return 1
# Pick the largest sourcemap — that's the main chunk, not a lazy panel.
sourcemap_path = max(matches, key=lambda p: os.path.getsize(p))
@@ -51,8 +51,8 @@ def main() -> int:
normalized = "node_modules/" + normalized.split("/node_modules/", 1)[1]
print(f"{n:>10,} {100 * n / total:>4.1f}% {normalized[:90]}")
- # Bucketed by package / src subtree. pnpm stores deps under a
- # content-addressable path like `node_modules/.pnpm/<pkg>@<ver>_<hash>/
+ # Bucketed by package / src subtree. bun's isolated linker stores deps
+ # under a versioned store path like `node_modules/.bun/<pkg>@<ver>/
# node_modules/<pkg>/...` — we want to collapse on the innermost
# `node_modules/<pkg>` segment so the bucket is the actual package name.
buckets: dict[str, int] = defaultdict(int)
@@ -60,7 +60,7 @@ def main() -> int:
normalized = s.replace("\\", "/")
if "/node_modules/" in normalized:
# Find the LAST `/node_modules/` occurrence so we skip the
- # .pnpm wrapper and land on the real package.
+ # .bun store wrapper and land on the real package.
after = normalized.rsplit("/node_modules/", 1)[1]
parts = after.split("/")
if parts[0].startswith("@") and len(parts) >= 2:
diff --git a/client/src/vite-env.d.ts b/client/src/vite-env.d.ts
index 69c7b408..37d684c6 100644
--- a/client/src/vite-env.d.ts
+++ b/client/src/vite-env.d.ts
@@ -3,8 +3,9 @@
/// <reference types="node" />
// `google.maps` namespace is exposed via @types/google.maps. tsc 5.x
// auto-loads all @types/* packages, but tsgo (TypeScript 7 native
-// preview) does not pick the namespace up reliably under pnpm's
-// symlinked node_modules layout — the explicit reference here is the
+// preview) does not pick the namespace up reliably under a symlinked
+// node_modules layout (pnpm before, bun's isolated linker now) — the
+// explicit reference here is the
// canonical fix per https://developers.google.com/maps/documentation/javascript/using-typescript
// and works for both compilers.
diff --git a/client/vite.config.js b/client/vite.config.js
index 4fd4f612..4e444fed 100644
--- a/client/vite.config.js
+++ b/client/vite.config.js
@@ -171,7 +171,8 @@ export default defineConfig(({ mode }) => {
// `company dev --force` sets VITE_FORCE to re-run dependency
// pre-bundling — Vite's own recovery for "Outdated Optimize Dep"
// (equivalent to `vite --force`, which can't be threaded through
- // the pnpm run -> npm run indirection as an argv flag).
+ // the `bun run client:start` -> `npm run start` indirection as an
+ // argv flag).
force: !!getEnv('VITE_FORCE', ''),
// Pre-bundle the heavy deps reached through lazily-loaded panels
// (chat/markdown stack, canvas) so a late discovery can't trigger
diff --git a/docs-internal/SCRIPTS.md b/docs-internal/SCRIPTS.md
index 393241d8..cc65ccda 100644
--- a/docs-internal/SCRIPTS.md
+++ b/docs-internal/SCRIPTS.md
@@ -24,7 +24,7 @@ deprecation warning; kept for upgrade compatibility).
| `company dev` | Start in dev mode (Vite HMR + uvicorn). `--force` re-bundles Vite deps (recovers "Outdated Optimize Dep"); `--daemon` binds backend to 0.0.0.0 |
| `company serve` | Single-port production runtime (uvicorn serves API + WS + built SPA; optional daemons incl. the Node.js executor are backend-spawned on demand) — the systemd `ExecStart` on deployed VMs |
| `company stop` | Stop all services and free configured ports |
-| `company build` | Full production build (pnpm install → client → sidecar → uv sync → bytecode → temporal binary). Step [0/6] scaffolds `.env` from `.env.template` when missing, generating fresh random secrets (`secrets.token_hex(24)`) for `SECRET_KEY` / `JWT_SECRET_KEY` / `API_KEY_ENCRYPTION_KEY` instead of the dev placeholders; an existing `.env` is untouched |
+| `company build` | Full production build (bun install → client → sidecar → uv sync → bytecode → temporal binary). Step [0/6] scaffolds `.env` from `.env.template` when missing, generating fresh random secrets (`secrets.token_hex(24)`) for `SECRET_KEY` / `JWT_SECRET_KEY` / `API_KEY_ENCRYPTION_KEY` instead of the dev placeholders; an existing `.env` is untouched |
| `company clean` | Stop services, then remove build artifacts, node_modules, `.venv`, repo-local state (preserves `.opencompany/{workflows,deploy,packages}`) |
| `company deploy up/status/destroy` | Self-deploy a login-gated VM (gcloud preflight + Terraform; see `cli/commands/deploy/`) |
| `company daemon start/stop/status/restart` | Detached backend management (PID file under user data dir) |
@@ -87,7 +87,7 @@ The Temporal dev server is backend-owned: the FastAPI lifespan starts it via `Te
| File | Purpose |
|------|---------|
-| `install.js` | npm-tarball install pipeline (pnpm/uv install, client + sidecar build, bytecode compile, temporal binary fetch) — mirrors `company build`; the compileall command shape is locked in sync by `cli/tests/test_release_pipeline_config.py` |
+| `install.js` | npm-tarball install pipeline (npm/uv install for end users — dev workspaces use bun; client + sidecar build, bytecode compile, temporal binary fetch) — mirrors `company build`; the compileall command shape is locked in sync by `cli/tests/test_release_pipeline_config.py` |
| `preinstall.js` | Legacy-package/temp cleanup (also runs on uninstall) |
| `postinstall.js` | npm lifecycle entry that guards recursion and invokes install.js |
| `migrate_icons.py`, `migrate_skill_icons.py` | One-off icon-migration utilities (historical) |
@@ -130,7 +130,7 @@ Key variables in `.env` (see `.env.template` for the full list):
| Node.js | 22+ | https://nodejs.org/ |
| Python | 3.12+ (CLI); server venv accepts 3.11–3.12 | https://python.org/ |
| uv | latest | `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
-| pnpm | 9.x | `corepack enable` (root `packageManager` pin) |
+| bun | 1.4.x | official installer (https://bun.sh); root `packageManager` pin read by `oven-sh/setup-bun` in CI |
---
diff --git a/docs-internal/SETUP.md b/docs-internal/SETUP.md
index 61b9317e..00d396bc 100644
--- a/docs-internal/SETUP.md
+++ b/docs-internal/SETUP.md
@@ -30,13 +30,14 @@ WebSocket + built SPA on the backend port).
### Local Development (from source)
-**Prerequisites:** Node.js 22+, Python 3.12+, uv,
+**Prerequisites:** Node.js 22+, Python 3.12+, uv, bun 1.4+ (https://bun.sh)
```bash
git clone https://github.com/zeenie-ai/OpenCompany.git OpenCompany
cd OpenCompany
-npm run build
-npm run start
+bun install
+bun run build
+bun run start
```
The default server install stays lightweight and does not install the
@@ -145,10 +146,10 @@ When `VITE_AUTH_ENABLED=false` (the default):
| Command | Description |
|---------|-------------|
-| `npm run start` | Start the app (backend-owned daemons start on demand) |
-| `npm run stop` | Stop all services |
-| `npm run build` | Install dependencies |
-| `npm run dev` | Start development server |
+| `bun run start` | Start the app (backend-owned daemons start on demand) |
+| `bun run stop` | Stop all services |
+| `bun run build` | Install dependencies |
+| `bun run dev` | Start development server |
## Troubleshooting
diff --git a/docs-internal/ci_cd.md b/docs-internal/ci_cd.md
index bb33a067..8e1ca4a7 100644
--- a/docs-internal/ci_cd.md
+++ b/docs-internal/ci_cd.md
@@ -39,7 +39,7 @@ The repo currently ships **three workflows** plus one composite action. A number
| CI | `.github/workflows/ci.yml` | push/PR → main | Delegates to predeploy.yml |
| Predeploy | `.github/workflows/predeploy.yml` | `workflow_call` | build/lint + backend tests + CLI tests + cross-OS build/start smoke |
| Release | `.github/workflows/release.yml` | `v*.*.*` tag, `workflow_dispatch` | predeploy gate → publish (npm + GitHub Packages) |
-| Setup | `.github/actions/setup/action.yml` | (composite) | pnpm 9 + Node 22 + Python 3.12 + uv v8 + editable CLI install |
+| Setup | `.github/actions/setup/action.yml` | (composite) | bun 1.4 + Node 22 + Python 3.12 + uv v8 + editable CLI install |
### Toolchain pin
@@ -67,12 +67,12 @@ The repo currently ships **three workflows** plus one composite action. A number
| Tool | Version source | Action |
|------|---------------|--------|
-| pnpm | `pnpm/action-setup` v4.3.0 default | Immutable commit SHA |
+| bun | `oven-sh/setup-bun` v2.2.0 — reads the root `packageManager` pin (`[email protected]`) | Immutable commit SHA |
| Node.js | `node-version` input, default `22` | `actions/setup-node` v6.5.0, immutable commit SHA; package cache disabled |
| Python | hard-coded `3.12` (matches `.python-version`) | `actions/setup-python` v5.6.0, immutable commit SHA |
| uv | `astral-sh/setup-uv` v8.1.0, cache disabled | Immutable commit SHA |
-`setup-node`'s `cache:` is intentionally omitted — its post-job cache save fails with a `Path Validation Error` in lanes that didn't run pnpm (CLI / backend test jobs), which would mark the whole job red even when every test passed.
+`setup-node`'s `cache:` is intentionally omitted — its post-job cache save fails with a `Path Validation Error` in lanes that didn't run a JS install (CLI / backend test jobs), which would mark the whole job red even when every test passed. No dependency cache is configured for bun either (unchanged from the pnpm era).
After tool install the composite installs the supervisor CLI editably (`uv pip install --system -e .`).
@@ -84,10 +84,10 @@ After tool install the composite installs the supervisor CLI editably (`uv pip i
Reusable `workflow_call` workflow with four independent jobs (no plan/change-detection gate, no aggregator — every job runs on every call):
-- `build-and-lint` — `pnpm install --frozen-lockfile` + `pnpm run build`, then client lint (`pnpm --filter react-flow-client run lint`), TypeScript check (`... run typecheck`), and frontend tests (`... run test`, vitest). Runs on `ubuntu-latest`.
+- `build-and-lint` — `bun install --frozen-lockfile` + `bun run build`, then client lint (`bun run --filter react-flow-client lint`), TypeScript check (`... typecheck`), and frontend tests (`... test`, vitest). Runs on `ubuntu-latest`.
- `backend-tests` — `uv sync` + `uv run pytest tests/ -v` in `server/`. Whole suite, unsharded. Runs on `ubuntu-latest`.
- `cli-tests` — `uv pip install --system pytest pytest-asyncio pyyaml` + `python -m pytest cli/tests/ -v`. Runs on `ubuntu-latest`.
-- `test-build-start` — cross-OS matrix (`ubuntu-latest`, `macos-latest`, `windows-latest`, `fail-fast: false`). Runs `pnpm run build`, then a start smoke test. On Unix it backgrounds `pnpm run start`, polls `http://localhost:5678/health` for up to ~30 s, then `pnpm run stop`. On Windows it starts the supervisor as a background job, waits 15 s, and fails if the job already exited.
+- `test-build-start` — cross-OS matrix (`ubuntu-latest`, `macos-latest`, `windows-latest`, `fail-fast: false`). Runs `bun run build`, then a start smoke test. On Unix it backgrounds `bun run start`, polls `http://localhost:5678/health` for up to ~30 s, then `bun run stop`. On Windows it starts the supervisor as a background job, waits 15 s, and fails if the job already exited.
---
@@ -121,7 +121,7 @@ publish-npm publish-github-packages
npmjs, public + provenance npm.pkg.github.com
```
-- Both publish jobs `needs: predeploy`, run on `ubuntu-latest`, and share the same prefix: immutable `actions/checkout` with `persist-credentials: false` → composite setup → immutable `actions/setup-node` (with the target `registry-url`) → `pnpm install --frozen-lockfile` → `pnpm run build` → `python -m cli version sync`.
+- Both publish jobs `needs: predeploy`, run on `ubuntu-latest`, and share the same prefix: immutable `actions/checkout` with `persist-credentials: false` → composite setup → immutable `actions/setup-node` (with the target `registry-url`) → `bun install --frozen-lockfile` → `bun run build` → `python -m cli version sync`.
- `publish-npm` — validates the token with `npm whoami`, then publishes the canonical public npmjs package `@zeenie-ai/opencompany` via `npm publish --access public --provenance` with `NODE_AUTH_TOKEN=secrets.NPM_TOKEN`. The `--provenance` flag emits an npm provenance attestation (backed by the workflow's `id-token: write`).
- `publish-github-packages` — rewrites `package.json` `name` to `@zeenie-ai/opencompany` and sets `publishConfig.registry = https://npm.pkg.github.com`, then `npm publish` with `NODE_AUTH_TOKEN=secrets.GITHUB_TOKEN`.
@@ -151,7 +151,7 @@ folder — both the folder and the workflow are gone.
| `.github/workflows/ci.yml` | CI entry point (delegates to predeploy.yml) |
| `.github/workflows/predeploy.yml` | Reusable validation (build/lint + backend tests + CLI tests + OS matrix build/start) |
| `.github/workflows/release.yml` | Tag / manual release: predeploy gate → publish npm + GitHub Packages |
-| `.github/actions/setup/action.yml` | Composite: pnpm + Node + Python + uv + editable CLI install |
+| `.github/actions/setup/action.yml` | Composite: bun + Node + Python + uv + editable CLI install |
| `.github/dependabot.yml` | **Security updates only** — version-update PRs disabled; see below |
| `.python-version` | Toolchain pin (`3.12`) — single source of truth |
@@ -164,13 +164,19 @@ Dependabot raises **security PRs only**; routine version bumps are disabled
updates only; security PRs are exempt from both the limit and the schedule
and are grouped per ecosystem via `applies-to: security-updates`).
-Three entries cover the real surfaces: `npm /` (pnpm workspace spans root +
+Three entries cover the real surfaces: `bun /` (bun workspace spans root +
`client/` + `server/nodejs/`), `pip /server` (authoritative
`server/pyproject.toml`; the committed `requirements.txt` export is the
transitive-pin surface security fixes patch), `github-actions /`. A former
`pip: /` entry (duplicate churn against `server/requirements.txt`) and a
dead `npm: /server` entry were removed.
+**Caveat on the `bun` ecosystem**: Dependabot's `bun` support does version
+updates only — it never raises security-update PRs, so the security-only
+posture above yields no automated PRs at all for the JS workspace. Alerts
+still fire; the remediation channel is the top-level `overrides` block in
+the root `package.json` (the ranged pins formerly under `pnpm.overrides`).
+
Repo-level alerts + security updates must stay enabled — verify with
`gh api repos/zeenie-ai/OpenCompany/vulnerability-alerts` (204 = enabled).
@@ -188,7 +194,7 @@ conditions`.
The following existed in earlier drafts of this doc but are **not present in the current repo**. Listed here so the intent is preserved without misrepresenting the shipped pipeline:
- **`predeploy.yml` change-detection + aggregator** — a `plan` job (`dorny/paths-filter`) gating downstream jobs, a `pre-commit` job, pytest sharding by domain, and a `ci-passed` aggregator (`re-actors/alls-green`) as the single branch-protection target. Today every predeploy job runs unconditionally and there is no aggregator job.
-- **`release.yml` hardening** — `workflow_dispatch` dry-run default, a blocking `pnpm audit`, a once-per-release `build-for-publish` artifact, `actions/attest-build-provenance` SLSA attestations, and a `create-github-release` job.
+- **`release.yml` hardening** — `workflow_dispatch` dry-run default, a once-per-release `build-for-publish` artifact, `actions/attest-build-provenance` SLSA attestations, and a `create-github-release` job. (An earlier draft also planned a blocking `pnpm audit`; bun has no audit-equivalent gate, so the top-level `overrides` block + Dependabot alerts are the vulnerability-remediation channel instead.)
- **`publish-pypi.yml`** — reusable PyPI publish (OIDC trusted publishing, `uv build --no-sources`, `pypa/gh-action-pypi-publish`). No PyPI distribution is published today.
- **`test-install.yml`** — cross-platform end-user install smoke (npm install, git clone, install script) across 3 OS.
- **`rollback.yml`** — manual `npm deprecate` + optional revert PR.
diff --git a/docs-internal/errors.md b/docs-internal/errors.md
index 52199956..65ded37d 100644
--- a/docs-internal/errors.md
+++ b/docs-internal/errors.md
@@ -13,7 +13,7 @@ Documented root causes and fixes for errors encountered in OpenCompany developme
**Contributing factors**:
- Each worktree contains its own `.venv/`, `node_modules/`, and source tree (thousands of files)
- Windows Search Indexer and Defender monitor directory trees recursively from the project root
-- pnpm hardlinks from `.pnpm-store` into each worktree's `node_modules/` create additional file-system contention
+- The package manager's store layout (pnpm's `.pnpm-store` hardlinks at the time; bun's isolated linker now symlinks each worktree's `node_modules/` through its `node_modules/.bun/` store) creates additional file-system contention
- Killing the hung Python process does NOT help -- the next attempt restarts the scan queue from scratch
**Fix**: Move or remove worktrees from inside the project root.
@@ -248,7 +248,7 @@ self.ws = await asyncio.wait_for(
## 5. `ERR_CONNECTION_REFUSED` on Frontend Auth Check
-**Symptom**: After `pnpm run dev`, browser console shows repeated errors:
+**Symptom**: After `bun run dev`, browser console shows repeated errors:
```
GET http://localhost:5678/api/auth/status net::ERR_CONNECTION_REFUSED
Failed to check auth status (attempt 4/6): TypeError: Failed to fetch
diff --git a/docs-internal/frontend_architecture.md b/docs-internal/frontend_architecture.md
index 813f5a8c..d095df64 100644
--- a/docs-internal/frontend_architecture.md
+++ b/docs-internal/frontend_architecture.md
@@ -22,8 +22,8 @@ Post-migration (2026-04-14). Single source of truth for the current frontend.
|---|---|---|
| Bundler | Vite 7 | [client/vite.config.js](../client/vite.config.js) |
| Framework | React 19 | [client/src/main.tsx](../client/src/main.tsx) |
-| Type checker | `[email protected]` — native Go compiler, **exact-pinned in the root `package.json`** | root `pnpm run typecheck` → `tsc --noEmit -p client/tsconfig.json`; client's `typecheck` delegates up |
-| Type checker (second opinion) | `typescript@^5.9.3` in **client** `dependencies` | Kept for typescript-eslint's peer range (`>=4.8.4 <6.1.0`). Two `typescript` entries cannot live in one manifest, and both 5.x and 7.x expose a `tsc` bin — hence the root/client split. `pnpm typecheck:tsc` runs it for triage only. |
+| Type checker | `[email protected]` — native Go compiler, **exact-pinned in the root `package.json`** | root `bun run typecheck` → `tsc --noEmit -p client/tsconfig.json`; client's `typecheck` delegates up |
+| Type checker (second opinion) | `typescript@^5.9.3` in **client** `dependencies` | Kept for typescript-eslint's peer range (`>=4.8.4 <6.1.0`). Two `typescript` entries cannot live in one manifest, and both 5.x and 7.x expose a `tsc` bin — hence the root/client split. `bun run typecheck:tsc` runs it for triage only. |
| Compiler | `[email protected]` (exact-pinned; `target: '19'` = the React version, not the plugin version) | [vite.config.js](../client/vite.config.js) (scoped: all of `/src/` except `components/ui/`). Pin is exact because semver sorts the old `19.1.0-rc.3` **above** `1.0.0`, so a range would silently reinstall the release candidate — which lacks the incompatible-library skip list. |
| Styling | Tailwind v4 + `@tailwindcss/vite` | [index.css](../client/src/index.css) + [tailwind.config.js](../client/tailwind.config.js) |
| Component library | shadcn/ui (CLI `npx shadcn@latest add`) | [components/ui/](../client/src/components/ui/) |
@@ -607,16 +607,16 @@ The DIY widget registry (RHF + zod + a tester+rank dispatch) is modeled on n8n's
```bash
# from repo root
-pnpm install # client deps + server Python deps via postinstall
-pnpm run dev # supervisor: Vite client (app port, proxying) + uvicorn backend; Temporal/WhatsApp are backend-owned on-demand daemons
-pnpm run build # full prod build; bundle analyzer at dist/stats.html if ANALYZE=1
+bun install # client deps + server Python deps via postinstall
+bun run dev # supervisor: Vite client (app port, proxying) + uvicorn backend; Temporal/WhatsApp are backend-owned on-demand daemons
+bun run build # full prod build; bundle analyzer at dist/stats.html if ANALYZE=1
# client-only
cd client
-pnpm dev # Vite dev server
-pnpm build # Vite prod build (Tailwind v4 via @tailwindcss/vite plugin)
-pnpm typecheck # THE gate — delegates up to the root TypeScript 7 compiler
-pnpm typecheck:tsc # second opinion under client's tsc 5.9.3 (triage only, never the gate)
+bun run dev # Vite dev server
+bun run build # Vite prod build (Tailwind v4 via @tailwindcss/vite plugin)
+bun run typecheck # THE gate — delegates up to the root TypeScript 7 compiler
+bun run typecheck:tsc # second opinion under client's tsc 5.9.3 (triage only, never the gate)
```
**Adding shadcn components:**
@@ -624,7 +624,7 @@ pnpm typecheck:tsc # second opinion under client's tsc 5.9.3 (triage only,
cd client
OPENCOMPANY_INSTALLING=true npx shadcn@latest add <name>
```
-The `OPENCOMPANY_INSTALLING=true` env var suppresses the recursive project postinstall hook during shadcn's internal `pnpm install`. Without it the hook's `company build` run fails and shadcn aborts before writing the component file.
+The `OPENCOMPANY_INSTALLING=true` env var suppresses the recursive project postinstall hook during shadcn's internal package-manager install. Without it the hook's `company build` run fails and shadcn aborts before writing the component file.
## Migration history (for context)
diff --git a/docs-internal/gcp_vm_deploy_runbook.md b/docs-internal/gcp_vm_deploy_runbook.md
index ea17f0c2..e86ab92d 100644
--- a/docs-internal/gcp_vm_deploy_runbook.md
+++ b/docs-internal/gcp_vm_deploy_runbook.md
@@ -145,7 +145,6 @@ apt-get update
apt-get install -y curl ca-certificates git build-essential pkg-config libffi-dev libssl-dev nginx
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
-corepack enable || true
curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/usr/local/bin sh
echo "[opencompany] installing OpenCompany released package..."
diff --git a/docs-internal/onboarding.md b/docs-internal/onboarding.md
index 7e27e9a4..4dc586bd 100644
--- a/docs-internal/onboarding.md
+++ b/docs-internal/onboarding.md
@@ -283,7 +283,7 @@ No new handlers were needed. The onboarding system reuses existing generic handl
7. **Existing user migration**: With existing `workflow.db` where `examples_loaded=1` -- onboarding does NOT appear
8. **Theme support**: Switch themes -- role-token cards and region tints adapt correctly
9. **Replay**: Open Settings, click "Replay Welcome Guide" -- wizard reopens from step 0
-10. **TypeScript**: `pnpm run typecheck` (root gate, TypeScript 7) passes clean
+10. **TypeScript**: `bun run typecheck` (root gate, TypeScript 7) passes clean
## Key Files
diff --git a/docs-internal/performance.md b/docs-internal/performance.md
index 0a4ef7b7..53513002 100644
--- a/docs-internal/performance.md
+++ b/docs-internal/performance.md
@@ -8,7 +8,7 @@ reference rot fast.
## Headline numbers (current baseline)
-Measured on Windows, dev mode (`pnpm run dev` → `company dev`),
+Measured on Windows, dev mode (`bun run dev` → `company dev`),
warm OS file cache, with bytecode pre-compile applied:
| Metric | Value | Source |
@@ -217,7 +217,7 @@ grep -E "Freeing ports|Importing FastAPI|AIService imported|All imports complete
```bash
cd client
-ANALYZE=1 pnpm exec vite build
+ANALYZE=1 bun run vite build
# open client/dist/stats.html in a browser → treemap with gzip sizes
```
@@ -230,7 +230,7 @@ real regressions in other chunks fire while the icons baseline doesn't.
```bash
cd client
-pnpm exec vitest run src/lib/__tests__/connectionConfig.test.ts
+bun run vitest run src/lib/__tests__/connectionConfig.test.ts
```
10 tests, locks RFC 6455 close code, AUTH_RETRY envelope, full-jitter
diff --git a/docs-internal/release_build_pipeline.md b/docs-internal/release_build_pipeline.md
index 8d7256a7..ee27a398 100644
--- a/docs-internal/release_build_pipeline.md
+++ b/docs-internal/release_build_pipeline.md
@@ -27,7 +27,8 @@ named `tsgo` — stopped publishing the day before and must not come back.
(it loads the TS API at module scope and its peer range excludes 6.x/7.x). A
single manifest cannot declare `typescript` twice.
- `typescript@7` and `typescript@5` **both** ship a `tsc` bin. Co-locating them
- would leave pnpm's bin-link conflict resolution deciding which compiler gates
+ would leave bun's bin-link conflict resolution (under the isolated linker)
+ deciding which compiler gates
CI. (No collision exists today only because `native-preview`'s bin was `tsgo`.)
- Root declares no `typescript` and no `typescript-eslint`, so there is no peer
conflict and nothing else claims `tsc`.
@@ -35,15 +36,15 @@ named `tsgo` — stopped publishing the day before and must not come back.
- root `package.json` → `devDependencies: { "typescript": "7.0.2" }`, **exact —
no caret**, so the compiler that gates CI never moves on an unrelated install;
plus `"typecheck": "tsc --noEmit -p client/tsconfig.json"`
-- `client/package.json` → `"typecheck": "pnpm -w run typecheck"` (delegates up,
+- `client/package.json` → `"typecheck": "bun --cwd=.. run typecheck"` (delegates up,
so the CI command and its guard test stay byte-identical)
- `"typecheck:tsc": "tsc --noEmit"` — resolves client's own 5.9.3. A **second
opinion for triaging a red gate**, NOT an equivalent check and NOT a revert
path: the two compilers check different programs under different default
rules. Nothing in CI runs it, so verify it independently before trusting it.
-- `.github/workflows/predeploy.yml` → `pnpm --filter react-flow-client run typecheck` in the
+- `.github/workflows/predeploy.yml` → `bun run --filter react-flow-client typecheck` in the
`build-and-lint` job. (This gate lives in `predeploy.yml`, not `release.yml`.) The cross-OS
- `test-build-start` matrix additionally runs `pnpm exec tsc --version`, because the TS7
+ `test-build-start` matrix additionally runs `bun run tsc --version`, because the TS7
compiler is a per-platform Go binary delivered via `optionalDependencies` — the type-check
itself runs only on ubuntu, so without that step the darwin-arm64 and win32-x64 binaries
would be installed on every matrix run and never executed.
@@ -135,8 +136,8 @@ Idempotent on re-runs (compileall only rewrites stale pyc; esbuild is determinis
## Verification
-1. `pnpm --filter react-flow-client run typecheck` → <5s, zero errors.
-2. `ANALYZE=1 pnpm --filter react-flow-client run build` → open `client/dist/stats.html`. Expect: no chunk above 600 KB gz, main < 200 KB gz, `vendor-flow` split.
+1. `bun run --filter react-flow-client typecheck` → <5s, zero errors.
+2. `ANALYZE=1 bun run --filter react-flow-client build` → open `client/dist/stats.html`. Expect: no chunk above 600 KB gz, main < 200 KB gz, `vendor-flow` split.
3. `cd server/nodejs && npm run build && node dist/index.js` → starts on :5682 in <100ms.
4. `cd server && uv run python -m compileall -q -j 0 services` → plain `__pycache__/*.pyc` present (no `.opt-1.pyc` — nothing loads those).
5. Cold-start: clean install + `company start > start.log 2>&1` → `Application startup complete` at ≤+50s (was +66.9s).
diff --git a/docs-internal/theme_system.md b/docs-internal/theme_system.md
index 655a7a54..28d59ccf 100644
--- a/docs-internal/theme_system.md
+++ b/docs-internal/theme_system.md
@@ -464,7 +464,7 @@ The overlay only re-binds the keys most visible on the canvas (primary, focus, a
When changing a component, verify under all four themes:
```bash
-cd client && pnpm dev
+cd client && bun run dev
```
1. `<html data-theme="light">` — clean default, near-white surfaces
@@ -475,7 +475,7 @@ cd client && pnpm dev
Build + typecheck must stay clean:
```bash
-cd client && pnpm typecheck && pnpm build
+cd client && bun run typecheck && bun run build
```
Touched components should pass lint:
diff --git a/docs-internal/ui_migration_plan.md b/docs-internal/ui_migration_plan.md
index e81b298b..18d527ce 100644
--- a/docs-internal/ui_migration_plan.md
+++ b/docs-internal/ui_migration_plan.md
@@ -441,7 +441,7 @@ Dependency order: 0 → {1, 2, 3} parallelizable → 4 → 5 → 7; 6 can overla
- No `Spinner`. Use `<Loader2 className="h-4 w-4 animate-spin" />` from `lucide-react` (installed by shadcn).
- No `toast` facade. `import { toast } from 'sonner'` at call sites.
-**Verification:** `pnpm exec tsc --noEmit` green; `pnpm build` green; manually open one screen, confirm theme tokens render, confirm a `sonner` toast fires.
+**Verification:** `bun run tsc --noEmit` green; `bun run build` green; manually open one screen, confirm theme tokens render, confirm a `sonner` toast fires.
**Effort:** 0.5 day.
@@ -558,7 +558,7 @@ Dependency order: 0 → {1, 2, 3} parallelizable → 4 → 5 → 7; 6 can overla
- Remove from [client/package.json](../client/package.json): `antd`, `@ant-design/icons`, `styled-components`, `@types/styled-components`.
- Broaden React Compiler scope to whole `src/`.
-**Verification:** full app regression; record bundle size before/after; `pnpm build` + `tsc --noEmit` green.
+**Verification:** full app regression; record bundle size before/after; `bun run build` + `tsc --noEmit` green.
**Rollback:** keep `pre-phase-7` branch; antd reinstalls cleanly if regression found post-deploy.
@@ -593,9 +593,9 @@ Each phase behind no flag except Phase 6 (`VITE_USE_NODESPEC`). Rollback = singl
## End-to-end verification (post Phase 7)
-1. `pnpm install && pnpm build` — green, bundle size recorded.
-2. `pnpm exec tsc --noEmit` — zero errors.
+1. `bun install && bun run build` — green, bundle size recorded.
+2. `bun run tsc --noEmit` — zero errors.
3. Full manual regression: workflow open/save, node CRUD, credential CRUD per provider, parameter edit, workflow run, output render (markdown/JSON/error), theme toggle light↔dark, keyboard nav (Tab/Esc/Enter on all overlays).
-4. Bundle analyzer (`ANALYZE=1 pnpm build` then open `dist/stats.html`): confirm antd + dayjs locales removed.
+4. Bundle analyzer (`ANALYZE=1 bun run build` then open `dist/stats.html`): confirm antd + dayjs locales removed.
5. `grep -r "from 'antd'" client/src/` returns zero.
6. `grep -r "styled-components" client/src/` returns zero.
diff --git a/install.ps1 b/install.ps1
index ae46bbe1..2bea9ccb 100644
--- a/install.ps1
+++ b/install.ps1
@@ -229,8 +229,8 @@ function Main {
Write-Host " the URL printed by 'company start'"
}
Write-Host ""
- Write-Host " For development from source, install pnpm:"
- Write-Host " npm install -g pnpm"
+ Write-Host " For development from source, install bun:"
+ Write-Host " https://bun.sh"
Write-Host ""
Write-Host " Run diagnostics:"
Write-Host " company doctor"
diff --git a/install.sh b/install.sh
index ece26f8c..09a0bf92 100755
--- a/install.sh
+++ b/install.sh
@@ -335,8 +335,8 @@ main() {
echo " Optional: Enable JS-rendered web scraping:"
echo " playwright install chromium"
echo ""
- echo " For development from source, install pnpm:"
- echo " npm install -g pnpm"
+ echo " For development from source, install bun:"
+ echo " https://bun.sh"
echo ""
echo " Run diagnostics:"
echo " company doctor"
diff --git a/server/nodes/whatsapp/_service.py b/server/nodes/whatsapp/_service.py
index cbb37935..0d2ef81f 100644
--- a/server/nodes/whatsapp/_service.py
+++ b/server/nodes/whatsapp/_service.py
@@ -325,7 +325,7 @@ async def get_client(force_reconnect: bool = False, *, spawn: bool = True) -> RP
"""
global _client
# Lazy-spawn the edgymeow binary on first use so its session DB lives
- # under <data_dir>/whatsapp/ instead of the pnpm package directory.
+ # under <data_dir>/whatsapp/ instead of the npm package directory.
# Idempotent: no-op if already running or disabled via settings.
if spawn:
from nodes.whatsapp import get_whatsapp_runtime