@finchagentic/mcp 4.7.1 → 4.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +0 -0
- package/dist/index.js +0 -0
- package/dist/tools/memory.js +15 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/tools/memory.js
CHANGED
|
@@ -192,6 +192,15 @@ async function syncToSupermemory(content, metadata, sourceUrl) {
|
|
|
192
192
|
console.error(`[memory] sync_failed: ${errMsg} | preview: "${preview}"`);
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
+
// A real auth failure must never be reported as "0 results found" - that
|
|
196
|
+
// reads as "your account genuinely has nothing saved" when the actual
|
|
197
|
+
// problem is the token/key was rejected. Only genuinely transient errors
|
|
198
|
+
// (network hiccup, the other RRF side still succeeding) degrade silently
|
|
199
|
+
// to an empty contribution - an auth failure is rethrown so it reaches the
|
|
200
|
+
// user instead of being swallowed.
|
|
201
|
+
function isAuthFailure(err) {
|
|
202
|
+
return err instanceof Error && /Authentication required/i.test(err.message);
|
|
203
|
+
}
|
|
195
204
|
async function searchSupermemory(query, limit = 10) {
|
|
196
205
|
try {
|
|
197
206
|
const local = (0, local_memory_js_1.getLocalMemoryConfig)();
|
|
@@ -200,7 +209,9 @@ async function searchSupermemory(query, limit = 10) {
|
|
|
200
209
|
const data = await (0, convex_js_1.callConvex)("/memory/search", "POST", { q: query, n: limit }, "memory_search");
|
|
201
210
|
return data?.results ?? [];
|
|
202
211
|
}
|
|
203
|
-
catch {
|
|
212
|
+
catch (err) {
|
|
213
|
+
if (isAuthFailure(err))
|
|
214
|
+
throw err;
|
|
204
215
|
return [];
|
|
205
216
|
}
|
|
206
217
|
}
|
|
@@ -218,7 +229,9 @@ async function lexicalSearch(query, limit = 30) {
|
|
|
218
229
|
rank: typeof r.rank === "number" ? r.rank : idx,
|
|
219
230
|
}));
|
|
220
231
|
}
|
|
221
|
-
catch {
|
|
232
|
+
catch (err) {
|
|
233
|
+
if (isAuthFailure(err))
|
|
234
|
+
throw err;
|
|
222
235
|
return [];
|
|
223
236
|
}
|
|
224
237
|
}
|
package/package.json
CHANGED