Conversation
86a7fd2 to
4bfe3dc
Compare
There was a problem hiding this comment.
Pull request overview
Adds a bundled byterover-memory external memory provider plugin to HybridClaw, including prompt-time recall, explicit ByteRover tools, an operator /byterover command, and background curation hooks, along with supporting docs and tests.
Changes:
- Introduces the new
plugins/byterover-memoryplugin (config, process runner, tools/command, and memory-layer integration). - Adds a dedicated unit test covering prompt injection, tool exposure/execution, command wiring, and curation mirroring.
- Updates documentation + docs index links to include the new extensibility guide page.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/byterover-memory-plugin.test.ts | New unit test exercising plugin lifecycle, prompt recall injection, tools/command wiring, and curation mirroring. |
| README.md | Adds docs link to the ByteRover memory plugin guide. |
| plugins/byterover-memory/src/index.js | Implements the ByteRover memory plugin: memory layer, prompt hook, tools, /byterover command, and curation hooks. |
| plugins/byterover-memory/src/config.js | Adds config resolution with defaults, bounds checking, and ~/relative path handling. |
| plugins/byterover-memory/src/byterover-process.js | Adds ByteRover CLI spawn runner with env allowlisting, timeouts, and output truncation. |
| plugins/byterover-memory/package.json | Declares the bundled plugin package metadata. |
| plugins/byterover-memory/hybridclaw.plugin.yaml | Plugin manifest: id/kind, required bin, external dependency check, credentials, and config schema. |
| docs/static/docs.js | Adds ByteRover plugin guide to docs navigation. |
| docs/development/extensibility/byterover-memory-plugin.md | New documentation page describing install/config/behavior/tools/verification. |
| docs/development/agents.md | Adds link to the new ByteRover plugin doc page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const finish = (result) => { | ||
| if (settled) return; | ||
| settled = true; | ||
| clearTimeout(timer); | ||
| clearTimeout(killTimer); | ||
| resolve({ | ||
| ...result, | ||
| stdout: readCollectedOutput(stdoutCollector), |
There was a problem hiding this comment.
finish() calls clearTimeout(timer) but timer is declared later as a const. If the child emits an error (or closes) before timer is initialized, this will throw a ReferenceError due to the TDZ and the promise may never resolve. Declare let timer: NodeJS.Timeout | null = null before defining finish, and assign it afterwards (or move finish below timer and avoid referencing a const before initialization).
| function normalizeManualCommandArgs(args) { | ||
| const normalizedArgs = Array.isArray(args) | ||
| ? args.map((arg) => String(arg || '').trim()).filter(Boolean) | ||
| : []; | ||
| if (normalizedArgs.length === 0) { | ||
| return ['status']; | ||
| } | ||
| const command = normalizedArgs[0].toLowerCase(); | ||
| if ( | ||
| (command === 'query' || command === 'curate') && | ||
| !normalizedArgs.includes('--') | ||
| ) { | ||
| const payload = stripMatchingQuotes(normalizedArgs.slice(1).join(' ')); | ||
| return payload ? [command, '--', payload] : [command]; | ||
| } | ||
| return normalizedArgs; | ||
| } |
There was a problem hiding this comment.
normalizeManualCommandArgs() lowercases query/curate but leaves other subcommands (including status) case-sensitive. This means /byterover Status will likely fail (or at least skip the special status formatting in handleCommand because it checks commandArgs[0] === 'status'). Consider normalizing the first arg to lowercase for all subcommands (or compare case-insensitively in handleCommand).
What changed
byterover-memoryexternal memory provider pluginbrv_query/brv_curate/brv_statustools, and a/byterovercommand into HybridClaw's plugin memory-layer systemWhy
HybridClaw already supports external memory providers, and Hermes has a ByteRover integration pattern worth matching. This adds a native HybridClaw implementation that fits the existing memory-provider slot and plugin lifecycle hooks without changing built-in memory behavior.
Impact
MEMORY.md, andUSER.mdValidation
npm run typecheck./node_modules/.bin/vitest run --configLoader runner --config vitest.unit.config.ts tests/byterover-memory-plugin.test.ts