@teammates/recall 0.6.1 → 0.6.3
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 +23 -23
- package/dist/index.d.ts +1 -1
- package/dist/query-expansion.js +136 -15
- package/package.json +1 -1
- package/src/cli.test.ts +324 -324
- package/src/cli.ts +407 -407
- package/src/embeddings.ts +56 -56
- package/src/index.ts +11 -11
- package/src/indexer.test.ts +337 -337
- package/src/indexer.ts +260 -260
- package/src/memory-index.ts +3 -1
- package/src/query-expansion.test.ts +9 -3
- package/src/query-expansion.ts +136 -15
- package/src/search.test.ts +3 -9
- package/src/search.ts +244 -244
package/dist/cli.js
CHANGED
|
@@ -4,29 +4,29 @@ import * as fs from "node:fs/promises";
|
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { Indexer } from "./indexer.js";
|
|
6
6
|
import { search } from "./search.js";
|
|
7
|
-
const HELP = `
|
|
8
|
-
teammates-recall — Semantic memory search for teammates
|
|
9
|
-
|
|
10
|
-
Usage:
|
|
11
|
-
teammates-recall index [options] Full rebuild of all indexes
|
|
12
|
-
teammates-recall sync [options] Sync new/changed files into indexes
|
|
13
|
-
teammates-recall add <file> [options] Add a single file to a teammate's index
|
|
14
|
-
teammates-recall search <query> [options] Search teammate memories (auto-syncs)
|
|
15
|
-
teammates-recall status [options] Show index status
|
|
16
|
-
teammates-recall watch [options] Watch for changes and auto-sync
|
|
17
|
-
|
|
18
|
-
Options:
|
|
19
|
-
--dir <path> Path to .teammates directory (default: ./.teammates)
|
|
20
|
-
--teammate <name> Limit to a specific teammate
|
|
21
|
-
--results <n> Max results (default: 5)
|
|
22
|
-
--max-chunks <n> Max chunks per document (default: 3)
|
|
23
|
-
--max-tokens <n> Max tokens per section (default: 500)
|
|
24
|
-
--recency-depth <n> Number of recent weekly summaries to include (default: 2)
|
|
25
|
-
--typed-memory-boost <n> Relevance boost for typed memories (default: 1.2)
|
|
26
|
-
--model <name> Embedding model (default: Xenova/all-MiniLM-L6-v2)
|
|
27
|
-
--no-sync Skip auto-sync before search
|
|
28
|
-
--json Output as JSON
|
|
29
|
-
--help Show this help
|
|
7
|
+
const HELP = `
|
|
8
|
+
teammates-recall — Semantic memory search for teammates
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
teammates-recall index [options] Full rebuild of all indexes
|
|
12
|
+
teammates-recall sync [options] Sync new/changed files into indexes
|
|
13
|
+
teammates-recall add <file> [options] Add a single file to a teammate's index
|
|
14
|
+
teammates-recall search <query> [options] Search teammate memories (auto-syncs)
|
|
15
|
+
teammates-recall status [options] Show index status
|
|
16
|
+
teammates-recall watch [options] Watch for changes and auto-sync
|
|
17
|
+
|
|
18
|
+
Options:
|
|
19
|
+
--dir <path> Path to .teammates directory (default: ./.teammates)
|
|
20
|
+
--teammate <name> Limit to a specific teammate
|
|
21
|
+
--results <n> Max results (default: 5)
|
|
22
|
+
--max-chunks <n> Max chunks per document (default: 3)
|
|
23
|
+
--max-tokens <n> Max tokens per section (default: 500)
|
|
24
|
+
--recency-depth <n> Number of recent weekly summaries to include (default: 2)
|
|
25
|
+
--typed-memory-boost <n> Relevance boost for typed memories (default: 1.2)
|
|
26
|
+
--model <name> Embedding model (default: Xenova/all-MiniLM-L6-v2)
|
|
27
|
+
--no-sync Skip auto-sync before search
|
|
28
|
+
--json Output as JSON
|
|
29
|
+
--help Show this help
|
|
30
30
|
`.trim();
|
|
31
31
|
function parseArgs(argv) {
|
|
32
32
|
const args = {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { LocalEmbeddings } from "./embeddings.js";
|
|
|
2
2
|
export { Indexer, type IndexerConfig } from "./indexer.js";
|
|
3
3
|
export { matchMemoryCatalog, scanMemoryCatalog } from "./memory-index.js";
|
|
4
4
|
export { buildQueryVariations, extractKeywords } from "./query-expansion.js";
|
|
5
|
-
export { type MultiSearchOptions, type SearchOptions, type SearchResult,
|
|
5
|
+
export { type MultiSearchOptions, multiSearch, type SearchOptions, type SearchResult, search, } from "./search.js";
|
package/dist/query-expansion.js
CHANGED
|
@@ -6,21 +6,142 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/** Common English stopwords to filter from queries. */
|
|
8
8
|
const STOPWORDS = new Set([
|
|
9
|
-
"a",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
9
|
+
"a",
|
|
10
|
+
"an",
|
|
11
|
+
"the",
|
|
12
|
+
"and",
|
|
13
|
+
"or",
|
|
14
|
+
"but",
|
|
15
|
+
"in",
|
|
16
|
+
"on",
|
|
17
|
+
"at",
|
|
18
|
+
"to",
|
|
19
|
+
"for",
|
|
20
|
+
"of",
|
|
21
|
+
"with",
|
|
22
|
+
"by",
|
|
23
|
+
"from",
|
|
24
|
+
"is",
|
|
25
|
+
"are",
|
|
26
|
+
"was",
|
|
27
|
+
"were",
|
|
28
|
+
"be",
|
|
29
|
+
"been",
|
|
30
|
+
"being",
|
|
31
|
+
"have",
|
|
32
|
+
"has",
|
|
33
|
+
"had",
|
|
34
|
+
"do",
|
|
35
|
+
"does",
|
|
36
|
+
"did",
|
|
37
|
+
"will",
|
|
38
|
+
"would",
|
|
39
|
+
"could",
|
|
40
|
+
"should",
|
|
41
|
+
"may",
|
|
42
|
+
"might",
|
|
43
|
+
"shall",
|
|
44
|
+
"can",
|
|
45
|
+
"need",
|
|
46
|
+
"must",
|
|
47
|
+
"it",
|
|
48
|
+
"its",
|
|
49
|
+
"this",
|
|
50
|
+
"that",
|
|
51
|
+
"these",
|
|
52
|
+
"those",
|
|
53
|
+
"i",
|
|
54
|
+
"you",
|
|
55
|
+
"he",
|
|
56
|
+
"she",
|
|
57
|
+
"we",
|
|
58
|
+
"they",
|
|
59
|
+
"me",
|
|
60
|
+
"him",
|
|
61
|
+
"her",
|
|
62
|
+
"us",
|
|
63
|
+
"them",
|
|
64
|
+
"my",
|
|
65
|
+
"your",
|
|
66
|
+
"his",
|
|
67
|
+
"our",
|
|
68
|
+
"their",
|
|
69
|
+
"what",
|
|
70
|
+
"which",
|
|
71
|
+
"who",
|
|
72
|
+
"whom",
|
|
73
|
+
"where",
|
|
74
|
+
"when",
|
|
75
|
+
"how",
|
|
76
|
+
"why",
|
|
77
|
+
"if",
|
|
78
|
+
"then",
|
|
79
|
+
"so",
|
|
80
|
+
"not",
|
|
81
|
+
"no",
|
|
82
|
+
"just",
|
|
83
|
+
"also",
|
|
84
|
+
"very",
|
|
85
|
+
"too",
|
|
86
|
+
"some",
|
|
87
|
+
"any",
|
|
88
|
+
"all",
|
|
89
|
+
"each",
|
|
90
|
+
"every",
|
|
91
|
+
"both",
|
|
92
|
+
"few",
|
|
93
|
+
"more",
|
|
94
|
+
"most",
|
|
95
|
+
"other",
|
|
96
|
+
"into",
|
|
97
|
+
"over",
|
|
98
|
+
"after",
|
|
99
|
+
"before",
|
|
100
|
+
"between",
|
|
101
|
+
"through",
|
|
102
|
+
"about",
|
|
103
|
+
"up",
|
|
104
|
+
"out",
|
|
105
|
+
"off",
|
|
106
|
+
"down",
|
|
107
|
+
"here",
|
|
108
|
+
"there",
|
|
109
|
+
"again",
|
|
110
|
+
"once",
|
|
111
|
+
"let",
|
|
112
|
+
"lets",
|
|
113
|
+
"let's",
|
|
114
|
+
"get",
|
|
115
|
+
"got",
|
|
116
|
+
"go",
|
|
117
|
+
"going",
|
|
118
|
+
"make",
|
|
119
|
+
"made",
|
|
120
|
+
"take",
|
|
121
|
+
"took",
|
|
122
|
+
"come",
|
|
123
|
+
"came",
|
|
124
|
+
"see",
|
|
125
|
+
"saw",
|
|
126
|
+
"know",
|
|
127
|
+
"knew",
|
|
128
|
+
"think",
|
|
129
|
+
"thought",
|
|
130
|
+
"say",
|
|
131
|
+
"said",
|
|
132
|
+
"tell",
|
|
133
|
+
"told",
|
|
134
|
+
"ask",
|
|
135
|
+
"asked",
|
|
136
|
+
"want",
|
|
137
|
+
"wanted",
|
|
138
|
+
"like",
|
|
139
|
+
"look",
|
|
140
|
+
"use",
|
|
141
|
+
"used",
|
|
142
|
+
"find",
|
|
143
|
+
"give",
|
|
144
|
+
"work",
|
|
24
145
|
]);
|
|
25
146
|
/**
|
|
26
147
|
* Extract meaningful keywords from text by removing stopwords and short tokens.
|
package/package.json
CHANGED