@avantf/dsh-mem 0.1.0 → 0.2.0

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.
Files changed (40) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +97 -87
  3. package/lib/client.js +2351 -1170
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +1063 -639
  6. package/lib/interface-version.json +4 -0
  7. package/lib/types/client/index.d.ts.map +1 -1
  8. package/lib/types/client/index.js +21 -1
  9. package/lib/types/client/index.js.map +1 -1
  10. package/lib/types/data_home.d.ts +3 -0
  11. package/lib/types/data_home.d.ts.map +1 -0
  12. package/lib/types/data_home.js +26 -0
  13. package/lib/types/data_home.js.map +1 -0
  14. package/lib/types/envinit-bootstrap.d.ts +13 -3
  15. package/lib/types/envinit-bootstrap.js +14 -4
  16. package/lib/types/envinit.d.ts +11 -6
  17. package/lib/types/envinit.d.ts.map +1 -1
  18. package/lib/types/envinit.js +62 -155
  19. package/lib/types/envinit.js.map +1 -1
  20. package/lib/types/index.d.ts +33 -11
  21. package/lib/types/index.d.ts.map +1 -1
  22. package/lib/types/index.js +86 -39
  23. package/lib/types/index.js.map +1 -1
  24. package/lib/types/interface_gate.d.ts +51 -0
  25. package/lib/types/interface_gate.d.ts.map +1 -0
  26. package/lib/types/interface_gate.js +84 -0
  27. package/lib/types/interface_gate.js.map +1 -0
  28. package/lib/types/prompt.d.ts +74 -4
  29. package/lib/types/prompt.d.ts.map +1 -1
  30. package/lib/types/prompt.js +85 -2
  31. package/lib/types/prompt.js.map +1 -1
  32. package/lib/types/provision.d.ts +29 -24
  33. package/lib/types/provision.d.ts.map +1 -1
  34. package/lib/types/provision.js +3 -59
  35. package/lib/types/provision.js.map +1 -1
  36. package/lib/types/remote.d.ts +7 -3
  37. package/lib/types/remote.d.ts.map +1 -1
  38. package/lib/types/remote.js +14 -4
  39. package/lib/types/remote.js.map +1 -1
  40. package/package.json +17 -22
@@ -1,5 +1,16 @@
1
+ import { RETENTION_VOCABULARY } from '@avantf/mem-contract';
1
2
  /**
2
- * The two system-prompt sections this plugin contributes (DESIGN §10).
3
+ * The three system-prompt sections this plugin contributes (DESIGN §10).
4
+ *
5
+ * The TEXTS are user-editable: each section's body lives in its own `.md` under the shared family
6
+ * prompt directory `<data_home>/prompts` (`PROMPT_FILES` maps file → section), and the constants
7
+ * below are both the built-in default and what a missing/blank file is filled with. The identity —
8
+ * section name and order — stays in code, so editing a file cannot silently move a section in the
9
+ * prompt. The loader itself is generic and lives in the family base (`PromptFiles`, exported by
10
+ * `@avantf/dsh-plugin-base`), because "ensure the file exists, otherwise use the default" is the same
11
+ * flow for every section — and taking it from the base at RUNTIME means fixing it takes one base
12
+ * release, not a plugin rebuild. When the base is unavailable the built-in defaults below are used
13
+ * and nothing is written to disk.
3
14
  *
4
15
  * They exist for something a tool description cannot carry: a description says what a call DOES,
5
16
  * never when to reach for it unprompted, and the default behaviour is to wait until asked. So each
@@ -44,7 +55,7 @@ export const KNOWLEDGE_PROMPT_SECTION = {
44
55
  order: 3010,
45
56
  text: '知识库(`kb_query` / `kb_add`)存放**用户提供的成篇资料**:文档、长说明、规范、综述等要按原文查阅的内容。'
46
57
  + '回答涉及已入库资料的问题之前,先用 `kb_query` 检索;命中就按 `source_ref` 引用原文。'
47
- + '用户给了值得长期留存的成篇内容就主动 `kb_add` 入库;一句话的事实属于记忆(`mem_remember`),不要入知识库。'
58
+ + '用户给了值得长期留存的成篇内容就主动 `kb_add` 入库;一句话的事实属于记忆(`mem_remember`),不要入知识库。',
48
59
  };
49
60
  /**
50
61
  * HOW to change a document that is already in the library.
@@ -62,4 +73,76 @@ export const KB_EDIT_PROMPT_SECTION = {
62
73
  text: '更新知识库时,要在原文上修改或追加,不要新建一个补充文档。用 `kb_list` 拿到受管 `.md` 的绝对路径,'
63
74
  + '用文件工具修改。在用户明确要求时使用 `kb_remove` 删除。',
64
75
  };
76
+ /**
77
+ * Where each section's text comes from: one `.md` per section, inside the SHARED family prompt
78
+ * directory (`<data_home>/prompts`, see {@link PromptFiles}).
79
+ *
80
+ * Every avantf plugin writes its prompts into that one directory and owns a prefix — `mem-*` here,
81
+ * `work-*` in the work engine — so a deployment can find and diff all of its model-facing text in
82
+ * one place without any plugin having to guess which files belong to it. This manifest is that
83
+ * ownership: a `.md` it does not list is ignored (never read, never written, never deleted).
84
+ *
85
+ * The FILE owns the text; the CODE keeps the identity. Mapping a file name to a section HERE is what
86
+ * makes that true: no edit to the directory can move a section to a different point in the prompt
87
+ * (order) or change the name the harness dedupes on — and no file another plugin owns can be
88
+ * mistaken for one of these.
89
+ *
90
+ * `fallback` is taken from the constant above rather than retyped, so "the text that used to be
91
+ * hardcoded" and "the text a missing file is filled with" cannot drift apart.
92
+ */
93
+ export const PROMPT_FILES = [
94
+ { file: 'mem-memory-usage.md', section: MEMORY_PROMPT_SECTION },
95
+ { file: 'mem-knowledge-usage.md', section: KNOWLEDGE_PROMPT_SECTION },
96
+ { file: 'mem-kb-edit.md', section: KB_EDIT_PROMPT_SECTION },
97
+ ];
98
+ /** The generic loader's input: which file, and the body to write/use when it is missing or blank. */
99
+ export function promptFileSpecs() {
100
+ return PROMPT_FILES.map(({ file, section }) => ({ file, fallback: section.text }));
101
+ }
102
+ /**
103
+ * Zip the loaded texts back onto their sections, in manifest order.
104
+ *
105
+ * A section whose text is missing from `loaded` (the caller loaded a partial manifest) keeps its
106
+ * built-in default rather than losing its prompt entirely.
107
+ */
108
+ export function buildPromptSections(loaded) {
109
+ const textByFile = new Map(loaded.map((entry) => [entry.file, entry.text]));
110
+ return PROMPT_FILES.map(({ file, section }) => ({
111
+ name: section.name,
112
+ order: section.order,
113
+ text: textByFile.get(file) ?? section.text,
114
+ }));
115
+ }
116
+ /** The budget the built-in defaults are held to (`prompt_section.spec.ts` asserts it). */
117
+ export const PROMPT_TEXT_BUDGET = 400;
118
+ /** Explanatory phrasings the defaults are forbidden to contain; the spec guards the same shapes. */
119
+ const WHY_WORDS = ['因为', '否则', '原因是', '之所以'];
120
+ /**
121
+ * What is worth saying about text the USER wrote — as warnings, never as edits.
122
+ *
123
+ * The defaults are held to hard rules by `prompt_section.spec.ts`: under the budget (they are
124
+ * rendered into every model step), no retention vocabulary, no explanatory "why". An edited file
125
+ * cannot be held to them — it is the user's prompt — but all three are MEASURED regressions rather
126
+ * than style, so a line in the log is cheap and a silently worse prompt is not. Nothing is
127
+ * truncated and nothing is refused: the file is injected exactly as written.
128
+ */
129
+ export function promptTextWarnings(sections) {
130
+ const out = [];
131
+ for (const section of sections) {
132
+ const text = typeof section.text === 'string' ? section.text : '';
133
+ if (text.length >= PROMPT_TEXT_BUDGET) {
134
+ out.push(`${section.name} is ${String(text.length)} chars (every model step carries it; the built-in default is under ${String(PROMPT_TEXT_BUDGET)})`);
135
+ }
136
+ for (const word of RETENTION_VOCABULARY) {
137
+ if (text.includes(word)) {
138
+ out.push(`${section.name} describes retention ("${word}"), which invites rewriting a fact to refresh it`);
139
+ }
140
+ }
141
+ for (const word of WHY_WORDS) {
142
+ if (text.includes(word))
143
+ out.push(`${section.name} explains why ("${word}"); the defaults state actions only`);
144
+ }
145
+ }
146
+ return out;
147
+ }
65
148
  //# sourceMappingURL=prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/prompt.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAkB;IAClD,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,IAAI;IACX,IAAI,EACF,kDAAkD;UAChD,iDAAiD;UACjD,uCAAuC;CAC5C,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAkB;IACrD,IAAI,EAAE,wBAAwB;IAC9B,KAAK,EAAE,IAAI;IACX,IAAI,EACF,mEAAmE;UACjE,yDAAyD;UACzD,mEAAmE;CACxE,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,CAA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AAI,IAAI,oBAAoB,EAAE,CAAC;YACxC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,0BAA0B,IAAI,kDAAkD,CAAC,CAAA;YAC3G,CAAC;QACH,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;YAC7B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,mBAAmB,IAAI,qCAAqC,CAAC,CAAA;QAChH,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -1,15 +1,34 @@
1
- import type { CompatContext, CompatEvidence, CompatLogger, CompatSpec, CompatVerdict, ServiceContract } from '@avantf/dsh-compat';
2
- export type { CompatEvidence, CompatVerdict };
3
- /** The base package, typed but never imported (see the module note). */
4
- export type CompatModule = typeof import('@avantf/dsh-compat');
5
- /** The base package id, named here too so the item declaration and the spec need no import. */
6
- export declare const COMPAT_PACKAGE = "@avantf/dsh-compat";
7
1
  /**
8
- * Fallback range for `@avantf/dsh-compat`, used only when `package.json` has lost the dependency
9
- * entry. The manifest is the single source of truth (`compatRange()`); `scripts/pack-plugin.mjs`
10
- * pins this constant to it so the two cannot drift.
2
+ * This plugin's compatibility spec, and the wiring that runs it.
3
+ *
4
+ * The rules, the probes, the report and the post-registration check all live in the family base
5
+ * `@avantf/dsh-plugin-base` — its `compat` module, which used to be the separate
6
+ * `@avantf/dsh-compat` package, shipped in the one base release. What stays here is only what is true
7
+ * of THIS plugin: the services and methods it calls, the dsh packages that identify the host, the
8
+ * wire schema names and tool names that must be visible afterwards, the events it listens to, and the
9
+ * Chinese report a user reads. See `DESIGN.md` §12.1.
10
+ *
11
+ * **Who obtains the base.** Not this module. The base IS the framework the inlined bootstrap resolves
12
+ * and loads at startup (`src/envinit.ts`), and the compatibility gate arrives WITH it: there is no
13
+ * `mem:compat` manifest item, no npm download and no managed `<home>/compat/**` copy any more. This
14
+ * module is handed the loaded module and derives everything from it.
15
+ *
16
+ * The base therefore has NO import path of its own here — not even a dynamic one. A static `import`
17
+ * would throw `ERR_MODULE_NOT_FOUND` while the artifact was being evaluated (the base is a PEER, not
18
+ * a runtime dependency of the published plugin), and a bare dynamic `import()` would bypass the module
19
+ * the bootstrap already resolved. The plugin only ever sees the module object it was handed.
20
+ *
21
+ * The plugin computes the gate's verdict here and hands it to the engine as plain data
22
+ * (`{ load, status, reason }`), so the inlined engine bundle never imports the base either.
23
+ *
24
+ * @module @avantf/dsh-mem/provision
11
25
  */
12
- export declare const COMPAT_RANGE = "^0.1.0";
26
+ import type { CompatContext, CompatEvidence, CompatLogger, CompatSpec, CompatVerdict, ServiceContract } from '@avantf/dsh-plugin-base';
27
+ export type { CompatEvidence, CompatVerdict };
28
+ /** The base package, typed but never imported (see the module note). */
29
+ export type CompatModule = typeof import('@avantf/dsh-plugin-base');
30
+ /** The base package id, named here so the gate's messages need no import of it. */
31
+ export declare const COMPAT_PACKAGE = "@avantf/dsh-plugin-base";
13
32
  /**
14
33
  * The services this plugin calls, with the methods it calls on them.
15
34
  *
@@ -52,20 +71,6 @@ export interface CompatRun {
52
71
  export declare function reasonOf(error: unknown): string;
53
72
  /** Emit a warning without ever letting the logger turn it into a crash. */
54
73
  export declare function warn(log: CompatLogger | undefined, message: string): void;
55
- /**
56
- * The range of `@avantf/dsh-compat` this build is written against.
57
- *
58
- * Read from THIS plugin's manifest, which is the single source of truth — the framework does not
59
- * pick it, and a hardcoded constant would silently keep provisioning an old range after the family
60
- * publishes a new one. The constant is only a fallback for a manifest that lost the entry.
61
- *
62
- * It lives in `devDependencies`, deliberately. Nothing imports the base: the framework fetches it
63
- * into its own managed home and this plugin loads it from there, so a RUNTIME dependency would
64
- * install a second copy on every consumer that no code path ever loads. `devDependencies` still
65
- * ships in the packed manifest (pnpm keeps it, rewriting `catalog:` like any other field), so the
66
- * range travels with the artifact; it just is not installed.
67
- */
68
- export declare function compatRange(manifestUrl?: URL): Promise<string>;
69
74
  /**
70
75
  * Build the plugin-specific half of the gate from a loaded base.
71
76
  *
@@ -1 +1 @@
1
- {"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../src/provision.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EAChB,MAAM,oBAAoB,CAAA;AAI3B,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA;AAE7C,wEAAwE;AACxE,MAAM,MAAM,YAAY,GAAG,cAAc,oBAAoB,CAAC,CAAA;AAE9D,+FAA+F;AAC/F,eAAO,MAAM,cAAc,uBAAuB,CAAA;AAElD;;;;GAIG;AACH,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAMvD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAA6C,CAAA;AAE1F,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAmE,CAAA;AAKjH,6EAA6E;AAC7E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAA;IAC7B,wCAAwC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;CACxC;AAED,0BAA0B;AAC1B,MAAM,WAAW,SAAS;IACxB,kGAAkG;IAClG,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;CAChC;AAED,sDAAsD;AACtD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,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a,EAClB,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,aAAa,GACpB,IAAI,CAaN;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAA;IAC3B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAC/B,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAQ1C"}
@@ -1,39 +1,7 @@
1
- /**
2
- * This plugin's compatibility spec, and the wiring that runs it.
3
- *
4
- * The rules, the probes, the report and the post-registration check all live in
5
- * `@avantf/dsh-compat` (shared with the rest of the family). What stays here is only what is true of
6
- * THIS plugin: the services and methods it calls, the dsh packages that identify the host, the wire
7
- * schema names and tool names that must be visible afterwards, the events it listens to, and the
8
- * Chinese report a user reads. See `DESIGN.md` §12.1.
9
- *
10
- * **Who obtains the base.** Not this module. The family framework `@avantf/dsh-envinit` provisions
11
- * `@avantf/dsh-compat` as the `mem:compat` manifest item and hands back the directory it landed in
12
- * (`src/envinit.ts`); this module is given the loaded module and derives everything from it. That is
13
- * the whole point of the framework: acquisition (resolve → managed copy → verified download →
14
- * atomic publish) is one shared mechanism, and the plugin only declares what it needs.
15
- *
16
- * The base therefore has NO import path of its own here — not even a dynamic one. A static `import`
17
- * would throw `ERR_MODULE_NOT_FOUND` while the artifact was being evaluated (the base is not a
18
- * runtime dependency of the published plugin any more), and a bare dynamic `import()` would bypass
19
- * the framework's managed copy. The plugin loads the module the framework resolved, by file URL.
20
- *
21
- * The plugin computes the gate's verdict here and hands it to the engine as plain data
22
- * (`{ load, status, reason }`), so the inlined engine bundle never imports the base either.
23
- *
24
- * @module @avantf/dsh-mem/provision
25
- */
26
- import { readFile } from 'node:fs/promises';
27
1
  import { defineTool } from '@deepseek-ai/dsh-tools';
28
2
  import { hostContribution } from './remote.js';
29
- /** The base package id, named here too so the item declaration and the spec need no import. */
30
- export const COMPAT_PACKAGE = '@avantf/dsh-compat';
31
- /**
32
- * Fallback range for `@avantf/dsh-compat`, used only when `package.json` has lost the dependency
33
- * entry. The manifest is the single source of truth (`compatRange()`); `scripts/pack-plugin.mjs`
34
- * pins this constant to it so the two cannot drift.
35
- */
36
- export const COMPAT_RANGE = '^0.1.0';
3
+ /** The base package id, named here so the gate's messages need no import of it. */
4
+ export const COMPAT_PACKAGE = '@avantf/dsh-plugin-base';
37
5
  /**
38
6
  * The services this plugin calls, with the methods it calls on them.
39
7
  *
@@ -78,31 +46,6 @@ export function warn(log, message) {
78
46
  // A logger that throws is not evidence of anything.
79
47
  }
80
48
  }
81
- /**
82
- * The range of `@avantf/dsh-compat` this build is written against.
83
- *
84
- * Read from THIS plugin's manifest, which is the single source of truth — the framework does not
85
- * pick it, and a hardcoded constant would silently keep provisioning an old range after the family
86
- * publishes a new one. The constant is only a fallback for a manifest that lost the entry.
87
- *
88
- * It lives in `devDependencies`, deliberately. Nothing imports the base: the framework fetches it
89
- * into its own managed home and this plugin loads it from there, so a RUNTIME dependency would
90
- * install a second copy on every consumer that no code path ever loads. `devDependencies` still
91
- * ships in the packed manifest (pnpm keeps it, rewriting `catalog:` like any other field), so the
92
- * range travels with the artifact; it just is not installed.
93
- */
94
- export async function compatRange(manifestUrl = new URL('../package.json', import.meta.url)) {
95
- try {
96
- const raw = JSON.parse(await readFile(manifestUrl, 'utf8'));
97
- const declared = raw.devDependencies?.[COMPAT_PACKAGE] ?? raw.dependencies?.[COMPAT_PACKAGE];
98
- if (typeof declared === 'string' && declared.trim() !== '')
99
- return declared;
100
- }
101
- catch {
102
- // Fall through to the pinned fallback.
103
- }
104
- return COMPAT_RANGE;
105
- }
106
49
  /**
107
50
  * Build the plugin-specific half of the gate from a loaded base.
108
51
  *
@@ -210,6 +153,7 @@ export function registerCompatMegaphone(ctx, verdict, log, compat) {
210
153
  warningsLabel: '风险提示:',
211
154
  warnings: verdict.warnings,
212
155
  fix: '修复:在本仓库重建(`pnpm build:dsh`),或把 `@deepseek-ai/dsh` 换回本构建声明的版本。',
156
+ logPointer: (prefix) => `完整诊断见宿主日志里 ${prefix} 开头的行。`,
213
157
  }),
214
158
  });
215
159
  }
@@ -1 +1 @@
1
- {"version":3,"file":"provision.js","sourceRoot":"","sources":["../../src/provision.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAS3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAO9C,+FAA+F;AAC/F,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAA;AAElD;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAA;AAEpC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC3D,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE;IACxD,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE;IACzE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE;IACzG,oGAAoG;IACpG,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE;CAC7D,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe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,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE;QAC9D,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE;YACxC,OAAO,EAAE,sEAAsE;YAC/E,aAAa,EAAE,OAAO;YACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,GAAG,EAAE,+DAA+D;YACpE,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,MAAM,QAAQ;SACrD,CAAC;KACH,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAKrC;IACC,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC;QAC/C,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;QACtC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;QACrC,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC,CAAA;AACJ,CAAC"}
@@ -7,9 +7,13 @@ export declare const clientContribution: TypertRemoteContribution;
7
7
  * Host face: registered by the host half through `ctx.typert.register()`.
8
8
  *
9
9
  * The schema assertions name `TypertSchema['schema']` — the FIELD they are assigned to — rather
10
- * than this package's own `z.ZodType`. The two are different zod copies: the plugin pins
11
- * zod 4.4.3, the harness bundles 4.6.2, and `ZodType` gained members between them, so a cast to
12
- * the local `z.ZodType` could never be assignable and the annotation said nothing. Through
10
+ * than this package's own `z.ZodType`. There are two PHYSICALLY different zod copies in play —
11
+ * the workspace's (root catalog `zod: 4.6.5`, the one the plugin compiles against) and the one
12
+ * inside the installed harness build — and two copies of the same major still have incompatible
13
+ * type identities (the single-`zod` rule in the root `AGENTS.md` is the same lesson), so a
14
+ * cast to the local `z.ZodType` could never be assignable and the annotation said nothing. Never
15
+ * write a version number here again: it moves with the catalog, and a stale pair sends the next
16
+ * reader to reason from the wrong premise. Through
13
17
  * `TypertSchema['schema']` the assertion is at least against the type the field actually
14
18
  * requires, and a future zod alignment (which would make the cast unnecessary) shows up here.
15
19
  */
@@ -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,EAAgB,MAAM,wCAAwC,CAAA;AAuE9F,eAAO,MAAM,WAAW,EAAE,SAAS,oBAAoB,EAqGtD,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,wBAGhC,CAAA;AAqBD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBA0C9B,CAAA"}
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,EAAgB,MAAM,wCAAwC,CAAA;AA6E9F,eAAO,MAAM,WAAW,EAAE,SAAS,oBAAoB,EAqGtD,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,wBAGhC,CAAA;AAqBD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBA0C9B,CAAA"}
@@ -32,7 +32,13 @@ const resultSymbol = (method) => fieldSymbol(method, 'result');
32
32
  *
33
33
  * Carries BOTH members on purpose: the host's validator moved from `codec.schema.parse` (0.1.5) to
34
34
  * `codec.create()` (0.1.6), and each generation checks only its own. One shape therefore serves
35
- * either host — the same "one shape satisfies two revisions" trick the job plugin's `strict()` uses.
35
+ * either host.
36
+ *
37
+ * Kept LOCAL — a two-line mirror of the base kit's `strictCodec`, not a runtime call — on purpose:
38
+ * the Remote face is built at module load and must exist even when the base cannot be loaded at all,
39
+ * so its construction may not depend on a runtime `import()` of the base. This is the "mirrors a
40
+ * convention, so changing it takes a plugin release" side of the rule in the root AGENTS.md; the
41
+ * shared, fixable-by-a-base-release code lives in `@avantf/dsh-plugin-base`'s kit.
36
42
  */
37
43
  function strict(schema, typeSymbol) {
38
44
  return { mode: 'strict', typeSymbol, schema, create: () => schema };
@@ -187,9 +193,13 @@ function declared(name, schema) {
187
193
  * Host face: registered by the host half through `ctx.typert.register()`.
188
194
  *
189
195
  * The schema assertions name `TypertSchema['schema']` — the FIELD they are assigned to — rather
190
- * than this package's own `z.ZodType`. The two are different zod copies: the plugin pins
191
- * zod 4.4.3, the harness bundles 4.6.2, and `ZodType` gained members between them, so a cast to
192
- * the local `z.ZodType` could never be assignable and the annotation said nothing. Through
196
+ * than this package's own `z.ZodType`. There are two PHYSICALLY different zod copies in play —
197
+ * the workspace's (root catalog `zod: 4.6.5`, the one the plugin compiles against) and the one
198
+ * inside the installed harness build — and two copies of the same major still have incompatible
199
+ * type identities (the single-`zod` rule in the root `AGENTS.md` is the same lesson), so a
200
+ * cast to the local `z.ZodType` could never be assignable and the annotation said nothing. Never
201
+ * write a version number here again: it moves with the catalog, and a stale pair sends the next
202
+ * reader to reason from the wrong premise. Through
193
203
  * `TypertSchema['schema']` the assertion is at least against the type the field actually
194
204
  * requires, and a future zod alignment (which would make the cast unnecessary) shows up here.
195
205
  */
@@ -1 +1 @@
1
- {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAYvB,MAAM,OAAO,GAAG,iBAAiB,CAAA;AACjC,MAAM,SAAS,GAAG,WAAW,CAAA;AAE7B,MAAM,UAAU,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,GAAG,OAAO,IAAI,SAAS,IAAI,MAAM,E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AAE,EAAE;QACV,OAAO,EAAE,EAAE;KACZ;IACD,WAAW,EAAE,WAAW;CACzB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avantf/dsh-mem",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
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",
@@ -30,7 +30,7 @@
30
30
  "README.md"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@avantf/dsh-envinit": "^0.1.3",
33
+ "@avantf/dsh-plugin-base": ">=0.3.0 <1.0.0",
34
34
  "@deepseek-ai/cordis": "^4.0.0",
35
35
  "@deepseek-ai/dsh-system-prompt": "^0.1.5-rc.2",
36
36
  "@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
@@ -38,9 +38,6 @@
38
38
  "@deepseek-ai/schemastery": "^3.18.0"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
- "@avantf/dsh-envinit": {
42
- "optional": true
43
- },
44
41
  "@deepseek-ai/cordis": {
45
42
  "optional": true
46
43
  },
@@ -62,7 +59,7 @@
62
59
  "exceljs": "^4.4.0",
63
60
  "unpdf": "^1.8.1",
64
61
  "yaml": "^2.5.0",
65
- "zod": "4.4.3"
62
+ "zod": "4.6.5"
66
63
  },
67
64
  "optionalDependencies": {
68
65
  "@huggingface/transformers": "^4.2.0",
@@ -70,23 +67,20 @@
70
67
  "nodejieba": "^2.6.0"
71
68
  },
72
69
  "devDependencies": {
73
- "@avantf/dsh-compat": "^0.1.0",
74
- "@avantf/dsh-envinit": "^0.1.3",
75
- "@avantf/mem": "0.1.0",
76
- "@avantf/mem-contract": "0.1.0",
77
- "@avantf/mem-convert": "0.1.0",
78
- "@avantf/mem-provision": "0.1.0",
70
+ "@avantf/dsh-plugin-base": ">=0.3.0 <1.0.0",
71
+ "@avantf/mem": "0.2.0",
72
+ "@avantf/mem-contract": "0.2.0",
73
+ "@avantf/mem-convert": "0.2.0",
74
+ "@avantf/mem-provision": "0.2.0",
79
75
  "@types/node": "^22.0.0",
80
76
  "@types/react": "^18.3.0",
81
77
  "@types/react-dom": "^18.3.0",
82
78
  "lightningcss": "^1.32.0",
83
- "react": "^18.2.0",
84
- "react-dom": "^18.2.0",
79
+ "react": "18.3.1",
80
+ "react-dom": "18.3.1",
85
81
  "tsdown": "0.22.2",
86
- "typescript": "^5.5.0"
87
- },
88
- "engines": {
89
- "node": ">=22"
82
+ "typescript": "^5.5.0",
83
+ "vitest": "^2.1.0"
90
84
  },
91
85
  "license": "MIT",
92
86
  "publishConfig": {
@@ -95,15 +89,16 @@
95
89
  "prepublishOnly": "pnpm build",
96
90
  "repository": {
97
91
  "type": "git",
98
- "url": "git@gitee.com:ffeng86/avantf-mem.git",
99
- "directory": "packages/plugin"
92
+ "url": "git@gitee.com:ffeng86/dsh-plugins.git",
93
+ "directory": "mem/packages/plugin"
100
94
  },
101
95
  "author": "qunqi.ff",
102
96
  "scripts": {
103
- "build": "tsc -p tsconfig.json && node ../../scripts/copy-envinit-bootstrap.mjs && tsdown",
97
+ "build": "node ../../scripts/link-dsh.mjs && node ../../scripts/link-envinit.mjs && tsc -p tsconfig.json && node ../../scripts/copy-envinit-bootstrap.mjs && tsdown",
104
98
  "bundle": "tsdown",
105
99
  "watch": "tsdown --watch",
106
- "typecheck": "tsc -p tsconfig.json --noEmit",
100
+ "typecheck": "node ../../scripts/link-dsh.mjs && tsc -p tsconfig.test.json",
101
+ "test": "vitest run",
107
102
  "test:dsh": "vitest run --config vitest.dsh.config.ts"
108
103
  }
109
104
  }