@mnemonik/shared 7.59.2 → 7.68.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 +9 -3
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +26 -17
- package/dist/instructions.js.map +1 -1
- package/dist/secretPatterns.d.ts.map +1 -1
- package/dist/secretPatterns.js +5 -7
- package/dist/secretPatterns.js.map +1 -1
- package/package.json +1 -1
- package/src/instructions.ts +26 -17
- package/src/secretPatterns.ts +5 -7
package/dist/instructions.d.ts
CHANGED
|
@@ -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.
|
|
8
|
-
* Updated: 2026-08-
|
|
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 = "
|
|
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
|
|
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"}
|
package/dist/instructions.js
CHANGED
|
@@ -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.
|
|
8
|
-
* Updated: 2026-08-
|
|
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.
|
|
138
|
-
//
|
|
139
|
-
const INSTRUCTIONS_CONTENT = `
|
|
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
|
-
|
|
147
|
+
memory_discover supplies exact schemas and examples for unfamiliar or action-based methods; memory_tools runs their async JavaScript.
|
|
142
148
|
|
|
143
|
-
|
|
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
|
|
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
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
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.
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secretPatterns.d.ts","sourceRoot":"","sources":["../src/secretPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,eAAO,MAAM,4BAA4B,eAAe,CAAC;AAGzD,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"secretPatterns.d.ts","sourceRoot":"","sources":["../src/secretPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,eAAO,MAAM,4BAA4B,eAAe,CAAC;AAGzD,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,MAAM,CA2CjD,CAAC;AA0HF;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAc5D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWjD"}
|
package/dist/secretPatterns.js
CHANGED
|
@@ -73,13 +73,11 @@ export const SECRET_PATTERNS = [
|
|
|
73
73
|
/\bAIza[0-9A-Za-z_-]{35}\b/g,
|
|
74
74
|
/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g,
|
|
75
75
|
/\b(?:npm_|npms_)[A-Za-z0-9]{36,}\b/g,
|
|
76
|
-
// scheme://
|
|
77
|
-
// host and path survive for anyone reading the code.
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
// because the character classes exclude `/`.
|
|
82
|
-
/\b[a-z][a-z0-9+.-]*:\/\/[^/\s:@]*:[^/\s:@]+@/gi,
|
|
76
|
+
// scheme://userinfo@: only the credential segment is consumed, so the
|
|
77
|
+
// host and path survive for anyone reading the code. Userinfo may contain
|
|
78
|
+
// empty fields or additional `:` / `@` characters; greediness selects its
|
|
79
|
+
// final `@`, while `/`, `?`, and `#` keep paths and queries out of the match.
|
|
80
|
+
/\b[a-z][a-z0-9+.-]*:\/\/[^/\s?#]*@/gi,
|
|
83
81
|
// Authorization: Bearer <token>. The token class deliberately excludes
|
|
84
82
|
// `<` and `$`, so documentation placeholders (`Bearer <your-api-key>`,
|
|
85
83
|
// `Bearer $MNEMONIK_PROXY_TOKEN`) are left intact — redacting those would
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secretPatterns.js","sourceRoot":"","sources":["../src/secretPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,YAAY,CAAC;AAEzD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAA0B;IACpD,sEAAsE;IACtE,wEAAwE;IACxE,oEAAoE;IACpE,qEAAqE;IACrE,kEAAkE;IAClE,2CAA2C;IAC3C,2CAA2C;IAC3C,gCAAgC;IAChC,sBAAsB;IACtB,0BAA0B;IAC1B,uEAAuE;IACvE,wEAAwE;IACxE,oEAAoE;IACpE,oEAAoE;IACpE,sEAAsE;IACtE,qHAAqH;IACrH,yDAAyD;IACzD,0EAA0E;IAC1E,mEAAmE;IACnE,uBAAuB;IACvB,uBAAuB;IACvB,2EAA2E;IAC3E,2EAA2E;IAC3E,oDAAoD;IACpD,yDAAyD;IACzD,yEAAyE;IACzE,oCAAoC;IACpC,mEAAmE;IACnE,mCAAmC;IACnC,4BAA4B;IAC5B,gCAAgC;IAChC,qCAAqC;IACrC,
|
|
1
|
+
{"version":3,"file":"secretPatterns.js","sourceRoot":"","sources":["../src/secretPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,YAAY,CAAC;AAEzD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAA0B;IACpD,sEAAsE;IACtE,wEAAwE;IACxE,oEAAoE;IACpE,qEAAqE;IACrE,kEAAkE;IAClE,2CAA2C;IAC3C,2CAA2C;IAC3C,gCAAgC;IAChC,sBAAsB;IACtB,0BAA0B;IAC1B,uEAAuE;IACvE,wEAAwE;IACxE,oEAAoE;IACpE,oEAAoE;IACpE,sEAAsE;IACtE,qHAAqH;IACrH,yDAAyD;IACzD,0EAA0E;IAC1E,mEAAmE;IACnE,uBAAuB;IACvB,uBAAuB;IACvB,2EAA2E;IAC3E,2EAA2E;IAC3E,oDAAoD;IACpD,yDAAyD;IACzD,yEAAyE;IACzE,oCAAoC;IACpC,mEAAmE;IACnE,mCAAmC;IACnC,4BAA4B;IA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,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,4BAA4B,CACrE,CAAC;IACJ,CAAC;IACD,yEAAyE;IACzE,iEAAiE;IACjE,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
package/src/instructions.ts
CHANGED
|
@@ -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.
|
|
8
|
-
* Updated: 2026-08-
|
|
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.
|
|
139
|
-
//
|
|
140
|
-
const INSTRUCTIONS_CONTENT = `
|
|
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
|
-
|
|
148
|
+
memory_discover supplies exact schemas and examples for unfamiliar or action-based methods; memory_tools runs their async JavaScript.
|
|
143
149
|
|
|
144
|
-
|
|
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
|
|
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
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
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.
|
package/src/secretPatterns.ts
CHANGED
|
@@ -75,13 +75,11 @@ export const SECRET_PATTERNS: ReadonlyArray<RegExp> = [
|
|
|
75
75
|
/\bAIza[0-9A-Za-z_-]{35}\b/g,
|
|
76
76
|
/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g,
|
|
77
77
|
/\b(?:npm_|npms_)[A-Za-z0-9]{36,}\b/g,
|
|
78
|
-
// scheme://
|
|
79
|
-
// host and path survive for anyone reading the code.
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
|
|
83
|
-
// because the character classes exclude `/`.
|
|
84
|
-
/\b[a-z][a-z0-9+.-]*:\/\/[^/\s:@]*:[^/\s:@]+@/gi,
|
|
78
|
+
// scheme://userinfo@: only the credential segment is consumed, so the
|
|
79
|
+
// host and path survive for anyone reading the code. Userinfo may contain
|
|
80
|
+
// empty fields or additional `:` / `@` characters; greediness selects its
|
|
81
|
+
// final `@`, while `/`, `?`, and `#` keep paths and queries out of the match.
|
|
82
|
+
/\b[a-z][a-z0-9+.-]*:\/\/[^/\s?#]*@/gi,
|
|
85
83
|
// Authorization: Bearer <token>. The token class deliberately excludes
|
|
86
84
|
// `<` and `$`, so documentation placeholders (`Bearer <your-api-key>`,
|
|
87
85
|
// `Bearer $MNEMONIK_PROXY_TOKEN`) are left intact — redacting those would
|