@jacklika/dsh-memory-curator 0.1.0-alpha.2 → 0.1.0-alpha.4

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/lib/index.js +2 -25
  2. package/package.json +4 -3
package/lib/index.js CHANGED
@@ -11,31 +11,8 @@ import { randomUUID } from 'node:crypto';
11
11
  import z from '@deepseek-ai/schemastery';
12
12
  import { ToolCallId } from '@deepseek-ai/dsh-llm';
13
13
  import { defineTool } from '@deepseek-ai/dsh-tools';
14
+ import { formatBeijingTime } from '@jacklika/dsh-memory-time';
14
15
  import yaml from 'js-yaml';
15
- /**
16
- * Format a Date as an ISO-like string in Asia/Shanghai (+08:00).
17
- * The project convention is to store all vault timestamps in Beijing time.
18
- */
19
- function formatBeijingTime(date) {
20
- const parts = new Intl.DateTimeFormat('sv-SE', {
21
- timeZone: 'Asia/Shanghai',
22
- year: 'numeric',
23
- month: '2-digit',
24
- day: '2-digit',
25
- hour: '2-digit',
26
- minute: '2-digit',
27
- second: '2-digit',
28
- hour12: false,
29
- }).formatToParts(date);
30
- const get = (type) => parts.find((p) => p.type === type)?.value ?? '00';
31
- const yyyy = get('year');
32
- const MM = get('month');
33
- const dd = get('day');
34
- const HH = get('hour');
35
- const mm = get('minute');
36
- const ss = get('second');
37
- return `${yyyy}-${MM}-${dd}T${HH}:${mm}:${ss}+08:00`;
38
- }
39
16
  /** Cordis plugin name used by loader diagnostics. */
40
17
  export const name = 'memory-curator';
41
18
  /** Services required by the curator tools. */
@@ -114,7 +91,7 @@ export function apply(ctx, config) {
114
91
  const approval = ctx.get('approval');
115
92
  ctx.effect(() => ctx.tools.register(defineTool({
116
93
  name: 'memory_recall',
117
- description: 'Search the memory vault for prior notes related to the current task or topic. Call this at the start of a development task to avoid asking the user to repeat context that is already captured. Returns matching note ids, titles, and backlink counts.',
94
+ description: 'Search the memory vault for prior notes related to the current task or topic. Call this at the start of a development task to avoid asking the user to repeat context that is already captured. Query terms are OR-matched and ranked by field-weighted relevance, so partial matches still return. Returns matching note ids, titles, scores, and backlink counts.',
118
95
  parameters: {
119
96
  query: {
120
97
  type: 'string',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jacklika/dsh-memory-curator",
3
3
  "description": "Curator tools for the DSH memory vault: memory_recall before acting and memory_capture after significant work, with conflict detection and optional user approval.",
4
- "version": "0.1.0-alpha.2",
4
+ "version": "0.1.0-alpha.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,7 +32,8 @@
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
34
  "@deepseek-ai/schemastery": "3.18.4",
35
- "js-yaml": "^4.2.0"
35
+ "js-yaml": "^4.2.0",
36
+ "@jacklika/dsh-memory-time": "^0.1.0-alpha.0"
36
37
  },
37
38
  "peerDependencies": {
38
39
  "@deepseek-ai/cordis": "4.0.4",
@@ -43,6 +44,6 @@
43
44
  "@deepseek-ai/dsh-util-values": ">=0.1.7-rc.1 <0.3.0-0"
44
45
  },
45
46
  "devDependencies": {
46
- "@jacklika/dsh-tool-memory-filesystem": "0.1.3-alpha.2"
47
+ "@jacklika/dsh-tool-memory-filesystem": "^0.1.3-alpha.5"
47
48
  }
48
49
  }