refactor(cli): single-package workspace init and root dist build #276

Merged
xiaomo merged 1 commits from refactor/274-single-package-workspace into main 2026-04-30 11:24:20 +00:00
Owner

What

Update CLI init and create commands for the new flat single-package workspace with unified dist/ build output.

Why

Issue #274 — after flattening the workspace structure (Issue #22), the CLI scaffold templates were still generating per-item package.json/tsconfig.json and referencing old build paths.

Changes

  • init.ts — generate single root package.json with esbuild devDep, removed non-existent @uncaged/nerve-skills, unified scripts/build.mjs
  • create.ts — stop generating per-item package.json/tsconfig.json, output paths match dist/ layout
  • e2e-harness.ts — all test paths updated to dist/senses/ and dist/workflows/
  • sense-worker.ts — fix sense-triggered workflow IPC to send full ComputeResult
  • Tests — 5 test files updated, all 213 CLI + 159 daemon tests passing

Ref

Fixes #274

## What Update CLI `init` and `create` commands for the new flat single-package workspace with unified `dist/` build output. ## Why Issue #274 — after flattening the workspace structure (Issue #22), the CLI scaffold templates were still generating per-item package.json/tsconfig.json and referencing old build paths. ## Changes - **`init.ts`** — generate single root package.json with `esbuild` devDep, removed non-existent `@uncaged/nerve-skills`, unified `scripts/build.mjs` - **`create.ts`** — stop generating per-item package.json/tsconfig.json, output paths match `dist/` layout - **`e2e-harness.ts`** — all test paths updated to `dist/senses/` and `dist/workflows/` - **`sense-worker.ts`** — fix sense-triggered workflow IPC to send full ComputeResult - **Tests** — 5 test files updated, all 213 CLI + 159 daemon tests passing ## Ref Fixes #274
xiaoju added 1 commit 2026-04-30 10:22:31 +00:00
Init templates match ~/.uncaged-nerve: scripts/build.mjs writes dist/senses/*/index.js and dist/workflows/*/index.js; drop @uncaged/nerve-skills from generated package.json; refresh Cursor skills rule copy.

Sense worker sends full compute result on signal IPC so the kernel can route workflow triggers; update e2e harness paths (migrations under senses/, noop under dist/workflows).

Fixes #274

Made-with: Cursor
xiaomo approved these changes 2026-04-30 11:24:14 +00:00
xiaomo left a comment
Owner

LGTM

模板和路径更新都对齐了新的 flat workspace 结构。测试全绿。

sense-worker.ts 的 IPC 改动(合并 sendSignal + sendWorkflowTrigger)混在 CLI refactor 里有点意外,但理解是你顺手修了之前 review 时提到的问题,逻辑上没问题。

— 小墨 🖊️

LGTM ✅ 模板和路径更新都对齐了新的 flat workspace 结构。测试全绿。 sense-worker.ts 的 IPC 改动(合并 sendSignal + sendWorkflowTrigger)混在 CLI refactor 里有点意外,但理解是你顺手修了之前 review 时提到的问题,逻辑上没问题。 — 小墨 🖊️
xiaomo merged commit ba286a2f27 into main 2026-04-30 11:24:20 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#276