@fonlan/dsh-gitmemo 0.1.2 → 0.1.3
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 +7 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -61,6 +61,10 @@ const SEARCH_HIT = {
|
|
|
61
61
|
function textBlock(text) {
|
|
62
62
|
return [{ type: "text", text }];
|
|
63
63
|
}
|
|
64
|
+
/** Treat blank optional adapter values as omitted without weakening engine validation. */
|
|
65
|
+
function blankToUndefined(value) {
|
|
66
|
+
return value !== undefined && value.trim().length === 0 ? undefined : value;
|
|
67
|
+
}
|
|
64
68
|
/** Register every model-facing tool. */
|
|
65
69
|
function registerMemTools(ctx, config) {
|
|
66
70
|
void config;
|
|
@@ -211,10 +215,10 @@ function registerMemTools(ctx, config) {
|
|
|
211
215
|
return await memo.write({
|
|
212
216
|
title: args.title,
|
|
213
217
|
content: args.content,
|
|
214
|
-
contentFile: args.content_file,
|
|
215
|
-
file: args.file,
|
|
218
|
+
contentFile: blankToUndefined(args.content_file),
|
|
219
|
+
file: blankToUndefined(args.file),
|
|
216
220
|
body: args.body,
|
|
217
|
-
bodyFile: args.body_file
|
|
221
|
+
bodyFile: blankToUndefined(args.body_file)
|
|
218
222
|
});
|
|
219
223
|
},
|
|
220
224
|
presentCall: (args) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonlan/dsh-gitmemo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Git-backed long-term memory for DeepSeek Harness: a local .mem git repo with mem_search / mem_read / mem_write / mem_delete tools, auto-managed by the agent with zero manual steps.",
|
|
5
5
|
"author": "fonlan",
|
|
6
6
|
"publishConfig": {
|