Commit Graph
7 Commits
Author SHA1 Message Date
bowenliang123 e0b42ee6a7 chore(pre-commit): run lint, typecheck and coverage as one parallel gate
The hook ran `pnpm test`, the whole coverage suite, and the agent flow in AGENTS.md ran that same suite again before committing: one commit verified identical content twice, about 45s of it.

`pnpm run check` (scripts/check.sh) runs lint, typecheck and coverage concurrently, prints each tool's complete output (also kept in .tmp/check-logs) and fails when any of them does. A green run fingerprints the worktree into .tmp/check.stamp, so the hook skips the suite for content that just passed; any tracked or untracked edit, or a stamp older than an hour (gitignored inputs like lib/ and node_modules can drift unseen), re-runs it, and `--full` always does. The hook gains lint and typecheck at no extra wall time: 3.2s and 1.4s hide inside the 23s test run.

.gitignore now lists the local tool state (.codegraph, .idea, .zcode): it is not a gate input, and its churn would otherwise invalidate every stamp.

Verified: green gate on 146 files / 2305 tests, hook skip in 0.1s, full re-run after any edit, and a stubbed failing tool exits 1 without stamping.
2026-10-13 23:30:07 +08:00
bowenliang123 3f7be66f2d chore(repo): drop unreferenced img.png files and ignore .DS_Store
Neither img.png (root nor docs/) is referenced by the README's raw URLs
or anywhere else; the Finder metadata files were untracked junk.
2026-10-08 00:19:15 +08:00
Bowen Liang 9a64d2ab48 Add vitest coverage command with HTML report
Introduce `pnpm run coverage` to run vitest with v8 instrumentation,
generate a browsable HTML report under ./coverage/, and gate it from
git. Scope coverage to the src tree only: lib/ is the tsdown build
artifact and has no executable surface to cover. Exclusions are
limited to pure type modules (ambient .d.ts, src/shared/types.ts,
src/host/compat.ts) so the summary reflects runnable code.
2026-08-25 21:13:38 +08:00
bowenliang123 89436bf31d chore: switch the package manager from npm to pnpm
- pnpm-workspace.yaml declares the project as its own workspace root, so
  pnpm never walks up into a parent workspace (e.g. $HOME); esbuild's
  postinstall is explicitly allowed
- package.json gains the packageManager field (pnpm@11.9.0)
- package-lock.json replaced by pnpm-lock.yaml
- README development commands now use pnpm
2026-08-14 19:31:57 +08:00
bowenliang123 efb2fff4c2 scripts: keep npm cache in-repo for sandboxed environments 2026-08-14 17:12:51 +08:00
bowenliang123 cd7282ad53 refactor: package dsh-context as an installable dsh bundle
- src/host.js: ESM Cordis plugin; serve snapshots over the generic
  Connection RPC channel /dsh-context (ctx.connection.rpc) instead of the
  dynamic-runner harness.handle seat; lazily resolve sessions/sessionQuery.
- src/client.js: browser half in web-boot bundle shape (require('react'),
  inject connection/slots/locale, plugin-owned style tag, setInterval poll).
- package.json: dsh.bundle (cordis.patch.yml layer) + dsh.client (web UI)
  manifests, ./client export.
- cordis.patch.yml: inserts the dsh-context loader row.
- scripts/build.mjs: zero-dependency build of lib/index.js + lib/client.js
  with smoke checks; scripts/test-host.mjs + scripts/test-client.mjs:
  functional tests for both halves.
- scripts/publish.sh: npm publish driven by NPM_TOKEN, auto version bump.
2026-08-14 17:11:56 +08:00
bowenliang123 517dab8336 init gitignore 2026-08-14 12:50:04 +08:00