@mnemonik/shared 7.58.0 → 7.65.0

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.
@@ -4,8 +4,14 @@
4
4
  * This is the SINGLE SOURCE OF TRUTH for MCP instructions.
5
5
  * Shared instruction content imported by the server.
6
6
  *
7
- * Version: 2.109
8
- * Updated: 2026-08-11
7
+ * Version: 2.110
8
+ * Updated: 2026-08-27
9
+ *
10
+ * v2.110 — Reordered and compressed the universal instructions to fit the
11
+ * 2,048-character transport limit. The first 512 characters now carry
12
+ * the server purpose, self-scoping bootstrap condition, required cwd,
13
+ * and memory-as-augmentation stance. The retrieval, task pagination,
14
+ * and tool-floor capabilities remain in a shorter factual form.
9
15
  *
10
16
  * v2.109 — Compressed the v2.108 memory-search clause. It restated, verbatim,
11
17
  * the same search guidance carried by SESSION_OPENER_INSTRUCTION
@@ -148,7 +154,7 @@ export declare function getMcpInstructions(): string;
148
154
  * Raw instructions content (always returns the content, ignores env var).
149
155
  * Use getMcpInstructions() for production code.
150
156
  */
151
- export declare const MCP_INSTRUCTIONS_RAW = "If your context does not contain a block beginning \"PROJECT_CONTEXT schemaVersion=\", call session_bootstrap before replying or taking any other action \u2014 e.g. session_bootstrap({ cwd: \"/absolute/path/to/project\" }), where cwd is the real absolute path to the project root you are working in (required; the call fails without it \u2014 substitute your actual path, not the example). It loads this project's prior decisions, open tasks, and policies. If that block is already present, do not call session_bootstrap; the context is already loaded.\n\nTreat persistent memory as working knowledge: code and docs show current artifacts, git shows changes, and Mnemonik can remember why. For rationale or intent, search memory before relying on files or git history alone, then verify current source with Grep or Read; use code_search when concepts don't share the user's words. Exact call shapes load with the session context.\n\nLarge retrievals arrive as complete hydrated records plus exact pointer rows and extent/facet counts. Select relevant IDs and hydrate exact originals with mnemonik.memory_get({ memoryIds: [...], includeRaw: true }); refine the query or continue the index cursor when the visible index is incomplete\u2014do not page full bodies merely to discover what exists.\n\nProject work items and pending tasks live in mnemonik.tasks, not the host TaskList. A pending-task list requires mnemonik.tasks({ action:\"list\", status:\"pending\", ... }); never omit action:\"list\". If the request says pending, status:\"pending\" is required\u2014an unfiltered list is wrong. For in-progress, completed, or all-status requests, use the matching status or no status filter. Each list page is { hydrated, index, extent, cursor }, not { tasks }. When the user requests a complete or all-results list, collect [...page.hydrated, ...page.index] in one memory_tools program, repeat the same inner query with each returned cursor until cursor is null, then return compact id/title/status rows. Every row carries title, priority and status \u2014 hydrated and pointer alike; read them uniformly and never hydrate a body just to label it. Do not stop at the first retrieval envelope.\n\nWhich tool for what \u2014 reach past memory_search and checkpoint for these:\n- memory_add \u2014 persist a discrete decision or root cause the moment you make it; do not bury it in a checkpoint summary.\n- memory_state \u2014 a memory is wrong or outdated: supersede/deprecate/dispute it, do not add a competing copy.\n- memory_info \u2014 a memory looks suspect (low confidence, odd origin): investigate it before you act on or discard it.\n- memory_links \u2014 connect related decisions so they surface together.\n- assist \u2014 search results are thin or empty: check for coverage gaps.\n- search_summaries \u2014 find past work by topic or date across prior sessions.\n- policy \u2014 a durable rule or preference belongs here (enforced), not in a memory.\n- tasks \u2014 create follow-up work here, and close tasks when done so the pending list stays honest.";
157
+ export declare const MCP_INSTRUCTIONS_RAW = "Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins \"PROJECT_CONTEXT schemaVersion=\", session_bootstrap({ cwd }) loads project context when cwd is the real absolute path of the project root; a placeholder or relative path fails. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.\n\nmemory_discover supplies exact schemas and examples for unfamiliar or action-based methods; memory_tools runs their async JavaScript.\n\nRetrieval pages use hydrated for complete records, index for pointer rows, extent for totals, and cursor for continuation. Relevant IDs can be selected before exact originals are hydrated; a refined query or cursor reveals more without paging full bodies merely to discover what exists.\n\nProject work items live in tasks. A pending list requires action:\"list\" and status:\"pending\". Each page is { hydrated, index, extent, cursor }; a complete listing combines hydrated and index and follows cursor until null.\n\nWhich tool for what:\n- memory_get: hydrates exact originals by id.\n- memory_add: saves a discrete decision or root cause.\n- memory_state: corrects wrong, outdated, or conflicting memory.\n- memory_info: explains confidence or origin when memory looks suspect.\n- memory_links: connects related decisions so they surface together.\n- assist: measures coverage when search results are thin or empty.\n- search_summaries: finds past work by topic or date across sessions.\n- policy: stores durable enforced rules or preferences, not memories.\n- tasks: creates follow-up work and closes completed work.\n- code_search: finds conceptual code when source wording differs.\n- memory_search: finds rationale, intent, decisions, and prior work.";
152
158
  /**
153
159
  * Default export for convenience.
154
160
  * Note: This respects the MNEMONIK_INSTRUCTIONS_ENABLED env var.
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuIG;AAsBH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAa3C;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,2/FAAuB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAuB,CAAC"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6IG;AAyBH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAa3C;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,g6DAAuB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAuB,CAAC"}
@@ -4,8 +4,14 @@
4
4
  * This is the SINGLE SOURCE OF TRUTH for MCP instructions.
5
5
  * Shared instruction content imported by the server.
6
6
  *
7
- * Version: 2.109
8
- * Updated: 2026-08-11
7
+ * Version: 2.110
8
+ * Updated: 2026-08-27
9
+ *
10
+ * v2.110 — Reordered and compressed the universal instructions to fit the
11
+ * 2,048-character transport limit. The first 512 characters now carry
12
+ * the server purpose, self-scoping bootstrap condition, required cwd,
13
+ * and memory-as-augmentation stance. The retrieval, task pagination,
14
+ * and tool-floor capabilities remain in a shorter factual form.
9
15
  *
10
16
  * v2.109 — Compressed the v2.108 memory-search clause. It restated, verbatim,
11
17
  * the same search guidance carried by SESSION_OPENER_INSTRUCTION
@@ -134,25 +140,28 @@
134
140
  *
135
141
  * Token-optimised rewrite (superseded by later instruction rewrites).
136
142
  */
137
- // Dynamic response orchestration remains authoritative. The second paragraph is the
138
- // Config-A interpretation fallback when no hook/proxy guidance channel is available.
139
- const INSTRUCTIONS_CONTENT = `If your context does not contain a block beginning "PROJECT_CONTEXT schemaVersion=", call session_bootstrap before replying or taking any other action e.g. session_bootstrap({ cwd: "/absolute/path/to/project" }), where cwd is the real absolute path to the project root you are working in (required; the call fails without it substitute your actual path, not the example). It loads this project's prior decisions, open tasks, and policies. If that block is already present, do not call session_bootstrap; the context is already loaded.
143
+ // Dynamic response orchestration remains authoritative. This universal floor stays
144
+ // self-scoping when project context was already loaded through another channel.
145
+ const INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({ cwd }) loads project context when cwd is the real absolute path of the project root; a placeholder or relative path fails. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
140
146
 
141
- Treat persistent memory as working knowledge: code and docs show current artifacts, git shows changes, and Mnemonik can remember why. For rationale or intent, search memory before relying on files or git history alone, then verify current source with Grep or Read; use code_search when concepts don't share the user's words. Exact call shapes load with the session context.
147
+ memory_discover supplies exact schemas and examples for unfamiliar or action-based methods; memory_tools runs their async JavaScript.
142
148
 
143
- Large retrievals arrive as complete hydrated records plus exact pointer rows and extent/facet counts. Select relevant IDs and hydrate exact originals with mnemonik.memory_get({ memoryIds: [...], includeRaw: true }); refine the query or continue the index cursor when the visible index is incomplete—do not page full bodies merely to discover what exists.
149
+ Retrieval pages use hydrated for complete records, index for pointer rows, extent for totals, and cursor for continuation. Relevant IDs can be selected before exact originals are hydrated; a refined query or cursor reveals more without paging full bodies merely to discover what exists.
144
150
 
145
- Project work items and pending tasks live in mnemonik.tasks, not the host TaskList. A pending-task list requires mnemonik.tasks({ action:"list", status:"pending", ... }); never omit action:"list". If the request says pending, status:"pending" is required—an unfiltered list is wrong. For in-progress, completed, or all-status requests, use the matching status or no status filter. Each list page is { hydrated, index, extent, cursor }, not { tasks }. When the user requests a complete or all-results list, collect [...page.hydrated, ...page.index] in one memory_tools program, repeat the same inner query with each returned cursor until cursor is null, then return compact id/title/status rows. Every row carries title, priority and status — hydrated and pointer alike; read them uniformly and never hydrate a body just to label it. Do not stop at the first retrieval envelope.
151
+ Project work items live in tasks. A pending list requires action:"list" and status:"pending". Each page is { hydrated, index, extent, cursor }; a complete listing combines hydrated and index and follows cursor until null.
146
152
 
147
- Which tool for what — reach past memory_search and checkpoint for these:
148
- - memory_add persist a discrete decision or root cause the moment you make it; do not bury it in a checkpoint summary.
149
- - memory_state a memory is wrong or outdated: supersede/deprecate/dispute it, do not add a competing copy.
150
- - memory_info a memory looks suspect (low confidence, odd origin): investigate it before you act on or discard it.
151
- - memory_links connect related decisions so they surface together.
152
- - assist search results are thin or empty: check for coverage gaps.
153
- - search_summaries find past work by topic or date across prior sessions.
154
- - policy a durable rule or preference belongs here (enforced), not in a memory.
155
- - tasks create follow-up work here, and close tasks when done so the pending list stays honest.`;
153
+ Which tool for what:
154
+ - memory_get: hydrates exact originals by id.
155
+ - memory_add: saves a discrete decision or root cause.
156
+ - memory_state: corrects wrong, outdated, or conflicting memory.
157
+ - memory_info: explains confidence or origin when memory looks suspect.
158
+ - memory_links: connects related decisions so they surface together.
159
+ - assist: measures coverage when search results are thin or empty.
160
+ - search_summaries: finds past work by topic or date across sessions.
161
+ - policy: stores durable enforced rules or preferences, not memories.
162
+ - tasks: creates follow-up work and closes completed work.
163
+ - code_search: finds conceptual code when source wording differs.
164
+ - memory_search: finds rationale, intent, decisions, and prior work.`;
156
165
  /**
157
166
  * Get MCP instructions, respecting MNEMONIK_INSTRUCTIONS_ENABLED env var.
158
167
  * Set MNEMONIK_INSTRUCTIONS_ENABLED=false to disable for testing.
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuIG;AAEH,oFAAoF;AACpF,qFAAqF;AACrF,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;kGAgBqE,CAAC;AAEnG;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB;IAChC,0EAA0E;IAC1E,2EAA2E;IAC3E,+DAA+D;IAC/D,MAAM,OAAO,GAAI,UAAyE;SACvF,OAAO,CAAC;IACX,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC;QAClB,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK,OAAO,EAAE,CAAC;QAC1D,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6IG;AAEH,mFAAmF;AACnF,gFAAgF;AAChF,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;qEAmBwC,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB;IAChC,0EAA0E;IAC1E,2EAA2E;IAC3E,+DAA+D;IAC/D,MAAM,OAAO,GAAI,UAAyE;SACvF,OAAO,CAAC;IACX,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC;QAClB,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK,OAAO,EAAE,CAAC;QAC1D,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnemonik/shared",
3
- "version": "7.58.0",
3
+ "version": "7.65.0",
4
4
  "description": "Shared constants and utilities for Mnemonik packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4,8 +4,14 @@
4
4
  * This is the SINGLE SOURCE OF TRUTH for MCP instructions.
5
5
  * Shared instruction content imported by the server.
6
6
  *
7
- * Version: 2.109
8
- * Updated: 2026-08-11
7
+ * Version: 2.110
8
+ * Updated: 2026-08-27
9
+ *
10
+ * v2.110 — Reordered and compressed the universal instructions to fit the
11
+ * 2,048-character transport limit. The first 512 characters now carry
12
+ * the server purpose, self-scoping bootstrap condition, required cwd,
13
+ * and memory-as-augmentation stance. The retrieval, task pagination,
14
+ * and tool-floor capabilities remain in a shorter factual form.
9
15
  *
10
16
  * v2.109 — Compressed the v2.108 memory-search clause. It restated, verbatim,
11
17
  * the same search guidance carried by SESSION_OPENER_INSTRUCTION
@@ -135,25 +141,28 @@
135
141
  * Token-optimised rewrite (superseded by later instruction rewrites).
136
142
  */
137
143
 
138
- // Dynamic response orchestration remains authoritative. The second paragraph is the
139
- // Config-A interpretation fallback when no hook/proxy guidance channel is available.
140
- const INSTRUCTIONS_CONTENT = `If your context does not contain a block beginning "PROJECT_CONTEXT schemaVersion=", call session_bootstrap before replying or taking any other action e.g. session_bootstrap({ cwd: "/absolute/path/to/project" }), where cwd is the real absolute path to the project root you are working in (required; the call fails without it substitute your actual path, not the example). It loads this project's prior decisions, open tasks, and policies. If that block is already present, do not call session_bootstrap; the context is already loaded.
144
+ // Dynamic response orchestration remains authoritative. This universal floor stays
145
+ // self-scoping when project context was already loaded through another channel.
146
+ const INSTRUCTIONS_CONTENT = `Mnemonik provides persistent project memory: decisions, rationale, tasks, and policies across sessions. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({ cwd }) loads project context when cwd is the real absolute path of the project root; a placeholder or relative path fails. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and memory carries the why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
141
147
 
142
- Treat persistent memory as working knowledge: code and docs show current artifacts, git shows changes, and Mnemonik can remember why. For rationale or intent, search memory before relying on files or git history alone, then verify current source with Grep or Read; use code_search when concepts don't share the user's words. Exact call shapes load with the session context.
148
+ memory_discover supplies exact schemas and examples for unfamiliar or action-based methods; memory_tools runs their async JavaScript.
143
149
 
144
- Large retrievals arrive as complete hydrated records plus exact pointer rows and extent/facet counts. Select relevant IDs and hydrate exact originals with mnemonik.memory_get({ memoryIds: [...], includeRaw: true }); refine the query or continue the index cursor when the visible index is incomplete—do not page full bodies merely to discover what exists.
150
+ Retrieval pages use hydrated for complete records, index for pointer rows, extent for totals, and cursor for continuation. Relevant IDs can be selected before exact originals are hydrated; a refined query or cursor reveals more without paging full bodies merely to discover what exists.
145
151
 
146
- Project work items and pending tasks live in mnemonik.tasks, not the host TaskList. A pending-task list requires mnemonik.tasks({ action:"list", status:"pending", ... }); never omit action:"list". If the request says pending, status:"pending" is required—an unfiltered list is wrong. For in-progress, completed, or all-status requests, use the matching status or no status filter. Each list page is { hydrated, index, extent, cursor }, not { tasks }. When the user requests a complete or all-results list, collect [...page.hydrated, ...page.index] in one memory_tools program, repeat the same inner query with each returned cursor until cursor is null, then return compact id/title/status rows. Every row carries title, priority and status — hydrated and pointer alike; read them uniformly and never hydrate a body just to label it. Do not stop at the first retrieval envelope.
152
+ Project work items live in tasks. A pending list requires action:"list" and status:"pending". Each page is { hydrated, index, extent, cursor }; a complete listing combines hydrated and index and follows cursor until null.
147
153
 
148
- Which tool for what — reach past memory_search and checkpoint for these:
149
- - memory_add persist a discrete decision or root cause the moment you make it; do not bury it in a checkpoint summary.
150
- - memory_state a memory is wrong or outdated: supersede/deprecate/dispute it, do not add a competing copy.
151
- - memory_info a memory looks suspect (low confidence, odd origin): investigate it before you act on or discard it.
152
- - memory_links connect related decisions so they surface together.
153
- - assist search results are thin or empty: check for coverage gaps.
154
- - search_summaries find past work by topic or date across prior sessions.
155
- - policy a durable rule or preference belongs here (enforced), not in a memory.
156
- - tasks create follow-up work here, and close tasks when done so the pending list stays honest.`;
154
+ Which tool for what:
155
+ - memory_get: hydrates exact originals by id.
156
+ - memory_add: saves a discrete decision or root cause.
157
+ - memory_state: corrects wrong, outdated, or conflicting memory.
158
+ - memory_info: explains confidence or origin when memory looks suspect.
159
+ - memory_links: connects related decisions so they surface together.
160
+ - assist: measures coverage when search results are thin or empty.
161
+ - search_summaries: finds past work by topic or date across sessions.
162
+ - policy: stores durable enforced rules or preferences, not memories.
163
+ - tasks: creates follow-up work and closes completed work.
164
+ - code_search: finds conceptual code when source wording differs.
165
+ - memory_search: finds rationale, intent, decisions, and prior work.`;
157
166
 
158
167
  /**
159
168
  * Get MCP instructions, respecting MNEMONIK_INSTRUCTIONS_ENABLED env var.