# CodePipelineVersion

One version of a code pipeline's definition: its agents, phases, inputs, tools and limits.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `agents` | [`CodePipelineAgent`](https://docs.maitento.com/reference/types/code-pipeline-agent.md)`[]` | The pipeline's agents. |
| `phases` | [`CodePipelinePhaseDefinition`](https://docs.maitento.com/reference/types/code-pipeline-phase-definition.md)`[]` | The pipeline's phases, each a group of steps. |
| `externalOperationsMcp` | [`McpExternalOperationBinding`](https://docs.maitento.com/reference/types/mcp-external-operation-binding.md)`[]` | MCP tools every agent of the pipeline may use. |
| `externalOperationsOpenApi` | [`OpenApiExternalOperationBinding`](https://docs.maitento.com/reference/types/open-api-external-operation-binding.md)`[]` | OpenAPI tools every agent of the pipeline may use. |
| `authenticationSecretInputs` | [`ConnectorAuthenticationSecretInput`](https://docs.maitento.com/reference/types/connector-authentication-secret-input.md)`[]` | Inputs a run supplies as secrets for the tools' authentication. |
| `bindingInputs` | [`ConnectorBindingInput`](https://docs.maitento.com/reference/types/connector-binding-input.md)`[]` | Inputs a run supplies as values bound into the tools' calls. |
| `promptInputs` | [`PromptInput`](https://docs.maitento.com/reference/types/prompt-input.md)`[]` | Inputs a run supplies for the step prompts (`%%input:name%%`). |
| `vfsBindings` | [`CodePipelineVfsBinding`](https://docs.maitento.com/reference/types/code-pipeline-vfs-binding.md)`[]` | File systems the pipeline declares for its agents. A run mounts only the file systems in its own `vfsMounts`. |
| `cogniscriptAppId` | `uuid \| null` | The app that holds the pipeline's hooks (its Cogniscript methods), built from `code-pipeline-hooks/<pipeline>/` when you deploy. Null: the pipeline has no hooks. |
| `systemPrompts` | `string[] \| null` | System prompts every agent of the pipeline gets. |
| `systemPromptMode` | [`CodePipelineSystemPromptMode`](https://docs.maitento.com/reference/types/code-pipeline-system-prompt-mode.md)`\| null` | How the pipeline's `systemPrompts` combine with the ones before them. Null: `Additional`. An agent whose own mode is `Override` uses only its own prompts. |
| `resumeVfsNamespace` | `string \| null` | The namespace of a file system to save the agents' sessions in when a run finishes, fails or waits for an answer, so a resumed or restarted run carries on from them. Null: sessions are not saved. |
| `resumeVfsName` | `string \| null` | The name of that file system, within `resumeVfsNamespace`. Null: `default`. |
| `durationWarning` | `timespan \| null` | Not used by code pipeline runs. |
| `durationAutoTermination` | `timespan \| null` | The longest any step may run, for steps whose step and phase set no `durationAutoTermination`. Null: Maitento's default. |
| `durationActivityTimeout` | `timespan \| null` | How long any step may go without activity before it is stopped, for steps whose step and phase set no `durationActivityTimeout`. Null: Maitento's default. |
| `hookDurationLimit` | `timespan \| null` | The longest one hook may run. Null: 30 seconds. |
| `maxFixIterations` | `integer \| null` | The most review-and-fix rounds a hook's fix loop may run. Null: 3. Capped at 5. |
| `confidenceThreshold` | `number \| null` | For a fix loop that ends on the agents' own confidence: the confidence, from 0 to 1, at which it stops. Null: 0.8. |
| `maxInjectedPhases` | `integer \| null` | The most phases hooks may add to one run in total. Null: 24. |
| `maxCheckLoops` | `integer \| null` | The most rounds of a step's `runChallengeLoop` check. Null: 5. Capped at 8. |
| `maxParallelSteps` | `integer \| null` | How many of a phase's steps may run at once. Null: 6. Between 1 and 16. Steps still wait for the steps they depend on. |
| `credentialStack` | `string \| null` | The credential stack the pipeline's runs use, by id or name, when their start doesn't name one: its API keys and coding-agent sign-ins serve the engines, and Maitento's own keys never do. Null: the namespace's default stack, then your tenant's. |
| `reviewGateCriticalMax` | `integer \| null` | In a review-and-fix loop, the most critical findings the reviewers may report before another fix round runs. Null: 0. |
| `reviewGateHighMax` | `integer \| null` | In a review-and-fix loop, the most high-severity findings the reviewers may report before another fix round runs. Null: 2. |
| `reviewGateMediumMax` | `integer \| null` | In a review-and-fix loop, the most medium-severity findings the reviewers may report before another fix round runs. Null: 10. |
| `includeEnvironmentInfo` | `boolean` | Not used by code pipeline runs. |
| `allowHumanInteraction` | `boolean` | Whether the agents may stop and ask a person a question. The run then waits in `HumanInteractionRequired` until it is answered. When false, the run never asks. |
| `allowWebTools` | `boolean` | Whether the pipeline's agents get Maitento's web search and fetch tools. Off by default. An agent's `allowWebTools`, and a run's, override it. The coding tools' own web access is always off. |
| `onErrorHook` | `string \| null` | The name of a hook to run when the run hits an infrastructure error, such as a failed clone or push. It receives the event type, the error and the attempt number, and returns JSON with a `decision`: `"retry"`, `"skip"`, or `"fail"` with a `reason`. |
| `version` | `integer` | The version number, from 1. Every change to a definition adds a new version with the next number. |
| `date` | `datetime` | When this version was created, in UTC. |
| `isDisabled` | `boolean` | Whether this version is disabled. A disabled version is never used: new links and runs take the latest enabled version, and anything pinned to this one fails until it is re-enabled. |

## Example

```json
{
  "agents": [
    {
      "name": "...",
      "defaultEngine": "Claude",
      "role": "Architect",
      "tags": [],
      "defaultModel": "...",
      "systemPrompts": [],
      "enginePrompts": [],
      "systemPromptMode": "Additional",
      "externalOperationsMcp": [],
      "externalOperationsOpenApi": [],
      "allowWebTools": false
    }
  ],
  "phases": [
    {
      "name": "...",
      "dependsOn": [],
      "steps": [],
      "preHook": "...",
      "postHook": "...",
      "onFailHook": "...",
      "durationWarning": "00:05:00",
      "durationAutoTermination": "00:05:00",
      "durationActivityTimeout": "00:05:00"
    }
  ],
  "externalOperationsMcp": [
    {
      "name": "...",
      "externalOperationId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "externalOperationVersion": 0,
      "requestBindings": [],
      "authenticationHeader": {},
      "promptGuidance": "...",
      "isTerminal": false
    }
  ],
  "externalOperationsOpenApi": [
    {
      "pathBindings": [],
      "queryBindings": [],
      "name": "...",
      "externalOperationId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "externalOperationVersion": 0,
      "requestBindings": [],
      "authenticationHeader": {},
      "promptGuidance": "...",
      "isTerminal": false
    }
  ],
  "authenticationSecretInputs": [
    {
      "externalOperationId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "agentId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "defaultSecretId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "headerName": "...",
      "name": "...",
      "description": "...",
      "isRequired": false
    }
  ],
  "bindingInputs": [
    {
      "externalOperationId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "agentId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "target": "...",
      "defaultValue": "...",
      "type": "Request",
      "name": "...",
      "description": "...",
      "isRequired": false
    }
  ],
  "promptInputs": [
    {
      "dataType": "String",
      "name": "...",
      "description": "...",
      "isRequired": false
    }
  ],
  "vfsBindings": [
    {
      "name": "...",
      "vfsId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "mode": "ReadOnly",
      "context": "..."
    }
  ],
  "cogniscriptAppId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "systemPrompts": [
    "..."
  ],
  "systemPromptMode": "Additional",
  "resumeVfsNamespace": "...",
  "resumeVfsName": "...",
  "durationWarning": "00:05:00",
  "durationAutoTermination": "00:05:00",
  "durationActivityTimeout": "00:05:00",
  "hookDurationLimit": "00:05:00",
  "maxFixIterations": 0,
  "confidenceThreshold": 0,
  "maxInjectedPhases": 0,
  "maxCheckLoops": 0,
  "maxParallelSteps": 0,
  "credentialStack": "...",
  "reviewGateCriticalMax": 0,
  "reviewGateHighMax": 0,
  "reviewGateMediumMax": 0,
  "includeEnvironmentInfo": false,
  "allowHumanInteraction": false,
  "allowWebTools": false,
  "onErrorHook": "...",
  "version": 0,
  "date": "2026-10-26T12:00:00.0000000Z",
  "isDisabled": false
}
```

## Where it's used

- Inside [`CodePipeline`](https://docs.maitento.com/reference/types/code-pipeline.md)
