glirastes 0.3.0 → 0.3.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.
- package/CHANGELOG.md +63 -0
- package/README.md +146 -9
- package/codegen/package.json +5 -0
- package/dist/cjs/codegen/asset-sync.d.ts +20 -0
- package/dist/cjs/codegen/asset-sync.js +28 -0
- package/dist/cjs/codegen/coverage.d.ts +66 -0
- package/dist/cjs/codegen/coverage.js +408 -0
- package/dist/cjs/codegen/endpoint-scanner.d.ts +16 -0
- package/dist/cjs/codegen/endpoint-scanner.js +197 -0
- package/dist/cjs/codegen/format.d.ts +17 -0
- package/dist/cjs/codegen/format.js +34 -0
- package/dist/cjs/codegen/fs-utils.d.ts +45 -0
- package/dist/cjs/codegen/fs-utils.js +165 -0
- package/dist/cjs/codegen/index.d.ts +13 -0
- package/dist/cjs/codegen/index.js +33 -0
- package/dist/cjs/codegen/mcp-generator.d.ts +50 -0
- package/dist/cjs/codegen/mcp-generator.js +803 -0
- package/dist/cjs/codegen/module-generator.d.ts +11 -0
- package/dist/cjs/codegen/module-generator.js +353 -0
- package/dist/cjs/codegen/nestjs-scanner.d.ts +43 -0
- package/dist/cjs/codegen/nestjs-scanner.js +241 -0
- package/dist/cjs/codegen/output-recommender.d.ts +23 -0
- package/dist/cjs/codegen/output-recommender.js +33 -0
- package/dist/cjs/codegen/scaffolder.d.ts +36 -0
- package/dist/cjs/codegen/scaffolder.js +262 -0
- package/dist/cjs/codegen/skill-generator.d.ts +49 -0
- package/dist/cjs/codegen/skill-generator.js +967 -0
- package/dist/cjs/codegen/types.d.ts +52 -0
- package/dist/cjs/codegen/types.js +16 -0
- package/dist/cjs/codegen/ui-scanner.d.ts +24 -0
- package/dist/cjs/codegen/ui-scanner.js +202 -0
- package/dist/cjs/codegen/validator.d.ts +35 -0
- package/dist/cjs/codegen/validator.js +292 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/openapi/index.d.ts +78 -0
- package/dist/cjs/openapi/index.js +347 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/react/audio-worklet-processor.d.ts +16 -0
- package/dist/cjs/react/audio-worklet-processor.js +27 -0
- package/dist/cjs/react/bridges/rest-session-bridge.d.ts +113 -0
- package/dist/cjs/react/bridges/rest-session-bridge.js +209 -0
- package/dist/cjs/react/components/ai-chat-panel.d.ts +12 -0
- package/dist/cjs/react/components/ai-chat-panel.js +67 -0
- package/dist/cjs/react/components/ai-trigger-button.d.ts +2 -0
- package/dist/cjs/react/components/ai-trigger-button.js +239 -0
- package/dist/cjs/react/components/approval-card.d.ts +9 -0
- package/dist/cjs/react/components/approval-card.js +24 -0
- package/dist/cjs/react/components/bulk-approval-card.d.ts +9 -0
- package/dist/cjs/react/components/bulk-approval-card.js +36 -0
- package/dist/cjs/react/components/chat-input.d.ts +10 -0
- package/dist/cjs/react/components/chat-input.js +60 -0
- package/dist/cjs/react/components/chat-window.d.ts +2 -0
- package/dist/cjs/react/components/chat-window.js +134 -0
- package/dist/cjs/react/components/confirm-dialog.d.ts +32 -0
- package/dist/cjs/react/components/confirm-dialog.js +48 -0
- package/dist/cjs/react/components/floating-chat-ui.d.ts +90 -0
- package/dist/cjs/react/components/floating-chat-ui.js +163 -0
- package/dist/cjs/react/components/mention-chip.d.ts +16 -0
- package/dist/cjs/react/components/mention-chip.js +42 -0
- package/dist/cjs/react/components/mention-input.d.ts +8 -0
- package/dist/cjs/react/components/mention-input.js +117 -0
- package/dist/cjs/react/components/message-bubble.d.ts +11 -0
- package/dist/cjs/react/components/message-bubble.js +171 -0
- package/dist/cjs/react/components/message-list.d.ts +8 -0
- package/dist/cjs/react/components/message-list.js +52 -0
- package/dist/cjs/react/components/pipeline-timeline.d.ts +7 -0
- package/dist/cjs/react/components/pipeline-timeline.js +72 -0
- package/dist/cjs/react/components/recording-bar.d.ts +2 -0
- package/dist/cjs/react/components/recording-bar.js +81 -0
- package/dist/cjs/react/components/recording-controls.d.ts +18 -0
- package/dist/cjs/react/components/recording-controls.js +38 -0
- package/dist/cjs/react/components/rich-mention-input.d.ts +2 -0
- package/dist/cjs/react/components/rich-mention-input.js +571 -0
- package/dist/cjs/react/components/session-switcher.d.ts +14 -0
- package/dist/cjs/react/components/session-switcher.js +133 -0
- package/dist/cjs/react/components/suggestion-bar.d.ts +9 -0
- package/dist/cjs/react/components/suggestion-bar.js +47 -0
- package/dist/cjs/react/components/suggestion-chip.d.ts +9 -0
- package/dist/cjs/react/components/suggestion-chip.js +14 -0
- package/dist/cjs/react/components/voice-input-addon.d.ts +13 -0
- package/dist/cjs/react/components/voice-input-addon.js +31 -0
- package/dist/cjs/react/components/voice-input-button.d.ts +2 -0
- package/dist/cjs/react/components/voice-input-button.js +55 -0
- package/dist/cjs/react/components/wavesurfer-loader.d.ts +5 -0
- package/dist/cjs/react/components/wavesurfer-loader.js +36 -0
- package/dist/cjs/react/hooks/use-ai-chat.d.ts +22 -0
- package/dist/cjs/react/hooks/use-ai-chat.js +51 -0
- package/dist/cjs/react/hooks/use-approvals.d.ts +23 -0
- package/dist/cjs/react/hooks/use-approvals.js +63 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.d.ts +2 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.js +329 -0
- package/dist/cjs/react/hooks/use-drag-resize-panel.d.ts +48 -0
- package/dist/cjs/react/hooks/use-drag-resize-panel.js +308 -0
- package/dist/cjs/react/hooks/use-draggable-position.d.ts +25 -0
- package/dist/cjs/react/hooks/use-draggable-position.js +134 -0
- package/dist/cjs/react/hooks/use-keyboard-shortcut.d.ts +20 -0
- package/dist/cjs/react/hooks/use-keyboard-shortcut.js +93 -0
- package/dist/cjs/react/hooks/use-mentions.d.ts +23 -0
- package/dist/cjs/react/hooks/use-mentions.js +42 -0
- package/dist/cjs/react/hooks/use-suggestions.d.ts +22 -0
- package/dist/cjs/react/hooks/use-suggestions.js +39 -0
- package/dist/cjs/react/index.d.ts +43 -0
- package/dist/cjs/react/index.js +111 -0
- package/dist/cjs/react/provider/ai-chat-provider.d.ts +45 -0
- package/dist/cjs/react/provider/ai-chat-provider.js +1024 -0
- package/dist/cjs/react/provider/chat-context.d.ts +84 -0
- package/dist/cjs/react/provider/chat-context.js +13 -0
- package/dist/cjs/react/template.d.ts +84 -0
- package/dist/cjs/react/template.js +90 -0
- package/dist/cjs/react/themes.d.ts +24 -0
- package/dist/cjs/react/themes.js +273 -0
- package/dist/cjs/react/transports/langgraph/index.d.ts +2 -0
- package/dist/cjs/react/transports/langgraph/index.js +8 -0
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.d.ts +62 -0
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.js +94 -0
- package/dist/cjs/react/transports/langgraph.d.ts +71 -0
- package/dist/cjs/react/transports/langgraph.js +369 -0
- package/dist/cjs/react/transports/vercel/index.d.ts +2 -0
- package/dist/cjs/react/transports/vercel/index.js +8 -0
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.d.ts +49 -0
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.js +81 -0
- package/dist/cjs/react/transports/vercel.d.ts +30 -0
- package/dist/cjs/react/transports/vercel.js +69 -0
- package/dist/cjs/react/types.d.ts +760 -0
- package/dist/cjs/react/types.js +2 -0
- package/dist/cjs/react/ui.d.ts +73 -0
- package/dist/cjs/react/ui.js +183 -0
- package/dist/cjs/react/utils/create-approval-description.d.ts +53 -0
- package/dist/cjs/react/utils/create-approval-description.js +122 -0
- package/dist/cjs/react/utils/create-tool-result-handler.d.ts +90 -0
- package/dist/cjs/react/utils/create-tool-result-handler.js +168 -0
- package/dist/cjs/react/utils/mention-markup.d.ts +13 -0
- package/dist/cjs/react/utils/mention-markup.js +117 -0
- package/dist/cjs/react/utils/merge-pipeline-steps.d.ts +19 -0
- package/dist/cjs/react/utils/merge-pipeline-steps.js +81 -0
- package/dist/cjs/react/utils/sanitize-stored-messages.d.ts +23 -0
- package/dist/cjs/react/utils/sanitize-stored-messages.js +52 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +10 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.js +42 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +32 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +4 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.d.ts +11 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.js +80 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.d.ts +9 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.js +119 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.d.ts +13 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.js +131 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +7 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +52 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +19 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +108 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +8 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.js +59 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.d.ts +3 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.js +9 -0
- package/dist/cjs/server/adapters/nestjs/chat/index.d.ts +3 -0
- package/dist/cjs/server/adapters/nestjs/chat/index.js +9 -0
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +4 -0
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.js +73 -0
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.d.ts +5 -0
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.js +72 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +6 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.js +13 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +5 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.js +15 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +6 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.js +22 -0
- package/dist/cjs/server/adapters/nestjs/decorators/constants.d.ts +4 -0
- package/dist/cjs/server/adapters/nestjs/decorators/constants.js +7 -0
- package/dist/cjs/server/adapters/nestjs/index.d.ts +14 -0
- package/dist/cjs/server/adapters/nestjs/index.js +42 -0
- package/dist/cjs/server/adapters/nestjs/metadata.d.ts +39 -0
- package/dist/cjs/server/adapters/nestjs/metadata.js +36 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +36 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.js +159 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.d.ts +37 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.js +44 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.d.ts +28 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.js +41 -0
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +16 -0
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.js +117 -0
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.d.ts +26 -0
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.js +259 -0
- package/dist/cjs/server/adapters/nestjs/swagger.d.ts +7 -0
- package/dist/cjs/server/adapters/nestjs/swagger.js +39 -0
- package/dist/cjs/server/adapters/nextjs/context-helpers.d.ts +22 -0
- package/dist/cjs/server/adapters/nextjs/context-helpers.js +60 -0
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.d.ts +94 -0
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.js +965 -0
- package/dist/cjs/server/adapters/nextjs/filter-fallback-error.d.ts +11 -0
- package/dist/cjs/server/adapters/nextjs/filter-fallback-error.js +41 -0
- package/dist/cjs/server/adapters/nextjs/index.d.ts +8 -0
- package/dist/cjs/server/adapters/nextjs/index.js +22 -0
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.d.ts +58 -0
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.js +114 -0
- package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.d.ts +64 -0
- package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.js +489 -0
- package/dist/cjs/server/adapters/nextjs/server-action-helper.d.ts +7 -0
- package/dist/cjs/server/adapters/nextjs/server-action-helper.js +40 -0
- package/dist/cjs/server/adapters/nextjs/types.d.ts +246 -0
- package/dist/cjs/server/adapters/nextjs/types.js +2 -0
- package/dist/cjs/server/adapters/nextjs/with-ai-tool.d.ts +9 -0
- package/dist/cjs/server/adapters/nextjs/with-ai-tool.js +12 -0
- package/dist/cjs/server/core/followup-tool.d.ts +9 -0
- package/dist/cjs/server/core/followup-tool.js +82 -0
- package/dist/cjs/server/core/index.d.ts +139 -0
- package/dist/cjs/server/core/index.js +818 -0
- package/dist/cjs/server/core/intent-classifier.d.ts +94 -0
- package/dist/cjs/server/core/intent-classifier.js +324 -0
- package/dist/cjs/server/core/model-selector.d.ts +12 -0
- package/dist/cjs/server/core/model-selector.js +48 -0
- package/dist/cjs/server/core/module-router.d.ts +14 -0
- package/dist/cjs/server/core/module-router.js +110 -0
- package/dist/cjs/server/core/zod-compact.d.ts +18 -0
- package/dist/cjs/server/core/zod-compact.js +129 -0
- package/dist/cjs/server/index.d.ts +6 -0
- package/dist/cjs/server/index.js +28 -0
- package/dist/cjs/server/lancer/cache.d.ts +9 -0
- package/dist/cjs/server/lancer/cache.js +33 -0
- package/dist/cjs/server/lancer/client.d.ts +2 -0
- package/dist/cjs/server/lancer/client.js +279 -0
- package/dist/cjs/server/lancer/errors.d.ts +13 -0
- package/dist/cjs/server/lancer/errors.js +21 -0
- package/dist/cjs/server/lancer/index.d.ts +3 -0
- package/dist/cjs/server/lancer/index.js +7 -0
- package/dist/cjs/server/lancer/telemetry-buffer.d.ts +15 -0
- package/dist/cjs/server/lancer/telemetry-buffer.js +64 -0
- package/dist/cjs/server/lancer/types.d.ts +201 -0
- package/dist/cjs/server/lancer/types.js +5 -0
- package/dist/cjs/server/pii-shield/aegis-detector.d.ts +26 -0
- package/dist/cjs/server/pii-shield/aegis-detector.js +26 -0
- package/dist/cjs/server/pii-shield/create-pii-shield.d.ts +2 -0
- package/dist/cjs/server/pii-shield/create-pii-shield.js +191 -0
- package/dist/cjs/server/pii-shield/deep-walk.d.ts +1 -0
- package/dist/cjs/server/pii-shield/deep-walk.js +19 -0
- package/dist/cjs/server/pii-shield/fake-data.d.ts +5 -0
- package/dist/cjs/server/pii-shield/fake-data.js +170 -0
- package/dist/cjs/server/pii-shield/index.d.ts +4 -0
- package/dist/cjs/server/pii-shield/index.js +9 -0
- package/dist/cjs/server/pii-shield/leakage.d.ts +1 -0
- package/dist/cjs/server/pii-shield/leakage.js +15 -0
- package/dist/cjs/server/pii-shield/session-mapping.d.ts +12 -0
- package/dist/cjs/server/pii-shield/session-mapping.js +70 -0
- package/dist/cjs/server/pipeline.d.ts +26 -0
- package/dist/cjs/server/pipeline.js +127 -0
- package/dist/cjs/server/testing/approvals.d.ts +11 -0
- package/dist/cjs/server/testing/approvals.js +41 -0
- package/dist/cjs/server/testing/combination.d.ts +3 -0
- package/dist/cjs/server/testing/combination.js +83 -0
- package/dist/cjs/server/testing/create-test-suite.d.ts +29 -0
- package/dist/cjs/server/testing/create-test-suite.js +81 -0
- package/dist/cjs/server/testing/edge-cases.d.ts +8 -0
- package/dist/cjs/server/testing/edge-cases.js +277 -0
- package/dist/cjs/server/testing/guardrails.d.ts +14 -0
- package/dist/cjs/server/testing/guardrails.js +152 -0
- package/dist/cjs/server/testing/helpers.d.ts +14 -0
- package/dist/cjs/server/testing/helpers.js +119 -0
- package/dist/cjs/server/testing/index.d.ts +12 -0
- package/dist/cjs/server/testing/index.js +37 -0
- package/dist/cjs/server/testing/mock-executor.d.ts +8 -0
- package/dist/cjs/server/testing/mock-executor.js +40 -0
- package/dist/cjs/server/testing/regression.d.ts +7 -0
- package/dist/cjs/server/testing/regression.js +27 -0
- package/dist/cjs/server/testing/routing.d.ts +12 -0
- package/dist/cjs/server/testing/routing.js +63 -0
- package/dist/cjs/server/testing/schema-consistency.d.ts +6 -0
- package/dist/cjs/server/testing/schema-consistency.js +56 -0
- package/dist/cjs/server/testing/smoke.d.ts +11 -0
- package/dist/cjs/server/testing/smoke.js +64 -0
- package/dist/cjs/server/testing/types.d.ts +156 -0
- package/dist/cjs/server/testing/types.js +2 -0
- package/dist/cjs/types.d.ts +696 -0
- package/dist/cjs/types.js +91 -0
- package/dist/cli/commands/install-skills.d.ts +17 -0
- package/dist/cli/commands/install-skills.js +185 -0
- package/dist/cli/commands/install-skills.js.map +1 -0
- package/dist/cli/index.js +25 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/react/components/ai-trigger-button.js +4 -6
- package/dist/react/components/ai-trigger-button.js.map +1 -1
- package/dist/react/components/recording-bar.js +4 -6
- package/dist/react/components/recording-bar.js.map +1 -1
- package/dist/react/components/wavesurfer-loader.d.ts +5 -0
- package/dist/react/components/wavesurfer-loader.js +34 -0
- package/dist/react/components/wavesurfer-loader.js.map +1 -0
- package/dist/server/adapters/nestjs/chat/ai-chat.module.d.ts +1 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js +3 -2
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js.map +1 -1
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +1 -1
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js +10 -8
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js.map +1 -1
- package/dist/server/adapters/nestjs/chat/ws-loader.d.ts +5 -0
- package/dist/server/adapters/nestjs/chat/ws-loader.js +37 -0
- package/dist/server/adapters/nestjs/chat/ws-loader.js.map +1 -0
- package/openapi/package.json +5 -0
- package/package.json +59 -16
- package/react/langgraph/package.json +5 -0
- package/react/package.json +5 -0
- package/react/vercel/package.json +5 -0
- package/server/nestjs/package.json +5 -0
- package/server/nextjs/package.json +5 -0
- package/server/package.json +5 -0
- package/server/testing/package.json +5 -0
- package/skills/README.md +107 -0
- package/skills/building-glirastes-chat-ui/SKILL.md +378 -0
- package/skills/integrating-glirastes-nestjs/SKILL.md +346 -0
- package/skills/integrating-glirastes-nextjs/SKILL.md +306 -0
- package/skills/integrating-glirastes-nextjs-with-nestjs-backend/SKILL.md +359 -0
- package/skills/maintaining-glirastes-tools/SKILL.md +463 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createMockToolExecutor = createMockToolExecutor;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a mock tool executor that validates inputs against Zod schemas
|
|
6
|
+
* and returns the provided mock responses.
|
|
7
|
+
*
|
|
8
|
+
* Does not make any HTTP calls — purely validates and returns mocks.
|
|
9
|
+
*/
|
|
10
|
+
function createMockToolExecutor(toolRegistry) {
|
|
11
|
+
return {
|
|
12
|
+
execute(toolName, input, mockResponse) {
|
|
13
|
+
const tool = toolRegistry[toolName];
|
|
14
|
+
if (!tool) {
|
|
15
|
+
return {
|
|
16
|
+
success: false,
|
|
17
|
+
validationError: `Tool "${toolName}" not found in registry`,
|
|
18
|
+
response: null,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (tool.inputSchema) {
|
|
22
|
+
const result = tool.inputSchema.safeParse(input);
|
|
23
|
+
if (!result.success) {
|
|
24
|
+
const issues = result.error?.issues
|
|
25
|
+
.map((i) => `${i.path.join('.')}: ${i.message}`)
|
|
26
|
+
.join('; ');
|
|
27
|
+
return {
|
|
28
|
+
success: false,
|
|
29
|
+
validationError: issues ?? 'Validation failed',
|
|
30
|
+
response: null,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
success: true,
|
|
36
|
+
response: mockResponse,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PipelineComponents } from './helpers.js';
|
|
2
|
+
import type { RegressionTestCase } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Runs user-defined regression tests with access to pipeline simulation
|
|
5
|
+
* and tool registry for custom assertions.
|
|
6
|
+
*/
|
|
7
|
+
export declare function runRegressionTest(components: PipelineComponents, toolRegistry: Record<string, unknown>, cases: RegressionTestCase[]): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runRegressionTest = runRegressionTest;
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const helpers_js_1 = require("./helpers.js");
|
|
6
|
+
/**
|
|
7
|
+
* Runs user-defined regression tests with access to pipeline simulation
|
|
8
|
+
* and tool registry for custom assertions.
|
|
9
|
+
*/
|
|
10
|
+
function runRegressionTest(components, toolRegistry, cases) {
|
|
11
|
+
if (cases.length === 0)
|
|
12
|
+
return;
|
|
13
|
+
const ctx = {
|
|
14
|
+
simulatePipeline: (input, intent) => (0, helpers_js_1.simulatePipeline)(components, input, intent),
|
|
15
|
+
tools: toolRegistry,
|
|
16
|
+
modules: components.modules,
|
|
17
|
+
};
|
|
18
|
+
(0, vitest_1.describe)('AI Regression Tests', () => {
|
|
19
|
+
for (const testCase of cases) {
|
|
20
|
+
const ref = testCase.reference ? `[${testCase.reference}] ` : '';
|
|
21
|
+
const label = `${ref}${testCase.name}`;
|
|
22
|
+
(0, vitest_1.it)(label, async () => {
|
|
23
|
+
await testCase.verify(ctx);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PipelineComponents } from './helpers.js';
|
|
2
|
+
import type { RoutingTestCase } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Runs deterministic routing tests with provided test cases.
|
|
5
|
+
*
|
|
6
|
+
* Each case simulates the pipeline with a given input and a fixed
|
|
7
|
+
* intent classification (no LLM needed). Asserts:
|
|
8
|
+
* - Correct module is selected
|
|
9
|
+
* - Expected tools are present
|
|
10
|
+
* - Excluded tools are absent
|
|
11
|
+
*/
|
|
12
|
+
export declare function runRoutingTest(components: PipelineComponents, cases: RoutingTestCase[]): void;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runRoutingTest = runRoutingTest;
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const helpers_js_1 = require("./helpers.js");
|
|
6
|
+
/**
|
|
7
|
+
* Runs deterministic routing tests with provided test cases.
|
|
8
|
+
*
|
|
9
|
+
* Each case simulates the pipeline with a given input and a fixed
|
|
10
|
+
* intent classification (no LLM needed). Asserts:
|
|
11
|
+
* - Correct module is selected
|
|
12
|
+
* - Expected tools are present
|
|
13
|
+
* - Excluded tools are absent
|
|
14
|
+
*/
|
|
15
|
+
function runRoutingTest(components, cases) {
|
|
16
|
+
(0, vitest_1.describe)('AI Pipeline Routing (deterministic)', () => {
|
|
17
|
+
for (const testCase of cases) {
|
|
18
|
+
const confidence = testCase.confidence ?? 0.95;
|
|
19
|
+
const label = `"${testCase.input}" → ${testCase.expectModule}`;
|
|
20
|
+
(0, vitest_1.it)(label, () => {
|
|
21
|
+
const result = (0, helpers_js_1.simulatePipeline)(components, testCase.input, {
|
|
22
|
+
intent: testCase.expectModule,
|
|
23
|
+
confidence,
|
|
24
|
+
});
|
|
25
|
+
(0, vitest_1.expect)(result.blocked).toBe(false);
|
|
26
|
+
(0, vitest_1.expect)(result.module).toBe(testCase.expectModule);
|
|
27
|
+
if (testCase.expectTools) {
|
|
28
|
+
for (const tool of testCase.expectTools) {
|
|
29
|
+
(0, vitest_1.expect)(result.tools, `Expected tool "${tool}" in result`).toContain(tool);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (testCase.excludeTools) {
|
|
33
|
+
for (const tool of testCase.excludeTools) {
|
|
34
|
+
(0, vitest_1.expect)(result.tools, `Tool "${tool}" should not be in result`).not.toContain(tool);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// Auto-generated edge cases
|
|
40
|
+
(0, vitest_1.describe)('edge cases', () => {
|
|
41
|
+
(0, vitest_1.it)('ambiguous intent gives all tools', () => {
|
|
42
|
+
const result = (0, helpers_js_1.simulatePipeline)(components, 'Hallo wie geht es dir', { intent: 'ambiguous', confidence: 0.30 });
|
|
43
|
+
(0, vitest_1.expect)(result.module).toBeNull();
|
|
44
|
+
(0, vitest_1.expect)(result.tools.length).toBeGreaterThan(0);
|
|
45
|
+
});
|
|
46
|
+
(0, vitest_1.it)('low confidence returns all tools (fallback safety)', () => {
|
|
47
|
+
const firstModule = components.modules[0];
|
|
48
|
+
if (!firstModule)
|
|
49
|
+
return;
|
|
50
|
+
const result = (0, helpers_js_1.simulatePipeline)(components, 'vague request', { intent: firstModule.id, confidence: 0.30 });
|
|
51
|
+
(0, vitest_1.expect)(result.module).toBeNull();
|
|
52
|
+
(0, vitest_1.expect)(result.strategy).toBe('all');
|
|
53
|
+
});
|
|
54
|
+
(0, vitest_1.it)('suggest_followups is always included in non-blocked results', () => {
|
|
55
|
+
const firstModule = components.modules[0];
|
|
56
|
+
if (!firstModule)
|
|
57
|
+
return;
|
|
58
|
+
const result = (0, helpers_js_1.simulatePipeline)(components, 'test input', { intent: firstModule.id, confidence: 0.95 });
|
|
59
|
+
(0, vitest_1.expect)(result.tools).toContain('suggest_followups');
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SchemaConsistencyOptions } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Verifies that tool output field types match the input field types
|
|
4
|
+
* of downstream tools in declared workflow chains.
|
|
5
|
+
*/
|
|
6
|
+
export declare function runSchemaConsistencyTest(toolRegistry: Record<string, unknown>, options: SchemaConsistencyOptions): void;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runSchemaConsistencyTest = runSchemaConsistencyTest;
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
/**
|
|
6
|
+
* Verifies that tool output field types match the input field types
|
|
7
|
+
* of downstream tools in declared workflow chains.
|
|
8
|
+
*/
|
|
9
|
+
function runSchemaConsistencyTest(toolRegistry, options) {
|
|
10
|
+
if (options.chains.length === 0)
|
|
11
|
+
return;
|
|
12
|
+
(0, vitest_1.describe)('AI Tool Schema Consistency', () => {
|
|
13
|
+
for (const chain of options.chains) {
|
|
14
|
+
const label = `${chain.from}.${chain.field} → ${chain.to}.${chain.targetField}`;
|
|
15
|
+
(0, vitest_1.it)(label, () => {
|
|
16
|
+
// Both tools must exist
|
|
17
|
+
const fromTool = toolRegistry[chain.from];
|
|
18
|
+
const toTool = toolRegistry[chain.to];
|
|
19
|
+
(0, vitest_1.expect)(fromTool, `Source tool "${chain.from}" not in registry`).toBeDefined();
|
|
20
|
+
(0, vitest_1.expect)(toTool, `Target tool "${chain.to}" not in registry`).toBeDefined();
|
|
21
|
+
// Target tool must have inputSchema with the target field
|
|
22
|
+
const toSchema = toTool.inputSchema;
|
|
23
|
+
(0, vitest_1.expect)(toSchema, `Target tool "${chain.to}" has no inputSchema`).toBeDefined();
|
|
24
|
+
const toShape = getShape(toSchema);
|
|
25
|
+
(0, vitest_1.expect)(toShape, `Target tool "${chain.to}" inputSchema is not an object`).not.toBeNull();
|
|
26
|
+
const targetField = resolveField(toShape, chain.targetField);
|
|
27
|
+
(0, vitest_1.expect)(targetField, `Target field "${chain.targetField}" not found in ${chain.to} inputSchema`).not.toBeNull();
|
|
28
|
+
// Verify type compatibility
|
|
29
|
+
const targetType = getBaseTypeName(targetField);
|
|
30
|
+
(0, vitest_1.expect)(['ZodString', 'ZodNumber', 'ZodArray', 'ZodEnum', 'ZodBoolean'].includes(targetType), `Target field "${chain.targetField}" in ${chain.to} has unrecognized type: ${targetType}`).toBe(true);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function getShape(schema) {
|
|
36
|
+
const def = schema._def;
|
|
37
|
+
if (def.typeName === 'ZodObject' && typeof def.shape === 'function') {
|
|
38
|
+
return def.shape();
|
|
39
|
+
}
|
|
40
|
+
if ((def.typeName === 'ZodEffects' || def.typeName === 'ZodOptional') && def.innerType) {
|
|
41
|
+
return getShape(def.innerType);
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
function resolveField(shape, path) {
|
|
46
|
+
if (shape[path])
|
|
47
|
+
return shape[path];
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
function getBaseTypeName(schema) {
|
|
51
|
+
const def = schema._def;
|
|
52
|
+
if (def.typeName === 'ZodOptional' || def.typeName === 'ZodNullable' || def.typeName === 'ZodDefault') {
|
|
53
|
+
return def.innerType ? getBaseTypeName(def.innerType) : def.typeName;
|
|
54
|
+
}
|
|
55
|
+
return def.typeName;
|
|
56
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ModuleDefinition } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Auto-generates smoke tests from module definitions.
|
|
4
|
+
*
|
|
5
|
+
* Tests:
|
|
6
|
+
* - Every module has at least 1 tool
|
|
7
|
+
* - All tool names use snake_case
|
|
8
|
+
* - No duplicate tool names within a module
|
|
9
|
+
* - If a tool registry is provided, all module tools exist in it
|
|
10
|
+
*/
|
|
11
|
+
export declare function runSmokeTest(modules: ModuleDefinition[], toolRegistry?: Record<string, unknown>): void;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runSmokeTest = runSmokeTest;
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const helpers_js_1 = require("./helpers.js");
|
|
6
|
+
/**
|
|
7
|
+
* Auto-generates smoke tests from module definitions.
|
|
8
|
+
*
|
|
9
|
+
* Tests:
|
|
10
|
+
* - Every module has at least 1 tool
|
|
11
|
+
* - All tool names use snake_case
|
|
12
|
+
* - No duplicate tool names within a module
|
|
13
|
+
* - If a tool registry is provided, all module tools exist in it
|
|
14
|
+
*/
|
|
15
|
+
function runSmokeTest(modules, toolRegistry) {
|
|
16
|
+
const toolsByModule = (0, helpers_js_1.getToolsByModule)(modules);
|
|
17
|
+
const moduleIds = modules.map((m) => m.id);
|
|
18
|
+
(0, vitest_1.describe)('AI Tool Registry Smoke Tests', () => {
|
|
19
|
+
(0, vitest_1.describe)('module completeness', () => {
|
|
20
|
+
(0, vitest_1.it)(`has ${modules.length} intent modules`, () => {
|
|
21
|
+
(0, vitest_1.expect)(moduleIds).toHaveLength(modules.length);
|
|
22
|
+
for (const mod of modules) {
|
|
23
|
+
(0, vitest_1.expect)(moduleIds).toContain(mod.id);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
(0, vitest_1.it)('every module has at least 1 tool', () => {
|
|
27
|
+
for (const id of moduleIds) {
|
|
28
|
+
(0, vitest_1.expect)(toolsByModule[id].length, `${id} should have tools`).toBeGreaterThan(0);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
(0, vitest_1.describe)('tool naming conventions', () => {
|
|
33
|
+
const allTools = Object.values(toolsByModule).flat();
|
|
34
|
+
(0, vitest_1.it)('all tool names use snake_case', () => {
|
|
35
|
+
for (const tool of allTools) {
|
|
36
|
+
(0, vitest_1.expect)(tool, `Tool "${tool}" should be snake_case`).toMatch(/^[a-z][a-z0-9_]*$/);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
(0, vitest_1.it)('no duplicate tool names within a module', () => {
|
|
40
|
+
for (const id of moduleIds) {
|
|
41
|
+
const tools = toolsByModule[id];
|
|
42
|
+
const unique = new Set(tools);
|
|
43
|
+
(0, vitest_1.expect)(unique.size, `${id} has duplicates`).toBe(tools.length);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
if (toolRegistry) {
|
|
48
|
+
(0, vitest_1.describe)('registry completeness', () => {
|
|
49
|
+
const registryToolNames = new Set(Object.keys(toolRegistry));
|
|
50
|
+
(0, vitest_1.it)('all module tools exist in the tool registry', () => {
|
|
51
|
+
const missing = [];
|
|
52
|
+
for (const id of moduleIds) {
|
|
53
|
+
for (const tool of toolsByModule[id]) {
|
|
54
|
+
if (!registryToolNames.has(tool)) {
|
|
55
|
+
missing.push(`${id}/${tool}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
(0, vitest_1.expect)(missing, `Missing tools in registry: ${missing.join(', ')}`).toHaveLength(0);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { ModuleDefinition, GuardrailsConfig, IntentClassification } from '../../types.js';
|
|
2
|
+
/** Duck-typed Zod schema interface to avoid direct zod dependency */
|
|
3
|
+
interface ZodLikeSchema {
|
|
4
|
+
safeParse(input: unknown): {
|
|
5
|
+
success: boolean;
|
|
6
|
+
error?: {
|
|
7
|
+
issues: unknown[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface TestSuiteConfig {
|
|
12
|
+
/** Module definitions (same as used in the app's pipeline) */
|
|
13
|
+
modules: ModuleDefinition[];
|
|
14
|
+
/** Tool registry — Record<toolName, toolDefinition> */
|
|
15
|
+
tools?: Record<string, unknown>;
|
|
16
|
+
/** Pipeline configuration matching the app */
|
|
17
|
+
pipeline?: {
|
|
18
|
+
guardrails?: GuardrailsConfig;
|
|
19
|
+
confidenceThresholds?: {
|
|
20
|
+
high?: number;
|
|
21
|
+
medium?: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/** Locale hint for test descriptions (default: 'en') */
|
|
25
|
+
locale?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface RoutingTestCase {
|
|
28
|
+
/** Natural-language input */
|
|
29
|
+
input: string;
|
|
30
|
+
/** Expected module ID (e.g., 'task_query') */
|
|
31
|
+
expectModule: string;
|
|
32
|
+
/** Tools that MUST be present in the result */
|
|
33
|
+
expectTools?: string[];
|
|
34
|
+
/** Tools that MUST NOT be present */
|
|
35
|
+
excludeTools?: string[];
|
|
36
|
+
/** Override confidence (default: 0.95) */
|
|
37
|
+
confidence?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface GuardrailsTestOptions {
|
|
40
|
+
/** Extra injection patterns to test (appended to defaults) */
|
|
41
|
+
extraInjectionInputs?: string[];
|
|
42
|
+
/** Extra valid inputs to test */
|
|
43
|
+
extraValidInputs?: string[];
|
|
44
|
+
}
|
|
45
|
+
export interface SimulatedPipelineResult {
|
|
46
|
+
blocked: boolean;
|
|
47
|
+
tools: string[];
|
|
48
|
+
module: string | null;
|
|
49
|
+
intent: IntentClassification;
|
|
50
|
+
strategy?: 'single' | 'expanded' | 'all';
|
|
51
|
+
}
|
|
52
|
+
export interface AiTestSuite {
|
|
53
|
+
/** Auto-generated smoke tests: module completeness, tool naming, no duplicates */
|
|
54
|
+
smokeTest(): void;
|
|
55
|
+
/** Deterministic routing tests with provided test cases */
|
|
56
|
+
routingTest(cases: RoutingTestCase[]): void;
|
|
57
|
+
/** Auto-generated guardrails tests: injection, length, sanitization */
|
|
58
|
+
guardrailsTest(options?: GuardrailsTestOptions): void;
|
|
59
|
+
/** Auto-generated approval flag tests: mutations need approval, queries don't */
|
|
60
|
+
approvalTest(): void;
|
|
61
|
+
/** Low-level pipeline simulation for custom assertions */
|
|
62
|
+
simulatePipeline(input: string, intent: IntentClassification): SimulatedPipelineResult;
|
|
63
|
+
/** Tool combination & workflow chain tests */
|
|
64
|
+
combinationTest(cases?: CombinationTestCase[], options?: CombinationTestOptions): void;
|
|
65
|
+
/** Auto-generated edge case tests from Zod schemas + custom business-logic cases */
|
|
66
|
+
edgeCaseTest(options?: EdgeCaseTestOptions): void;
|
|
67
|
+
/** Verify tool output→input type compatibility across workflow chains */
|
|
68
|
+
schemaConsistencyTest(options: SchemaConsistencyOptions): void;
|
|
69
|
+
/** User-defined regression tests with pipeline simulation context */
|
|
70
|
+
regressionTest(cases: RegressionTestCase[]): void;
|
|
71
|
+
}
|
|
72
|
+
export interface CombinationTestCase {
|
|
73
|
+
/** Human-readable workflow name */
|
|
74
|
+
name: string;
|
|
75
|
+
/** The module this workflow targets */
|
|
76
|
+
intent: string;
|
|
77
|
+
/** All tools that must be available simultaneously */
|
|
78
|
+
requiredToolChain: string[];
|
|
79
|
+
/** Confidence level (default: 0.95 for single-module, 0.75 for expanded) */
|
|
80
|
+
confidence?: number;
|
|
81
|
+
/** Optional HTTP-level execution chain (requires toolExecutor) */
|
|
82
|
+
execution?: ExecutionStep[];
|
|
83
|
+
/** Assertions on the execution result */
|
|
84
|
+
expect?: {
|
|
85
|
+
finalToolResult?: unknown;
|
|
86
|
+
allToolsSucceeded?: boolean;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export interface ExecutionStep {
|
|
90
|
+
tool: string;
|
|
91
|
+
input: Record<string, unknown>;
|
|
92
|
+
mockResponse: unknown;
|
|
93
|
+
}
|
|
94
|
+
export interface CombinationTestOptions {
|
|
95
|
+
/** Mock tool executor for HTTP-level execution tests */
|
|
96
|
+
toolExecutor?: MockToolExecutor;
|
|
97
|
+
}
|
|
98
|
+
export interface EdgeCaseTestOptions {
|
|
99
|
+
/** Skip these tools (e.g. synthetic tools like suggest_followups) */
|
|
100
|
+
skipTools?: string[];
|
|
101
|
+
/** Custom business-logic edge cases per tool */
|
|
102
|
+
customCases?: Record<string, CustomEdgeCase[]>;
|
|
103
|
+
}
|
|
104
|
+
export interface CustomEdgeCase {
|
|
105
|
+
label: string;
|
|
106
|
+
input: Record<string, unknown>;
|
|
107
|
+
expectError: boolean;
|
|
108
|
+
errorMessage?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface SchemaConsistencyChain {
|
|
111
|
+
/** Source tool name */
|
|
112
|
+
from: string;
|
|
113
|
+
/** Output field path (e.g. 'id', 'tasks[].id') */
|
|
114
|
+
field: string;
|
|
115
|
+
/** Target tool name */
|
|
116
|
+
to: string;
|
|
117
|
+
/** Input field (e.g. 'assigneeId', 'taskIds') */
|
|
118
|
+
targetField: string;
|
|
119
|
+
}
|
|
120
|
+
export interface SchemaConsistencyOptions {
|
|
121
|
+
chains: SchemaConsistencyChain[];
|
|
122
|
+
}
|
|
123
|
+
export interface RegressionTestCase {
|
|
124
|
+
/** Regression name */
|
|
125
|
+
name: string;
|
|
126
|
+
/** Bug reference (e.g. 'LIN-123', 'commit abc1234') */
|
|
127
|
+
reference?: string;
|
|
128
|
+
/** Description of the original bug */
|
|
129
|
+
description: string;
|
|
130
|
+
/** Test function — receives context with pipeline simulation + tool access */
|
|
131
|
+
verify: (ctx: RegressionContext) => void | Promise<void>;
|
|
132
|
+
}
|
|
133
|
+
export interface RegressionContext {
|
|
134
|
+
/** Simulate pipeline routing */
|
|
135
|
+
simulatePipeline: AiTestSuite['simulatePipeline'];
|
|
136
|
+
/** Tool registry for schema access */
|
|
137
|
+
tools: Record<string, unknown>;
|
|
138
|
+
/** Module definitions */
|
|
139
|
+
modules: ModuleDefinition[];
|
|
140
|
+
}
|
|
141
|
+
export interface MockToolExecutor {
|
|
142
|
+
execute(toolName: string, input: Record<string, unknown>, mockResponse: unknown): {
|
|
143
|
+
success: boolean;
|
|
144
|
+
validationError?: string;
|
|
145
|
+
response: unknown;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export interface ToolDefinitionForTest {
|
|
149
|
+
toolName?: string;
|
|
150
|
+
inputSchema?: ZodLikeSchema;
|
|
151
|
+
needsApproval?: boolean;
|
|
152
|
+
method?: string;
|
|
153
|
+
module?: string;
|
|
154
|
+
[key: string]: unknown;
|
|
155
|
+
}
|
|
156
|
+
export {};
|