@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,643 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FluentToolBuilder — Type-Chaining Builder for Semantic Verb Tools
|
|
3
|
+
*
|
|
4
|
+
* The core builder behind `f.query()`, `f.mutation()`, and `f.action()`.
|
|
5
|
+
* Uses TypeScript generic accumulation so that each fluent step narrows
|
|
6
|
+
* the types — the IDE "magically" knows the exact shape of `input` and
|
|
7
|
+
* `ctx` inside `.handle()` without any manual Interface declaration.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const f = initVurb<AppContext>();
|
|
12
|
+
*
|
|
13
|
+
* const listUsers = f.query('users.list')
|
|
14
|
+
* .describe('List users from the database')
|
|
15
|
+
* .withNumber('limit', 'Max results to return')
|
|
16
|
+
* .withOptionalEnum('status', ['active', 'inactive'], 'Filter by status')
|
|
17
|
+
* .returns(UserPresenter)
|
|
18
|
+
* .handle(async (input, ctx) => {
|
|
19
|
+
* return ctx.db.user.findMany({ take: input.limit });
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see {@link FluentRouter} for prefix grouping
|
|
24
|
+
* @see {@link initVurb} for the factory that creates these builders
|
|
25
|
+
*
|
|
26
|
+
* @module
|
|
27
|
+
*/
|
|
28
|
+
import { z } from 'zod';
|
|
29
|
+
import { GroupedToolBuilder } from './GroupedToolBuilder.js';
|
|
30
|
+
import {} from '../types.js';
|
|
31
|
+
import { success, TOOL_RESPONSE_BRAND } from '../response.js';
|
|
32
|
+
import {} from '../../presenter/Presenter.js';
|
|
33
|
+
import {} from '../execution/ConcurrencyGuard.js';
|
|
34
|
+
import {} from '../../sandbox/SandboxEngine.js';
|
|
35
|
+
import { SANDBOX_SYSTEM_INSTRUCTION } from '../../sandbox/index.js';
|
|
36
|
+
import {} from '../middleware/ContextDerivation.js';
|
|
37
|
+
/** Defaults for `f.query()` — read-only, no side effects */
|
|
38
|
+
export const QUERY_DEFAULTS = { readOnly: true };
|
|
39
|
+
/** Defaults for `f.mutation()` — destructive, irreversible */
|
|
40
|
+
export const MUTATION_DEFAULTS = { destructive: true };
|
|
41
|
+
/** Defaults for `f.action()` — neutral, no assumptions */
|
|
42
|
+
export const ACTION_DEFAULTS = {};
|
|
43
|
+
// ── Array Item Type Resolution ───────────────────────────
|
|
44
|
+
/** Resolve Zod type from array item type string */
|
|
45
|
+
function resolveArrayItemType(itemType) {
|
|
46
|
+
switch (itemType) {
|
|
47
|
+
case 'string': return z.string();
|
|
48
|
+
case 'number': return z.number();
|
|
49
|
+
case 'boolean': return z.boolean();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// ── FluentToolBuilder ────────────────────────────────────
|
|
53
|
+
/**
|
|
54
|
+
* Fluent builder that accumulates types at each step.
|
|
55
|
+
*
|
|
56
|
+
* @typeParam TContext - Base application context (from `initVurb<TContext>()`)
|
|
57
|
+
* @typeParam TInput - Accumulated input type (built by `with*()` methods)
|
|
58
|
+
* @typeParam TCtx - Accumulated context type (enriched by `.use()`)
|
|
59
|
+
*/
|
|
60
|
+
export class FluentToolBuilder {
|
|
61
|
+
/** @internal */ _name;
|
|
62
|
+
/** @internal */ _description;
|
|
63
|
+
/** @internal */ _instructions;
|
|
64
|
+
/** @internal */ _inputSchema;
|
|
65
|
+
/** @internal */ _withParams = {};
|
|
66
|
+
/** @internal */ _tags = [];
|
|
67
|
+
/**
|
|
68
|
+
* @internal Bug #118 fix: reject duplicate parameter names.
|
|
69
|
+
* All `withXxx()` methods delegate to this instead of assigning directly.
|
|
70
|
+
*/
|
|
71
|
+
_addParam(name, schema) {
|
|
72
|
+
if (!name || !name.trim()) {
|
|
73
|
+
throw new Error(`Empty parameter name on tool "${this._name}". ` +
|
|
74
|
+
`Each parameter must have a non-empty name.`);
|
|
75
|
+
}
|
|
76
|
+
if (name in this._withParams) {
|
|
77
|
+
throw new Error(`Duplicate parameter name "${name}" on tool "${this._name}". ` +
|
|
78
|
+
`Each parameter must have a unique name.`);
|
|
79
|
+
}
|
|
80
|
+
this._withParams[name] = schema;
|
|
81
|
+
}
|
|
82
|
+
/** @internal */ _middlewares = [];
|
|
83
|
+
/** @internal */ _returns;
|
|
84
|
+
/** @internal */ _semanticDefaults;
|
|
85
|
+
/** @internal */ _readOnly;
|
|
86
|
+
/** @internal */ _destructive;
|
|
87
|
+
/** @internal */ _idempotent;
|
|
88
|
+
/** @internal */ _toonMode = false;
|
|
89
|
+
/** @internal */ _annotations;
|
|
90
|
+
/** @internal */ _invalidatesPatterns = [];
|
|
91
|
+
/** @internal */ _cacheControl;
|
|
92
|
+
/** @internal */ _concurrency;
|
|
93
|
+
/** @internal */ _egressMaxBytes;
|
|
94
|
+
/** @internal */ _sandboxConfig;
|
|
95
|
+
/** @internal */ _handlerSet = false;
|
|
96
|
+
/** @internal */ _fsmStates;
|
|
97
|
+
/** @internal */ _fsmTransition;
|
|
98
|
+
/**
|
|
99
|
+
* @param name - Tool name in `domain.action` format (e.g. `'users.list'`)
|
|
100
|
+
* @param defaults - Semantic defaults from the verb (`query`, `mutation`, `action`)
|
|
101
|
+
*/
|
|
102
|
+
constructor(name, defaults = {}) {
|
|
103
|
+
if (!name || !name.trim()) {
|
|
104
|
+
throw new Error('Tool name must be a non-empty string. ' +
|
|
105
|
+
'Use the "domain.action" format (e.g. "users.list").');
|
|
106
|
+
}
|
|
107
|
+
this._name = name;
|
|
108
|
+
this._semanticDefaults = defaults;
|
|
109
|
+
}
|
|
110
|
+
// ── Configuration (fluent, each returns narrowed type) ──
|
|
111
|
+
/**
|
|
112
|
+
* Set the tool description shown to the LLM.
|
|
113
|
+
*
|
|
114
|
+
* @param text - Human-readable description
|
|
115
|
+
* @returns `this` for chaining
|
|
116
|
+
*/
|
|
117
|
+
describe(text) {
|
|
118
|
+
this._description = text;
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Set AI-First instructions — injected as system-level guidance in the tool description.
|
|
123
|
+
*
|
|
124
|
+
* This is **Prompt Engineering embedded in the framework**. The instructions
|
|
125
|
+
* tell the LLM WHEN and HOW to use this tool, reducing hallucination.
|
|
126
|
+
*
|
|
127
|
+
* @param text - System prompt for the tool
|
|
128
|
+
* @returns `this` for chaining
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* f.query('docs.search')
|
|
133
|
+
* .describe('Search internal documentation')
|
|
134
|
+
* .instructions('Use ONLY when the user asks about internal policies.')
|
|
135
|
+
* .withString('query', 'Search term')
|
|
136
|
+
* .handle(async (input) => { ... });
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
instructions(text) {
|
|
140
|
+
this._instructions = text;
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
// ── Parameter Declaration (with* methods) ────────────
|
|
144
|
+
/**
|
|
145
|
+
* Add a required string parameter.
|
|
146
|
+
*
|
|
147
|
+
* @param name - Parameter name
|
|
148
|
+
* @param description - Human-readable description for the LLM
|
|
149
|
+
* @returns Builder with narrowed `TInput` type
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* f.query('projects.get')
|
|
154
|
+
* .withString('project_id', 'The project ID to retrieve')
|
|
155
|
+
* .handle(async (input) => { ... });
|
|
156
|
+
* // input.project_id: string ✅
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
withString(name, description) {
|
|
160
|
+
this._addParam(name, description ? z.string().describe(description) : z.string());
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Add an optional string parameter.
|
|
165
|
+
*
|
|
166
|
+
* @param name - Parameter name
|
|
167
|
+
* @param description - Human-readable description for the LLM
|
|
168
|
+
* @returns Builder with narrowed `TInput` type
|
|
169
|
+
*/
|
|
170
|
+
withOptionalString(name, description) {
|
|
171
|
+
const base = description ? z.string().describe(description) : z.string();
|
|
172
|
+
this._addParam(name, base.optional());
|
|
173
|
+
return this;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Add a required number parameter.
|
|
177
|
+
*
|
|
178
|
+
* @param name - Parameter name
|
|
179
|
+
* @param description - Human-readable description for the LLM
|
|
180
|
+
* @returns Builder with narrowed `TInput` type
|
|
181
|
+
*/
|
|
182
|
+
withNumber(name, description) {
|
|
183
|
+
this._addParam(name, description ? z.number().describe(description) : z.number());
|
|
184
|
+
return this;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Add an optional number parameter.
|
|
188
|
+
*
|
|
189
|
+
* @param name - Parameter name
|
|
190
|
+
* @param description - Human-readable description for the LLM
|
|
191
|
+
* @returns Builder with narrowed `TInput` type
|
|
192
|
+
*/
|
|
193
|
+
withOptionalNumber(name, description) {
|
|
194
|
+
const base = description ? z.number().describe(description) : z.number();
|
|
195
|
+
this._addParam(name, base.optional());
|
|
196
|
+
return this;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Add a required boolean parameter.
|
|
200
|
+
*
|
|
201
|
+
* @param name - Parameter name
|
|
202
|
+
* @param description - Human-readable description for the LLM
|
|
203
|
+
* @returns Builder with narrowed `TInput` type
|
|
204
|
+
*/
|
|
205
|
+
withBoolean(name, description) {
|
|
206
|
+
this._addParam(name, description ? z.boolean().describe(description) : z.boolean());
|
|
207
|
+
return this;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Add an optional boolean parameter.
|
|
211
|
+
*
|
|
212
|
+
* @param name - Parameter name
|
|
213
|
+
* @param description - Human-readable description for the LLM
|
|
214
|
+
* @returns Builder with narrowed `TInput` type
|
|
215
|
+
*/
|
|
216
|
+
withOptionalBoolean(name, description) {
|
|
217
|
+
const base = description ? z.boolean().describe(description) : z.boolean();
|
|
218
|
+
this._addParam(name, base.optional());
|
|
219
|
+
return this;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Add a required enum parameter.
|
|
223
|
+
*
|
|
224
|
+
* @param name - Parameter name
|
|
225
|
+
* @param values - Allowed enum values
|
|
226
|
+
* @param description - Human-readable description for the LLM
|
|
227
|
+
* @returns Builder with narrowed `TInput` type
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```typescript
|
|
231
|
+
* f.query('invoices.list')
|
|
232
|
+
* .withEnum('status', ['draft', 'sent', 'paid'], 'Filter by status')
|
|
233
|
+
* .handle(async (input) => { ... });
|
|
234
|
+
* // input.status: 'draft' | 'sent' | 'paid' ✅
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
withEnum(name, values, description) {
|
|
238
|
+
const schema = z.enum(values);
|
|
239
|
+
this._addParam(name, description ? schema.describe(description) : schema);
|
|
240
|
+
return this;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Add an optional enum parameter.
|
|
244
|
+
*
|
|
245
|
+
* @param name - Parameter name
|
|
246
|
+
* @param values - Allowed enum values
|
|
247
|
+
* @param description - Human-readable description for the LLM
|
|
248
|
+
* @returns Builder with narrowed `TInput` type
|
|
249
|
+
*/
|
|
250
|
+
withOptionalEnum(name, values, description) {
|
|
251
|
+
const schema = z.enum(values);
|
|
252
|
+
this._addParam(name, description ? schema.describe(description).optional() : schema.optional());
|
|
253
|
+
return this;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Add a required array parameter.
|
|
257
|
+
*
|
|
258
|
+
* @param name - Parameter name
|
|
259
|
+
* @param itemType - Type of array items (`'string'`, `'number'`, `'boolean'`)
|
|
260
|
+
* @param description - Human-readable description for the LLM
|
|
261
|
+
* @returns Builder with narrowed `TInput` type
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```typescript
|
|
265
|
+
* f.mutation('tasks.tag')
|
|
266
|
+
* .withString('task_id', 'The task to tag')
|
|
267
|
+
* .withArray('tags', 'string', 'Tags to apply')
|
|
268
|
+
* .handle(async (input) => { ... });
|
|
269
|
+
* // input.tags: string[] ✅
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
withArray(name, itemType, description) {
|
|
273
|
+
const schema = z.array(resolveArrayItemType(itemType));
|
|
274
|
+
this._addParam(name, description ? schema.describe(description) : schema);
|
|
275
|
+
return this;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Add an optional array parameter.
|
|
279
|
+
*
|
|
280
|
+
* @param name - Parameter name
|
|
281
|
+
* @param itemType - Type of array items (`'string'`, `'number'`, `'boolean'`)
|
|
282
|
+
* @param description - Human-readable description for the LLM
|
|
283
|
+
* @returns Builder with narrowed `TInput` type
|
|
284
|
+
*/
|
|
285
|
+
withOptionalArray(name, itemType, description) {
|
|
286
|
+
const schema = z.array(resolveArrayItemType(itemType));
|
|
287
|
+
this._addParam(name, description ? schema.describe(description).optional() : schema.optional());
|
|
288
|
+
return this;
|
|
289
|
+
}
|
|
290
|
+
use(mw) {
|
|
291
|
+
// Handle MiddlewareDefinition from f.middleware()
|
|
292
|
+
if (typeof mw === 'object' && mw !== null && '__brand' in mw && mw.__brand === 'MiddlewareDefinition') {
|
|
293
|
+
const def = mw;
|
|
294
|
+
this._middlewares.push(def.toMiddlewareFn());
|
|
295
|
+
return this;
|
|
296
|
+
}
|
|
297
|
+
// Handle inline function
|
|
298
|
+
const inlineMw = mw;
|
|
299
|
+
// Convert the fluent middleware signature to the standard MiddlewareFn
|
|
300
|
+
const standardMw = async (ctx, args, next) => {
|
|
301
|
+
const wrappedNext = async (enrichedCtx) => {
|
|
302
|
+
// Bug #78 fix: sanitize enriched context before merging
|
|
303
|
+
// to prevent prototype pollution via __proto__/constructor/prototype keys.
|
|
304
|
+
const safe = enrichedCtx;
|
|
305
|
+
const target = ctx;
|
|
306
|
+
for (const key of Object.keys(safe)) {
|
|
307
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype')
|
|
308
|
+
continue;
|
|
309
|
+
target[key] = safe[key];
|
|
310
|
+
}
|
|
311
|
+
return next();
|
|
312
|
+
};
|
|
313
|
+
return inlineMw({ ctx: ctx, next: wrappedNext });
|
|
314
|
+
};
|
|
315
|
+
this._middlewares.push(standardMw);
|
|
316
|
+
return this;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Set the MVA Presenter for automatic response formatting.
|
|
320
|
+
*
|
|
321
|
+
* When a Presenter is attached, the handler can return raw data
|
|
322
|
+
* and the framework pipes it through schema validation, system rules,
|
|
323
|
+
* and UI block generation.
|
|
324
|
+
*
|
|
325
|
+
* @param presenter - A Presenter instance
|
|
326
|
+
* @returns `this` for chaining
|
|
327
|
+
*/
|
|
328
|
+
returns(presenter) {
|
|
329
|
+
this._returns = presenter;
|
|
330
|
+
return this;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Add capability tags for selective tool exposure.
|
|
334
|
+
*
|
|
335
|
+
* Tags are accumulated — calling `.tags()` multiple times
|
|
336
|
+
* (or inheriting from a router) appends rather than replaces.
|
|
337
|
+
*
|
|
338
|
+
* @param tags - Tag strings for filtering
|
|
339
|
+
* @returns `this` for chaining
|
|
340
|
+
*/
|
|
341
|
+
tags(...tags) {
|
|
342
|
+
this._tags.push(...tags);
|
|
343
|
+
return this;
|
|
344
|
+
}
|
|
345
|
+
// ── Semantic Overrides ───────────────────────────────
|
|
346
|
+
/** Override: mark this tool as read-only (no side effects) */
|
|
347
|
+
readOnly() {
|
|
348
|
+
this._readOnly = true;
|
|
349
|
+
return this;
|
|
350
|
+
}
|
|
351
|
+
/** Override: mark this tool as destructive (irreversible) */
|
|
352
|
+
destructive() {
|
|
353
|
+
this._destructive = true;
|
|
354
|
+
return this;
|
|
355
|
+
}
|
|
356
|
+
/** Override: mark this tool as idempotent (safe to retry) */
|
|
357
|
+
idempotent() {
|
|
358
|
+
this._idempotent = true;
|
|
359
|
+
return this;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Enable TOON-formatted descriptions for token optimization.
|
|
363
|
+
*
|
|
364
|
+
* @returns `this` for chaining
|
|
365
|
+
*/
|
|
366
|
+
toonDescription() {
|
|
367
|
+
this._toonMode = true;
|
|
368
|
+
return this;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Set MCP tool annotations.
|
|
372
|
+
*
|
|
373
|
+
* @param a - Annotation key-value pairs
|
|
374
|
+
* @returns `this` for chaining
|
|
375
|
+
*/
|
|
376
|
+
annotations(a) {
|
|
377
|
+
this._annotations = { ...this._annotations, ...a };
|
|
378
|
+
return this;
|
|
379
|
+
}
|
|
380
|
+
// ── State Sync (Fluent) ──────────────────────────────
|
|
381
|
+
/**
|
|
382
|
+
* Declare glob patterns invalidated when this tool succeeds.
|
|
383
|
+
*
|
|
384
|
+
* @param patterns - Glob patterns (e.g. `'sprints.*'`, `'tasks.*'`)
|
|
385
|
+
* @returns `this` for chaining
|
|
386
|
+
*/
|
|
387
|
+
invalidates(...patterns) {
|
|
388
|
+
this._invalidatesPatterns.push(...patterns);
|
|
389
|
+
return this;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Mark this tool's data as immutable (safe to cache forever).
|
|
393
|
+
*
|
|
394
|
+
* @returns `this` for chaining
|
|
395
|
+
*/
|
|
396
|
+
cached() {
|
|
397
|
+
this._cacheControl = 'immutable';
|
|
398
|
+
return this;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Mark this tool's data as volatile (never cache).
|
|
402
|
+
*
|
|
403
|
+
* @returns `this` for chaining
|
|
404
|
+
*/
|
|
405
|
+
stale() {
|
|
406
|
+
this._cacheControl = 'no-store';
|
|
407
|
+
return this;
|
|
408
|
+
}
|
|
409
|
+
// ── Runtime Guards (Fluent) ──────────────────────────
|
|
410
|
+
/**
|
|
411
|
+
* Set concurrency limits for this tool (Semaphore + Queue pattern).
|
|
412
|
+
*
|
|
413
|
+
* @param config - Concurrency configuration
|
|
414
|
+
* @returns `this` for chaining
|
|
415
|
+
*/
|
|
416
|
+
concurrency(config) {
|
|
417
|
+
this._concurrency = config;
|
|
418
|
+
return this;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Set maximum payload size for tool responses (Egress Guard).
|
|
422
|
+
*
|
|
423
|
+
* @param bytes - Maximum payload size in bytes
|
|
424
|
+
* @returns `this` for chaining
|
|
425
|
+
*/
|
|
426
|
+
egress(bytes) {
|
|
427
|
+
this._egressMaxBytes = bytes;
|
|
428
|
+
return this;
|
|
429
|
+
}
|
|
430
|
+
// ── Sandbox (Zero-Trust Compute) ─────────────────
|
|
431
|
+
/**
|
|
432
|
+
* Enable zero-trust sandboxed execution for this tool.
|
|
433
|
+
*
|
|
434
|
+
* When enabled:
|
|
435
|
+
* 1. A `SandboxEngine` is lazily created on the `GroupedToolBuilder`
|
|
436
|
+
* 2. A system instruction is auto-injected into the tool description
|
|
437
|
+
* (HATEOAS auto-prompting) so the LLM knows to send JS functions
|
|
438
|
+
* 3. The handler can use `SandboxEngine.execute()` to run LLM code
|
|
439
|
+
* in a sealed V8 isolate (no process, require, fs, network)
|
|
440
|
+
*
|
|
441
|
+
* @param config - Optional sandbox configuration (timeout, memory, output size)
|
|
442
|
+
* @returns `this` for chaining
|
|
443
|
+
*
|
|
444
|
+
* @example
|
|
445
|
+
* ```typescript
|
|
446
|
+
* f.query('data.compute')
|
|
447
|
+
* .describe('Run safe computation on server data')
|
|
448
|
+
* .sandboxed({ timeout: 3000, memoryLimit: 64 })
|
|
449
|
+
* .withString('expression', 'JS arrow function: (data) => result')
|
|
450
|
+
* .handle(async (input, ctx) => {
|
|
451
|
+
* const data = await ctx.db.records.findMany();
|
|
452
|
+
* const engine = new SandboxEngine({ timeout: 3000 });
|
|
453
|
+
* const result = await engine.execute(input.expression, data);
|
|
454
|
+
* return result.ok ? result.value : { error: result.error };
|
|
455
|
+
* });
|
|
456
|
+
* ```
|
|
457
|
+
*/
|
|
458
|
+
sandboxed(config) {
|
|
459
|
+
this._sandboxConfig = config ?? {};
|
|
460
|
+
return this;
|
|
461
|
+
}
|
|
462
|
+
// ── FSM State Gate (Temporal Anti-Hallucination) ─────
|
|
463
|
+
/**
|
|
464
|
+
* Bind this tool to specific FSM states.
|
|
465
|
+
*
|
|
466
|
+
* When a `StateMachineGate` is configured on the server, this tool
|
|
467
|
+
* will only appear in `tools/list` when the FSM is in one of the
|
|
468
|
+
* specified states. The LLM physically cannot call tools that
|
|
469
|
+
* don't exist in its reality.
|
|
470
|
+
*
|
|
471
|
+
* @param states - FSM state(s) where this tool is visible
|
|
472
|
+
* @param transition - Event to send to the FSM on successful execution
|
|
473
|
+
* @returns `this` for chaining
|
|
474
|
+
*
|
|
475
|
+
* @example
|
|
476
|
+
* ```typescript
|
|
477
|
+
* // Visible only in 'has_items' state, sends CHECKOUT on success
|
|
478
|
+
* const checkout = f.mutation('cart.checkout')
|
|
479
|
+
* .bindState('has_items', 'CHECKOUT')
|
|
480
|
+
* .handle(async (input, ctx) => { ... });
|
|
481
|
+
*
|
|
482
|
+
* // Visible in multiple states
|
|
483
|
+
* const addItem = f.mutation('cart.add_item')
|
|
484
|
+
* .bindState(['empty', 'has_items'], 'ADD_ITEM')
|
|
485
|
+
* .handle(async (input, ctx) => { ... });
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
bindState(states, transition) {
|
|
489
|
+
this._fsmStates = Array.isArray(states) ? states : [states];
|
|
490
|
+
if (transition !== undefined)
|
|
491
|
+
this._fsmTransition = transition;
|
|
492
|
+
return this;
|
|
493
|
+
}
|
|
494
|
+
// ── Terminal: handle() ───────────────────────────────
|
|
495
|
+
/**
|
|
496
|
+
* Set the handler and build the tool — the terminal step.
|
|
497
|
+
*
|
|
498
|
+
* The handler receives `(input, ctx)` with fully typed `TInput` and `TCtx`.
|
|
499
|
+
* **Implicit `success()` wrapping**: if the handler returns raw data
|
|
500
|
+
* (not a `ToolResponse`), the framework wraps it with `success()`.
|
|
501
|
+
*
|
|
502
|
+
* @param handler - Async function receiving typed `(input, ctx)`
|
|
503
|
+
* @returns A `GroupedToolBuilder` ready for registration
|
|
504
|
+
*
|
|
505
|
+
* @example
|
|
506
|
+
* ```typescript
|
|
507
|
+
* const getProject = f.query('projects.get')
|
|
508
|
+
* .describe('Get a project by ID')
|
|
509
|
+
* .withString('project_id', 'The exact project ID')
|
|
510
|
+
* .handle(async (input, ctx) => {
|
|
511
|
+
* return await ctx.db.projects.findUnique({ where: { id: input.project_id } });
|
|
512
|
+
* });
|
|
513
|
+
* ```
|
|
514
|
+
*/
|
|
515
|
+
handle(handler) {
|
|
516
|
+
return this._build(handler);
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Alias for `.handle()` — for backward compatibility.
|
|
520
|
+
* @internal
|
|
521
|
+
*/
|
|
522
|
+
resolve(handler) {
|
|
523
|
+
// Adapt { input, ctx } signature to (input, ctx)
|
|
524
|
+
return this._build((input, ctx) => handler({ input, ctx }));
|
|
525
|
+
}
|
|
526
|
+
// ── Internal Build ───────────────────────────────────
|
|
527
|
+
/** @internal */
|
|
528
|
+
_build(handler) {
|
|
529
|
+
// Bug #123 fix: guard against double-invocation of handle()/resolve()
|
|
530
|
+
if (this._handlerSet) {
|
|
531
|
+
throw new Error(`handle() already called on tool "${this._name}". ` +
|
|
532
|
+
`Each FluentToolBuilder can only have one handler.`);
|
|
533
|
+
}
|
|
534
|
+
this._handlerSet = true;
|
|
535
|
+
// Build accumulated with* params into ZodObject
|
|
536
|
+
if (Object.keys(this._withParams).length > 0) {
|
|
537
|
+
this._inputSchema = z.object(this._withParams);
|
|
538
|
+
}
|
|
539
|
+
// Parse name: 'domain.action' → tool='domain', action='action'
|
|
540
|
+
const dotIndex = this._name.indexOf('.');
|
|
541
|
+
// Bug #109 fix: reject multi-dot names early with a clear error.
|
|
542
|
+
if (dotIndex > 0 && this._name.indexOf('.', dotIndex + 1) !== -1) {
|
|
543
|
+
throw new Error(`Tool name '${this._name}' has too many dot-separated segments. ` +
|
|
544
|
+
`Only one dot is allowed (e.g. 'group.action'). Use f.router() for nested prefixes.`);
|
|
545
|
+
}
|
|
546
|
+
const toolName = dotIndex > 0 ? this._name.slice(0, dotIndex) : this._name;
|
|
547
|
+
const actionName = dotIndex > 0 ? this._name.slice(dotIndex + 1) : 'default';
|
|
548
|
+
// Compile description: instructions + description
|
|
549
|
+
const descParts = [];
|
|
550
|
+
if (this._instructions) {
|
|
551
|
+
descParts.push(`[INSTRUCTIONS] ${this._instructions}`);
|
|
552
|
+
}
|
|
553
|
+
if (this._description) {
|
|
554
|
+
descParts.push(this._description);
|
|
555
|
+
}
|
|
556
|
+
// HATEOAS Auto-Prompting: teach the LLM about sandbox capability
|
|
557
|
+
if (this._sandboxConfig) {
|
|
558
|
+
descParts.push(SANDBOX_SYSTEM_INSTRUCTION.trim());
|
|
559
|
+
}
|
|
560
|
+
const compiledDescription = descParts.length > 0 ? descParts.join('\n\n') : undefined;
|
|
561
|
+
// Resolve semantic defaults + overrides
|
|
562
|
+
const readOnly = this._readOnly ?? this._semanticDefaults.readOnly;
|
|
563
|
+
const destructive = this._destructive ?? this._semanticDefaults.destructive;
|
|
564
|
+
const idempotent = this._idempotent ?? this._semanticDefaults.idempotent;
|
|
565
|
+
// Wrap handler: (input, ctx) → (ctx, args)
|
|
566
|
+
const resolvedHandler = handler;
|
|
567
|
+
const wrappedHandler = async (ctx, args) => {
|
|
568
|
+
const result = await resolvedHandler(args, ctx);
|
|
569
|
+
// Guard: void/null handlers → safe fallback (Bug #41)
|
|
570
|
+
if (result === undefined || result === null) {
|
|
571
|
+
return success('OK');
|
|
572
|
+
}
|
|
573
|
+
// Auto-wrap non-ToolResponse results (implicit success)
|
|
574
|
+
// Primary: check brand symbol stamped by success()/error()/toolError() helpers.
|
|
575
|
+
// Fallback: shape-based heuristic for manually constructed ToolResponse objects.
|
|
576
|
+
if (typeof result === 'object' && result !== null) {
|
|
577
|
+
// Brand check — reliable, no false positives (Bug #127)
|
|
578
|
+
if (TOOL_RESPONSE_BRAND in result) {
|
|
579
|
+
return result;
|
|
580
|
+
}
|
|
581
|
+
// Shape heuristic — backward compat for manually constructed ToolResponse
|
|
582
|
+
if ('content' in result &&
|
|
583
|
+
Array.isArray(result.content) &&
|
|
584
|
+
result.content.length > 0 &&
|
|
585
|
+
result.content[0]?.type === 'text' &&
|
|
586
|
+
typeof result.content[0]?.text === 'string' &&
|
|
587
|
+
Object.keys(result).every(k => k === 'content' || k === 'isError')) {
|
|
588
|
+
return result;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
// Implicit success() — the dev just returns raw data!
|
|
592
|
+
return success(result);
|
|
593
|
+
};
|
|
594
|
+
// Build via GroupedToolBuilder for consistency with existing pipeline
|
|
595
|
+
const builder = new GroupedToolBuilder(toolName);
|
|
596
|
+
if (compiledDescription)
|
|
597
|
+
builder.description(compiledDescription);
|
|
598
|
+
if (this._tags.length > 0)
|
|
599
|
+
builder.tags(...this._tags);
|
|
600
|
+
if (this._toonMode)
|
|
601
|
+
builder.toonDescription();
|
|
602
|
+
if (this._annotations)
|
|
603
|
+
builder.annotations(this._annotations);
|
|
604
|
+
// Propagate state sync hints
|
|
605
|
+
if (this._invalidatesPatterns.length > 0) {
|
|
606
|
+
builder.invalidates(...this._invalidatesPatterns);
|
|
607
|
+
}
|
|
608
|
+
if (this._cacheControl) {
|
|
609
|
+
this._cacheControl === 'immutable' ? builder.cached() : builder.stale();
|
|
610
|
+
}
|
|
611
|
+
// Propagate runtime guards
|
|
612
|
+
if (this._concurrency) {
|
|
613
|
+
builder.concurrency(this._concurrency);
|
|
614
|
+
}
|
|
615
|
+
if (this._egressMaxBytes !== undefined) {
|
|
616
|
+
builder.maxPayloadBytes(this._egressMaxBytes);
|
|
617
|
+
}
|
|
618
|
+
// Propagate sandbox config
|
|
619
|
+
if (this._sandboxConfig) {
|
|
620
|
+
builder.sandbox(this._sandboxConfig);
|
|
621
|
+
}
|
|
622
|
+
// Propagate FSM state gate
|
|
623
|
+
if (this._fsmStates) {
|
|
624
|
+
builder.bindState(this._fsmStates, this._fsmTransition);
|
|
625
|
+
}
|
|
626
|
+
// Apply middleware
|
|
627
|
+
for (const mw of this._middlewares) {
|
|
628
|
+
builder.use(mw);
|
|
629
|
+
}
|
|
630
|
+
// Register the single action
|
|
631
|
+
builder.action({
|
|
632
|
+
name: actionName,
|
|
633
|
+
handler: wrappedHandler,
|
|
634
|
+
...(this._inputSchema ? { schema: this._inputSchema } : {}),
|
|
635
|
+
...(readOnly !== undefined ? { readOnly } : {}),
|
|
636
|
+
...(destructive !== undefined ? { destructive } : {}),
|
|
637
|
+
...(idempotent !== undefined ? { idempotent } : {}),
|
|
638
|
+
...(this._returns ? { returns: this._returns } : {}),
|
|
639
|
+
});
|
|
640
|
+
return builder;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
//# sourceMappingURL=FluentToolBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FluentToolBuilder.js","sourceRoot":"","sources":["../../../src/core/builder/FluentToolBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,CAAC,EAAkD,MAAM,KAAK,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAwC,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAA0B,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,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