@try-works/dsh-memory 0.1.8 → 0.1.9

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.js +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@try-works/dsh-memory",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Git-backed, workspace-scoped memory for the DeepSeek Harness (global layer + per-workspace layers)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/tools.js CHANGED
@@ -321,7 +321,17 @@ export function registerTools(ctx, store, extras = {}) {
321
321
  session: { type: 'object', additionalProperties: true },
322
322
  },
323
323
  },
324
+ // The text face, for the agent and for any caller without a UI.
324
325
  render: (_args, value) => [{ type: 'text', text: renderMap(value) }],
326
+ // The STRUCTURED face, and the only reason the Memory tab and the inline card can draw
327
+ // anything. A tool result reaches the session event with a `meta` field ONLY when the tool
328
+ // declares presentationMeta (core/tools/src/index.ts:1845-1859), and that field is what
329
+ // ui-chat forwards to a view (conversation-nodes/tool.ts:77: meta: match.event.data.meta).
330
+ // Without this, memory_map rendered its snapshot to prose and threw the value away: the tab
331
+ // showed 'the result carried no snapshot' while the same call displayed 2,197 entries in
332
+ // the conversation. The rendered text is not a substitute - rebuilding panels by parsing it
333
+ // would be a second source of truth.
334
+ presentationMeta: (_args, value) => value,
325
335
  },
326
336
  async execute(args, exec) {
327
337
  const scope = args.scope === 'store' || args.scope === 'session' ? args.scope : 'all'