@frontmcp/plugin-codecall 1.7.1 → 1.7.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/esm/index.mjs
CHANGED
|
@@ -1962,6 +1962,7 @@ function assertNotSelfReference(toolName) {
|
|
|
1962
1962
|
|
|
1963
1963
|
// plugins/plugin-codecall/src/utils/build-tool-namespaces.ts
|
|
1964
1964
|
var IDENT_RE = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
1965
|
+
var PROTOTYPE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
1965
1966
|
var RESERVED_NAMESPACES = /* @__PURE__ */ new Set([
|
|
1966
1967
|
"console",
|
|
1967
1968
|
"Math",
|
|
@@ -1994,7 +1995,7 @@ var RESERVED_NAMESPACES = /* @__PURE__ */ new Set([
|
|
|
1994
1995
|
"mcpNotify"
|
|
1995
1996
|
]);
|
|
1996
1997
|
function buildToolNamespaces(tools, callTool) {
|
|
1997
|
-
const namespaces =
|
|
1998
|
+
const namespaces = /* @__PURE__ */ Object.create(null);
|
|
1998
1999
|
const skipped = [];
|
|
1999
2000
|
for (const tool of tools) {
|
|
2000
2001
|
const name = tool?.name;
|
|
@@ -2010,11 +2011,15 @@ function buildToolNamespaces(tools, callTool) {
|
|
|
2010
2011
|
skipped.push({ name, reason: "invalid-identifier" });
|
|
2011
2012
|
continue;
|
|
2012
2013
|
}
|
|
2014
|
+
if (PROTOTYPE_KEYS.has(ns)) {
|
|
2015
|
+
skipped.push({ name, reason: "prototype-key" });
|
|
2016
|
+
continue;
|
|
2017
|
+
}
|
|
2013
2018
|
if (RESERVED_NAMESPACES.has(ns)) {
|
|
2014
2019
|
skipped.push({ name, reason: "reserved-namespace" });
|
|
2015
2020
|
continue;
|
|
2016
2021
|
}
|
|
2017
|
-
const bucket = namespaces[ns] ?? (namespaces[ns] =
|
|
2022
|
+
const bucket = namespaces[ns] ?? (namespaces[ns] = /* @__PURE__ */ Object.create(null));
|
|
2018
2023
|
if (Object.prototype.hasOwnProperty.call(bucket, method)) {
|
|
2019
2024
|
skipped.push({ name, reason: "duplicate-method" });
|
|
2020
2025
|
continue;
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/plugin-codecall",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "CodeCall plugin for FrontMCP - AgentScript-based meta-tools for orchestrating MCP tools",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@enclave-vm/core": "^2.15.2",
|
|
52
|
-
"@frontmcp/protocol": "1.7.
|
|
53
|
-
"@frontmcp/sdk": "1.7.
|
|
52
|
+
"@frontmcp/protocol": "1.7.2",
|
|
53
|
+
"@frontmcp/sdk": "1.7.2",
|
|
54
54
|
"vectoriadb": "^2.3.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@frontmcp/lazy-zod": "1.7.
|
|
58
|
-
"@frontmcp/plugin-cache": "1.7.
|
|
57
|
+
"@frontmcp/lazy-zod": "1.7.2",
|
|
58
|
+
"@frontmcp/plugin-cache": "1.7.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"reflect-metadata": "^0.2.2"
|
package/index.js
CHANGED
|
@@ -1999,6 +1999,7 @@ function assertNotSelfReference(toolName) {
|
|
|
1999
1999
|
|
|
2000
2000
|
// plugins/plugin-codecall/src/utils/build-tool-namespaces.ts
|
|
2001
2001
|
var IDENT_RE = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
2002
|
+
var PROTOTYPE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
2002
2003
|
var RESERVED_NAMESPACES = /* @__PURE__ */ new Set([
|
|
2003
2004
|
"console",
|
|
2004
2005
|
"Math",
|
|
@@ -2031,7 +2032,7 @@ var RESERVED_NAMESPACES = /* @__PURE__ */ new Set([
|
|
|
2031
2032
|
"mcpNotify"
|
|
2032
2033
|
]);
|
|
2033
2034
|
function buildToolNamespaces(tools, callTool) {
|
|
2034
|
-
const namespaces =
|
|
2035
|
+
const namespaces = /* @__PURE__ */ Object.create(null);
|
|
2035
2036
|
const skipped = [];
|
|
2036
2037
|
for (const tool of tools) {
|
|
2037
2038
|
const name = tool?.name;
|
|
@@ -2047,11 +2048,15 @@ function buildToolNamespaces(tools, callTool) {
|
|
|
2047
2048
|
skipped.push({ name, reason: "invalid-identifier" });
|
|
2048
2049
|
continue;
|
|
2049
2050
|
}
|
|
2051
|
+
if (PROTOTYPE_KEYS.has(ns)) {
|
|
2052
|
+
skipped.push({ name, reason: "prototype-key" });
|
|
2053
|
+
continue;
|
|
2054
|
+
}
|
|
2050
2055
|
if (RESERVED_NAMESPACES.has(ns)) {
|
|
2051
2056
|
skipped.push({ name, reason: "reserved-namespace" });
|
|
2052
2057
|
continue;
|
|
2053
2058
|
}
|
|
2054
|
-
const bucket = namespaces[ns] ?? (namespaces[ns] =
|
|
2059
|
+
const bucket = namespaces[ns] ?? (namespaces[ns] = /* @__PURE__ */ Object.create(null));
|
|
2055
2060
|
if (Object.prototype.hasOwnProperty.call(bucket, method)) {
|
|
2056
2061
|
skipped.push({ name, reason: "duplicate-method" });
|
|
2057
2062
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/plugin-codecall",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "CodeCall plugin for FrontMCP - AgentScript-based meta-tools for orchestrating MCP tools",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@enclave-vm/core": "^2.15.2",
|
|
52
|
-
"@frontmcp/protocol": "1.7.
|
|
53
|
-
"@frontmcp/sdk": "1.7.
|
|
52
|
+
"@frontmcp/protocol": "1.7.2",
|
|
53
|
+
"@frontmcp/sdk": "1.7.2",
|
|
54
54
|
"vectoriadb": "^2.3.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@frontmcp/lazy-zod": "1.7.
|
|
58
|
-
"@frontmcp/plugin-cache": "1.7.
|
|
57
|
+
"@frontmcp/lazy-zod": "1.7.2",
|
|
58
|
+
"@frontmcp/plugin-cache": "1.7.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"reflect-metadata": "^0.2.2"
|
|
@@ -20,7 +20,7 @@ export type ToolNamespaces = Record<string, ToolNamespace>;
|
|
|
20
20
|
* Reasons a tool may be skipped during namespace generation. Returned so the
|
|
21
21
|
* caller can surface diagnostics without re-deriving the rules.
|
|
22
22
|
*/
|
|
23
|
-
export type NamespaceSkipReason = 'no-namespace-prefix' | 'invalid-identifier' | 'reserved-namespace' | 'duplicate-method';
|
|
23
|
+
export type NamespaceSkipReason = 'no-namespace-prefix' | 'invalid-identifier' | 'reserved-namespace' | 'prototype-key' | 'duplicate-method';
|
|
24
24
|
export interface BuildToolNamespacesResult {
|
|
25
25
|
/** The namespaces object to merge into the VM globals. */
|
|
26
26
|
namespaces: ToolNamespaces;
|
|
@@ -37,6 +37,8 @@ export interface BuildToolNamespacesResult {
|
|
|
37
37
|
* - Tools whose name has no `.` are skipped (still callable via `callTool`).
|
|
38
38
|
* - Tools whose prefix or suffix is not a valid JS identifier are skipped.
|
|
39
39
|
* - Tools whose prefix collides with a reserved global are skipped.
|
|
40
|
+
* - Tools whose PREFIX is a prototype key (`__proto__`, `constructor`,
|
|
41
|
+
* `prototype`) are skipped — they would write onto a JavaScript intrinsic.
|
|
40
42
|
* - First registration wins on duplicate `{ns}.{method}` (subsequent are reported as skipped).
|
|
41
43
|
*
|
|
42
44
|
* The returned methods are thin wrappers that delegate to `callTool` with the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-tool-namespaces.d.ts","sourceRoot":"","sources":["../../src/utils/build-tool-namespaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"build-tool-namespaces.d.ts","sourceRoot":"","sources":["../../src/utils/build-tool-namespaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA2DjE;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC/B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,eAAe,KACtB,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAE7G,0FAA0F;AAC1F,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,qBAAqB,GACrB,oBAAoB,GACpB,oBAAoB,GACpB,eAAe,GACf,kBAAkB,CAAC;AAEvB,MAAM,WAAW,yBAAyB;IACxC,0DAA0D;IAC1D,UAAU,EAAE,cAAc,CAAC;IAC3B,+EAA+E;IAC/E,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,mBAAmB,CAAA;KAAE,CAAC,CAAC;CAC/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACvC,QAAQ,EAAE,kBAAkB,GAC3B,yBAAyB,CAsD3B"}
|