@edihasaj/recall 0.9.9 → 0.9.10
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/README.md +5 -1
- package/dist/{chunk-O3E7BFYL.js → chunk-KSKGK5OA.js} +55 -3
- package/dist/{chunk-O3E7BFYL.js.map → chunk-KSKGK5OA.js.map} +1 -1
- package/dist/{chunk-PFQSIYBM.js → chunk-SLED34YJ.js} +2 -2
- package/dist/{chunk-PI6SYBQR.js → chunk-UBKOTF3V.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/daemon.js +3 -3
- package/dist/mcp.js +2 -2
- package/package.json +8 -7
- /package/dist/{chunk-PFQSIYBM.js.map → chunk-SLED34YJ.js.map} +0 -0
- /package/dist/{chunk-PI6SYBQR.js.map → chunk-UBKOTF3V.js.map} +0 -0
package/README.md
CHANGED
|
@@ -97,10 +97,14 @@ Installs the `@edihasaj/recall` CLI via npm, downloads the system-tray companion
|
|
|
97
97
|
Download `Recall.app.zip` from [the latest release](https://github.com/edihasaj/recall/releases/latest), unzip it, move `Recall.app` into `/Applications`, then run setup:
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
|
+
open /Applications/Recall.app # click Install + Start once
|
|
100
101
|
recall setup --yes
|
|
101
102
|
recall doctor
|
|
102
103
|
```
|
|
103
104
|
|
|
105
|
+
Install + Start exposes the bundled Node 22 CLI at `~/.local/bin/recall`. The
|
|
106
|
+
Homebrew cask links the same bundled launcher automatically.
|
|
107
|
+
|
|
104
108
|
### Source
|
|
105
109
|
|
|
106
110
|
```bash
|
|
@@ -146,7 +150,7 @@ recall setup --scope project --yes # add project-scoped hooks to the curre
|
|
|
146
150
|
recall setup --uninstall-hooks --yes # remove Recall-managed hooks
|
|
147
151
|
```
|
|
148
152
|
|
|
149
|
-
By default the hooks inject repo memory
|
|
153
|
+
By default the hooks inject a compact repo memory pack at `SessionStart` and relevance-scored matches on each `UserPromptSubmit`. To opt out of prompt-time injection or wire provider credentials so the daemon can run memory maintenance on a schedule, see [docs/configuration.md](docs/configuration.md).
|
|
150
154
|
|
|
151
155
|
Supported runtimes, and how deep the integration goes:
|
|
152
156
|
|
|
@@ -4877,14 +4877,66 @@ var QUERY_TEXT_MATCH_FLOOR = 0.45;
|
|
|
4877
4877
|
var HISTORY_VECTOR_RELEVANCE_FLOOR = 0.7;
|
|
4878
4878
|
var HISTORY_LEXICAL_RELEVANCE_FLOOR = 0.01;
|
|
4879
4879
|
var CONFIDENCE_EPSILON = 1e-9;
|
|
4880
|
+
var MAX_RETRIEVAL_QUERY_LENGTH = 1200;
|
|
4881
|
+
var MAX_LEADING_INTENT_LENGTH = 400;
|
|
4882
|
+
var LEADING_INTENT_STOP_WORDS = /* @__PURE__ */ new Set([
|
|
4883
|
+
"a",
|
|
4884
|
+
"an",
|
|
4885
|
+
"can",
|
|
4886
|
+
"could",
|
|
4887
|
+
"do",
|
|
4888
|
+
"for",
|
|
4889
|
+
"here",
|
|
4890
|
+
"in",
|
|
4891
|
+
"let",
|
|
4892
|
+
"lets",
|
|
4893
|
+
"let's",
|
|
4894
|
+
"me",
|
|
4895
|
+
"need",
|
|
4896
|
+
"now",
|
|
4897
|
+
"of",
|
|
4898
|
+
"on",
|
|
4899
|
+
"please",
|
|
4900
|
+
"that",
|
|
4901
|
+
"the",
|
|
4902
|
+
"these",
|
|
4903
|
+
"this",
|
|
4904
|
+
"those",
|
|
4905
|
+
"to",
|
|
4906
|
+
"us",
|
|
4907
|
+
"want",
|
|
4908
|
+
"we",
|
|
4909
|
+
"with",
|
|
4910
|
+
"would",
|
|
4911
|
+
"you"
|
|
4912
|
+
]);
|
|
4913
|
+
function extractLeadingIntent(line) {
|
|
4914
|
+
const withoutReferences = line.replace(/https?:\/\/\S+/gi, " ").replace(/\b[A-Z][A-Z0-9]+-\d+\b/g, " ");
|
|
4915
|
+
const tokens = withoutReferences.match(/[A-Za-z0-9][A-Za-z0-9'_-]*/g) ?? [];
|
|
4916
|
+
const focused = tokens.filter((token) => !LEADING_INTENT_STOP_WORDS.has(token.toLowerCase()) && !/^\d+$/.test(token));
|
|
4917
|
+
return focused.join(" ").trim() || withoutReferences.trim() || line.trim();
|
|
4918
|
+
}
|
|
4880
4919
|
function normalizeQueryForRetrieval(text) {
|
|
4881
4920
|
if (!text) return "";
|
|
4882
|
-
let out = text;
|
|
4921
|
+
let out = text.replace(/\r\n?/g, "\n");
|
|
4922
|
+
const wrappedUserPrompt = out.match(
|
|
4923
|
+
/<user-prompt\b[^>]*>\s*([\s\S]*?)\s*<\/user-prompt>/i
|
|
4924
|
+
)?.[1];
|
|
4925
|
+
if (wrappedUserPrompt?.trim()) out = wrappedUserPrompt;
|
|
4883
4926
|
out = out.replace(/<\/?(?:task-[a-z-]+|system-[a-z-]+|command-[a-z-]+|local-command-[a-z-]+|user-prompt-[a-z-]+|tool-[a-z-]+)\b[^>]*>/gi, " ");
|
|
4884
4927
|
out = out.replace(/\[Image:[^\]]*\]/gi, " ");
|
|
4885
4928
|
out = out.replace(/\bTool (?:loaded|result|use|call)\b[:.]?/gi, " ");
|
|
4929
|
+
out = out.trim();
|
|
4930
|
+
if (out.length > MAX_RETRIEVAL_QUERY_LENGTH) {
|
|
4931
|
+
const leadingLine = out.split("\n").map((line) => line.trim()).find(Boolean);
|
|
4932
|
+
if (leadingLine && leadingLine.length <= MAX_LEADING_INTENT_LENGTH) {
|
|
4933
|
+
out = extractLeadingIntent(leadingLine);
|
|
4934
|
+
}
|
|
4935
|
+
}
|
|
4886
4936
|
out = out.replace(/\s+/g, " ").trim();
|
|
4887
|
-
if (out.length >
|
|
4937
|
+
if (out.length > MAX_RETRIEVAL_QUERY_LENGTH) {
|
|
4938
|
+
out = out.slice(0, MAX_RETRIEVAL_QUERY_LENGTH);
|
|
4939
|
+
}
|
|
4888
4940
|
return out;
|
|
4889
4941
|
}
|
|
4890
4942
|
function compileContext(db, req) {
|
|
@@ -6550,4 +6602,4 @@ export {
|
|
|
6550
6602
|
pruneMemories,
|
|
6551
6603
|
formatPruneReport
|
|
6552
6604
|
};
|
|
6553
|
-
//# sourceMappingURL=chunk-
|
|
6605
|
+
//# sourceMappingURL=chunk-KSKGK5OA.js.map
|