@synth-coder/memhub 0.1.5 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synth-coder/memhub",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "A Git-friendly memory hub using Markdown-based storage with YAML Front Matter",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -52,14 +52,14 @@ export const TOOL_DEFINITIONS: readonly Tool[] = [
52
52
  {
53
53
  name: 'memory_load',
54
54
  description:
55
- 'STM first step. Call at the first turn after receiving user prompt to load short-term memory context for this session/task.',
55
+ 'MANDATORY STM step #1 (stability-first). Call memory_load as the FIRST tool call after each new user prompt, before analysis or planning. Goal: recover short-term memory for the current task so the next 1-3 turns stay coherent and do not repeat user input. Prefer { sessionId, scope:"stm", limit:20 }; add { date } for date-scoped tasks and { query } for keyword-driven tasks. If unavailable, continue the task and still provide a final answer.',
56
56
  inputSchema: {
57
57
  type: 'object',
58
58
  properties: {
59
59
  id: { type: 'string', description: 'Optional memory id for direct fetch' },
60
60
  sessionId: {
61
61
  type: 'string',
62
- description: 'Optional session UUID to load current CLI/task context',
62
+ description: 'Recommended. Stable session UUID for this task/thread. Reuse same value across memory_load/memory_update.',
63
63
  },
64
64
  date: { type: 'string', description: 'Optional date filter (YYYY-MM-DD)' },
65
65
  query: { type: 'string', description: 'Optional text query for relevant context' },
@@ -69,7 +69,7 @@ export const TOOL_DEFINITIONS: readonly Tool[] = [
69
69
  scope: {
70
70
  type: 'string',
71
71
  enum: ['stm', 'all'],
72
- description: 'stm for short-term context window; all for broader retrieval',
72
+ description: 'Use "stm" by default for current-task context expected to be reused in ~3 turns. Use "all" only when broad historical recall is required.',
73
73
  },
74
74
  },
75
75
  additionalProperties: false,
@@ -78,22 +78,23 @@ export const TOOL_DEFINITIONS: readonly Tool[] = [
78
78
  {
79
79
  name: 'memory_update',
80
80
  description:
81
- 'STM write-back step. Call at the final turn to append/upsert new decisions, preferences, task-state changes, and key outputs.',
81
+ 'MANDATORY STM step #2 (closed loop). Call memory_update as the FINAL tool call before your final user answer. Write only high-value short-term updates likely reused in the next 1-3 turns: decisions made, preference/constraint changes, task state transitions, and reusable conclusions. Keep content concise, factual, and task-bound. Never store secrets or credentials. If unavailable, still return the final user answer.',
82
82
  inputSchema: {
83
83
  type: 'object',
84
84
  properties: {
85
85
  id: { type: 'string', description: 'Optional id. Present = update existing record' },
86
- sessionId: { type: 'string', description: 'Session UUID. Auto-created if omitted' },
87
- mode: { type: 'string', enum: ['append', 'upsert'], description: 'Default append' },
86
+ sessionId: { type: 'string', description: 'Recommended. Same session UUID used in memory_load. Auto-created if omitted.' },
87
+ mode: { type: 'string', enum: ['append', 'upsert'], description: 'append = add new STM item (default). upsert = update existing item, usually with id.' },
88
88
  entryType: {
89
89
  type: 'string',
90
90
  enum: ['decision', 'preference', 'knowledge', 'todo', 'state_change'],
91
+ description: 'Use the most specific type to improve next-turn retrieval quality: decision/preference/knowledge/todo/state_change.',
91
92
  },
92
93
  title: { type: 'string', description: 'Optional title' },
93
- content: { type: 'string', description: 'Required memory body' },
94
+ content: { type: 'string', description: 'Required. Concise reusable summary (for next ~3 turns), not full transcript.' },
94
95
  tags: { type: 'array', items: { type: 'string' } },
95
96
  category: { type: 'string' },
96
- importance: { type: 'number' },
97
+ importance: { type: 'number', description: 'Optional priority score (1-5). Use higher values for likely near-term reuse.' },
97
98
  },
98
99
  required: ['content'],
99
100
  additionalProperties: false,