Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Correct Open Knowledge agent and contributor docs to the pnpm regime (#2956)

Nick Gomez71d6b5b21228
diff --git a/packages/app/tests/integration/idb-preload.ts b/packages/app/tests/integration/idb-preload.ts
index 07256e26b..87f5d04bf 100644
--- a/packages/app/tests/integration/idb-preload.ts
+++ b/packages/app/tests/integration/idb-preload.ts
@@ -2,15 +2,15 @@ import 'fake-indexeddb/auto';
import { afterEach } from 'vitest';
// Global afterEach hook: wipe every `ok-ydoc:` IDB database after each
-// test. fake-indexeddb persists state across tests within a single bun
-// process, so tests that share doc names (e.g., the common 'test-doc'
+// test. fake-indexeddb persists state across tests within a single Vitest
+// worker process, so tests that share doc names (e.g., the common 'test-doc'
// harness name) would otherwise hydrate from prior-test state on open.
// Cleaning here prevents cross-test pollution WITHOUT requiring every
// integration test to call resetFakeIndexedDB explicitly.
//
-// This relies on Bun running afterEach hooks in LIFO order: per-file teardown
+// This relies on Vitest running afterEach hooks in LIFO order: per-file teardown
// hooks registered after this preload close providers/servers first, then this
-// hook deletes the databases. If Bun ever switches to FIFO ordering,
+// hook deletes the databases. Under FIFO ordering,
// deleteDatabase would hit onblocked while provider IDB handles are still open.
afterEach(async () => {
if (typeof indexedDB === 'undefined') return;
diff --git a/packages/desktop/build/UNIVERSAL_LINK_ACTIVATION.md b/packages/desktop/build/UNIVERSAL_LINK_ACTIVATION.md
index 8e913c35c..8c9bb630d 100644
--- a/packages/desktop/build/UNIVERSAL_LINK_ACTIVATION.md
+++ b/packages/desktop/build/UNIVERSAL_LINK_ACTIVATION.md
@@ -25,7 +25,7 @@ Run these commands locally on macOS before shipping the next DMG that carries Un
### 1. Build dry-run (no codesigning required)
```sh
-cd public/open-knowledge && bun run build:desktop
+cd public/open-knowledge && pnpm build:desktop
```
Should succeed without `CSC_LINK` / `CSC_KEY_PASSWORD` / `APPLE_ID` / `APPLE_TEAM_ID` env vars set. The afterSign pipeline at `scripts/afterSign.mjs` no-ops when codesigning credentials are absent (`build:mac:unsigned` path), so the entitlement + profile additions don't break the unsigned build.
@@ -52,7 +52,7 @@ The `"*"` wildcard for `com.apple.developer.associated-domains` is the most perm
### 3. Signed build verification (when codesigning identity is available)
```sh
-cd public/open-knowledge && bun run build:desktop # with CSC_LINK + CSC_KEY_PASSWORD set
+cd public/open-knowledge && pnpm build:desktop # with CSC_LINK + CSC_KEY_PASSWORD set
codesign -d --entitlements - 'packages/desktop/dist-desktop/mac-arm64/OpenKnowledge.app' 2>&1 | head -40
```
diff --git a/packages/desktop/tests/smoke/native-config-e2e.md b/packages/desktop/tests/smoke/native-config-e2e.md
index 1b95cf50a..8b978137c 100644
--- a/packages/desktop/tests/smoke/native-config-e2e.md
+++ b/packages/desktop/tests/smoke/native-config-e2e.md
@@ -6,7 +6,7 @@
| Check | Fidelity | Where |
|---|---|---|
-| Bundle is produced + loadable + round-trips (parse / upsert / symlink) from `packages/cli/dist/native/` | Real (runs in `bun run check`) | `packages/desktop/tests/unit/verify-native-config-driver.test.mjs` (end-to-end test) |
+| Bundle is produced + loadable + round-trips (parse / upsert / symlink) from `packages/cli/dist/native/` | Real (runs in `pnpm check`) | `packages/desktop/tests/unit/verify-native-config-driver.test.mjs` (end-to-end test) |
| Driver maps `.dmg`/`.app`/dir inputs + exit codes | Real (unit) | same test file |
| Loads from a packaged `.app`/`.dmg` shipped layout | Real, but needs a built artifact | this runbook, Step 2 (`verify-native-config-in-packaged-dmg.mjs`) |
| Loads **in the Electron main process** (hardened runtime + asar) | Deferred to signed-DMG QA | this runbook, Step 3 |
@@ -18,12 +18,12 @@ The addon is pure computation over a napi N-API surface that is ABI-stable acros
## Step 1 — Pre-package (creds-free, runs in CI)
```bash
-bun run build # turbo builds native-config -> cli; copies into dist/native
+pnpm build # turbo builds native-config -> cli; copies into dist/native
node scripts/verify-native-config-in-packaged-dmg.mjs packages/cli/dist
# Expect: "verify-native-config: OK — backend=native nativeDir=.../dist/native durationMs=N" and exit 0
```
-`bun run check` runs the same load end-to-end via the driver test, so a regression that breaks the bundle (a missing `build:native` step, a `type: module` collision, a missing `package.json` in `dist/native/`) fails the gate.
+`pnpm check` runs the same load end-to-end via the driver test, so a regression that breaks the bundle (a missing `build:native` step, a `type: module` collision, a missing `package.json` in `dist/native/`) fails the gate.
Exit codes: `0` loaded + round-tripped · `1` found but failed to load · `2` bad args · `3` no `dist/native` loader found.
@@ -34,7 +34,7 @@ Exit codes: `0` loaded + round-tripped · `1` found but failed to load · `2` ba
After an unsigned or signed build, point the driver at the artifact:
```bash
-bun run --cwd packages/desktop build:mac:unsigned
+pnpm --dir packages/desktop run build:mac:unsigned
node scripts/verify-native-config-in-packaged-dmg.mjs \
packages/desktop/dist-desktop/OpenKnowledge-arm64.dmg
# Expect: "verify-native-config: OK — backend=native ..." and exit 0
diff --git a/packages/server/assets/skills/write-skill/SKILL.md b/packages/server/assets/skills/write-skill/SKILL.md
index c9a41d7fb..282fbf155 100644
--- a/packages/server/assets/skills/write-skill/SKILL.md
+++ b/packages/server/assets/skills/write-skill/SKILL.md
@@ -81,7 +81,7 @@ Before writing the skill, run the scenario WITHOUT it and capture what the agent
does wrong — verbatim, including its rationalizations ("the test is trivial so I
skipped it"). Those rationalizations are the exact loopholes the skill body must
close. If you have a running server, use the agent simulator
-(`cd packages/app && bun run src/server/agent-sim.ts`) as the executor; otherwise
+(`cd packages/app && pnpm exec tsx src/server/agent-sim.ts`) as the executor; otherwise
reason through the baseline transcript with the user. Skip this stage for plain
reference skills.
diff --git a/packages/server/assets/skills/write-skill/references/pressure-testing.md b/packages/server/assets/skills/write-skill/references/pressure-testing.md
index f1f23b1e2..fe1e2d98c 100644
--- a/packages/server/assets/skills/write-skill/references/pressure-testing.md
+++ b/packages/server/assets/skills/write-skill/references/pressure-testing.md
@@ -34,7 +34,7 @@ A short table the agent reads when tempted:
## Running it
With a server: drive the scenarios through the agent simulator
-(`cd packages/app && bun run src/server/agent-sim.ts`). Without one: walk the
+(`cd packages/app && pnpm exec tsx src/server/agent-sim.ts`). Without one: walk the
pressured prompt with the user and read the response for the rule holding.
Read the full transcript, not just the final answer — discipline fails in the
reasoning, not always in the output.