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
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ host is recallable from all of them. Not installed yet? Follow
number of hits one query returns. Absence of results is absence of
results, not evidence of absence — vary the wording or narrow by tag
before concluding anything.
- Every recall answer carries a `retrieval` block that says how it was
produced — read it instead of guessing: `truncated: true` means the
window filled and more may exist; `degraded: true` means semantic search
is configured but could not run, so you are seeing keyword-only results
right now (worth telling the user, and `memesh doctor` explains why).

## What Claude Code already does — do not double-write

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ All notable changes to MeMesh are documented here.

### Added

- **Honest retrieval metadata: every recall says how it was answered.**
The envelope (MCP, HTTP and `--json` alike) now carries
`retrieval: { mode, degraded, truncated }` — `mode` is `hybrid` when the
vector supplement actually ran and `fts` when the answer is
keyword-only; `degraded: true` means embeddings ARE configured but the
vector side could not run right now (provider failure or missing
sqlite-vec), which until now silently served keyword-only results with
nothing in the response saying so; `truncated: true` means the results
filled `limit` and more may exist — the difference between "that is
all" and "that is all I was allowed to return". The CLI prints a
degraded warning and a "(limit reached — more may exist)" note in human
output. One shape change rides along: `memesh recall --json` now always
prints the object envelope (`{entities, retrieval, conflicts?}`) instead
of a bare array normally and an object only when conflicts existed —
the bimodal shape MCP and HTTP already abandoned.

- **`memesh why <file>` + `POST /v1/why`: file attribution with typed
abstentions.** Local git resolves which commits touched a file
(`git log --follow`, or `git blame` for `--line N`); the graph answers
Expand Down
11 changes: 10 additions & 1 deletion dist/core/operations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ import type { EmbedOutcome } from './embedder.js';
import type { RememberInput, RememberResult, RecallInput, ForgetInput, ForgetResult, LearnInput, LearnResult, Entity } from './types.js';
export declare function remember(args: RememberInput): RememberResult;
export declare function recall(args: RecallInput): Entity[];
export declare function recallEnhanced(args: RecallInput): Promise<Entity[]>;
export interface RetrievalMeta {
mode: 'fts' | 'hybrid';
degraded: boolean;
truncated: boolean;
}
export declare function recallEnhanced(args: RecallInput): Promise<{
entities: Entity[];
retrieval: RetrievalMeta;
}>;
export declare function recallWithConflicts(args: RecallInput): Promise<{
entities: Entity[];
conflicts: string[];
retrieval: RetrievalMeta;
}>;
export { exportMemories, importMemories } from './serializer.js';
export declare function learn(args: LearnInput): LearnResult;
Expand Down
2 changes: 1 addition & 1 deletion dist/core/operations.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions dist/core/operations.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading