pi-byterover 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/dist/index.js +5 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<h1>pi-byterover</h1>
|
|
4
|
+
|
|
5
|
+
<p>Bring ByteRover memory to Pi agents with automatic recall and persistence.</p>
|
|
6
|
+
|
|
7
|
+
<p>
|
|
8
|
+
<a href="https://www.npmjs.com/package/pi-byterover"><img src="https://img.shields.io/npm/v/pi-byterover?style=for-the-badge&color=5B8DEF" alt="npm version"></a>
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/pi-byterover?style=for-the-badge&color=34D399" alt="license"></a>
|
|
10
|
+
<a href="https://github.com/ian-pascoe/pi-byterover"><img src="https://img.shields.io/badge/github-pi--byterover-111827?style=for-the-badge&logo=github" alt="GitHub repository"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
</div>
|
|
2
14
|
|
|
3
15
|
`pi-byterover` connects Pi sessions to ByteRover through `@byterover/brv-bridge`.
|
|
4
16
|
|
package/dist/index.js
CHANGED
|
@@ -4927,22 +4927,7 @@ const registerManualTools = ({ pi, bridge, config, createBridge }) => {
|
|
|
4927
4927
|
};
|
|
4928
4928
|
//#endregion
|
|
4929
4929
|
//#region src/index.ts
|
|
4930
|
-
const logBrv = (level, message) => {
|
|
4931
|
-
const prefixed = `[byterover] ${message}`;
|
|
4932
|
-
if (level === "error") {
|
|
4933
|
-
console.error(prefixed);
|
|
4934
|
-
return;
|
|
4935
|
-
}
|
|
4936
|
-
if (level === "warn") {
|
|
4937
|
-
console.warn(prefixed);
|
|
4938
|
-
return;
|
|
4939
|
-
}
|
|
4940
|
-
if (level === "info") {
|
|
4941
|
-
console.info(prefixed);
|
|
4942
|
-
return;
|
|
4943
|
-
}
|
|
4944
|
-
console.debug(prefixed);
|
|
4945
|
-
};
|
|
4930
|
+
const logBrv = (level, message) => {};
|
|
4946
4931
|
const notifyBrv = (ctx, type, message, config) => {
|
|
4947
4932
|
if (config?.quiet) return;
|
|
4948
4933
|
if (!ctx.hasUI) return;
|
|
@@ -5027,7 +5012,7 @@ function byterover(pi) {
|
|
|
5027
5012
|
if (!content) return { systemPrompt };
|
|
5028
5013
|
return { systemPrompt: appendSystemPromptBlock(systemPrompt, `<${config.contextTagName}>\n${content}\n</${config.contextTagName}>`) };
|
|
5029
5014
|
} catch (error) {
|
|
5030
|
-
notifyBrv(ctx, "error", "Failed to recall context from ByteRover
|
|
5015
|
+
notifyBrv(ctx, "error", "Failed to recall context from ByteRover", config);
|
|
5031
5016
|
logBrv("error", `ByteRover recall failed: ${errorMessage(error)}`);
|
|
5032
5017
|
return { systemPrompt };
|
|
5033
5018
|
}
|
|
@@ -5057,14 +5042,14 @@ function byterover(pi) {
|
|
|
5057
5042
|
try {
|
|
5058
5043
|
const result = await bridge.persist(`${config.persistPrompt.trim()}\n\nConversation:\n\n---\n${formattedMessages}`, { cwd: ctx.cwd });
|
|
5059
5044
|
if (result.status === "error") {
|
|
5060
|
-
notifyBrv(ctx, "error", "Failed to curate conversation turn
|
|
5045
|
+
notifyBrv(ctx, "error", "Failed to curate conversation turn with ByteRover", config);
|
|
5061
5046
|
logBrv("error", `ByteRover curation failed: ${result.message}`);
|
|
5062
5047
|
return;
|
|
5063
5048
|
}
|
|
5064
5049
|
const currentInFlightCuration = inFlightCurations.get(dedupeKey);
|
|
5065
5050
|
if (currentInFlightCuration?.key === key && currentInFlightCuration.promise === promise) curatedTurns.set(dedupeKey, key);
|
|
5066
5051
|
} catch (error) {
|
|
5067
|
-
notifyBrv(ctx, "error", "Failed to curate conversation turn
|
|
5052
|
+
notifyBrv(ctx, "error", "Failed to curate conversation turn with ByteRover", config);
|
|
5068
5053
|
logBrv("error", `ByteRover curation failed: ${errorMessage(error)}`);
|
|
5069
5054
|
}
|
|
5070
5055
|
};
|
|
@@ -5083,7 +5068,7 @@ function byterover(pi) {
|
|
|
5083
5068
|
const configResult = await loadConfig({ cwd: ctx.cwd });
|
|
5084
5069
|
if (!configResult.success) {
|
|
5085
5070
|
runtime = void 0;
|
|
5086
|
-
notifyBrv(ctx, "error", "Invalid
|
|
5071
|
+
notifyBrv(ctx, "error", "Invalid ByteRover configuration");
|
|
5087
5072
|
logBrv("error", configResult.error.message);
|
|
5088
5073
|
return;
|
|
5089
5074
|
}
|