@vurb/core 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +677 -0
- package/dist/cli/args.d.ts +26 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +117 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/commands/create.d.ts +11 -0
- package/dist/cli/commands/create.d.ts.map +1 -0
- package/dist/cli/commands/create.js +121 -0
- package/dist/cli/commands/create.js.map +1 -0
- package/dist/cli/commands/deploy.d.ts +3 -0
- package/dist/cli/commands/deploy.d.ts.map +1 -0
- package/dist/cli/commands/deploy.js +268 -0
- package/dist/cli/commands/deploy.js.map +1 -0
- package/dist/cli/commands/dev.d.ts +9 -0
- package/dist/cli/commands/dev.d.ts.map +1 -0
- package/dist/cli/commands/dev.js +58 -0
- package/dist/cli/commands/dev.js.map +1 -0
- package/dist/cli/commands/lock.d.ts +5 -0
- package/dist/cli/commands/lock.d.ts.map +1 -0
- package/dist/cli/commands/lock.js +94 -0
- package/dist/cli/commands/lock.js.map +1 -0
- package/dist/cli/commands/remote.d.ts +3 -0
- package/dist/cli/commands/remote.d.ts.map +1 -0
- package/dist/cli/commands/remote.js +37 -0
- package/dist/cli/commands/remote.js.map +1 -0
- package/dist/cli/constants.d.ts +18 -0
- package/dist/cli/constants.d.ts.map +1 -0
- package/dist/cli/constants.js +95 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/progress.d.ts +34 -0
- package/dist/cli/progress.d.ts.map +1 -0
- package/dist/cli/progress.js +102 -0
- package/dist/cli/progress.js.map +1 -0
- package/dist/cli/rc.d.ts +11 -0
- package/dist/cli/rc.d.ts.map +1 -0
- package/dist/cli/rc.js +75 -0
- package/dist/cli/rc.js.map +1 -0
- package/dist/cli/registry.d.ts +25 -0
- package/dist/cli/registry.d.ts.map +1 -0
- package/dist/cli/registry.js +86 -0
- package/dist/cli/registry.js.map +1 -0
- package/dist/cli/scaffold.d.ts +10 -0
- package/dist/cli/scaffold.d.ts.map +1 -0
- package/dist/cli/scaffold.js +105 -0
- package/dist/cli/scaffold.js.map +1 -0
- package/dist/cli/templates/config.d.ts +14 -0
- package/dist/cli/templates/config.d.ts.map +1 -0
- package/dist/cli/templates/config.js +133 -0
- package/dist/cli/templates/config.js.map +1 -0
- package/dist/cli/templates/constants.d.ts +9 -0
- package/dist/cli/templates/constants.d.ts.map +1 -0
- package/dist/cli/templates/constants.js +9 -0
- package/dist/cli/templates/constants.js.map +1 -0
- package/dist/cli/templates/core.d.ts +14 -0
- package/dist/cli/templates/core.d.ts.map +1 -0
- package/dist/cli/templates/core.js +186 -0
- package/dist/cli/templates/core.js.map +1 -0
- package/dist/cli/templates/cursor.d.ts +8 -0
- package/dist/cli/templates/cursor.d.ts.map +1 -0
- package/dist/cli/templates/cursor.js +13 -0
- package/dist/cli/templates/cursor.js.map +1 -0
- package/dist/cli/templates/index.d.ts +17 -0
- package/dist/cli/templates/index.d.ts.map +1 -0
- package/dist/cli/templates/index.js +27 -0
- package/dist/cli/templates/index.js.map +1 -0
- package/dist/cli/templates/middleware.d.ts +7 -0
- package/dist/cli/templates/middleware.d.ts.map +1 -0
- package/dist/cli/templates/middleware.js +34 -0
- package/dist/cli/templates/middleware.js.map +1 -0
- package/dist/cli/templates/presenter.d.ts +7 -0
- package/dist/cli/templates/presenter.d.ts.map +1 -0
- package/dist/cli/templates/presenter.js +46 -0
- package/dist/cli/templates/presenter.js.map +1 -0
- package/dist/cli/templates/prompt.d.ts +7 -0
- package/dist/cli/templates/prompt.d.ts.map +1 -0
- package/dist/cli/templates/prompt.js +42 -0
- package/dist/cli/templates/prompt.js.map +1 -0
- package/dist/cli/templates/readme.d.ts +8 -0
- package/dist/cli/templates/readme.d.ts.map +1 -0
- package/dist/cli/templates/readme.js +173 -0
- package/dist/cli/templates/readme.js.map +1 -0
- package/dist/cli/templates/testing.d.ts +11 -0
- package/dist/cli/templates/testing.d.ts.map +1 -0
- package/dist/cli/templates/testing.js +101 -0
- package/dist/cli/templates/testing.js.map +1 -0
- package/dist/cli/templates/tools.d.ts +13 -0
- package/dist/cli/templates/tools.d.ts.map +1 -0
- package/dist/cli/templates/tools.js +63 -0
- package/dist/cli/templates/tools.js.map +1 -0
- package/dist/cli/templates/vectors/database.d.ts +9 -0
- package/dist/cli/templates/vectors/database.d.ts.map +1 -0
- package/dist/cli/templates/vectors/database.js +82 -0
- package/dist/cli/templates/vectors/database.js.map +1 -0
- package/dist/cli/templates/vectors/index.d.ts +9 -0
- package/dist/cli/templates/vectors/index.d.ts.map +1 -0
- package/dist/cli/templates/vectors/index.js +9 -0
- package/dist/cli/templates/vectors/index.js.map +1 -0
- package/dist/cli/templates/vectors/oauth.d.ts +10 -0
- package/dist/cli/templates/vectors/oauth.d.ts.map +1 -0
- package/dist/cli/templates/vectors/oauth.js +76 -0
- package/dist/cli/templates/vectors/oauth.js.map +1 -0
- package/dist/cli/templates/vectors/openapi.d.ts +10 -0
- package/dist/cli/templates/vectors/openapi.d.ts.map +1 -0
- package/dist/cli/templates/vectors/openapi.js +106 -0
- package/dist/cli/templates/vectors/openapi.js.map +1 -0
- package/dist/cli/templates/vectors/workflow.d.ts +7 -0
- package/dist/cli/templates/vectors/workflow.d.ts.map +1 -0
- package/dist/cli/templates/vectors/workflow.js +49 -0
- package/dist/cli/templates/vectors/workflow.js.map +1 -0
- package/dist/cli/types.d.ts +36 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +10 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/utils.d.ts +27 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +73 -0
- package/dist/cli/utils.js.map +1 -0
- package/dist/cli/vurb.d.ts +15 -0
- package/dist/cli/vurb.d.ts.map +1 -0
- package/dist/cli/vurb.js +87 -0
- package/dist/cli/vurb.js.map +1 -0
- package/dist/client/InferRouter.d.ts +92 -0
- package/dist/client/InferRouter.d.ts.map +1 -0
- package/dist/client/InferRouter.js +31 -0
- package/dist/client/InferRouter.js.map +1 -0
- package/dist/client/VurbClient.d.ts +282 -0
- package/dist/client/VurbClient.d.ts.map +1 -0
- package/dist/client/VurbClient.js +287 -0
- package/dist/client/VurbClient.js.map +1 -0
- package/dist/client/createTypedRegistry.d.ts +25 -0
- package/dist/client/createTypedRegistry.d.ts.map +1 -0
- package/dist/client/createTypedRegistry.js +74 -0
- package/dist/client/createTypedRegistry.js.map +1 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +4 -0
- package/dist/client/index.js.map +1 -0
- package/dist/converters/ConverterBase.d.ts +68 -0
- package/dist/converters/ConverterBase.d.ts.map +1 -0
- package/dist/converters/ConverterBase.js +62 -0
- package/dist/converters/ConverterBase.js.map +1 -0
- package/dist/converters/GroupConverter.d.ts +33 -0
- package/dist/converters/GroupConverter.d.ts.map +1 -0
- package/dist/converters/GroupConverter.js +26 -0
- package/dist/converters/GroupConverter.js.map +1 -0
- package/dist/converters/PromptConverter.d.ts +33 -0
- package/dist/converters/PromptConverter.d.ts.map +1 -0
- package/dist/converters/PromptConverter.js +26 -0
- package/dist/converters/PromptConverter.js.map +1 -0
- package/dist/converters/ResourceConverter.d.ts +35 -0
- package/dist/converters/ResourceConverter.d.ts.map +1 -0
- package/dist/converters/ResourceConverter.js +28 -0
- package/dist/converters/ResourceConverter.js.map +1 -0
- package/dist/converters/ToolAnnotationsConverter.d.ts +33 -0
- package/dist/converters/ToolAnnotationsConverter.d.ts.map +1 -0
- package/dist/converters/ToolAnnotationsConverter.js +26 -0
- package/dist/converters/ToolAnnotationsConverter.js.map +1 -0
- package/dist/converters/ToolConverter.d.ts +35 -0
- package/dist/converters/ToolConverter.d.ts.map +1 -0
- package/dist/converters/ToolConverter.js +28 -0
- package/dist/converters/ToolConverter.js.map +1 -0
- package/dist/converters/index.d.ts +7 -0
- package/dist/converters/index.d.ts.map +1 -0
- package/dist/converters/index.js +7 -0
- package/dist/converters/index.js.map +1 -0
- package/dist/core/StandardSchema.d.ts +178 -0
- package/dist/core/StandardSchema.d.ts.map +1 -0
- package/dist/core/StandardSchema.js +174 -0
- package/dist/core/StandardSchema.js.map +1 -0
- package/dist/core/builder/ActionGroupBuilder.d.ts +208 -0
- package/dist/core/builder/ActionGroupBuilder.d.ts.map +1 -0
- package/dist/core/builder/ActionGroupBuilder.js +193 -0
- package/dist/core/builder/ActionGroupBuilder.js.map +1 -0
- package/dist/core/builder/ErrorBuilder.d.ts +59 -0
- package/dist/core/builder/ErrorBuilder.d.ts.map +1 -0
- package/dist/core/builder/ErrorBuilder.js +99 -0
- package/dist/core/builder/ErrorBuilder.js.map +1 -0
- package/dist/core/builder/FluentRouter.d.ts +96 -0
- package/dist/core/builder/FluentRouter.d.ts.map +1 -0
- package/dist/core/builder/FluentRouter.js +116 -0
- package/dist/core/builder/FluentRouter.js.map +1 -0
- package/dist/core/builder/FluentSchemaHelpers.d.ts +237 -0
- package/dist/core/builder/FluentSchemaHelpers.d.ts.map +1 -0
- package/dist/core/builder/FluentSchemaHelpers.js +227 -0
- package/dist/core/builder/FluentSchemaHelpers.js.map +1 -0
- package/dist/core/builder/FluentToolBuilder.d.ts +419 -0
- package/dist/core/builder/FluentToolBuilder.d.ts.map +1 -0
- package/dist/core/builder/FluentToolBuilder.js +643 -0
- package/dist/core/builder/FluentToolBuilder.js.map +1 -0
- package/dist/core/builder/GroupedToolBuilder.d.ts +832 -0
- package/dist/core/builder/GroupedToolBuilder.d.ts.map +1 -0
- package/dist/core/builder/GroupedToolBuilder.js +1306 -0
- package/dist/core/builder/GroupedToolBuilder.js.map +1 -0
- package/dist/core/builder/ParamDescriptors.d.ts +142 -0
- package/dist/core/builder/ParamDescriptors.d.ts.map +1 -0
- package/dist/core/builder/ParamDescriptors.js +164 -0
- package/dist/core/builder/ParamDescriptors.js.map +1 -0
- package/dist/core/builder/ToolDefinitionCompiler.d.ts +37 -0
- package/dist/core/builder/ToolDefinitionCompiler.d.ts.map +1 -0
- package/dist/core/builder/ToolDefinitionCompiler.js +72 -0
- package/dist/core/builder/ToolDefinitionCompiler.js.map +1 -0
- package/dist/core/builder/defineTool.d.ts +180 -0
- package/dist/core/builder/defineTool.d.ts.map +1 -0
- package/dist/core/builder/defineTool.js +164 -0
- package/dist/core/builder/defineTool.js.map +1 -0
- package/dist/core/builder/index.d.ts +13 -0
- package/dist/core/builder/index.d.ts.map +1 -0
- package/dist/core/builder/index.js +13 -0
- package/dist/core/builder/index.js.map +1 -0
- package/dist/core/createGroup.d.ts +140 -0
- package/dist/core/createGroup.d.ts.map +1 -0
- package/dist/core/createGroup.js +144 -0
- package/dist/core/createGroup.js.map +1 -0
- package/dist/core/execution/ConcurrencyGuard.d.ts +103 -0
- package/dist/core/execution/ConcurrencyGuard.d.ts.map +1 -0
- package/dist/core/execution/ConcurrencyGuard.js +147 -0
- package/dist/core/execution/ConcurrencyGuard.js.map +1 -0
- package/dist/core/execution/EgressGuard.d.ts +72 -0
- package/dist/core/execution/EgressGuard.d.ts.map +1 -0
- package/dist/core/execution/EgressGuard.js +163 -0
- package/dist/core/execution/EgressGuard.js.map +1 -0
- package/dist/core/execution/ExecutionPipeline.d.ts +67 -0
- package/dist/core/execution/ExecutionPipeline.d.ts.map +1 -0
- package/dist/core/execution/ExecutionPipeline.js +176 -0
- package/dist/core/execution/ExecutionPipeline.js.map +1 -0
- package/dist/core/execution/MiddlewareCompiler.d.ts +35 -0
- package/dist/core/execution/MiddlewareCompiler.d.ts.map +1 -0
- package/dist/core/execution/MiddlewareCompiler.js +111 -0
- package/dist/core/execution/MiddlewareCompiler.js.map +1 -0
- package/dist/core/execution/MutationSerializer.d.ts +78 -0
- package/dist/core/execution/MutationSerializer.d.ts.map +1 -0
- package/dist/core/execution/MutationSerializer.js +106 -0
- package/dist/core/execution/MutationSerializer.js.map +1 -0
- package/dist/core/execution/PipelineHooks.d.ts +46 -0
- package/dist/core/execution/PipelineHooks.d.ts.map +1 -0
- package/dist/core/execution/PipelineHooks.js +66 -0
- package/dist/core/execution/PipelineHooks.js.map +1 -0
- package/dist/core/execution/ProgressHelper.d.ts +67 -0
- package/dist/core/execution/ProgressHelper.d.ts.map +1 -0
- package/dist/core/execution/ProgressHelper.js +59 -0
- package/dist/core/execution/ProgressHelper.js.map +1 -0
- package/dist/core/execution/ValidationErrorFormatter.d.ts +34 -0
- package/dist/core/execution/ValidationErrorFormatter.d.ts.map +1 -0
- package/dist/core/execution/ValidationErrorFormatter.js +193 -0
- package/dist/core/execution/ValidationErrorFormatter.js.map +1 -0
- package/dist/core/execution/index.d.ts +9 -0
- package/dist/core/execution/index.d.ts.map +1 -0
- package/dist/core/execution/index.js +9 -0
- package/dist/core/execution/index.js.map +1 -0
- package/dist/core/index.d.ts +34 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +29 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/initVurb.d.ts +295 -0
- package/dist/core/initVurb.d.ts.map +1 -0
- package/dist/core/initVurb.js +171 -0
- package/dist/core/initVurb.js.map +1 -0
- package/dist/core/middleware/ContextDerivation.d.ts +124 -0
- package/dist/core/middleware/ContextDerivation.d.ts.map +1 -0
- package/dist/core/middleware/ContextDerivation.js +117 -0
- package/dist/core/middleware/ContextDerivation.js.map +1 -0
- package/dist/core/middleware/index.d.ts +4 -0
- package/dist/core/middleware/index.d.ts.map +1 -0
- package/dist/core/middleware/index.js +3 -0
- package/dist/core/middleware/index.js.map +1 -0
- package/dist/core/registry/ToolFilterEngine.d.ts +27 -0
- package/dist/core/registry/ToolFilterEngine.d.ts.map +1 -0
- package/dist/core/registry/ToolFilterEngine.js +45 -0
- package/dist/core/registry/ToolFilterEngine.js.map +1 -0
- package/dist/core/registry/ToolRegistry.d.ts +259 -0
- package/dist/core/registry/ToolRegistry.d.ts.map +1 -0
- package/dist/core/registry/ToolRegistry.js +343 -0
- package/dist/core/registry/ToolRegistry.js.map +1 -0
- package/dist/core/registry/index.d.ts +4 -0
- package/dist/core/registry/index.d.ts.map +1 -0
- package/dist/core/registry/index.js +3 -0
- package/dist/core/registry/index.js.map +1 -0
- package/dist/core/response.d.ts +289 -0
- package/dist/core/response.d.ts.map +1 -0
- package/dist/core/response.js +286 -0
- package/dist/core/response.js.map +1 -0
- package/dist/core/result.d.ts +93 -0
- package/dist/core/result.d.ts.map +1 -0
- package/dist/core/result.js +66 -0
- package/dist/core/result.js.map +1 -0
- package/dist/core/schema/AnnotationAggregator.d.ts +11 -0
- package/dist/core/schema/AnnotationAggregator.d.ts.map +1 -0
- package/dist/core/schema/AnnotationAggregator.js +40 -0
- package/dist/core/schema/AnnotationAggregator.js.map +1 -0
- package/dist/core/schema/DescriptionGenerator.d.ts +12 -0
- package/dist/core/schema/DescriptionGenerator.d.ts.map +1 -0
- package/dist/core/schema/DescriptionGenerator.js +81 -0
- package/dist/core/schema/DescriptionGenerator.js.map +1 -0
- package/dist/core/schema/SchemaGenerator.d.ts +15 -0
- package/dist/core/schema/SchemaGenerator.d.ts.map +1 -0
- package/dist/core/schema/SchemaGenerator.js +192 -0
- package/dist/core/schema/SchemaGenerator.js.map +1 -0
- package/dist/core/schema/SchemaUtils.d.ts +26 -0
- package/dist/core/schema/SchemaUtils.d.ts.map +1 -0
- package/dist/core/schema/SchemaUtils.js +85 -0
- package/dist/core/schema/SchemaUtils.js.map +1 -0
- package/dist/core/schema/ToonDescriptionGenerator.d.ts +3 -0
- package/dist/core/schema/ToonDescriptionGenerator.d.ts.map +1 -0
- package/dist/core/schema/ToonDescriptionGenerator.js +65 -0
- package/dist/core/schema/ToonDescriptionGenerator.js.map +1 -0
- package/dist/core/schema/index.d.ts +7 -0
- package/dist/core/schema/index.d.ts.map +1 -0
- package/dist/core/schema/index.js +7 -0
- package/dist/core/schema/index.js.map +1 -0
- package/dist/core/serialization/JsonSerializer.d.ts +71 -0
- package/dist/core/serialization/JsonSerializer.d.ts.map +1 -0
- package/dist/core/serialization/JsonSerializer.js +192 -0
- package/dist/core/serialization/JsonSerializer.js.map +1 -0
- package/dist/core/serialization/index.d.ts +7 -0
- package/dist/core/serialization/index.d.ts.map +1 -0
- package/dist/core/serialization/index.js +7 -0
- package/dist/core/serialization/index.js.map +1 -0
- package/dist/core/types.d.ts +303 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +17 -0
- package/dist/core/types.js.map +1 -0
- package/dist/domain/Annotations.d.ts +42 -0
- package/dist/domain/Annotations.d.ts.map +1 -0
- package/dist/domain/Annotations.js +16 -0
- package/dist/domain/Annotations.js.map +1 -0
- package/dist/domain/BaseModel.d.ts +50 -0
- package/dist/domain/BaseModel.d.ts.map +1 -0
- package/dist/domain/BaseModel.js +41 -0
- package/dist/domain/BaseModel.js.map +1 -0
- package/dist/domain/Group.d.ts +99 -0
- package/dist/domain/Group.d.ts.map +1 -0
- package/dist/domain/Group.js +172 -0
- package/dist/domain/Group.js.map +1 -0
- package/dist/domain/GroupItem.d.ts +46 -0
- package/dist/domain/GroupItem.d.ts.map +1 -0
- package/dist/domain/GroupItem.js +58 -0
- package/dist/domain/GroupItem.js.map +1 -0
- package/dist/domain/Icon.d.ts +41 -0
- package/dist/domain/Icon.d.ts.map +1 -0
- package/dist/domain/Icon.js +15 -0
- package/dist/domain/Icon.js.map +1 -0
- package/dist/domain/Prompt.d.ts +49 -0
- package/dist/domain/Prompt.d.ts.map +1 -0
- package/dist/domain/Prompt.js +59 -0
- package/dist/domain/Prompt.js.map +1 -0
- package/dist/domain/PromptArgument.d.ts +23 -0
- package/dist/domain/PromptArgument.d.ts.map +1 -0
- package/dist/domain/PromptArgument.js +27 -0
- package/dist/domain/PromptArgument.js.map +1 -0
- package/dist/domain/Resource.d.ts +37 -0
- package/dist/domain/Resource.d.ts.map +1 -0
- package/dist/domain/Resource.js +39 -0
- package/dist/domain/Resource.js.map +1 -0
- package/dist/domain/Role.d.ts +23 -0
- package/dist/domain/Role.d.ts.map +1 -0
- package/dist/domain/Role.js +24 -0
- package/dist/domain/Role.js.map +1 -0
- package/dist/domain/Tool.d.ts +39 -0
- package/dist/domain/Tool.d.ts.map +1 -0
- package/dist/domain/Tool.js +41 -0
- package/dist/domain/Tool.js.map +1 -0
- package/dist/domain/ToolAnnotations.d.ts +48 -0
- package/dist/domain/ToolAnnotations.d.ts.map +1 -0
- package/dist/domain/ToolAnnotations.js +15 -0
- package/dist/domain/ToolAnnotations.js.map +1 -0
- package/dist/domain/index.d.ts +16 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +13 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/utils.d.ts +6 -0
- package/dist/domain/utils.d.ts.map +1 -0
- package/dist/domain/utils.js +12 -0
- package/dist/domain/utils.js.map +1 -0
- package/dist/edge-stub.d.ts +73 -0
- package/dist/edge-stub.d.ts.map +1 -0
- package/dist/edge-stub.js +83 -0
- package/dist/edge-stub.js.map +1 -0
- package/dist/exposition/ExpositionCompiler.d.ts +66 -0
- package/dist/exposition/ExpositionCompiler.d.ts.map +1 -0
- package/dist/exposition/ExpositionCompiler.js +279 -0
- package/dist/exposition/ExpositionCompiler.js.map +1 -0
- package/dist/exposition/index.d.ts +4 -0
- package/dist/exposition/index.d.ts.map +1 -0
- package/dist/exposition/index.js +2 -0
- package/dist/exposition/index.js.map +1 -0
- package/dist/exposition/types.d.ts +58 -0
- package/dist/exposition/types.d.ts.map +1 -0
- package/dist/exposition/types.js +11 -0
- package/dist/exposition/types.js.map +1 -0
- package/dist/fsm/StateMachineGate.d.ts +294 -0
- package/dist/fsm/StateMachineGate.d.ts.map +1 -0
- package/dist/fsm/StateMachineGate.js +400 -0
- package/dist/fsm/StateMachineGate.js.map +1 -0
- package/dist/index.d.ts +148 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +112 -0
- package/dist/index.js.map +1 -0
- package/dist/introspection/BehaviorDigest.d.ts +112 -0
- package/dist/introspection/BehaviorDigest.d.ts.map +1 -0
- package/dist/introspection/BehaviorDigest.js +149 -0
- package/dist/introspection/BehaviorDigest.js.map +1 -0
- package/dist/introspection/CapabilityLockfile.d.ts +261 -0
- package/dist/introspection/CapabilityLockfile.d.ts.map +1 -0
- package/dist/introspection/CapabilityLockfile.js +395 -0
- package/dist/introspection/CapabilityLockfile.js.map +1 -0
- package/dist/introspection/ContractAwareSelfHealing.d.ts +90 -0
- package/dist/introspection/ContractAwareSelfHealing.d.ts.map +1 -0
- package/dist/introspection/ContractAwareSelfHealing.js +132 -0
- package/dist/introspection/ContractAwareSelfHealing.js.map +1 -0
- package/dist/introspection/ContractDiff.d.ts +91 -0
- package/dist/introspection/ContractDiff.d.ts.map +1 -0
- package/dist/introspection/ContractDiff.js +466 -0
- package/dist/introspection/ContractDiff.js.map +1 -0
- package/dist/introspection/CryptoAttestation.d.ts +143 -0
- package/dist/introspection/CryptoAttestation.d.ts.map +1 -0
- package/dist/introspection/CryptoAttestation.js +192 -0
- package/dist/introspection/CryptoAttestation.js.map +1 -0
- package/dist/introspection/EntitlementScanner.d.ts +177 -0
- package/dist/introspection/EntitlementScanner.d.ts.map +1 -0
- package/dist/introspection/EntitlementScanner.js +459 -0
- package/dist/introspection/EntitlementScanner.js.map +1 -0
- package/dist/introspection/GovernanceObserver.d.ts +88 -0
- package/dist/introspection/GovernanceObserver.d.ts.map +1 -0
- package/dist/introspection/GovernanceObserver.js +136 -0
- package/dist/introspection/GovernanceObserver.js.map +1 -0
- package/dist/introspection/IntrospectionResource.d.ts +20 -0
- package/dist/introspection/IntrospectionResource.d.ts.map +1 -0
- package/dist/introspection/IntrospectionResource.js +112 -0
- package/dist/introspection/IntrospectionResource.js.map +1 -0
- package/dist/introspection/ManifestCompiler.d.ts +33 -0
- package/dist/introspection/ManifestCompiler.d.ts.map +1 -0
- package/dist/introspection/ManifestCompiler.js +88 -0
- package/dist/introspection/ManifestCompiler.js.map +1 -0
- package/dist/introspection/SemanticProbe.d.ts +207 -0
- package/dist/introspection/SemanticProbe.d.ts.map +1 -0
- package/dist/introspection/SemanticProbe.js +274 -0
- package/dist/introspection/SemanticProbe.js.map +1 -0
- package/dist/introspection/TokenEconomics.d.ts +210 -0
- package/dist/introspection/TokenEconomics.d.ts.map +1 -0
- package/dist/introspection/TokenEconomics.js +292 -0
- package/dist/introspection/TokenEconomics.js.map +1 -0
- package/dist/introspection/ToolContract.d.ts +161 -0
- package/dist/introspection/ToolContract.d.ts.map +1 -0
- package/dist/introspection/ToolContract.js +218 -0
- package/dist/introspection/ToolContract.js.map +1 -0
- package/dist/introspection/canonicalize.d.ts +35 -0
- package/dist/introspection/canonicalize.d.ts.map +1 -0
- package/dist/introspection/canonicalize.js +72 -0
- package/dist/introspection/canonicalize.js.map +1 -0
- package/dist/introspection/index.d.ts +26 -0
- package/dist/introspection/index.d.ts.map +1 -0
- package/dist/introspection/index.js +24 -0
- package/dist/introspection/index.js.map +1 -0
- package/dist/introspection/types.d.ts +120 -0
- package/dist/introspection/types.d.ts.map +1 -0
- package/dist/introspection/types.js +13 -0
- package/dist/introspection/types.js.map +1 -0
- package/dist/observability/DebugObserver.d.ts +185 -0
- package/dist/observability/DebugObserver.d.ts.map +1 -0
- package/dist/observability/DebugObserver.js +102 -0
- package/dist/observability/DebugObserver.js.map +1 -0
- package/dist/observability/TelemetryBus.d.ts +88 -0
- package/dist/observability/TelemetryBus.d.ts.map +1 -0
- package/dist/observability/TelemetryBus.js +463 -0
- package/dist/observability/TelemetryBus.js.map +1 -0
- package/dist/observability/TelemetryEvent.d.ts +177 -0
- package/dist/observability/TelemetryEvent.d.ts.map +1 -0
- package/dist/observability/TelemetryEvent.js +2 -0
- package/dist/observability/TelemetryEvent.js.map +1 -0
- package/dist/observability/Tracing.d.ts +155 -0
- package/dist/observability/Tracing.d.ts.map +1 -0
- package/dist/observability/Tracing.js +67 -0
- package/dist/observability/Tracing.js.map +1 -0
- package/dist/observability/index.d.ts +13 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +12 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/presenter/PostProcessor.d.ts +52 -0
- package/dist/presenter/PostProcessor.d.ts.map +1 -0
- package/dist/presenter/PostProcessor.js +148 -0
- package/dist/presenter/PostProcessor.js.map +1 -0
- package/dist/presenter/Presenter.d.ts +575 -0
- package/dist/presenter/Presenter.d.ts.map +1 -0
- package/dist/presenter/Presenter.js +768 -0
- package/dist/presenter/Presenter.js.map +1 -0
- package/dist/presenter/PresenterValidationError.d.ts +42 -0
- package/dist/presenter/PresenterValidationError.d.ts.map +1 -0
- package/dist/presenter/PresenterValidationError.js +55 -0
- package/dist/presenter/PresenterValidationError.js.map +1 -0
- package/dist/presenter/RedactEngine.d.ts +110 -0
- package/dist/presenter/RedactEngine.d.ts.map +1 -0
- package/dist/presenter/RedactEngine.js +128 -0
- package/dist/presenter/RedactEngine.js.map +1 -0
- package/dist/presenter/ResponseBuilder.d.ts +262 -0
- package/dist/presenter/ResponseBuilder.d.ts.map +1 -0
- package/dist/presenter/ResponseBuilder.js +374 -0
- package/dist/presenter/ResponseBuilder.js.map +1 -0
- package/dist/presenter/SelectUtils.d.ts +78 -0
- package/dist/presenter/SelectUtils.d.ts.map +1 -0
- package/dist/presenter/SelectUtils.js +141 -0
- package/dist/presenter/SelectUtils.js.map +1 -0
- package/dist/presenter/ZodDescriptionExtractor.d.ts +54 -0
- package/dist/presenter/ZodDescriptionExtractor.d.ts.map +1 -0
- package/dist/presenter/ZodDescriptionExtractor.js +131 -0
- package/dist/presenter/ZodDescriptionExtractor.js.map +1 -0
- package/dist/presenter/definePresenter.d.ts +193 -0
- package/dist/presenter/definePresenter.d.ts.map +1 -0
- package/dist/presenter/definePresenter.js +99 -0
- package/dist/presenter/definePresenter.js.map +1 -0
- package/dist/presenter/index.d.ts +21 -0
- package/dist/presenter/index.d.ts.map +1 -0
- package/dist/presenter/index.js +28 -0
- package/dist/presenter/index.js.map +1 -0
- package/dist/presenter/suggest.d.ts +39 -0
- package/dist/presenter/suggest.d.ts.map +1 -0
- package/dist/presenter/suggest.js +41 -0
- package/dist/presenter/suggest.js.map +1 -0
- package/dist/presenter/typeHelpers.d.ts +147 -0
- package/dist/presenter/typeHelpers.d.ts.map +1 -0
- package/dist/presenter/typeHelpers.js +152 -0
- package/dist/presenter/typeHelpers.js.map +1 -0
- package/dist/presenter/ui.d.ts +205 -0
- package/dist/presenter/ui.d.ts.map +1 -0
- package/dist/presenter/ui.js +222 -0
- package/dist/presenter/ui.js.map +1 -0
- package/dist/prompt/CursorCodec.d.ts +43 -0
- package/dist/prompt/CursorCodec.d.ts.map +1 -0
- package/dist/prompt/CursorCodec.js +171 -0
- package/dist/prompt/CursorCodec.js.map +1 -0
- package/dist/prompt/FluentPromptBuilder.d.ts +155 -0
- package/dist/prompt/FluentPromptBuilder.d.ts.map +1 -0
- package/dist/prompt/FluentPromptBuilder.js +195 -0
- package/dist/prompt/FluentPromptBuilder.js.map +1 -0
- package/dist/prompt/HydrationSandbox.d.ts +55 -0
- package/dist/prompt/HydrationSandbox.d.ts.map +1 -0
- package/dist/prompt/HydrationSandbox.js +122 -0
- package/dist/prompt/HydrationSandbox.js.map +1 -0
- package/dist/prompt/PromptExecutionPipeline.d.ts +61 -0
- package/dist/prompt/PromptExecutionPipeline.d.ts.map +1 -0
- package/dist/prompt/PromptExecutionPipeline.js +177 -0
- package/dist/prompt/PromptExecutionPipeline.js.map +1 -0
- package/dist/prompt/PromptMessage.d.ts +133 -0
- package/dist/prompt/PromptMessage.d.ts.map +1 -0
- package/dist/prompt/PromptMessage.js +182 -0
- package/dist/prompt/PromptMessage.js.map +1 -0
- package/dist/prompt/PromptRegistry.d.ts +236 -0
- package/dist/prompt/PromptRegistry.d.ts.map +1 -0
- package/dist/prompt/PromptRegistry.js +399 -0
- package/dist/prompt/PromptRegistry.js.map +1 -0
- package/dist/prompt/definePrompt.d.ts +111 -0
- package/dist/prompt/definePrompt.d.ts.map +1 -0
- package/dist/prompt/definePrompt.js +130 -0
- package/dist/prompt/definePrompt.js.map +1 -0
- package/dist/prompt/index.d.ts +12 -0
- package/dist/prompt/index.d.ts.map +1 -0
- package/dist/prompt/index.js +13 -0
- package/dist/prompt/index.js.map +1 -0
- package/dist/prompt/types.d.ts +425 -0
- package/dist/prompt/types.d.ts.map +1 -0
- package/dist/prompt/types.js +19 -0
- package/dist/prompt/types.js.map +1 -0
- package/dist/sandbox/SandboxEngine.d.ts +225 -0
- package/dist/sandbox/SandboxEngine.d.ts.map +1 -0
- package/dist/sandbox/SandboxEngine.js +437 -0
- package/dist/sandbox/SandboxEngine.js.map +1 -0
- package/dist/sandbox/SandboxGuard.d.ts +47 -0
- package/dist/sandbox/SandboxGuard.d.ts.map +1 -0
- package/dist/sandbox/SandboxGuard.js +127 -0
- package/dist/sandbox/SandboxGuard.js.map +1 -0
- package/dist/sandbox/index.d.ts +23 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/index.js +26 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/server/DevServer.d.ts +120 -0
- package/dist/server/DevServer.d.ts.map +1 -0
- package/dist/server/DevServer.js +252 -0
- package/dist/server/DevServer.js.map +1 -0
- package/dist/server/ServerAttachment.d.ts +354 -0
- package/dist/server/ServerAttachment.d.ts.map +1 -0
- package/dist/server/ServerAttachment.js +709 -0
- package/dist/server/ServerAttachment.js.map +1 -0
- package/dist/server/ServerResolver.d.ts +24 -0
- package/dist/server/ServerResolver.d.ts.map +1 -0
- package/dist/server/ServerResolver.js +50 -0
- package/dist/server/ServerResolver.js.map +1 -0
- package/dist/server/autoDiscover.d.ts +75 -0
- package/dist/server/autoDiscover.d.ts.map +1 -0
- package/dist/server/autoDiscover.js +164 -0
- package/dist/server/autoDiscover.js.map +1 -0
- package/dist/server/index.d.ts +12 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +11 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/startServer.d.ts +81 -0
- package/dist/server/startServer.d.ts.map +1 -0
- package/dist/server/startServer.js +143 -0
- package/dist/server/startServer.js.map +1 -0
- package/dist/state-sync/CausalEngine.d.ts +28 -0
- package/dist/state-sync/CausalEngine.d.ts.map +1 -0
- package/dist/state-sync/CausalEngine.js +17 -0
- package/dist/state-sync/CausalEngine.js.map +1 -0
- package/dist/state-sync/DescriptionDecorator.d.ts +31 -0
- package/dist/state-sync/DescriptionDecorator.d.ts.map +1 -0
- package/dist/state-sync/DescriptionDecorator.js +38 -0
- package/dist/state-sync/DescriptionDecorator.js.map +1 -0
- package/dist/state-sync/GlobMatcher.d.ts +29 -0
- package/dist/state-sync/GlobMatcher.d.ts.map +1 -0
- package/dist/state-sync/GlobMatcher.js +79 -0
- package/dist/state-sync/GlobMatcher.js.map +1 -0
- package/dist/state-sync/PolicyEngine.d.ts +75 -0
- package/dist/state-sync/PolicyEngine.d.ts.map +1 -0
- package/dist/state-sync/PolicyEngine.js +107 -0
- package/dist/state-sync/PolicyEngine.js.map +1 -0
- package/dist/state-sync/PolicyValidator.d.ts +67 -0
- package/dist/state-sync/PolicyValidator.d.ts.map +1 -0
- package/dist/state-sync/PolicyValidator.js +122 -0
- package/dist/state-sync/PolicyValidator.js.map +1 -0
- package/dist/state-sync/ResponseDecorator.d.ts +33 -0
- package/dist/state-sync/ResponseDecorator.d.ts.map +1 -0
- package/dist/state-sync/ResponseDecorator.js +20 -0
- package/dist/state-sync/ResponseDecorator.js.map +1 -0
- package/dist/state-sync/StateSyncBuilder.d.ts +77 -0
- package/dist/state-sync/StateSyncBuilder.d.ts.map +1 -0
- package/dist/state-sync/StateSyncBuilder.js +129 -0
- package/dist/state-sync/StateSyncBuilder.js.map +1 -0
- package/dist/state-sync/StateSyncLayer.d.ts +107 -0
- package/dist/state-sync/StateSyncLayer.d.ts.map +1 -0
- package/dist/state-sync/StateSyncLayer.js +158 -0
- package/dist/state-sync/StateSyncLayer.js.map +1 -0
- package/dist/state-sync/index.d.ts +27 -0
- package/dist/state-sync/index.d.ts.map +1 -0
- package/dist/state-sync/index.js +27 -0
- package/dist/state-sync/index.js.map +1 -0
- package/dist/state-sync/types.d.ts +174 -0
- package/dist/state-sync/types.d.ts.map +1 -0
- package/dist/state-sync/types.js +17 -0
- package/dist/state-sync/types.js.map +1 -0
- package/dist/testing/MvaMetaSymbol.d.ts +45 -0
- package/dist/testing/MvaMetaSymbol.d.ts.map +1 -0
- package/dist/testing/MvaMetaSymbol.js +34 -0
- package/dist/testing/MvaMetaSymbol.js.map +1 -0
- package/package.json +153 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry resolution — load and resolve ToolRegistry from server entrypoint.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import { resolve } from 'node:path';
|
|
6
|
+
import { pathToFileURL } from 'node:url';
|
|
7
|
+
// ─── Resolution ──────────────────────────────────────────────────
|
|
8
|
+
/**
|
|
9
|
+
* Attempt to load and resolve a tool registry from a server entrypoint.
|
|
10
|
+
*
|
|
11
|
+
* Supports common export patterns:
|
|
12
|
+
* - `export const registry = new ToolRegistry()`
|
|
13
|
+
* - `export default { registry }`
|
|
14
|
+
* - `export const vurb = initVurb()`
|
|
15
|
+
*
|
|
16
|
+
* @internal exported for testing
|
|
17
|
+
*/
|
|
18
|
+
export async function resolveRegistry(serverPath) {
|
|
19
|
+
const absolutePath = resolve(serverPath);
|
|
20
|
+
const fileUrl = pathToFileURL(absolutePath).href;
|
|
21
|
+
// Register tsx loader so dynamic import() can handle .ts files
|
|
22
|
+
if (absolutePath.endsWith('.ts')) {
|
|
23
|
+
try {
|
|
24
|
+
const { createRequire } = await import('node:module');
|
|
25
|
+
const userRequire = createRequire(absolutePath);
|
|
26
|
+
const tsxApiPath = userRequire.resolve('tsx/esm/api');
|
|
27
|
+
const { register } = await import(pathToFileURL(tsxApiPath).href);
|
|
28
|
+
register();
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// tsx not available — fall through
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
35
|
+
const mod = await import(fileUrl);
|
|
36
|
+
/** Extract prompt registry from a module-like object */
|
|
37
|
+
function extractPrompts(obj) {
|
|
38
|
+
for (const key of ['promptRegistry', 'prompts', 'promptsRegistry']) {
|
|
39
|
+
const candidate = obj[key];
|
|
40
|
+
if (candidate && typeof candidate === 'object' && candidate !== null) {
|
|
41
|
+
return candidate;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
// Strategy 1: Named `registry` export (ToolRegistry pattern)
|
|
47
|
+
if (mod.registry && typeof mod.registry.getBuilders === 'function') {
|
|
48
|
+
const pr = extractPrompts(mod);
|
|
49
|
+
return {
|
|
50
|
+
registry: mod.registry,
|
|
51
|
+
name: mod.serverName ?? 'vurb-server',
|
|
52
|
+
...(pr ? { promptRegistry: pr } : {}),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
// Strategy 2: Named `vurb` export (initVurb pattern)
|
|
56
|
+
if (mod.vurb && mod.vurb.registry && typeof mod.vurb.registry.getBuilders === 'function') {
|
|
57
|
+
const pr = extractPrompts(mod.vurb);
|
|
58
|
+
return {
|
|
59
|
+
registry: mod.vurb.registry,
|
|
60
|
+
name: mod.vurb.name ?? 'vurb-server',
|
|
61
|
+
...(pr ? { promptRegistry: pr } : {}),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
// Strategy 3: Default export with registry
|
|
65
|
+
if (mod.default) {
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
67
|
+
const def = mod.default;
|
|
68
|
+
if (def.registry && typeof def.registry.getBuilders === 'function') {
|
|
69
|
+
const pr = extractPrompts(def);
|
|
70
|
+
return {
|
|
71
|
+
registry: def.registry,
|
|
72
|
+
name: def.serverName ?? 'vurb-server',
|
|
73
|
+
...(pr ? { promptRegistry: pr } : {}),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (typeof def.getBuilders === 'function') {
|
|
77
|
+
return { registry: def, name: 'vurb-server' };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
throw new Error(`Could not resolve a ToolRegistry from "${serverPath}".\n` +
|
|
81
|
+
`Expected one of:\n` +
|
|
82
|
+
` export const registry = new ToolRegistry() // named 'registry' with getBuilders()\n` +
|
|
83
|
+
` export const vurb = initVurb() // named 'vurb' with .registry\n` +
|
|
84
|
+
` export default { registry } // default export with .registry`);
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/cli/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAezC,oEAAoE;AAEpE;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,UAAkB;IACpD,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC;IAEjD,+DAA+D;IAC/D,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,IAAI,CAAC;YACD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;YACtD,MAAM,WAAW,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;YAChD,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YACtD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAA6B,CAAC;YAC9F,QAAQ,EAAE,CAAC;QACf,CAAC;QAAC,MAAM,CAAC;YACL,mCAAmC;QACvC,CAAC;IACL,CAAC;IAED,mE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AAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxC,CAAC;IACN,CAAC;IAED,2CAA2C;IAC3C,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QACd,+GAA+G;QAC/G,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,GAAG,CAAC,QAAQ,IAAI,OAAO,GAAG,CAAC,QAAQ,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;YACjE,MAAM,EAAE,GAAG,cAAc,CAAC,GAA8B,CAAC,CAAC;YAC1D,OAAO;gBACH,QAAQ,EAAE,GAAG,CAAC,QAAwB;gBACtC,IAAI,EAAG,GAAG,CAAC,UAAqB,IAAI,aAAa;gBACjD,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACxC,CAAC;QACN,CAAC;QACD,IAAI,OAAO,GAAG,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;YACxC,OAAO,EAAE,QAAQ,EAAE,GAAmB,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;QAClE,CAAC;IACL,CAAC;IAED,MAAM,IAAI,KAAK,CACX,0CAA0C,UAAU,MAAM;QAC1D,oBAAoB;QACpB,wFAAwF;QACxF,6EAA6E;QAC7E,iFAAiF,CACpF,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ProjectConfig } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Write all project files to the target directory.
|
|
4
|
+
*
|
|
5
|
+
* @param targetDir - Absolute path to the project directory
|
|
6
|
+
* @param config - Wizard configuration
|
|
7
|
+
* @returns Array of relative file paths written
|
|
8
|
+
*/
|
|
9
|
+
export declare function scaffold(targetDir: string, config: ProjectConfig): string[];
|
|
10
|
+
//# sourceMappingURL=scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/cli/scaffold.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAYhD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,CAiB3E"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scaffold Engine — Project Directory Builder
|
|
3
|
+
*
|
|
4
|
+
* Receives a `ProjectConfig` from the CLI wizard, builds the
|
|
5
|
+
* complete file list (including vector-specific files), and
|
|
6
|
+
* writes everything to disk in one pass.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
11
|
+
import { join, dirname } from 'node:path';
|
|
12
|
+
import * as tpl from './templates/index.js';
|
|
13
|
+
// ── Public API ───────────────────────────────────────────
|
|
14
|
+
/**
|
|
15
|
+
* Write all project files to the target directory.
|
|
16
|
+
*
|
|
17
|
+
* @param targetDir - Absolute path to the project directory
|
|
18
|
+
* @param config - Wizard configuration
|
|
19
|
+
* @returns Array of relative file paths written
|
|
20
|
+
*/
|
|
21
|
+
export function scaffold(targetDir, config) {
|
|
22
|
+
const files = buildFileList(config);
|
|
23
|
+
try {
|
|
24
|
+
for (const file of files) {
|
|
25
|
+
const fullPath = join(targetDir, file.path);
|
|
26
|
+
const dir = dirname(fullPath);
|
|
27
|
+
mkdirSync(dir, { recursive: true });
|
|
28
|
+
writeFileSync(fullPath, file.content, 'utf-8');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
// Clean up partially-written project to avoid orphaned files
|
|
33
|
+
try {
|
|
34
|
+
rmSync(targetDir, { recursive: true, force: true });
|
|
35
|
+
}
|
|
36
|
+
catch { /* best effort */ }
|
|
37
|
+
throw err;
|
|
38
|
+
}
|
|
39
|
+
return files.map(f => f.path);
|
|
40
|
+
}
|
|
41
|
+
// ── File List Builder ────────────────────────────────────
|
|
42
|
+
function buildFileList(config) {
|
|
43
|
+
const files = [];
|
|
44
|
+
// ── Root config ──────────────────────────────────────
|
|
45
|
+
files.push({ path: 'package.json', content: tpl.packageJson(config) });
|
|
46
|
+
files.push({ path: 'tsconfig.json', content: tpl.tsconfig() });
|
|
47
|
+
files.push({ path: '.gitignore', content: tpl.gitignore() });
|
|
48
|
+
files.push({ path: '.env.example', content: tpl.envExample(config) });
|
|
49
|
+
files.push({ path: 'README.md', content: tpl.readme(config) });
|
|
50
|
+
// ── Zero-click editor integration ─────────────────────
|
|
51
|
+
files.push({ path: '.cursor/mcp.json', content: tpl.cursorMcpJson(config) });
|
|
52
|
+
files.push({ path: '.vscode/mcp.json', content: tpl.cursorMcpJson(config) });
|
|
53
|
+
// ── Testing config ───────────────────────────────────
|
|
54
|
+
if (config.testing) {
|
|
55
|
+
files.push({ path: 'vitest.config.ts', content: tpl.vitestConfig() });
|
|
56
|
+
}
|
|
57
|
+
// ── Core source ──────────────────────────────────────
|
|
58
|
+
files.push({ path: 'src/vurb.ts', content: tpl.vurbTs() });
|
|
59
|
+
files.push({ path: 'src/context.ts', content: tpl.contextTs() });
|
|
60
|
+
files.push({ path: 'src/server.ts', content: tpl.serverTs(config) });
|
|
61
|
+
// ── Tools ────────────────────────────────────────────
|
|
62
|
+
files.push({ path: 'src/tools/system/health.ts', content: tpl.healthToolTs() });
|
|
63
|
+
files.push({ path: 'src/tools/system/echo.ts', content: tpl.echoToolTs() });
|
|
64
|
+
// ── Presenter ────────────────────────────────────────
|
|
65
|
+
files.push({ path: 'src/presenters/SystemPresenter.ts', content: tpl.systemPresenterTs() });
|
|
66
|
+
// ── Prompts ──────────────────────────────────────────
|
|
67
|
+
files.push({ path: 'src/prompts/greet.ts', content: tpl.greetPromptTs() });
|
|
68
|
+
// ── Middleware ────────────────────────────────────────
|
|
69
|
+
if (config.vector !== 'oauth') {
|
|
70
|
+
files.push({ path: 'src/middleware/auth.ts', content: tpl.authMiddlewareTs() });
|
|
71
|
+
}
|
|
72
|
+
// ── Testing ──────────────────────────────────────────
|
|
73
|
+
if (config.testing) {
|
|
74
|
+
files.push({ path: 'tests/setup.ts', content: tpl.testSetupTs() });
|
|
75
|
+
files.push({ path: 'tests/system.test.ts', content: tpl.systemTestTs() });
|
|
76
|
+
}
|
|
77
|
+
// ── Vector-specific files ────────────────────────────
|
|
78
|
+
addVectorFiles(files, config);
|
|
79
|
+
return files;
|
|
80
|
+
}
|
|
81
|
+
// ── Vector-Specific Files ────────────────────────────────
|
|
82
|
+
function addVectorFiles(files, config) {
|
|
83
|
+
switch (config.vector) {
|
|
84
|
+
case 'prisma':
|
|
85
|
+
files.push({ path: 'prisma/schema.prisma', content: tpl.prismaSchema() });
|
|
86
|
+
files.push({ path: 'src/tools/db/users.ts', content: tpl.dbUsersToolTs() });
|
|
87
|
+
break;
|
|
88
|
+
case 'n8n':
|
|
89
|
+
files.push({ path: 'src/n8n.ts', content: tpl.n8nConnectorTs() });
|
|
90
|
+
break;
|
|
91
|
+
case 'openapi':
|
|
92
|
+
files.push({ path: 'openapi.yaml', content: tpl.openapiYaml(config) });
|
|
93
|
+
files.push({ path: 'SETUP.md', content: tpl.openapiSetupMd() });
|
|
94
|
+
break;
|
|
95
|
+
case 'oauth':
|
|
96
|
+
files.push({ path: 'src/auth.ts', content: tpl.oauthSetupTs(config) });
|
|
97
|
+
files.push({ path: 'src/middleware/auth.ts', content: tpl.oauthMiddlewareTs() });
|
|
98
|
+
break;
|
|
99
|
+
case 'vanilla':
|
|
100
|
+
default:
|
|
101
|
+
// No extra files for vanilla (autoDiscover handles everything)
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=scaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../src/cli/scaffold.ts"],"names":[],"mappings":"A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.json, tsconfig, etc.)
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import type { ProjectConfig } from '../types.js';
|
|
6
|
+
/** Generate `package.json` with vector-specific deps */
|
|
7
|
+
export declare function packageJson(config: ProjectConfig): string;
|
|
8
|
+
/** Generate `tsconfig.json` */
|
|
9
|
+
export declare function tsconfig(): string;
|
|
10
|
+
/** Generate `.gitignore` */
|
|
11
|
+
export declare function gitignore(): string;
|
|
12
|
+
/** Generate `.env.example` with vector-specific vars */
|
|
13
|
+
export declare function envExample(config: ProjectConfig): string;
|
|
14
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CA+DzD;AAED,+BAA+B;AAC/B,wBAAgB,QAAQ,IAAI,MAAM,CAwBjC;AAED,4BAA4B;AAC5B,wBAAgB,SAAS,IAAI,MAAM,CAQlC;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAqCxD"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { CORE_VERSION, TESTING_VERSION, MCP_SDK_VERSION, ZOD_VERSION } from './constants.js';
|
|
2
|
+
/** Generate `package.json` with vector-specific deps */
|
|
3
|
+
export function packageJson(config) {
|
|
4
|
+
const deps = {
|
|
5
|
+
'@modelcontextprotocol/sdk': MCP_SDK_VERSION,
|
|
6
|
+
'vurb': CORE_VERSION,
|
|
7
|
+
'zod': ZOD_VERSION,
|
|
8
|
+
};
|
|
9
|
+
if (config.vector === 'prisma') {
|
|
10
|
+
deps['@prisma/client'] = '^6.0.0';
|
|
11
|
+
deps['@vurb/prisma-gen'] = '^1.0.0';
|
|
12
|
+
}
|
|
13
|
+
if (config.vector === 'n8n') {
|
|
14
|
+
deps['@vurb/n8n'] = '^1.0.0';
|
|
15
|
+
}
|
|
16
|
+
if (config.vector === 'openapi') {
|
|
17
|
+
deps['@vurb/openapi-gen'] = '^1.0.0';
|
|
18
|
+
}
|
|
19
|
+
if (config.vector === 'oauth') {
|
|
20
|
+
deps['@vurb/oauth'] = '^1.0.0';
|
|
21
|
+
}
|
|
22
|
+
const devDeps = {
|
|
23
|
+
'tsx': '^4.19.0',
|
|
24
|
+
'typescript': '^5.7.3',
|
|
25
|
+
'@types/node': '^22.0.0',
|
|
26
|
+
};
|
|
27
|
+
if (config.vector === 'prisma') {
|
|
28
|
+
devDeps['prisma'] = '^6.0.0';
|
|
29
|
+
}
|
|
30
|
+
if (config.testing) {
|
|
31
|
+
devDeps['vitest'] = '^3.0.5';
|
|
32
|
+
devDeps['@vurb/testing'] = TESTING_VERSION;
|
|
33
|
+
}
|
|
34
|
+
const scripts = {
|
|
35
|
+
'dev': 'vurb dev',
|
|
36
|
+
'start': 'vurb dev',
|
|
37
|
+
'build': 'tsc',
|
|
38
|
+
'typecheck': 'tsc --noEmit',
|
|
39
|
+
};
|
|
40
|
+
if (config.testing) {
|
|
41
|
+
scripts['test'] = 'vitest run';
|
|
42
|
+
scripts['test:watch'] = 'vitest';
|
|
43
|
+
}
|
|
44
|
+
if (config.vector === 'prisma') {
|
|
45
|
+
scripts['db:generate'] = 'prisma generate';
|
|
46
|
+
scripts['db:push'] = 'prisma db push';
|
|
47
|
+
}
|
|
48
|
+
const pkg = {
|
|
49
|
+
name: config.name,
|
|
50
|
+
version: '0.1.0',
|
|
51
|
+
private: true,
|
|
52
|
+
type: 'module',
|
|
53
|
+
scripts,
|
|
54
|
+
dependencies: deps,
|
|
55
|
+
devDependencies: devDeps,
|
|
56
|
+
engines: { node: '>=18.0.0' },
|
|
57
|
+
};
|
|
58
|
+
return JSON.stringify(pkg, null, 4) + '\n';
|
|
59
|
+
}
|
|
60
|
+
/** Generate `tsconfig.json` */
|
|
61
|
+
export function tsconfig() {
|
|
62
|
+
return JSON.stringify({
|
|
63
|
+
compilerOptions: {
|
|
64
|
+
target: 'es2022',
|
|
65
|
+
module: 'Node16',
|
|
66
|
+
moduleResolution: 'Node16',
|
|
67
|
+
declaration: true,
|
|
68
|
+
sourceMap: true,
|
|
69
|
+
strict: true,
|
|
70
|
+
noUncheckedIndexedAccess: true,
|
|
71
|
+
noFallthroughCasesInSwitch: true,
|
|
72
|
+
exactOptionalPropertyTypes: true,
|
|
73
|
+
noImplicitOverride: true,
|
|
74
|
+
noPropertyAccessFromIndexSignature: true,
|
|
75
|
+
verbatimModuleSyntax: true,
|
|
76
|
+
forceConsistentCasingInFileNames: true,
|
|
77
|
+
resolveJsonModule: true,
|
|
78
|
+
skipLibCheck: true,
|
|
79
|
+
rootDir: './src',
|
|
80
|
+
outDir: './dist',
|
|
81
|
+
},
|
|
82
|
+
include: ['src/**/*'],
|
|
83
|
+
exclude: ['node_modules', 'dist', 'tests'],
|
|
84
|
+
}, null, 4) + '\n';
|
|
85
|
+
}
|
|
86
|
+
/** Generate `.gitignore` */
|
|
87
|
+
export function gitignore() {
|
|
88
|
+
return `node_modules/
|
|
89
|
+
dist/
|
|
90
|
+
*.tsbuildinfo
|
|
91
|
+
.env
|
|
92
|
+
.env.local
|
|
93
|
+
coverage/
|
|
94
|
+
`;
|
|
95
|
+
}
|
|
96
|
+
/** Generate `.env.example` with vector-specific vars */
|
|
97
|
+
export function envExample(config) {
|
|
98
|
+
let env = `# ── Vurb Server Environment ─────────────────────
|
|
99
|
+
# Copy this to .env and fill in your values.
|
|
100
|
+
|
|
101
|
+
# Server
|
|
102
|
+
NODE_ENV=development
|
|
103
|
+
`;
|
|
104
|
+
if (config.vector === 'prisma') {
|
|
105
|
+
env += `
|
|
106
|
+
# Database (Prisma)
|
|
107
|
+
DATABASE_URL="postgresql://user:password@localhost:5432/mydb?schema=public"
|
|
108
|
+
`;
|
|
109
|
+
}
|
|
110
|
+
if (config.vector === 'n8n') {
|
|
111
|
+
env += `
|
|
112
|
+
# n8n Workflow Automation
|
|
113
|
+
N8N_BASE_URL=http://localhost:5678
|
|
114
|
+
N8N_API_KEY=your-api-key-here
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
if (config.vector === 'oauth') {
|
|
118
|
+
env += `
|
|
119
|
+
# OAuth Device Flow (RFC 8628)
|
|
120
|
+
OAUTH_CLIENT_ID=your-client-id
|
|
121
|
+
OAUTH_AUTH_ENDPOINT=https://api.example.com/oauth/device/code
|
|
122
|
+
OAUTH_TOKEN_ENDPOINT=https://api.example.com/oauth/device/token
|
|
123
|
+
`;
|
|
124
|
+
}
|
|
125
|
+
if (config.transport === 'sse') {
|
|
126
|
+
env += `
|
|
127
|
+
# Streamable HTTP Transport
|
|
128
|
+
PORT=3001
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
return env;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/cli/templates/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7F,wDAAwD;AACxD,MAAM,UAAU,WAAW,CAAC,MAAqB;IAC7C,MAAM,IAAI,GAA2B;QACjC,2BAA2B,EAAE,eAAe;QAC5C,MAAM,EAAE,YAAY;QACpB,KAAK,EAAE,WAAW;KACrB,CAAC;IAEF,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC;QAClC,IAAI,CAAC,kBAAkB,CAAC,GAAG,QAAQ,CAAC;IACxC,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;QAC1B,IAAI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AAC,MAAM,KAAK,KAAK,EAAE,CAAC;QAC1B,GAAG,IAAI;;;;CAId,CAAC;IACE,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC5B,GAAG,IAAI;;;;;CAKd,CAAC;IACE,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;QAC7B,GAAG,IAAI;;;CAGd,CAAC;IACE,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Constants — Version pins for generated package.json
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
export declare const CORE_VERSION = "^2.12.0";
|
|
6
|
+
export declare const TESTING_VERSION = "^1.0.0";
|
|
7
|
+
export declare const MCP_SDK_VERSION = "^1.12.1";
|
|
8
|
+
export declare const ZOD_VERSION = "^3.25.1";
|
|
9
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,WAAW,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Constants — Version pins for generated package.json
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
export const CORE_VERSION = '^2.12.0';
|
|
6
|
+
export const TESTING_VERSION = '^1.0.0';
|
|
7
|
+
export const MCP_SDK_VERSION = '^1.12.1';
|
|
8
|
+
export const ZOD_VERSION = '^3.25.1';
|
|
9
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/cli/templates/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Templates — vurb.ts, context.ts, server.ts
|
|
3
|
+
*
|
|
4
|
+
* The architectural spine of every scaffolded project.
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import type { ProjectConfig } from '../types.js';
|
|
8
|
+
/** Generate `src/vurb.ts` — The one-file context center */
|
|
9
|
+
export declare function vurbTs(): string;
|
|
10
|
+
/** Generate `src/context.ts` — Application context type + factory */
|
|
11
|
+
export declare function contextTs(): string;
|
|
12
|
+
/** Generate `src/server.ts` — Bootstrap with autoDiscover + transport */
|
|
13
|
+
export declare function serverTs(config: ProjectConfig): string;
|
|
14
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,2DAA2D;AAC3D,wBAAgB,MAAM,IAAI,MAAM,CAa/B;AAED,qEAAqE;AACrE,wBAAgB,SAAS,IAAI,MAAM,CA8BlC;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAyItD"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/** Generate `src/vurb.ts` — The one-file context center */
|
|
2
|
+
export function vurbTs() {
|
|
3
|
+
return `/**
|
|
4
|
+
* Vurb Instance — Context Initialization
|
|
5
|
+
*
|
|
6
|
+
* Define your context type ONCE. Every f.query(), f.mutation(),
|
|
7
|
+
* f.presenter(), f.prompt(), and f.middleware() call inherits
|
|
8
|
+
* AppContext — zero generic repetition anywhere in the codebase.
|
|
9
|
+
*/
|
|
10
|
+
import { initVurb } from 'vurb';
|
|
11
|
+
import type { AppContext } from './context.js';
|
|
12
|
+
|
|
13
|
+
export const f = initVurb<AppContext>();
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
/** Generate `src/context.ts` — Application context type + factory */
|
|
17
|
+
export function contextTs() {
|
|
18
|
+
return `/**
|
|
19
|
+
* Application Context — Shared State for Every Tool Handler
|
|
20
|
+
*
|
|
21
|
+
* Every f.query() / f.mutation() handler receives (input, ctx)
|
|
22
|
+
* where ctx is this AppContext. Extend it with your own services
|
|
23
|
+
* (DB client, auth, external APIs, etc.)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export interface AppContext {
|
|
27
|
+
/** Current user role for RBAC checks */
|
|
28
|
+
role: 'ADMIN' | 'USER' | 'GUEST';
|
|
29
|
+
|
|
30
|
+
/** Tenant identifier (multi-tenancy) */
|
|
31
|
+
tenantId: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Create the application context for each tool invocation.
|
|
36
|
+
*
|
|
37
|
+
* In production, hydrate this from the MCP session metadata,
|
|
38
|
+
* JWT tokens, or environment variables.
|
|
39
|
+
*/
|
|
40
|
+
export function createContext(): AppContext {
|
|
41
|
+
return {
|
|
42
|
+
role: 'ADMIN',
|
|
43
|
+
tenantId: 'default',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
/** Generate `src/server.ts` — Bootstrap with autoDiscover + transport */
|
|
49
|
+
export function serverTs(config) {
|
|
50
|
+
if (config.transport === 'stdio') {
|
|
51
|
+
// Simplified: one-liner bootstrap via startServer()
|
|
52
|
+
return `/**
|
|
53
|
+
* Server Bootstrap — Vurb
|
|
54
|
+
*
|
|
55
|
+
* Tools are auto-discovered from src/tools/.
|
|
56
|
+
* Drop a file, it becomes a tool.
|
|
57
|
+
*/
|
|
58
|
+
import { fileURLToPath } from 'node:url';
|
|
59
|
+
import { autoDiscover, PromptRegistry, startServer } from 'vurb';
|
|
60
|
+
import { createContext } from './context.js';
|
|
61
|
+
import { f } from './vurb.js';
|
|
62
|
+
import { GreetPrompt } from './prompts/greet.js';
|
|
63
|
+
|
|
64
|
+
// ── Registry ─────────────────────────────────────────────
|
|
65
|
+
const registry = f.registry();
|
|
66
|
+
const prompts = new PromptRegistry();
|
|
67
|
+
|
|
68
|
+
// ── Auto-Discover & Register ─────────────────────────────
|
|
69
|
+
await autoDiscover(registry, fileURLToPath(new URL('./tools', import.meta.url)));
|
|
70
|
+
prompts.register(GreetPrompt);
|
|
71
|
+
|
|
72
|
+
// ── Start ────────────────────────────────────────────────
|
|
73
|
+
await startServer({
|
|
74
|
+
name: '${config.name}',
|
|
75
|
+
registry,
|
|
76
|
+
prompts,
|
|
77
|
+
contextFactory: () => createContext(),
|
|
78
|
+
});
|
|
79
|
+
`;
|
|
80
|
+
}
|
|
81
|
+
// Streamable HTTP transport — manual setup required (startServer is stdio-only)
|
|
82
|
+
return `/**
|
|
83
|
+
* Server Bootstrap — Vurb with Streamable HTTP Transport
|
|
84
|
+
*
|
|
85
|
+
* Tools are auto-discovered from src/tools/.
|
|
86
|
+
* Drop a file, it becomes a tool.
|
|
87
|
+
*/
|
|
88
|
+
import { fileURLToPath } from 'node:url';
|
|
89
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
90
|
+
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
91
|
+
import { createServer } from 'node:http';
|
|
92
|
+
import { autoDiscover, PromptRegistry } from 'vurb';
|
|
93
|
+
import { createContext } from './context.js';
|
|
94
|
+
import { f } from './vurb.js';
|
|
95
|
+
import { GreetPrompt } from './prompts/greet.js';
|
|
96
|
+
|
|
97
|
+
// ── Registry ─────────────────────────────────────────────
|
|
98
|
+
const registry = f.registry();
|
|
99
|
+
const prompts = new PromptRegistry();
|
|
100
|
+
|
|
101
|
+
// ── Auto-Discover & Register ─────────────────────────────
|
|
102
|
+
await autoDiscover(registry, fileURLToPath(new URL('./tools', import.meta.url)));
|
|
103
|
+
prompts.register(GreetPrompt);
|
|
104
|
+
|
|
105
|
+
// ── Server ───────────────────────────────────────────────
|
|
106
|
+
const server = new McpServer(
|
|
107
|
+
{ name: '${config.name}', version: '0.1.0' },
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
registry.attachToServer(server, {
|
|
111
|
+
contextFactory: () => createContext(),
|
|
112
|
+
prompts,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// ── Transport ────────────────────────────────────────────
|
|
116
|
+
const PORT = Number(process.env['PORT'] ?? 3001);
|
|
117
|
+
const sessions = new Map<string, StreamableHTTPServerTransport>();
|
|
118
|
+
|
|
119
|
+
const httpServer = createServer(async (req, res) => {
|
|
120
|
+
try {
|
|
121
|
+
const url = new URL(req.url ?? '/', \`http://localhost:\${PORT}\`);
|
|
122
|
+
|
|
123
|
+
if (url.pathname !== '/mcp') {
|
|
124
|
+
res.writeHead(404).end();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (req.method === 'POST') {
|
|
129
|
+
// Parse JSON body
|
|
130
|
+
const chunks: Buffer[] = [];
|
|
131
|
+
for await (const chunk of req) chunks.push(chunk as Buffer);
|
|
132
|
+
const body = JSON.parse(Buffer.concat(chunks).toString());
|
|
133
|
+
|
|
134
|
+
const sessionId = req.headers['mcp-session-id'] as string | undefined;
|
|
135
|
+
|
|
136
|
+
// Existing session — route to its transport
|
|
137
|
+
if (sessionId && sessions.has(sessionId)) {
|
|
138
|
+
const transport = sessions.get(sessionId)!;
|
|
139
|
+
await transport.handleRequest(req, res, body);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// New session — create transport
|
|
144
|
+
const transport = new StreamableHTTPServerTransport({
|
|
145
|
+
sessionIdGenerator: () => crypto.randomUUID(),
|
|
146
|
+
onsessioninitialized: (id) => {
|
|
147
|
+
sessions.set(id, transport);
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
transport.onclose = () => {
|
|
151
|
+
const id = [...sessions.entries()].find(([, t]) => t === transport)?.[0];
|
|
152
|
+
if (id) sessions.delete(id);
|
|
153
|
+
};
|
|
154
|
+
await server.connect(transport);
|
|
155
|
+
await transport.handleRequest(req, res, body);
|
|
156
|
+
} else if (req.method === 'GET') {
|
|
157
|
+
const sessionId = req.headers['mcp-session-id'] as string | undefined;
|
|
158
|
+
if (sessionId && sessions.has(sessionId)) {
|
|
159
|
+
const transport = sessions.get(sessionId)!;
|
|
160
|
+
await transport.handleRequest(req, res);
|
|
161
|
+
} else {
|
|
162
|
+
res.writeHead(400).end('Missing or invalid session');
|
|
163
|
+
}
|
|
164
|
+
} else if (req.method === 'DELETE') {
|
|
165
|
+
const sessionId = req.headers['mcp-session-id'] as string | undefined;
|
|
166
|
+
if (sessionId && sessions.has(sessionId)) {
|
|
167
|
+
const transport = sessions.get(sessionId)!;
|
|
168
|
+
await transport.handleRequest(req, res);
|
|
169
|
+
} else {
|
|
170
|
+
res.writeHead(400).end('Missing or invalid session');
|
|
171
|
+
}
|
|
172
|
+
} else {
|
|
173
|
+
res.writeHead(405).end();
|
|
174
|
+
}
|
|
175
|
+
} catch (err) {
|
|
176
|
+
console.error('[Vurb] Unhandled error in HTTP handler:', err);
|
|
177
|
+
if (!res.headersSent) res.writeHead(500).end();
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
httpServer.listen(PORT, () => {
|
|
182
|
+
console.error(\`⚡ Vurb server on http://localhost:\${PORT}/mcp\`);
|
|
183
|
+
});
|
|
184
|
+
`;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/cli/templates/core.ts"],"names":[],"mappings":"AAQA,2DAA2D;AAC3D,MAAM,UAAU,MAAM;IAClB,OAAO;;;;;;;;;;;CAWV,CAAC;AACF,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,SAAS;IACrB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BV,CAAC;AACF,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,QAAQ,CAAC,MAAqB;IAC1C,IAAI,MAAM,CAAC,SAAS,KAAK,OAAO,EAAE,CAAC;QAC/B,oDAAoD;QACpD,OAAO;;;;;;;;;;;;;;;;;;;;;;aAsBF,MAAM,CAAC,IAAI;;;;;CAKvB,CAAC;IACE,CAAC;IAED,gFAAgF;IAChF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;eAyBI,MAAM,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EzB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Template — Zero-click `.cursor/mcp.json` generation
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import type { ProjectConfig } from '../types.js';
|
|
6
|
+
/** Generate `.cursor/mcp.json` — Auto-detected by Cursor Editor */
|
|
7
|
+
export declare function cursorMcpJson(config: ProjectConfig): string;
|
|
8
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/cursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAY3D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Generate `.cursor/mcp.json` — Auto-detected by Cursor Editor */
|
|
2
|
+
export function cursorMcpJson(config) {
|
|
3
|
+
const serverEntry = config.transport === 'sse'
|
|
4
|
+
? { url: 'http://localhost:3001/mcp' }
|
|
5
|
+
: { command: 'npx', args: ['tsx', 'src/server.ts'] };
|
|
6
|
+
const serverConfig = {
|
|
7
|
+
mcpServers: {
|
|
8
|
+
[config.name]: serverEntry,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
return JSON.stringify(serverConfig, null, 2) + '\n';
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../../src/cli/templates/cursor.ts"],"names":[],"mappings":"AAMA,mEAAmE;AACnE,MAAM,UAAU,aAAa,CAAC,MAAqB;IAC/C,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,KAAK,KAAK;QAC1C,CAAC,CAAC,EAAE,GAAG,EAAE,2BAA2B,EAAE;QACtC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,EAAE,CAAC;IAEzD,MAAM,YAAY,GAAG;QACjB,UAAU,EAAE;YACR,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW;SAC7B;KACJ,CAAC;IAEF,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AACxD,CAAC"}
|