fix: dedup on ingest, Intel Mac CI, npm versions, remove dead TS package

- Route ingest tool through smart_ingest (Prediction Error Gating) to
  prevent duplicate memories when content is similar to existing entries
- Fix Intel Mac release build: use macos-13 runner for x86_64-apple-darwin
  (macos-latest is now ARM64, causing silent cross-compile failures)
- Sync npm package version to 1.1.2 (was 1.0.0 in package.json, 1.1.0
  in postinstall.js BINARY_VERSION)
- Add vestige-restore to npm makeExecutable list
- Remove abandoned packages/core/ TypeScript package (pre-Rust implementation
  referencing FSRS-5, chromadb, ollama — 32K lines of dead code)
- Sync workspace Cargo.toml version to 1.1.2

Closes #5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sam Valladares 2026-02-12 02:57:03 -06:00
parent 709c06c2fa
commit a680fa7d2f
49 changed files with 76 additions and 32094 deletions

View file

@ -76,14 +76,50 @@ pub async fn execute(
};
let mut storage = storage.lock().await;
let node = storage.ingest(input).map_err(|e| e.to_string())?;
Ok(serde_json::json!({
"success": true,
"nodeId": node.id,
"message": format!("Knowledge ingested successfully. Node ID: {}", node.id),
"hasEmbedding": node.has_embedding.unwrap_or(false),
}))
// Route through smart_ingest when embeddings are available to prevent duplicates.
// Falls back to raw ingest only when embeddings aren't ready.
#[cfg(all(feature = "embeddings", feature = "vector-search"))]
{
let fallback_input = input.clone();
match storage.smart_ingest(input) {
Ok(result) => {
return Ok(serde_json::json!({
"success": true,
"nodeId": result.node.id,
"decision": result.decision,
"message": format!("Knowledge ingested successfully. Node ID: {} ({})", result.node.id, result.decision),
"hasEmbedding": result.node.has_embedding.unwrap_or(false),
"similarity": result.similarity,
"reason": result.reason,
}));
}
Err(_) => {
// smart_ingest failed — fall through to raw ingest with cloned input
let node = storage.ingest(fallback_input).map_err(|e| e.to_string())?;
return Ok(serde_json::json!({
"success": true,
"nodeId": node.id,
"decision": "create",
"message": format!("Knowledge ingested successfully. Node ID: {}", node.id),
"hasEmbedding": node.has_embedding.unwrap_or(false),
}));
}
}
}
// Fallback for builds without embedding features
#[cfg(not(all(feature = "embeddings", feature = "vector-search")))]
{
let node = storage.ingest(input).map_err(|e| e.to_string())?;
Ok(serde_json::json!({
"success": true,
"nodeId": node.id,
"decision": "create",
"message": format!("Knowledge ingested successfully. Node ID: {}", node.id),
"hasEmbedding": node.has_embedding.unwrap_or(false),
}))
}
}
// ============================================================================