@mmnto/mcp 0.9.1 → 0.9.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.
@@ -1,8 +1,6 @@
1
+ import { wrapXml } from '@mmnto/totem';
1
2
  /**
2
- * Wraps content in XML delimiters with escaped closing tags to prevent
3
- * indirect prompt injection when MCP tool responses are consumed by LLMs.
4
- *
5
- * @see https://github.com/mmnto-ai/totem/issues/149
3
+ * Alias for wrapXml preserves the existing API used by MCP tools.
6
4
  */
7
- export declare function formatXmlResponse(tag: string, content: string): string;
5
+ export declare const formatXmlResponse: typeof wrapXml;
8
6
  //# sourceMappingURL=xml-format.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"xml-format.d.ts","sourceRoot":"","sources":["../src/xml-format.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAOtE"}
1
+ {"version":3,"file":"xml-format.d.ts","sourceRoot":"","sources":["../src/xml-format.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,iBAAiB,gBAAU,CAAC"}
@@ -1,12 +1,7 @@
1
+ // Re-export from core — unified XML escaping (#158)
2
+ import { wrapXml } from '@mmnto/totem';
1
3
  /**
2
- * Wraps content in XML delimiters with escaped closing tags to prevent
3
- * indirect prompt injection when MCP tool responses are consumed by LLMs.
4
- *
5
- * @see https://github.com/mmnto-ai/totem/issues/149
4
+ * Alias for wrapXml preserves the existing API used by MCP tools.
6
5
  */
7
- export function formatXmlResponse(tag, content) {
8
- const safeTag = tag.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
9
- const escaped = content.replace(new RegExp(`</\\s*${safeTag}\\s*>`, 'gi'), (match) => `<\\/${match.slice(2)}`);
10
- return `<${tag}>\n${escaped}\n</${tag}>`;
11
- }
6
+ export const formatXmlResponse = wrapXml;
12
7
  //# sourceMappingURL=xml-format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"xml-format.js","sourceRoot":"","sources":["../src/xml-format.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW,EAAE,OAAe;IAC5D,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAC7B,IAAI,MAAM,CAAC,SAAS,OAAO,OAAO,EAAE,IAAI,CAAC,EACzC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CACnC,CAAC;IACF,OAAO,IAAI,GAAG,MAAM,OAAO,OAAO,GAAG,GAAG,CAAC;AAC3C,CAAC"}
1
+ {"version":3,"file":"xml-format.js","sourceRoot":"","sources":["../src/xml-format.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmnto/mcp",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "MCP server for Totem — AI persistent memory and context layer",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "@modelcontextprotocol/sdk": "^1.0.0",
19
19
  "jiti": "^2.4.0",
20
20
  "zod": "^3.24.0",
21
- "@mmnto/totem": "0.9.1"
21
+ "@mmnto/totem": "0.9.2"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^22.0.0",