mirror of
https://github.com/thedotmack/claude-mem.git
synced 2026-09-20 04:23:02 +08:00
d431f0e689
* fix(worker): dispatch transcript subcommand in worker-service main (2450)
`npx claude-mem transcript watch` exits silently in v13.2.0. The npx
CLI looks for `<marketplace>/plugin/scripts/transcript-watcher.cjs`
and falls back to `spawnBunWorkerCommand('transcript', ['watch'])`
when it is missing — and the bundle never produces that file. The
fallback lands in `worker-service.cjs transcript watch`, but the
worker switch has no `transcript` case, so it falls through to the
`--daemon` default and the command becomes a no-op.
Add the missing case in `worker-service.ts` so it dispatches to the
shared `runTranscriptCommand` from `src/services/transcripts/cli.ts`.
`init`, `watch`, and `validate` now all work through the worker-service
entry point.
A structural-plus-behavioral test verifies the wiring fails without
the patch and passes with it.
Co-Authored-By: Claude <noreply@anthropic.com>
* test(transcripts): replace source-scan with runtime parse + dispatch tests (2450)
Address Greptile review nit on PR 2500: the previous cli-dispatch test
asserted dispatch by regex-matching the worker-service.ts source text,
which would silently pass through quote/path refactors that actually
break routing. Replace with two runtime tests:
1. parseWorkerServiceCommand(["transcript", <sub>, ...]) returns
{ command: "transcript", args: [<sub>, ...] } for watch / init /
validate — proves the argv parser routes the new subcommand
correctly without scanning source.
2. runTranscriptCommand("init", ...) writes a real config file —
proves the dispatch target works end-to-end.
Export parseWorkerServiceCommand + ParsedWorkerCommand to enable the
parser-level assertion. No behavior change in worker-service.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
1.8 KiB
1.8 KiB