@mcpc-tech/core 0.3.14 → 0.3.16

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/plugins.cjs CHANGED
@@ -32,6 +32,7 @@ var plugins_exports = {};
32
32
  __export(plugins_exports, {
33
33
  createLargeResultPlugin: () => createLargeResultPlugin,
34
34
  createSearchPlugin: () => createSearchPlugin,
35
+ createSkillsPlugin: () => createSkillsPlugin,
35
36
  defaultLargeResultPlugin: () => large_result_default,
36
37
  defaultSearchPlugin: () => search_tool_default
37
38
  });
@@ -70,15 +71,18 @@ function createSearchPlugin(options = {}) {
70
71
  const allowedSearchDir = options.allowedDir || (0, import_node_os.tmpdir)();
71
72
  const timeoutMs = options.timeoutMs || 3e4;
72
73
  const global = options.global ?? true;
74
+ const agentName = options.agentName;
75
+ const toolName = agentName ? `${agentName}__search-tool-result` : "search-tool-result";
73
76
  const activeTimeouts = /* @__PURE__ */ new Set();
74
77
  return {
75
78
  name: "plugin-search",
76
79
  version: "1.0.0",
77
80
  configureServer: (server) => {
78
- 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.
81
+ const defaultDescription = agentName ? `Search for text patterns in files for the "${agentName}" agent. Use this to find specific content within large tool results. Provide a simple literal string or a regular expression.
82
+ Only search within the allowed directory: ${allowedSearchDir}` : `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.
79
83
  Only search within the allowed directory: ${allowedSearchDir}`;
80
84
  const toolDescription = options.toolDescription || defaultDescription;
81
- server.tool("search-tool-result", toolDescription, jsonSchema({
85
+ server.tool(toolName, toolDescription, jsonSchema({
82
86
  type: "object",
83
87
  properties: {
84
88
  pattern: {
@@ -159,12 +163,12 @@ Provide a more specific pattern (e.g. include a filename fragment, a keyword, or
159
163
  }, timeoutMs);
160
164
  activeTimeouts.add(timeoutId);
161
165
  });
162
- const searchPromise = new Promise((resolve2, reject) => {
166
+ const searchPromise = new Promise((resolve3, reject) => {
163
167
  try {
164
168
  const result2 = import_ripgrep_napi.default.search(args.pattern, [
165
169
  searchPath
166
170
  ]);
167
- resolve2(result2);
171
+ resolve3(result2);
168
172
  } catch (error) {
169
173
  reject(error);
170
174
  }
@@ -297,27 +301,33 @@ function createLargeResultPlugin(options = {}) {
297
301
  const maxSize = options.maxSize || 8e3;
298
302
  const previewSize = options.previewSize || 4e3;
299
303
  let tempDir = options.tempDir || null;
300
- const configuredServers = /* @__PURE__ */ new Map();
304
+ let serverRef = null;
305
+ let agentName = null;
301
306
  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.`;
302
- const searchConfig = {
303
- maxResults: options.search?.maxResults || 15,
304
- maxOutputSize: options.search?.maxOutputSize || 4e3,
305
- toolDescription: options.search?.toolDescription || defaultSearchDescription,
306
- global: true
307
- };
308
307
  return {
309
308
  name: "plugin-large-result-handler",
310
309
  version: "1.0.0",
311
310
  dependencies: [],
312
- configureServer: async (server) => {
313
- if (!configuredServers.has(server)) {
311
+ configureServer: (server) => {
312
+ serverRef = server;
313
+ },
314
+ composeStart: async (context) => {
315
+ agentName = context.serverName;
316
+ if (serverRef) {
317
+ const searchConfig = {
318
+ maxResults: options.search?.maxResults || 15,
319
+ maxOutputSize: options.search?.maxOutputSize || 4e3,
320
+ toolDescription: options.search?.toolDescription || defaultSearchDescription,
321
+ global: true,
322
+ agentName
323
+ };
314
324
  const searchPlugin = createSearchPlugin(searchConfig);
315
- await server.addPlugin(searchPlugin);
316
- configuredServers.set(server, true);
325
+ await serverRef.addPlugin(searchPlugin);
317
326
  }
318
327
  },
319
328
  transformTool: (tool, context) => {
320
329
  const originalExecute = tool.execute;
330
+ const searchToolName = agentName ? `${agentName}__search-tool-result` : "search-tool-result";
321
331
  tool.execute = async (args) => {
322
332
  try {
323
333
  const result = await originalExecute(args);
@@ -349,7 +359,7 @@ ${preview}
349
359
  \`\`\`
350
360
 
351
361
  **To read/understand the full content:**
352
- - Use the \`search-tool-result\` tool with pattern: \`search-tool-result {"pattern": "your-search-term"}\`
362
+ - Use the \`${searchToolName}\` tool with pattern: \`${searchToolName} {"pattern": "your-search-term"}\`
353
363
  - Search supports regex patterns for advanced queries`
354
364
  }
355
365
  ]
@@ -363,7 +373,8 @@ ${preview}
363
373
  return tool;
364
374
  },
365
375
  dispose: () => {
366
- configuredServers.clear();
376
+ serverRef = null;
377
+ agentName = null;
367
378
  tempDir = null;
368
379
  }
369
380
  };
@@ -373,10 +384,211 @@ var defaultLargeResultPlugin = createLargeResultPlugin({
373
384
  previewSize: 4e3
374
385
  });
375
386
  var large_result_default = defaultLargeResultPlugin;
387
+
388
+ // __mcpc__core_latest/node_modules/@mcpc/core/src/plugins/skills.js
389
+ var import_promises2 = require("node:fs/promises");
390
+ var import_node_path4 = require("node:path");
391
+ function parseFrontmatter(content) {
392
+ const match = content.match(/^---\n([\s\S]*?)\n---/);
393
+ if (!match) return null;
394
+ const yaml = match[1];
395
+ let name = "", description = "";
396
+ for (const line of yaml.split("\n")) {
397
+ const m = line.match(/^(name|description):\s*(.+)$/);
398
+ if (m) {
399
+ const value = m[2].replace(/^["']|["']$/g, "");
400
+ if (m[1] === "name") name = value;
401
+ else description = value;
402
+ }
403
+ }
404
+ return name && description ? {
405
+ name,
406
+ description
407
+ } : null;
408
+ }
409
+ function extractBody(content) {
410
+ return content.replace(/^---\n[\s\S]*?\n---\n*/, "");
411
+ }
412
+ async function scanSkills(basePath) {
413
+ const skills = [];
414
+ try {
415
+ const entries = await (0, import_promises2.readdir)(basePath, {
416
+ withFileTypes: true
417
+ });
418
+ for (const entry of entries) {
419
+ if (!entry.isDirectory()) continue;
420
+ const skillDir = (0, import_node_path4.join)(basePath, entry.name);
421
+ const skillFile = (0, import_node_path4.join)(skillDir, "SKILL.md");
422
+ try {
423
+ const content = await (0, import_promises2.readFile)(skillFile, "utf-8");
424
+ const frontmatter = parseFrontmatter(content);
425
+ if (frontmatter && frontmatter.name === entry.name) {
426
+ skills.push({
427
+ ...frontmatter,
428
+ basePath: skillDir
429
+ });
430
+ }
431
+ } catch {
432
+ }
433
+ }
434
+ } catch {
435
+ }
436
+ return skills;
437
+ }
438
+ function generateToolDescription(skills, agentName) {
439
+ if (skills.length === 0) {
440
+ return "Load a skill's instructions. No skills available.";
441
+ }
442
+ const skillsList = skills.map((s) => `- ${s.name}: ${s.description}`).join("\n");
443
+ const toolName = `${agentName}__load-skill`;
444
+ return `Load a skill's instructions or reference files for the "${agentName}" agent.
445
+
446
+ Available skills:
447
+ ${skillsList}
448
+
449
+ Usage:
450
+ - ${toolName}({ skill: "skill-name" }) - Load main SKILL.md content
451
+ - ${toolName}({ skill: "skill-name", ref: "path/to/file" }) - Load reference file
452
+
453
+ Note: For scripts/ and assets/, use appropriate tools directly.`;
454
+ }
455
+ function createSkillsPlugin(options) {
456
+ const { paths } = options;
457
+ const skillsMap = /* @__PURE__ */ new Map();
458
+ let serverRef = null;
459
+ return {
460
+ name: "plugin-skills",
461
+ version: "1.0.0",
462
+ // Save server reference
463
+ configureServer: (server) => {
464
+ serverRef = server;
465
+ },
466
+ // Scan directories and register tool
467
+ composeStart: async (context) => {
468
+ skillsMap.clear();
469
+ for (const dir of paths) {
470
+ const skills = await scanSkills(dir);
471
+ for (const skill of skills) {
472
+ skillsMap.set(skill.name, skill);
473
+ }
474
+ }
475
+ const agentName = context.serverName;
476
+ const toolDescription = generateToolDescription(Array.from(skillsMap.values()), agentName);
477
+ const toolName = `${agentName}__load-skill`;
478
+ if (serverRef) {
479
+ serverRef.tool(toolName, toolDescription, jsonSchema({
480
+ type: "object",
481
+ properties: {
482
+ skill: {
483
+ type: "string",
484
+ description: "The skill name to load"
485
+ },
486
+ ref: {
487
+ type: "string",
488
+ description: "Optional: relative path to any file within the skill directory"
489
+ }
490
+ },
491
+ required: [
492
+ "skill"
493
+ ]
494
+ }), async (args) => {
495
+ const meta = skillsMap.get(args.skill);
496
+ if (!meta) {
497
+ return {
498
+ content: [
499
+ {
500
+ type: "text",
501
+ text: `Skill "${args.skill}" not found`
502
+ }
503
+ ],
504
+ isError: true
505
+ };
506
+ }
507
+ if (args.ref) {
508
+ const refPath = (0, import_node_path4.resolve)(meta.basePath, args.ref);
509
+ const relPath = (0, import_node_path4.relative)(meta.basePath, refPath);
510
+ if (relPath.startsWith("..")) {
511
+ return {
512
+ content: [
513
+ {
514
+ type: "text",
515
+ text: `Invalid path: ${args.ref}`
516
+ }
517
+ ],
518
+ isError: true
519
+ };
520
+ }
521
+ const dir = relPath.split(/[/\\]/)[0];
522
+ if (dir === "scripts" || dir === "assets") {
523
+ return {
524
+ content: [
525
+ {
526
+ type: "text",
527
+ text: `Path: ${refPath}`
528
+ }
529
+ ]
530
+ };
531
+ }
532
+ try {
533
+ const content = await (0, import_promises2.readFile)(refPath, "utf-8");
534
+ return {
535
+ content: [
536
+ {
537
+ type: "text",
538
+ text: content
539
+ }
540
+ ]
541
+ };
542
+ } catch {
543
+ return {
544
+ content: [
545
+ {
546
+ type: "text",
547
+ text: `File not found: ${args.ref}`
548
+ }
549
+ ],
550
+ isError: true
551
+ };
552
+ }
553
+ }
554
+ try {
555
+ const content = await (0, import_promises2.readFile)((0, import_node_path4.join)(meta.basePath, "SKILL.md"), "utf-8");
556
+ const body = extractBody(content);
557
+ return {
558
+ content: [
559
+ {
560
+ type: "text",
561
+ text: body
562
+ }
563
+ ]
564
+ };
565
+ } catch {
566
+ return {
567
+ content: [
568
+ {
569
+ type: "text",
570
+ text: `Failed to load skill: ${args.skill}`
571
+ }
572
+ ],
573
+ isError: true
574
+ };
575
+ }
576
+ }, {
577
+ internal: false
578
+ });
579
+ }
580
+ },
581
+ dispose: () => {
582
+ skillsMap.clear();
583
+ serverRef = null;
584
+ }
585
+ };
586
+ }
376
587
  // Annotate the CommonJS export names for ESM import in node:
377
588
  0 && (module.exports = {
378
589
  createLargeResultPlugin,
379
590
  createSearchPlugin,
591
+ createSkillsPlugin,
380
592
  defaultLargeResultPlugin,
381
593
  defaultSearchPlugin
382
594
  });
package/plugins.mjs CHANGED
@@ -35,15 +35,18 @@ function createSearchPlugin(options = {}) {
35
35
  const allowedSearchDir = options.allowedDir || tmpdir();
36
36
  const timeoutMs = options.timeoutMs || 3e4;
37
37
  const global = options.global ?? true;
38
+ const agentName = options.agentName;
39
+ const toolName = agentName ? `${agentName}__search-tool-result` : "search-tool-result";
38
40
  const activeTimeouts = /* @__PURE__ */ new Set();
39
41
  return {
40
42
  name: "plugin-search",
41
43
  version: "1.0.0",
42
44
  configureServer: (server) => {
43
- 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.
45
+ const defaultDescription = agentName ? `Search for text patterns in files for the "${agentName}" agent. Use this to find specific content within large tool results. Provide a simple literal string or a regular expression.
46
+ Only search within the allowed directory: ${allowedSearchDir}` : `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.
44
47
  Only search within the allowed directory: ${allowedSearchDir}`;
45
48
  const toolDescription = options.toolDescription || defaultDescription;
46
- server.tool("search-tool-result", toolDescription, jsonSchema({
49
+ server.tool(toolName, toolDescription, jsonSchema({
47
50
  type: "object",
48
51
  properties: {
49
52
  pattern: {
@@ -124,12 +127,12 @@ Provide a more specific pattern (e.g. include a filename fragment, a keyword, or
124
127
  }, timeoutMs);
125
128
  activeTimeouts.add(timeoutId);
126
129
  });
127
- const searchPromise = new Promise((resolve2, reject) => {
130
+ const searchPromise = new Promise((resolve3, reject) => {
128
131
  try {
129
132
  const result2 = rg.search(args.pattern, [
130
133
  searchPath
131
134
  ]);
132
- resolve2(result2);
135
+ resolve3(result2);
133
136
  } catch (error) {
134
137
  reject(error);
135
138
  }
@@ -262,27 +265,33 @@ function createLargeResultPlugin(options = {}) {
262
265
  const maxSize = options.maxSize || 8e3;
263
266
  const previewSize = options.previewSize || 4e3;
264
267
  let tempDir = options.tempDir || null;
265
- const configuredServers = /* @__PURE__ */ new Map();
268
+ let serverRef = null;
269
+ let agentName = null;
266
270
  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.`;
267
- const searchConfig = {
268
- maxResults: options.search?.maxResults || 15,
269
- maxOutputSize: options.search?.maxOutputSize || 4e3,
270
- toolDescription: options.search?.toolDescription || defaultSearchDescription,
271
- global: true
272
- };
273
271
  return {
274
272
  name: "plugin-large-result-handler",
275
273
  version: "1.0.0",
276
274
  dependencies: [],
277
- configureServer: async (server) => {
278
- if (!configuredServers.has(server)) {
275
+ configureServer: (server) => {
276
+ serverRef = server;
277
+ },
278
+ composeStart: async (context) => {
279
+ agentName = context.serverName;
280
+ if (serverRef) {
281
+ const searchConfig = {
282
+ maxResults: options.search?.maxResults || 15,
283
+ maxOutputSize: options.search?.maxOutputSize || 4e3,
284
+ toolDescription: options.search?.toolDescription || defaultSearchDescription,
285
+ global: true,
286
+ agentName
287
+ };
279
288
  const searchPlugin = createSearchPlugin(searchConfig);
280
- await server.addPlugin(searchPlugin);
281
- configuredServers.set(server, true);
289
+ await serverRef.addPlugin(searchPlugin);
282
290
  }
283
291
  },
284
292
  transformTool: (tool, context) => {
285
293
  const originalExecute = tool.execute;
294
+ const searchToolName = agentName ? `${agentName}__search-tool-result` : "search-tool-result";
286
295
  tool.execute = async (args) => {
287
296
  try {
288
297
  const result = await originalExecute(args);
@@ -314,7 +323,7 @@ ${preview}
314
323
  \`\`\`
315
324
 
316
325
  **To read/understand the full content:**
317
- - Use the \`search-tool-result\` tool with pattern: \`search-tool-result {"pattern": "your-search-term"}\`
326
+ - Use the \`${searchToolName}\` tool with pattern: \`${searchToolName} {"pattern": "your-search-term"}\`
318
327
  - Search supports regex patterns for advanced queries`
319
328
  }
320
329
  ]
@@ -328,7 +337,8 @@ ${preview}
328
337
  return tool;
329
338
  },
330
339
  dispose: () => {
331
- configuredServers.clear();
340
+ serverRef = null;
341
+ agentName = null;
332
342
  tempDir = null;
333
343
  }
334
344
  };
@@ -338,9 +348,210 @@ var defaultLargeResultPlugin = createLargeResultPlugin({
338
348
  previewSize: 4e3
339
349
  });
340
350
  var large_result_default = defaultLargeResultPlugin;
351
+
352
+ // __mcpc__core_latest/node_modules/@mcpc/core/src/plugins/skills.js
353
+ import { readdir, readFile } from "node:fs/promises";
354
+ import { join as join2, relative as relative2, resolve as resolve2 } from "node:path";
355
+ function parseFrontmatter(content) {
356
+ const match = content.match(/^---\n([\s\S]*?)\n---/);
357
+ if (!match) return null;
358
+ const yaml = match[1];
359
+ let name = "", description = "";
360
+ for (const line of yaml.split("\n")) {
361
+ const m = line.match(/^(name|description):\s*(.+)$/);
362
+ if (m) {
363
+ const value = m[2].replace(/^["']|["']$/g, "");
364
+ if (m[1] === "name") name = value;
365
+ else description = value;
366
+ }
367
+ }
368
+ return name && description ? {
369
+ name,
370
+ description
371
+ } : null;
372
+ }
373
+ function extractBody(content) {
374
+ return content.replace(/^---\n[\s\S]*?\n---\n*/, "");
375
+ }
376
+ async function scanSkills(basePath) {
377
+ const skills = [];
378
+ try {
379
+ const entries = await readdir(basePath, {
380
+ withFileTypes: true
381
+ });
382
+ for (const entry of entries) {
383
+ if (!entry.isDirectory()) continue;
384
+ const skillDir = join2(basePath, entry.name);
385
+ const skillFile = join2(skillDir, "SKILL.md");
386
+ try {
387
+ const content = await readFile(skillFile, "utf-8");
388
+ const frontmatter = parseFrontmatter(content);
389
+ if (frontmatter && frontmatter.name === entry.name) {
390
+ skills.push({
391
+ ...frontmatter,
392
+ basePath: skillDir
393
+ });
394
+ }
395
+ } catch {
396
+ }
397
+ }
398
+ } catch {
399
+ }
400
+ return skills;
401
+ }
402
+ function generateToolDescription(skills, agentName) {
403
+ if (skills.length === 0) {
404
+ return "Load a skill's instructions. No skills available.";
405
+ }
406
+ const skillsList = skills.map((s) => `- ${s.name}: ${s.description}`).join("\n");
407
+ const toolName = `${agentName}__load-skill`;
408
+ return `Load a skill's instructions or reference files for the "${agentName}" agent.
409
+
410
+ Available skills:
411
+ ${skillsList}
412
+
413
+ Usage:
414
+ - ${toolName}({ skill: "skill-name" }) - Load main SKILL.md content
415
+ - ${toolName}({ skill: "skill-name", ref: "path/to/file" }) - Load reference file
416
+
417
+ Note: For scripts/ and assets/, use appropriate tools directly.`;
418
+ }
419
+ function createSkillsPlugin(options) {
420
+ const { paths } = options;
421
+ const skillsMap = /* @__PURE__ */ new Map();
422
+ let serverRef = null;
423
+ return {
424
+ name: "plugin-skills",
425
+ version: "1.0.0",
426
+ // Save server reference
427
+ configureServer: (server) => {
428
+ serverRef = server;
429
+ },
430
+ // Scan directories and register tool
431
+ composeStart: async (context) => {
432
+ skillsMap.clear();
433
+ for (const dir of paths) {
434
+ const skills = await scanSkills(dir);
435
+ for (const skill of skills) {
436
+ skillsMap.set(skill.name, skill);
437
+ }
438
+ }
439
+ const agentName = context.serverName;
440
+ const toolDescription = generateToolDescription(Array.from(skillsMap.values()), agentName);
441
+ const toolName = `${agentName}__load-skill`;
442
+ if (serverRef) {
443
+ serverRef.tool(toolName, toolDescription, jsonSchema({
444
+ type: "object",
445
+ properties: {
446
+ skill: {
447
+ type: "string",
448
+ description: "The skill name to load"
449
+ },
450
+ ref: {
451
+ type: "string",
452
+ description: "Optional: relative path to any file within the skill directory"
453
+ }
454
+ },
455
+ required: [
456
+ "skill"
457
+ ]
458
+ }), async (args) => {
459
+ const meta = skillsMap.get(args.skill);
460
+ if (!meta) {
461
+ return {
462
+ content: [
463
+ {
464
+ type: "text",
465
+ text: `Skill "${args.skill}" not found`
466
+ }
467
+ ],
468
+ isError: true
469
+ };
470
+ }
471
+ if (args.ref) {
472
+ const refPath = resolve2(meta.basePath, args.ref);
473
+ const relPath = relative2(meta.basePath, refPath);
474
+ if (relPath.startsWith("..")) {
475
+ return {
476
+ content: [
477
+ {
478
+ type: "text",
479
+ text: `Invalid path: ${args.ref}`
480
+ }
481
+ ],
482
+ isError: true
483
+ };
484
+ }
485
+ const dir = relPath.split(/[/\\]/)[0];
486
+ if (dir === "scripts" || dir === "assets") {
487
+ return {
488
+ content: [
489
+ {
490
+ type: "text",
491
+ text: `Path: ${refPath}`
492
+ }
493
+ ]
494
+ };
495
+ }
496
+ try {
497
+ const content = await readFile(refPath, "utf-8");
498
+ return {
499
+ content: [
500
+ {
501
+ type: "text",
502
+ text: content
503
+ }
504
+ ]
505
+ };
506
+ } catch {
507
+ return {
508
+ content: [
509
+ {
510
+ type: "text",
511
+ text: `File not found: ${args.ref}`
512
+ }
513
+ ],
514
+ isError: true
515
+ };
516
+ }
517
+ }
518
+ try {
519
+ const content = await readFile(join2(meta.basePath, "SKILL.md"), "utf-8");
520
+ const body = extractBody(content);
521
+ return {
522
+ content: [
523
+ {
524
+ type: "text",
525
+ text: body
526
+ }
527
+ ]
528
+ };
529
+ } catch {
530
+ return {
531
+ content: [
532
+ {
533
+ type: "text",
534
+ text: `Failed to load skill: ${args.skill}`
535
+ }
536
+ ],
537
+ isError: true
538
+ };
539
+ }
540
+ }, {
541
+ internal: false
542
+ });
543
+ }
544
+ },
545
+ dispose: () => {
546
+ skillsMap.clear();
547
+ serverRef = null;
548
+ }
549
+ };
550
+ }
341
551
  export {
342
552
  createLargeResultPlugin,
343
553
  createSearchPlugin,
554
+ createSkillsPlugin,
344
555
  large_result_default as defaultLargeResultPlugin,
345
556
  search_tool_default as defaultSearchPlugin
346
557
  };
@@ -37,6 +37,7 @@
37
37
  * @module
38
38
  */ export { createSearchPlugin } from "./src/plugins/search-tool.js";
39
39
  export { createLargeResultPlugin } from "./src/plugins/large-result.js";
40
+ export { createSkillsPlugin } from "./src/plugins/skills.js";
40
41
  export { default as defaultSearchPlugin } from "./src/plugins/search-tool.js";
41
42
  export { default as defaultLargeResultPlugin } from "./src/plugins/large-result.js";
42
43
  export type { SearchOptions } from "./src/plugins/search-tool.js";
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","sources":["../plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCC,GAGD,SAAS,kBAAkB,uCAAuC;AAClE,SAAS,uBAAuB,wCAAwC;AAGxE,SAAS,WAAW,mBAAmB,uCAAuC;AAC9E,SAAS,WAAW,wBAAwB,wCAAwC;AAGpF,cAAc,aAAa,uCAAuC"}
1
+ {"version":3,"file":"plugins.d.ts","sources":["../plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCC,GAGD,SAAS,kBAAkB,uCAAuC;AAClE,SAAS,uBAAuB,wCAAwC;AACxE,SAAS,kBAAkB,kCAAkC;AAG7D,SAAS,WAAW,mBAAmB,uCAAuC;AAC9E,SAAS,WAAW,wBAAwB,wCAAwC;AAGpF,cAAc,aAAa,uCAAuC"}
@@ -1 +1 @@
1
- {"version":3,"file":"large-result.d.ts","sources":["../../../src/plugins/large-result.ts"],"names":[],"mappings":"AAQA,SAA6B,KAAK,aAAa,2BAA2B;AAC1E,cAAc,UAAU,6BAA6B;UAE3C;EACR,UAAU,MAAM;EAChB,cAAc,MAAM;EACpB,UAAU,MAAM;EAChB,SAAS;;AAGX;;;CAGC,GACD,OAAO,iBAAS,wBACd,UAAS,aAAkB,GAC1B;AA4GH;;CAEC,GACD,cAAM,0BAA0B;AAMhC,OAAO,cAAM,kBAAuC;AAEpD,eAAe,yBAAyB"}
1
+ {"version":3,"file":"large-result.d.ts","sources":["../../../src/plugins/large-result.ts"],"names":[],"mappings":"AAQA,SAA6B,KAAK,aAAa,2BAA2B;AAC1E,cAAmC,UAAU,6BAA6B;UAGhE;EACR,UAAU,MAAM;EAChB,cAAc,MAAM;EACpB,UAAU,MAAM;EAChB,SAAS;;AAGX;;;CAGC,GACD,OAAO,iBAAS,wBACd,UAAS,aAAkB,GAC1B;AAsHH;;CAEC,GACD,cAAM,0BAA0B;AAMhC,OAAO,cAAM,kBAAuC;AAEpD,eAAe,yBAAyB"}
@@ -9,6 +9,7 @@ import type { ToolPlugin } from "../plugin-types.js";
9
9
  /** Whether search should be case sensitive (default: false) */ caseSensitive?: boolean;
10
10
  /** Search timeout in milliseconds (default: 30000) */ timeoutMs?: number;
11
11
  /** Custom description for the search tool (overrides default) */ toolDescription?: string;
12
+ /** Agent name prefix for tool naming (e.g., "my-agent" -> "my-agent__search-tool-result") */ agentName?: string;
12
13
  }
13
14
  /**
14
15
  * Create a search plugin that adds file search capability with size limits
@@ -1 +1 @@
1
- {"version":3,"file":"search-tool.d.ts","sources":["../../../src/plugins/search-tool.ts"],"names":[],"mappings":"AASA,cAAc,UAAU,6BAA6B;AAIrD;;CAEC,GACD,iBAAiB;EACf,sDAAsD,GACtD,SAAS,OAAO;EAChB,6DAA6D,GAC7D,aAAa,MAAM;EACnB,sDAAsD,GACtD,gBAAgB,MAAM;EACtB,mHAAmH,GACnH,aAAa,MAAM;EACnB,6DAA6D,GAC7D,gBAAgB,OAAO;EACvB,oDAAoD,GACpD,YAAY,MAAM;EAClB,+DAA+D,GAC/D,kBAAkB,MAAM;;AAG1B;;CAEC,GACD,OAAO,iBAAS,mBAAmB,UAAS,aAAkB,GAAG;AA8PjE;;CAEC,GACD,cAAM,qBAAqB;AAS3B,OAAO,cAAM,kBAAkC;AAE/C,eAAe,oBAAoB"}
1
+ {"version":3,"file":"search-tool.d.ts","sources":["../../../src/plugins/search-tool.ts"],"names":[],"mappings":"AASA,cAAc,UAAU,6BAA6B;AAIrD;;CAEC,GACD,iBAAiB;EACf,sDAAsD,GACtD,SAAS,OAAO;EAChB,6DAA6D,GAC7D,aAAa,MAAM;EACnB,sDAAsD,GACtD,gBAAgB,MAAM;EACtB,mHAAmH,GACnH,aAAa,MAAM;EACnB,6DAA6D,GAC7D,gBAAgB,OAAO;EACvB,oDAAoD,GACpD,YAAY,MAAM;EAClB,+DAA+D,GAC/D,kBAAkB,MAAM;EACxB,2FAA2F,GAC3F,YAAY,MAAM;;AAGpB;;CAEC,GACD,OAAO,iBAAS,mBAAmB,UAAS,aAAkB,GAAG;AAsQjE;;CAEC,GACD,cAAM,qBAAqB;AAS3B,OAAO,cAAM,kBAAkC;AAE/C,eAAe,oBAAoB"}
@@ -0,0 +1,23 @@
1
+ import type { ToolPlugin } from "../plugin-types.js";
2
+ interface SkillsPluginOptions {
3
+ /** Directories to scan for skills */ paths: string[];
4
+ }
5
+ /**
6
+ * Create a skills plugin that adds domain knowledge with lazy loading
7
+ */ export declare function createSkillsPlugin(options: SkillsPluginOptions): ToolPlugin;
8
+ /**
9
+ * Factory function for parameterized usage via string path
10
+ *
11
+ * Supports query parameters:
12
+ * - paths: Comma-separated list of skill directories
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * // Via string path with query params
17
+ * plugins: [
18
+ * "@mcpc/core/plugins/skills?paths=./skills,./more-skills"
19
+ * ]
20
+ * ```
21
+ */ export declare function createPlugin(params: Record<string, string>): ToolPlugin;
22
+ export default createSkillsPlugin;
23
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sources":["../../../src/plugins/skills.ts"],"names":[],"mappings":"AAOA,cAAmC,UAAU,6BAA6B;UAWhE;EACR,mCAAmC,GACnC,OAAO,MAAM;;AAoGf;;CAEC,GACD,OAAO,iBAAS,mBAAmB,SAAS,mBAAmB,GAAG;AAuIlE;;;;;;;;;;;;;CAaC,GACD,OAAO,iBAAS,aAAa,QAAQ,OAAO,MAAM,EAAE,MAAM,CAAC,GAAG;AAM9D,eAAe,mBAAmB"}