@avantf/dsh-mem 0.4.2 → 0.6.1
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 +19 -1
- package/lib/client.js +39 -9
- package/lib/engine/mem/config/config_files.d.ts +1 -1
- package/lib/engine/mem/db/dao/chunks.d.ts +80 -5
- package/lib/engine/mem/db/dao/entities.d.ts +35 -11
- package/lib/engine/mem/db/dao/fact_sources.d.ts +53 -0
- package/lib/engine/mem/db/dao/facts.d.ts +115 -12
- package/lib/engine/mem/db/dao/shared.d.ts +153 -0
- package/lib/engine/mem/db/invariants.d.ts +26 -0
- package/lib/engine/mem/db/tokenizer.d.ts +23 -0
- package/lib/engine/mem/db/vectors.d.ts +32 -6
- package/lib/engine/mem/entities/extract.d.ts +1 -1
- package/lib/engine/mem/eval/derive.d.ts +120 -0
- package/lib/engine/mem/eval/derived_runner.d.ts +88 -0
- package/lib/engine/mem/eval/index.d.ts +4 -0
- package/lib/engine/mem/eval/metrics.d.ts +24 -0
- package/lib/engine/mem/eval/runner.d.ts +8 -1
- package/lib/engine/mem/index.d.ts +2 -1
- package/lib/engine/mem/modelBootstrap.d.ts +2 -2
- package/lib/engine/mem/runtime.d.ts +3 -3
- package/lib/engine/mem/store/common.d.ts +18 -6
- package/lib/engine/mem/store/entity_leg.d.ts +95 -0
- package/lib/engine/mem/store/entity_sweep.d.ts +121 -0
- package/lib/engine/mem/store/floors.d.ts +51 -31
- package/lib/engine/mem/store/hybrid.d.ts +71 -26
- package/lib/engine/mem/store/knowledge.d.ts +134 -21
- package/lib/engine/mem/store/legs.d.ts +171 -0
- package/lib/engine/mem/store/lexical.d.ts +52 -0
- package/lib/engine/mem/store/memory.d.ts +177 -92
- package/lib/engine/mem/store/secret_guard.d.ts +34 -0
- package/lib/engine/mem/store/time_window.d.ts +74 -0
- package/lib/engine/mem/store/vector_repair.d.ts +248 -0
- package/lib/engine/mem-contract/config.d.ts +8 -16
- package/lib/engine/mem-contract/family.d.ts +1 -1
- package/lib/engine/mem-contract/tools.d.ts +14 -0
- package/lib/engine/mem-contract/types.d.ts +151 -15
- package/lib/engine/mem-retrieval/adapters/local_bge.d.ts +37 -7
- package/lib/engine/mem-retrieval/fusion.d.ts +14 -1
- package/lib/engine/mem-retrieval/index.d.ts +1 -3
- package/lib/engine/mem-retrieval/interfaces.d.ts +38 -14
- package/lib/engine/mem-retrieval/registry.d.ts +2 -4
- package/lib/engine/mem-retrieval/representation.d.ts +50 -0
- package/lib/engine/mem-retrieval/stats.d.ts +1 -3
- package/lib/index.js +3008 -1008
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/prompt.d.ts +7 -0
- package/lib/types/prompt.d.ts.map +1 -1
- package/lib/types/remote.d.ts +12 -6
- package/lib/types/remote.d.ts.map +1 -1
- package/lib/types/vectorMigration.d.ts +22 -18
- package/lib/types/vectorMigration.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAwGA,wDAAwD;AACxD,UAAU,aAAa;IACrB,KAAK,EAAE;QACL,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;QAChD,QAAQ,CACN,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,MAAM,CAAA;SAAE,EACzE,SAAS,EAAE,MAAM,OAAO,GACvB,IAAI,CAAA;KACR,CAAA;IACD,MAAM,EAAE;QACN,wEAAwE;QACxE,MAAM,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;KAC5D,CAAA;IACD;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAC3B;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAwGA,wDAAwD;AACxD,UAAU,aAAa;IACrB,KAAK,EAAE;QACL,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;QAChD,QAAQ,CACN,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,MAAM,CAAA;SAAE,EACzE,SAAS,EAAE,MAAM,OAAO,GACvB,IAAI,CAAA;KACR,CAAA;IACD,MAAM,EAAE;QACN,wEAAwE;QACxE,MAAM,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;KAC5D,CAAA;IACD;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAC3B;AA8kDD,2DAA2D;AAC3D,eAAO,MAAM,IAAI,sBAAsB,CAAA;AAEvC;;;;GAIG;AACH,eAAO,MAAM,MAAM,UAAsB,CAAA;AAEzC,mGAAmG;AACnG,wBAAsB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC7D"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { type BrowseListing, type OpenOutcome, type RecallResult, type RemoteEnv
|
|
|
21
21
|
export declare const name = "avantf-mem";
|
|
22
22
|
export { inject } from './inject.js';
|
|
23
23
|
export { KNOWLEDGE_PROMPT_SECTION, MEMORY_PROMPT_SECTION } from './prompt.js';
|
|
24
|
-
export { registerSemanticBackend,
|
|
24
|
+
export { registerSemanticBackend, registerVectorStore, type SemanticBackend, type VectorStore, } from '../engine/mem/index.js';
|
|
25
25
|
export interface Config {
|
|
26
26
|
mode?: 'cordis' | 'mcp';
|
|
27
27
|
dataHome?: string;
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAQlD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,OAAO,EAAE,mBAAmB,EAAU,MAAM,kCAAkC,CAAA;AAE9E,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,WAAW,EAEhB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAeL,KAAK,aAAa,EAClB,KAAK,WAAW,EAEhB,KAAK,YAAY,EACjB,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EAG1B,MAAM,sBAAsB,CAAA;AAqB7B,eAAO,MAAM,IAAI,eAAe,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAQ7E,OAAO,EACL,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAQlD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,OAAO,EAAE,mBAAmB,EAAU,MAAM,kCAAkC,CAAA;AAE9E,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,WAAW,EAEhB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAeL,KAAK,aAAa,EAClB,KAAK,WAAW,EAEhB,KAAK,YAAY,EACjB,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EAG1B,MAAM,sBAAsB,CAAA;AAqB7B,eAAO,MAAM,IAAI,eAAe,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAQ7E,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AACD,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAO3B,CAAA;AA6CF,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAOvC;;;;;;;;;;GAUG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB;IACvD,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAe;gBACtB,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa;IAK3C;;;;;;;;;OASG;YACW,IAAI;IAclB;;;;OAIG;IAEH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;IAMlF,MAAM,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAMnF,KAAK,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAKhF;;;;;OAKG;IAEH,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAOpD,KAAK,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAI5D;;;;OAIG;IAEG,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC;IAUnF,qFAAqF;IAE/E,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAUvE;;;;OAIG;IAEG,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC;IAQvG;;;;OAIG;IAEG,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC;IAUpG;;;;;OAKG;IAEG,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CAiBpE;AAiID,wBAAsB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwYvE"}
|
package/lib/types/prompt.d.ts
CHANGED
|
@@ -36,6 +36,13 @@ import type { LoadedPromptText, PromptFileSpec } from '@avantf/dsh-plugin-base';
|
|
|
36
36
|
* lives here, in DESIGN §10 and in the CHANGELOG — not in the prompt, where it costs tokens on
|
|
37
37
|
* every step and does not change the action.
|
|
38
38
|
*
|
|
39
|
+
* P-04 added three behavioural clauses to the MEMORY section: remembered text is a record of the
|
|
40
|
+
* past and never an instruction for the current task; a verified-stale fact is corrected with
|
|
41
|
+
* `update` plus the verification basis; and `recall` output is not written straight back as a new
|
|
42
|
+
* fact. Because the FILE version wins over this built-in fallback, users who already customised
|
|
43
|
+
* `mem-memory-usage.md` do NOT get them automatically — the upgrade note in
|
|
44
|
+
* `docs/PENDING-RELEASE-NOTES.md` carries the pasteable text for exactly that case.
|
|
45
|
+
*
|
|
39
46
|
* Kept in its own module — not in `index.ts` — so the text can be read and checked without the
|
|
40
47
|
* plugin entry's `@deepseek-ai/*` runtime imports, which resolve only in a harness workspace.
|
|
41
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE/E
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,qBAAqB;;;;CAYA,CAAA;AAElC;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;CAOH,CAAA;AAElC;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;;;CAMD,CAAA;AAElC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAErC,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,kGAAkG;IAClG,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAC5D;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,eAAe,EAIlD,CAAA;AAED,qGAAqG;AACrG,wBAAgB,eAAe,IAAI,cAAc,EAAE,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,aAAa,EAAE,CAOxF;AAED,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAKrC;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,EAAE,CAmB/E"}
|
package/lib/types/remote.d.ts
CHANGED
|
@@ -24,11 +24,13 @@ export declare const clientContribution: TypertRemoteContribution;
|
|
|
24
24
|
* guarantee, stamped in the one place every method already goes through (`wireOk`/`wireErr`).
|
|
25
25
|
*
|
|
26
26
|
* BUMP RULE. Bump on every added/removed `@Remote` method — the number tracks the SET of methods the
|
|
27
|
-
* face publishes
|
|
28
|
-
*
|
|
29
|
-
* the
|
|
30
|
-
*
|
|
31
|
-
* `
|
|
27
|
+
* face publishes. Do NOT bump for a new optional FIELD: a `.default(...)`-carrying schema (and the
|
|
28
|
+
* `acceptsUndefined` parameters) already absorb that across the gap. DO bump for a REMOVED payload
|
|
29
|
+
* field that the other half dereferences — nothing absorbs a removal, and an old client still reading
|
|
30
|
+
* it would render garbage (see revision 2). When you add a method, also declare
|
|
31
|
+
* `export const <NAME>_WIRE_VERSION = <new value>` beside this constant and gate the client call on it
|
|
32
|
+
* (`client/wire.ts` `hostSupports` / `staleHostText`), exactly as mission's
|
|
33
|
+
* `EXECUTOR_LOOKUP_WIRE_VERSION` does.
|
|
32
34
|
*
|
|
33
35
|
* ABSENT MEANS OLD. An old host sends no `wire` at all; the client must treat that as "older than the
|
|
34
36
|
* marker", never as a decode failure — the answer is still readable.
|
|
@@ -38,8 +40,12 @@ export declare const clientContribution: TypertRemoteContribution;
|
|
|
38
40
|
* (remember / recall / admin / kb / query + openDoc / classifySource / browseDir / kbDomains /
|
|
39
41
|
* kbAddDomain), all of which predate the marker — so nothing is gated on revision 1; the mechanism
|
|
40
42
|
* exists for the NEXT method.
|
|
43
|
+
* - 2: the rerank capability was removed (0.5.0). This changed NO `@Remote` method, but it removed the
|
|
44
|
+
* `rerank_used` / `rerank_fallback` / `rerank_truncated` fields from the retrieval-health payload
|
|
45
|
+
* that `admin.stats` answers — fields the client half dereferenced. A rebuilt client talking to an
|
|
46
|
+
* old host (or the reverse) therefore has to be reported as skew, not silently render `NaN`.
|
|
41
47
|
*/
|
|
42
|
-
export declare const WIRE_VERSION =
|
|
48
|
+
export declare const WIRE_VERSION = 2;
|
|
43
49
|
/**
|
|
44
50
|
* The successful application envelope, with the wire revision stamped on.
|
|
45
51
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/remote.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,oBAAoB,EAGpB,wBAAwB,EACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAGhF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AA6E/D,eAAO,MAAM,WAAW,EAAE,SAAS,oBAAoB,
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/remote.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,oBAAoB,EAGpB,wBAAwB,EACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAGhF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AA6E/D,eAAO,MAAM,WAAW,EAAE,SAAS,oBAAoB,EA4HtD,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,wBAGhC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,YAAY,IAAI,CAAA;AAE7B;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,SAAS,CAEnE;AA8BD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBA0C9B,CAAA"}
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The plugin's
|
|
3
|
-
* current embedding space.
|
|
2
|
+
* The plugin's lifecycle for the bounded, resumable background migration of persisted vectors into
|
|
3
|
+
* the current embedding space.
|
|
4
4
|
*
|
|
5
|
-
* Changing the embedding space (default model, width, pooling, normalization
|
|
6
|
-
* not a config tweak: every persisted vector still decodes, but in another
|
|
7
|
-
* the semantic leg must not serve it. Measured on the real library after the
|
|
8
|
-
* swap, 78 of 80 ACTIVE facts fell out of the semantic leg and retrieval
|
|
9
|
-
* with no error anywhere — the
|
|
10
|
-
* repairs it without the operator having to know `vectors --fix` exists.
|
|
5
|
+
* Changing the embedding space (default model, width, pooling, normalization, input window, weights)
|
|
6
|
+
* is a DATA MIGRATION, not a config tweak: every persisted vector still decodes, but in another
|
|
7
|
+
* model's coordinates, so the semantic leg must not serve it. Measured on the real library after the
|
|
8
|
+
* 512→768 default-model swap, 78 of 80 ACTIVE facts fell out of the semantic leg and retrieval
|
|
9
|
+
* degraded to lexical+entity with no error anywhere — the stores' open-time warning now says so, and
|
|
10
|
+
* this module is what repairs it without the operator having to know `vectors --fix` exists.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* batch
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* (`shouldStop` = plugin disposed or runtime closed).
|
|
12
|
+
* The FLOW lives in the engine, once, for both stores (`@avantf/mem`'s `store/vector_repair.ts`:
|
|
13
|
+
* batch size, event-loop yield, stop / resume / no-progress rules, the `semantic.auto_migrate`
|
|
14
|
+
* decision and the four store-named log kinds). It is driven for BOTH stores — memory and knowledge
|
|
15
|
+
* — in one pass, because one embedding space is configured for the whole runtime: the knowledge
|
|
16
|
+
* store used to be left behind, silently, with only a manual `kb_reindex` able to fix it.
|
|
18
17
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* This module owns only the process LIFECYCLE: one start, one stop, and "never an unhandled
|
|
19
|
+
* rejection". It sits BEHIND the startup gate (`awaitStartupGate`, see index.ts): the model warm and
|
|
20
|
+
* this first batch must not land in the boot window (DESIGN §20.14).
|
|
21
|
+
*
|
|
22
|
+
* Deliberately no state: what still needs migrating is derived from the databases on every pass —
|
|
23
|
+
* and the adapters are created ONCE so the shared flow's once-per-process `auto_migrate` warning is
|
|
24
|
+
* genuinely once per process, not once per heartbeat.
|
|
21
25
|
*/
|
|
22
26
|
import { type AvantfRuntime } from '../engine/mem/index.js';
|
|
23
27
|
import type { AvantfLogger } from '../engine/mem-contract/index.js';
|
|
24
28
|
export interface VectorMigrationHandle {
|
|
25
29
|
/**
|
|
26
|
-
* Run one migration pass. Quiet no-op when
|
|
30
|
+
* Run one migration pass. Quiet no-op when both stores are already current, when a pass is already
|
|
27
31
|
* running, or after {@link stop}. Failures never escape: they are logged and left for the next
|
|
28
32
|
* heartbeat to retry.
|
|
29
33
|
*/
|
|
@@ -38,7 +42,7 @@ export declare function createVectorMigration(opts: {
|
|
|
38
42
|
logger: AvantfLogger;
|
|
39
43
|
/** False once the plugin's fiber is disposed (profile reload / unload). */
|
|
40
44
|
isActive: () => boolean;
|
|
41
|
-
/** Rows per batch; the
|
|
45
|
+
/** Rows per batch; the engine's `DEFAULT_VECTOR_MIGRATION_BATCH` when omitted. */
|
|
42
46
|
batchSize?: number;
|
|
43
47
|
}): VectorMigrationHandle;
|
|
44
48
|
//# sourceMappingURL=vectorMigration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectorMigration.d.ts","sourceRoot":"","sources":["../../src/vectorMigration.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vectorMigration.d.ts","sourceRoot":"","sources":["../../src/vectorMigration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAAA;IACb,wFAAwF;IACxF,IAAI,IAAI,IAAI,CAAA;IACZ,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,EAAE,EAAE,aAAa,CAAA;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,OAAO,CAAA;IACvB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,qBAAqB,CAiCxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avantf/dsh-mem",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "avantf-mem DSH native Cordis plugin: host service + tools + RPC + client tabs 记忆/知识",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@avantf/dsh-plugin-base": ">=0.3.0 <1.0.0",
|
|
81
|
-
"@avantf/mem": "0.
|
|
82
|
-
"@avantf/mem-contract": "0.
|
|
83
|
-
"@avantf/mem-convert": "0.
|
|
84
|
-
"@avantf/mem-provision": "0.
|
|
81
|
+
"@avantf/mem": "0.6.1",
|
|
82
|
+
"@avantf/mem-contract": "0.6.1",
|
|
83
|
+
"@avantf/mem-convert": "0.6.1",
|
|
84
|
+
"@avantf/mem-provision": "0.6.1",
|
|
85
85
|
"@types/node": "^22.0.0",
|
|
86
86
|
"@types/react": "^18.3.0",
|
|
87
87
|
"lightningcss": "^1.32.0",
|