@avantf/dsh-mem 0.1.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.
- package/LICENSE +21 -0
- package/README.md +140 -0
- package/lib/client.js +5901 -0
- package/lib/client.js.map +1 -0
- package/lib/dsh-build.json +7 -0
- package/lib/index.js +14329 -0
- package/lib/types/client/domains.d.ts +52 -0
- package/lib/types/client/domains.d.ts.map +1 -0
- package/lib/types/client/domains.js +25 -0
- package/lib/types/client/domains.js.map +1 -0
- package/lib/types/client/index.d.ts +35 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +1351 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/ingest.d.ts +24 -0
- package/lib/types/client/ingest.d.ts.map +1 -0
- package/lib/types/client/ingest.js +30 -0
- package/lib/types/client/ingest.js.map +1 -0
- package/lib/types/client/paging.d.ts +30 -0
- package/lib/types/client/paging.d.ts.map +1 -0
- package/lib/types/client/paging.js +36 -0
- package/lib/types/client/paging.js.map +1 -0
- package/lib/types/client/summarize.d.ts +11 -0
- package/lib/types/client/summarize.d.ts.map +1 -0
- package/lib/types/client/summarize.js +79 -0
- package/lib/types/client/summarize.js.map +1 -0
- package/lib/types/envinit-bootstrap.d.ts +43 -0
- package/lib/types/envinit-bootstrap.js +323 -0
- package/lib/types/envinit.d.ts +145 -0
- package/lib/types/envinit.d.ts.map +1 -0
- package/lib/types/envinit.js +495 -0
- package/lib/types/envinit.js.map +1 -0
- package/lib/types/hints.d.ts +42 -0
- package/lib/types/hints.d.ts.map +1 -0
- package/lib/types/hints.js +54 -0
- package/lib/types/hints.js.map +1 -0
- package/lib/types/index.d.ts +74 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +708 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/inject.d.ts +14 -0
- package/lib/types/inject.d.ts.map +1 -0
- package/lib/types/inject.js +14 -0
- package/lib/types/inject.js.map +1 -0
- package/lib/types/open.d.ts +27 -0
- package/lib/types/open.d.ts.map +1 -0
- package/lib/types/open.js +133 -0
- package/lib/types/open.js.map +1 -0
- package/lib/types/prompt.d.ts +49 -0
- package/lib/types/prompt.d.ts.map +1 -0
- package/lib/types/prompt.js +65 -0
- package/lib/types/prompt.js.map +1 -0
- package/lib/types/provision.d.ts +117 -0
- package/lib/types/provision.d.ts.map +1 -0
- package/lib/types/provision.js +233 -0
- package/lib/types/provision.js.map +1 -0
- package/lib/types/remote.d.ts +17 -0
- package/lib/types/remote.d.ts.map +1 -0
- package/lib/types/remote.js +233 -0
- package/lib/types/remote.js.map +1 -0
- package/lib/types/tool_schema.d.ts +40 -0
- package/lib/types/tool_schema.d.ts.map +1 -0
- package/lib/types/tool_schema.js +149 -0
- package/lib/types/tool_schema.js.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zod → DSH parameter schema derivation for the agent tools.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately free of `@deepseek-ai/*` imports: everything it needs — the contract's tool
|
|
5
|
+
* specs, hence the zod schemas — comes from `@avantf/mem-contract`, so this module can be read
|
|
6
|
+
* and exercised without a harness checkout or an installed `dsh`.
|
|
7
|
+
*
|
|
8
|
+
* Two things keep this honest across a zod upgrade. First, the field-level mapping goes through
|
|
9
|
+
* zod's OWN converter (`z.toJSONSchema`, the same one the contract's MCP derivation uses)
|
|
10
|
+
* instead of reading `typeName`/`checks`/`shape` by hand, so there is one mechanism and not two
|
|
11
|
+
* hand-rolled ones. Second, only the union/object structure is read off the internals
|
|
12
|
+
* (`def.options` / `def.shape` / a literal's `def.values`) — and a wrong internal read degrades
|
|
13
|
+
* SILENTLY: every field would flatten to `{type:'string'}` and no type error would appear, which
|
|
14
|
+
* is why the derived shape is asserted by the test suite rather than eyeballed.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { mergedFieldDescription } from '@avantf/mem-contract';
|
|
18
|
+
export function zodDef(schema) {
|
|
19
|
+
return schema?.def ?? {};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* One field as JSON Schema, or `undefined` when `schema` is not a zod schema at all.
|
|
23
|
+
*
|
|
24
|
+
* `io: 'input'` matches how these schemas are actually used (arguments coming IN), and
|
|
25
|
+
* `unrepresentable: 'any'` turns a future unrepresentable schema into a permissive object
|
|
26
|
+
* instead of a throw at import time.
|
|
27
|
+
*/
|
|
28
|
+
function jsonSchemaOf(schema) {
|
|
29
|
+
if (typeof schema?.safeParse !== 'function')
|
|
30
|
+
return undefined;
|
|
31
|
+
try {
|
|
32
|
+
return z.toJSONSchema(schema, { io: 'input', unrepresentable: 'any' });
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Nearest `description` on a schema (wrappers included — the converter already unwrapped them). */
|
|
39
|
+
export function schemaDescription(schema) {
|
|
40
|
+
const description = jsonSchemaOf(schema)?.['description'];
|
|
41
|
+
return typeof description === 'string' && description.length > 0 ? description : undefined;
|
|
42
|
+
}
|
|
43
|
+
/** JSON Schema → DSH parameter spec. Recurses on `items`, which is itself JSON Schema. */
|
|
44
|
+
function jsonToSpec(js) {
|
|
45
|
+
const type = js['type'];
|
|
46
|
+
let spec;
|
|
47
|
+
if (type === 'integer')
|
|
48
|
+
spec = { type: 'integer' };
|
|
49
|
+
else if (type === 'number')
|
|
50
|
+
spec = { type: 'number' };
|
|
51
|
+
else if (type === 'boolean')
|
|
52
|
+
spec = { type: 'boolean' };
|
|
53
|
+
else if (type === 'array')
|
|
54
|
+
spec = { type: 'array', items: jsonToSpec(js['items'] ?? {}) };
|
|
55
|
+
else if (type === 'object')
|
|
56
|
+
spec = { type: 'object' };
|
|
57
|
+
else if (Array.isArray(js['enum']))
|
|
58
|
+
spec = { type: 'string', enum: js['enum'].map(String) };
|
|
59
|
+
// A string literal arrives as `const`, not `enum`: keep the old shape (`enum: [value]`).
|
|
60
|
+
else if (typeof js['const'] === 'string')
|
|
61
|
+
spec = { type: 'string', enum: [js['const']] };
|
|
62
|
+
else if (typeof js['const'] === 'number')
|
|
63
|
+
spec = { type: 'number' };
|
|
64
|
+
else if (typeof js['const'] === 'boolean')
|
|
65
|
+
spec = { type: 'boolean' };
|
|
66
|
+
else
|
|
67
|
+
spec = { type: 'string' };
|
|
68
|
+
const description = js['description'];
|
|
69
|
+
return typeof description === 'string' && description.length > 0 ? { ...spec, description } : spec;
|
|
70
|
+
}
|
|
71
|
+
export function zodToSpec(schema) {
|
|
72
|
+
return jsonToSpec(jsonSchemaOf(schema) ?? {});
|
|
73
|
+
}
|
|
74
|
+
/** Materialize one zod object branch's fields, or undefined for a non-object. */
|
|
75
|
+
export function branchShape(schema) {
|
|
76
|
+
return zodDef(schema).shape;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Flatten a tool input schema into DSH's implicit parameter map. A discriminated
|
|
80
|
+
* union contributes one required `action` enum plus the merged field set (fields
|
|
81
|
+
* stay optional at the schema level because requiredness differs per action; the
|
|
82
|
+
* per-action requirement is stated in each field's description and enforced by
|
|
83
|
+
* `spec.input` validation before dispatch). A plain object marks its own required
|
|
84
|
+
* fields directly.
|
|
85
|
+
*
|
|
86
|
+
* The merged descriptions come from the contract's {@link mergedFieldDescription}, the SAME
|
|
87
|
+
* function `toolInputJsonSchema` uses for the MCP surface. Taking each field's first branch
|
|
88
|
+
* verbatim is what made the two model-facing surfaces disagree: `mem_admin`'s `fact_id` said
|
|
89
|
+
* "action=detail 时必填" on this surface while the MCP schema said
|
|
90
|
+
* "【detail/archive/restore/pin/unpin 必填】" — so a model calling `archive` without it had to
|
|
91
|
+
* learn the requirement from a `violations` retry. Both surfaces now read the same merged
|
|
92
|
+
* descriptions, which is what keeps them in agreement field for field.
|
|
93
|
+
*/
|
|
94
|
+
export function flattenToolSpec(spec) {
|
|
95
|
+
const input = spec.input;
|
|
96
|
+
const def = zodDef(input);
|
|
97
|
+
const properties = {};
|
|
98
|
+
let actions = [];
|
|
99
|
+
if (Array.isArray(def.options)) {
|
|
100
|
+
// The union's fields are declared one branch at a time, so a field's real action set is the
|
|
101
|
+
// union over the branches that require it — collected here, applied below.
|
|
102
|
+
const requiredIn = new Map();
|
|
103
|
+
for (const branch of def.options) {
|
|
104
|
+
const shape = branchShape(branch);
|
|
105
|
+
if (shape === undefined)
|
|
106
|
+
continue;
|
|
107
|
+
const actionSchema = shape['action'];
|
|
108
|
+
const literal = actionSchema === undefined ? undefined : zodDef(actionSchema).values?.[0];
|
|
109
|
+
const action = typeof literal === 'string' ? literal : undefined;
|
|
110
|
+
if (action !== undefined && !actions.includes(action))
|
|
111
|
+
actions = [...actions, action];
|
|
112
|
+
for (const [key, fieldSchema] of Object.entries(shape)) {
|
|
113
|
+
if (key === 'action')
|
|
114
|
+
continue;
|
|
115
|
+
if (properties[key] === undefined)
|
|
116
|
+
properties[key] = zodToSpec(fieldSchema);
|
|
117
|
+
if (action === undefined)
|
|
118
|
+
continue;
|
|
119
|
+
const optional = fieldSchema.isOptional?.() ?? false;
|
|
120
|
+
if (!optional)
|
|
121
|
+
requiredIn.set(key, [...(requiredIn.get(key) ?? []), action]);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
for (const [key, paramSpec] of Object.entries(properties)) {
|
|
125
|
+
const description = mergedFieldDescription(paramSpec.description, requiredIn.get(key) ?? []);
|
|
126
|
+
properties[key] = description === undefined ? paramSpec : { ...paramSpec, description };
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const shape = branchShape(input);
|
|
131
|
+
if (shape !== undefined) {
|
|
132
|
+
for (const [key, fieldSchema] of Object.entries(shape)) {
|
|
133
|
+
const paramSpec = zodToSpec(fieldSchema);
|
|
134
|
+
const optional = fieldSchema.isOptional?.() ?? false;
|
|
135
|
+
properties[key] = optional ? paramSpec : { ...paramSpec, required: true };
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (actions.length > 0) {
|
|
140
|
+
properties['action'] = {
|
|
141
|
+
type: 'string',
|
|
142
|
+
required: true,
|
|
143
|
+
enum: actions,
|
|
144
|
+
description: `要执行的操作,取值:${actions.join(' | ')}。每个操作需要哪些字段见各字段说明。`,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return properties;
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=tool_schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool_schema.js","sourceRoot":"","sources":["../../src/tool_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAiB,MAAM,sBAAsB,CAAA;AAmB5E,MAAM,UAAU,MAAM,CAAC,MAAe;IACpC,OAAQ,MAAuC,EAAE,GAAG,IAAI,EAAE,CAAA;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAAY,CAAC,MAAe;IACnC,IAAI,OAAQ,MAA8C,EAAE,SAAS,KAAK,UAAU;QAAE,OAAO,SAAS,CAAA;IACtG,IAAI,CAAC;QACH,OAAO,CAAC,CAAC,YAAY,CAAC,MAAmB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAA4B,CAAA;IAChH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,iBAAiB,CAAC,MAAe;IAC/C,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,aAAa,CAAC,CAAA;IACzD,OAAO,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5F,CAAC;AAED,0FAA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AC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAA;QAChC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,KAAK,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvD,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,CAAA;gBACxC,MAAM,QAAQ,GAAI,WAA8C,CAAC,UAAU,EAAE,EAAE,IAAI,KAAK,CAAA;gBACxF,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;YAC3E,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,UAAU,CAAC,QAAQ,CAAC,GAAG;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,aAAa,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB;SAClE,CAAA;IACH,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@avantf/dsh-mem",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "avantf-mem DSH native Cordis plugin: host service + tools + RPC + client tabs 记忆/知识",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"types": "./lib/types/client/index.d.ts",
|
|
15
|
+
"default": "./lib/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"dsh": {
|
|
20
|
+
"client": {
|
|
21
|
+
"inject": [
|
|
22
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
23
|
+
"@deepseek-ai/dsh-api-remotes"
|
|
24
|
+
],
|
|
25
|
+
"platform": "web"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@avantf/dsh-envinit": "^0.1.3",
|
|
34
|
+
"@deepseek-ai/cordis": "^4.0.0",
|
|
35
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.5-rc.2",
|
|
38
|
+
"@deepseek-ai/schemastery": "^3.18.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"@avantf/dsh-envinit": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"@deepseek-ai/cordis": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"@deepseek-ai/dsh-system-prompt": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"@deepseek-ai/dsh-tools": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"@deepseek-ai/dsh-typert-protocol": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"@deepseek-ai/schemastery": {
|
|
57
|
+
"optional": true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"better-sqlite3": "^11.3.0",
|
|
62
|
+
"exceljs": "^4.4.0",
|
|
63
|
+
"unpdf": "^1.8.1",
|
|
64
|
+
"yaml": "^2.5.0",
|
|
65
|
+
"zod": "4.4.3"
|
|
66
|
+
},
|
|
67
|
+
"optionalDependencies": {
|
|
68
|
+
"@huggingface/transformers": "^4.2.0",
|
|
69
|
+
"hnswlib-node": "^2.1.1",
|
|
70
|
+
"nodejieba": "^2.6.0"
|
|
71
|
+
},
|
|
72
|
+
"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",
|
|
79
|
+
"@types/node": "^22.0.0",
|
|
80
|
+
"@types/react": "^18.3.0",
|
|
81
|
+
"@types/react-dom": "^18.3.0",
|
|
82
|
+
"lightningcss": "^1.32.0",
|
|
83
|
+
"react": "^18.2.0",
|
|
84
|
+
"react-dom": "^18.2.0",
|
|
85
|
+
"tsdown": "0.22.2",
|
|
86
|
+
"typescript": "^5.5.0"
|
|
87
|
+
},
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=22"
|
|
90
|
+
},
|
|
91
|
+
"license": "MIT",
|
|
92
|
+
"publishConfig": {
|
|
93
|
+
"access": "public"
|
|
94
|
+
},
|
|
95
|
+
"prepublishOnly": "pnpm build",
|
|
96
|
+
"repository": {
|
|
97
|
+
"type": "git",
|
|
98
|
+
"url": "git@gitee.com:ffeng86/avantf-mem.git",
|
|
99
|
+
"directory": "packages/plugin"
|
|
100
|
+
},
|
|
101
|
+
"author": "qunqi.ff",
|
|
102
|
+
"scripts": {
|
|
103
|
+
"build": "tsc -p tsconfig.json && node ../../scripts/copy-envinit-bootstrap.mjs && tsdown",
|
|
104
|
+
"bundle": "tsdown",
|
|
105
|
+
"watch": "tsdown --watch",
|
|
106
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
107
|
+
"test:dsh": "vitest run --config vitest.dsh.config.ts"
|
|
108
|
+
}
|
|
109
|
+
}
|