@frontmcp/plugin-codecall 0.12.2 → 1.0.0-beta.10

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.
@@ -26,6 +26,9 @@ export default class CodeCallPlugin extends DynamicPlugin<CodeCallPluginOptions,
26
26
  /**
27
27
  * Determine if a tool should be visible in list_tools based on mode.
28
28
  *
29
+ * When `appIds` is configured, `codecall_only` mode only hides tools from
30
+ * those specific apps — tools from other apps remain visible.
31
+ *
29
32
  * @param tool - The tool entry to check
30
33
  * @param mode - The current CodeCall mode
31
34
  * @returns true if tool should be visible
@@ -1 +1 @@
1
- {"version":3,"file":"codecall.plugin.d.ts","sourceRoot":"","sources":["../src/codecall.plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,SAAS,EAIT,YAAY,EAGb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAEL,qBAAqB,EACrB,0BAA0B,EAG3B,MAAM,kBAAkB,CAAC;AAgB1B,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,aAAa,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;IAC1G,OAAO,EAAE,qBAAqB,CAAC;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAiB;IAEtC,OAAO,CAAC,SAAS;gBAOL,OAAO,GAAE,0BAA+B;IAMpD;;;OAGG;WACa,gBAAgB,CAAC,OAAO,EAAE,0BAA0B,GAAG,YAAY,EAAE;IAuCrF;;;;;;;;;;;OAWG;IAEG,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,kBAAkB,CAAC;IAsB5D;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;;OAGG;IACH,OAAO,CAAC,cAAc;IAKtB;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAG5B"}
1
+ {"version":3,"file":"codecall.plugin.d.ts","sourceRoot":"","sources":["../src/codecall.plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,SAAS,EAIT,YAAY,EAGb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAEL,qBAAqB,EACrB,0BAA0B,EAG3B,MAAM,kBAAkB,CAAC;AAgB1B,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,aAAa,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;IAC1G,OAAO,EAAE,qBAAqB,CAAC;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAiB;IAEtC,OAAO,CAAC,SAAS;gBAOL,OAAO,GAAE,0BAA+B;IAMpD;;;OAGG;WACa,gBAAgB,CAAC,OAAO,EAAE,0BAA0B,GAAG,YAAY,EAAE;IAuCrF;;;;;;;;;;;OAWG;IAEG,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,kBAAkB,CAAC;IAsB5D;;;;;;;;;OASG;IAEH,OAAO,CAAC,qBAAqB;IA4C7B;;;OAGG;IAEH,OAAO,CAAC,cAAc;IAKtB;;OAEG;IAEH,OAAO,CAAC,mBAAmB;CAG5B"}
@@ -119,6 +119,7 @@ declare const codeCallPluginOptionsObjectSchema: z.ZodObject<{
119
119
  codecall_opt_in: "codecall_opt_in";
120
120
  metadata_driven: "metadata_driven";
121
121
  }>>;
122
+ appIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
123
  topK: z.ZodDefault<z.ZodNumber>;
123
124
  maxDefinitions: z.ZodDefault<z.ZodNumber>;
124
125
  includeTools: z.ZodOptional<z.ZodCustom<IncludeToolsFilterFn, IncludeToolsFilterFn>>;
@@ -195,6 +196,7 @@ export declare const codeCallPluginOptionsSchema: z.ZodPrefault<z.ZodObject<{
195
196
  codecall_opt_in: "codecall_opt_in";
196
197
  metadata_driven: "metadata_driven";
197
198
  }>>;
199
+ appIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
198
200
  topK: z.ZodDefault<z.ZodNumber>;
199
201
  maxDefinitions: z.ZodDefault<z.ZodNumber>;
200
202
  includeTools: z.ZodOptional<z.ZodCustom<IncludeToolsFilterFn, IncludeToolsFilterFn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C,EAAE,OAAO,CAAC;SAClB,EAAE,CAAC;KACL,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC;AAIF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,0BAA0B;QAClC;;;WAGG;QACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;KACjC;CACF"}
package/esm/index.mjs CHANGED
@@ -220,6 +220,13 @@ var codeCallPluginOptionsObjectSchema = z.object({
220
220
  * @default 'codecall_only'
221
221
  */
222
222
  mode: codeCallModeSchema,
223
+ /**
224
+ * App IDs that CodeCall manages. When set, `codecall_only` mode only hides tools
225
+ * from these apps — tools from other apps remain visible in list_tools.
226
+ * When unset (default), all tools in the server are affected.
227
+ * @example ['ecommerce'] — only hide ecommerce app tools, keep calc tools visible
228
+ */
229
+ appIds: z.array(z.string()).optional(),
223
230
  /**
224
231
  * Default number of tools to return in search results
225
232
  * @default 8
@@ -1361,13 +1368,13 @@ INPUT:
1361
1368
  OUTPUT: Flat deduplicated tool list. relevanceScore: 0.5+=good, 0.7+=strong match.
1362
1369
 
1363
1370
  FLOW: search \u2192 describe \u2192 execute/invoke`;
1364
- var searchToolInputSchema = z2.object({
1371
+ var searchToolInputSchema = {
1365
1372
  queries: z2.array(z2.string().min(2).max(256)).min(1).max(10).describe("Atomic action queries. Split complex requests into simple actions."),
1366
1373
  appIds: z2.array(z2.string()).max(10).optional().describe("Filter by app IDs"),
1367
1374
  excludeToolNames: z2.array(z2.string()).max(50).optional().describe("Skip already-known tool names"),
1368
1375
  topK: z2.number().int().positive().max(50).optional().default(10).describe("Results per query (default 10)"),
1369
1376
  minRelevanceScore: z2.number().min(0).max(1).optional().default(0.1).describe("Minimum relevance threshold (default 0.1)")
1370
- });
1377
+ };
1371
1378
  var searchToolOutputSchema = z2.object({
1372
1379
  tools: z2.array(
1373
1380
  z2.object({
@@ -1485,7 +1492,7 @@ import { z as z4, ZodType } from "zod";
1485
1492
 
1486
1493
  // plugins/plugin-codecall/src/tools/describe.schema.ts
1487
1494
  import { z as z3 } from "zod";
1488
- import { ToolAnnotationsSchema } from "@modelcontextprotocol/sdk/types.js";
1495
+ import { ToolAnnotationsSchema } from "@frontmcp/protocol";
1489
1496
  var describeToolDescription = `Get input/output schemas for tools from search results.
1490
1497
 
1491
1498
  INPUT: toolNames: string[] - tool names from search
@@ -1493,7 +1500,7 @@ OUTPUT per tool: inputSchema (JSON Schema), outputSchema (JSON Schema), usageExa
1493
1500
 
1494
1501
  IMPORTANT: If notFound array is non-empty \u2192 re-search with corrected queries.
1495
1502
  FLOW: search \u2192 describe \u2192 execute/invoke`;
1496
- var describeToolInputSchema = z3.object({
1503
+ var describeToolInputSchema = {
1497
1504
  toolNames: z3.array(z3.string()).min(1).superRefine((toolNames, ctx) => {
1498
1505
  const seen = /* @__PURE__ */ new Set();
1499
1506
  const duplicates = /* @__PURE__ */ new Set();
@@ -1512,7 +1519,7 @@ var describeToolInputSchema = z3.object({
1512
1519
  }).describe(
1513
1520
  'Array of unique tool names (from codecall:search results) to fetch their detailed schemas and usage examples. Example: ["users:list", "billing:getInvoice"]'
1514
1521
  )
1515
- });
1522
+ };
1516
1523
  var describeToolOutputSchema = z3.object({
1517
1524
  tools: z3.array(
1518
1525
  z3.object({
@@ -2096,14 +2103,14 @@ BLOCKED: while, do-while, function decl, eval, require, fetch, setTimeout, proce
2096
2103
  ERRORS: NOT_FOUND | VALIDATION | EXECUTION | TIMEOUT | ACCESS_DENIED
2097
2104
  STATUS: ok | syntax_error | illegal_access | runtime_error | tool_error | timeout
2098
2105
  LIMITS: 10K iter/loop, 30s timeout, 100 calls max`;
2099
- var executeToolInputSchema = z5.object({
2106
+ var executeToolInputSchema = {
2100
2107
  script: z5.string().min(MIN_EXECUTE_SCRIPT_LENGTH).max(100 * 1024).describe(
2101
2108
  "JavaScript code to execute in the sandbox. Must return a value (implicitly or via explicit return). Use callTool(name, input) to invoke tools."
2102
2109
  ),
2103
2110
  allowedTools: z5.array(z5.string()).optional().describe(
2104
2111
  'Optional whitelist of tool names that can be called from this script. If not provided, all indexed tools are available. Example: ["users:list", "billing:getInvoice"]'
2105
2112
  )
2106
- });
2113
+ };
2107
2114
  var syntaxErrorPayloadSchema = z5.object({
2108
2115
  message: z5.string(),
2109
2116
  location: z5.object({
@@ -2457,7 +2464,7 @@ import { Tool as Tool4, ToolContext as ToolContext4 } from "@frontmcp/sdk";
2457
2464
 
2458
2465
  // plugins/plugin-codecall/src/tools/invoke.schema.ts
2459
2466
  import { z as z6 } from "zod";
2460
- import { CallToolResultSchema } from "@modelcontextprotocol/sdk/types.js";
2467
+ import { CallToolResultSchema } from "@frontmcp/protocol";
2461
2468
  var invokeToolDescription = `Call ONE tool directly. Returns standard MCP CallToolResult.
2462
2469
 
2463
2470
  USE invoke: single tool, no transformation
@@ -2468,14 +2475,14 @@ OUTPUT: MCP CallToolResult (same as standard tool call)
2468
2475
  ERRORS: tool_not_found (\u2192 re-search) | validation_error | execution_error | permission_denied
2469
2476
 
2470
2477
  FLOW: search \u2192 describe \u2192 invoke`;
2471
- var invokeToolInputSchema = z6.object({
2478
+ var invokeToolInputSchema = {
2472
2479
  tool: z6.string().describe(
2473
2480
  'The name of the tool to invoke (e.g., "users:getById", "billing:getInvoice"). Must be a tool you discovered via codecall:search.'
2474
2481
  ),
2475
2482
  input: z6.record(z6.string(), z6.unknown()).describe(
2476
2483
  "The input parameters for the tool. Structure must match the tool's input schema (check codecall:describe for schema details)."
2477
2484
  )
2478
- });
2485
+ };
2479
2486
  var invokeToolOutputSchema = CallToolResultSchema;
2480
2487
 
2481
2488
  // plugins/plugin-codecall/src/tools/invoke.tool.ts
@@ -2599,18 +2606,30 @@ var CodeCallPlugin = class extends DynamicPlugin {
2599
2606
  /**
2600
2607
  * Determine if a tool should be visible in list_tools based on mode.
2601
2608
  *
2609
+ * When `appIds` is configured, `codecall_only` mode only hides tools from
2610
+ * those specific apps — tools from other apps remain visible.
2611
+ *
2602
2612
  * @param tool - The tool entry to check
2603
2613
  * @param mode - The current CodeCall mode
2604
2614
  * @returns true if tool should be visible
2605
2615
  */
2616
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ToolEntry generics vary across call sites
2606
2617
  shouldShowInListTools(tool, mode) {
2607
2618
  if (this.isCodeCallTool(tool)) {
2608
2619
  return true;
2609
2620
  }
2610
2621
  const codecallMeta = this.getCodeCallMetadata(tool);
2611
2622
  switch (mode) {
2612
- case "codecall_only":
2623
+ case "codecall_only": {
2624
+ const managedAppIds = this.options.appIds;
2625
+ if (managedAppIds && managedAppIds.length > 0) {
2626
+ const toolOwnerAppId = tool.owner?.kind === "app" ? tool.owner.id : void 0;
2627
+ if (!toolOwnerAppId || !managedAppIds.includes(toolOwnerAppId)) {
2628
+ return true;
2629
+ }
2630
+ }
2613
2631
  return codecallMeta?.visibleInListTools === true;
2632
+ }
2614
2633
  case "codecall_opt_in":
2615
2634
  return true;
2616
2635
  case "metadata_driven":
@@ -2626,6 +2645,7 @@ var CodeCallPlugin = class extends DynamicPlugin {
2626
2645
  * Check if a tool is a CodeCall meta-tool.
2627
2646
  * CodeCall meta-tools always remain visible.
2628
2647
  */
2648
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2629
2649
  isCodeCallTool(tool) {
2630
2650
  const name = tool.name || tool.fullName;
2631
2651
  return name.startsWith("codecall:");
@@ -2633,8 +2653,9 @@ var CodeCallPlugin = class extends DynamicPlugin {
2633
2653
  /**
2634
2654
  * Extract CodeCall-specific metadata from a tool.
2635
2655
  */
2656
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2636
2657
  getCodeCallMetadata(tool) {
2637
- return tool.metadata?.codecall;
2658
+ return tool.metadata?.["codecall"];
2638
2659
  }
2639
2660
  };
2640
2661
  __decorateClass([
package/esm/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/plugin-codecall",
3
- "version": "0.12.2",
3
+ "version": "1.0.0-beta.10",
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",
@@ -47,11 +47,12 @@
47
47
  "dependencies": {
48
48
  "@enclave-vm/core": "^2.11.1",
49
49
  "vectoriadb": "^2.1.3",
50
- "@frontmcp/sdk": "0.12.2",
50
+ "@frontmcp/protocol": "1.0.0-beta.10",
51
+ "@frontmcp/sdk": "1.0.0-beta.10",
51
52
  "zod": "^4.0.0"
52
53
  },
53
54
  "peerDependencies": {
54
- "@frontmcp/plugin-cache": "0.12.2"
55
+ "@frontmcp/plugin-cache": "1.0.0-beta.10"
55
56
  },
56
57
  "devDependencies": {
57
58
  "reflect-metadata": "^0.2.2"
package/index.js CHANGED
@@ -257,6 +257,13 @@ var codeCallPluginOptionsObjectSchema = import_zod.z.object({
257
257
  * @default 'codecall_only'
258
258
  */
259
259
  mode: codeCallModeSchema,
260
+ /**
261
+ * App IDs that CodeCall manages. When set, `codecall_only` mode only hides tools
262
+ * from these apps — tools from other apps remain visible in list_tools.
263
+ * When unset (default), all tools in the server are affected.
264
+ * @example ['ecommerce'] — only hide ecommerce app tools, keep calc tools visible
265
+ */
266
+ appIds: import_zod.z.array(import_zod.z.string()).optional(),
260
267
  /**
261
268
  * Default number of tools to return in search results
262
269
  * @default 8
@@ -1398,13 +1405,13 @@ INPUT:
1398
1405
  OUTPUT: Flat deduplicated tool list. relevanceScore: 0.5+=good, 0.7+=strong match.
1399
1406
 
1400
1407
  FLOW: search \u2192 describe \u2192 execute/invoke`;
1401
- var searchToolInputSchema = import_zod2.z.object({
1408
+ var searchToolInputSchema = {
1402
1409
  queries: import_zod2.z.array(import_zod2.z.string().min(2).max(256)).min(1).max(10).describe("Atomic action queries. Split complex requests into simple actions."),
1403
1410
  appIds: import_zod2.z.array(import_zod2.z.string()).max(10).optional().describe("Filter by app IDs"),
1404
1411
  excludeToolNames: import_zod2.z.array(import_zod2.z.string()).max(50).optional().describe("Skip already-known tool names"),
1405
1412
  topK: import_zod2.z.number().int().positive().max(50).optional().default(10).describe("Results per query (default 10)"),
1406
1413
  minRelevanceScore: import_zod2.z.number().min(0).max(1).optional().default(0.1).describe("Minimum relevance threshold (default 0.1)")
1407
- });
1414
+ };
1408
1415
  var searchToolOutputSchema = import_zod2.z.object({
1409
1416
  tools: import_zod2.z.array(
1410
1417
  import_zod2.z.object({
@@ -1522,7 +1529,7 @@ var import_zod4 = require("zod");
1522
1529
 
1523
1530
  // plugins/plugin-codecall/src/tools/describe.schema.ts
1524
1531
  var import_zod3 = require("zod");
1525
- var import_types = require("@modelcontextprotocol/sdk/types.js");
1532
+ var import_protocol = require("@frontmcp/protocol");
1526
1533
  var describeToolDescription = `Get input/output schemas for tools from search results.
1527
1534
 
1528
1535
  INPUT: toolNames: string[] - tool names from search
@@ -1530,7 +1537,7 @@ OUTPUT per tool: inputSchema (JSON Schema), outputSchema (JSON Schema), usageExa
1530
1537
 
1531
1538
  IMPORTANT: If notFound array is non-empty \u2192 re-search with corrected queries.
1532
1539
  FLOW: search \u2192 describe \u2192 execute/invoke`;
1533
- var describeToolInputSchema = import_zod3.z.object({
1540
+ var describeToolInputSchema = {
1534
1541
  toolNames: import_zod3.z.array(import_zod3.z.string()).min(1).superRefine((toolNames, ctx) => {
1535
1542
  const seen = /* @__PURE__ */ new Set();
1536
1543
  const duplicates = /* @__PURE__ */ new Set();
@@ -1549,7 +1556,7 @@ var describeToolInputSchema = import_zod3.z.object({
1549
1556
  }).describe(
1550
1557
  'Array of unique tool names (from codecall:search results) to fetch their detailed schemas and usage examples. Example: ["users:list", "billing:getInvoice"]'
1551
1558
  )
1552
- });
1559
+ };
1553
1560
  var describeToolOutputSchema = import_zod3.z.object({
1554
1561
  tools: import_zod3.z.array(
1555
1562
  import_zod3.z.object({
@@ -1558,7 +1565,7 @@ var describeToolOutputSchema = import_zod3.z.object({
1558
1565
  description: import_zod3.z.string().describe("Detailed description of what this tool does"),
1559
1566
  inputSchema: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.unknown()).nullable().describe("JSON Schema object describing the tool input parameters"),
1560
1567
  outputSchema: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.unknown()).nullable().describe("JSON Schema object describing the tool output structure"),
1561
- annotations: import_types.ToolAnnotationsSchema.optional().describe("MCP tool annotations (metadata)"),
1568
+ annotations: import_protocol.ToolAnnotationsSchema.optional().describe("MCP tool annotations (metadata)"),
1562
1569
  usageExamples: import_zod3.z.array(
1563
1570
  import_zod3.z.object({
1564
1571
  description: import_zod3.z.string().describe("Description of what this example demonstrates"),
@@ -2133,14 +2140,14 @@ BLOCKED: while, do-while, function decl, eval, require, fetch, setTimeout, proce
2133
2140
  ERRORS: NOT_FOUND | VALIDATION | EXECUTION | TIMEOUT | ACCESS_DENIED
2134
2141
  STATUS: ok | syntax_error | illegal_access | runtime_error | tool_error | timeout
2135
2142
  LIMITS: 10K iter/loop, 30s timeout, 100 calls max`;
2136
- var executeToolInputSchema = import_zod5.z.object({
2143
+ var executeToolInputSchema = {
2137
2144
  script: import_zod5.z.string().min(MIN_EXECUTE_SCRIPT_LENGTH).max(100 * 1024).describe(
2138
2145
  "JavaScript code to execute in the sandbox. Must return a value (implicitly or via explicit return). Use callTool(name, input) to invoke tools."
2139
2146
  ),
2140
2147
  allowedTools: import_zod5.z.array(import_zod5.z.string()).optional().describe(
2141
2148
  'Optional whitelist of tool names that can be called from this script. If not provided, all indexed tools are available. Example: ["users:list", "billing:getInvoice"]'
2142
2149
  )
2143
- });
2150
+ };
2144
2151
  var syntaxErrorPayloadSchema = import_zod5.z.object({
2145
2152
  message: import_zod5.z.string(),
2146
2153
  location: import_zod5.z.object({
@@ -2494,7 +2501,7 @@ var import_sdk6 = require("@frontmcp/sdk");
2494
2501
 
2495
2502
  // plugins/plugin-codecall/src/tools/invoke.schema.ts
2496
2503
  var import_zod6 = require("zod");
2497
- var import_types2 = require("@modelcontextprotocol/sdk/types.js");
2504
+ var import_protocol2 = require("@frontmcp/protocol");
2498
2505
  var invokeToolDescription = `Call ONE tool directly. Returns standard MCP CallToolResult.
2499
2506
 
2500
2507
  USE invoke: single tool, no transformation
@@ -2505,15 +2512,15 @@ OUTPUT: MCP CallToolResult (same as standard tool call)
2505
2512
  ERRORS: tool_not_found (\u2192 re-search) | validation_error | execution_error | permission_denied
2506
2513
 
2507
2514
  FLOW: search \u2192 describe \u2192 invoke`;
2508
- var invokeToolInputSchema = import_zod6.z.object({
2515
+ var invokeToolInputSchema = {
2509
2516
  tool: import_zod6.z.string().describe(
2510
2517
  'The name of the tool to invoke (e.g., "users:getById", "billing:getInvoice"). Must be a tool you discovered via codecall:search.'
2511
2518
  ),
2512
2519
  input: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.unknown()).describe(
2513
2520
  "The input parameters for the tool. Structure must match the tool's input schema (check codecall:describe for schema details)."
2514
2521
  )
2515
- });
2516
- var invokeToolOutputSchema = import_types2.CallToolResultSchema;
2522
+ };
2523
+ var invokeToolOutputSchema = import_protocol2.CallToolResultSchema;
2517
2524
 
2518
2525
  // plugins/plugin-codecall/src/tools/invoke.tool.ts
2519
2526
  function buildErrorResult(message) {
@@ -2636,18 +2643,30 @@ var CodeCallPlugin = class extends import_sdk7.DynamicPlugin {
2636
2643
  /**
2637
2644
  * Determine if a tool should be visible in list_tools based on mode.
2638
2645
  *
2646
+ * When `appIds` is configured, `codecall_only` mode only hides tools from
2647
+ * those specific apps — tools from other apps remain visible.
2648
+ *
2639
2649
  * @param tool - The tool entry to check
2640
2650
  * @param mode - The current CodeCall mode
2641
2651
  * @returns true if tool should be visible
2642
2652
  */
2653
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ToolEntry generics vary across call sites
2643
2654
  shouldShowInListTools(tool, mode) {
2644
2655
  if (this.isCodeCallTool(tool)) {
2645
2656
  return true;
2646
2657
  }
2647
2658
  const codecallMeta = this.getCodeCallMetadata(tool);
2648
2659
  switch (mode) {
2649
- case "codecall_only":
2660
+ case "codecall_only": {
2661
+ const managedAppIds = this.options.appIds;
2662
+ if (managedAppIds && managedAppIds.length > 0) {
2663
+ const toolOwnerAppId = tool.owner?.kind === "app" ? tool.owner.id : void 0;
2664
+ if (!toolOwnerAppId || !managedAppIds.includes(toolOwnerAppId)) {
2665
+ return true;
2666
+ }
2667
+ }
2650
2668
  return codecallMeta?.visibleInListTools === true;
2669
+ }
2651
2670
  case "codecall_opt_in":
2652
2671
  return true;
2653
2672
  case "metadata_driven":
@@ -2663,6 +2682,7 @@ var CodeCallPlugin = class extends import_sdk7.DynamicPlugin {
2663
2682
  * Check if a tool is a CodeCall meta-tool.
2664
2683
  * CodeCall meta-tools always remain visible.
2665
2684
  */
2685
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2666
2686
  isCodeCallTool(tool) {
2667
2687
  const name = tool.name || tool.fullName;
2668
2688
  return name.startsWith("codecall:");
@@ -2670,8 +2690,9 @@ var CodeCallPlugin = class extends import_sdk7.DynamicPlugin {
2670
2690
  /**
2671
2691
  * Extract CodeCall-specific metadata from a tool.
2672
2692
  */
2693
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2673
2694
  getCodeCallMetadata(tool) {
2674
- return tool.metadata?.codecall;
2695
+ return tool.metadata?.["codecall"];
2675
2696
  }
2676
2697
  };
2677
2698
  __decorateClass([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontmcp/plugin-codecall",
3
- "version": "0.12.2",
3
+ "version": "1.0.0-beta.10",
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",
@@ -47,11 +47,12 @@
47
47
  "dependencies": {
48
48
  "@enclave-vm/core": "^2.11.1",
49
49
  "vectoriadb": "^2.1.3",
50
- "@frontmcp/sdk": "0.12.2",
50
+ "@frontmcp/protocol": "1.0.0-beta.10",
51
+ "@frontmcp/sdk": "1.0.0-beta.10",
51
52
  "zod": "^4.0.0"
52
53
  },
53
54
  "peerDependencies": {
54
- "@frontmcp/plugin-cache": "0.12.2"
55
+ "@frontmcp/plugin-cache": "1.0.0-beta.10"
55
56
  },
56
57
  "devDependencies": {
57
58
  "reflect-metadata": "^0.2.2"
@@ -1,4 +1,4 @@
1
- import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
1
+ import type { AuthInfo } from '@frontmcp/protocol';
2
2
  /**
3
3
  * Tool access control modes:
4
4
  * - whitelist: Only explicitly allowed tools can be called (most secure)
@@ -1 +1 @@
1
- {"version":3,"file":"tool-access-control.service.d.ts","sourceRoot":"","sources":["../../src/security/tool-access-control.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;IAEF;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACzE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAeD;;;;;;;;;;;GAWG;AACH,qBAIa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAW;IACzC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAW;gBAE5B,MAAM,CAAC,EAAE,gBAAgB;IAWrC;;;;;;OAMG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAsCxF,kBAAkB;YAqBlB,kBAAkB;YAelB,gBAAgB;IAS9B;;OAEG;IACH,OAAO,CAAC,OAAO;IAmBf;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAenB;;OAEG;IACH,SAAS,IAAI,QAAQ,CAAC,gBAAgB,CAAC;CAGxC;AAED,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"tool-access-control.service.d.ts","sourceRoot":"","sources":["../../src/security/tool-access-control.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB;;;OAGG;IACH,SAAS,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BAAwB,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  export declare const describeToolDescription = "Get input/output schemas for tools from search results.\n\nINPUT: toolNames: string[] - tool names from search\nOUTPUT per tool: inputSchema (JSON Schema), outputSchema (JSON Schema), usageExamples (up to 5 callTool examples)\n\nIMPORTANT: If notFound array is non-empty \u2192 re-search with corrected queries.\nFLOW: search \u2192 describe \u2192 execute/invoke";
3
- export declare const describeToolInputSchema: z.ZodObject<{
3
+ export declare const describeToolInputSchema: {
4
4
  toolNames: z.ZodArray<z.ZodString>;
5
- }, z.core.$strip>;
6
- export type DescribeToolInput = z.infer<typeof describeToolInputSchema>;
5
+ };
6
+ export type DescribeToolInput = z.infer<z.ZodObject<typeof describeToolInputSchema>>;
7
7
  export declare const describeToolOutputSchema: z.ZodObject<{
8
8
  tools: z.ZodArray<z.ZodObject<{
9
9
  name: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"describe.schema.d.ts","sourceRoot":"","sources":["../../src/tools/describe.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB,gXAMK,CAAC;AAE1C,eAAO,MAAM,uBAAuB;;iBAuBlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAoCnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"describe.schema.d.ts","sourceRoot":"","sources":["../../src/tools/describe.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB,gXAMK,CAAC;AAE1C,eAAO,MAAM,uBAAuB;;CAuBnC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC;AAErF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAoCnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  export declare const executeToolDescription = "Execute AgentScript (safe JS subset) for multi-tool orchestration.\n\nAPI: await callTool(name, args, opts?)\n- Default: throws on error\n- Safe mode: { throwOnError: false } \u2192 returns { success, data?, error? }\n\nEXAMPLE:\nconst users = await callTool('users:list', { active: true });\nconst results = [];\nfor (const u of users.items) {\n const orders = await callTool('orders:list', { userId: u.id });\n results.push({ id: u.id, total: orders.items.reduce((s,o) => s + o.amount, 0) });\n}\nreturn results;\n\nALLOWED: for, for-of, arrow fn, map/filter/reduce/find, Math.*, JSON.*, if/else, destructuring, spread, template literals\nBLOCKED: while, do-while, function decl, eval, require, fetch, setTimeout, process, globalThis\n\nERRORS: NOT_FOUND | VALIDATION | EXECUTION | TIMEOUT | ACCESS_DENIED\nSTATUS: ok | syntax_error | illegal_access | runtime_error | tool_error | timeout\nLIMITS: 10K iter/loop, 30s timeout, 100 calls max";
3
- export declare const executeToolInputSchema: z.ZodObject<{
3
+ export declare const executeToolInputSchema: {
4
4
  script: z.ZodString;
5
5
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
- }, z.core.$strip>;
7
- export type ExecuteToolInput = z.infer<typeof executeToolInputSchema>;
6
+ };
7
+ export type ExecuteToolInput = z.infer<z.ZodObject<typeof executeToolInputSchema>>;
8
8
  /**
9
9
  * Result variants
10
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"execute.schema.d.ts","sourceRoot":"","sources":["../../src/tools/execute.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAA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O,2BAA2B,CAAC,CAAC;AAEhF,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,yBAAyB,GACzB,2BAA2B,GAC3B,0BAA0B,GAC1B,uBAAuB,GACvB,qBAAqB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  export declare const invokeToolDescription = "Call ONE tool directly. Returns standard MCP CallToolResult.\n\nUSE invoke: single tool, no transformation\nUSE execute: multiple tools, loops, filtering, joining\n\nINPUT: tool (string), input (object matching tool schema)\nOUTPUT: MCP CallToolResult (same as standard tool call)\nERRORS: tool_not_found (\u2192 re-search) | validation_error | execution_error | permission_denied\n\nFLOW: search \u2192 describe \u2192 invoke";
3
- export declare const invokeToolInputSchema: z.ZodObject<{
3
+ export declare const invokeToolInputSchema: {
4
4
  tool: z.ZodString;
5
5
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
6
- }, z.core.$strip>;
7
- export type InvokeToolInput = z.infer<typeof invokeToolInputSchema>;
6
+ };
7
+ export type InvokeToolInput = z.infer<z.ZodObject<typeof invokeToolInputSchema>>;
8
8
  export declare const invokeToolOutputSchema: z.ZodObject<{
9
9
  _meta: z.ZodOptional<z.ZodObject<{
10
10
  progressToken: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
@@ -1 +1 @@
1
- {"version":3,"file":"invoke.schema.d.ts","sourceRoot":"","sources":["../../src/tools/invoke.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB,+aASD,CAAC;AAElC,eAAO,MAAM,qBAAqB;;;iBAWhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAuB,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"invoke.schema.d.ts","sourceRoot":"","sources":["../../src/tools/invoke.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB,+aASD,CAAC;AAElC,eAAO,MAAM,qBAAqB;;;CAWjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;AAGjF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAuB,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  export declare const searchToolDescription = "Find tools by splitting user request into atomic actions.\n\nDECOMPOSE: \"delete users and send email\" \u2192 queries: [\"delete user\", \"send email\"]\nDECOMPOSE: \"get order and refund\" \u2192 queries: [\"get order\", \"calculate refund\"]\n\nAVOID RE-SEARCHING: Use excludeToolNames for already-discovered tools.\nRE-SEARCH WHEN: describe fails (typo?) OR execute returns tool_not_found.\n\nINPUT:\n- queries: string[] (required) - atomic action phrases, max 10\n- appIds?: string[] - filter by app\n- excludeToolNames?: string[] - skip known tools\n- topK?: number (default 5) - results per query\n- minRelevanceScore?: number (default 0.3) - minimum match threshold\n\nOUTPUT: Flat deduplicated tool list. relevanceScore: 0.5+=good, 0.7+=strong match.\n\nFLOW: search \u2192 describe \u2192 execute/invoke";
3
- export declare const searchToolInputSchema: z.ZodObject<{
3
+ export declare const searchToolInputSchema: {
4
4
  queries: z.ZodArray<z.ZodString>;
5
5
  appIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
6
  excludeToolNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
7
7
  topK: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8
8
  minRelevanceScore: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9
- }, z.core.$strip>;
10
- export type SearchToolInput = z.infer<typeof searchToolInputSchema>;
9
+ };
10
+ export type SearchToolInput = z.infer<z.ZodObject<typeof searchToolInputSchema>>;
11
11
  export declare const searchToolOutputSchema: z.ZodObject<{
12
12
  tools: z.ZodArray<z.ZodObject<{
13
13
  name: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"search.schema.d.ts","sourceRoot":"","sources":["../../src/tools/search.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB,kzBAiBO,CAAC;AAE1C,eAAO,MAAM,qBAAqB;;;;;;iBAgBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;iBAsBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"search.schema.d.ts","sourceRoot":"","sources":["../../src/tools/search.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB,kzBAiBO,CAAC;AAE1C,eAAO,MAAM,qBAAqB;;;;;;CAgBjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;AAEjF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;iBAsBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
1
+ import type { CallToolResult } from '@frontmcp/protocol';
2
2
  /**
3
3
  * Extract the actual result from a CallToolResult.
4
4
  * MCP returns results wrapped in content array format.
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-result.d.ts","sourceRoot":"","sources":["../../src/utils/mcp-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CA4BlF"}
1
+ {"version":3,"file":"mcp-result.d.ts","sourceRoot":"","sources":["../../src/utils/mcp-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CA4BlF"}