@mnemonik/shared 6.1.1 → 6.2.2

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.102
8
- * Updated: 2026-06-29
7
+ * Version: 2.103
8
+ * Updated: 2026-07-11
9
+ *
10
+ * v2.103 — Removed the model-facing initialize imperative. MCP initialize
11
+ * runs before actor/project/host orchestration can be classified, so
12
+ * it cannot safely own bootstrap timing. Config-B/C bootstrap belongs
13
+ * to hooks/proxy; the project-resolved response path owns Config-A.
14
+ * Returning an empty string makes the server omit `instructions`.
9
15
  *
10
16
  * v2.102 — Strengthened the self-bootstrap trigger to a compelling imperative.
11
17
  * The v2.101 phrasing ("At the start of a session, unless ... call ...")
@@ -82,24 +88,15 @@
82
88
  *
83
89
  * Token-optimised rewrite (superseded by later instruction rewrites).
84
90
  */
85
- /**
86
- * Get MCP instructions, respecting MNEMONIK_INSTRUCTIONS_ENABLED env var.
87
- * Set MNEMONIK_INSTRUCTIONS_ENABLED=false to disable for testing.
88
- *
89
- * Reads env through globalThis so this package compiles cleanly without
90
- * `@types/node` (shared package's tsconfig doesn't include it, which made
91
- * IDEs flag `process` as an unknown global even though the workspace
92
- * tsc resolution found it).
93
- */
91
+ /** MCP initialize intentionally carries no model-facing orchestration. */
94
92
  export declare function getMcpInstructions(): string;
95
93
  /**
96
94
  * Raw instructions content (always returns the content, ignores env var).
97
95
  * Use getMcpInstructions() for production code.
98
96
  */
99
- export declare const MCP_INSTRUCTIONS_RAW = "If your context does not contain a block beginning \"Mnemonik project context (cached\", 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.";
97
+ export declare const MCP_INSTRUCTIONS_RAW = "";
100
98
  /**
101
99
  * Default export for convenience.
102
- * Note: This respects the MNEMONIK_INSTRUCTIONS_ENABLED env var.
103
100
  */
104
101
  export declare const MCP_INSTRUCTIONS: string;
105
102
  //# sourceMappingURL=instructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAIH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+iBAAuB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAuB,CAAC"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAIH,0EAA0E;AAC1E,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAuB,CAAC;AAEzD;;GAEG;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.102
8
- * Updated: 2026-06-29
7
+ * Version: 2.103
8
+ * Updated: 2026-07-11
9
+ *
10
+ * v2.103 — Removed the model-facing initialize imperative. MCP initialize
11
+ * runs before actor/project/host orchestration can be classified, so
12
+ * it cannot safely own bootstrap timing. Config-B/C bootstrap belongs
13
+ * to hooks/proxy; the project-resolved response path owns Config-A.
14
+ * Returning an empty string makes the server omit `instructions`.
9
15
  *
10
16
  * v2.102 — Strengthened the self-bootstrap trigger to a compelling imperative.
11
17
  * The v2.101 phrasing ("At the start of a session, unless ... call ...")
@@ -82,22 +88,9 @@
82
88
  *
83
89
  * Token-optimised rewrite (superseded by later instruction rewrites).
84
90
  */
85
- const INSTRUCTIONS_CONTENT = `If your context does not contain a block beginning "Mnemonik project context (cached", 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.`;
86
- /**
87
- * Get MCP instructions, respecting MNEMONIK_INSTRUCTIONS_ENABLED env var.
88
- * Set MNEMONIK_INSTRUCTIONS_ENABLED=false to disable for testing.
89
- *
90
- * Reads env through globalThis so this package compiles cleanly without
91
- * `@types/node` (shared package's tsconfig doesn't include it, which made
92
- * IDEs flag `process` as an unknown global even though the workspace
93
- * tsc resolution found it).
94
- */
91
+ const INSTRUCTIONS_CONTENT = '';
92
+ /** MCP initialize intentionally carries no model-facing orchestration. */
95
93
  export function getMcpInstructions() {
96
- const env = globalThis.process
97
- ?.env;
98
- if (env?.MNEMONIK_INSTRUCTIONS_ENABLED === 'false') {
99
- return '';
100
- }
101
94
  return INSTRUCTIONS_CONTENT;
102
95
  }
103
96
  /**
@@ -107,7 +100,6 @@ export function getMcpInstructions() {
107
100
  export const MCP_INSTRUCTIONS_RAW = INSTRUCTIONS_CONTENT;
108
101
  /**
109
102
  * Default export for convenience.
110
- * Note: This respects the MNEMONIK_INSTRUCTIONS_ENABLED env var.
111
103
  */
112
104
  export const MCP_INSTRUCTIONS = getMcpInstructions();
113
105
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAEH,MAAM,oBAAoB,GAAG,8hBAA8hB,CAAC;AAE5jB;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,GAAG,GAAI,UAAyE,CAAC,OAAO;QAC5F,EAAE,GAAG,CAAC;IACR,IAAI,GAAG,EAAE,6BAA6B,KAAK,OAAO,EAAE,CAAC;QACnD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAEH,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,0EAA0E;AAC1E,MAAM,UAAU,kBAAkB;IAChC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAEzD;;GAEG;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": "6.1.1",
3
+ "version": "6.2.2",
4
4
  "description": "Shared constants and utilities for Mnemonik packages",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -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.102
8
- * Updated: 2026-06-29
7
+ * Version: 2.103
8
+ * Updated: 2026-07-11
9
+ *
10
+ * v2.103 — Removed the model-facing initialize imperative. MCP initialize
11
+ * runs before actor/project/host orchestration can be classified, so
12
+ * it cannot safely own bootstrap timing. Config-B/C bootstrap belongs
13
+ * to hooks/proxy; the project-resolved response path owns Config-A.
14
+ * Returning an empty string makes the server omit `instructions`.
9
15
  *
10
16
  * v2.102 — Strengthened the self-bootstrap trigger to a compelling imperative.
11
17
  * The v2.101 phrasing ("At the start of a session, unless ... call ...")
@@ -83,23 +89,10 @@
83
89
  * Token-optimised rewrite (superseded by later instruction rewrites).
84
90
  */
85
91
 
86
- const INSTRUCTIONS_CONTENT = `If your context does not contain a block beginning "Mnemonik project context (cached", 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.`;
92
+ const INSTRUCTIONS_CONTENT = '';
87
93
 
88
- /**
89
- * Get MCP instructions, respecting MNEMONIK_INSTRUCTIONS_ENABLED env var.
90
- * Set MNEMONIK_INSTRUCTIONS_ENABLED=false to disable for testing.
91
- *
92
- * Reads env through globalThis so this package compiles cleanly without
93
- * `@types/node` (shared package's tsconfig doesn't include it, which made
94
- * IDEs flag `process` as an unknown global even though the workspace
95
- * tsc resolution found it).
96
- */
94
+ /** MCP initialize intentionally carries no model-facing orchestration. */
97
95
  export function getMcpInstructions(): string {
98
- const env = (globalThis as { process?: { env?: Record<string, string | undefined> } }).process
99
- ?.env;
100
- if (env?.MNEMONIK_INSTRUCTIONS_ENABLED === 'false') {
101
- return '';
102
- }
103
96
  return INSTRUCTIONS_CONTENT;
104
97
  }
105
98
 
@@ -111,6 +104,5 @@ export const MCP_INSTRUCTIONS_RAW = INSTRUCTIONS_CONTENT;
111
104
 
112
105
  /**
113
106
  * Default export for convenience.
114
- * Note: This respects the MNEMONIK_INSTRUCTIONS_ENABLED env var.
115
107
  */
116
108
  export const MCP_INSTRUCTIONS = getMcpInstructions();