Commit Graph

9 Commits

Author SHA1 Message Date
xiaomo 7993ecc6d6 feat: extract @uncaged/pulse-local package, remove createStore from core exports
CI / test (push) Has been cancelled
Phase 2 of PulseDatabase abstraction:
- Create @uncaged/pulse-local with bun:sqlite implementation
- Core @uncaged/pulse now exports types only for store (no createStore/createScopedStore)
- Update pulse-workflows, upulse to import factories from @uncaged/pulse-local
- All tests passing (267 core, 39 pulse-workflows)
2026-04-20 01:34:46 +00:00
xiaoju 3e30503c08 feat: upulse CLI refactor — 4 commands (init/inspect/workflow/status)
CI / test (push) Has been cancelled
Auto-generated by meta workflow (cli-cleanup topic).
Removed: daemon, deploy, dev, gc, list, tick, ui commands.
Added: status (systemd + db stats), updated inspect + workflow.
2026-04-17 13:30:17 +00:00
xiaomo 1fb6178efa chore: migrate package manager from bun to pnpm
- Add pnpm-workspace.yaml for monorepo workspace
- Add root package.json with packageManager field
- Add .npmrc with shamefully-hoist=true
- Replace bun.lock with pnpm-lock.yaml
- Use workspace:* protocol for @uncaged/pulse dependency
- Update init.ts scaffold to use pnpm install
- Update CLI commands (tick/dev/deploy) to use pnpm/npx
- Update E2E test comments to reference pnpm
- Keep bun as TS runtime (bun:sqlite, bun:test still needed)

closes #19
2026-04-14 14:31:45 +00:00
xiaomo ca56de9587 fix(e2e): add timeout for promote-heavy tests (T2/T4/T5)
bun:test default 5s too short for promote (tsc + git merge).
Set 60s timeout on describe blocks.

ref #20
2026-04-14 09:05:50 +00:00
xiaoju 56eaace138 fix: bun test targets src/ not dist/, exclude tests from tsc build
- Add bunfig.toml with [test] root = "src" for both packages
- Add exclude patterns in tsconfig.json to prevent test files in dist/
- Update upulse test:e2e script to run all e2e tests
- Clean up stale dist test files

82 unit tests pass (pulse), E2E ready for validation.

小橘 🍊(NEKO Team)
2026-04-14 09:02:12 +00:00
xiaomo acadfbb126 chore: migrate to Bun — bun:sqlite + bun test + bun install
- better-sqlite3 → bun:sqlite (zero native deps, no OOM on install)
- node:test → bun:test, assert → expect
- npm install → bun install in init scaffold
- daemon start uses bun instead of node
- 82 tests pass (32 store + 17 rules + 33 index)
- Minor TS strict issues in test files (expect 2nd arg) — tests pass

closes #20
2026-04-14 08:52:05 +00:00
xiaomo 9e37fa1aa8 test(e2e): T1 init → tick → daemon status chain
- Add E2E test helper: createE2EContext, cleanupE2EContext, runUpulse,
  queryEventsDb, queryVitalsDb, listObjects
- Add T1 test suite (12 tests): init structure, git repo, staging
  worktree, node_modules, idempotent re-init, tick --dry-run, tick
  with DB writes, objects creation, collect events, daemon status
- Fix tick command: collectors/ → executors/ path (matches init scaffold)
- Add test:e2e script to package.json

ref #14
2026-04-14 08:15:48 +00:00
xiaomo ac288a6066 feat(upulse): update CLI + init scaffold for v3 events/collectors API
- init scaffold: types.ts uses Sensed<T> = { data, refreshedAt }
- init scaffold: Effect includes { kind: 'collect'; key: string }
- init scaffold: pulse.config.ts uses collectors registry + runPulse + createStore
- init scaffold: new rules/01-collect-system.ts template
- init scaffold: AGENTS.md documents collect-as-effect pattern
- store.ts: replaced raw SQL with @uncaged/pulse createStore re-export
- inspect.ts: uses store.queryByKind('tick'|'error') instead of old tables
- tick.ts: uses rebuildSnapshot + composeRules + collectors
- daemon.ts: updated daemonStatus to use queryByKind
- package.json: added @uncaged/pulse as file: dependency

closes #8
2026-04-14 06:49:52 +00:00
xiaomo 5e35bdaa0a feat: @uncaged/upulse CLI P0 — init/daemon/tick/list/inspect/dev/deploy
Commands:
- upulse init: scaffold ~/.upulse/ + git worktree staging
- upulse daemon start/stop/restart/status
- upulse tick [--dry-run] [--verbose]
- upulse list: show rule chain
- upulse inspect ticks/errors
- upulse dev path/build
- upulse deploy promote/rollback

Snapshot type: sectioned (system?, projections?, executors?)
Rules access via accessor + optional chaining
2026-04-14 05:02:57 +00:00