feat(context): add recall fusion and zvec workspace adapters
Introduce RRF-based recall fusion for personal/episodic/temporal paths, zvec-grep workspace shadow probing for code executors, and a local headroom proxy starter aligned with the fusion plan defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Local zvec-grep workspace smoke (loopback/dev only).
|
||||
*/
|
||||
import { searchZvecWorkspace } from '../memind-zvec-workspace.mjs';
|
||||
|
||||
const query = process.env.MEMIND_ZVEC_SMOKE_QUERY ?? 'context budget';
|
||||
const mode = process.env.MEMIND_ZVEC_WORKSPACE_MODE ?? 'shadow';
|
||||
|
||||
const result = searchZvecWorkspace({
|
||||
query,
|
||||
env: {
|
||||
...process.env,
|
||||
MEMIND_ZVEC_WORKSPACE_MODE: mode,
|
||||
},
|
||||
});
|
||||
|
||||
console.log('ZVEC_WORKSPACE_PROBE:');
|
||||
console.log(` mode=${result.mode}`);
|
||||
console.log(` query=${result.query}`);
|
||||
console.log(` hits=${result.hitCount ?? 0}`);
|
||||
if (result.skipped) {
|
||||
console.error(`ZVEC_WORKSPACE_FAIL: ${result.reason}`);
|
||||
process.exit(1);
|
||||
}
|
||||
if (!result.hits?.length) {
|
||||
console.error('ZVEC_WORKSPACE_FAIL: no hits (run zg index in repo root first)');
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(`ZVEC_WORKSPACE_OK: top=${result.hits[0].path}:${result.hits[0].startLine}`);
|
||||
Reference in New Issue
Block a user