fix: probe memory vector availability

This commit is contained in:
Peter Steinberger
2026-01-17 19:42:23 +00:00
parent 1f8558771a
commit e3638a9a9e
4 changed files with 41 additions and 2 deletions

View File

@@ -5,13 +5,16 @@ Docs: https://docs.clawd.bot
## 2026.1.17 (Unreleased) ## 2026.1.17 (Unreleased)
### Changes ### Changes
- Telegram: enrich forwarded message context with normalized origin details + legacy fallback. (#1090) — thanks @sleontenko.
- macOS: strip prerelease/build suffixes when parsing gateway semver patches. (#1110) — thanks @zerone0x. - macOS: strip prerelease/build suffixes when parsing gateway semver patches. (#1110) — thanks @zerone0x.
- macOS: keep CLI install pinned to the full build suffix. (#1111) — thanks @artuskg. - macOS: keep CLI install pinned to the full build suffix. (#1111) — thanks @artuskg.
- CLI: add `channels capabilities` with provider probes (Discord intents, Slack bot/user scopes, Teams Graph hints). - CLI: surface update availability in `clawdbot status`.
### Fixes ### Fixes
- Doctor: avoid re-adding WhatsApp ack reaction config when only legacy auth files exist. (#1087) — thanks @YuriNachos. - Doctor: avoid re-adding WhatsApp ack reaction config when only legacy auth files exist. (#1087) — thanks @YuriNachos.
- Providers: update MiniMax coding plan usage endpoint for API keys. - CLI: add WSL2/systemd unavailable hints in daemon status/doctor output.
- Status: show both usage windows with reset hints when usage data is available. (#1101) — thanks @rhjoh.
- Memory: probe sqlite-vec availability in `clawdbot memory status`.
## 2026.1.16-2 ## 2026.1.16-2
@@ -55,6 +58,7 @@ Docs: https://docs.clawd.bot
- Directory: unify `clawdbot directory` across channels and plugin channels. - Directory: unify `clawdbot directory` across channels and plugin channels.
- UI: allow deleting sessions from the Control UI. - UI: allow deleting sessions from the Control UI.
- Memory: add sqlite-vec vector acceleration with CLI status details. - Memory: add sqlite-vec vector acceleration with CLI status details.
- Memory: add experimental session transcript indexing for memory_search (opt-in via memorySearch.experimental.sessionMemory + sources).
- Skills: add user-invocable skill commands and expanded skill command registration. - Skills: add user-invocable skill commands and expanded skill command registration.
- Telegram: default reaction level to minimal and enable reaction notifications by default. - Telegram: default reaction level to minimal and enable reaction notifications by default.
- Telegram: allow reply-chain messages to bypass mention gating in groups. (#1038) — thanks @adityashaw2. - Telegram: allow reply-chain messages to bypass mention gating in groups. (#1038) — thanks @adityashaw2.
@@ -74,6 +78,9 @@ Docs: https://docs.clawd.bot
- macOS: drain subprocess pipes before waiting to avoid deadlocks. (#1081) — thanks @thesash. - macOS: drain subprocess pipes before waiting to avoid deadlocks. (#1081) — thanks @thesash.
- Verbose: wrap tool summaries/output in markdown only for markdown-capable channels. - Verbose: wrap tool summaries/output in markdown only for markdown-capable channels.
- Tools: include provider/session context in elevated exec denial errors. - Tools: include provider/session context in elevated exec denial errors.
- Tools: normalize exec tool alias naming in tool error logs.
- Logging: reuse shared ANSI stripping to keep console capture lint-clean.
- Logging: prefix nested agent output with session/run/channel context.
- Telegram: accept tg/group/telegram prefixes + topic targets for inline button validation. (#1072) — thanks @danielz1z. - Telegram: accept tg/group/telegram prefixes + topic targets for inline button validation. (#1072) — thanks @danielz1z.
- Telegram: split long captions into follow-up messages. - Telegram: split long captions into follow-up messages.
- Config: block startup on invalid config, preserve best-effort doctor config, and keep rolling config backups. (#1083) — thanks @mukhtharcm. - Config: block startup on invalid config, preserve best-effort doctor config, and keep rolling config backups. (#1083) — thanks @mukhtharcm.

View File

@@ -42,6 +42,7 @@ export function registerMemoryCli(program: Command) {
return; return;
} }
try { try {
await manager.probeVectorAvailability();
const status = manager.status(); const status = manager.status();
if (opts.json) { if (opts.json) {
defaultRuntime.log(JSON.stringify(status, null, 2)); defaultRuntime.log(JSON.stringify(status, null, 2));

View File

@@ -86,6 +86,32 @@ describe("memory index", () => {
); );
}); });
it("reports vector availability after probe", async () => {
const cfg = {
agents: {
defaults: {
workspace: workspaceDir,
memorySearch: {
provider: "openai",
model: "mock-embed",
store: { path: indexPath },
sync: { watch: false, onSessionStart: false, onSearch: false },
},
},
list: [{ id: "main", default: true }],
},
};
const result = await getMemorySearchManager({ cfg, agentId: "main" });
expect(result.manager).not.toBeNull();
if (!result.manager) throw new Error("manager missing");
manager = result.manager;
const available = await result.manager.probeVectorAvailability();
const status = result.manager.status();
expect(status.vector?.enabled).toBe(true);
expect(typeof status.vector?.available).toBe("boolean");
expect(status.vector?.available).toBe(available);
});
it("rejects reading non-memory paths", async () => { it("rejects reading non-memory paths", async () => {
const cfg = { const cfg = {
agents: { agents: {

View File

@@ -369,6 +369,11 @@ export class MemoryIndexManager {
}; };
} }
async probeVectorAvailability(): Promise<boolean> {
if (!this.vector.enabled) return false;
return this.ensureVectorReady();
}
async close(): Promise<void> { async close(): Promise<void> {
if (this.closed) return; if (this.closed) return;
this.closed = true; this.closed = true;