@vinkius-core/mcp-fusion 2.9.0 → 2.11.1

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 (77) hide show
  1. package/dist/cli/fusion.js +31 -31
  2. package/dist/cli/fusion.js.map +1 -1
  3. package/dist/cli/templates/config.js +26 -26
  4. package/dist/cli/templates/core.js +111 -111
  5. package/dist/cli/templates/middleware.js +22 -22
  6. package/dist/cli/templates/readme.js +146 -146
  7. package/dist/cli/templates/testing.js +83 -83
  8. package/dist/cli/templates/tools.js +53 -53
  9. package/dist/cli/templates/vectors/database.js +74 -74
  10. package/dist/cli/templates/vectors/oauth.js +64 -64
  11. package/dist/cli/templates/vectors/openapi.js +97 -97
  12. package/dist/core/builder/GroupedToolBuilder.d.ts +41 -0
  13. package/dist/core/builder/GroupedToolBuilder.d.ts.map +1 -1
  14. package/dist/core/builder/GroupedToolBuilder.js +54 -4
  15. package/dist/core/builder/GroupedToolBuilder.js.map +1 -1
  16. package/dist/core/builder/ToolDefinitionCompiler.d.ts +1 -0
  17. package/dist/core/builder/ToolDefinitionCompiler.d.ts.map +1 -1
  18. package/dist/core/builder/ToolDefinitionCompiler.js +1 -1
  19. package/dist/core/builder/ToolDefinitionCompiler.js.map +1 -1
  20. package/dist/core/execution/ExecutionPipeline.d.ts +8 -2
  21. package/dist/core/execution/ExecutionPipeline.d.ts.map +1 -1
  22. package/dist/core/execution/ExecutionPipeline.js +18 -9
  23. package/dist/core/execution/ExecutionPipeline.js.map +1 -1
  24. package/dist/core/registry/ToolRegistry.d.ts +1 -1
  25. package/dist/core/registry/ToolRegistry.d.ts.map +1 -1
  26. package/dist/core/registry/ToolRegistry.js +1 -1
  27. package/dist/core/registry/ToolRegistry.js.map +1 -1
  28. package/dist/core/schema/SchemaGenerator.d.ts +1 -1
  29. package/dist/core/schema/SchemaGenerator.d.ts.map +1 -1
  30. package/dist/core/schema/SchemaGenerator.js +38 -1
  31. package/dist/core/schema/SchemaGenerator.js.map +1 -1
  32. package/dist/core/types.d.ts +2 -0
  33. package/dist/core/types.d.ts.map +1 -1
  34. package/dist/exposition/ExpositionCompiler.d.ts.map +1 -1
  35. package/dist/exposition/ExpositionCompiler.js +25 -2
  36. package/dist/exposition/ExpositionCompiler.js.map +1 -1
  37. package/dist/introspection/BehaviorDigest.d.ts +2 -2
  38. package/dist/introspection/BehaviorDigest.d.ts.map +1 -1
  39. package/dist/introspection/BehaviorDigest.js +38 -36
  40. package/dist/introspection/BehaviorDigest.js.map +1 -1
  41. package/dist/introspection/CapabilityLockfile.d.ts +2 -2
  42. package/dist/introspection/CapabilityLockfile.d.ts.map +1 -1
  43. package/dist/introspection/CapabilityLockfile.js +9 -9
  44. package/dist/introspection/CapabilityLockfile.js.map +1 -1
  45. package/dist/introspection/CryptoAttestation.d.ts.map +1 -1
  46. package/dist/introspection/CryptoAttestation.js +23 -36
  47. package/dist/introspection/CryptoAttestation.js.map +1 -1
  48. package/dist/introspection/SemanticProbe.js +49 -49
  49. package/dist/introspection/ToolContract.d.ts +2 -2
  50. package/dist/introspection/ToolContract.d.ts.map +1 -1
  51. package/dist/introspection/ToolContract.js +9 -9
  52. package/dist/introspection/ToolContract.js.map +1 -1
  53. package/dist/introspection/canonicalize.d.ts +16 -1
  54. package/dist/introspection/canonicalize.d.ts.map +1 -1
  55. package/dist/introspection/canonicalize.js +18 -3
  56. package/dist/introspection/canonicalize.js.map +1 -1
  57. package/dist/presenter/PostProcessor.d.ts +3 -1
  58. package/dist/presenter/PostProcessor.d.ts.map +1 -1
  59. package/dist/presenter/PostProcessor.js +4 -3
  60. package/dist/presenter/PostProcessor.js.map +1 -1
  61. package/dist/presenter/Presenter.d.ts +18 -5
  62. package/dist/presenter/Presenter.d.ts.map +1 -1
  63. package/dist/presenter/Presenter.js +39 -15
  64. package/dist/presenter/Presenter.js.map +1 -1
  65. package/dist/presenter/SelectUtils.d.ts +78 -0
  66. package/dist/presenter/SelectUtils.d.ts.map +1 -0
  67. package/dist/presenter/SelectUtils.js +141 -0
  68. package/dist/presenter/SelectUtils.js.map +1 -0
  69. package/dist/presenter/index.d.ts +1 -0
  70. package/dist/presenter/index.d.ts.map +1 -1
  71. package/dist/presenter/index.js +2 -0
  72. package/dist/presenter/index.js.map +1 -1
  73. package/dist/server/ServerAttachment.d.ts +1 -1
  74. package/dist/server/ServerAttachment.d.ts.map +1 -1
  75. package/dist/server/ServerAttachment.js +3 -3
  76. package/dist/server/ServerAttachment.js.map +1 -1
  77. package/package.json +118 -118
@@ -4,84 +4,84 @@
4
4
  */
5
5
  /** Generate `prisma/schema.prisma` */
6
6
  export function prismaSchema() {
7
- return `// Prisma Schema — Database-Driven MCP Server
8
- //
9
- // The mcp-fusion-prisma-gen generator reads annotations
10
- // and auto-generates Presenters + ToolBuilders with:
11
- // - Field-level security (/// @fusion.hide)
12
- // - Tenant isolation
13
- // - OOM protection
14
-
15
- generator client {
16
- provider = "prisma-client-js"
17
- }
18
-
19
- generator fusion {
20
- provider = "mcp-fusion-prisma-gen"
21
- }
22
-
23
- datasource db {
24
- provider = "postgresql"
25
- url = env("DATABASE_URL")
26
- }
27
-
28
- model User {
29
- id String @id @default(cuid())
30
- email String @unique
31
- name String
32
-
33
- /// @fusion.hide — Stripped by the Egress Firewall before reaching the LLM
34
- password String
35
-
36
- role String @default("USER")
37
- createdAt DateTime @default(now())
38
- updatedAt DateTime @updatedAt
39
-
40
- posts Post[]
41
- }
42
-
43
- model Post {
44
- id String @id @default(cuid())
45
- title String
46
- content String?
47
- published Boolean @default(false)
48
- createdAt DateTime @default(now())
49
-
50
- author User @relation(fields: [authorId], references: [id])
51
- authorId String
52
- }
7
+ return `// Prisma Schema — Database-Driven MCP Server
8
+ //
9
+ // The mcp-fusion-prisma-gen generator reads annotations
10
+ // and auto-generates Presenters + ToolBuilders with:
11
+ // - Field-level security (/// @fusion.hide)
12
+ // - Tenant isolation
13
+ // - OOM protection
14
+
15
+ generator client {
16
+ provider = "prisma-client-js"
17
+ }
18
+
19
+ generator fusion {
20
+ provider = "mcp-fusion-prisma-gen"
21
+ }
22
+
23
+ datasource db {
24
+ provider = "postgresql"
25
+ url = env("DATABASE_URL")
26
+ }
27
+
28
+ model User {
29
+ id String @id @default(cuid())
30
+ email String @unique
31
+ name String
32
+
33
+ /// @fusion.hide — Stripped by the Egress Firewall before reaching the LLM
34
+ password String
35
+
36
+ role String @default("USER")
37
+ createdAt DateTime @default(now())
38
+ updatedAt DateTime @updatedAt
39
+
40
+ posts Post[]
41
+ }
42
+
43
+ model Post {
44
+ id String @id @default(cuid())
45
+ title String
46
+ content String?
47
+ published Boolean @default(false)
48
+ createdAt DateTime @default(now())
49
+
50
+ author User @relation(fields: [authorId], references: [id])
51
+ authorId String
52
+ }
53
53
  `;
54
54
  }
55
55
  /** Generate `src/tools/db/users.ts` */
56
56
  export function dbUsersToolTs() {
57
- return `/**
58
- * Database Users Tool — Prisma-Driven CRUD
59
- *
60
- * Example tool that queries the database via Prisma.
61
- * The Presenter strips the 'password' field before
62
- * it reaches the LLM context.
63
- */
64
- import { f } from '../../fusion.js';
65
- import { success } from '@vinkius-core/mcp-fusion';
66
-
67
- export default f.tool({
68
- name: 'db.list_users',
69
- description: 'List users from the database',
70
- readOnly: true,
71
- input: {
72
- take: { type: 'number', min: 1, max: 50, optional: true, description: 'Max results' },
73
- },
74
- handler: async ({ input, ctx }) => {
75
- // TODO: Replace with your Prisma client
76
- // const users = await ctx.db.user.findMany({ take: input.take ?? 10 });
77
- // return users;
78
-
79
- return success({
80
- hint: 'Connect your Prisma client in src/context.ts to enable database queries.',
81
- example: 'const users = await ctx.db.user.findMany({ take: 10 })',
82
- });
83
- },
84
- });
57
+ return `/**
58
+ * Database Users Tool — Prisma-Driven CRUD
59
+ *
60
+ * Example tool that queries the database via Prisma.
61
+ * The Presenter strips the 'password' field before
62
+ * it reaches the LLM context.
63
+ */
64
+ import { f } from '../../fusion.js';
65
+ import { success } from '@vinkius-core/mcp-fusion';
66
+
67
+ export default f.tool({
68
+ name: 'db.list_users',
69
+ description: 'List users from the database',
70
+ readOnly: true,
71
+ input: {
72
+ take: { type: 'number', min: 1, max: 50, optional: true, description: 'Max results' },
73
+ },
74
+ handler: async ({ input, ctx }) => {
75
+ // TODO: Replace with your Prisma client
76
+ // const users = await ctx.db.user.findMany({ take: input.take ?? 10 });
77
+ // return users;
78
+
79
+ return success({
80
+ hint: 'Connect your Prisma client in src/context.ts to enable database queries.',
81
+ example: 'const users = await ctx.db.user.findMany({ take: 10 })',
82
+ });
83
+ },
84
+ });
85
85
  `;
86
86
  }
87
87
  //# sourceMappingURL=database.js.map
@@ -4,74 +4,74 @@
4
4
  */
5
5
  /** Generate `src/auth.ts` — OAuth Device Flow setup */
6
6
  export function oauthSetupTs(config) {
7
- return `/**
8
- * OAuth Setup — Device Flow Authentication (RFC 8628)
9
- *
10
- * Pre-configured \`createAuthTool()\` with login, complete, status, logout actions.
11
- * The \`requireAuth()\` middleware protects any tool with one line.
12
- *
13
- * 1. Set CLIENT_ID and AUTH endpoints in .env
14
- * 2. Register the auth tool in server.ts
15
- * 3. Use \`requireAuth()\` on protected tools
16
- */
17
- import { createAuthTool, TokenManager } from '@vinkius-core/mcp-fusion-oauth';
18
- import type { ToolRegistry } from '@vinkius-core/mcp-fusion';
19
-
20
- export function registerAuth<TContext>(registry: ToolRegistry<TContext>): void {
21
- const clientId = process.env['OAUTH_CLIENT_ID'];
22
- const authEndpoint = process.env['OAUTH_AUTH_ENDPOINT'];
23
- const tokenEndpoint = process.env['OAUTH_TOKEN_ENDPOINT'];
24
-
25
- if (!clientId || !authEndpoint || !tokenEndpoint) {
26
- console.error('⚠️ OAUTH_CLIENT_ID, OAUTH_AUTH_ENDPOINT, OAUTH_TOKEN_ENDPOINT are required in .env');
27
- return;
28
- }
29
-
30
- const auth = createAuthTool({
31
- clientId,
32
- authorizationEndpoint: authEndpoint,
33
- tokenEndpoint,
34
- tokenManager: {
35
- configDir: '.${config.name}',
36
- envVar: '${config.name.toUpperCase().replace(/-/g, '_')}_TOKEN',
37
- },
38
- });
39
-
40
- registry.register(auth);
41
- console.error('🔐 OAuth Device Flow registered (auth.login → auth.complete → auth.status)');
42
- }
7
+ return `/**
8
+ * OAuth Setup — Device Flow Authentication (RFC 8628)
9
+ *
10
+ * Pre-configured \`createAuthTool()\` with login, complete, status, logout actions.
11
+ * The \`requireAuth()\` middleware protects any tool with one line.
12
+ *
13
+ * 1. Set CLIENT_ID and AUTH endpoints in .env
14
+ * 2. Register the auth tool in server.ts
15
+ * 3. Use \`requireAuth()\` on protected tools
16
+ */
17
+ import { createAuthTool, TokenManager } from '@vinkius-core/mcp-fusion-oauth';
18
+ import type { ToolRegistry } from '@vinkius-core/mcp-fusion';
19
+
20
+ export function registerAuth<TContext>(registry: ToolRegistry<TContext>): void {
21
+ const clientId = process.env['OAUTH_CLIENT_ID'];
22
+ const authEndpoint = process.env['OAUTH_AUTH_ENDPOINT'];
23
+ const tokenEndpoint = process.env['OAUTH_TOKEN_ENDPOINT'];
24
+
25
+ if (!clientId || !authEndpoint || !tokenEndpoint) {
26
+ console.error('⚠️ OAUTH_CLIENT_ID, OAUTH_AUTH_ENDPOINT, OAUTH_TOKEN_ENDPOINT are required in .env');
27
+ return;
28
+ }
29
+
30
+ const auth = createAuthTool({
31
+ clientId,
32
+ authorizationEndpoint: authEndpoint,
33
+ tokenEndpoint,
34
+ tokenManager: {
35
+ configDir: '.${config.name}',
36
+ envVar: '${config.name.toUpperCase().replace(/-/g, '_')}_TOKEN',
37
+ },
38
+ });
39
+
40
+ registry.register(auth);
41
+ console.error('🔐 OAuth Device Flow registered (auth.login → auth.complete → auth.status)');
42
+ }
43
43
  `;
44
44
  }
45
45
  /** Generate `src/middleware/auth.ts` — requireAuth middleware */
46
46
  export function oauthMiddlewareTs() {
47
- return `/**
48
- * Auth Middleware — Protect tools with requireAuth()
49
- *
50
- * @example
51
- * \`\`\`ts
52
- * import { withAuth } from '../middleware/auth.js';
53
- *
54
- * export default f.tool({
55
- * name: 'projects.list',
56
- * middleware: [withAuth],
57
- * handler: async ({ ctx }) => { /* authenticated */ },
58
- * });
59
- * \`\`\`
60
- */
61
- import { requireAuth } from '@vinkius-core/mcp-fusion-oauth';
62
-
63
- /**
64
- * Pre-configured auth middleware.
65
- * Rejects unauthenticated requests with \`AUTH_REQUIRED\` + self-healing hints.
66
- */
67
- export const withAuth = requireAuth({
68
- extractToken: (ctx: unknown) => {
69
- const obj = ctx as Record<string, unknown>;
70
- return typeof obj['token'] === 'string' ? obj['token'] : null;
71
- },
72
- recoveryHint: 'Call auth action=login to authenticate via browser',
73
- recoveryAction: 'auth',
74
- });
47
+ return `/**
48
+ * Auth Middleware — Protect tools with requireAuth()
49
+ *
50
+ * @example
51
+ * \`\`\`ts
52
+ * import { withAuth } from '../middleware/auth.js';
53
+ *
54
+ * export default f.tool({
55
+ * name: 'projects.list',
56
+ * middleware: [withAuth],
57
+ * handler: async ({ ctx }) => { /* authenticated */ },
58
+ * });
59
+ * \`\`\`
60
+ */
61
+ import { requireAuth } from '@vinkius-core/mcp-fusion-oauth';
62
+
63
+ /**
64
+ * Pre-configured auth middleware.
65
+ * Rejects unauthenticated requests with \`AUTH_REQUIRED\` + self-healing hints.
66
+ */
67
+ export const withAuth = requireAuth({
68
+ extractToken: (ctx: unknown) => {
69
+ const obj = ctx as Record<string, unknown>;
70
+ return typeof obj['token'] === 'string' ? obj['token'] : null;
71
+ },
72
+ recoveryHint: 'Call auth action=login to authenticate via browser',
73
+ recoveryAction: 'auth',
74
+ });
75
75
  `;
76
76
  }
77
77
  //# sourceMappingURL=oauth.js.map
@@ -1,106 +1,106 @@
1
1
  /** Generate `openapi.yaml` — Sample OpenAPI spec */
2
2
  export function openapiYaml(config) {
3
- return `# OpenAPI 3.0 Specification — Sample
4
- #
5
- # Replace this with your actual API spec, then run:
6
- # npx mcp-fusion-openapi-gen ./openapi.yaml --outDir ./src/generated
7
- #
8
- # The generator creates Presenters, Tools, Registry, and server
9
- # bootstrap — all configurable via YAML annotations.
10
-
11
- openapi: '3.0.3'
12
- info:
13
- title: '${config.name} API'
14
- version: '0.1.0'
15
- description: Sample API for MCP Fusion OpenAPI generation
16
-
17
- servers:
18
- - url: http://localhost:3000/api
19
-
20
- paths:
21
- /health:
22
- get:
23
- operationId: getHealth
24
- summary: Health check endpoint
25
- responses:
26
- '200':
27
- description: Server health status
28
- content:
29
- application/json:
30
- schema:
31
- type: object
32
- properties:
33
- status:
34
- type: string
35
- example: healthy
36
- uptime:
37
- type: number
38
- example: 12345.67
39
-
40
- /users:
41
- get:
42
- operationId: listUsers
43
- summary: List all users
44
- parameters:
45
- - name: limit
46
- in: query
47
- schema:
48
- type: integer
49
- minimum: 1
50
- maximum: 100
51
- default: 10
52
- responses:
53
- '200':
54
- description: List of users
55
- content:
56
- application/json:
57
- schema:
58
- type: array
59
- items:
60
- $ref: '#/components/schemas/User'
61
-
62
- components:
63
- schemas:
64
- User:
65
- type: object
66
- properties:
67
- id:
68
- type: string
69
- name:
70
- type: string
71
- email:
72
- type: string
3
+ return `# OpenAPI 3.0 Specification — Sample
4
+ #
5
+ # Replace this with your actual API spec, then run:
6
+ # npx mcp-fusion-openapi-gen ./openapi.yaml --outDir ./src/generated
7
+ #
8
+ # The generator creates Presenters, Tools, Registry, and server
9
+ # bootstrap — all configurable via YAML annotations.
10
+
11
+ openapi: '3.0.3'
12
+ info:
13
+ title: '${config.name} API'
14
+ version: '0.1.0'
15
+ description: Sample API for MCP Fusion OpenAPI generation
16
+
17
+ servers:
18
+ - url: http://localhost:3000/api
19
+
20
+ paths:
21
+ /health:
22
+ get:
23
+ operationId: getHealth
24
+ summary: Health check endpoint
25
+ responses:
26
+ '200':
27
+ description: Server health status
28
+ content:
29
+ application/json:
30
+ schema:
31
+ type: object
32
+ properties:
33
+ status:
34
+ type: string
35
+ example: healthy
36
+ uptime:
37
+ type: number
38
+ example: 12345.67
39
+
40
+ /users:
41
+ get:
42
+ operationId: listUsers
43
+ summary: List all users
44
+ parameters:
45
+ - name: limit
46
+ in: query
47
+ schema:
48
+ type: integer
49
+ minimum: 1
50
+ maximum: 100
51
+ default: 10
52
+ responses:
53
+ '200':
54
+ description: List of users
55
+ content:
56
+ application/json:
57
+ schema:
58
+ type: array
59
+ items:
60
+ $ref: '#/components/schemas/User'
61
+
62
+ components:
63
+ schemas:
64
+ User:
65
+ type: object
66
+ properties:
67
+ id:
68
+ type: string
69
+ name:
70
+ type: string
71
+ email:
72
+ type: string
73
73
  `;
74
74
  }
75
75
  /** Generate `SETUP.md` — OpenAPI generation instructions */
76
76
  export function openapiSetupMd() {
77
- return `# OpenAPI Generator Setup
78
-
79
- This project is configured for the **Legacy API Proxy** ingestion vector.
80
-
81
- ## Steps
82
-
83
- 1. Replace \`openapi.yaml\` with your actual OpenAPI 3.x spec
84
-
85
- 2. Generate the MCP server from the spec:
86
- \`\`\`bash
87
- npx mcp-fusion-openapi-gen ./openapi.yaml --outDir ./src/generated
88
- \`\`\`
89
-
90
- 3. The generator creates:
91
- - Presenters with Zod schemas (Egress Firewall)
92
- - Tool builders with typed handlers
93
- - Registry setup with all endpoints
94
-
95
- 4. Import and register in \`src/server.ts\`:
96
- \`\`\`typescript
97
- import { generatedTools } from './generated/registry.js';
98
- registry.registerAll(...generatedTools);
99
- \`\`\`
100
-
101
- ## Documentation
102
-
103
- See: [OpenAPI Generator](https://mcp-fusion.vinkius.com/openapi-gen)
77
+ return `# OpenAPI Generator Setup
78
+
79
+ This project is configured for the **Legacy API Proxy** ingestion vector.
80
+
81
+ ## Steps
82
+
83
+ 1. Replace \`openapi.yaml\` with your actual OpenAPI 3.x spec
84
+
85
+ 2. Generate the MCP server from the spec:
86
+ \`\`\`bash
87
+ npx mcp-fusion-openapi-gen ./openapi.yaml --outDir ./src/generated
88
+ \`\`\`
89
+
90
+ 3. The generator creates:
91
+ - Presenters with Zod schemas (Egress Firewall)
92
+ - Tool builders with typed handlers
93
+ - Registry setup with all endpoints
94
+
95
+ 4. Import and register in \`src/server.ts\`:
96
+ \`\`\`typescript
97
+ import { generatedTools } from './generated/registry.js';
98
+ registry.registerAll(...generatedTools);
99
+ \`\`\`
100
+
101
+ ## Documentation
102
+
103
+ See: [OpenAPI Generator](https://mcp-fusion.vinkius.com/openapi-gen)
104
104
  `;
105
105
  }
106
106
  //# sourceMappingURL=openapi.js.map
@@ -129,6 +129,7 @@ export declare class GroupedToolBuilder<TContext = void, TCommon extends Record<
129
129
  private _hasFlat;
130
130
  private _hasGroup;
131
131
  private _toonMode;
132
+ private _selectEnabled;
132
133
  private _frozen;
133
134
  private _debug?;
134
135
  private _tracer?;
@@ -263,6 +264,44 @@ export declare class GroupedToolBuilder<TContext = void, TCommon extends Record<
263
264
  * @see {@link toonSuccess} for TOON-encoded responses
264
265
  */
265
266
  toonDescription(): this;
267
+ /**
268
+ * Enable `_select` reflection for context window optimization.
269
+ *
270
+ * When enabled, actions that use a Presenter with a Zod schema
271
+ * expose an optional `_select` parameter in the input schema.
272
+ * The AI can send `_select: ['status', 'amount']` to receive
273
+ * only the specified top-level fields in the data payload,
274
+ * reducing context window usage without developer effort.
275
+ *
276
+ * **Disabled by default** — opt-in to avoid changing existing
277
+ * tool schemas.
278
+ *
279
+ * **Late Guillotine**: UI blocks, system rules, and action
280
+ * suggestions are always computed with the **full** validated
281
+ * data. Only the wire-facing data block is filtered.
282
+ *
283
+ * **Shallow (top-level only)**: Nested objects are returned
284
+ * whole. If the AI selects `'user'`, it gets the entire `user`
285
+ * object. No recursive GraphQL-style traversal.
286
+ *
287
+ * @returns `this` for chaining
288
+ *
289
+ * @example
290
+ * ```typescript
291
+ * createTool<AppContext>('invoices')
292
+ * .enableSelect() // Expose _select in input schema
293
+ * .action({
294
+ * name: 'get',
295
+ * returns: InvoicePresenter,
296
+ * handler: async (ctx, args) => ctx.db.invoices.findUnique(args.id),
297
+ * });
298
+ * // AI sends: { action: 'get', id: '123', _select: ['status'] }
299
+ * // Returns: { status: 'paid' } instead of full invoice
300
+ * ```
301
+ *
302
+ * @see {@link Presenter.getSchemaKeys} for introspection
303
+ */
304
+ enableSelect(): this;
266
305
  /**
267
306
  * Set concurrency limits for this tool (Semaphore + Queue pattern).
268
307
  *
@@ -589,6 +628,8 @@ export declare class GroupedToolBuilder<TContext = void, TCommon extends Record<
589
628
  * @returns The common Zod schema, or undefined if not set
590
629
  */
591
630
  getCommonSchema(): ZodObject<ZodRawShape> | undefined;
631
+ /** Check if `_select` reflection is enabled. Used by the Exposition Compiler. */
632
+ getSelectEnabled(): boolean;
592
633
  /**
593
634
  * Preview the exact MCP protocol payload that the LLM will receive.
594
635
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GroupedToolBuilder.d.ts","sourceRoot":"","sources":["../../../src/core/builder/GroupedToolBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,KAAK,IAAI,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,gCAAgC,CAAC;AAMnF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAK5F,OAAO,EAEH,KAAK,iBAAiB,EAEzB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAKjE;;;;;;;;;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