Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@four-bytes/four-opencode-brain",
"version": "1.7.6",
"version": "1.7.7",
"description": "Unified brain plugin — single SQLite DB for RAG search, memory, and knowledge base",
"license": "Apache-2.0",
"type": "module",
Expand Down
7 changes: 3 additions & 4 deletions src/four-opencode-brain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,9 @@ const _serverPlugin = async (input: PluginInput) => {
firstRunDb.close();
}

// Init complete — only set idle if NOT auto-ingesting
if (!autoIngest) {
updateStatus("ready"); // init complete, no auto-ingest
}
// Init complete — plugin is ready for tool calls. Auto-ingest (if any) runs in background
// and will transition to "busy" → "ready" on its own.
updateStatus("ready");

// ---- Tool definitions ----

Expand Down
4 changes: 2 additions & 2 deletions src/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function initStatus(client: PluginInput["client"], directory: string): vo
function getBus(): Promise<BusClient> {
if (!_busPromise) {
_busPromise = BusClient.connect().catch((err) => {
console.warn("[brain] BusClient connect failed:", (err as Error).message);
_client?.app?.log({ body: { service: "brain", level: "warn", message: "BusClient connect failed", extra: { error: String(err) } } }).catch(() => {});
_busPromise = null; // allow retry on next call
throw err;
});
Expand Down Expand Up @@ -150,7 +150,7 @@ function write(data: Record<string, unknown>): void {
await target.publish("status", payload);
})
.catch((err) => {
console.warn("[brain] Bus publish failed:", (err as Error).message);
_client?.app?.log({ body: { service: "brain", level: "warn", message: "Bus publish failed", extra: { error: String(err) } } }).catch(() => {});
_busPromise = null; // reset to allow reconnect
});
}
Expand Down
Loading