diff --git a/Directory.Packages.props b/Directory.Packages.props index bd67a4c1..b1cec0ad 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -24,7 +24,9 @@ + + diff --git a/Integrations/MCP/README.md b/Integrations/MCP/README.md new file mode 100644 index 00000000..c5b0b8da --- /dev/null +++ b/Integrations/MCP/README.md @@ -0,0 +1,121 @@ +# ScriptBee MCP Server + +This is the official Model Context Protocol (MCP) server for ScriptBee, built using the standard `.NET` MCP SDK. +It exposes ScriptBee capabilities (project management, context loading, script execution, and analysis) to AI clients like Claude Desktop, Claude Code, GitHub Copilot, or VS Code. + +## Running the Server + +You can run the server in two modes: + +### HTTP Transport +```bash +cd src/ScriptBee.MCP +dotnet run +``` +The server will start on `http://localhost:5094` (or the configured port) and expose the `/mcp` endpoint for SSE connections. + +For clients that support connecting to a remote MCP server natively via a URL (such as GitHub Copilot / VS Code via its MCP extension), you can configure the connection directly in your `mcp.json` like this: + +```json +{ + "mcpServers": { + "scriptbee-mcp-server": { + "url": "http://localhost:5094/mcp", + "type": "http" + } + } +} +``` +*(Replace `5094` with the actual port the MCP server is running on)* + +### Stdio Transport (for IDEs and Claude Desktop) +```bash +cd src/ScriptBee.MCP +dotnet run -- --stdio +``` + +## Configuring Client Applications + +### VS Code, Claude Code, or GitHub Copilot + +You can add this server to your local tools using an `mcp.json` configuration file (or the IDE's corresponding settings file). + +Create or update your `mcp.json` with the following. You can either point to the compiled executable (recommended) or run it from source using `dotnet run`. + +**Option 1: Using the compiled executable (Recommended)** +After building or publishing the project, point directly to the output executable. + +```json +{ + "mcpServers": { + "scriptbee": { + "command": "C:/Absolute/Path/To/ScriptBee.MCP.exe", + "args": [ + "--stdio" + ] + } + } +} +``` + +**Option 2: Running from source (Development)** +```json +{ + "mcpServers": { + "scriptbee": { + "command": "dotnet", + "args": [ + "run", + "--project", + "C:/Absolute/Path/To/ScriptBee.MCP.csproj", + "--", + "--stdio" + ] + } + } +} +``` + +### Claude Desktop + +Add the following to your Claude Desktop `claude_desktop_config.json` file (usually located at `%APPDATA%\Claude\claude_desktop_config.json` on Windows): + +```json +{ + "mcpServers": { + "scriptbee": { + "command": "C:/Absolute/Path/To/ScriptBee.MCP.exe", + "args": [ + "--stdio" + ] + } + } +} +``` + +## Exposed Capabilities + +### Tools +- **ProjectTools**: Manage projects (`GetProjects`, `CreateProject`, etc.) +- **ScriptTools**: Manage scripts and project files +- **InstanceTools**: Manage execution instances +- **ContextTools**: Load and link data contexts, search the context graph +- **AnalysisTools**: Trigger script analyses and fetch results/logs + +### Resources +- **Script Source Code**: Read script contents (`scriptbee://projects/{projectId}/scripts/{scriptId}/content`) +- **Analysis Console Output**: Read analysis logs (`scriptbee://projects/{projectId}/analyses/{analysisId}/console`) +- **Instance Context**: View the loaded context graph summary (`scriptbee://projects/{projectId}/instances/{instanceId}/context`) + +### Prompts +- **explore-project**: Guides the AI to give an overview of a project. +- **load-and-link-context**: Guides the AI through the context ingestion workflow. +- **run-analysis**: A workflow for the AI to run an analysis and monitor it until completion. + +## Configuration + +The ScriptBee MCP server can be configured via command-line arguments or environment variables. Below are the available options: + +| Option | Description | Default | +| ------------- | ------------------------------------- | ----------------------- | +| GatewayApiUrl | The URL of the ScriptBee Gateway API. | `http://localhost:5117` | diff --git a/Integrations/MCP/ScriptBee.MCP/Generated/GatewayApi.g.cs b/Integrations/MCP/ScriptBee.MCP/Generated/GatewayApi.g.cs new file mode 100644 index 00000000..679374d6 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Generated/GatewayApi.g.cs @@ -0,0 +1,2801 @@ +// +// This code was generated by Refitter. +// + + +using Refit; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; +using ScriptBee.MCP.Gateway.Generated.Contracts; + +#nullable enable annotations + +namespace ScriptBee.MCP.Gateway.Generated +{ + /// ScriptBee Gateway API + [System.CodeDom.Compiler.GeneratedCode("Refitter", "2.0.0.0")] + public partial interface IGatewayApi + { + /// Create a new project + /// Creates a new project with the specified name and description. + /// body parameter + /// The cancellation token to cancel the request. + /// Created + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 409 + /// Conflict + /// + /// + /// + [Headers("Accept: application/json, application/problem+json", "Content-Type: application/json")] + [Post("/api/projects")] + Task ProjectsPost([Body] CreateProjectCommand body, CancellationToken cancellationToken = default); + + /// Get all projects + /// Retrieves a list of all existing projects with their basic details. + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/projects")] + Task ProjectsGet(CancellationToken cancellationToken = default); + + /// Delete a project + /// Deletes a project and all its associated data, including scripts and artifacts. + /// projectId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// Thrown when the request returns a non-success status code. + [Delete("/api/projects/{projectId}")] + Task ProjectsDelete(string projectId, CancellationToken cancellationToken = default); + + /// Get project by ID + /// Retrieves detailed information about a specific project by its unique identifier. + /// projectId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}")] + Task ProjectsGet2(string projectId, CancellationToken cancellationToken = default); + + /// Create a new script + /// Creates a new script within the specified project. + /// projectId parameter + /// body parameter + /// The cancellation token to cancel the request. + /// Created + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 404 + /// Not Found + /// + /// + /// 409 + /// Conflict + /// + /// + /// + [Headers("Accept: application/json, application/problem+json", "Content-Type: application/json")] + [Post("/api/projects/{projectId}/scripts")] + Task ScriptsPost(string projectId, [Body] CreateScriptCommand body, CancellationToken cancellationToken = default); + + /// Get all project scripts + /// Retrieves a list of all scripts available in the specified project. + /// projectId parameter + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/scripts")] + Task ScriptsGet(string projectId, CancellationToken cancellationToken = default); + + /// Delete a project structure node + /// Deletes a file or directory (node) from the project structure. + /// projectId parameter + /// fileId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Delete("/api/projects/{projectId}/files/{fileId}")] + Task FilesDelete(string projectId, string fileId, CancellationToken cancellationToken = default); + + /// Get project script by ID + /// Retrieves metadata about a specific project script. + /// projectId parameter + /// scriptId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/scripts/{scriptId}")] + Task ScriptsGet2(string projectId, string scriptId, CancellationToken cancellationToken = default); + + /// Update project script metadata + /// Updates the metadata (name, parameters) of a specific project script. + /// projectId parameter + /// scriptId parameter + /// body parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json", "Content-Type: application/json")] + [Patch("/api/projects/{projectId}/scripts/{scriptId}")] + Task ScriptsPatch(string projectId, string scriptId, [Body] UpdateScriptCommand body, CancellationToken cancellationToken = default); + + /// Get project script content + /// Retrieves the actual code content of a project script. + /// projectId parameter + /// scriptId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, text/plain")] + [Get("/api/projects/{projectId}/scripts/{scriptId}/content")] + Task ContentGet(string projectId, string scriptId, CancellationToken cancellationToken = default); + + /// Update project script content + /// Updates the actual code content of a specific project script. + /// projectId parameter + /// scriptId parameter + /// body parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json", "Content-Type: text/plain")] + [Put("/api/projects/{projectId}/scripts/{scriptId}/content")] + Task ContentPut(string projectId, string scriptId, [Body] StreamPart body, CancellationToken cancellationToken = default); + + /// Get project files + /// Retrieves a paginated list of files and directories within the specified project. + /// projectId parameter + /// parentId parameter + /// offset parameter + /// limit parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/files")] + Task FilesGet(string projectId, [Query] string parentId, [Query] int? offset, [Query] int? limit, CancellationToken cancellationToken = default); + + /// Get available script types + /// Retrieves a list of all script languages and types supported by the project. + /// projectId parameter + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/structure/available-script-types")] + Task AvailableScriptTypes(string projectId, CancellationToken cancellationToken = default); + + /// Get all available plugins + /// Retrieves a list of all available plugins from the marketplace. + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/plugins")] + Task PluginsGet(CancellationToken cancellationToken = default); + + /// Get plugin by ID + /// Retrieves detailed information about a specific plugin from the marketplace by its unique identifier. + /// id parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/plugins/{id}")] + Task PluginsGet2(string id, CancellationToken cancellationToken = default); + + /// Get installed plugins for a project + /// Retrieves a list of all plugins currently installed in the specified project. + /// projectId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/plugins")] + Task PluginsGet3(string projectId, CancellationToken cancellationToken = default); + + /// Upload and install a plugin + /// Uploads a plugin ZIP file and installs it into the project. + /// projectId parameter + /// file parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 404 + /// Not Found + /// + /// + /// 500 + /// Internal Server Error + /// + /// + /// + [Multipart] + [Headers("Accept: application/json")] + [Post("/api/projects/{projectId}/plugins")] + Task PluginsPost(string projectId, StreamPart file, CancellationToken cancellationToken = default); + + /// Get installed plugin details + /// Retrieves detailed information about a specific plugin installed in a project. + /// projectId parameter + /// pluginId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/plugins/{pluginId}")] + Task PluginsGet4(string projectId, string pluginId, CancellationToken cancellationToken = default); + + /// Install a plugin from marketplace + /// Installs a specific version of a plugin from the marketplace into the project. + /// projectId parameter + /// pluginId parameter + /// version parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// 500 + /// Internal Server Error + /// + /// + /// + [Headers("Accept: application/json")] + [Put("/api/projects/{projectId}/plugins/{pluginId}")] + Task PluginsPut(string projectId, string pluginId, [Query] string version, CancellationToken cancellationToken = default); + + /// Uninstall a plugin from a project + /// Uninstalls a specific plugin version from the specified project. + /// projectId parameter + /// pluginId parameter + /// version parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Delete("/api/projects/{projectId}/plugins/{pluginId}")] + Task PluginsDelete(string projectId, string pluginId, [Query] string version, CancellationToken cancellationToken = default); + + /// Get gateway plugins + /// Retrieves a list of all plugins installed at the gateway level. + /// kind parameter + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/plugins/gateway")] + Task GatewayGet([Query] string kind, CancellationToken cancellationToken = default); + + /// Install gateway plugin + /// Installs a new plugin at the gateway level. + /// body parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// Thrown when the request returns a non-success status code. + [Headers("Content-Type: application/json")] + [Post("/api/plugins/gateway")] + Task GatewayPost([Body] InstallGatewayPluginRequest body, CancellationToken cancellationToken = default); + + /// Uninstall gateway plugin + /// Uninstalls a plugin from the gateway level. + /// pluginId parameter + /// version parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// Thrown when the request returns a non-success status code. + [Delete("/api/plugins/gateway/{pluginId}")] + Task GatewayDelete(string pluginId, [Query] string version, CancellationToken cancellationToken = default); + + /// Get the manifest for UI plugins + /// Retrieves a map with the installed UI plugin remotes and the associated remoteEntry.js file. + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/plugins/gateway/ui/manifest")] + Task> Manifest(CancellationToken cancellationToken = default); + + /// Upload files for a loader + /// Uploads one or more files to be used by a specific loader in the project. + /// projectId parameter + /// loaderId parameter + /// files parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Multipart] + [Headers("Accept: application/json")] + [Put("/api/projects/{projectId}/loaders/{loaderId}/files")] + Task Files(string projectId, string loaderId, IEnumerable files, CancellationToken cancellationToken = default); + + /// Add a new project instance + /// Allocates and adds a new execution instance for the specified project. + /// projectId parameter + /// The cancellation token to cancel the request. + /// Created + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Post("/api/projects/{projectId}/instances")] + Task InstancesPost(string projectId, CancellationToken cancellationToken = default); + + /// Get all project instances + /// Retrieves a list of all instances associated with the specified project. + /// projectId parameter + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/instances")] + Task InstancesGet(string projectId, CancellationToken cancellationToken = default); + + /// Get project instance by ID + /// Retrieves detailed information about a specific project instance. + /// projectId parameter + /// instanceId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/instances/{instanceId}")] + Task InstancesGet2(string projectId, string instanceId, CancellationToken cancellationToken = default); + + /// Remove a project instance + /// Deallocates and removes a specific project instance. + /// projectId parameter + /// instanceId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Delete("/api/projects/{projectId}/instances/{instanceId}")] + Task InstancesDelete(string projectId, string instanceId, CancellationToken cancellationToken = default); + + /// Get available linkers for an instance + /// Retrieves a list of all linkers available for the specified project instance. + /// projectId parameter + /// instanceId parameter + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/instances/{instanceId}/linkers")] + Task Linkers(string projectId, string instanceId, CancellationToken cancellationToken = default); + + /// Get available loaders for an instance + /// Retrieves a list of all loaders available for the specified project instance. + /// projectId parameter + /// instanceId parameter + /// The cancellation token to cancel the request. + /// OK + /// Thrown when the request returns a non-success status code. + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/instances/{instanceId}/loaders")] + Task Loaders(string projectId, string instanceId, CancellationToken cancellationToken = default); + + /// Get current instance context + /// Retrieves the current data context for the specified project instance. + /// projectId parameter + /// instanceId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/instances/{instanceId}/context")] + Task Context(string projectId, string instanceId, CancellationToken cancellationToken = default); + + /// Search context nodes + /// Searches for context nodes based on a query string. + /// projectId parameter + /// instanceId parameter + /// query parameter + /// offset parameter + /// limit parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/instances/{instanceId}/context/graph")] + Task Graph(string projectId, string instanceId, [Query] string query, [Query] int? offset, [Query] int? limit, CancellationToken cancellationToken = default); + + /// Get node neighbors + /// Retrieves the immediate neighbors and edges for a specific context node. + /// projectId parameter + /// instanceId parameter + /// nodeId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/instances/{instanceId}/context/graph/neighbors")] + Task Neighbors(string projectId, string instanceId, [Query] string nodeId, CancellationToken cancellationToken = default); + + /// Clear instance context + /// Clears all loaded data from the current context of the specified project instance. + /// projectId parameter + /// instanceId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Post("/api/projects/{projectId}/instances/{instanceId}/context/clear")] + Task Clear(string projectId, string instanceId, CancellationToken cancellationToken = default); + + /// Generate classes for instance context + /// Generates script classes based on the current data context for the specified project instance and returns them as a stream. + /// projectId parameter + /// instanceId parameter + /// body parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json", "Content-Type: application/json")] + [Post("/api/projects/{projectId}/instances/{instanceId}/context/generate-classes")] + Task GenerateClasses(string projectId, string instanceId, [Body] ProjectContextGenerateClassesRequest body, CancellationToken cancellationToken = default); + + /// Link instance context + /// Links the data context of the specified project instance using the provided linkers. + /// projectId parameter + /// instanceId parameter + /// body parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json", "Content-Type: application/json")] + [Post("/api/projects/{projectId}/instances/{instanceId}/context/link")] + Task Link(string projectId, string instanceId, [Body] LinkContextCommand body, CancellationToken cancellationToken = default); + + /// Load instance context + /// Loads data into the context of the specified project instance using the provided loaders. + /// projectId parameter + /// instanceId parameter + /// body parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json", "Content-Type: application/json")] + [Post("/api/projects/{projectId}/instances/{instanceId}/context/load")] + Task Load(string projectId, string instanceId, [Body] LoadContextCommand body, CancellationToken cancellationToken = default); + + /// Reload instance context + /// Reloads the data context for the specified project instance, refreshing all linked and loaded data. + /// projectId parameter + /// instanceId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Post("/api/projects/{projectId}/instances/{instanceId}/context/reload")] + Task Reload(string projectId, string instanceId, CancellationToken cancellationToken = default); + + /// Delete analysis + /// Deletes a specific analysis and all its associated artifacts. + /// projectId parameter + /// analysisId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// Thrown when the request returns a non-success status code. + [Delete("/api/projects/{projectId}/analyses/{analysisId}")] + Task AnalysesDelete(string projectId, string analysisId, CancellationToken cancellationToken = default); + + /// Get analysis status by ID + /// Retrieves the current status and details of a specific analysis. + /// projectId parameter + /// analysisId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses/{analysisId}")] + Task AnalysesGet(string projectId, string analysisId, CancellationToken cancellationToken = default); + + /// Download individual analysis result file + /// Downloads a specific file generated as a result of an analysis. + /// projectId parameter + /// analysisId parameter + /// fileId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses/{analysisId}/results/files/{fileId}")] + Task FilesGet2(string projectId, string analysisId, string fileId, CancellationToken cancellationToken = default); + + /// Download all analysis result files + /// Downloads a ZIP archive containing all files generated as a result of an analysis. + /// projectId parameter + /// analysisId parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses/{analysisId}/results/files/download")] + Task Download(string projectId, string analysisId, CancellationToken cancellationToken = default); + + /// Get console analysis results + /// Retrieves the console output generated during the analysis. + /// projectId parameter + /// analysisId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses/{analysisId}/results/console")] + Task Console(string projectId, string analysisId, CancellationToken cancellationToken = default); + + /// Get analysis error results + /// Retrieves a list of errors that occurred during the analysis execution. + /// projectId parameter + /// analysisId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses/{analysisId}/results/errors")] + Task Errors(string projectId, string analysisId, CancellationToken cancellationToken = default); + + /// Get analysis file results + /// Retrieves a list of files generated as a result of the analysis. + /// projectId parameter + /// analysisId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses/{analysisId}/results/files")] + Task FilesGet3(string projectId, string analysisId, CancellationToken cancellationToken = default); + + /// Get analysis script content + /// Retrieves the actual code content of a script used in a specific analysis. + /// projectId parameter + /// analysisId parameter + /// scriptId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, text/plain")] + [Get("/api/projects/{projectId}/analyses/{analysisId}/scripts/{scriptId}/content")] + Task Content(string projectId, string analysisId, string scriptId, CancellationToken cancellationToken = default); + + /// Get analysis script metadata + /// Retrieves metadata about a script used in a specific analysis, such as its name and type. + /// projectId parameter + /// analysisId parameter + /// scriptId parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses/{analysisId}/scripts/{scriptId}")] + Task Scripts(string projectId, string analysisId, string scriptId, CancellationToken cancellationToken = default); + + /// Get all analyses for a project + /// Retrieves a list of all analyses performed within the specified project. + /// projectId parameter + /// sort parameter + /// The cancellation token to cancel the request. + /// OK + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json")] + [Get("/api/projects/{projectId}/analyses")] + Task AnalysesGet2(string projectId, [Query] string sort, CancellationToken cancellationToken = default); + + /// Trigger a new analysis + /// Triggers a new analysis for a specific project instance using a given script. + /// projectId parameter + /// instanceId parameter + /// body parameter + /// The cancellation token to cancel the request. + /// A that completes when the request is finished. + /// + /// Thrown when the request returns a non-success status code: + /// + /// + /// Status + /// Description + /// + /// + /// 400 + /// Bad Request + /// + /// + /// 404 + /// Not Found + /// + /// + /// + [Headers("Accept: application/json, application/problem+json", "Content-Type: application/json")] + [Post("/api/projects/{projectId}/instances/{instanceId}/analyses")] + Task Analyses(string projectId, string instanceId, [Body] TriggerAnalysisCommand body, CancellationToken cancellationToken = default); + + + } + +} + +//---------------------- +// +// Generated using the NSwag toolchain v14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" +#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null" +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8600 // Disable "CS8600 Converting null literal or possible null value to non-nullable type" +#pragma warning disable 8602 // Disable "CS8602 Dereference of a possibly null reference" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" +#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." + +namespace ScriptBee.MCP.Gateway.Generated.Contracts +{ + using System = global::System; + + + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AllAvailablePluginsResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AnalysisError + { + + [JsonPropertyName("message")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Message { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AnalysisInfo + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("instanceId")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string InstanceId { get; set; } + + [JsonPropertyName("status")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Status { get; set; } + + [JsonPropertyName("scriptId")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ScriptId { get; set; } + + [JsonPropertyName("scriptFileId")] + public string ScriptFileId { get; set; } + + [JsonPropertyName("creationDate")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset CreationDate { get; set; } + + [JsonPropertyName("finishedDate")] + public System.DateTimeOffset? FinishedDate { get; set; } + + [JsonPropertyName("errors")] + public ICollection Errors { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AnalysisListResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AnalysisResultRunError + { + + [JsonPropertyName("title")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Title { get; set; } + + [JsonPropertyName("message")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Message { get; set; } + + [JsonPropertyName("severity")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Severity { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class BundleItem + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ContextGraphEdge + { + + [JsonPropertyName("source")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Source { get; set; } + + [JsonPropertyName("target")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Target { get; set; } + + [JsonPropertyName("label")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Label { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ContextGraphNode + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("label")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Label { get; set; } + + [JsonPropertyName("type")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Type { get; set; } + + [JsonPropertyName("loader")] + public string Loader { get; set; } + + [JsonPropertyName("properties")] + [System.ComponentModel.DataAnnotations.Required] + public object Properties { get; set; } = new object(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ContextGraphResponse + { + + [JsonPropertyName("nodes")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Nodes { get; set; } = new System.Collections.ObjectModel.Collection(); + + [JsonPropertyName("edges")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Edges { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Command used to create a new project. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class CreateProjectCommand + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class CreateProjectResponse + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("creationDate")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset CreationDate { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class CreateScriptCommand + { + + [JsonPropertyName("path")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Path { get; set; } + + [JsonPropertyName("language")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Language { get; set; } + + [JsonPropertyName("parameters")] + public ICollection Parameters { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ExtensionPoint + { + + [JsonPropertyName("kind")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Kind { get; set; } + + [JsonPropertyName("language")] + public string Language { get; set; } + + [JsonPropertyName("extension")] + public string Extension { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class FileData + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GatewayPluginsResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetAnalysisResultConsole + { + + [JsonPropertyName("content")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Content { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetAnalysisResultFile + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("type")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Type { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetAnalysisResultFileList + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetAnalysisResultRunErrors + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetAvailableScriptTypesResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetLinkersResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetLoadersResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetProjectContextResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetProjectFilesResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + [JsonPropertyName("totalCount")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^-?(?:0|[1-9]\d*)$")] + public long TotalCount { get; set; } + + [JsonPropertyName("offset")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^-?(?:0|[1-9]\d*)$")] + public int Offset { get; set; } + + [JsonPropertyName("limit")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^-?(?:0|[1-9]\d*)$")] + public int Limit { get; set; } + + [JsonPropertyName("hasNextPage")] + public bool HasNextPage { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetProjectInstancesListResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetProjectListResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GetScriptDataResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class HttpValidationProblemDetails + { + + [JsonPropertyName("type")] + public string Type { get; set; } + + [JsonPropertyName("title")] + public string Title { get; set; } + + [JsonPropertyName("status")] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^-?(?:0|[1-9]\d*)$")] + public int? Status { get; set; } + + [JsonPropertyName("detail")] + public string Detail { get; set; } + + [JsonPropertyName("instance")] + public string Instance { get; set; } + + [JsonPropertyName("errors")] + public IDictionary> Errors { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class IFormFileCollection : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Represents an installed gateway plugin with its ID and version. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledGatewayPlugin + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("version")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Version { get; set; } + + [JsonPropertyName("extensionPoints")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection ExtensionPoints { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Represents the extension points of an installed gateway plugin. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledGatewayPluginExtensionPoint + { + + [JsonPropertyName("kind")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Kind { get; set; } + + [JsonPropertyName("remoteName")] + public string RemoteName { get; set; } + + [JsonPropertyName("remoteEntry")] + public string RemoteEntry { get; set; } + + [JsonPropertyName("outlets")] + public ICollection Outlets { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Base class for outlets of an installed gateway plugin extension point. + /// + [JsonInheritanceConverter(typeof(InstalledGatewayPluginExtensionPointOutletBase), "type")] + [JsonInheritanceAttribute("top-navigation-bar", typeof(InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginTopNavigationBarOutlet))] + [JsonInheritanceAttribute("side-panel", typeof(InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginSidePanelOutlet))] + [JsonInheritanceAttribute("file-previewer", typeof(InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginFilePreviewerOutlet))] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledGatewayPluginExtensionPointOutletBase + { + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Represents a component for file previewer of output results. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginFilePreviewerOutlet : InstalledGatewayPluginExtensionPointOutletBase + { + + [JsonPropertyName("type")] +public InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginFilePreviewerOutletType Type { get; set; } + + [JsonPropertyName("exposedModule")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ExposedModule { get; set; } + + [JsonPropertyName("label")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Label { get; set; } + + [JsonPropertyName("componentName")] + public string ComponentName { get; set; } + + [JsonPropertyName("icon")] + public string Icon { get; set; } + + [JsonPropertyName("supportedFileExtensions")] + public ICollection SupportedFileExtensions { get; set; } + + } + + /// + /// Represents an element from the Side Hamburger Panel with route. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginSidePanelOutlet : InstalledGatewayPluginExtensionPointOutletBase + { + + [JsonPropertyName("type")] +public InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginSidePanelOutletType Type { get; set; } + + [JsonPropertyName("exposedModule")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ExposedModule { get; set; } + + [JsonPropertyName("label")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Label { get; set; } + + [JsonPropertyName("path")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Path { get; set; } + + [JsonPropertyName("nested")] + public bool? Nested { get; set; } + + [JsonPropertyName("componentName")] + public string ComponentName { get; set; } + + [JsonPropertyName("icon")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Icon { get; set; } + + } + + /// + /// Represents an element from the Top Navigation Bar with route. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginTopNavigationBarOutlet : InstalledGatewayPluginExtensionPointOutletBase + { + + [JsonPropertyName("type")] +public InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginTopNavigationBarOutletType Type { get; set; } + + [JsonPropertyName("exposedModule")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ExposedModule { get; set; } + + [JsonPropertyName("label")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Label { get; set; } + + [JsonPropertyName("path")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Path { get; set; } + + [JsonPropertyName("nested")] + public bool? Nested { get; set; } + + [JsonPropertyName("componentName")] + public string ComponentName { get; set; } + + } + + /// + /// Represents an installed plugin with its ID and version. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledPlugin + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("version")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Version { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstalledPluginsResponse + { + + [JsonPropertyName("data")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Data { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class InstallGatewayPluginRequest + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("version")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Version { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class LinkContextCommand + { + + [JsonPropertyName("linkerIds")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection LinkerIds { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Linker + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class LoadContextCommand + { + + [JsonPropertyName("loaderIds")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection LoaderIds { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Loader + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class MarketplacePlugin + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("type")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Type { get; set; } + + [JsonPropertyName("description")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Description { get; set; } + + [JsonPropertyName("authors")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Authors { get; set; } = new System.Collections.ObjectModel.Collection(); + + [JsonPropertyName("versions")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Versions { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class MarketplacePluginWithDetails + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("type")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Type { get; set; } + + [JsonPropertyName("description")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Description { get; set; } + + [JsonPropertyName("authors")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Authors { get; set; } = new System.Collections.ObjectModel.Collection(); + + [JsonPropertyName("versions")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Versions { get; set; } = new System.Collections.ObjectModel.Collection(); + + [JsonPropertyName("bundleItems")] + public ICollection BundleItems { get; set; } + + [JsonPropertyName("sourceCode")] + public string SourceCode { get; set; } + + [JsonPropertyName("manifest")] + public string Manifest { get; set; } + + [JsonPropertyName("site")] + public string Site { get; set; } + + [JsonPropertyName("license")] + public string License { get; set; } + + [JsonPropertyName("tags")] + public ICollection Tags { get; set; } + + [JsonPropertyName("technologies")] + public ICollection Technologies { get; set; } + + [JsonPropertyName("extensionPoints")] + public ICollection ExtensionPoints { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PluginVersion + { + + [JsonPropertyName("url")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Url { get; set; } + + [JsonPropertyName("version")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Version { get; set; } + + [JsonPropertyName("manifestUrl")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ManifestUrl { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProblemDetails + { + + [JsonPropertyName("type")] + public string Type { get; set; } + + [JsonPropertyName("title")] + public string Title { get; set; } + + [JsonPropertyName("status")] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^-?(?:0|[1-9]\d*)$")] + public int? Status { get; set; } + + [JsonPropertyName("detail")] + public string Detail { get; set; } + + [JsonPropertyName("instance")] + public string Instance { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Represents basic project information. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Project + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("creationDate")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset CreationDate { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProjectContextGenerateClassesRequest + { + + [JsonPropertyName("languages")] + public ICollection Languages { get; set; } + + [JsonPropertyName("transferFormat")] + public string TransferFormat { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProjectContextSlice + { + + [JsonPropertyName("model")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Model { get; set; } + + [JsonPropertyName("pluginIds")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection PluginIds { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Represents detailed project information, including saved and loaded files. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProjectDetails + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("creationDate")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset CreationDate { get; set; } + + [JsonPropertyName("savedFiles")] + [System.ComponentModel.DataAnnotations.Required] + public IDictionary> SavedFiles { get; set; } = new Dictionary>(); + + [JsonPropertyName("loadedFiles")] + [System.ComponentModel.DataAnnotations.Required] + public IDictionary> LoadedFiles { get; set; } = new Dictionary>(); + + [JsonPropertyName("linkers")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Linkers { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProjectFileNode + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("path")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Path { get; set; } + + [JsonPropertyName("type")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Type { get; set; } + + [JsonPropertyName("hasChildren")] + public bool HasChildren { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Represents an instance of a project execution. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProjectInstance + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("creationDate")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset CreationDate { get; set; } + + [JsonPropertyName("status")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Status { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ScriptData + { + + [JsonPropertyName("id")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("path")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Path { get; set; } + + [JsonPropertyName("scriptLanguage")] + [System.ComponentModel.DataAnnotations.Required] + public ScriptLanguage ScriptLanguage { get; set; } = new ScriptLanguage(); + + [JsonPropertyName("parameters")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection Parameters { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ScriptLanguage + { + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("extension")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Extension { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ScriptParameter + { + + [JsonPropertyName("name")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Name { get; set; } + + [JsonPropertyName("type")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Type { get; set; } + + [JsonPropertyName("value")] + [System.ComponentModel.DataAnnotations.Required] + public object Value { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + /// + /// Command used to trigger a script analysis. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class TriggerAnalysisCommand + { + + [JsonPropertyName("scriptId")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ScriptId { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class UpdateScriptCommand + { + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("parameters")] + public ICollection Parameters { get; set; } + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class UploadLoaderFilesResponse + { + + [JsonPropertyName("loaderId")] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string LoaderId { get; set; } + + [JsonPropertyName("fileNames")] + [System.ComponentModel.DataAnnotations.Required] + public ICollection FileNames { get; set; } = new System.Collections.ObjectModel.Collection(); + + private IDictionary _additionalProperties; + + [JsonExtensionData] + public IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new Dictionary()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public enum InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginFilePreviewerOutletType + { + + [System.Runtime.Serialization.EnumMember(Value = @"file-previewer")] + FilePreviewer = 0, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public enum InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginSidePanelOutletType + { + + [System.Runtime.Serialization.EnumMember(Value = @"side-panel")] + SidePanel = 0, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public enum InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginTopNavigationBarOutletType + { + + [System.Runtime.Serialization.EnumMember(Value = @"top-navigation-bar")] + TopNavigationBar = 0, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple = true)] + internal class JsonInheritanceAttribute : System.Attribute + { + public JsonInheritanceAttribute(string key, System.Type type) + { + Key = key; + Type = type; + } + + public string Key { get; } + + public System.Type Type { get; } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + internal class JsonInheritanceConverterAttribute : JsonConverterAttribute + { + public string DiscriminatorName { get; } + + public JsonInheritanceConverterAttribute(System.Type baseType, string discriminatorName = "discriminator") + : base(typeof(JsonInheritanceConverter<>).MakeGenericType(baseType)) + { + DiscriminatorName = discriminatorName; + } + } + + public class JsonInheritanceConverter : JsonConverter + { + private readonly string _discriminatorName; + + public JsonInheritanceConverter() + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(typeof(TBase)); + _discriminatorName = attribute?.DiscriminatorName ?? "discriminator"; + } + + public JsonInheritanceConverter(string discriminatorName) + { + _discriminatorName = discriminatorName; + } + + public string DiscriminatorName { get { return _discriminatorName; } } + + public override TBase Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + var document = System.Text.Json.JsonDocument.ParseValue(ref reader); + var hasDiscriminator = document.RootElement.TryGetProperty(_discriminatorName, out var discriminator); + var subtype = GetDiscriminatorType(document.RootElement, typeToConvert, hasDiscriminator ? discriminator.GetString() : null); + + var bufferWriter = new System.IO.MemoryStream(); + using (var writer = new System.Text.Json.Utf8JsonWriter(bufferWriter)) + { + document.RootElement.WriteTo(writer); + } + + return (TBase)System.Text.Json.JsonSerializer.Deserialize(bufferWriter.ToArray(), subtype, options); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, TBase value, System.Text.Json.JsonSerializerOptions options) + { + if (value != null) + { + writer.WriteStartObject(); + writer.WriteString(_discriminatorName, GetDiscriminatorValue(value.GetType())); + + var bytes = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes((object)value, options); + var document = System.Text.Json.JsonDocument.Parse(bytes); + foreach (var property in document.RootElement.EnumerateObject()) + { + property.WriteTo(writer); + } + + writer.WriteEndObject(); + } + else + { + writer.WriteNullValue(); + } + } + + public string GetDiscriminatorValue(System.Type type) + { + var jsonInheritanceAttributeDiscriminator = GetSubtypeDiscriminator(type); + if (jsonInheritanceAttributeDiscriminator != null) + { + return jsonInheritanceAttributeDiscriminator; + } + + return type.Name; + } + + protected System.Type GetDiscriminatorType(System.Text.Json.JsonElement jObject, System.Type objectType, string discriminatorValue) + { + if (discriminatorValue != null) + { + var jsonInheritanceAttributeSubtype = GetObjectSubtype(objectType, discriminatorValue); + if (jsonInheritanceAttributeSubtype != null) + { + return jsonInheritanceAttributeSubtype; + } + + if (objectType.Name == discriminatorValue) + { + return objectType; + } + + var typeName = objectType.Namespace + "." + discriminatorValue; + var subtype = System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType).Assembly.GetType(typeName); + if (subtype != null) + { + return subtype; + } + } + + throw new System.InvalidOperationException("Could not find subtype of '" + objectType.Name + "' with discriminator '" + discriminatorValue + "'."); + } + + private System.Type GetObjectSubtype(System.Type baseType, string discriminatorValue) + { + foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes(System.Reflection.IntrospectionExtensions.GetTypeInfo(baseType), true)) + { + if (attribute.Key == discriminatorValue) + return attribute.Type; + } + + return null; + } + + private string GetSubtypeDiscriminator(System.Type objectType) + { + foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes(System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType), true)) + { + if (attribute.Type == objectType) + return attribute.Key; + } + + return null; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class FileParameter + { + public FileParameter(System.IO.Stream data) + : this (data, null, null) + { + } + + public FileParameter(System.IO.Stream data, string fileName) + : this (data, fileName, null) + { + } + + public FileParameter(System.IO.Stream data, string fileName, string contentType) + { + Data = data; + FileName = fileName; + ContentType = contentType; + } + + public System.IO.Stream Data { get; private set; } + + public string FileName { get; private set; } + + public string ContentType { get; private set; } + } + + +} + +#pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 649 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 +#pragma warning restore 3016 +#pragma warning restore 8600 +#pragma warning restore 8602 +#pragma warning restore 8603 +#pragma warning restore 8604 +#pragma warning restore 8625 +#pragma warning restore 8765 \ No newline at end of file diff --git a/Integrations/MCP/ScriptBee.MCP/Program.cs b/Integrations/MCP/ScriptBee.MCP/Program.cs new file mode 100644 index 00000000..ea1f12a1 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Program.cs @@ -0,0 +1,68 @@ +using Refit; +using ScriptBee.MCP.Gateway.Generated; +using ScriptBee.MCP.Prompts; +using ScriptBee.MCP.Resources; +using ScriptBee.MCP.Tools; +using Serilog; + +if (args.Contains("--stdio")) +{ + await RunAsStdioServer(args); + return; +} + +await RunAsHttpServer(args); +return; + +static async Task RunAsStdioServer(string[] args) +{ + var host = Host.CreateApplicationBuilder(args); + + host.Logging.ClearProviders(); + host.Logging.AddConsole(options => options.LogToStandardErrorThreshold = LogLevel.Warning); + + host.Services.AddServices(host.Configuration); + + await host.Build().RunAsync(); +} + +static async Task RunAsHttpServer(string[] args) +{ + Log.Logger = new LoggerConfiguration().WriteTo.Console().CreateBootstrapLogger(); + + var builder = WebApplication.CreateBuilder(args); + + builder.Host.UseSerilog( + (ctx, _, config) => config.ReadFrom.Configuration(ctx.Configuration).WriteTo.Console() + ); + + builder.Services.AddServices(builder.Configuration); + + var app = builder.Build(); + + app.MapMcp("/mcp"); + + await app.RunAsync(); +} + +internal static class ServicesExtensions +{ + public static void AddServices( + this IServiceCollection services, + ConfigurationManager configuration + ) + { + services + .AddRefitClient() + .ConfigureHttpClient(c => + c.BaseAddress = new Uri(configuration["GatewayApiUrl"] ?? "http://localhost:5117") + ); + + services + .AddMcpServer() + .WithHttpTransport() + .WithToolsFromAssembly(typeof(ProjectTools).Assembly) + .WithPromptsFromAssembly(typeof(ScriptBeePrompts).Assembly) + .WithResourcesFromAssembly(typeof(ScriptResources).Assembly); + } +} diff --git a/Integrations/MCP/ScriptBee.MCP/Prompts/ScriptBeePrompts.cs b/Integrations/MCP/ScriptBee.MCP/Prompts/ScriptBeePrompts.cs new file mode 100644 index 00000000..d9b8f98f --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Prompts/ScriptBeePrompts.cs @@ -0,0 +1,111 @@ +using System.ComponentModel; +using ModelContextProtocol.Protocol; +using ModelContextProtocol.Server; +using ScriptBee.MCP.Gateway.Generated; + +namespace ScriptBee.MCP.Prompts; + +[McpServerPromptType] +public sealed class ScriptBeePrompts +{ + [McpServerPrompt(Name = "run-analysis")] + [Description( + "Guides an AI through loading context and running a ScriptBee analysis script on a project instance." + )] + public GetPromptResult RunAnalysis( + [Description("The ID of the ScriptBee project to analyse.")] string projectId, + [Description("The ID of the instance to use (create one with CreateInstance if unsure).")] + string instanceId, + [Description("The ID of the script to execute.")] string scriptId + ) => + new() + { + Description = + "Guides an AI through loading context and running a ScriptBee analysis script on a project instance.", + Messages = + [ + new PromptMessage + { + Role = Role.User, + Content = new TextContentBlock + { + Text = $""" + Please run a ScriptBee analysis for me using the following details: + - Project ID: {projectId} + - Instance ID: {instanceId} + - Script ID: {scriptId} + + Steps to follow: + 1. Verify the project exists using GetProject. + 2. Check the current context with GetContext. If the context is empty, list loaders with GetLoaders and call LoadContext, then list linkers with GetLinkers and call LinkContext. + 3. Trigger the analysis with TriggerAnalysis using the project, instance and script IDs provided. + 4. Poll GetAnalysisStatus until the status is no longer 'Running'. + 5. Report the final status. If it succeeded, show the first lines of GetAnalysisConsole. If it failed, show the errors from GetAnalysisErrors. + """, + }, + }, + ], + }; + + [McpServerPrompt(Name = "explore-project")] + [Description( + "Gives an AI a structured starting point for exploring a ScriptBee project's scripts, instances, and recent analyses." + )] + public GetPromptResult ExploreProject( + [Description("The ID of the ScriptBee project to explore.")] string projectId + ) => + new() + { + Description = + "Gives an AI a structured starting point for exploring a ScriptBee project.", + Messages = + [ + new PromptMessage + { + Role = Role.User, + Content = new TextContentBlock + { + Text = $""" + Please give me an overview of ScriptBee project '{projectId}': + 1. Fetch the project details with GetProject. + 2. List all scripts with GetScripts and summarise them (name, language, path). + 3. List all instances with GetInstances and show their status. + 4. List the five most recent analyses with GetAnalyses (sort by createdAt:desc) and show their status and script used. + """, + }, + }, + ], + }; + + [McpServerPrompt(Name = "load-and-link-context")] + [Description( + "Guides an AI through the full context loading and linking workflow for a project instance." + )] + public GetPromptResult LoadAndLinkContext( + [Description("The ID of the ScriptBee project.")] string projectId, + [Description("The ID of the instance to load context into.")] string instanceId + ) => + new() + { + Description = + "Guides an AI through the full context loading and linking workflow for a project instance.", + Messages = + [ + new PromptMessage + { + Role = Role.User, + Content = new TextContentBlock + { + Text = $""" + Please load and link the full data context for project '{projectId}', instance '{instanceId}': + 1. Fetch available loaders with GetLoaders. + 2. Call LoadContext with all available loader IDs. + 3. Fetch available linkers with GetLinkers. + 4. Call LinkContext with all available linker IDs. + 5. Confirm by calling GetContext and summarising the loaded model. + """, + }, + }, + ], + }; +} diff --git a/Integrations/MCP/ScriptBee.MCP/Properties/launchSettings.json b/Integrations/MCP/ScriptBee.MCP/Properties/launchSettings.json new file mode 100644 index 00000000..2b2321e3 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Properties/launchSettings.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:5094", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Integrations/MCP/ScriptBee.MCP/Resources/ScriptResources.cs b/Integrations/MCP/ScriptBee.MCP/Resources/ScriptResources.cs new file mode 100644 index 00000000..d7e5af2f --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Resources/ScriptResources.cs @@ -0,0 +1,54 @@ +using System.ComponentModel; +using System.Text.Json; +using ModelContextProtocol.Server; +using ScriptBee.MCP.Gateway.Generated; + +namespace ScriptBee.MCP.Resources; + +[McpServerResourceType] +public sealed class ScriptResources(IGatewayApi gatewayApi) +{ + [McpServerResource( + UriTemplate = "scriptbee://projects/{projectId}/scripts/{scriptId}/content", + Name = "Script Source Code", + MimeType = "text/plain" + )] + public async Task GetScriptContent( + string projectId, + string scriptId, + CancellationToken cancellationToken + ) => await gatewayApi.ContentGet(projectId, scriptId, cancellationToken); + + [McpServerResource( + UriTemplate = "scriptbee://projects/{projectId}/analyses/{analysisId}/console", + Name = "Analysis Console Output", + MimeType = "text/plain" + )] + public async Task GetAnalysisConsole( + string projectId, + string analysisId, + CancellationToken cancellationToken + ) + { + var result = await gatewayApi.Console(projectId, analysisId, cancellationToken); + return result.Content; + } + + [McpServerResource( + UriTemplate = "scriptbee://projects/{projectId}/instances/{instanceId}/context", + Name = "Instance Context", + MimeType = "application/json" + )] + public async Task GetInstanceContext( + string projectId, + string instanceId, + CancellationToken cancellationToken + ) + { + var context = await gatewayApi.Context(projectId, instanceId, cancellationToken); + return JsonSerializer.Serialize( + context, + new JsonSerializerOptions { WriteIndented = true } + ); + } +} diff --git a/Integrations/MCP/ScriptBee.MCP/ScriptBee.MCP.csproj b/Integrations/MCP/ScriptBee.MCP/ScriptBee.MCP.csproj new file mode 100644 index 00000000..72bf4e94 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/ScriptBee.MCP.csproj @@ -0,0 +1,21 @@ + + + net10.0 + enable + enable + ScriptBee.MCP + true + + + + + + + + + + + + + + diff --git a/Integrations/MCP/ScriptBee.MCP/ScriptBee.MCP.refitter b/Integrations/MCP/ScriptBee.MCP/ScriptBee.MCP.refitter new file mode 100644 index 00000000..47fc5b6b --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/ScriptBee.MCP.refitter @@ -0,0 +1,25 @@ +{ + "openApiPath": "../../../docs/public/gateway_swagger.json", + "namespace": "ScriptBee.MCP.Gateway.Generated", + "contractsNamespace": "ScriptBee.MCP.Gateway.Generated.Contracts", + "propertyNamingPolicy": "PascalCase", + "naming": { + "useOpenApiTitle": false, + "interfaceName": "GatewayApi" + }, + "generateContracts": true, + "generateClients": true, + "useCancellationTokens": true, + "immutableRecords": false, + "generateNullableReferenceTypes": true, + "generateNativeRecords": false, + "outputFolder": "./Generated", + "outputFilename": "GatewayApi.g.cs", + "responseTypeOverride": { + "GetScriptContent": "string", + "GetAnalysisScriptContent": "string", + "FilesGet2": "System.IO.Stream", + "Download": "System.IO.Stream", + "GenerateClasses": "System.IO.Stream" + } +} diff --git a/Integrations/MCP/ScriptBee.MCP/Tools/AnalysisTools.cs b/Integrations/MCP/ScriptBee.MCP/Tools/AnalysisTools.cs new file mode 100644 index 00000000..0262ac36 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Tools/AnalysisTools.cs @@ -0,0 +1,94 @@ +using System.ComponentModel; +using ModelContextProtocol.Server; +using ScriptBee.MCP.Gateway.Generated; +using ScriptBee.MCP.Gateway.Generated.Contracts; + +namespace ScriptBee.MCP.Tools; + +[McpServerToolType] +public sealed class AnalysisTools(IGatewayApi gatewayApi) +{ + [McpServerTool] + [Description("Lists all analyses performed within the specified project.")] + public async Task GetAnalyses( + [Description("The unique identifier of the project.")] string projectId, + [Description("Sort order for results (e.g. 'createdAt:desc').")] string? sort, + CancellationToken cancellationToken + ) => await gatewayApi.AnalysesGet2(projectId, sort ?? "", cancellationToken); + + [McpServerTool] + [Description("Triggers a new analysis for a project instance by running a specific script.")] + public async Task TriggerAnalysis( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance to run the analysis on.")] + string instanceId, + [Description("The unique identifier of the script to execute.")] string scriptId, + CancellationToken cancellationToken + ) => + await gatewayApi.Analyses( + projectId, + instanceId, + new TriggerAnalysisCommand { ScriptId = scriptId }, + cancellationToken + ); + + [McpServerTool] + [Description("Retrieves the current status and details of a specific analysis.")] + public async Task GetAnalysisStatus( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the analysis.")] string analysisId, + CancellationToken cancellationToken + ) => await gatewayApi.AnalysesGet(projectId, analysisId, cancellationToken); + + [McpServerTool] + [Description("Deletes a specific analysis and all its associated result files.")] + public async Task DeleteAnalysis( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the analysis to delete.")] string analysisId, + CancellationToken cancellationToken + ) => await gatewayApi.AnalysesDelete(projectId, analysisId, cancellationToken); + + [McpServerTool] + [Description("Retrieves the console output produced during a specific analysis execution.")] + public async Task GetAnalysisConsole( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the analysis.")] string analysisId, + CancellationToken cancellationToken + ) => await gatewayApi.Console(projectId, analysisId, cancellationToken); + + [McpServerTool] + [Description( + "Retrieves the list of errors that occurred during a specific analysis execution." + )] + public async Task GetAnalysisErrors( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the analysis.")] string analysisId, + CancellationToken cancellationToken + ) => await gatewayApi.Errors(projectId, analysisId, cancellationToken); + + [McpServerTool] + [Description("Lists all output files generated by a specific analysis.")] + public async Task GetAnalysisResultFiles( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the analysis.")] string analysisId, + CancellationToken cancellationToken + ) => await gatewayApi.FilesGet3(projectId, analysisId, cancellationToken); + + [McpServerTool] + [Description("Retrieves metadata about a script used in a specific analysis.")] + public async Task GetAnalysisScript( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the analysis.")] string analysisId, + [Description("The unique identifier of the script.")] string scriptId, + CancellationToken cancellationToken + ) => await gatewayApi.Scripts(projectId, analysisId, scriptId, cancellationToken); + + [McpServerTool] + [Description("Retrieves the source code of a script as it was used in a specific analysis.")] + public async Task GetAnalysisScriptContent( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the analysis.")] string analysisId, + [Description("The unique identifier of the script.")] string scriptId, + CancellationToken cancellationToken + ) => await gatewayApi.Content(projectId, analysisId, scriptId, cancellationToken); +} diff --git a/Integrations/MCP/ScriptBee.MCP/Tools/ContextTools.cs b/Integrations/MCP/ScriptBee.MCP/Tools/ContextTools.cs new file mode 100644 index 00000000..11867175 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Tools/ContextTools.cs @@ -0,0 +1,104 @@ +using System.ComponentModel; +using ModelContextProtocol.Server; +using ScriptBee.MCP.Gateway.Generated; +using ScriptBee.MCP.Gateway.Generated.Contracts; + +namespace ScriptBee.MCP.Tools; + +[McpServerToolType] +public sealed class ContextTools(IGatewayApi gatewayApi) +{ + [McpServerTool] + [Description("Lists all data loaders available for the specified project instance.")] + public async Task GetLoaders( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + CancellationToken cancellationToken + ) => await gatewayApi.Loaders(projectId, instanceId, cancellationToken); + + [McpServerTool] + [Description( + "Loads data into the context of the specified instance using the selected loaders." + )] + public async Task LoadContext( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + [Description("List of loader IDs to use for loading.")] IEnumerable loaderIds, + CancellationToken cancellationToken + ) => + await gatewayApi.Load( + projectId, + instanceId, + new LoadContextCommand { LoaderIds = loaderIds.ToList() }, + cancellationToken + ); + + [McpServerTool] + [Description("Lists all linkers available for the specified project instance.")] + public async Task GetLinkers( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + CancellationToken cancellationToken + ) => await gatewayApi.Linkers(projectId, instanceId, cancellationToken); + + [McpServerTool] + [Description("Links the loaded data context using the selected linkers.")] + public async Task LinkContext( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + [Description("List of linker IDs to apply.")] IEnumerable linkerIds, + CancellationToken cancellationToken + ) => + await gatewayApi.Link( + projectId, + instanceId, + new LinkContextCommand { LinkerIds = linkerIds.ToList() }, + cancellationToken + ); + + [McpServerTool] + [Description( + "Reloads the data context for the specified instance, refreshing all loaded and linked data." + )] + public async Task ReloadContext( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + CancellationToken cancellationToken + ) => await gatewayApi.Reload(projectId, instanceId, cancellationToken); + + [McpServerTool] + [Description("Retrieves the current data context for the specified instance.")] + public async Task GetContext( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + CancellationToken cancellationToken + ) => await gatewayApi.Context(projectId, instanceId, cancellationToken); + + [McpServerTool] + [Description("Clears all loaded data from the context of the specified instance.")] + public async Task ClearContext( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + CancellationToken cancellationToken + ) => await gatewayApi.Clear(projectId, instanceId, cancellationToken); + + [McpServerTool] + [Description("Searches the context graph for nodes matching the given query string.")] + public async Task SearchContextGraph( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + [Description("The search query to filter nodes.")] string query, + [Description("Number of results to skip.")] int? offset, + [Description("Maximum number of results to return.")] int? limit, + CancellationToken cancellationToken + ) => await gatewayApi.Graph(projectId, instanceId, query, offset, limit, cancellationToken); + + [McpServerTool] + [Description("Retrieves the immediate neighbours and edges for a specific context graph node.")] + public async Task GetContextNodeNeighbours( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + [Description("The ID of the node whose neighbours to retrieve.")] string nodeId, + CancellationToken cancellationToken + ) => await gatewayApi.Neighbors(projectId, instanceId, nodeId, cancellationToken); +} diff --git a/Integrations/MCP/ScriptBee.MCP/Tools/InstanceTools.cs b/Integrations/MCP/ScriptBee.MCP/Tools/InstanceTools.cs new file mode 100644 index 00000000..47364cf0 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Tools/InstanceTools.cs @@ -0,0 +1,40 @@ +using System.ComponentModel; +using ModelContextProtocol.Server; +using ScriptBee.MCP.Gateway.Generated; +using ScriptBee.MCP.Gateway.Generated.Contracts; + +namespace ScriptBee.MCP.Tools; + +[McpServerToolType] +public sealed class InstanceTools(IGatewayApi gatewayApi) +{ + [McpServerTool] + [Description("Lists all execution instances associated with the specified project.")] + public async Task GetInstances( + [Description("The unique identifier of the project.")] string projectId, + CancellationToken cancellationToken + ) => await gatewayApi.InstancesGet(projectId, cancellationToken); + + [McpServerTool] + [Description("Retrieves detailed information about a specific project instance.")] + public async Task GetInstance( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance.")] string instanceId, + CancellationToken cancellationToken + ) => await gatewayApi.InstancesGet2(projectId, instanceId, cancellationToken); + + [McpServerTool] + [Description("Allocates and adds a new execution instance for the specified project.")] + public async Task CreateInstance( + [Description("The unique identifier of the project.")] string projectId, + CancellationToken cancellationToken + ) => await gatewayApi.InstancesPost(projectId, cancellationToken); + + [McpServerTool] + [Description("Deallocates and removes a specific project instance.")] + public async Task DeleteInstance( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the instance to remove.")] string instanceId, + CancellationToken cancellationToken + ) => await gatewayApi.InstancesDelete(projectId, instanceId, cancellationToken); +} diff --git a/Integrations/MCP/ScriptBee.MCP/Tools/ProjectTools.cs b/Integrations/MCP/ScriptBee.MCP/Tools/ProjectTools.cs new file mode 100644 index 00000000..9945dfc6 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Tools/ProjectTools.cs @@ -0,0 +1,42 @@ +using System.ComponentModel; +using ModelContextProtocol.Server; +using Refit; +using ScriptBee.MCP.Gateway.Generated; +using ScriptBee.MCP.Gateway.Generated.Contracts; + +namespace ScriptBee.MCP.Tools; + +[McpServerToolType] +public sealed class ProjectTools(IGatewayApi gatewayApi) +{ + [McpServerTool] + [Description("Lists all existing ScriptBee projects with their basic details.")] + public async Task GetProjects(CancellationToken cancellationToken) => + await gatewayApi.ProjectsGet(cancellationToken); + + [McpServerTool] + [Description("Retrieves detailed information about a specific ScriptBee project.")] + public async Task GetProject( + [Description("The unique identifier of the project.")] string projectId, + CancellationToken cancellationToken + ) => await gatewayApi.ProjectsGet2(projectId, cancellationToken); + + [McpServerTool] + [Description("Creates a new ScriptBee project with the specified ID and name.")] + public async Task CreateProject( + [Description("A unique identifier for the new project.")] string id, + [Description("A human-readable name for the new project.")] string name, + CancellationToken cancellationToken + ) => + await gatewayApi.ProjectsPost( + new CreateProjectCommand { Id = id, Name = name }, + cancellationToken + ); + + [McpServerTool] + [Description("Deletes a ScriptBee project and all its associated data.")] + public async Task DeleteProject( + [Description("The unique identifier of the project to delete.")] string projectId, + CancellationToken cancellationToken + ) => await gatewayApi.ProjectsDelete(projectId, cancellationToken); +} diff --git a/Integrations/MCP/ScriptBee.MCP/Tools/ScriptTools.cs b/Integrations/MCP/ScriptBee.MCP/Tools/ScriptTools.cs new file mode 100644 index 00000000..b37dcea4 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/Tools/ScriptTools.cs @@ -0,0 +1,81 @@ +using System.ComponentModel; +using ModelContextProtocol.Server; +using ScriptBee.MCP.Gateway.Generated; +using ScriptBee.MCP.Gateway.Generated.Contracts; + +namespace ScriptBee.MCP.Tools; + +[McpServerToolType] +public sealed class ScriptTools(IGatewayApi gatewayApi) +{ + [McpServerTool] + [Description("Lists all scripts available in the specified project.")] + public async Task GetScripts( + [Description("The unique identifier of the project.")] string projectId, + CancellationToken cancellationToken + ) => await gatewayApi.ScriptsGet(projectId, cancellationToken); + + [McpServerTool] + [Description("Retrieves metadata about a specific script in a project.")] + public async Task GetScript( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the script.")] string scriptId, + CancellationToken cancellationToken + ) => await gatewayApi.ScriptsGet2(projectId, scriptId, cancellationToken); + + [McpServerTool] + [Description("Creates a new script within the specified project.")] + public async Task CreateScript( + [Description("The unique identifier of the project.")] string projectId, + [Description("The file path for the script within the project.")] string path, + [Description("The scripting language (e.g. 'CSharp', 'Python', 'Javascript').")] + string language, + CancellationToken cancellationToken + ) => + await gatewayApi.ScriptsPost( + projectId, + new CreateScriptCommand { Path = path, Language = language }, + cancellationToken + ); + + [McpServerTool] + [Description("Updates the name or parameters of an existing script.")] + public async Task UpdateScript( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the script.")] string scriptId, + [Description("The new name for the script.")] string name, + CancellationToken cancellationToken + ) => + await gatewayApi.ScriptsPatch( + projectId, + scriptId, + new UpdateScriptCommand { Name = name }, + cancellationToken + ); + + [McpServerTool] + [Description("Retrieves the source code content of a script.")] + public async Task GetScriptContent( + [Description("The unique identifier of the project.")] string projectId, + [Description("The unique identifier of the script.")] string scriptId, + CancellationToken cancellationToken + ) => await gatewayApi.ContentGet(projectId, scriptId, cancellationToken); + + [McpServerTool] + [Description("Lists all script types (languages) supported by the specified project.")] + public async Task GetAvailableScriptTypes( + [Description("The unique identifier of the project.")] string projectId, + CancellationToken cancellationToken + ) => await gatewayApi.AvailableScriptTypes(projectId, cancellationToken); + + [McpServerTool] + [Description("Lists all files and directories in the project file structure.")] + public async Task GetProjectFiles( + [Description("The unique identifier of the project.")] string projectId, + [Description("The parent node ID to list children of. Leave empty for the root.")] + string? parentId, + [Description("Number of items to skip (for pagination).")] int? offset, + [Description("Maximum number of items to return.")] int? limit, + CancellationToken cancellationToken + ) => await gatewayApi.FilesGet(projectId, parentId ?? "", offset, limit, cancellationToken); +} diff --git a/Integrations/MCP/ScriptBee.MCP/appsettings.Development.json b/Integrations/MCP/ScriptBee.MCP/appsettings.Development.json new file mode 100644 index 00000000..d1349e07 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "GatewayApiUrl": "http://localhost:5117", + "Serilog": { + "MinimumLevel": { + "Default": "Debug" + } + } +} diff --git a/Integrations/MCP/ScriptBee.MCP/appsettings.json b/Integrations/MCP/ScriptBee.MCP/appsettings.json new file mode 100644 index 00000000..806c00c4 --- /dev/null +++ b/Integrations/MCP/ScriptBee.MCP/appsettings.json @@ -0,0 +1,16 @@ +{ + "GatewayApiUrl": "http://localhost:5117", + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "System": "Warning" + } + }, + "WriteTo": [ + { "Name": "Console" } + ] + }, + "AllowedHosts": "*" +} diff --git a/ScriptBee.slnx b/ScriptBee.slnx index 1860e207..116a1da3 100644 --- a/ScriptBee.slnx +++ b/ScriptBee.slnx @@ -1,111 +1,130 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/Analysis/GetAnalysisScriptEndpoint.cs b/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/Analysis/GetAnalysisScriptEndpoint.cs index 3cf44953..cd80a145 100644 --- a/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/Analysis/GetAnalysisScriptEndpoint.cs +++ b/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/Analysis/GetAnalysisScriptEndpoint.cs @@ -24,10 +24,12 @@ public void DefineEndpoints(IEndpointRouteBuilder app) GetScriptContent ) .WithTags("Analysis") + .WithName("GetAnalysisScriptContent") .WithSummary("Get analysis script content") .WithDescription( "Retrieves the actual code content of a script used in a specific analysis." - ); + ) + .Produces(200, "text/plain"); app.MapGet( "/api/projects/{projectId}/analyses/{analysisId}/scripts/{scriptId}", diff --git a/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/ProjectStructure/GetProjectScriptsEndpoint.cs b/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/ProjectStructure/GetProjectScriptsEndpoint.cs index 8afe70b9..691f52e5 100644 --- a/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/ProjectStructure/GetProjectScriptsEndpoint.cs +++ b/ScriptBeeWebApp/src/Gateway/Adapters/Web/EndpointDefinitions/ProjectStructure/GetProjectScriptsEndpoint.cs @@ -29,8 +29,10 @@ public void DefineEndpoints(IEndpointRouteBuilder app) .WithDescription("Retrieves metadata about a specific project script."); app.MapGet("/api/projects/{projectId}/scripts/{scriptId}/content", GetProjectScriptsContent) .WithTags("Scripts") + .WithName("GetScriptContent") .WithSummary("Get project script content") - .WithDescription("Retrieves the actual code content of a project script."); + .WithDescription("Retrieves the actual code content of a project script.") + .Produces(200, "text/plain"); } private static async Task> GetProjectScripts( diff --git a/docs/public/gateway_swagger.json b/docs/public/gateway_swagger.json index 82d378fa..cc26373b 100644 --- a/docs/public/gateway_swagger.json +++ b/docs/public/gateway_swagger.json @@ -13,7 +13,9 @@ "paths": { "/api/projects": { "post": { - "tags": ["Projects"], + "tags": [ + "Projects" + ], "summary": "Create a new project", "description": "Creates a new project with the specified name and description.", "requestBody": { @@ -60,7 +62,9 @@ } }, "get": { - "tags": ["Projects"], + "tags": [ + "Projects" + ], "summary": "Get all projects", "description": "Retrieves a list of all existing projects with their basic details.", "responses": { @@ -79,7 +83,9 @@ }, "/api/projects/{projectId}": { "delete": { - "tags": ["Projects"], + "tags": [ + "Projects" + ], "summary": "Delete a project", "description": "Deletes a project and all its associated data, including scripts and artifacts.", "parameters": [ @@ -99,7 +105,9 @@ } }, "get": { - "tags": ["Projects"], + "tags": [ + "Projects" + ], "summary": "Get project by ID", "description": "Retrieves detailed information about a specific project by its unique identifier.", "parameters": [ @@ -138,7 +146,9 @@ }, "/api/projects/{projectId}/scripts": { "post": { - "tags": ["Scripts"], + "tags": [ + "Scripts" + ], "summary": "Create a new script", "description": "Creates a new script within the specified project.", "parameters": [ @@ -205,7 +215,9 @@ } }, "get": { - "tags": ["Scripts"], + "tags": [ + "Scripts" + ], "summary": "Get all project scripts", "description": "Retrieves a list of all scripts available in the specified project.", "parameters": [ @@ -234,7 +246,9 @@ }, "/api/projects/{projectId}/files/{fileId}": { "delete": { - "tags": ["ProjectStructure"], + "tags": [ + "ProjectStructure" + ], "summary": "Delete a project structure node", "description": "Deletes a file or directory (node) from the project structure.", "parameters": [ @@ -274,7 +288,9 @@ }, "/api/projects/{projectId}/scripts/{scriptId}": { "get": { - "tags": ["Scripts"], + "tags": [ + "Scripts" + ], "summary": "Get project script by ID", "description": "Retrieves metadata about a specific project script.", "parameters": [ @@ -319,7 +335,9 @@ } }, "patch": { - "tags": ["Scripts"], + "tags": [ + "Scripts" + ], "summary": "Update project script metadata", "description": "Updates the metadata (name, parameters) of a specific project script.", "parameters": [ @@ -386,9 +404,12 @@ }, "/api/projects/{projectId}/scripts/{scriptId}/content": { "get": { - "tags": ["Scripts"], + "tags": [ + "Scripts" + ], "summary": "Get project script content", "description": "Retrieves the actual code content of a project script.", + "operationId": "GetScriptContent", "parameters": [ { "name": "projectId", @@ -417,11 +438,23 @@ } } } + }, + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } }, "put": { - "tags": ["Scripts"], + "tags": [ + "Scripts" + ], "summary": "Update project script content", "description": "Updates the actual code content of a specific project script.", "parameters": [ @@ -471,7 +504,9 @@ }, "/api/projects/{projectId}/files": { "get": { - "tags": ["ProjectStructure"], + "tags": [ + "ProjectStructure" + ], "summary": "Get project files", "description": "Retrieves a paginated list of files and directories within the specified project.", "parameters": [ @@ -495,7 +530,10 @@ "in": "query", "schema": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "format": "int32", "default": 0 } @@ -505,7 +543,10 @@ "in": "query", "schema": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "format": "int32", "default": 50 } @@ -547,7 +588,9 @@ }, "/api/projects/{projectId}/structure/available-script-types": { "get": { - "tags": ["ProjectStructure"], + "tags": [ + "ProjectStructure" + ], "summary": "Get available script types", "description": "Retrieves a list of all script languages and types supported by the project.", "parameters": [ @@ -576,7 +619,9 @@ }, "/api/plugins": { "get": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Get all available plugins", "description": "Retrieves a list of all available plugins from the marketplace.", "responses": { @@ -595,7 +640,9 @@ }, "/api/plugins/{id}": { "get": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Get plugin by ID", "description": "Retrieves detailed information about a specific plugin from the marketplace by its unique identifier.", "parameters": [ @@ -634,7 +681,9 @@ }, "/api/projects/{projectId}/plugins": { "get": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Get installed plugins for a project", "description": "Retrieves a list of all plugins currently installed in the specified project.", "parameters": [ @@ -671,7 +720,9 @@ } }, "post": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Upload and install a plugin", "description": "Uploads a plugin ZIP file and installs it into the project.", "parameters": [ @@ -688,7 +739,9 @@ "content": { "multipart/form-data": { "schema": { - "required": ["file"], + "required": [ + "file" + ], "type": "object", "properties": { "file": { @@ -746,7 +799,9 @@ }, "/api/projects/{projectId}/plugins/{pluginId}": { "get": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Get installed plugin details", "description": "Retrieves detailed information about a specific plugin installed in a project.", "parameters": [ @@ -791,7 +846,9 @@ } }, "put": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Install a plugin from marketplace", "description": "Installs a specific version of a plugin from the marketplace into the project.", "parameters": [ @@ -847,7 +904,9 @@ } }, "delete": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Uninstall a plugin from a project", "description": "Uninstalls a specific plugin version from the specified project.", "parameters": [ @@ -895,9 +954,20 @@ }, "/api/plugins/gateway": { "get": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Get gateway plugins", "description": "Retrieves a list of all plugins installed at the gateway level.", + "parameters": [ + { + "name": "kind", + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -912,7 +982,9 @@ } }, "post": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Install gateway plugin", "description": "Installs a new plugin at the gateway level.", "requestBody": { @@ -934,7 +1006,9 @@ }, "/api/plugins/gateway/{pluginId}": { "delete": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Uninstall gateway plugin", "description": "Uninstalls a plugin from the gateway level.", "parameters": [ @@ -964,7 +1038,9 @@ }, "/api/plugins/gateway/ui/manifest": { "get": { - "tags": ["Plugins"], + "tags": [ + "Plugins" + ], "summary": "Get the manifest for UI plugins", "description": "Retrieves a map with the installed UI plugin remotes and the associated remoteEntry.js file.", "responses": { @@ -986,7 +1062,9 @@ }, "/api/projects/{projectId}/loaders/{loaderId}/files": { "put": { - "tags": ["Loaders"], + "tags": [ + "Loaders" + ], "summary": "Upload files for a loader", "description": "Uploads one or more files to be used by a specific loader in the project.", "parameters": [ @@ -1011,7 +1089,9 @@ "content": { "multipart/form-data": { "schema": { - "required": ["files"], + "required": [ + "files" + ], "type": "object", "properties": { "files": { @@ -1049,7 +1129,9 @@ }, "/api/projects/{projectId}/instances": { "post": { - "tags": ["Instances"], + "tags": [ + "Instances" + ], "summary": "Add a new project instance", "description": "Allocates and adds a new execution instance for the specified project.", "parameters": [ @@ -1086,7 +1168,9 @@ } }, "get": { - "tags": ["Instances"], + "tags": [ + "Instances" + ], "summary": "Get all project instances", "description": "Retrieves a list of all instances associated with the specified project.", "parameters": [ @@ -1115,7 +1199,9 @@ }, "/api/projects/{projectId}/instances/{instanceId}": { "get": { - "tags": ["Instances"], + "tags": [ + "Instances" + ], "summary": "Get project instance by ID", "description": "Retrieves detailed information about a specific project instance.", "parameters": [ @@ -1160,7 +1246,9 @@ } }, "delete": { - "tags": ["Instances"], + "tags": [ + "Instances" + ], "summary": "Remove a project instance", "description": "Deallocates and removes a specific project instance.", "parameters": [ @@ -1200,7 +1288,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/linkers": { "get": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Get available linkers for an instance", "description": "Retrieves a list of all linkers available for the specified project instance.", "parameters": [ @@ -1237,7 +1328,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/loaders": { "get": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Get available loaders for an instance", "description": "Retrieves a list of all loaders available for the specified project instance.", "parameters": [ @@ -1274,7 +1368,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context": { "get": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Get current instance context", "description": "Retrieves the current data context for the specified project instance.", "parameters": [ @@ -1321,7 +1418,11 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context/graph": { "get": { - "tags": ["Instances", "Context", "Graph"], + "tags": [ + "Instances", + "Context", + "Graph" + ], "summary": "Search context nodes", "description": "Searches for context nodes based on a query string.", "parameters": [ @@ -1353,7 +1454,10 @@ "in": "query", "schema": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "format": "int32", "default": 0 } @@ -1363,7 +1467,10 @@ "in": "query", "schema": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "format": "int32", "default": 10 } @@ -1395,7 +1502,11 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context/graph/neighbors": { "get": { - "tags": ["Instances", "Context", "Graph"], + "tags": [ + "Instances", + "Context", + "Graph" + ], "summary": "Get node neighbors", "description": "Retrieves the immediate neighbors and edges for a specific context node.", "parameters": [ @@ -1450,7 +1561,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context/clear": { "post": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Clear instance context", "description": "Clears all loaded data from the current context of the specified project instance.", "parameters": [ @@ -1490,7 +1604,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context/generate-classes": { "post": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Generate classes for instance context", "description": "Generates script classes based on the current data context for the specified project instance and returns them as a stream.", "parameters": [ @@ -1537,7 +1654,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context/link": { "post": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Link instance context", "description": "Links the data context of the specified project instance using the provided linkers.", "parameters": [ @@ -1597,7 +1717,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context/load": { "post": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Load instance context", "description": "Loads data into the context of the specified project instance using the provided loaders.", "parameters": [ @@ -1657,7 +1780,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/context/reload": { "post": { - "tags": ["Instances", "Context"], + "tags": [ + "Instances", + "Context" + ], "summary": "Reload instance context", "description": "Reloads the data context for the specified project instance, refreshing all linked and loaded data.", "parameters": [ @@ -1697,7 +1823,9 @@ }, "/api/projects/{projectId}/analyses/{analysisId}": { "delete": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Delete analysis", "description": "Deletes a specific analysis and all its associated artifacts.", "parameters": [ @@ -1725,7 +1853,9 @@ } }, "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Get analysis status by ID", "description": "Retrieves the current status and details of a specific analysis.", "parameters": [ @@ -1782,7 +1912,9 @@ }, "/api/projects/{projectId}/analyses/{analysisId}/results/files/{fileId}": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Download individual analysis result file", "description": "Downloads a specific file generated as a result of an analysis.", "parameters": [ @@ -1827,7 +1959,9 @@ }, "/api/projects/{projectId}/analyses/{analysisId}/results/files/download": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Download all analysis result files", "description": "Downloads a ZIP archive containing all files generated as a result of an analysis.", "parameters": [ @@ -1864,7 +1998,9 @@ }, "/api/projects/{projectId}/analyses/{analysisId}/results/console": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Get console analysis results", "description": "Retrieves the console output generated during the analysis.", "parameters": [ @@ -1911,7 +2047,9 @@ }, "/api/projects/{projectId}/analyses/{analysisId}/results/errors": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Get analysis error results", "description": "Retrieves a list of errors that occurred during the analysis execution.", "parameters": [ @@ -1958,7 +2096,9 @@ }, "/api/projects/{projectId}/analyses/{analysisId}/results/files": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Get analysis file results", "description": "Retrieves a list of files generated as a result of the analysis.", "parameters": [ @@ -2005,9 +2145,12 @@ }, "/api/projects/{projectId}/analyses/{analysisId}/scripts/{scriptId}/content": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Get analysis script content", "description": "Retrieves the actual code content of a script used in a specific analysis.", + "operationId": "GetAnalysisScriptContent", "parameters": [ { "name": "projectId", @@ -2044,13 +2187,25 @@ } } } + }, + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } } } } }, "/api/projects/{projectId}/analyses/{analysisId}/scripts/{scriptId}": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Get analysis script metadata", "description": "Retrieves metadata about a script used in a specific analysis, such as its name and type.", "parameters": [ @@ -2105,7 +2260,9 @@ }, "/api/projects/{projectId}/analyses": { "get": { - "tags": ["Analysis"], + "tags": [ + "Analysis" + ], "summary": "Get all analyses for a project", "description": "Retrieves a list of all analyses performed within the specified project.", "parameters": [ @@ -2152,7 +2309,10 @@ }, "/api/projects/{projectId}/instances/{instanceId}/analyses": { "post": { - "tags": ["Instances", "Analysis"], + "tags": [ + "Instances", + "Analysis" + ], "summary": "Trigger a new analysis", "description": "Triggers a new analysis for a specific project instance using a given script.", "parameters": [ @@ -2214,7 +2374,9 @@ "components": { "schemas": { "AllAvailablePluginsResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2226,7 +2388,9 @@ } }, "AnalysisError": { - "required": ["message"], + "required": [ + "message" + ], "type": "object", "properties": { "message": { @@ -2260,18 +2424,27 @@ "type": "string" }, "scriptFileId": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "creationDate": { "type": "string", "format": "date-time" }, "finishedDate": { - "type": ["null", "string"], + "type": [ + "null", + "string" + ], "format": "date-time" }, "errors": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "$ref": "#/components/schemas/AnalysisError" } @@ -2279,7 +2452,9 @@ } }, "AnalysisListResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2291,7 +2466,11 @@ } }, "AnalysisResultRunError": { - "required": ["title", "message", "severity"], + "required": [ + "title", + "message", + "severity" + ], "type": "object", "properties": { "title": { @@ -2306,7 +2485,10 @@ } }, "BundleItem": { - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "type": "object", "properties": { "id": { @@ -2318,7 +2500,11 @@ } }, "ContextGraphEdge": { - "required": ["source", "target", "label"], + "required": [ + "source", + "target", + "label" + ], "type": "object", "properties": { "source": { @@ -2333,7 +2519,13 @@ } }, "ContextGraphNode": { - "required": ["id", "label", "type", "loader", "properties"], + "required": [ + "id", + "label", + "type", + "loader", + "properties" + ], "type": "object", "properties": { "id": { @@ -2346,7 +2538,10 @@ "type": "string" }, "loader": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "properties": { "type": "object" @@ -2354,7 +2549,10 @@ } }, "ContextGraphResponse": { - "required": ["nodes", "edges"], + "required": [ + "nodes", + "edges" + ], "type": "object", "properties": { "nodes": { @@ -2372,7 +2570,10 @@ } }, "CreateProjectCommand": { - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "type": "object", "properties": { "id": { @@ -2385,7 +2586,11 @@ "description": "Command used to create a new project." }, "CreateProjectResponse": { - "required": ["id", "name", "creationDate"], + "required": [ + "id", + "name", + "creationDate" + ], "type": "object", "properties": { "id": { @@ -2401,7 +2606,11 @@ } }, "CreateScriptCommand": { - "required": ["path", "language", "parameters"], + "required": [ + "path", + "language", + "parameters" + ], "type": "object", "properties": { "path": { @@ -2411,7 +2620,10 @@ "type": "string" }, "parameters": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "$ref": "#/components/schemas/ScriptParameter" } @@ -2419,22 +2631,33 @@ } }, "ExtensionPoint": { - "required": ["kind"], + "required": [ + "kind" + ], "type": "object", "properties": { "kind": { "type": "string" }, "language": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "extension": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] } } }, "FileData": { - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "type": "object", "properties": { "id": { @@ -2446,19 +2669,23 @@ } }, "GatewayPluginsResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/InstalledPlugin" + "$ref": "#/components/schemas/InstalledGatewayPlugin" } } } }, "GetAnalysisResultConsole": { - "required": ["content"], + "required": [ + "content" + ], "type": "object", "properties": { "content": { @@ -2467,7 +2694,11 @@ } }, "GetAnalysisResultFile": { - "required": ["id", "name", "type"], + "required": [ + "id", + "name", + "type" + ], "type": "object", "properties": { "id": { @@ -2482,7 +2713,9 @@ } }, "GetAnalysisResultFileList": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2494,7 +2727,9 @@ } }, "GetAnalysisResultRunErrors": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2506,7 +2741,9 @@ } }, "GetAvailableScriptTypesResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2518,7 +2755,9 @@ } }, "GetLinkersResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2530,7 +2769,9 @@ } }, "GetLoadersResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2542,7 +2783,9 @@ } }, "GetProjectContextResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2554,7 +2797,12 @@ } }, "GetProjectFilesResponse": { - "required": ["data", "totalCount", "offset", "limit"], + "required": [ + "data", + "totalCount", + "offset", + "limit" + ], "type": "object", "properties": { "data": { @@ -2565,17 +2813,26 @@ }, "totalCount": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "format": "int64" }, "offset": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "format": "int32" }, "limit": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["integer", "string"], + "type": [ + "integer", + "string" + ], "format": "int32" }, "hasNextPage": { @@ -2584,7 +2841,9 @@ } }, "GetProjectInstancesListResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2596,7 +2855,9 @@ } }, "GetProjectListResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2608,7 +2869,9 @@ } }, "GetScriptDataResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2623,21 +2886,37 @@ "type": "object", "properties": { "type": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "title": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "status": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["null", "integer", "string"], + "type": [ + "null", + "integer", + "string" + ], "format": "int32" }, "detail": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "instance": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "errors": { "type": "object", @@ -2660,8 +2939,223 @@ "$ref": "#/components/schemas/IFormFile" } }, + "InstalledGatewayPlugin": { + "required": [ + "id", + "version", + "extensionPoints" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "version": { + "type": "string" + }, + "extensionPoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstalledGatewayPluginExtensionPoint" + } + } + }, + "description": "Represents an installed gateway plugin with its ID and version." + }, + "InstalledGatewayPluginExtensionPoint": { + "required": [ + "kind", + "remoteName", + "remoteEntry", + "outlets" + ], + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "remoteName": { + "type": [ + "null", + "string" + ] + }, + "remoteEntry": { + "type": [ + "null", + "string" + ] + }, + "outlets": { + "type": [ + "null", + "array" + ], + "items": { + "$ref": "#/components/schemas/InstalledGatewayPluginExtensionPointOutletBase" + } + } + }, + "description": "Represents the extension points of an installed gateway plugin." + }, + "InstalledGatewayPluginExtensionPointOutletBase": { + "required": [ + "type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginTopNavigationBarOutlet" + }, + { + "$ref": "#/components/schemas/InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginSidePanelOutlet" + }, + { + "$ref": "#/components/schemas/InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginFilePreviewerOutlet" + } + ], + "description": "Base class for outlets of an installed gateway plugin extension point.", + "discriminator": { + "propertyName": "type", + "mapping": { + "top-navigation-bar": "#/components/schemas/InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginTopNavigationBarOutlet", + "side-panel": "#/components/schemas/InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginSidePanelOutlet", + "file-previewer": "#/components/schemas/InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginFilePreviewerOutlet" + } + } + }, + "InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginFilePreviewerOutlet": { + "required": [ + "exposedModule", + "label", + "componentName", + "icon", + "supportedFileExtensions" + ], + "properties": { + "type": { + "enum": [ + "file-previewer" + ], + "type": "string" + }, + "exposedModule": { + "type": "string" + }, + "label": { + "type": "string" + }, + "componentName": { + "type": [ + "null", + "string" + ] + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "supportedFileExtensions": { + "type": [ + "null", + "array" + ], + "items": { + "type": "string" + } + } + }, + "description": "Represents a component for file previewer of output results." + }, + "InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginSidePanelOutlet": { + "required": [ + "exposedModule", + "label", + "path", + "nested", + "componentName", + "icon" + ], + "properties": { + "type": { + "enum": [ + "side-panel" + ], + "type": "string" + }, + "exposedModule": { + "type": "string" + }, + "label": { + "type": "string" + }, + "path": { + "type": "string" + }, + "nested": { + "type": [ + "null", + "boolean" + ] + }, + "componentName": { + "type": [ + "null", + "string" + ] + }, + "icon": { + "type": "string" + } + }, + "description": "Represents an element from the Side Hamburger Panel with route." + }, + "InstalledGatewayPluginExtensionPointOutletBaseInstalledGatewayPluginTopNavigationBarOutlet": { + "required": [ + "exposedModule", + "label", + "path", + "nested", + "componentName" + ], + "properties": { + "type": { + "enum": [ + "top-navigation-bar" + ], + "type": "string" + }, + "exposedModule": { + "type": "string" + }, + "label": { + "type": "string" + }, + "path": { + "type": "string" + }, + "nested": { + "type": [ + "null", + "boolean" + ] + }, + "componentName": { + "type": [ + "null", + "string" + ] + } + }, + "description": "Represents an element from the Top Navigation Bar with route." + }, "InstalledPlugin": { - "required": ["id", "version"], + "required": [ + "id", + "version" + ], "type": "object", "properties": { "id": { @@ -2674,7 +3168,9 @@ "description": "Represents an installed plugin with its ID and version." }, "InstalledPluginsResponse": { - "required": ["data"], + "required": [ + "data" + ], "type": "object", "properties": { "data": { @@ -2686,7 +3182,10 @@ } }, "InstallGatewayPluginRequest": { - "required": ["id", "version"], + "required": [ + "id", + "version" + ], "type": "object", "properties": { "id": { @@ -2698,7 +3197,9 @@ } }, "LinkContextCommand": { - "required": ["linkerIds"], + "required": [ + "linkerIds" + ], "type": "object", "properties": { "linkerIds": { @@ -2710,7 +3211,10 @@ } }, "Linker": { - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "type": "object", "properties": { "id": { @@ -2722,7 +3226,9 @@ } }, "LoadContextCommand": { - "required": ["loaderIds"], + "required": [ + "loaderIds" + ], "type": "object", "properties": { "loaderIds": { @@ -2734,7 +3240,10 @@ } }, "Loader": { - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "type": "object", "properties": { "id": { @@ -2746,7 +3255,14 @@ } }, "MarketplacePlugin": { - "required": ["id", "name", "type", "description", "authors", "versions"], + "required": [ + "id", + "name", + "type", + "description", + "authors", + "versions" + ], "type": "object", "properties": { "id": { @@ -2776,7 +3292,14 @@ } }, "MarketplacePluginWithDetails": { - "required": ["id", "name", "type", "description", "authors", "versions"], + "required": [ + "id", + "name", + "type", + "description", + "authors", + "versions" + ], "type": "object", "properties": { "id": { @@ -2804,37 +3327,61 @@ } }, "bundleItems": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "$ref": "#/components/schemas/BundleItem" } }, "sourceCode": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "manifest": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "site": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "license": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "tags": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "type": "string" } }, "technologies": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "type": "string" } }, "extensionPoints": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "$ref": "#/components/schemas/ExtensionPoint" } @@ -2842,7 +3389,11 @@ } }, "PluginVersion": { - "required": ["url", "version", "manifestUrl"], + "required": [ + "url", + "version", + "manifestUrl" + ], "type": "object", "properties": { "url": { @@ -2860,26 +3411,46 @@ "type": "object", "properties": { "type": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "title": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "status": { "pattern": "^-?(?:0|[1-9]\\d*)$", - "type": ["null", "integer", "string"], + "type": [ + "null", + "integer", + "string" + ], "format": "int32" }, "detail": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "instance": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] } } }, "Project": { - "required": ["id", "name", "creationDate"], + "required": [ + "id", + "name", + "creationDate" + ], "type": "object", "properties": { "id": { @@ -2896,22 +3467,33 @@ "description": "Represents basic project information." }, "ProjectContextGenerateClassesRequest": { - "required": ["languages"], + "required": [ + "languages" + ], "type": "object", "properties": { "languages": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "type": "string" } }, "transferFormat": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] } } }, "ProjectContextSlice": { - "required": ["model", "pluginIds"], + "required": [ + "model", + "pluginIds" + ], "type": "object", "properties": { "model": { @@ -2926,7 +3508,14 @@ } }, "ProjectDetails": { - "required": ["id", "name", "creationDate", "savedFiles", "loadedFiles", "linkers"], + "required": [ + "id", + "name", + "creationDate", + "savedFiles", + "loadedFiles", + "linkers" + ], "type": "object", "properties": { "id": { @@ -2967,7 +3556,13 @@ "description": "Represents detailed project information, including saved and loaded files." }, "ProjectFileNode": { - "required": ["id", "name", "path", "type", "hasChildren"], + "required": [ + "id", + "name", + "path", + "type", + "hasChildren" + ], "type": "object", "properties": { "id": { @@ -2988,7 +3583,11 @@ } }, "ProjectInstance": { - "required": ["id", "creationDate", "status"], + "required": [ + "id", + "creationDate", + "status" + ], "type": "object", "properties": { "id": { @@ -3005,7 +3604,13 @@ "description": "Represents an instance of a project execution." }, "ScriptData": { - "required": ["id", "name", "path", "scriptLanguage", "parameters"], + "required": [ + "id", + "name", + "path", + "scriptLanguage", + "parameters" + ], "type": "object", "properties": { "id": { @@ -3029,7 +3634,10 @@ } }, "ScriptLanguage": { - "required": ["name", "extension"], + "required": [ + "name", + "extension" + ], "type": "object", "properties": { "name": { @@ -3041,7 +3649,11 @@ } }, "ScriptParameter": { - "required": ["name", "type", "value"], + "required": [ + "name", + "type", + "value" + ], "type": "object", "properties": { "name": { @@ -3050,7 +3662,7 @@ "type": { "type": "string" }, - "value": {} + "value": { } } }, "Stream": { @@ -3058,7 +3670,9 @@ "format": "binary" }, "TriggerAnalysisCommand": { - "required": ["scriptId"], + "required": [ + "scriptId" + ], "type": "object", "properties": { "scriptId": { @@ -3068,14 +3682,23 @@ "description": "Command used to trigger a script analysis." }, "UpdateScriptCommand": { - "required": ["name", "parameters"], + "required": [ + "name", + "parameters" + ], "type": "object", "properties": { "name": { - "type": ["null", "string"] + "type": [ + "null", + "string" + ] }, "parameters": { - "type": ["null", "array"], + "type": [ + "null", + "array" + ], "items": { "$ref": "#/components/schemas/ScriptParameter" } @@ -3083,7 +3706,10 @@ } }, "UploadLoaderFilesResponse": { - "required": ["loaderId", "fileNames"], + "required": [ + "loaderId", + "fileNames" + ], "type": "object", "properties": { "loaderId": {