@specverse/engine-realize 3.5.3
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/assets/examples/09-api/ai-spec.yaml +194 -0
- package/assets/examples/09-api/converted.yaml +95 -0
- package/assets/examples/09-api/diagram-architecture.mmd +10 -0
- package/assets/examples/09-api/diagram-er.mmd +10 -0
- package/assets/examples/09-api/documentation.html +104 -0
- package/assets/examples/09-api/documentation.md +95 -0
- package/assets/examples/09-api/inferred-spec.yaml +420 -0
- package/assets/examples/09-api/openapi.json +61 -0
- package/assets/examples/10-api/README.md +216 -0
- package/assets/examples/10-api/ai-spec.yaml +194 -0
- package/assets/examples/10-api/converted.yaml +96 -0
- package/assets/examples/10-api/diagram-architecture.mmd +10 -0
- package/assets/examples/10-api/diagram-er.mmd +10 -0
- package/assets/examples/10-api/documentation.html +104 -0
- package/assets/examples/10-api/documentation.md +95 -0
- package/assets/examples/10-api/inferred-spec.yaml +7 -0
- package/assets/examples/10-api/metadata.yaml +89 -0
- package/assets/examples/10-api/openapi.json +61 -0
- package/assets/examples/10-api/package-integration-test.js +177 -0
- package/assets/examples/10-api/usage-example.js +323 -0
- package/assets/examples/10-api/usage-example.ts +363 -0
- package/assets/examples/10-api/workflow-test.js +113 -0
- package/assets/examples/manifests/01-simple-default-mappings.yaml +36 -0
- package/assets/examples/manifests/02-capability-mappings.yaml +55 -0
- package/assets/examples/manifests/03-hybrid-mappings.yaml +109 -0
- package/assets/examples/manifests/README.md +245 -0
- package/assets/examples/manifests/backend-only.yaml +43 -0
- package/assets/examples/manifests/blog-api.md +78 -0
- package/assets/examples/manifests/blog-api.specly +79 -0
- package/assets/examples/manifests/frontend-only.yaml +27 -0
- package/assets/examples/manifests/fullstack-app.yaml +44 -0
- package/assets/examples/manifests/fullstack-monorepo.yaml +62 -0
- package/assets/examples/validate-examples-with-expected-failures.cjs +328 -0
- package/assets/examples/validate-examples.cjs +225 -0
- package/assets/examples-decomposed/cloud-native-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/cloud-native-manifest.md +379 -0
- package/assets/examples-decomposed/cloud-native-manifest.specly +60 -0
- package/assets/examples-decomposed/docker-compose-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/docker-compose-manifest.md +326 -0
- package/assets/examples-decomposed/docker-compose-manifest.specly +40 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.md +237 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.specly +41 -0
- package/assets/templates/README.md +559 -0
- package/assets/templates/TEMPLATE-ENHANCEMENTS-V33.md +462 -0
- package/assets/templates/backend-only/CLAUDE.md +73 -0
- package/assets/templates/backend-only/README.md +197 -0
- package/assets/templates/backend-only/deployments/README.md +149 -0
- package/assets/templates/backend-only/deployments/development.specly +53 -0
- package/assets/templates/backend-only/deployments/production.specly +87 -0
- package/assets/templates/backend-only/docs/README.md +50 -0
- package/assets/templates/backend-only/docs/api/README.md +7 -0
- package/assets/templates/backend-only/docs/diagrams/README.md +85 -0
- package/assets/templates/backend-only/docs/example-documentation-template.md +269 -0
- package/assets/templates/backend-only/docs/guides/README.md +15 -0
- package/assets/templates/backend-only/dot.env.example +18 -0
- package/assets/templates/backend-only/generated/README.md +56 -0
- package/assets/templates/backend-only/generated/code/integration-test.template.js +320 -0
- package/assets/templates/backend-only/generated/code/package.json.template +34 -0
- package/assets/templates/backend-only/generated/docs/README.md +49 -0
- package/assets/templates/backend-only/gitignore +54 -0
- package/assets/templates/backend-only/manifests/README.md +72 -0
- package/assets/templates/backend-only/manifests/docker-compose.specly +91 -0
- package/assets/templates/backend-only/manifests/implementation.yaml +100 -0
- package/assets/templates/backend-only/manifests/kubernetes.specly +140 -0
- package/assets/templates/backend-only/package.json +59 -0
- package/assets/templates/backend-only/scripts/test-all.sh +160 -0
- package/assets/templates/backend-only/scripts/test-generated-code.sh +165 -0
- package/assets/templates/backend-only/specs/main.specly +67 -0
- package/assets/templates/default/CLAUDE.md +141 -0
- package/assets/templates/default/README.md +404 -0
- package/assets/templates/default/deployments/README.md +149 -0
- package/assets/templates/default/deployments/development.specly +53 -0
- package/assets/templates/default/deployments/production.specly +87 -0
- package/assets/templates/default/docs/README.md +50 -0
- package/assets/templates/default/docs/api/README.md +7 -0
- package/assets/templates/default/docs/diagrams/README.md +85 -0
- package/assets/templates/default/docs/example-documentation-template.md +269 -0
- package/assets/templates/default/docs/guides/README.md +15 -0
- package/assets/templates/default/dot.env.example +18 -0
- package/assets/templates/default/generated/README.md +56 -0
- package/assets/templates/default/generated/code/integration-test.template.js +320 -0
- package/assets/templates/default/generated/code/package.json.template +34 -0
- package/assets/templates/default/generated/docs/README.md +49 -0
- package/assets/templates/default/gitignore +54 -0
- package/assets/templates/default/manifests/README.md +72 -0
- package/assets/templates/default/manifests/docker-compose.specly +91 -0
- package/assets/templates/default/manifests/implementation.yaml +176 -0
- package/assets/templates/default/manifests/kubernetes.specly +140 -0
- package/assets/templates/default/package.json +61 -0
- package/assets/templates/default/scripts/test-all.sh +160 -0
- package/assets/templates/default/scripts/test-generated-code.sh +165 -0
- package/assets/templates/default/specs/main.specly +67 -0
- package/assets/templates/frontend-only/CLAUDE.md +75 -0
- package/assets/templates/frontend-only/README.md +231 -0
- package/assets/templates/frontend-only/deployments/README.md +149 -0
- package/assets/templates/frontend-only/deployments/development.specly +53 -0
- package/assets/templates/frontend-only/deployments/production.specly +87 -0
- package/assets/templates/frontend-only/docs/README.md +50 -0
- package/assets/templates/frontend-only/docs/api/README.md +7 -0
- package/assets/templates/frontend-only/docs/diagrams/README.md +85 -0
- package/assets/templates/frontend-only/docs/example-documentation-template.md +269 -0
- package/assets/templates/frontend-only/docs/guides/README.md +15 -0
- package/assets/templates/frontend-only/dot.env.example +18 -0
- package/assets/templates/frontend-only/generated/README.md +56 -0
- package/assets/templates/frontend-only/generated/code/integration-test.template.js +320 -0
- package/assets/templates/frontend-only/generated/code/package.json.template +34 -0
- package/assets/templates/frontend-only/generated/docs/README.md +49 -0
- package/assets/templates/frontend-only/gitignore +54 -0
- package/assets/templates/frontend-only/manifests/README.md +72 -0
- package/assets/templates/frontend-only/manifests/docker-compose.specly +91 -0
- package/assets/templates/frontend-only/manifests/implementation.yaml +58 -0
- package/assets/templates/frontend-only/manifests/kubernetes.specly +140 -0
- package/assets/templates/frontend-only/package.json +59 -0
- package/assets/templates/frontend-only/scripts/test-all.sh +160 -0
- package/assets/templates/frontend-only/scripts/test-generated-code.sh +165 -0
- package/assets/templates/frontend-only/specs/main.specly +57 -0
- package/assets/templates/full-stack/AI-GUIDE.md +60 -0
- package/assets/templates/full-stack/CLAUDE.md +141 -0
- package/assets/templates/full-stack/README.md +382 -0
- package/assets/templates/full-stack/archive/AI-GUIDE-legacy.md +392 -0
- package/assets/templates/full-stack/deployments/README.md +149 -0
- package/assets/templates/full-stack/deployments/development.specly +53 -0
- package/assets/templates/full-stack/deployments/production.specly +87 -0
- package/assets/templates/full-stack/docs/README.md +51 -0
- package/assets/templates/full-stack/docs/api/README.md +7 -0
- package/assets/templates/full-stack/docs/diagrams/README.md +85 -0
- package/assets/templates/full-stack/docs/example-documentation-template.md +269 -0
- package/assets/templates/full-stack/docs/guides/README.md +15 -0
- package/assets/templates/full-stack/generated/README.md +56 -0
- package/assets/templates/full-stack/generated/code/integration-test.template.js +320 -0
- package/assets/templates/full-stack/generated/code/package.json.template +34 -0
- package/assets/templates/full-stack/generated/docs/README.md +49 -0
- package/assets/templates/full-stack/gitignore +54 -0
- package/assets/templates/full-stack/manifests/README.md +72 -0
- package/assets/templates/full-stack/manifests/docker-compose.specly +91 -0
- package/assets/templates/full-stack/manifests/implementation.yaml +155 -0
- package/assets/templates/full-stack/manifests/kubernetes.specly +140 -0
- package/assets/templates/full-stack/package.json +45 -0
- package/assets/templates/full-stack/scripts/test-all.sh +160 -0
- package/assets/templates/full-stack/scripts/test-generated-code.sh +165 -0
- package/assets/templates/full-stack/specs/example-v33.specly +297 -0
- package/assets/templates/full-stack/specs/main-simple.specly +73 -0
- package/assets/templates/full-stack/specs/main.specly +408 -0
- package/dist/engines/code-generator.d.ts +86 -0
- package/dist/engines/code-generator.d.ts.map +1 -0
- package/dist/engines/code-generator.js +159 -0
- package/dist/engines/code-generator.js.map +1 -0
- package/dist/engines/engine-registry.d.ts +94 -0
- package/dist/engines/engine-registry.d.ts.map +1 -0
- package/dist/engines/engine-registry.js +163 -0
- package/dist/engines/engine-registry.js.map +1 -0
- package/dist/engines/index.d.ts +10 -0
- package/dist/engines/index.d.ts.map +1 -0
- package/dist/engines/index.js +12 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/typescript-engine.d.ts +74 -0
- package/dist/engines/typescript-engine.d.ts.map +1 -0
- package/dist/engines/typescript-engine.js +288 -0
- package/dist/engines/typescript-engine.js.map +1 -0
- package/dist/generators/index.d.ts +11 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +11 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +434 -0
- package/dist/index.js.map +1 -0
- package/dist/library/index.d.ts +12 -0
- package/dist/library/index.d.ts.map +1 -0
- package/dist/library/index.js +15 -0
- package/dist/library/index.js.map +1 -0
- package/dist/library/library.d.ts +132 -0
- package/dist/library/library.d.ts.map +1 -0
- package/dist/library/library.js +343 -0
- package/dist/library/library.js.map +1 -0
- package/dist/library/loader.d.ts +73 -0
- package/dist/library/loader.d.ts.map +1 -0
- package/dist/library/loader.js +150 -0
- package/dist/library/loader.js.map +1 -0
- package/dist/library/resolver.d.ts +104 -0
- package/dist/library/resolver.d.ts.map +1 -0
- package/dist/library/resolver.js +299 -0
- package/dist/library/resolver.js.map +1 -0
- package/dist/library/validator.d.ts +65 -0
- package/dist/library/validator.d.ts.map +1 -0
- package/dist/library/validator.js +203 -0
- package/dist/library/validator.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance-factory.d.ts +289 -0
- package/dist/types/instance-factory.d.ts.map +1 -0
- package/dist/types/instance-factory.js +8 -0
- package/dist/types/instance-factory.js.map +1 -0
- package/dist/types/unified-mappings.d.ts +163 -0
- package/dist/types/unified-mappings.d.ts.map +1 -0
- package/dist/types/unified-mappings.js +110 -0
- package/dist/types/unified-mappings.js.map +1 -0
- package/dist/utils/ai-spec-loader.d.ts +77 -0
- package/dist/utils/ai-spec-loader.d.ts.map +1 -0
- package/dist/utils/ai-spec-loader.js +138 -0
- package/dist/utils/ai-spec-loader.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/manifest-loader.d.ts +107 -0
- package/dist/utils/manifest-loader.d.ts.map +1 -0
- package/dist/utils/manifest-loader.js +168 -0
- package/dist/utils/manifest-loader.js.map +1 -0
- package/dist/utils/mapping-migration.d.ts +53 -0
- package/dist/utils/mapping-migration.d.ts.map +1 -0
- package/dist/utils/mapping-migration.js +194 -0
- package/dist/utils/mapping-migration.js.map +1 -0
- package/libs/instance-factories/CURVED-INTERFACE.md +278 -0
- package/libs/instance-factories/README.md +433 -0
- package/libs/instance-factories/applications/generic-app.yaml +52 -0
- package/libs/instance-factories/applications/react-app.yaml +186 -0
- package/libs/instance-factories/applications/templates/generic/backend-env-generator.ts +31 -0
- package/libs/instance-factories/applications/templates/generic/backend-package-json-generator.ts +80 -0
- package/libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.ts +69 -0
- package/libs/instance-factories/applications/templates/generic/main-generator.ts +308 -0
- package/libs/instance-factories/applications/templates/react/_view-components-source.ts +555 -0
- package/libs/instance-factories/applications/templates/react/api-client-generator.ts +436 -0
- package/libs/instance-factories/applications/templates/react/api-types-generator.ts +153 -0
- package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +94 -0
- package/libs/instance-factories/applications/templates/react/env-example-generator.ts +24 -0
- package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +106 -0
- package/libs/instance-factories/applications/templates/react/gitignore-generator.ts +38 -0
- package/libs/instance-factories/applications/templates/react/index-css-generator.ts +85 -0
- package/libs/instance-factories/applications/templates/react/index-html-generator.ts +30 -0
- package/libs/instance-factories/applications/templates/react/main-tsx-generator.ts +34 -0
- package/libs/instance-factories/applications/templates/react/package-json-generator.ts +54 -0
- package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +179 -0
- package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +1347 -0
- package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +704 -0
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +84 -0
- package/libs/instance-factories/applications/templates/react/tsconfig-generator.ts +35 -0
- package/libs/instance-factories/applications/templates/react/use-api-hooks-generator.ts +121 -0
- package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/view-form-generator.ts +362 -0
- package/libs/instance-factories/applications/templates/react/view-list-generator.ts +98 -0
- package/libs/instance-factories/applications/templates/react/view-router-generator.ts +89 -0
- package/libs/instance-factories/applications/templates/react/vite-config-generator.ts +49 -0
- package/libs/instance-factories/archived/fastify-prisma.yaml +104 -0
- package/libs/instance-factories/cli/commander-js.yaml +55 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts +12 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts.map +1 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js +115 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js.map +1 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.ts +145 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.d.ts +14 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.d.ts.map +1 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.js +182 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.js.map +1 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +992 -0
- package/libs/instance-factories/communication/event-emitter.yaml +56 -0
- package/libs/instance-factories/communication/rabbitmq-events.yaml +87 -0
- package/libs/instance-factories/communication/templates/eventemitter/bus-generator.ts +93 -0
- package/libs/instance-factories/communication/templates/eventemitter/publisher-generator.ts +117 -0
- package/libs/instance-factories/communication/templates/eventemitter/subscriber-generator.ts +101 -0
- package/libs/instance-factories/controllers/fastify.yaml +127 -0
- package/libs/instance-factories/controllers/templates/fastify/meta-routes-generator.ts +103 -0
- package/libs/instance-factories/controllers/templates/fastify/routes-generator.ts +389 -0
- package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +76 -0
- package/libs/instance-factories/infrastructure/docker-k8s.yaml +61 -0
- package/libs/instance-factories/infrastructure/templates/docker-k8s/infrastructure-generator.ts +46 -0
- package/libs/instance-factories/orms/prisma.yaml +89 -0
- package/libs/instance-factories/orms/templates/prisma/schema-generator.ts +563 -0
- package/libs/instance-factories/orms/templates/prisma/services-generator.ts +408 -0
- package/libs/instance-factories/scaffolding/generic-scaffold.yaml +65 -0
- package/libs/instance-factories/scaffolding/templates/generic/env-example-generator.ts +73 -0
- package/libs/instance-factories/scaffolding/templates/generic/env-generator.ts +85 -0
- package/libs/instance-factories/scaffolding/templates/generic/gitignore-generator.ts +69 -0
- package/libs/instance-factories/scaffolding/templates/generic/package-json-generator.ts +176 -0
- package/libs/instance-factories/scaffolding/templates/generic/readme-generator.ts +207 -0
- package/libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.ts +78 -0
- package/libs/instance-factories/scaffolding/templates/generic/tsconfig-react-generator.ts +41 -0
- package/libs/instance-factories/sdks/python-sdk.yaml +66 -0
- package/libs/instance-factories/sdks/templates/python/sdk-generator.ts +50 -0
- package/libs/instance-factories/sdks/templates/typescript/sdk-generator.ts +49 -0
- package/libs/instance-factories/sdks/typescript-sdk.yaml +59 -0
- package/libs/instance-factories/services/prisma-services.yaml +71 -0
- package/libs/instance-factories/services/templates/prisma/behavior-generator.ts +303 -0
- package/libs/instance-factories/services/templates/prisma/controller-generator.ts +532 -0
- package/libs/instance-factories/services/templates/prisma/service-generator.ts +315 -0
- package/libs/instance-factories/shared/path-resolver.ts +111 -0
- package/libs/instance-factories/storage/mongodb.yaml +79 -0
- package/libs/instance-factories/storage/postgresql.yaml +75 -0
- package/libs/instance-factories/storage/redis.yaml +79 -0
- package/libs/instance-factories/storage/templates/mongodb/config-generator.ts +15 -0
- package/libs/instance-factories/storage/templates/mongodb/docker-generator.ts +18 -0
- package/libs/instance-factories/storage/templates/postgresql/config-generator.ts +54 -0
- package/libs/instance-factories/storage/templates/postgresql/docker-generator.ts +55 -0
- package/libs/instance-factories/storage/templates/redis/config-generator.ts +16 -0
- package/libs/instance-factories/storage/templates/redis/docker-generator.ts +18 -0
- package/libs/instance-factories/test-generation.ts +192 -0
- package/libs/instance-factories/testing/templates/vitest/tests-generator.ts +51 -0
- package/libs/instance-factories/testing/vitest-tests.yaml +63 -0
- package/libs/instance-factories/tools/templates/mcp/mcp-server-generator.ts +136 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/DEPLOYMENT_GUIDE.md +630 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/HYBRID_RESOURCE_SYSTEM.md +330 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/EXTENSION_DEPLOYMENT.md +552 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/LOCAL_DEPLOYMENT.md +164 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/WEB_DEPLOYMENT.md +247 -0
- package/libs/instance-factories/tools/templates/mcp/static/package.json +92 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-enterprise.js +284 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-extension.js +139 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-local.js +74 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-web.js +156 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/copy-canonical-files.js +41 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-deployments.js +259 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-resources.js +231 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-simple.js +196 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/controllers/MCPServerController.ts +293 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/events/EventEmitter.ts +90 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/index.ts +24 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/interfaces/ResourceProvider.ts +15 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/models/LibrarySuggestion.ts +106 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/models/SpecVerseResource.ts +75 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/server/mcp-server.ts +239 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/CLIProxyService.ts +1501 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/EmbeddedResourcesAdapter.ts +211 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/EntityModuleService.ts +308 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/HybridResourcesProvider.ts +210 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/LibraryToolsService.ts +356 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorBridge.ts +524 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorToolsService.ts +530 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/PromptToolsService.ts +594 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/ResourcesProviderService.ts +170 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.init.test.ts +544 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.test.ts +189 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/ResourcesProviderService.test.ts +89 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/types/index.ts +110 -0
- package/libs/instance-factories/tools/templates/mcp/static/tsconfig.json +28 -0
- package/libs/instance-factories/tools/templates/vscode/static/extension.ts +1195 -0
- package/libs/instance-factories/tools/templates/vscode/static/language-configuration.json +34 -0
- package/libs/instance-factories/tools/templates/vscode/static/schemas/specverse-v3-schema.json +4279 -0
- package/libs/instance-factories/tools/templates/vscode/static/syntaxes/specverse.tmLanguage.json +138 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/README.md +74 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/complete-specverse-colors.json +122 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-basic-theme.json +65 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-complete-theme.json +123 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-theme-colors.json +64 -0
- package/libs/instance-factories/tools/templates/vscode/vscode-extension-generator.ts +214 -0
- package/libs/instance-factories/validation/templates/zod/validation-generator.ts +46 -0
- package/libs/instance-factories/validation/zod.yaml +56 -0
- package/libs/instance-factories/views/index.d.ts +13 -0
- package/libs/instance-factories/views/index.d.ts.map +1 -0
- package/libs/instance-factories/views/index.js +18 -0
- package/libs/instance-factories/views/index.js.map +1 -0
- package/libs/instance-factories/views/index.ts +45 -0
- package/libs/instance-factories/views/react-components.yaml +129 -0
- package/libs/instance-factories/views/templates/ARCHITECTURE.md +198 -0
- package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +869 -0
- package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +953 -0
- package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +806 -0
- package/libs/instance-factories/views/templates/react/app-generator.ts +55 -0
- package/libs/instance-factories/views/templates/react/components-generator.ts +391 -0
- package/libs/instance-factories/views/templates/react/forms-generator.ts +343 -0
- package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +54 -0
- package/libs/instance-factories/views/templates/react/hooks-generator.ts +122 -0
- package/libs/instance-factories/views/templates/react/index-css-generator.ts +209 -0
- package/libs/instance-factories/views/templates/react/index-html-generator.ts +34 -0
- package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +29 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +152 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.js +398 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.js.map +1 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.ts +533 -0
- package/libs/instance-factories/views/templates/react/router-generator.ts +197 -0
- package/libs/instance-factories/views/templates/react/router-generic-generator.ts +103 -0
- package/libs/instance-factories/views/templates/react/spec-json-generator.ts +17 -0
- package/libs/instance-factories/views/templates/react/types-generator.ts +76 -0
- package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +42 -0
- package/libs/instance-factories/views/templates/react/vite-config-generator.ts +38 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +1 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +474 -0
- package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +242 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +77 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.js +47 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.ts +142 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +63 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +822 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +908 -0
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts +247 -0
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/base-generator.js +363 -0
- package/libs/instance-factories/views/templates/shared/base-generator.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/base-generator.ts +608 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +254 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.js +602 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.ts +803 -0
- package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +250 -0
- package/libs/instance-factories/views/templates/shared/composite-patterns.ts +535 -0
- package/libs/instance-factories/views/templates/shared/index.ts +68 -0
- package/libs/instance-factories/views/templates/shared/pattern-validator.ts +279 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +149 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.js +580 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.ts +700 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +143 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js +420 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +539 -0
- package/package.json +42 -0
- package/schema/SPECVERSE-SCHEMA.json +4274 -0
package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.test.ts
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLIProxyService Unit Tests
|
|
3
|
+
* Tests for dynamic CLI integration functionality
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
7
|
+
import { CLIProxyService } from '../../services/CLIProxyService.js';
|
|
8
|
+
|
|
9
|
+
// Mock both possible import paths (published package and local)
|
|
10
|
+
const mockCapabilities = {
|
|
11
|
+
coreCommands: [
|
|
12
|
+
{
|
|
13
|
+
command: 'validate',
|
|
14
|
+
description: 'Validate a SpecVerse specification',
|
|
15
|
+
args: '<file>',
|
|
16
|
+
options: '-v, --verbose'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
command: 'infer',
|
|
20
|
+
description: 'Generate complete specification using AI',
|
|
21
|
+
args: '<file>',
|
|
22
|
+
options: ''
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
groupedCommands: [
|
|
26
|
+
{
|
|
27
|
+
command: 'gen yaml',
|
|
28
|
+
group: 'gen',
|
|
29
|
+
subcommand: 'yaml',
|
|
30
|
+
description: 'Generate YAML from SpecVerse specification',
|
|
31
|
+
args: '<file>',
|
|
32
|
+
category: 'SpecVerse Generation'
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
aiCommands: [
|
|
36
|
+
{
|
|
37
|
+
command: 'ai',
|
|
38
|
+
description: 'AI prompt building commands',
|
|
39
|
+
args: '<action> [operation]',
|
|
40
|
+
options: ''
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
command: 'ai template',
|
|
44
|
+
description: 'AI template for SpecVerse specifications',
|
|
45
|
+
args: '<operation>',
|
|
46
|
+
options: ''
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const mockAPI = {
|
|
52
|
+
getAllCliCapabilities: vi.fn(() => mockCapabilities),
|
|
53
|
+
executeCliCommand: vi.fn(async (command, args) => {
|
|
54
|
+
if (command.includes('validate')) {
|
|
55
|
+
return {
|
|
56
|
+
status: 'success',
|
|
57
|
+
message: 'Validation successful',
|
|
58
|
+
file: args.file || 'test.specly',
|
|
59
|
+
timestamp: new Date().toISOString()
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
throw new Error(`Command not mocked: ${command}`);
|
|
63
|
+
}),
|
|
64
|
+
getCliPath: vi.fn(() => '/mock/path/to/cli') as ReturnType<typeof vi.fn<[], string | null>>
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// Mock the published package
|
|
68
|
+
vi.mock('@specverse/engine-entities', () => mockAPI);
|
|
69
|
+
|
|
70
|
+
// Mock the local development path
|
|
71
|
+
vi.mock('../../../../../dist/index.js', () => mockAPI);
|
|
72
|
+
|
|
73
|
+
describe('CLIProxyService', () => {
|
|
74
|
+
let service: CLIProxyService;
|
|
75
|
+
|
|
76
|
+
beforeEach(() => {
|
|
77
|
+
vi.clearAllMocks();
|
|
78
|
+
service = new CLIProxyService();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
describe('capability discovery', () => {
|
|
82
|
+
it('should discover CLI capabilities', async () => {
|
|
83
|
+
const capabilities = await service.discoverCapabilities();
|
|
84
|
+
|
|
85
|
+
expect(capabilities).toHaveProperty('coreCommands');
|
|
86
|
+
expect(capabilities).toHaveProperty('groupedCommands');
|
|
87
|
+
expect(capabilities).toHaveProperty('aiCommands');
|
|
88
|
+
expect(capabilities.coreCommands.length).toBeGreaterThan(0);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it('should cache capabilities for performance', async () => {
|
|
92
|
+
// First call
|
|
93
|
+
await service.discoverCapabilities();
|
|
94
|
+
// Second call (should use cache)
|
|
95
|
+
await service.discoverCapabilities();
|
|
96
|
+
|
|
97
|
+
// Should only call once due to caching
|
|
98
|
+
expect(mockAPI.getAllCliCapabilities).toHaveBeenCalledTimes(1);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
describe('MCP tool generation', () => {
|
|
103
|
+
it('should generate MCP tools from CLI capabilities', async () => {
|
|
104
|
+
const tools = await service.generateMCPTools();
|
|
105
|
+
|
|
106
|
+
expect(tools).toBeInstanceOf(Array);
|
|
107
|
+
expect(tools.length).toBeGreaterThan(0);
|
|
108
|
+
|
|
109
|
+
// Check tool structure
|
|
110
|
+
const validateTool = tools.find(t => t.name === 'specverse_validate');
|
|
111
|
+
expect(validateTool).toBeDefined();
|
|
112
|
+
expect(validateTool?.description).toContain('Validate');
|
|
113
|
+
expect(validateTool?.inputSchema).toHaveProperty('properties');
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it('should generate AI tools with proper schemas', async () => {
|
|
117
|
+
const tools = await service.generateMCPTools();
|
|
118
|
+
|
|
119
|
+
const aiTemplateTool = tools.find(t => t.name === 'specverse_ai_template');
|
|
120
|
+
expect(aiTemplateTool).toBeDefined();
|
|
121
|
+
expect(aiTemplateTool?.inputSchema.properties).toHaveProperty('operation');
|
|
122
|
+
expect(aiTemplateTool?.inputSchema.required).toContain('operation');
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
describe('command execution', () => {
|
|
127
|
+
it('should execute CLI commands and return structured results', async () => {
|
|
128
|
+
const result = await service.executeCommand('specverse_validate', { file: 'test.specly' });
|
|
129
|
+
|
|
130
|
+
expect(result).toHaveProperty('content');
|
|
131
|
+
expect(result.content).toBeInstanceOf(Array);
|
|
132
|
+
expect(result.content[0]).toHaveProperty('type', 'text');
|
|
133
|
+
|
|
134
|
+
// Parse the JSON result
|
|
135
|
+
const textContent = result.content[0].text;
|
|
136
|
+
expect(textContent).toBeDefined();
|
|
137
|
+
const jsonResult = JSON.parse(textContent!);
|
|
138
|
+
expect(jsonResult).toHaveProperty('status', 'success');
|
|
139
|
+
expect(jsonResult).toHaveProperty('file', 'test.specly');
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('should handle command failures gracefully', async () => {
|
|
143
|
+
const result = await service.executeCommand('specverse_nonexistent', {});
|
|
144
|
+
|
|
145
|
+
expect(result).toHaveProperty('isError', true);
|
|
146
|
+
expect(result.content[0].text).toContain('error');
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it('should handle CLI not found scenario', async () => {
|
|
150
|
+
// Mock CLI not found
|
|
151
|
+
mockAPI.getCliPath.mockReturnValueOnce(null);
|
|
152
|
+
|
|
153
|
+
const serviceWithoutCli = new CLIProxyService();
|
|
154
|
+
const result = await serviceWithoutCli.executeCommand('specverse_validate', {});
|
|
155
|
+
|
|
156
|
+
expect(result).toHaveProperty('isError', true);
|
|
157
|
+
expect(result.content[0].text).toContain('CLI not found');
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
describe('tool name mapping', () => {
|
|
162
|
+
it('should map MCP tool names back to CLI commands', async () => {
|
|
163
|
+
const service = new CLIProxyService();
|
|
164
|
+
|
|
165
|
+
// Access private method for testing (TypeScript will complain, but it works)
|
|
166
|
+
const mapMethod = (service as any).mapToolNameToCommand;
|
|
167
|
+
|
|
168
|
+
expect(mapMethod('specverse_validate')).toBe('validate');
|
|
169
|
+
expect(mapMethod('specverse_gen_yaml')).toBe('gen yaml');
|
|
170
|
+
expect(mapMethod('specverse_ai_template')).toBe('ai template');
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
describe('error scenarios', () => {
|
|
175
|
+
it('should handle discovery failures', async () => {
|
|
176
|
+
// Use the already mocked function
|
|
177
|
+
mockAPI.getAllCliCapabilities.mockImplementationOnce(() => {
|
|
178
|
+
throw new Error('Discovery failed');
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
const capabilities = await service.discoverCapabilities();
|
|
182
|
+
|
|
183
|
+
// Should return empty capabilities on failure
|
|
184
|
+
expect(capabilities.coreCommands).toEqual([]);
|
|
185
|
+
expect(capabilities.groupedCommands).toEqual([]);
|
|
186
|
+
expect(capabilities.aiCommands).toEqual([]);
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ResourcesProviderService Unit Tests
|
|
3
|
+
* Clean implementation test suite
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, it, expect, beforeEach } from 'vitest';
|
|
7
|
+
import { ResourcesProviderService } from '../../services/ResourcesProviderService.js';
|
|
8
|
+
|
|
9
|
+
describe('ResourcesProviderService', () => {
|
|
10
|
+
let service: ResourcesProviderService;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
service = new ResourcesProviderService();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe('initialization', () => {
|
|
17
|
+
it('should initialize without errors', async () => {
|
|
18
|
+
await expect(service.initializeResources()).resolves.not.toThrow();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should list resources after initialization', async () => {
|
|
22
|
+
await service.initializeResources();
|
|
23
|
+
const resources = await service.listResources();
|
|
24
|
+
|
|
25
|
+
expect(resources).toBeInstanceOf(Array);
|
|
26
|
+
expect(resources.length).toBeGreaterThan(0);
|
|
27
|
+
expect(resources[0]).toHaveProperty('uri');
|
|
28
|
+
expect(resources[0]).toHaveProperty('name');
|
|
29
|
+
expect(resources[0]).toHaveProperty('description');
|
|
30
|
+
expect(resources[0]).toHaveProperty('mimeType');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe('resource management', () => {
|
|
35
|
+
beforeEach(async () => {
|
|
36
|
+
await service.initializeResources();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should check resource availability', () => {
|
|
40
|
+
expect(service.isResourceAvailable('specverse://examples/chat-prompts')).toBe(true);
|
|
41
|
+
expect(service.isResourceAvailable('nonexistent://resource')).toBe(false);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('should handle unknown resource URIs', async () => {
|
|
45
|
+
await expect(service.getResourceContent('unknown://resource'))
|
|
46
|
+
.rejects.toThrow('Resource not found');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('should track cached resource count', () => {
|
|
50
|
+
const count = service.getCachedResourceCount();
|
|
51
|
+
expect(count).toBeGreaterThanOrEqual(0);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
describe('resource reading', () => {
|
|
56
|
+
beforeEach(async () => {
|
|
57
|
+
await service.initializeResources();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should return proper MCP tool result structure', async () => {
|
|
61
|
+
// Mock successful resource read since we don't have actual files in test
|
|
62
|
+
const result = await service.readResource('specverse://examples/chat-prompts').catch(err => ({
|
|
63
|
+
content: [{ type: 'text' as const, text: err.message }],
|
|
64
|
+
isError: true
|
|
65
|
+
}));
|
|
66
|
+
|
|
67
|
+
expect(result).toHaveProperty('content');
|
|
68
|
+
expect(result.content).toBeInstanceOf(Array);
|
|
69
|
+
expect(result.content[0]).toHaveProperty('type');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
describe('error handling', () => {
|
|
74
|
+
beforeEach(async () => {
|
|
75
|
+
await service.initializeResources();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('should handle file system errors gracefully', async () => {
|
|
79
|
+
const result = await service.readResource('specverse://examples/chat-prompts');
|
|
80
|
+
|
|
81
|
+
if (result.isError) {
|
|
82
|
+
expect(result.content[0].type).toBe('text');
|
|
83
|
+
expect(result.content[0].text).toContain('Error reading resource');
|
|
84
|
+
} else {
|
|
85
|
+
expect(result.content[0].type).toBe('resource');
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clean Implementation - Core Types
|
|
3
|
+
* Generated from extracted SpecVerse specification
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface SpecVerseResource {
|
|
7
|
+
uri: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
content?: string;
|
|
12
|
+
metadata?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface LibrarySuggestion {
|
|
16
|
+
name: string;
|
|
17
|
+
path: string;
|
|
18
|
+
type: 'deployment' | 'domain' | 'manifest' | 'type' | 'standard';
|
|
19
|
+
description: string;
|
|
20
|
+
ai_description: string;
|
|
21
|
+
expansion_factor: number;
|
|
22
|
+
complexity_level: 'low' | 'medium' | 'high';
|
|
23
|
+
best_for: string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface StandardPrompt {
|
|
27
|
+
name: string;
|
|
28
|
+
version: string;
|
|
29
|
+
description: string;
|
|
30
|
+
author: string;
|
|
31
|
+
tags: string[];
|
|
32
|
+
system_role: string;
|
|
33
|
+
system_context: string;
|
|
34
|
+
system_capabilities: string[];
|
|
35
|
+
system_constraints: string[];
|
|
36
|
+
user_template: string;
|
|
37
|
+
max_tokens: number;
|
|
38
|
+
temperature: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface LibraryCatalog {
|
|
42
|
+
version: string;
|
|
43
|
+
generated_at: Date;
|
|
44
|
+
generated_from: string;
|
|
45
|
+
ai_optimization: boolean;
|
|
46
|
+
total_libraries: number;
|
|
47
|
+
deployments: Record<string, LibrarySuggestion>;
|
|
48
|
+
domains: Record<string, LibrarySuggestion>;
|
|
49
|
+
manifests: Record<string, LibrarySuggestion>;
|
|
50
|
+
types: Record<string, LibrarySuggestion>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface MCPToolResult {
|
|
54
|
+
content: Array<{
|
|
55
|
+
type: 'text' | 'resource';
|
|
56
|
+
text?: string;
|
|
57
|
+
resource?: SpecVerseResource;
|
|
58
|
+
}>;
|
|
59
|
+
isError?: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface PromptContext {
|
|
63
|
+
requirements?: string;
|
|
64
|
+
scale?: 'personal' | 'business' | 'enterprise';
|
|
65
|
+
preferredTech?: string;
|
|
66
|
+
projectType?: string;
|
|
67
|
+
frameworkHint?: string;
|
|
68
|
+
targetFramework?: string;
|
|
69
|
+
deploymentType?: string; // Added for Phase 3
|
|
70
|
+
implementationScope?: string; // Added for Phase 3
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Event Types
|
|
74
|
+
export interface ServerStartedEvent {
|
|
75
|
+
mode: string;
|
|
76
|
+
port?: number;
|
|
77
|
+
pid: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ToolCalledEvent {
|
|
81
|
+
toolName: string;
|
|
82
|
+
arguments: Record<string, any>;
|
|
83
|
+
executionTime: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ResourceRequestedEvent {
|
|
87
|
+
uri: string;
|
|
88
|
+
requestTime: Date;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface ErrorOccurredEvent {
|
|
92
|
+
operation: string;
|
|
93
|
+
error: string;
|
|
94
|
+
context?: Record<string, any>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Configuration Types
|
|
98
|
+
export type MCPServerMode = 'local' | 'remote';
|
|
99
|
+
|
|
100
|
+
export interface MCPServerConfig {
|
|
101
|
+
mode: MCPServerMode;
|
|
102
|
+
port?: number;
|
|
103
|
+
host?: string;
|
|
104
|
+
logging?: boolean;
|
|
105
|
+
resources_path?: string;
|
|
106
|
+
workingDirectory?: string;
|
|
107
|
+
features?: {
|
|
108
|
+
orchestrator?: boolean;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"allowSyntheticDefaultImports": true,
|
|
8
|
+
"strict": false,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"declarationMap": true,
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"outDir": "./dist",
|
|
15
|
+
"rootDir": "./src",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"allowImportingTsExtensions": false,
|
|
18
|
+
"noImplicitAny": false
|
|
19
|
+
},
|
|
20
|
+
"include": [
|
|
21
|
+
"src/**/*"
|
|
22
|
+
],
|
|
23
|
+
"exclude": [
|
|
24
|
+
"node_modules",
|
|
25
|
+
"dist",
|
|
26
|
+
"**/*.test.ts"
|
|
27
|
+
]
|
|
28
|
+
}
|