@mnemonik/shared 7.17.0 → 7.27.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,9 +4,23 @@
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.108
8
- * Updated: 2026-08-03
9
- *
7
+ * Version: 2.109
8
+ * Updated: 2026-08-11
9
+ *
10
+ * v2.109 — Compressed the v2.108 memory-search clause. It restated, verbatim,
11
+ * the same search guidance carried by SESSION_OPENER_INSTRUCTION
12
+ * (bootstrapDigestRender.ts) — and both co-occur in the same agent
13
+ * session as the bootstrap digest's capabilities.search block, which
14
+ * already states the memory_search/code_search call signatures in
15
+ * full. Kept the essential behavior (memory holds the why; search it
16
+ * before assuming files or git history are the whole story; verify
17
+ * with Grep/Read; reach for code_search when concepts don't share
18
+ * the user's words), dropped the restated call shapes, and pointed at
19
+ * the session context's capabilities block for the exact signatures
20
+ * once it loads — this text fires at `initialize`, before any
21
+ * digest exists, so it cannot point "above" the way the trimmed
22
+ * SESSION_OPENER clause does. recall-first-class plan, Task A3
23
+ * rider (reviewer-flagged: character-for-character duplicate).
10
24
  * v2.108 — Added front-loaded education that persistent project memory is part
11
25
  * of the agent's working knowledge. A live Config-B fixture rejected
12
26
  * the first generic invitation: the agent searched code, docs, and git
@@ -134,7 +148,7 @@ export declare function getMcpInstructions(): string;
134
148
  * Raw instructions content (always returns the content, ignores env var).
135
149
  * Use getMcpInstructions() for production code.
136
150
  */
137
- 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, intent, or prior attempts, do not stop at files or git history\u2014call mnemonik.memory_search(...) inside memory_tools, then verify current source with Grep or Read. Use mnemonik.code_search(...) when conceptual locations may not share the user's words.\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.";
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.";
138
152
  /**
139
153
  * Default export for convenience.
140
154
  * 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyHG;AAsBH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAa3C;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,0hGAAuB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAuB,CAAC"}
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"}
@@ -4,9 +4,23 @@
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.108
8
- * Updated: 2026-08-03
9
- *
7
+ * Version: 2.109
8
+ * Updated: 2026-08-11
9
+ *
10
+ * v2.109 — Compressed the v2.108 memory-search clause. It restated, verbatim,
11
+ * the same search guidance carried by SESSION_OPENER_INSTRUCTION
12
+ * (bootstrapDigestRender.ts) — and both co-occur in the same agent
13
+ * session as the bootstrap digest's capabilities.search block, which
14
+ * already states the memory_search/code_search call signatures in
15
+ * full. Kept the essential behavior (memory holds the why; search it
16
+ * before assuming files or git history are the whole story; verify
17
+ * with Grep/Read; reach for code_search when concepts don't share
18
+ * the user's words), dropped the restated call shapes, and pointed at
19
+ * the session context's capabilities block for the exact signatures
20
+ * once it loads — this text fires at `initialize`, before any
21
+ * digest exists, so it cannot point "above" the way the trimmed
22
+ * SESSION_OPENER clause does. recall-first-class plan, Task A3
23
+ * rider (reviewer-flagged: character-for-character duplicate).
10
24
  * v2.108 — Added front-loaded education that persistent project memory is part
11
25
  * of the agent's working knowledge. A live Config-B fixture rejected
12
26
  * the first generic invitation: the agent searched code, docs, and git
@@ -124,7 +138,7 @@
124
138
  // Config-A interpretation fallback when no hook/proxy guidance channel is available.
125
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.
126
140
 
127
- Treat persistent memory as working knowledge: code and docs show current artifacts, git shows changes, and Mnemonik can remember why. For rationale, intent, or prior attempts, do not stop at files or git history—call mnemonik.memory_search(...) inside memory_tools, then verify current source with Grep or Read. Use mnemonik.code_search(...) when conceptual locations may not share the user's words.
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.
128
142
 
129
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.
130
144
 
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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.17.0",
3
+ "version": "7.27.0",
4
4
  "description": "Shared constants and utilities for Mnemonik packages",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4,9 +4,23 @@
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.108
8
- * Updated: 2026-08-03
9
- *
7
+ * Version: 2.109
8
+ * Updated: 2026-08-11
9
+ *
10
+ * v2.109 — Compressed the v2.108 memory-search clause. It restated, verbatim,
11
+ * the same search guidance carried by SESSION_OPENER_INSTRUCTION
12
+ * (bootstrapDigestRender.ts) — and both co-occur in the same agent
13
+ * session as the bootstrap digest's capabilities.search block, which
14
+ * already states the memory_search/code_search call signatures in
15
+ * full. Kept the essential behavior (memory holds the why; search it
16
+ * before assuming files or git history are the whole story; verify
17
+ * with Grep/Read; reach for code_search when concepts don't share
18
+ * the user's words), dropped the restated call shapes, and pointed at
19
+ * the session context's capabilities block for the exact signatures
20
+ * once it loads — this text fires at `initialize`, before any
21
+ * digest exists, so it cannot point "above" the way the trimmed
22
+ * SESSION_OPENER clause does. recall-first-class plan, Task A3
23
+ * rider (reviewer-flagged: character-for-character duplicate).
10
24
  * v2.108 — Added front-loaded education that persistent project memory is part
11
25
  * of the agent's working knowledge. A live Config-B fixture rejected
12
26
  * the first generic invitation: the agent searched code, docs, and git
@@ -125,7 +139,7 @@
125
139
  // Config-A interpretation fallback when no hook/proxy guidance channel is available.
126
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.
127
141
 
128
- Treat persistent memory as working knowledge: code and docs show current artifacts, git shows changes, and Mnemonik can remember why. For rationale, intent, or prior attempts, do not stop at files or git history—call mnemonik.memory_search(...) inside memory_tools, then verify current source with Grep or Read. Use mnemonik.code_search(...) when conceptual locations may not share the user's words.
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.
129
143
 
130
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.
131
145