@frontmcp/plugin-codecall 0.11.1 → 0.11.3
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/codecall.plugin.d.ts +2 -0
- package/codecall.plugin.d.ts.map +1 -1
- package/esm/index.mjs +19 -6
- package/esm/package.json +4 -4
- package/index.js +12 -5
- package/package.json +4 -4
package/codecall.plugin.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { DynamicPlugin, FlowCtxOf, ProviderType } from '@frontmcp/sdk';
|
|
|
2
2
|
import { CodeCallPluginOptions, CodeCallPluginOptionsInput } from './codecall.types';
|
|
3
3
|
export default class CodeCallPlugin extends DynamicPlugin<CodeCallPluginOptions, CodeCallPluginOptionsInput> {
|
|
4
4
|
options: CodeCallPluginOptions;
|
|
5
|
+
private cachedLogger?;
|
|
6
|
+
private getLogger;
|
|
5
7
|
constructor(options?: CodeCallPluginOptionsInput);
|
|
6
8
|
/**
|
|
7
9
|
* Dynamic providers allow you to configure the plugin with custom options
|
package/codecall.plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecall.plugin.d.ts","sourceRoot":"","sources":["../src/codecall.plugin.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
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"}
|
package/esm/index.mjs
CHANGED
|
@@ -10,7 +10,13 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
// plugins/plugin-codecall/src/codecall.plugin.ts
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
DynamicPlugin,
|
|
15
|
+
FrontMcpLogger,
|
|
16
|
+
ListToolsHook,
|
|
17
|
+
Plugin,
|
|
18
|
+
ScopeEntry
|
|
19
|
+
} from "@frontmcp/sdk";
|
|
14
20
|
|
|
15
21
|
// plugins/plugin-codecall/src/codecall.types.ts
|
|
16
22
|
import { z } from "zod";
|
|
@@ -2526,10 +2532,16 @@ InvokeTool = __decorateClass([
|
|
|
2526
2532
|
import CachePlugin from "@frontmcp/plugin-cache";
|
|
2527
2533
|
var CodeCallPlugin = class extends DynamicPlugin {
|
|
2528
2534
|
options;
|
|
2535
|
+
cachedLogger;
|
|
2536
|
+
getLogger() {
|
|
2537
|
+
if (!this.cachedLogger) {
|
|
2538
|
+
this.cachedLogger = this.get(FrontMcpLogger).child("CodeCall");
|
|
2539
|
+
}
|
|
2540
|
+
return this.cachedLogger;
|
|
2541
|
+
}
|
|
2529
2542
|
constructor(options = {}) {
|
|
2530
2543
|
super();
|
|
2531
2544
|
this.options = codeCallPluginOptionsSchema.parse(options);
|
|
2532
|
-
console.log("[CodeCall] Plugin initialized with mode:", this.options.mode);
|
|
2533
2545
|
}
|
|
2534
2546
|
/**
|
|
2535
2547
|
* Dynamic providers allow you to configure the plugin with custom options
|
|
@@ -2570,17 +2582,18 @@ var CodeCallPlugin = class extends DynamicPlugin {
|
|
|
2570
2582
|
];
|
|
2571
2583
|
}
|
|
2572
2584
|
async adjustListTools(flowCtx) {
|
|
2585
|
+
const logger = this.getLogger();
|
|
2573
2586
|
const { resolvedTools } = flowCtx.state;
|
|
2574
|
-
|
|
2575
|
-
|
|
2587
|
+
logger.verbose("adjustListTools hook called", { mode: this.options.mode });
|
|
2588
|
+
logger.verbose("adjustListTools: tools before filter", { count: resolvedTools?.length ?? 0 });
|
|
2576
2589
|
if (!resolvedTools || resolvedTools.length === 0) {
|
|
2577
|
-
|
|
2590
|
+
logger.verbose("adjustListTools: no tools to filter, returning early");
|
|
2578
2591
|
return;
|
|
2579
2592
|
}
|
|
2580
2593
|
const filteredTools = resolvedTools.filter(({ tool }) => {
|
|
2581
2594
|
return this.shouldShowInListTools(tool, this.options.mode);
|
|
2582
2595
|
});
|
|
2583
|
-
|
|
2596
|
+
logger.verbose("adjustListTools: tools after filter", { count: filteredTools.length });
|
|
2584
2597
|
flowCtx.state.set("resolvedTools", filteredTools);
|
|
2585
2598
|
}
|
|
2586
2599
|
/**
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/plugin-codecall",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
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",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@enclave-vm/core": "^2.
|
|
48
|
+
"@enclave-vm/core": "^2.11.0",
|
|
49
49
|
"vectoriadb": "^2.1.3",
|
|
50
|
-
"@frontmcp/sdk": "0.11.
|
|
50
|
+
"@frontmcp/sdk": "0.11.3",
|
|
51
51
|
"zod": "^4.0.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@frontmcp/plugin-cache": "0.11.
|
|
54
|
+
"@frontmcp/plugin-cache": "0.11.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"reflect-metadata": "^0.2.2"
|
package/index.js
CHANGED
|
@@ -2569,10 +2569,16 @@ InvokeTool = __decorateClass([
|
|
|
2569
2569
|
var import_plugin_cache = __toESM(require("@frontmcp/plugin-cache"));
|
|
2570
2570
|
var CodeCallPlugin = class extends import_sdk7.DynamicPlugin {
|
|
2571
2571
|
options;
|
|
2572
|
+
cachedLogger;
|
|
2573
|
+
getLogger() {
|
|
2574
|
+
if (!this.cachedLogger) {
|
|
2575
|
+
this.cachedLogger = this.get(import_sdk7.FrontMcpLogger).child("CodeCall");
|
|
2576
|
+
}
|
|
2577
|
+
return this.cachedLogger;
|
|
2578
|
+
}
|
|
2572
2579
|
constructor(options = {}) {
|
|
2573
2580
|
super();
|
|
2574
2581
|
this.options = codeCallPluginOptionsSchema.parse(options);
|
|
2575
|
-
console.log("[CodeCall] Plugin initialized with mode:", this.options.mode);
|
|
2576
2582
|
}
|
|
2577
2583
|
/**
|
|
2578
2584
|
* Dynamic providers allow you to configure the plugin with custom options
|
|
@@ -2613,17 +2619,18 @@ var CodeCallPlugin = class extends import_sdk7.DynamicPlugin {
|
|
|
2613
2619
|
];
|
|
2614
2620
|
}
|
|
2615
2621
|
async adjustListTools(flowCtx) {
|
|
2622
|
+
const logger = this.getLogger();
|
|
2616
2623
|
const { resolvedTools } = flowCtx.state;
|
|
2617
|
-
|
|
2618
|
-
|
|
2624
|
+
logger.verbose("adjustListTools hook called", { mode: this.options.mode });
|
|
2625
|
+
logger.verbose("adjustListTools: tools before filter", { count: resolvedTools?.length ?? 0 });
|
|
2619
2626
|
if (!resolvedTools || resolvedTools.length === 0) {
|
|
2620
|
-
|
|
2627
|
+
logger.verbose("adjustListTools: no tools to filter, returning early");
|
|
2621
2628
|
return;
|
|
2622
2629
|
}
|
|
2623
2630
|
const filteredTools = resolvedTools.filter(({ tool }) => {
|
|
2624
2631
|
return this.shouldShowInListTools(tool, this.options.mode);
|
|
2625
2632
|
});
|
|
2626
|
-
|
|
2633
|
+
logger.verbose("adjustListTools: tools after filter", { count: filteredTools.length });
|
|
2627
2634
|
flowCtx.state.set("resolvedTools", filteredTools);
|
|
2628
2635
|
}
|
|
2629
2636
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/plugin-codecall",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
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",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@enclave-vm/core": "^2.
|
|
48
|
+
"@enclave-vm/core": "^2.11.0",
|
|
49
49
|
"vectoriadb": "^2.1.3",
|
|
50
|
-
"@frontmcp/sdk": "0.11.
|
|
50
|
+
"@frontmcp/sdk": "0.11.3",
|
|
51
51
|
"zod": "^4.0.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@frontmcp/plugin-cache": "0.11.
|
|
54
|
+
"@frontmcp/plugin-cache": "0.11.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"reflect-metadata": "^0.2.2"
|