@mnemonik/shared 7.2.2 → 7.17.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.
- package/dist/instructions.d.ts +14 -3
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +15 -2
- package/dist/instructions.js.map +1 -1
- package/package.json +1 -1
- package/src/instructions.ts +15 -2
package/dist/instructions.d.ts
CHANGED
|
@@ -4,8 +4,19 @@
|
|
|
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.
|
|
8
|
-
* Updated: 2026-
|
|
7
|
+
* Version: 2.108
|
|
8
|
+
* Updated: 2026-08-03
|
|
9
|
+
*
|
|
10
|
+
* v2.108 — Added front-loaded education that persistent project memory is part
|
|
11
|
+
* of the agent's working knowledge. A live Config-B fixture rejected
|
|
12
|
+
* the first generic invitation: the agent searched code, docs, and git
|
|
13
|
+
* history, then called the rationale undocumented without searching
|
|
14
|
+
* memory. The instruction now names the missing reasoning step and its
|
|
15
|
+
* address: rationale/intent questions use mnemonik.memory_search inside
|
|
16
|
+
* memory_tools, paired with current-source inspection; conceptual code
|
|
17
|
+
* discovery uses code_search alongside exact Grep/Read. The accepted
|
|
18
|
+
* wording stays a compact startup floor, not a token-heavy tutorial or
|
|
19
|
+
* recurring nudge.
|
|
9
20
|
*
|
|
10
21
|
* v2.106 — Added a static "Which tool for what" floor map. Rides the already-
|
|
11
22
|
* cached instructions at near-zero cost and gives every agent a baseline
|
|
@@ -123,7 +134,7 @@ export declare function getMcpInstructions(): string;
|
|
|
123
134
|
* Raw instructions content (always returns the content, ignores env var).
|
|
124
135
|
* Use getMcpInstructions() for production code.
|
|
125
136
|
*/
|
|
126
|
-
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\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.";
|
|
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.";
|
|
127
138
|
/**
|
|
128
139
|
* Default export for convenience.
|
|
129
140
|
* 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
|
|
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"}
|
package/dist/instructions.js
CHANGED
|
@@ -4,8 +4,19 @@
|
|
|
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.
|
|
8
|
-
* Updated: 2026-
|
|
7
|
+
* Version: 2.108
|
|
8
|
+
* Updated: 2026-08-03
|
|
9
|
+
*
|
|
10
|
+
* v2.108 — Added front-loaded education that persistent project memory is part
|
|
11
|
+
* of the agent's working knowledge. A live Config-B fixture rejected
|
|
12
|
+
* the first generic invitation: the agent searched code, docs, and git
|
|
13
|
+
* history, then called the rationale undocumented without searching
|
|
14
|
+
* memory. The instruction now names the missing reasoning step and its
|
|
15
|
+
* address: rationale/intent questions use mnemonik.memory_search inside
|
|
16
|
+
* memory_tools, paired with current-source inspection; conceptual code
|
|
17
|
+
* discovery uses code_search alongside exact Grep/Read. The accepted
|
|
18
|
+
* wording stays a compact startup floor, not a token-heavy tutorial or
|
|
19
|
+
* recurring nudge.
|
|
9
20
|
*
|
|
10
21
|
* v2.106 — Added a static "Which tool for what" floor map. Rides the already-
|
|
11
22
|
* cached instructions at near-zero cost and gives every agent a baseline
|
|
@@ -113,6 +124,8 @@
|
|
|
113
124
|
// Config-A interpretation fallback when no hook/proxy guidance channel is available.
|
|
114
125
|
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.
|
|
115
126
|
|
|
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.
|
|
128
|
+
|
|
116
129
|
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.
|
|
117
130
|
|
|
118
131
|
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.
|
package/dist/instructions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyHG;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"}
|
package/package.json
CHANGED
package/src/instructions.ts
CHANGED
|
@@ -4,8 +4,19 @@
|
|
|
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.
|
|
8
|
-
* Updated: 2026-
|
|
7
|
+
* Version: 2.108
|
|
8
|
+
* Updated: 2026-08-03
|
|
9
|
+
*
|
|
10
|
+
* v2.108 — Added front-loaded education that persistent project memory is part
|
|
11
|
+
* of the agent's working knowledge. A live Config-B fixture rejected
|
|
12
|
+
* the first generic invitation: the agent searched code, docs, and git
|
|
13
|
+
* history, then called the rationale undocumented without searching
|
|
14
|
+
* memory. The instruction now names the missing reasoning step and its
|
|
15
|
+
* address: rationale/intent questions use mnemonik.memory_search inside
|
|
16
|
+
* memory_tools, paired with current-source inspection; conceptual code
|
|
17
|
+
* discovery uses code_search alongside exact Grep/Read. The accepted
|
|
18
|
+
* wording stays a compact startup floor, not a token-heavy tutorial or
|
|
19
|
+
* recurring nudge.
|
|
9
20
|
*
|
|
10
21
|
* v2.106 — Added a static "Which tool for what" floor map. Rides the already-
|
|
11
22
|
* cached instructions at near-zero cost and gives every agent a baseline
|
|
@@ -114,6 +125,8 @@
|
|
|
114
125
|
// Config-A interpretation fallback when no hook/proxy guidance channel is available.
|
|
115
126
|
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.
|
|
116
127
|
|
|
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.
|
|
129
|
+
|
|
117
130
|
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.
|
|
118
131
|
|
|
119
132
|
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.
|