@mnemonik/shared 6.2.0 → 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.
- package/dist/instructions.d.ts +10 -13
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +10 -18
- package/dist/instructions.js.map +1 -1
- package/package.json +1 -1
- package/src/instructions.ts +10 -18
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-
|
|
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 = "
|
|
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
|
|
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"}
|
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-
|
|
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 =
|
|
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
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
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-
|
|
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 =
|
|
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();
|