@frontmcp/plugin-codecall 0.0.1 → 0.7.0

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.
Files changed (62) hide show
  1. package/codecall.plugin.d.ts +42 -0
  2. package/codecall.plugin.d.ts.map +1 -0
  3. package/codecall.symbol.d.ts +107 -0
  4. package/codecall.symbol.d.ts.map +1 -0
  5. package/codecall.types.d.ts +353 -0
  6. package/codecall.types.d.ts.map +1 -0
  7. package/errors/index.d.ts +2 -0
  8. package/errors/index.d.ts.map +1 -0
  9. package/errors/tool-call.errors.d.ts +80 -0
  10. package/errors/tool-call.errors.d.ts.map +1 -0
  11. package/esm/index.mjs +2625 -0
  12. package/esm/package.json +59 -0
  13. package/index.d.ts +3 -0
  14. package/index.d.ts.map +1 -0
  15. package/index.js +2668 -0
  16. package/package.json +1 -1
  17. package/providers/code-call.config.d.ts +30 -0
  18. package/providers/code-call.config.d.ts.map +1 -0
  19. package/security/index.d.ts +3 -0
  20. package/security/index.d.ts.map +1 -0
  21. package/security/self-reference-guard.d.ts +33 -0
  22. package/security/self-reference-guard.d.ts.map +1 -0
  23. package/security/tool-access-control.service.d.ts +105 -0
  24. package/security/tool-access-control.service.d.ts.map +1 -0
  25. package/services/audit-logger.service.d.ts +187 -0
  26. package/services/audit-logger.service.d.ts.map +1 -0
  27. package/services/enclave.service.d.ts +63 -0
  28. package/services/enclave.service.d.ts.map +1 -0
  29. package/services/error-enrichment.service.d.ts +95 -0
  30. package/services/error-enrichment.service.d.ts.map +1 -0
  31. package/services/index.d.ts +7 -0
  32. package/services/index.d.ts.map +1 -0
  33. package/services/output-sanitizer.d.ts +87 -0
  34. package/services/output-sanitizer.d.ts.map +1 -0
  35. package/services/synonym-expansion.service.d.ts +67 -0
  36. package/services/synonym-expansion.service.d.ts.map +1 -0
  37. package/services/tool-search.service.d.ts +196 -0
  38. package/services/tool-search.service.d.ts.map +1 -0
  39. package/tools/describe.schema.d.ts +29 -0
  40. package/tools/describe.schema.d.ts.map +1 -0
  41. package/tools/describe.tool.d.ts +36 -0
  42. package/tools/describe.tool.d.ts.map +1 -0
  43. package/tools/execute.schema.d.ts +116 -0
  44. package/tools/execute.schema.d.ts.map +1 -0
  45. package/tools/execute.tool.d.ts +6 -0
  46. package/tools/execute.tool.d.ts.map +1 -0
  47. package/tools/index.d.ts +5 -0
  48. package/tools/index.d.ts.map +1 -0
  49. package/tools/invoke.schema.d.ts +105 -0
  50. package/tools/invoke.schema.d.ts.map +1 -0
  51. package/tools/invoke.tool.d.ts +14 -0
  52. package/tools/invoke.tool.d.ts.map +1 -0
  53. package/tools/search.schema.d.ts +31 -0
  54. package/tools/search.schema.d.ts.map +1 -0
  55. package/tools/search.tool.d.ts +6 -0
  56. package/tools/search.tool.d.ts.map +1 -0
  57. package/utils/describe.utils.d.ts +87 -0
  58. package/utils/describe.utils.d.ts.map +1 -0
  59. package/utils/index.d.ts +3 -0
  60. package/utils/index.d.ts.map +1 -0
  61. package/utils/mcp-result.d.ts +7 -0
  62. package/utils/mcp-result.d.ts.map +1 -0
@@ -0,0 +1,6 @@
1
+ import { ToolContext } from '@frontmcp/sdk';
2
+ import { SearchToolInput, SearchToolOutput } from './search.schema';
3
+ export default class SearchTool extends ToolContext {
4
+ execute(input: SearchToolInput): Promise<SearchToolOutput>;
5
+ }
6
+ //# sourceMappingURL=search.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.tool.d.ts","sourceRoot":"","sources":["../../src/tools/search.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,WAAW,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,eAAe,EAEf,gBAAgB,EAGjB,MAAM,iBAAiB,CAAC;AA8BzB,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IAC3C,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAyFjE"}
@@ -0,0 +1,87 @@
1
+ import type { JSONSchema } from 'zod/v4/core';
2
+ /** JSON Schema type from Zod v4 */
3
+ type JsonSchema = JSONSchema.JSONSchema;
4
+ /**
5
+ * Tool example for describe output
6
+ */
7
+ export interface ToolUsageExample {
8
+ description: string;
9
+ code: string;
10
+ }
11
+ /**
12
+ * Detected intent of a tool based on its name and description.
13
+ */
14
+ export type ToolIntent = 'create' | 'list' | 'get' | 'update' | 'delete' | 'search' | 'action' | 'unknown';
15
+ /**
16
+ * Detect the intent of a tool from its name.
17
+ * Extracts the action verb from tool names like "users:create" or "orders:list".
18
+ */
19
+ export declare function detectToolIntent(toolName: string, description?: string): ToolIntent;
20
+ /**
21
+ * Generate a TypeScript-like function signature from a JSON Schema.
22
+ *
23
+ * @example
24
+ * Input: { type: 'object', properties: { id: { type: 'string' }, limit: { type: 'number' } }, required: ['id'] }
25
+ * Output: "(id: string, limit?: number) => unknown"
26
+ */
27
+ export declare function jsonSchemaToSignature(toolName: string, inputSchema?: JsonSchema, outputSchema?: JsonSchema): string;
28
+ /**
29
+ * Generate a natural language summary of a schema.
30
+ */
31
+ export declare function jsonSchemaToNaturalLanguage(schema: JsonSchema | undefined | null, direction: 'input' | 'output'): string;
32
+ /**
33
+ * Generate a basic usage example for a tool.
34
+ */
35
+ export declare function generateBasicExample(toolName: string, inputSchema?: JsonSchema): ToolUsageExample;
36
+ /**
37
+ * Check if a schema has pagination parameters.
38
+ */
39
+ export declare function hasPaginationParams(schema?: JsonSchema): boolean;
40
+ /**
41
+ * Check if a schema has filter-like parameters.
42
+ */
43
+ export declare function hasFilterParams(schema?: JsonSchema): boolean;
44
+ /**
45
+ * Get filter-like property names from a schema.
46
+ */
47
+ export declare function getFilterProperties(schema?: JsonSchema): string[];
48
+ /**
49
+ * Generate a pagination example for a tool.
50
+ */
51
+ export declare function generatePaginationExample(toolName: string): ToolUsageExample;
52
+ /**
53
+ * Generate a filter example for a tool.
54
+ */
55
+ export declare function generateFilterExample(toolName: string, filterProp: string): ToolUsageExample;
56
+ /**
57
+ * Generate a create example for a tool.
58
+ * Shows required parameters with contextual sample values.
59
+ */
60
+ export declare function generateCreateExample(toolName: string, inputSchema?: JsonSchema): ToolUsageExample;
61
+ /**
62
+ * Generate a get (retrieve single item) example for a tool.
63
+ */
64
+ export declare function generateGetExample(toolName: string, inputSchema?: JsonSchema): ToolUsageExample;
65
+ /**
66
+ * Generate a list example for a tool.
67
+ */
68
+ export declare function generateListExample(toolName: string, inputSchema?: JsonSchema): ToolUsageExample;
69
+ /**
70
+ * Generate an update example for a tool.
71
+ */
72
+ export declare function generateUpdateExample(toolName: string, inputSchema?: JsonSchema): ToolUsageExample;
73
+ /**
74
+ * Generate a delete example for a tool.
75
+ */
76
+ export declare function generateDeleteExample(toolName: string, inputSchema?: JsonSchema): ToolUsageExample;
77
+ /**
78
+ * Generate a search example for a tool.
79
+ */
80
+ export declare function generateSearchExample(toolName: string, inputSchema?: JsonSchema): ToolUsageExample;
81
+ /**
82
+ * Smart example generator that uses intent detection.
83
+ * This is the main entry point for generating examples.
84
+ */
85
+ export declare function generateSmartExample(toolName: string, inputSchema?: JsonSchema, description?: string): ToolUsageExample;
86
+ export {};
87
+ //# sourceMappingURL=describe.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describe.utils.d.ts","sourceRoot":"","sources":["../../src/utils/describe.utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,mCAAmC;AACnC,KAAK,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAiB3G;;;GAGG;AACH,wBAAgB,gBAA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G,gBAAgB,CAQhG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,GAAG,gBAAgB,CA0BlG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,GAAG,gBAAgB,CAoBlG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,GAAG,gBAAgB,CAiBlG;AA2ED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,UAAU,EACxB,WAAW,CAAC,EAAE,MAAM,GACnB,gBAAgB,CAuBlB"}
@@ -0,0 +1,3 @@
1
+ export * from './describe.utils';
2
+ export * from './mcp-result';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ /**
3
+ * Extract the actual result from a CallToolResult.
4
+ * MCP returns results wrapped in content array format.
5
+ */
6
+ export declare function extractResultFromCallToolResult(mcpResult: CallToolResult): unknown;
7
+ //# sourceMappingURL=mcp-result.d.ts.map
@@ -0,0 +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"}