@lmzhen/dsh-tool-memory 0.1.0-rc.28 → 0.1.0-rc.29
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/lib/index.js +19 -0
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -148,6 +148,25 @@ async function apply(ctx, rawConfig) {
|
|
|
148
148
|
},
|
|
149
149
|
isConcurrencySafe: () => false,
|
|
150
150
|
async execute(args, exec) {
|
|
151
|
+
const conflict = (a) => {
|
|
152
|
+
if (a.facts === void 0 || a.content === void 0) return false;
|
|
153
|
+
return a.facts !== a.content;
|
|
154
|
+
};
|
|
155
|
+
if (Array.isArray(args.operations)) {
|
|
156
|
+
for (const op of args.operations) if (conflict(op)) return {
|
|
157
|
+
ok: false,
|
|
158
|
+
message: "Provide only one of facts or content per operation (same field); different values were given.",
|
|
159
|
+
entries: [],
|
|
160
|
+
chars: 0,
|
|
161
|
+
limit: 0
|
|
162
|
+
};
|
|
163
|
+
} else if (conflict(args)) return {
|
|
164
|
+
ok: false,
|
|
165
|
+
message: "Provide only one of facts or content (same field); different values were given.",
|
|
166
|
+
entries: [],
|
|
167
|
+
chars: 0,
|
|
168
|
+
limit: 0
|
|
169
|
+
};
|
|
151
170
|
const target = args.target === "user" ? "user" : "memory";
|
|
152
171
|
const normalized = Array.isArray(args.operations) ? {
|
|
153
172
|
target,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-tool-memory",
|
|
3
3
|
"description": "Model-facing memory tool and prompt context (community build)",
|
|
4
|
-
"version": "0.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.29",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
40
40
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
41
41
|
"@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6",
|
|
42
|
-
"@lmzhen/dsh-memory": "^0.1.0-rc.
|
|
43
|
-
"@lmzhen/dsh-memory-files": "^0.1.0-rc.
|
|
42
|
+
"@lmzhen/dsh-memory": "^0.1.0-rc.29",
|
|
43
|
+
"@lmzhen/dsh-memory-files": "^0.1.0-rc.29"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
47
47
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
48
48
|
"@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6",
|
|
49
49
|
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.0-rc.6",
|
|
50
|
-
"@lmzhen/dsh-memory": "^0.1.0-rc.
|
|
51
|
-
"@lmzhen/dsh-memory-files": "^0.1.0-rc.
|
|
50
|
+
"@lmzhen/dsh-memory": "^0.1.0-rc.29",
|
|
51
|
+
"@lmzhen/dsh-memory-files": "^0.1.0-rc.29"
|
|
52
52
|
}
|
|
53
53
|
}
|