UNPKG

@rocketshipai/mcp-server

Version:

MCP assistant for helping AI coding agents write better Rocketship tests

790 lines (789 loc) 6.96 MB
"use strict"; // Auto-generated embedded knowledge - DO NOT EDIT MANUALLY // Generated on 2025-07-15T14:01:04.799Z // CLI Version: Rocketship CLI v0.5.11 // Git Commit: 18bd01e53a10d62efe021b4823c455eb903a12f6 Object.defineProperty(exports, "__esModule", { value: true }); exports.EMBEDDED_DOCS = exports.EMBEDDED_EXAMPLES = exports.EMBEDDED_CLI_DATA = exports.EMBEDDED_SCHEMA = void 0; exports.EMBEDDED_SCHEMA = { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Rocketship Test Suite Schema", "description": "Schema for Rocketship test suite definition files", "type": "object", "required": [ "name", "tests" ], "properties": { "name": { "type": "string", "description": "Name of the test suite" }, "description": { "type": "string", "description": "Description of the test suite" }, "vars": { "type": "object", "description": "Configuration variables that can be referenced in test steps using {{ vars.key }} syntax", "additionalProperties": true }, "tests": { "type": "array", "description": "Array of test cases", "minItems": 1, "items": { "type": "object", "required": [ "name", "steps" ], "properties": { "name": { "type": "string", "description": "Name of the test case" }, "steps": { "type": "array", "description": "Array of test steps to execute", "minItems": 1, "items": { "type": "object", "required": [ "name", "plugin", "config" ], "properties": { "name": { "type": "string", "description": "Name of the test step" }, "plugin": { "type": "string", "description": "Plugin to use for this step", "enum": [ "http", "delay", "script", "sql", "log", "agent", "browser", "supabase" ] }, "config": { "type": "object", "description": "Configuration for the plugin" }, "assertions": { "type": "array", "description": "Assertions to validate the response", "items": { "type": "object", "required": [ "type", "expected" ], "properties": { "type": { "type": "string", "description": "Type of assertion", "enum": [ "status_code", "json_path", "header", "row_count", "query_count", "success_count", "column_value", "supabase_count", "supabase_error" ] }, "expected": { "description": "Expected value for the assertion" }, "path": { "type": "string", "description": "JSON path for json_path assertion type" }, "name": { "type": "string", "description": "Header name for header assertion type" }, "query_index": { "type": "integer", "description": "Index of query to check (for SQL assertions)", "minimum": 0 }, "row_index": { "type": "integer", "description": "Index of row to check (for column_value assertion)", "minimum": 0 }, "column": { "type": "string", "description": "Column name to check (for column_value assertion)" } }, "allOf": [ { "if": { "properties": { "type": { "enum": [ "json_path" ] } } }, "then": { "required": [ "path" ] } }, { "if": { "properties": { "type": { "enum": [ "header" ] } } }, "then": { "required": [ "name" ] } }, { "if": { "properties": { "type": { "enum": [ "row_count" ] } } }, "then": { "required": [ "query_index" ] } }, { "if": { "properties": { "type": { "enum": [ "column_value" ] } } }, "then": { "required": [ "query_index", "row_index", "column" ] } } ] } }, "save": { "type": "array", "description": "Response values to save for use in later steps", "items": { "type": "object", "required": [ "as" ], "properties": { "json_path": { "type": "string", "description": "JSON path to extract from response" }, "header": { "type": "string", "description": "Header name to extract from response" }, "sql_result": { "type": "string", "description": "Path to extract from SQL result (e.g., '.queries[0].rows[0].id')" }, "as": { "type": "string", "description": "Variable name to save the extracted value as" }, "required": { "type": "boolean", "description": "Whether the value is required (defaults to true)" } }, "oneOf": [ { "required": [ "json_path" ] }, { "required": [ "header" ] }, { "required": [ "sql_result" ] } ] } }, "retry": { "type": "object", "description": "Retry policy for the step activity", "properties": { "initial_interval": { "type": "string", "pattern": "^[0-9]+(ns|us|ms|s|m|h)$", "description": "Initial retry interval (e.g., '1s', '500ms')" }, "maximum_interval": { "type": "string", "pattern": "^[0-9]+(ns|us|ms|s|m|h)$", "description": "Maximum retry interval (e.g., '10s', '1m')" }, "maximum_attempts": { "type": "integer", "minimum": 1, "description": "Maximum number of retry attempts" }, "backoff_coefficient": { "type": "number", "minimum": 1, "description": "Backoff coefficient for exponential backoff" }, "non_retryable_errors": { "type": "array", "description": "List of error types that should not be retried", "items": { "type": "string" } } } } }, "allOf": [ { "if": { "properties": { "plugin": { "const": "script" } } }, "then": { "properties": { "config": { "type": "object", "required": [ "language" ], "properties": { "language": { "type": "string", "enum": [ "javascript", "shell" ], "description": "Script language to use" }, "script": { "type": "string", "description": "Inline script content" }, "file": { "type": "string", "description": "Path to external script file" }, "timeout": { "type": "string", "pattern": "^[0-9]+(s|m|h)$", "description": "Script execution timeout" } }, "oneOf": [ { "required": [ "script" ] }, { "required": [ "file" ] } ] } } } }, { "if": { "properties": { "plugin": { "const": "sql" } } }, "then": { "properties": { "config": { "type": "object", "required": [ "driver", "dsn" ], "properties": { "driver": { "type": "string", "enum": [ "postgres", "mysql", "sqlite", "sqlserver" ], "description": "Database driver to use" }, "dsn": { "type": "string", "description": "Database connection string (Data Source Name)" }, "commands": { "type": "array", "description": "Array of SQL commands to execute", "items": { "type": "string" }, "minItems": 1 }, "file": { "type": "string", "description": "Path to external SQL file" }, "timeout": { "type": "string", "pattern": "^[0-9]+(s|m|h)$", "description": "Query execution timeout" } }, "oneOf": [ { "required": [ "commands" ] }, { "required": [ "file" ] } ] }, "save": { "type": "array", "description": "SQL result values to save for use in later steps", "items": { "type": "object", "required": [ "sql_result" ], "properties": { "sql_result": { "type": "string", "description": "Path to extract from SQL result (e.g., '.queries[0].rows[0].id')" }, "as": { "type": "string", "description": "Variable name to save the extracted value as" }, "required": { "type": "boolean", "description": "Whether the value is required (defaults to true)" } } } }, "assertions": { "type": "array", "description": "Assertions to validate SQL execution results", "items": { "type": "object", "required": [ "type", "expected" ], "properties": { "type": { "type": "string", "description": "Type of SQL assertion", "enum": [ "row_count", "query_count", "success_count", "column_value" ] }, "expected": { "description": "Expected value for the assertion" }, "query_index": { "type": "integer", "description": "Index of query to check (for row_count and column_value assertions)", "minimum": 0 }, "row_index": { "type": "integer", "description": "Index of row to check (for column_value assertion)", "minimum": 0 }, "column": { "type": "string", "description": "Column name to check (for column_value assertion)" } }, "allOf": [ { "if": { "properties": { "type": { "enum": [ "row_count" ] } } }, "then": { "required": [ "query_index" ] } }, { "if": { "properties": { "type": { "enum": [ "column_value" ] } } }, "then": { "required": [ "query_index", "row_index", "column" ] } } ] } } } } }, { "if": { "properties": { "plugin": { "const": "log" } } }, "then": { "properties": { "config": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string", "description": "Message to log (supports template variables)" } } } } } }, { "if": { "properties": { "plugin": { "const": "agent" } } }, "then": { "properties": { "config": { "type": "object", "required": [ "agent", "prompt" ], "properties": { "agent": { "type": "string", "enum": [ "claude-code" ], "description": "Type of coding agent to use" }, "prompt": { "type": "string", "description": "Prompt to send to the agent (supports template variables)" }, "mode": { "type": "string", "enum": [ "single", "continue", "resume" ], "description": "Agent execution mode", "default": "single" }, "session_id": { "type": "string", "description": "Session ID for resume mode (supports template variables)" }, "max_turns": { "type": "integer", "description": "Maximum number of conversation turns", "minimum": 1, "default": 1 }, "timeout": { "type": "string", "pattern": "^[0-9]+(s|m|h)$", "description": "Agent execution timeout", "default": "30s" }, "system_prompt": { "type": "string", "description": "System prompt for the agent" }, "output_format": { "type": "string", "enum": [ "text", "json", "streaming-json" ], "description": "Output format from the agent", "default": "json" }, "continue_recent": { "type": "boolean", "description": "Continue the most recent conversation", "default": false }, "save_full_response": { "type": "boolean", "description": "Save the complete response to context", "default": true } } } } } }, { "if": { "properties": { "plugin": { "const": "browser" } } }, "then": { "properties": { "config": { "type": "object", "required": [ "task", "llm" ], "properties": { "task": { "type": "string", "description": "Task description for the browser agent to perform (supports template variables)" }, "llm": { "type": "object", "required": [ "provider", "model" ], "properties": { "provider": { "type": "string", "enum": [ "openai", "anthropic" ], "description": "LLM provider to use" }, "model": { "type": "string", "description": "LLM model to use (e.g., gpt-4, claude-3-sonnet)" }, "config": { "type": "object", "description": "LLM configuration (API keys, etc.)", "additionalProperties": { "type": "string" } } } }, "executor_type": { "type": "string", "enum": [ "python" ], "description": "Browser executor type", "default": "python" }, "timeout": { "type": "string", "pattern": "^[0-9]+(s|m|h)$", "description": "Browser automation timeout", "default": "5m" }, "max_steps": { "type": "integer", "description": "Maximum number of browser automation steps", "minimum": 1, "default": 50 }, "browser_type": { "type": "string", "enum": [ "chromium", "chrome", "edge" ], "description": "Browser type to use", "default": "chromium" }, "headless": { "type": "boolean", "description": "Run browser in headless mode", "default": true }, "use_vision": { "type": "boolean", "description": "Enable visual processing", "default": true }, "session_id": { "type": "string", "description": "Browser session ID for session persistence (supports template variables)" }, "save_screenshots": { "type": "boolean", "description": "Save screenshots during execution", "default": false }, "allowed_domains": { "type": "array", "description": "List of allowed domains for browser navigation", "items": { "type": "string" } }, "viewport": { "type": "object", "description": "Browser viewport configuration", "properties": { "width": { "type": "integer", "description": "Viewport width in pixels", "default": 1920 }, "height": { "type": "integer", "description": "Viewport height in pixels", "default": 1080 } } } } } } } }, { "if": { "properties": { "plugin": { "const": "supabase" } } }, "then": { "properties": { "config": { "type": "object", "required": [ "url", "key", "operation" ], "properties": { "url": { "type": "string", "description": "Supabase project URL" }, "key": { "type": "string", "description": "Supabase API key (anon or service key)" }, "operation": { "type": "string", "enum": [ "select", "insert", "update", "delete", "rpc", "auth_create_user", "auth_delete_user", "auth_sign_up", "auth_sign_in", "storage_create_bucket", "storage_upload", "storage_download", "storage_delete" ], "description": "Supabase operation to perform" }, "table": { "type": "string", "description": "Table name for database operations" }, "select": { "type": "object", "description": "Configuration for select operation",