@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,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Templates — Barrel Export
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all template generators from their focused modules.
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
export { packageJson, tsconfig, gitignore, envExample } from './config.js';
|
|
8
|
+
export { vurbTs, contextTs, serverTs } from './core.js';
|
|
9
|
+
export { healthToolTs, echoToolTs } from './tools.js';
|
|
10
|
+
export { systemPresenterTs } from './presenter.js';
|
|
11
|
+
export { greetPromptTs } from './prompt.js';
|
|
12
|
+
export { authMiddlewareTs } from './middleware.js';
|
|
13
|
+
export { vitestConfig, testSetupTs, systemTestTs } from './testing.js';
|
|
14
|
+
export { readme } from './readme.js';
|
|
15
|
+
export { cursorMcpJson } from './cursor.js';
|
|
16
|
+
export { prismaSchema, dbUsersToolTs, n8nConnectorTs, openapiYaml, openapiSetupMd, oauthSetupTs, oauthMiddlewareTs } from './vectors/index.js';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG3E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGvE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Templates — Barrel Export
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all template generators from their focused modules.
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
// Config (package.json, tsconfig, etc.)
|
|
8
|
+
export { packageJson, tsconfig, gitignore, envExample } from './config.js';
|
|
9
|
+
// Core source (vurb.ts, context.ts, server.ts)
|
|
10
|
+
export { vurbTs, contextTs, serverTs } from './core.js';
|
|
11
|
+
// Tools
|
|
12
|
+
export { healthToolTs, echoToolTs } from './tools.js';
|
|
13
|
+
// Presenter
|
|
14
|
+
export { systemPresenterTs } from './presenter.js';
|
|
15
|
+
// Prompt
|
|
16
|
+
export { greetPromptTs } from './prompt.js';
|
|
17
|
+
// Middleware
|
|
18
|
+
export { authMiddlewareTs } from './middleware.js';
|
|
19
|
+
// Testing
|
|
20
|
+
export { vitestConfig, testSetupTs, systemTestTs } from './testing.js';
|
|
21
|
+
// README
|
|
22
|
+
export { readme } from './readme.js';
|
|
23
|
+
// Cursor integration
|
|
24
|
+
export { cursorMcpJson } from './cursor.js';
|
|
25
|
+
// Vector-specific
|
|
26
|
+
export { prismaSchema, dbUsersToolTs, n8nConnectorTs, openapiYaml, openapiSetupMd, oauthSetupTs, oauthMiddlewareTs } from './vectors/index.js';
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wCAAwC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3E,+CAA+C;AAC/C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,QAAQ;AACR,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEtD,YAAY;AACZ,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,SAAS;AACT,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,aAAa;AACb,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,UAAU;AACV,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEvE,SAAS;AACT,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,qBAAqB;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,kBAAkB;AAClB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/middleware.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,0DAA0D;AAC1D,wBAAgB,gBAAgB,IAAI,MAAM,CA2BzC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Middleware Template — RBAC guard example (Fluent API)
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
/** Generate `src/middleware/auth.ts` — RBAC middleware */
|
|
6
|
+
export function authMiddlewareTs() {
|
|
7
|
+
return `/**
|
|
8
|
+
* Auth Middleware — RBAC Guard (Fluent API)
|
|
9
|
+
*
|
|
10
|
+
* Demonstrates f.middleware() — tRPC-style context derivation.
|
|
11
|
+
* Rejects GUEST requests with a structured error.
|
|
12
|
+
*
|
|
13
|
+
* Usage in tools:
|
|
14
|
+
* f.query('users.list')
|
|
15
|
+
* .use(withAuth)
|
|
16
|
+
* .handle(async (input, ctx) => {
|
|
17
|
+
* // ctx now has ctx.role guaranteed non-GUEST
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* In production, replace with JWT validation,
|
|
21
|
+
* API key checks, or OAuth token verification.
|
|
22
|
+
*/
|
|
23
|
+
import { f } from '../vurb.js';
|
|
24
|
+
import { error } from 'vurb';
|
|
25
|
+
|
|
26
|
+
export const withAuth = f.middleware(async (ctx) => {
|
|
27
|
+
if (ctx.role === 'GUEST') {
|
|
28
|
+
throw error('Access denied. Authentication required.');
|
|
29
|
+
}
|
|
30
|
+
return { verified: true as const };
|
|
31
|
+
});
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../src/cli/templates/middleware.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,0DAA0D;AAC1D,MAAM,UAAU,gBAAgB;IAC5B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;CAyBV,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presenter.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/presenter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mDAAmD;AACnD,wBAAgB,iBAAiB,IAAI,MAAM,CAuC1C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presenter Template — MVA View Layer (Egress Firewall)
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
/** Generate `src/presenters/SystemPresenter.ts` */
|
|
6
|
+
export function systemPresenterTs() {
|
|
7
|
+
return [
|
|
8
|
+
'/**',
|
|
9
|
+
' * System Presenter — MVA View Layer (Egress Firewall)',
|
|
10
|
+
' *',
|
|
11
|
+
' * Defines how the Agent perceives system health data.',
|
|
12
|
+
' * The Zod schema acts as a field whitelist — undeclared',
|
|
13
|
+
' * fields are physically stripped in RAM before they',
|
|
14
|
+
' * reach the LLM context window.',
|
|
15
|
+
' *',
|
|
16
|
+
' * Features demonstrated:',
|
|
17
|
+
' * - definePresenter() with Zod schema',
|
|
18
|
+
' * - .describe() auto-rules (JIT — travel with data, not in global prompt)',
|
|
19
|
+
' * - ui.markdown() server-rendered UI blocks',
|
|
20
|
+
' * - suggestActions() for HATEOAS-style affordances',
|
|
21
|
+
' */',
|
|
22
|
+
"import { definePresenter, ui } from 'vurb';",
|
|
23
|
+
"import { z } from 'zod';",
|
|
24
|
+
'',
|
|
25
|
+
'export const SystemPresenter = definePresenter({',
|
|
26
|
+
" name: 'SystemHealth',",
|
|
27
|
+
' schema: z.object({',
|
|
28
|
+
" status: z.string().describe('Server operational status'),",
|
|
29
|
+
" uptime: z.number().describe('Uptime in seconds since process start'),",
|
|
30
|
+
" version: z.string().describe('Server version string'),",
|
|
31
|
+
" timestamp: z.string().describe('ISO 8601 timestamp of this check'),",
|
|
32
|
+
' }),',
|
|
33
|
+
' // autoRules: true (default) — .describe() annotations become system rules',
|
|
34
|
+
' ui: (data) => [',
|
|
35
|
+
' ui.markdown(',
|
|
36
|
+
' `\uD83D\uDFE2 **${data.status}** | \u23F1 ${Math.floor(data.uptime)}s | v${data.version}`',
|
|
37
|
+
' ),',
|
|
38
|
+
' ],',
|
|
39
|
+
" suggestActions: (data) => data.status !== 'healthy'",
|
|
40
|
+
" ? [{ tool: 'system.health', reason: 'Re-check after issue resolution' }]",
|
|
41
|
+
' : [],',
|
|
42
|
+
'});',
|
|
43
|
+
'',
|
|
44
|
+
].join('\n');
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=presenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presenter.js","sourceRoot":"","sources":["../../../src/cli/templates/presenter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mDAAmD;AACnD,MAAM,UAAU,iBAAiB;IAC7B,OAAO;QACH,KAAK;QACL,wDAAwD;QACxD,IAAI;QACJ,wDAAwD;QACxD,0DAA0D;QAC1D,sDAAsD;QACtD,kCAAkC;QAClC,IAAI;QACJ,2BAA2B;QAC3B,wCAAwC;QACxC,4EAA4E;QAC5E,8CAA8C;QAC9C,qDAAqD;QACrD,KAAK;QACL,6CAA6C;QAC7C,0BAA0B;QAC1B,EAAE;QACF,kDAAkD;QAClD,2BAA2B;QAC3B,wBAAwB;QACxB,mEAAmE;QACnE,+EAA+E;QAC/E,gEAAgE;QAChE,6EAA6E;QAC7E,SAAS;QACT,gFAAgF;QAChF,qBAAqB;QACrB,sBAAsB;QACtB,uGAAuG;QACvG,YAAY;QACZ,QAAQ;QACR,yDAAyD;QACzD,kFAAkF;QAClF,eAAe;QACf,KAAK;QACL,EAAE;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8DAA8D;AAC9D,wBAAgB,aAAa,IAAI,MAAM,CAmCtC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt Template — MCP Prompt Engine example
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
/** Generate `src/prompts/greet.ts` — Prompt Engine example */
|
|
6
|
+
export function greetPromptTs() {
|
|
7
|
+
return [
|
|
8
|
+
'/**',
|
|
9
|
+
' * Greet Prompt — Prompt Engine Example',
|
|
10
|
+
' *',
|
|
11
|
+
' * Demonstrates:',
|
|
12
|
+
' * - f.prompt() with automatic context typing',
|
|
13
|
+
' * - JSON descriptors for args (no Zod needed)',
|
|
14
|
+
' * - PromptMessage.system() + PromptMessage.user()',
|
|
15
|
+
' * - MCP prompts/list + prompts/get',
|
|
16
|
+
' */',
|
|
17
|
+
"import { f } from '../vurb.js';",
|
|
18
|
+
"import { PromptMessage } from 'vurb';",
|
|
19
|
+
'',
|
|
20
|
+
"export const GreetPrompt = f.prompt('greet', {",
|
|
21
|
+
" description: 'Generate a personalized greeting for a user',",
|
|
22
|
+
' args: {',
|
|
23
|
+
" name: { type: 'string', description: 'Name of the person to greet' },",
|
|
24
|
+
' style: {',
|
|
25
|
+
" enum: ['formal', 'casual', 'pirate'] as const,",
|
|
26
|
+
" description: 'Greeting style',",
|
|
27
|
+
' },',
|
|
28
|
+
' } as const,',
|
|
29
|
+
' handler: async (_ctx, { name, style }) => ({',
|
|
30
|
+
' messages: [',
|
|
31
|
+
' PromptMessage.system(',
|
|
32
|
+
' `You are a friendly assistant. Greet the user in a ${style} style. ` +',
|
|
33
|
+
' `Be creative and enthusiastic.`',
|
|
34
|
+
' ),',
|
|
35
|
+
' PromptMessage.user(`Please greet ${name}.`),',
|
|
36
|
+
' ],',
|
|
37
|
+
' }),',
|
|
38
|
+
'});',
|
|
39
|
+
'',
|
|
40
|
+
].join('\n');
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/cli/templates/prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8DAA8D;AAC9D,MAAM,UAAU,aAAa;IACzB,OAAO;QACH,KAAK;QACL,yCAAyC;QACzC,IAAI;QACJ,kBAAkB;QAClB,+CAA+C;QAC/C,gDAAgD;QAChD,oDAAoD;QACpD,qCAAqC;QACrC,KAAK;QACL,iCAAiC;QACjC,uCAAuC;QACvC,EAAE;QACF,gDAAgD;QAChD,iEAAiE;QACjE,aAAa;QACb,+EAA+E;QAC/E,kBAAkB;QAClB,4DAA4D;QAC5D,4CAA4C;QAC5C,YAAY;QACZ,iBAAiB;QACjB,kDAAkD;QAClD,qBAAqB;QACrB,mCAAmC;QACnC,wFAAwF;QACxF,iDAAiD;QACjD,gBAAgB;QAChB,0DAA0D;QAC1D,YAAY;QACZ,SAAS;QACT,KAAK;QACL,EAAE;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* README Template — Quick-start guide with client config snippets
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
import type { ProjectConfig } from '../types.js';
|
|
6
|
+
/** Generate `README.md` with Claude/Cursor config snippets */
|
|
7
|
+
export declare function readme(config: ProjectConfig): string;
|
|
8
|
+
//# sourceMappingURL=readme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readme.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/readme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,8DAA8D;AAC9D,wBAAgB,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CA4FpD"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/** Generate `README.md` with Claude/Cursor config snippets */
|
|
2
|
+
export function readme(config) {
|
|
3
|
+
const clientEntry = config.transport === 'sse'
|
|
4
|
+
? { url: 'http://localhost:3001/mcp' }
|
|
5
|
+
: { command: 'npx', args: ['tsx', 'src/server.ts'] };
|
|
6
|
+
const clientConfig = JSON.stringify({
|
|
7
|
+
mcpServers: {
|
|
8
|
+
[config.name]: clientEntry,
|
|
9
|
+
},
|
|
10
|
+
}, null, 2);
|
|
11
|
+
const sseNote = config.transport === 'sse'
|
|
12
|
+
? `\n> **Note:** Streamable HTTP transport requires the server to be running first. Run \\\`npm start\\\` before connecting.`
|
|
13
|
+
: '';
|
|
14
|
+
return `# ${config.name}
|
|
15
|
+
|
|
16
|
+
MCP Server built with [Vurb](https://vurb.vinkius.com/) — the MVA framework for the Model Context Protocol.
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
\`\`\`bash
|
|
21
|
+
npm install
|
|
22
|
+
vurb dev
|
|
23
|
+
\`\`\`
|
|
24
|
+
${config.testing ? `
|
|
25
|
+
## Testing
|
|
26
|
+
|
|
27
|
+
\`\`\`bash
|
|
28
|
+
npm test
|
|
29
|
+
\`\`\`
|
|
30
|
+
` : ''}
|
|
31
|
+
## Project Structure
|
|
32
|
+
|
|
33
|
+
\`\`\`
|
|
34
|
+
src/
|
|
35
|
+
├── vurb.ts # initVurb<AppContext>() — context center
|
|
36
|
+
├── context.ts # AppContext type + factory
|
|
37
|
+
├── server.ts # Bootstrap with autoDiscover
|
|
38
|
+
├── tools/ # Drop a file → it's a tool (autoDiscover)
|
|
39
|
+
│ └── system/
|
|
40
|
+
│ ├── health.ts # Health check with Presenter
|
|
41
|
+
│ └── echo.ts # Echo for connectivity testing
|
|
42
|
+
├── presenters/ # MVA View Layer (Egress Firewall)
|
|
43
|
+
│ └── SystemPresenter.ts
|
|
44
|
+
├── prompts/ # MCP Prompt Engine
|
|
45
|
+
│ └── greet.ts
|
|
46
|
+
└── middleware/ # RBAC guards
|
|
47
|
+
└── auth.ts
|
|
48
|
+
\`\`\`
|
|
49
|
+
|
|
50
|
+
## Client Configuration
|
|
51
|
+
|
|
52
|
+
### Cursor Editor
|
|
53
|
+
|
|
54
|
+
> **Already configured!** The \`.cursor/mcp.json\` file was generated automatically.
|
|
55
|
+
> Just open this folder in Cursor and the server connects instantly.
|
|
56
|
+
${sseNote}
|
|
57
|
+
|
|
58
|
+
### Claude Desktop
|
|
59
|
+
|
|
60
|
+
Add to your \`claude_desktop_config.json\`:
|
|
61
|
+
|
|
62
|
+
\`\`\`json
|
|
63
|
+
${clientConfig}
|
|
64
|
+
\`\`\`
|
|
65
|
+
${vectorReadmeSection(config)}
|
|
66
|
+
## Adding New Tools
|
|
67
|
+
|
|
68
|
+
Create a new file in \`src/tools/\`. It's automatically discovered:
|
|
69
|
+
|
|
70
|
+
\`\`\`typescript
|
|
71
|
+
// src/tools/my-domain/my-tool.ts
|
|
72
|
+
import { f } from '../../vurb.js';
|
|
73
|
+
|
|
74
|
+
export default f.query('my_domain.my_tool')
|
|
75
|
+
.describe('What this tool does')
|
|
76
|
+
.withString('query', 'Search query')
|
|
77
|
+
.handle(async (input, ctx) => {
|
|
78
|
+
return { result: input.query };
|
|
79
|
+
});
|
|
80
|
+
\`\`\`
|
|
81
|
+
|
|
82
|
+
No registration needed. The \`autoDiscover()\` system picks it up automatically.
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
- [Vurb Docs](https://vurb.vinkius.com/)
|
|
87
|
+
- [Presenter — Egress Firewall](https://vurb.vinkius.com/presenter)
|
|
88
|
+
- [DX Guide — initVurb()](https://vurb.vinkius.com/dx-guide)
|
|
89
|
+
- [Testing](https://vurb.vinkius.com/testing)
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
/** Vector-specific README section */
|
|
93
|
+
function vectorReadmeSection(config) {
|
|
94
|
+
switch (config.vector) {
|
|
95
|
+
case 'prisma':
|
|
96
|
+
return `
|
|
97
|
+
## Database Setup (Prisma)
|
|
98
|
+
|
|
99
|
+
1. Configure your database URL in \`.env\`:
|
|
100
|
+
\`\`\`
|
|
101
|
+
DATABASE_URL="postgresql://user:password@localhost:5432/mydb"
|
|
102
|
+
\`\`\`
|
|
103
|
+
|
|
104
|
+
2. Edit \`prisma/schema.prisma\` to define your models
|
|
105
|
+
|
|
106
|
+
3. Generate the Prisma client and Vurb tools:
|
|
107
|
+
\`\`\`bash
|
|
108
|
+
npm run db:generate
|
|
109
|
+
\`\`\`
|
|
110
|
+
|
|
111
|
+
4. Push the schema to your database:
|
|
112
|
+
\`\`\`bash
|
|
113
|
+
npm run db:push
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
Use \`/// @vurb.hide\` on sensitive fields to strip them from the Egress Firewall.
|
|
117
|
+
`;
|
|
118
|
+
case 'n8n':
|
|
119
|
+
return `
|
|
120
|
+
## n8n Workflow Setup
|
|
121
|
+
|
|
122
|
+
1. Configure your n8n instance in \`.env\`:
|
|
123
|
+
\`\`\`
|
|
124
|
+
N8N_BASE_URL=http://localhost:5678
|
|
125
|
+
N8N_API_KEY=your-api-key
|
|
126
|
+
\`\`\`
|
|
127
|
+
|
|
128
|
+
2. The connector in \`src/n8n.ts\` auto-discovers webhook workflows
|
|
129
|
+
and registers them as MCP tools.
|
|
130
|
+
`;
|
|
131
|
+
case 'openapi':
|
|
132
|
+
return `
|
|
133
|
+
## OpenAPI Generator Setup
|
|
134
|
+
|
|
135
|
+
1. Replace \`openapi.yaml\` with your actual OpenAPI 3.x spec
|
|
136
|
+
|
|
137
|
+
2. Generate the MCP server from the spec:
|
|
138
|
+
\`\`\`bash
|
|
139
|
+
npx @vurb/openapi-gen ./openapi.yaml --outDir ./src/generated
|
|
140
|
+
\`\`\`
|
|
141
|
+
|
|
142
|
+
3. Import and register the generated tools in \`src/server.ts\`
|
|
143
|
+
`;
|
|
144
|
+
case 'oauth':
|
|
145
|
+
return `
|
|
146
|
+
## OAuth Device Flow Setup
|
|
147
|
+
|
|
148
|
+
1. Configure your OAuth provider in \`.env\`:
|
|
149
|
+
\`\`\`
|
|
150
|
+
OAUTH_CLIENT_ID=your-client-id
|
|
151
|
+
OAUTH_AUTH_ENDPOINT=https://api.example.com/oauth/device/code
|
|
152
|
+
OAUTH_TOKEN_ENDPOINT=https://api.example.com/oauth/device/token
|
|
153
|
+
\`\`\`
|
|
154
|
+
|
|
155
|
+
2. The auth tool in \`src/auth.ts\` is pre-configured with login, complete, status, and logout actions.
|
|
156
|
+
|
|
157
|
+
3. Protect any tool with the \`withAuth\` middleware from \`src/middleware/auth.ts\`:
|
|
158
|
+
\`\`\`ts
|
|
159
|
+
import { withAuth } from '../middleware/auth.js';
|
|
160
|
+
|
|
161
|
+
export default f.query('protected.action')
|
|
162
|
+
.describe('A protected query')
|
|
163
|
+
.use(withAuth)
|
|
164
|
+
.handle(async (input, ctx) => {
|
|
165
|
+
// ctx is authenticated
|
|
166
|
+
});
|
|
167
|
+
\`\`\`
|
|
168
|
+
`;
|
|
169
|
+
default:
|
|
170
|
+
return '';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=readme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readme.js","sourceRoot":"","sources":["../../../src/cli/templates/readme.ts"],"names":[],"mappings":"AAMA,8DAA8D;AAC9D,MAAM,UAAU,MAAM,CAAC,MAAqB;IACxC,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,IAAI,CAAC,SAAS,CAAC;QAChC,UAAU,EAAE;YACR,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW;SAC7B;KACJ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAEZ,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,KAAK,KAAK;QACtC,CAAC,CAAC,2HAA2H;QAC7H,CAAC,CAAC,EAAE,CAAC;IAET,OAAO,KAAK,MAAM,CAAC,IAAI;;;;;;;;;;EAUzB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;;CAMlB,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BJ,OAAO;;;;;;;EAOP,YAAY;;EAEZ,mBAAmB,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyB5B,CAAC;AACF,CAAC;AAED,qCAAqC;AACrC,SAAS,mBAAmB,CAAC,MAAqB;IAC9C,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,QAAQ;YACT,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBlB,CAAC;QACM,KAAK,KAAK;YACN,OAAO;;;;;;;;;;;CAWlB,CAAC;QACM,KAAK,SAAS;YACV,OAAO;;;;;;;;;;;CAWlB,CAAC;QACM,KAAK,OAAO;YACR,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBlB,CAAC;QACM;YACI,OAAO,EAAE,CAAC;IAClB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Testing Templates — Test setup and example tests
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
/** Generate `vitest.config.ts` */
|
|
6
|
+
export declare function vitestConfig(): string;
|
|
7
|
+
/** Generate `tests/setup.ts` — Test infrastructure */
|
|
8
|
+
export declare function testSetupTs(): string;
|
|
9
|
+
/** Generate `tests/system.test.ts` — Egress Firewall + RBAC tests */
|
|
10
|
+
export declare function systemTestTs(): string;
|
|
11
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kCAAkC;AAClC,wBAAgB,YAAY,IAAI,MAAM,CASrC;AAED,sDAAsD;AACtD,wBAAgB,WAAW,IAAI,MAAM,CAyBpC;AAED,qEAAqE;AACrE,wBAAgB,YAAY,IAAI,MAAM,CAwDrC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Testing Templates — Test setup and example tests
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
/** Generate `vitest.config.ts` */
|
|
6
|
+
export function vitestConfig() {
|
|
7
|
+
return `import { defineConfig } from 'vitest/config';
|
|
8
|
+
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
test: {
|
|
11
|
+
include: ['tests/**/*.test.ts'],
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
/** Generate `tests/setup.ts` — Test infrastructure */
|
|
17
|
+
export function testSetupTs() {
|
|
18
|
+
return `/**
|
|
19
|
+
* Test Setup — In-Memory MVA Emulator
|
|
20
|
+
*
|
|
21
|
+
* Creates a VurbTester that runs the full pipeline
|
|
22
|
+
* (Zod → Middleware → Handler → Egress Firewall)
|
|
23
|
+
* without any network transport.
|
|
24
|
+
*
|
|
25
|
+
* 2ms per test. $0.00 in tokens. Zero servers.
|
|
26
|
+
*/
|
|
27
|
+
import { fileURLToPath } from 'node:url';
|
|
28
|
+
import { createVurbTester } from '@vurb/testing';
|
|
29
|
+
import { autoDiscover } from 'vurb';
|
|
30
|
+
import { f } from '../src/vurb.js';
|
|
31
|
+
|
|
32
|
+
const registry = f.registry();
|
|
33
|
+
await autoDiscover(registry, fileURLToPath(new URL('../src/tools', import.meta.url)));
|
|
34
|
+
|
|
35
|
+
export const tester = createVurbTester(registry, {
|
|
36
|
+
contextFactory: () => ({
|
|
37
|
+
role: 'ADMIN' as const,
|
|
38
|
+
tenantId: 'test-tenant',
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
/** Generate `tests/system.test.ts` — Egress Firewall + RBAC tests */
|
|
44
|
+
export function systemTestTs() {
|
|
45
|
+
return `/**
|
|
46
|
+
* System Tools — Egress Firewall & RBAC Tests
|
|
47
|
+
*
|
|
48
|
+
* Proves that:
|
|
49
|
+
* 1. The Presenter strips undeclared fields (SOC2 CC6.1)
|
|
50
|
+
* 2. RBAC middleware blocks GUEST access (SOC2 CC6.3)
|
|
51
|
+
* 3. System rules from .describe() are injected
|
|
52
|
+
*/
|
|
53
|
+
import { describe, it, expect } from 'vitest';
|
|
54
|
+
import { tester } from './setup.js';
|
|
55
|
+
|
|
56
|
+
describe('System Tools', () => {
|
|
57
|
+
describe('Egress Firewall', () => {
|
|
58
|
+
it('should return validated health data through the Presenter', async () => {
|
|
59
|
+
const result = await tester.callAction('system', 'health');
|
|
60
|
+
|
|
61
|
+
expect(result.isError).toBe(false);
|
|
62
|
+
expect(result.data).toHaveProperty('status');
|
|
63
|
+
expect(result.data).toHaveProperty('uptime');
|
|
64
|
+
expect(result.data).toHaveProperty('version');
|
|
65
|
+
expect(result.data).toHaveProperty('timestamp');
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('should strip undeclared fields (tenant must NOT leak)', async () => {
|
|
69
|
+
const result = await tester.callAction('system', 'health');
|
|
70
|
+
|
|
71
|
+
expect(result.isError).toBe(false);
|
|
72
|
+
// The handler returns 'tenant' but the Presenter schema
|
|
73
|
+
// does not declare it → stripped by Egress Firewall
|
|
74
|
+
expect(result.data).not.toHaveProperty('tenant');
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should include JIT system rules from .describe()', async () => {
|
|
78
|
+
const result = await tester.callAction('system', 'health');
|
|
79
|
+
|
|
80
|
+
expect(result.systemRules.length).toBeGreaterThan(0);
|
|
81
|
+
expect(result.systemRules.some(
|
|
82
|
+
(r: string) => r.includes('uptime') || r.includes('Uptime')
|
|
83
|
+
)).toBe(true);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
describe('Echo Tool', () => {
|
|
88
|
+
it('should echo the message back', async () => {
|
|
89
|
+
const result = await tester.callAction('system', 'echo', {
|
|
90
|
+
message: 'hello vurb',
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
expect(result.isError).toBe(false);
|
|
94
|
+
expect(result.data).toHaveProperty('echo', 'hello vurb');
|
|
95
|
+
expect(result.data).toHaveProperty('receivedAt');
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
`;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../src/cli/templates/testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kCAAkC;AAClC,MAAM,UAAU,YAAY;IACxB,OAAO;;;;;;;CAOV,CAAC;AACF,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,WAAW;IACvB,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBV,CAAC;AACF,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,YAAY;IACxB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDV,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Templates — Example tools for the scaffolded project
|
|
3
|
+
*
|
|
4
|
+
* All tools use the Fluent API — `f.query()`, `f.mutation()` — with
|
|
5
|
+
* semantic verbs, `.withString()` / `.withNumber()` typed parameters,
|
|
6
|
+
* `.returns()` Presenter binding, and `.handle()` terminal step.
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/** Generate `src/tools/system/health.ts` — Health check with Presenter */
|
|
10
|
+
export declare function healthToolTs(): string;
|
|
11
|
+
/** Generate `src/tools/system/echo.ts` — Simple echo tool */
|
|
12
|
+
export declare function echoToolTs(): string;
|
|
13
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0EAA0E;AAC1E,wBAAgB,YAAY,IAAI,MAAM,CA6BrC;AAED,6DAA6D;AAC7D,wBAAgB,UAAU,IAAI,MAAM,CAqBnC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Templates — Example tools for the scaffolded project
|
|
3
|
+
*
|
|
4
|
+
* All tools use the Fluent API — `f.query()`, `f.mutation()` — with
|
|
5
|
+
* semantic verbs, `.withString()` / `.withNumber()` typed parameters,
|
|
6
|
+
* `.returns()` Presenter binding, and `.handle()` terminal step.
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/** Generate `src/tools/system/health.ts` — Health check with Presenter */
|
|
10
|
+
export function healthToolTs() {
|
|
11
|
+
return `/**
|
|
12
|
+
* System Health Tool — Full MVA Pipeline (Fluent API)
|
|
13
|
+
*
|
|
14
|
+
* Demonstrates:
|
|
15
|
+
* - f.query() — read-only semantic verb (auto-sets readOnlyHint)
|
|
16
|
+
* - .describe() — LLM-facing description
|
|
17
|
+
* - .returns() — Presenter (Egress Firewall + system rules + UI)
|
|
18
|
+
* - .handle(input, ctx) — fully typed handler
|
|
19
|
+
* - export default for autoDiscover()
|
|
20
|
+
*/
|
|
21
|
+
import { f } from '../../vurb.js';
|
|
22
|
+
import { SystemPresenter } from '../../presenters/SystemPresenter.js';
|
|
23
|
+
|
|
24
|
+
export default f.query('system.health')
|
|
25
|
+
.describe('Real-time server health status')
|
|
26
|
+
.returns(SystemPresenter)
|
|
27
|
+
.handle(async (_input, ctx) => {
|
|
28
|
+
// Return raw data — the Presenter validates, strips
|
|
29
|
+
// undeclared fields, injects rules, and renders UI.
|
|
30
|
+
return {
|
|
31
|
+
status: 'healthy',
|
|
32
|
+
uptime: process.uptime(),
|
|
33
|
+
version: '0.1.0',
|
|
34
|
+
timestamp: new Date().toISOString(),
|
|
35
|
+
tenant: ctx.tenantId,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
/** Generate `src/tools/system/echo.ts` — Simple echo tool */
|
|
41
|
+
export function echoToolTs() {
|
|
42
|
+
return `/**
|
|
43
|
+
* Echo Tool — Connectivity Testing (Fluent API)
|
|
44
|
+
*
|
|
45
|
+
* Demonstrates:
|
|
46
|
+
* - f.query() with .withString() typed parameter
|
|
47
|
+
* - .handle(input, ctx) — input.message is typed as string
|
|
48
|
+
* - Implicit success() wrapping — return raw data, framework wraps it
|
|
49
|
+
*/
|
|
50
|
+
import { f } from '../../vurb.js';
|
|
51
|
+
|
|
52
|
+
export default f.query('system.echo')
|
|
53
|
+
.describe('Echo a message back (connectivity test)')
|
|
54
|
+
.withString('message', 'Message to echo back')
|
|
55
|
+
.handle(async (input) => {
|
|
56
|
+
return {
|
|
57
|
+
echo: input['message'],
|
|
58
|
+
receivedAt: new Date().toISOString(),
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
`;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/cli/templates/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0EAA0E;AAC1E,MAAM,UAAU,YAAY;IACxB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BV,CAAC;AACF,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,UAAU;IACtB,OAAO;;;;;;;;;;;;;;;;;;;CAmBV,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database Vector — Prisma schema + DB tool templates
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
/** Generate `prisma/schema.prisma` */
|
|
6
|
+
export declare function prismaSchema(): string;
|
|
7
|
+
/** Generate `src/tools/db/users.ts` */
|
|
8
|
+
export declare function dbUsersToolTs(): string;
|
|
9
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../../src/cli/templates/vectors/database.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,sCAAsC;AACtC,wBAAgB,YAAY,IAAI,MAAM,CAgDrC;AAED,uCAAuC;AACvC,wBAAgB,aAAa,IAAI,MAAM,CAyBtC"}
|