@rocketshipai/mcp-server
Version:
MCP assistant for helping AI coding agents write better Rocketship tests
997 lines (996 loc) • 7.42 MB
JavaScript
"use strict";
// Auto-generated embedded knowledge - DO NOT EDIT MANUALLY
// Generated on 2025-11-16T03:54:25.652Z
// CLI Version: Rocketship CLI v0.5.36
// Git Commit: f562c3c6c09874b392f61028a79d6e0e7d9b7025
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
},
"openapi": {
"type": "object",
"description": "Suite-level OpenAPI contract validation defaults applied to HTTP steps",
"properties": {
"spec": {
"type": "string",
"description": "Path or URL to an OpenAPI v3 document"
},
"version": {
"type": "string",
"description": "Optional spec version identifier used to invalidate cached contracts"
},
"validate_request": {
"type": "boolean",
"description": "Enable request validation (default true)"
},
"validate_response": {
"type": "boolean",
"description": "Enable response validation (default true)"
},
"cache_ttl": {
"type": "string",
"description": "Duration (e.g. 30m, 1h) before a cached spec is automatically reloaded"
}
},
"required": [
"spec"
]
},
"init": {
"type": "array",
"description": "Suite-level initialization steps executed before any tests run",
"items": {
"$ref": "#/definitions/step"
}
},
"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"
},
"init": {
"type": "array",
"description": "Test-level initialization steps executed before the test steps",
"items": {
"$ref": "#/definitions/step"
}
},
"steps": {
"type": "array",
"description": "Array of test steps to execute",
"minItems": 1,
"items": {
"$ref": "#/definitions/step"
}
},
"cleanup": {
"type": "object",
"description": "Test-level cleanup hooks executed after the test completes",
"properties": {
"always": {
"type": "array",
"description": "Steps that always run during cleanup",
"items": {
"$ref": "#/definitions/step"
}
},
"on_failure": {
"type": "array",
"description": "Steps that run when the suite or test fails",
"items": {
"$ref": "#/definitions/step"
}
}
},
"additionalProperties": false
}
}
}
},
"cleanup": {
"type": "object",
"description": "Suite-level cleanup hooks executed after all tests complete or when initialization fails",
"properties": {
"always": {
"type": "array",
"description": "Steps that always run during cleanup",
"items": {
"$ref": "#/definitions/step"
}
},
"on_failure": {
"type": "array",
"description": "Steps that run when the suite or test fails",
"items": {
"$ref": "#/definitions/step"
}
}
},
"additionalProperties": false
}
},
"definitions": {
"step": {
"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",
"playwright",
"browser_use",
"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": "http"
}
}
},
"then": {
"properties": {
"config": {
"type": "object",
"required": [
"method",
"url"
],
"properties": {
"method": {
"type": "string",
"description": "HTTP method to use"
},
"url": {
"type": "string",
"description": "Request URL"
},
"headers": {
"type": "object",
"description": "HTTP headers to include",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "string",
"description": "Raw request body (string). If 'form' is also provided, 'form' takes precedence."
},
"form": {
"type": "object",
"description": "Form fields to be url-encoded as application/x-www-form-urlencoded",
"additionalProperties": true
},
"openapi": {
"type": "object",
"description": "Override OpenAPI validation behavior for this HTTP step",
"properties": {
"spec": {
"type": "string",
"description": "Path or URL to an OpenAPI v3 document"
},
"operation_id": {
"type": "string",
"description": "Require the request to match a specific operationId"
},
"version": {
"type": "string",
"description": "Optional spec version identifier used to invalidate cached contracts"
},
"validate_request": {
"type": "boolean",
"description": "Enable request validation for this step"
},
"validate_response": {
"type": "boolean",
"description": "Enable response validation for this step"
}
},
"additionalProperties": false
}
}
}
}
}
},
{
"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": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"description": "Task description for the agent (supports template variables)"
},
"mode": {
"type": "string",
"enum": [
"single",
"continue",
"resume"
],
"description": "Execution mode (default: single)"
},
"session_id": {
"type": "string",
"description": "Session ID for continue/resume modes (supports template variables)"
},
"max_turns": {
"type": "integer",
"description": "Maximum conversation turns (default: unlimited)",
"minimum": 1
},
"timeout": {
"type": "string",
"pattern": "^[0-9]+(s|m|h)$",
"description": "Execution timeout (default: unlimited)"
},
"system_prompt": {
"type": "string",
"description": "System prompt prepended to conversation (supports template variables)"
},
"cwd": {
"type": "string",
"description": "Working directory for agent execution"
},
"capabilities": {
"type": "array",
"items": {
"type": "string",
"enum": [
"browser"
]
},
"description": "Agent capabilities that map to MCP servers (e.g., 'browser' for @playwright/mcp)"
},
"api_key": {
"type": "string",
"description": "Anthropic API key (optional - auto-detected from ANTHROPIC_API_KEY env var if not provided)"
},
"allowed_tools": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"description": "List of allowed MCP tool names"
},
{
"type": "string",
"enum": [
"*"
],
"description": "Wildcard to allow all tools"
}
],
"description": "Tool permissions (default: ['*'] wildcard)"
}
}
}
}
}
},
{
"if": {
"properties": {
"plugin": {
"const": "supabase"
}
}
},
"then": {
"properties": {
"config": {
"type": "object",
"required": [
"operation"
],
"properties": {
"url": {
"type": "string",
"description": "Supabase project URL (optional - auto-detected from SUPABASE_URL env var if not provided)"
},
"key": {
"type": "string",
"description": "Supabase API key (optional - auto-detected from SUPABASE_SECRET_KEY, SUPABASE_SERVICE_KEY, SUPABASE_PUBLISHABLE_KEY, or SUPABASE_ANON_KEY env vars if not provided)"
},
"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_delete_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",
"properties": {
"columns": {
"type": "array",
"description": "Columns to select",
"items": {
"type": "string"
},
"default": [
"*"
]
},
"filters": {
"type": "array",
"description": "Filters to apply",
"items": {
"type": "object",
"required": [
"column",
"operator",
"value"
],
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"eq",
"neq",
"gt",
"gte",
"lt",
"lte",
"like",
"ilike",
"is",
"in",
"contains",
"contained_by",
"range_gt",
"range_gte",
"range_lt",
"range_lte"
]
},
"value": {
"description": "Filter value"
}
}
}
},
"order": {
"type": "array",
"description": "Ordering configuration",
"items": {
"type": "object",
"required": [
"column"
],
"properties": {
"column": {
"type": "string"
},
"ascending": {
"type": "boolean",
"default": true
}
}
}
},
"limit": {
"type": "integer",
"minimum": 1
},
"offset": {
"type": "integer",
"minimum": 0
},
"count": {
"type": "string",
"enum": [
"exact",
"planned",
"estimated"
],
"description": "Count type for query"
}
}
},
"insert": {
"type": "object",
"description": "Configuration for insert operation",
"properties": {
"data": {
"description": "Data to insert (object or array of objects)"
},
"upsert": {
"type": "boolean",
"description": "Use upsert (insert or update)",
"default": false
},
"on_conflict": {
"type": "string",
"description": "Column(s) for conflict resolution"
}
},
"required": [
"data"
]
},
"update": {
"type": "object",
"description": "Configuration for update operation",
"properties": {
"data": {
"type": "object",
"description": "Data to update"
},
"filters": {
"type": "array",
"description": "Filters to apply for update",
"items": {
"type": "object",
"required": [
"column",
"operator",
"value"
],
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string"
},
"value": {
"description": "Filter value"
}
}
}
}
},
"required": [
"data"
]
},
"delete": {
"type": "object",
"description": "Configuration for delete operation",
"properties": {
"filters": {
"type": "array",
"description": "Filters to apply for delete",
"items": {
"type": "object",
"required": [
"column",
"operator",
"value"