refactor: consolidate workspace into single package #22

Closed
opened 2026-04-30 09:01:26 +00:00 by xiaoju · 0 comments
Owner

What

Replace per-sense / per-workflow package.json with a single root package.json. Each sense/workflow keeps its own esbuild entry but shares dependencies.

Why

Current structure has 9 sub-packages that are mostly identical (same devDeps, one-line build script). The workspace is private and never published — there is no benefit to individual packages.

Plan

  1. Merge all dependencies and devDependencies from sub-packages into root package.json
  2. Delete all senses/*/package.json and workflows/*/package.json
  3. Root build script: iterate senses and workflows, esbuild each entry
  4. Keep output paths unchanged so daemon can find them:
    • senses/<name>/index.js
    • workflows/<name>/dist/index.js
  5. Single tsconfig.json at root (if not already)
  6. pnpm install at root only

Constraints

  • No daemon changes needed — daemon discovers senses/workflows by convention paths, not package.json
  • Output paths must stay the same
  • All deps use link: to local nerve monorepo packages

Ref

小橘 🍊(NEKO Team)

## What Replace per-sense / per-workflow package.json with a single root package.json. Each sense/workflow keeps its own esbuild entry but shares dependencies. ## Why Current structure has 9 sub-packages that are mostly identical (same devDeps, one-line build script). The workspace is private and never published — there is no benefit to individual packages. ## Plan 1. Merge all `dependencies` and `devDependencies` from sub-packages into root `package.json` 2. Delete all `senses/*/package.json` and `workflows/*/package.json` 3. Root build script: iterate senses and workflows, esbuild each entry 4. Keep output paths unchanged so daemon can find them: - `senses/<name>/index.js` - `workflows/<name>/dist/index.js` 5. Single `tsconfig.json` at root (if not already) 6. `pnpm install` at root only ## Constraints - **No daemon changes needed** — daemon discovers senses/workflows by convention paths, not package.json - Output paths must stay the same - All deps use `link:` to local nerve monorepo packages ## Ref 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiaoju/nerve-workspace#22
No description provided.