@mcpc-tech/cli 0.1.21 → 0.1.22
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/bin/mcpc.cjs +7 -3
- package/bin/mcpc.mjs +7 -3
- package/package.json +1 -1
- package/types/src/app.d.ts.map +1 -1
- package/types/src/config/loader.d.ts.map +1 -1
package/bin/mcpc.cjs
CHANGED
|
@@ -3092,7 +3092,7 @@ VALID: {"key":"value"}` }) {
|
|
|
3092
3092
|
prompt != null && prompt.length > 0 ? prompt : void 0,
|
|
3093
3093
|
prompt != null && prompt.length > 0 ? "" : void 0,
|
|
3094
3094
|
schemaPrefix,
|
|
3095
|
-
schema != null ? JSON.stringify(schema, null, 2) : void 0,
|
|
3095
|
+
schema != null ? JSON.stringify(createModelCompatibleJSONSchema(schema), null, 2) : void 0,
|
|
3096
3096
|
schemaSuffix
|
|
3097
3097
|
].filter((line) => line != null).join("\n");
|
|
3098
3098
|
}
|
|
@@ -4545,8 +4545,10 @@ function createSearchPlugin(options = {}) {
|
|
|
4545
4545
|
name: "plugin-search",
|
|
4546
4546
|
version: "1.0.0",
|
|
4547
4547
|
configureServer: (server) => {
|
|
4548
|
-
|
|
4549
|
-
Only search within the allowed directory: ${allowedSearchDir}
|
|
4548
|
+
const defaultDescription = `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
4549
|
+
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
4550
|
+
const toolDescription = options.toolDescription || defaultDescription;
|
|
4551
|
+
server.tool("search-tool-result", toolDescription, jsonSchema({
|
|
4550
4552
|
type: "object",
|
|
4551
4553
|
properties: {
|
|
4552
4554
|
pattern: {
|
|
@@ -4762,9 +4764,11 @@ function createLargeResultPlugin(options = {}) {
|
|
|
4762
4764
|
const previewSize = options.previewSize || 4e3;
|
|
4763
4765
|
let tempDir = options.tempDir || null;
|
|
4764
4766
|
const configuredServers = /* @__PURE__ */ new Map();
|
|
4767
|
+
const defaultSearchDescription = `Search within large tool result files that were saved due to size limits. Use when: a tool result was saved to file because it exceeded the context limit. Do NOT use this tool before calling the actual tool first. Provide specific keywords or patterns related to the content you're looking for.`;
|
|
4765
4768
|
const searchConfig = {
|
|
4766
4769
|
maxResults: options.search?.maxResults || 15,
|
|
4767
4770
|
maxOutputSize: options.search?.maxOutputSize || 4e3,
|
|
4771
|
+
toolDescription: options.search?.toolDescription || defaultSearchDescription,
|
|
4768
4772
|
global: true
|
|
4769
4773
|
};
|
|
4770
4774
|
return {
|
package/bin/mcpc.mjs
CHANGED
|
@@ -3072,7 +3072,7 @@ VALID: {"key":"value"}` }) {
|
|
|
3072
3072
|
prompt != null && prompt.length > 0 ? prompt : void 0,
|
|
3073
3073
|
prompt != null && prompt.length > 0 ? "" : void 0,
|
|
3074
3074
|
schemaPrefix,
|
|
3075
|
-
schema != null ? JSON.stringify(schema, null, 2) : void 0,
|
|
3075
|
+
schema != null ? JSON.stringify(createModelCompatibleJSONSchema(schema), null, 2) : void 0,
|
|
3076
3076
|
schemaSuffix
|
|
3077
3077
|
].filter((line) => line != null).join("\n");
|
|
3078
3078
|
}
|
|
@@ -4524,8 +4524,10 @@ function createSearchPlugin(options = {}) {
|
|
|
4524
4524
|
name: "plugin-search",
|
|
4525
4525
|
version: "1.0.0",
|
|
4526
4526
|
configureServer: (server) => {
|
|
4527
|
-
|
|
4528
|
-
Only search within the allowed directory: ${allowedSearchDir}
|
|
4527
|
+
const defaultDescription = `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
4528
|
+
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
4529
|
+
const toolDescription = options.toolDescription || defaultDescription;
|
|
4530
|
+
server.tool("search-tool-result", toolDescription, jsonSchema({
|
|
4529
4531
|
type: "object",
|
|
4530
4532
|
properties: {
|
|
4531
4533
|
pattern: {
|
|
@@ -4741,9 +4743,11 @@ function createLargeResultPlugin(options = {}) {
|
|
|
4741
4743
|
const previewSize = options.previewSize || 4e3;
|
|
4742
4744
|
let tempDir = options.tempDir || null;
|
|
4743
4745
|
const configuredServers = /* @__PURE__ */ new Map();
|
|
4746
|
+
const defaultSearchDescription = `Search within large tool result files that were saved due to size limits. Use when: a tool result was saved to file because it exceeded the context limit. Do NOT use this tool before calling the actual tool first. Provide specific keywords or patterns related to the content you're looking for.`;
|
|
4744
4747
|
const searchConfig = {
|
|
4745
4748
|
maxResults: options.search?.maxResults || 15,
|
|
4746
4749
|
maxOutputSize: options.search?.maxOutputSize || 4e3,
|
|
4750
|
+
toolDescription: options.search?.toolDescription || defaultSearchDescription,
|
|
4747
4751
|
global: true
|
|
4748
4752
|
};
|
|
4749
4753
|
return {
|
package/package.json
CHANGED
package/types/src/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sources":["../../src/app.ts"],"names":[],"mappings":"AAAA,SAAS,WAAW,4BAAwC;AAI5D,cAAc,mBAAmB,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sources":["../../src/app.ts"],"names":[],"mappings":"AAAA,SAAS,WAAW,4BAAwC;AAI5D,cAAc,mBAAmB,0BAAoD;AACrF,cAAc,UAAU,6BAA6B;AAGrD,OAAO,cAAM,eACX,SAAS,eACR,QAAQ,qBAiCT;AAEF,OAAO,cAAM,YAAa,SAAS,eAAa,YAO9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sources":["../../../src/config/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CC,GAED,cAAc,iBAAiB,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sources":["../../../src/config/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CC,GAED,cAAc,iBAAiB,0BAAiC;AAMhE,iBAAiB;EACf;;GAEC,GACD,OAAO,MAAM;EACb;;GAEC,GACD,UAAU,MAAM;EAChB;;GAEC,GACD;IACE,QAAQ,OAAO,MAAM,EAAE,OAAO;IAC9B,WAAW,OAAO,MAAM,EAAE,OAAO;;EAEnC;;GAEC,GACD,QAAQ;;AA0YV;;;CAGC,GACD,OAAO,iBAAe,cAAc,QAAQ,aAAa,IAAI;AAyM7D;;CAEC,GACD,OAAO,iBAAS,eAAe,QAAQ,UAAU,GAAG,IAAI"}
|