@mindstudio-ai/remy 0.1.301 → 0.1.303
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/headless.js +2 -10
- package/dist/index.js +2 -10
- package/dist/prompt/skills/dataSources.md +3 -3
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -7712,16 +7712,7 @@ function clearSession(state) {
|
|
|
7712
7712
|
log11.warn("Session archive on clear failed", { error: err.message });
|
|
7713
7713
|
}
|
|
7714
7714
|
state.messages = [];
|
|
7715
|
-
state
|
|
7716
|
-
try {
|
|
7717
|
-
if (fs21.existsSync(SESSION_FILE)) {
|
|
7718
|
-
fs21.unlinkSync(SESSION_FILE);
|
|
7719
|
-
}
|
|
7720
|
-
} catch (err) {
|
|
7721
|
-
log11.warn("Session clear: could not remove live file", {
|
|
7722
|
-
error: err.message
|
|
7723
|
-
});
|
|
7724
|
-
}
|
|
7715
|
+
saveSession(state);
|
|
7725
7716
|
}
|
|
7726
7717
|
|
|
7727
7718
|
// src/compaction/trigger.ts
|
|
@@ -10480,6 +10471,7 @@ var HeadlessSession = class {
|
|
|
10480
10471
|
handleClear() {
|
|
10481
10472
|
clearSession(this.state);
|
|
10482
10473
|
return {
|
|
10474
|
+
...this.state.models && { models: this.state.models },
|
|
10483
10475
|
modelSurfaces: getEffectiveModelSurfaces(),
|
|
10484
10476
|
allowedModelsByType: ALLOWED_MODELS_BY_TYPE
|
|
10485
10477
|
};
|
package/dist/index.js
CHANGED
|
@@ -2843,16 +2843,7 @@ function clearSession(state) {
|
|
|
2843
2843
|
log3.warn("Session archive on clear failed", { error: err.message });
|
|
2844
2844
|
}
|
|
2845
2845
|
state.messages = [];
|
|
2846
|
-
state
|
|
2847
|
-
try {
|
|
2848
|
-
if (fs10.existsSync(SESSION_FILE)) {
|
|
2849
|
-
fs10.unlinkSync(SESSION_FILE);
|
|
2850
|
-
}
|
|
2851
|
-
} catch (err) {
|
|
2852
|
-
log3.warn("Session clear: could not remove live file", {
|
|
2853
|
-
error: err.message
|
|
2854
|
-
});
|
|
2855
|
-
}
|
|
2846
|
+
saveSession(state);
|
|
2856
2847
|
}
|
|
2857
2848
|
var log3, SESSION_FILE, ARCHIVE_DIR, ARCHIVE_NAME_RE, archiveSortKey, ARCHIVE_COUNT_RE, archiveCountCache, archiveMsgCache, ARCHIVE_MSG_CACHE_MAX;
|
|
2858
2849
|
var init_session = __esm({
|
|
@@ -11470,6 +11461,7 @@ var init_headless = __esm({
|
|
|
11470
11461
|
handleClear() {
|
|
11471
11462
|
clearSession(this.state);
|
|
11472
11463
|
return {
|
|
11464
|
+
...this.state.models && { models: this.state.models },
|
|
11473
11465
|
modelSurfaces: getEffectiveModelSurfaces(),
|
|
11474
11466
|
allowedModelsByType: ALLOWED_MODELS_BY_TYPE
|
|
11475
11467
|
};
|
|
@@ -31,13 +31,13 @@ const { results } = await Policies.search('what are the payment terms?', { topK:
|
|
|
31
31
|
const context = results.map((r) => r.text).join('\n\n');
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Hits are `{ score, text, citation }` with `citation: { documentId, filename, pageNumber, chunkIndex, headingPath, boundingBox?, url }`, plus `retrievalRank`/`retrievalScore` — the position before reranking, so you can show what reranking did.
|
|
34
|
+
Hits are `{ score, text, citation }` with `citation: { documentId, filename, pageNumber, chunkIndex, headingPath, boundingBox?, url }`, plus `retrievalRank`/`retrievalScore` — the position before reranking, so you can show what reranking did. With reranking on (the default) `score` is the reranker's 0–1 relevance and the right place for quality cutoffs; without it the scale varies by mode (cosine / rank-fusion / keyword overlap). `scoreThreshold` floors the retrieval branch before fusion and reranking — leave it unset unless measured on the corpus.
|
|
35
35
|
|
|
36
36
|
**Always render the citation.** `citation.url` is a stable on-domain link — put it in an `<a href>` beside the answer. Retrieval is approximate; a user who can click through can judge for themselves. An answer with no citation is an assertion.
|
|
37
37
|
|
|
38
38
|
Created on first use, so searching a source the build hasn't populated returns no results rather than throwing. `search` options: `topK` (default 5, max 50), `scoreThreshold`, `filter`, `mode`, `maxPerDocument`, `highlight`, `rerank`, `hybrid`.
|
|
39
39
|
|
|
40
|
-
**Filtering** narrows a search before ranking, and every condition only narrows: `filter: { metadata: { department: 'legal', year: [2025, 2026] }, filename, documentIds, pages: { min?, max? }, contains: 'all these words', phrase: 'exact adjacent sequence' }`. Metadata is tagged at add time (scalars only, ≤16 keys); re-adding the same bytes with different metadata updates the tags in place, free. Filters are the right tool for scoping retrieval (per-user, per-category); they are NOT a substitute for a `db` query over structured data.
|
|
40
|
+
**Filtering** narrows a search before ranking, and every condition only narrows: `filter: { metadata: { department: 'legal', year: [2025, 2026], signedAt: { gte: 20250101 } }, filename, documentIds, pages: { min?, max? }, contains: 'all these words', phrase: 'exact adjacent sequence' }`. Metadata matches per key: scalar = equals, array = any-of, `{ gte?, lte? }` = numeric range — ranges are numeric only, so store dates as sortable integers at add time (YYYYMMDD or epoch seconds) to range on them. Metadata is tagged at add time (scalars only, ≤16 keys); re-adding the same bytes with different metadata updates the tags in place, free. Filters are the right tool for scoping retrieval (per-user, per-category, a date window); they are NOT a substitute for a `db` query over structured data.
|
|
41
41
|
|
|
42
42
|
**Modes**: `mode: 'hybrid'` (default) fuses semantic and keyword retrieval; `'semantic'` is the embedding alone; `'lexical'` is keyword-only with **no query embedding** — cheapest and fastest, right when the query is an identifier (an error code, a SKU, a name) rather than a meaning. `maxPerDocument: 2` stops one document monopolizing the results when the answer should draw on several. `highlight: true` adds `matches` (`{start, end}` offsets into `text`) for rendering highlighted excerpts.
|
|
43
43
|
|
|
@@ -84,7 +84,7 @@ Retrieve → join passages as context → have a model answer *from that context
|
|
|
84
84
|
| Kind | Settings | Cost |
|
|
85
85
|
|---|---|---|
|
|
86
86
|
| **Free** (ranking) | `--rerank`, `--rerank-model`, `--hybrid`, `--top-k` | none, next search |
|
|
87
|
-
| **Rebuild** (how docs become vectors) | `--max-chars`, `--min-chars`, `--drop-blocks`, `--contextual`, `--describe-images`, `--embedding-model`, `--extraction-model` | every document reprocessed |
|
|
87
|
+
| **Rebuild** (how docs become vectors) | `--max-chars`, `--min-chars`, `--drop-blocks`, `--contextual`, `--contextual-model`, `--describe-images`, `--embedding-model`, `--extraction-model` | every document reprocessed |
|
|
88
88
|
|
|
89
89
|
Images inside documents are described by a vision model and the description substituted into the searchable text (`--describe-images`, on by default) — without it a chart contributes nothing to search at all. Documents with no images cost nothing.
|
|
90
90
|
|