Skip to content

[codex] add byterover memory plugin#277

Open
furukama wants to merge 2 commits intomainfrom
codex/byterover-memory
Open

[codex] add byterover memory plugin#277
furukama wants to merge 2 commits intomainfrom
codex/byterover-memory

Conversation

@furukama
Copy link
Copy Markdown
Contributor

What changed

  • add a bundled byterover-memory external memory provider plugin
  • wire ByteRover prompt recall, brv_query / brv_curate / brv_status tools, and a /byterover command into HybridClaw's plugin memory-layer system
  • mirror completed turns, native memory writes, and pre-compaction summaries into ByteRover curation flows
  • add targeted ByteRover plugin tests and a new extensibility guide, plus docs index links

Why

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

  • operators can install and enable ByteRover as the active external memory provider
  • models get prompt-time recall plus explicit ByteRover tools
  • ByteRover stays additive alongside built-in SQLite, MEMORY.md, and USER.md

Validation

  • npm run typecheck
  • ./node_modules/.bin/vitest run --configLoader runner --config vitest.unit.config.ts tests/byterover-memory-plugin.test.ts

@furukama furukama force-pushed the codex/byterover-memory branch from 86a7fd2 to 4bfe3dc Compare April 10, 2026 19:39
@furukama furukama marked this pull request as ready for review April 11, 2026 07:30
Copilot AI review requested due to automatic review settings April 11, 2026 07:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-memory plugin (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.

Comment on lines +124 to +131
const finish = (result) => {
if (settled) return;
settled = true;
clearTimeout(timer);
clearTimeout(killTimer);
resolve({
...result,
stdout: readCollectedOutput(stdoutCollector),
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment on lines +153 to +169
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;
}
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants