Skip to main content
The upcoming SDK 10, CLI 6, and Vitest 0.3 releases require an MCPJam login or sk_ API key for every eval, including BYOK runs with uploads disabled. These versions must ship after the backend run-start endpoint is deployed. Earlier versions keep their existing behavior.
runSuiteFile(sourceText, options) runs an MCPJam suite file locally and decides it with the v2 verdict policy. It is the engine behind mcpjam test, exposed for code that wants the same run without the CLI. It takes explicit configuration: server bindings, provider keys, and an optional callback that returns an MCPJam connection. Every run resolves MCPJam identity; when the callback is absent, it uses the SDK credential resolver. It does not discover suite files, print, write artifacts or exit the process. It never uploads results and sends no usage telemetry — that belongs to the caller.

Options

Result

Nothing in the result carries a provider key, a platform token, a lease, server headers or environment objects. Every credential the run was handed — provider keys, platform tokens, server credentials, and any header, environment or URL value whose name or shape marks it as one (Authorization, GITHUB_TOKEN, ?sig=, a ghp_… token) — is replaced with [REDACTED] wherever observed text repeats it: execution errors, tool-call arguments, evaluator and predicate reasons, issues and warnings. Ordinary configuration such as NODE_ENV=production is not treated as a secret. Identifiers (case ids, server and tool names) and fixed vocabularies such as statuses are never rewritten.

Errors

Input that cannot run and environments that cannot be set up throw SuiteFileRunError with a stable code, a phase (validation, setup, execution, reporting) and a category. Validation and setup refusals are thrown before any model or tool call. A refusal that found concrete problems also lists every one found at that stage in details.problems; other errors carry only their message, so treat problems as optional. One error comes after execution: REPORT_INVALID (phase reporting, category integrity) means the cases ran — model calls were made and may have been billed — but the run’s own report failed validation, so no result is returned. Retrying repeats that inference. An iteration that failed its assertions is evidence, not an error: it comes back in the result. A provider refusal during execution is attributed on the iteration (refusal) and never counted as a failing assertion. Refusal attributions include credentials, billing, orgPolicy (organization AI-key policy), rateLimited, and unavailable. A terminal refusal (credentials, billing, or orgPolicy) stops scheduling further iterations.

Eval authentication

For the upcoming releases, see eval identity and local data for credential precedence, CI setup, failure behavior, and the exact fields sent before an eval.