@mnemonik/shared 7.164.3 → 7.165.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/contextBudget.js
CHANGED
|
@@ -8,9 +8,9 @@ export const REFLEX_NOTE_BUDGET_BYTES = {
|
|
|
8
8
|
vscode: 6_000,
|
|
9
9
|
};
|
|
10
10
|
const JOINER = '\n\n';
|
|
11
|
-
const NOT_REACHED_PREFIX = '...
|
|
11
|
+
const NOT_REACHED_PREFIX = '... more to recall: ';
|
|
12
12
|
function truncatedMemoryMarker(memoryId) {
|
|
13
|
-
return `... [
|
|
13
|
+
return `... [cut short; memory_get ${memoryId} recalls the rest]`;
|
|
14
14
|
}
|
|
15
15
|
function itemMemoryIds(item) {
|
|
16
16
|
if (item.memoryIds && item.memoryIds.length > 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextBudget.js","sourceRoot":"","sources":["../src/contextBudget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAIlE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,KAAK;IACX,MAAM,EAAE,KAAK;CACL,CAAC;AA0BX,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"contextBudget.js","sourceRoot":"","sources":["../src/contextBudget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAIlE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,KAAK;I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,CAAC,EAAE,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,OAAO,+DAA+D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAAC,IAAY;IACvD,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IACtD,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,YAAoB,EACpB,IAAmF;IAEnF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,YAAY,CAAC;IACzC,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC5D,OAAO,eAAe,CAAC,oBAAoB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC;AAC/F,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrF,CAAC"}
|
package/dist/instructions.d.ts
CHANGED
|
@@ -167,7 +167,7 @@ export declare function getMcpInstructions(): string;
|
|
|
167
167
|
* Raw instructions content (always returns the content, ignores env var).
|
|
168
168
|
* Use getMcpInstructions() for production code.
|
|
169
169
|
*/
|
|
170
|
-
export declare const MCP_INSTRUCTIONS_RAW = "Mnemonik
|
|
170
|
+
export declare const MCP_INSTRUCTIONS_RAW = "Mnemonik is your lasting memory of this project: what you decided and why, what you found, tasks and policies. If no block begins \"PROJECT_CONTEXT schemaVersion=\", session_bootstrap({}) loads project context; installed hooks supply the project. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and you remember why; memory_search recalls rationale or intent, then Grep or Read verifies current source.\n\nWhat I learn about you belongs in Companion; what I learn about this project belongs here.\n\nmemory_discover supplies exact schemas and examples for unfamiliar methods; memory_tools runs their async JavaScript.\n\nRecall pages put the memories you recall in full in hydrated, pointers to more in index, how many match in extent, and the next page in cursor. Pick the ids you need before recalling whole memories; to see what else exists, ask a sharper question or follow the cursor instead of paging through whole memories.\n\nProject work items live in tasks. A pending list requires action:\"list\" and status:\"pending\". A complete listing combines hydrated and index and follows cursor until null.\n\nWhich tool for what:\n- memory_get: recalls exact memories whole by id.\n- memory_add: memorizes an experience: a decision and why, what the user said, what you found.\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 you recall them together.\n- assist: measures coverage when a recall comes back 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.\n- memory_ingest: brings the project's docs and code comments into memory when asked.";
|
|
171
171
|
/**
|
|
172
172
|
* Default export for convenience.
|
|
173
173
|
* 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0JG;AA4BH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAa3C;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0JG;AA4BH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAa3C;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,4hEAAuB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAuB,CAAC"}
|
package/dist/instructions.js
CHANGED
|
@@ -155,23 +155,23 @@
|
|
|
155
155
|
*/
|
|
156
156
|
// Dynamic response orchestration remains authoritative. This universal floor stays
|
|
157
157
|
// self-scoping when project context was already loaded through another channel.
|
|
158
|
-
const INSTRUCTIONS_CONTENT = `Mnemonik
|
|
158
|
+
const INSTRUCTIONS_CONTENT = `Mnemonik is your lasting memory of this project: what you decided and why, what you found, tasks and policies. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({}) loads project context; installed hooks supply the project. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and you remember why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
|
|
159
159
|
|
|
160
160
|
What I learn about you belongs in Companion; what I learn about this project belongs here.
|
|
161
161
|
|
|
162
162
|
memory_discover supplies exact schemas and examples for unfamiliar methods; memory_tools runs their async JavaScript.
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
Recall pages put the memories you recall in full in hydrated, pointers to more in index, how many match in extent, and the next page in cursor. Pick the ids you need before recalling whole memories; to see what else exists, ask a sharper question or follow the cursor instead of paging through whole memories.
|
|
165
165
|
|
|
166
166
|
Project work items live in tasks. A pending list requires action:"list" and status:"pending". A complete listing combines hydrated and index and follows cursor until null.
|
|
167
167
|
|
|
168
168
|
Which tool for what:
|
|
169
|
-
- memory_get:
|
|
170
|
-
- memory_add:
|
|
169
|
+
- memory_get: recalls exact memories whole by id.
|
|
170
|
+
- memory_add: memorizes an experience: a decision and why, what the user said, what you found.
|
|
171
171
|
- memory_state: corrects wrong, outdated, or conflicting memory.
|
|
172
172
|
- memory_info: explains confidence or origin when memory looks suspect.
|
|
173
|
-
- memory_links: connects related decisions so
|
|
174
|
-
- assist: measures coverage when
|
|
173
|
+
- memory_links: connects related decisions so you recall them together.
|
|
174
|
+
- assist: measures coverage when a recall comes back thin or empty.
|
|
175
175
|
- search_summaries: finds past work by topic or date across sessions.
|
|
176
176
|
- policy: stores durable enforced rules or preferences, not memories.
|
|
177
177
|
- tasks: creates follow-up work and closes completed work.
|
package/package.json
CHANGED
package/src/contextBudget.ts
CHANGED
|
@@ -37,10 +37,10 @@ export interface BudgetedContextFit {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const JOINER = '\n\n';
|
|
40
|
-
const NOT_REACHED_PREFIX = '...
|
|
40
|
+
const NOT_REACHED_PREFIX = '... more to recall: ';
|
|
41
41
|
|
|
42
42
|
function truncatedMemoryMarker(memoryId: string): string {
|
|
43
|
-
return `... [
|
|
43
|
+
return `... [cut short; memory_get ${memoryId} recalls the rest]`;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
function itemMemoryIds(item: ContextBudgetItem): readonly string[] {
|
package/src/instructions.ts
CHANGED
|
@@ -156,23 +156,23 @@
|
|
|
156
156
|
|
|
157
157
|
// Dynamic response orchestration remains authoritative. This universal floor stays
|
|
158
158
|
// self-scoping when project context was already loaded through another channel.
|
|
159
|
-
const INSTRUCTIONS_CONTENT = `Mnemonik
|
|
159
|
+
const INSTRUCTIONS_CONTENT = `Mnemonik is your lasting memory of this project: what you decided and why, what you found, tasks and policies. If no block begins "PROJECT_CONTEXT schemaVersion=", session_bootstrap({}) loads project context; installed hooks supply the project. With that block, context is loaded and no session_bootstrap call is needed. Code and docs show current artifacts, git shows changes, and you remember why; memory_search recalls rationale or intent, then Grep or Read verifies current source.
|
|
160
160
|
|
|
161
161
|
What I learn about you belongs in Companion; what I learn about this project belongs here.
|
|
162
162
|
|
|
163
163
|
memory_discover supplies exact schemas and examples for unfamiliar methods; memory_tools runs their async JavaScript.
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
Recall pages put the memories you recall in full in hydrated, pointers to more in index, how many match in extent, and the next page in cursor. Pick the ids you need before recalling whole memories; to see what else exists, ask a sharper question or follow the cursor instead of paging through whole memories.
|
|
166
166
|
|
|
167
167
|
Project work items live in tasks. A pending list requires action:"list" and status:"pending". A complete listing combines hydrated and index and follows cursor until null.
|
|
168
168
|
|
|
169
169
|
Which tool for what:
|
|
170
|
-
- memory_get:
|
|
171
|
-
- memory_add:
|
|
170
|
+
- memory_get: recalls exact memories whole by id.
|
|
171
|
+
- memory_add: memorizes an experience: a decision and why, what the user said, what you found.
|
|
172
172
|
- memory_state: corrects wrong, outdated, or conflicting memory.
|
|
173
173
|
- memory_info: explains confidence or origin when memory looks suspect.
|
|
174
|
-
- memory_links: connects related decisions so
|
|
175
|
-
- assist: measures coverage when
|
|
174
|
+
- memory_links: connects related decisions so you recall them together.
|
|
175
|
+
- assist: measures coverage when a recall comes back thin or empty.
|
|
176
176
|
- search_summaries: finds past work by topic or date across sessions.
|
|
177
177
|
- policy: stores durable enforced rules or preferences, not memories.
|
|
178
178
|
- tasks: creates follow-up work and closes completed work.
|