# Generated by documentation/scripts/sync_agent_capability_docs.mjs — do not edit by hand.
openapi: 3.1.0
info:
  title: Cliq Agents
  version: 1.0.0
  description: |
    Connector and related agent **actions**, documented like an API.
    
    Each **tag** in the left nav is an agent. Each **operation** is an action you set on a phase in `team.yml`.
    
    This is **not** an HTTP service — the paths (`/jira/get_issue`, …) are documentation handles so Mintlify can render a standard API reference with left navigation.
    
    **How to use**
    1. Configure daemon settings (`cliq settings agents.<name>.*`).
    2. Add a phase with `agent: <name>` and `action: <operation>` (when required).
    3. Fill `sources` or `target_entries` entry fields as shown on each operation.
    
    Source of truth: `cliq-agents/*/manifest.json`. Regenerate with `node documentation/scripts/sync_agent_capability_docs.mjs`.
servers:
  - url: "https://docs.getcliq.io"
    description: "Documentation surface only — these operations describe team.yml phase config, not an HTTP API."
tags:
  - name: confluence
    description: |
      Confluence connector — fetch and publish pages, spaces, and search results
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/confluence/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.confluence.<key> <value>
      ```
      
      ### Required
      
      - `base_url` — Confluence instance URL, e.g. https://yoursite.atlassian.net/wiki
      - `email` — Confluence account email for authentication
      - `api_token` — Confluence API token for authentication
      
      ## Shared phase inputs
      
      - `action` (`string`, **required**) — Confluence operation: get_page | search | create_page | update_page
      - `sources` (`source_entry[]`, required unless `target_entries`) — Confluence resources to fetch (pages, spaces, search)
      - `target_entries` (`target_entry[]`, required unless `sources`) — Confluence resources to write to (create/update pages)
  - name: curl
    description: |
      HTTP connector — fetch URLs and deliver content via curl
      
      **Type:** `exec` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/curl/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      No daemon settings required.
      
      ## Shared phase inputs
      
      - `sources` (`source_entry[]`, required unless `target_entries`) — URLs to fetch content from
      - `target_entries` (`target_entry[]`, required unless `sources`) — URLs to deliver content to
  - name: datadog
    description: |
      Datadog connector — fetch metrics, events, monitors, and logs
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/datadog/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.datadog.<key> <value>
      ```
      
      ### Required
      
      - `api_key` — Datadog API key
      - `app_key` — Datadog application key
      
      ## Shared phase inputs
      
      - `action` (`string`, **required**) — Datadog operation: query_metrics | get_monitors | get_events | post_event
      - `sources` (`source_entry[]`, required unless `target_entries`) — Datadog resources to fetch (metrics, monitors, events)
      - `target_entries` (`target_entry[]`, required unless `sources`) — Datadog resources to write to (events, monitors)
  - name: email
    description: |
      Email notification agent — delivers pipeline event notifications via SMTP
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/email/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.email.<key> <value>
      ```
      
      ### Required
      
      - `smtp_host` — SMTP server hostname
      - `channels` — Channel name to email address mapping
      
      ### Optional
      
      - `smtp_port` — SMTP server port, default 587
      - `username` — SMTP authentication username
      - `password` — SMTP authentication password
      - `tls` — Enable TLS encryption, default true
      - `from_address` — Sender email address
      - `from_name` — Sender display name
      
      ## Shared phase inputs
      
      - `notify` (`string[]`, optional) — Pipeline events this agent handles (e.g. on_escalate, on_complete)
  - name: gdrive
    description: |
      Google Drive connector — fetch and upload files from Google Drive
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/gdrive/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.gdrive.<key> <value>
      ```
      
      ### Required
      
      - `credentials_file` — Path to Google service account credentials JSON file
      
      ### Optional
      
      - `auth_mode` — Authentication mode: 'service_account' or 'oauth'
      
      ## Shared phase inputs
      
      - `sources` (`source_entry[]`, required unless `target_entries`) — Google Drive files to download
      - `target_entries` (`target_entry[]`, required unless `sources`) — Google Drive files to upload
  - name: git
    description: |
      Git finalization — create pull requests via GitHub or Bitbucket
      
      **Type:** `connector` · **Version:** `1.1.1`
      **Manifest:** `cliq-agents/git/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.git.<key> <value>
      ```
      
      ### Required
      
      - `provider` — Git hosting provider: github or bitbucket
      - `github.token` _(when provider=github)_ — GitHub personal access token (repo scope)
      - `bitbucket.email` _(when provider=bitbucket)_ — Bitbucket account email
      - `bitbucket.api_token` _(when provider=bitbucket)_ — Bitbucket API token / app password
      - `bitbucket.workspace` _(when provider=bitbucket)_ — Bitbucket workspace slug
      
      ### Optional
      
      - `github.base_branch` _(when provider=github)_ (default: `"main"`) — Default PR base branch for GitHub repos (fallback when the open-pr phase does not pin one; further fallback to the remote's HEAD symref, then 'main')
      - `github.remote` _(when provider=github)_ (default: `"origin"`) — Git remote name used to resolve the repo
      - `github.pr_draft` _(when provider=github)_ (default: `false`) — Create pull requests as drafts
      - `bitbucket.base_url` _(when provider=bitbucket)_ (default: `"https://api.bitbucket.org/2.0"`) — Bitbucket API base URL
      - `bitbucket.base_branch` _(when provider=bitbucket)_ — Default PR base branch for Bitbucket repos (fallback when the open-pr phase does not pin one; further fallback to the remote's HEAD symref, then 'main')
      
      ## Shared phase inputs
      
      - `action` (`string`, **required**) — Git operation to perform (currently only 'create_pr')
      - `project_dir` (`string`, optional) — Working tree the PR is opened from (defaults to process.cwd())
      - `base_branch` (`string`, optional) — Destination branch for the PR (e.g. 'master', 'develop'). Overrides settings.<provider>.base_branch and the remote HEAD auto-detect; falls back to 'main' if none is available
      - `notify` (`object`, optional) — Pipeline lifecycle events this agent can handle (e.g. on_complete with action: create_pr)
  - name: hubspot
    description: |
      HubSpot connector — fetch and update contacts, deals, companies, and tickets
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/hubspot/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.hubspot.<key> <value>
      ```
      
      ### Required
      
      - `access_token` — HubSpot private app access token
      
      ## Shared phase inputs
      
      - `action` (`string`, **required**) — HubSpot operation: get_contact | get_deal | get_company | search | add_note
      - `sources` (`source_entry[]`, required unless `target_entries`) — HubSpot resources to fetch (contacts, deals, companies)
      - `target_entries` (`target_entry[]`, required unless `sources`) — HubSpot resources to write to (create/update records)
  - name: jira
    description: |
      Jira connector — fetch issues/trees, create/update Stories from dispatch.json, comments, transitions
      
      **Type:** `connector` · **Version:** `1.2.1`
      **Manifest:** `cliq-agents/jira/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.jira.<key> <value>
      ```
      
      ### Required
      
      - `base_url` — Jira instance URL, e.g. https://yoursite.atlassian.net
      - `email` — Jira account email for authentication
      - `api_token` — Jira API token for authentication
      
      ## Shared phase inputs
      
      - `action` (`string`, **required**) — Jira operation: get_issue | get_issue_tree | get_comments | search | add_comment | transition | create_issue | update_issue | update_fields
      - `sources` (`source_entry[]`, required unless `target_entries`) — Jira resources to fetch (issues, trees, comments, search)
      - `target_entries` (`target_entry[]`, required unless `sources`) — Jira resources to write (comments, transitions, dispatch.json create/update)
      - `notify` (`object`, optional) — Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)
  - name: s3
    description: |
      S3 connector — fetch and upload objects from AWS S3 buckets
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/s3/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.s3.<key> <value>
      ```
      
      ### Required
      
      - `access_key_id` — AWS access key ID
      - `secret_access_key` — AWS secret access key
      
      ## Shared phase inputs
      
      - `sources` (`source_entry[]`, required unless `target_entries`) — S3 objects to download
      - `target_entries` (`target_entry[]`, required unless `sources`) — S3 objects to upload
  - name: slack
    description: |
      Slack notification agent — delivers pipeline event notifications to Slack webhooks
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/slack/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.slack.<key> <value>
      ```
      
      ### Required
      
      - `channels` — Channel name to webhook URL mapping for notifications
      
      ## Shared phase inputs
      
      - `notify` (`string[]`, optional) — Pipeline events this agent handles (e.g. on_escalate, on_complete)
  - name: zendesk
    description: |
      Zendesk connector — fetch and update tickets, comments, and searches
      
      **Type:** `connector` · **Version:** `1.0.0`
      **Manifest:** `cliq-agents/zendesk/manifest.json`
      
      This is **team.yml phase configuration**, not an HTTP API. Each operation below is an agent action.
      
      ## Settings
      
      Configure on the daemon before runs:
      
      ```bash
      cliq settings agents.zendesk.<key> <value>
      ```
      
      ### Required
      
      - `subdomain` — Zendesk subdomain, e.g. 'yourcompany' from yourcompany.zendesk.com
      - `email` — Zendesk agent email for authentication
      - `api_token` — Zendesk API token for authentication
      
      ## Shared phase inputs
      
      - `action` (`string`, **required**) — Zendesk operation: get_ticket | get_comments | search | add_comment | update_status
      - `sources` (`source_entry[]`, required unless `target_entries`) — Zendesk resources to fetch (tickets, comments, search)
      - `target_entries` (`target_entry[]`, required unless `sources`) — Zendesk resources to write to (comments, status updates)
paths:
  "/confluence/create_page":
    post:
      tags:
        - confluence
      operationId: confluence.create_page
      summary: create_page
      description: |
        Create a page in a space
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: create_page
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ConfluenceCreatePagePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: confluence-create-page
                  agent: confluence
                  action: create_page
                  target_entries:
                    - name: artifact
                      ref: PROJ-123
                      title: Page title
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/confluence/get_page":
    post:
      tags:
        - confluence
      operationId: confluence.get_page
      summary: get_page
      description: |
        Fetch a page by ID
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_page
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ConfluenceGetPagePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: confluence-get-page
                  agent: confluence
                  action: get_page
                  sources:
                    - name: artifact
                      ref: 123456
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/confluence/search":
    post:
      tags:
        - confluence
      operationId: confluence.search
      summary: search
      description: |
        Search pages with CQL
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: search
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ConfluenceSearchPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: confluence-search
                  agent: confluence
                  action: search
                  sources:
                    - name: artifact
                      ref: your query
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/confluence/update_page":
    post:
      tags:
        - confluence
      operationId: confluence.update_page
      summary: update_page
      description: |
        Update an existing page
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: update_page
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ConfluenceUpdatePagePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: confluence-update-page
                  agent: confluence
                  action: update_page
                  target_entries:
                    - name: artifact
                      ref: 123456
                      title: Page title
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/curl/deliver":
    post:
      tags:
        - curl
      operationId: curl.deliver
      summary: deliver
      description: |
        HTTP deliver (no `action` field — use `target_entries`)
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: deliver
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/CurlDeliverPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: curl-deliver
                  agent: curl
                  target_entries:
                    - name: artifact
                      url: "https://example.com/resource"
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/curl/fetch":
    post:
      tags:
        - curl
      operationId: curl.fetch
      summary: fetch
      description: |
        HTTP fetch (no `action` field — use `sources`)
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: fetch
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/CurlFetchPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: curl-fetch
                  agent: curl
                  sources:
                    - name: artifact
                      url: "https://example.com/resource"
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/datadog/get_events":
    post:
      tags:
        - datadog
      operationId: datadog.get_events
      summary: get_events
      description: |
        Fetch events
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_events
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/DatadogGetEventsPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: datadog-get-events
                  agent: datadog
                  action: get_events
                  sources:
                    - name: artifact
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/datadog/get_monitors":
    post:
      tags:
        - datadog
      operationId: datadog.get_monitors
      summary: get_monitors
      description: |
        List monitors
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_monitors
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/DatadogGetMonitorsPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: datadog-get-monitors
                  agent: datadog
                  action: get_monitors
                  sources:
                    - name: artifact
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/datadog/post_event":
    post:
      tags:
        - datadog
      operationId: datadog.post_event
      summary: post_event
      description: |
        Post a custom event
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: post_event
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/DatadogPostEventPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: datadog-post-event
                  agent: datadog
                  action: post_event
                  target_entries:
                    - name: artifact
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/datadog/query_metrics":
    post:
      tags:
        - datadog
      operationId: datadog.query_metrics
      summary: query_metrics
      description: |
        Query time-series metrics
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: query_metrics
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/DatadogQueryMetricsPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: datadog-query-metrics
                  agent: datadog
                  action: query_metrics
                  sources:
                    - name: artifact
                      ref: your query
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/email/configure":
    post:
      tags:
        - email
      operationId: email.configure
      summary: configure
      description: |
        Configure this agent via phase inputs (no discrete actions).
        
        **Direction:** phase-level (no sources/target_entries)
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: configure
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/EmailConfigurePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: email-configure
                  agent: email
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/gdrive/download":
    post:
      tags:
        - gdrive
      operationId: gdrive.download
      summary: download
      description: |
        Download file or list folder (no `action` — use `sources`)
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: download
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GdriveDownloadPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: gdrive-download
                  agent: gdrive
                  sources:
                    - name: artifact
                      ref: folder-or-id
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/gdrive/upload":
    post:
      tags:
        - gdrive
      operationId: gdrive.upload
      summary: upload
      description: |
        Upload into a folder (no `action` — use `target_entries`)
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: upload
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GdriveUploadPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: gdrive-upload
                  agent: gdrive
                  target_entries:
                    - name: artifact
                      ref: folder-or-id
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/git/create_pr":
    post:
      tags:
        - git
      operationId: git.create_pr
      summary: create_pr
      description: |
        Create a pull request on GitHub or Bitbucket
        
        **Direction:** phase-level (no sources/target_entries)
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: create_pr
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/GitCreatePrPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: git-create-pr
                  agent: git
                  action: create_pr
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/hubspot/add_note":
    post:
      tags:
        - hubspot
      operationId: hubspot.add_note
      summary: add_note
      description: |
        Create an engagement note on a CRM object
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: add_note
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/HubspotAddNotePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: hubspot-add-note
                  agent: hubspot
                  action: add_note
                  target_entries:
                    - name: artifact
                      ref: identifier
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/hubspot/get_company":
    post:
      tags:
        - hubspot
      operationId: hubspot.get_company
      summary: get_company
      description: |
        Fetch a company by ID
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_company
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/HubspotGetCompanyPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: hubspot-get-company
                  agent: hubspot
                  action: get_company
                  sources:
                    - name: artifact
                      ref: identifier
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/hubspot/get_contact":
    post:
      tags:
        - hubspot
      operationId: hubspot.get_contact
      summary: get_contact
      description: |
        Fetch a contact by ID or email
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_contact
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/HubspotGetContactPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: hubspot-get-contact
                  agent: hubspot
                  action: get_contact
                  sources:
                    - name: artifact
                      ref: identifier
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/hubspot/get_deal":
    post:
      tags:
        - hubspot
      operationId: hubspot.get_deal
      summary: get_deal
      description: |
        Fetch a deal by ID
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_deal
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/HubspotGetDealPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: hubspot-get-deal
                  agent: hubspot
                  action: get_deal
                  sources:
                    - name: artifact
                      ref: identifier
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/hubspot/search":
    post:
      tags:
        - hubspot
      operationId: hubspot.search
      summary: search
      description: |
        Search contacts
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: search
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/HubspotSearchPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: hubspot-search
                  agent: hubspot
                  action: search
                  sources:
                    - name: artifact
                      ref: your query
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/add_comment":
    post:
      tags:
        - jira
      operationId: jira.add_comment
      summary: add_comment
      description: |
        Post a comment to an issue
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: add_comment
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraAddCommentPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-add-comment
                  agent: jira
                  action: add_comment
                  target_entries:
                    - name: artifact
                      ref: PROJ-123
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/create_issue":
    post:
      tags:
        - jira
      operationId: jira.create_issue
      summary: create_issue
      description: |
        Create Stories from dispatch.json jobs (or update description when jira_key set)
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: create_issue
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraCreateIssuePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-create-issue
                  agent: jira
                  action: create_issue
                  target_entries:
                    - name: artifact
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/get_comments":
    post:
      tags:
        - jira
      operationId: jira.get_comments
      summary: get_comments
      description: |
        Fetch all comments on an issue
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_comments
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraGetCommentsPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-get-comments
                  agent: jira
                  action: get_comments
                  sources:
                    - name: artifact
                      ref: PROJ-123
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/get_issue":
    post:
      tags:
        - jira
      operationId: jira.get_issue
      summary: get_issue
      description: |
        Fetch a single issue by key (expand=names,renderedFields)
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_issue
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraGetIssuePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-get-issue
                  agent: jira
                  action: get_issue
                  sources:
                    - name: artifact
                      ref: PROJ-123
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/get_issue_tree":
    post:
      tags:
        - jira
      operationId: jira.get_issue_tree
      summary: get_issue_tree
      description: |
        Fetch issue + children (full child GET with expand); write planning artifacts
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_issue_tree
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraGetIssueTreePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-get-issue-tree
                  agent: jira
                  action: get_issue_tree
                  sources:
                    - name: artifact
                      ref: PROJ-123
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/search":
    post:
      tags:
        - jira
      operationId: jira.search
      summary: search
      description: |
        Run a JQL query via /rest/api/3/search/jql (paged)
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: search
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraSearchPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-search
                  agent: jira
                  action: search
                  sources:
                    - name: artifact
                      ref: your query
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/transition":
    post:
      tags:
        - jira
      operationId: jira.transition
      summary: transition
      description: |
        Trigger a workflow status transition
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: transition
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraTransitionPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-transition
                  agent: jira
                  action: transition
                  target_entries:
                    - name: artifact
                      ref: PROJ-123
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/update_fields":
    post:
      tags:
        - jira
      operationId: jira.update_fields
      summary: update_fields
      description: |
        Alias of update_issue — PUT job.description on existing keys
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: update_fields
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraUpdateFieldsPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-update-fields
                  agent: jira
                  action: update_fields
                  target_entries:
                    - name: artifact
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/jira/update_issue":
    post:
      tags:
        - jira
      operationId: jira.update_issue
      summary: update_issue
      description: |
        PUT job.description on existing keys in dispatch.json (requires jira_key)
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: update_issue
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/JiraUpdateIssuePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: jira-update-issue
                  agent: jira
                  action: update_issue
                  target_entries:
                    - name: artifact
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/s3/download":
    post:
      tags:
        - s3
      operationId: s3.download
      summary: download
      description: |
        Download object (no `action` — use `sources`)
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: download
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/S3DownloadPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: s3-download
                  agent: s3
                  sources:
                    - name: artifact
                      ref: PROJ-123
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/s3/upload":
    post:
      tags:
        - s3
      operationId: s3.upload
      summary: upload
      description: |
        Upload object (no `action` — use `target_entries`)
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: upload
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/S3UploadPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: s3-upload
                  agent: s3
                  target_entries:
                    - name: artifact
                      ref: "https://example.com/resource"
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/slack/configure":
    post:
      tags:
        - slack
      operationId: slack.configure
      summary: configure
      description: |
        Configure this agent via phase inputs (no discrete actions).
        
        **Direction:** phase-level (no sources/target_entries)
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: configure
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/SlackConfigurePhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: slack-configure
                  agent: slack
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/zendesk/add_comment":
    post:
      tags:
        - zendesk
      operationId: zendesk.add_comment
      summary: add_comment
      description: |
        Post a comment on a ticket
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: add_comment
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ZendeskAddCommentPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: zendesk-add-comment
                  agent: zendesk
                  action: add_comment
                  target_entries:
                    - name: artifact
                      ref: PROJ-123
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/zendesk/get_comments":
    post:
      tags:
        - zendesk
      operationId: zendesk.get_comments
      summary: get_comments
      description: |
        Fetch comments on a ticket
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_comments
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ZendeskGetCommentsPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: zendesk-get-comments
                  agent: zendesk
                  action: get_comments
                  sources:
                    - name: artifact
                      ref: PROJ-123
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/zendesk/get_ticket":
    post:
      tags:
        - zendesk
      operationId: zendesk.get_ticket
      summary: get_ticket
      description: |
        Fetch a ticket by ID
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: get_ticket
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ZendeskGetTicketPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: zendesk-get-ticket
                  agent: zendesk
                  action: get_ticket
                  sources:
                    - name: artifact
                      ref: PROJ-123
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/zendesk/search":
    post:
      tags:
        - zendesk
      operationId: zendesk.search
      summary: search
      description: |
        Run a Zendesk search query
        
        **Direction:** source (read via `sources`)
        **Collection:** `sources`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: search
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ZendeskSearchPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: zendesk-search
                  agent: zendesk
                  action: search
                  sources:
                    - name: artifact
                      ref: your query
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
  "/zendesk/update_status":
    post:
      tags:
        - zendesk
      operationId: zendesk.update_status
      summary: update_status
      description: |
        Change ticket status
        
        **Direction:** target (write via `target_entries`)
        **Collection:** `target_entries`
        
        Put this object on a phase in `team.yml` (YAML). The request body schema mirrors that phase.
      x-mint:
        label: update_status
      requestBody:
        required: true
        description: Phase configuration for this action (team.yml shape).
        content:
          "application/json":
            schema:
              "$ref": "#/components/schemas/ZendeskUpdateStatusPhase"
            examples:
              phase:
                summary: team.yml phase
                value:
                  name: zendesk-update-status
                  agent: zendesk
                  action: update_status
                  target_entries:
                    - name: artifact
                      ref: PROJ-123
                      file: path/to/payload.txt
      responses:
        "200":
          description: "Phase completes successfully. Connector agents write artifacts under `.cliq/files/{phase}/` and return structured `data` / `text` in the agent result."
          content:
            "application/json":
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  text:
                    type: string
                    description: Human-readable summary
                  data:
                    type: object
                    additionalProperties: true
                    description: Action-specific result payload
        "400":
          description: "Missing required settings, phase inputs, or entry fields."
components:
  schemas:
    ConfluenceCreatePagePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: confluence-create-page
        agent:
          type: string
          enum:
            - confluence
          description: "Must be `confluence`"
        action:
          type: string
          enum:
            - create_page
          description: "Operation to run — `create_page`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              ref:
                type: string
                description: Space key
              title:
                type: string
                description: Page title
              file:
                type: string
                description: Workspace file with page HTML body
            required:
              - name
              - ref
              - title
              - file
    ConfluenceGetPagePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: confluence-get-page
        agent:
          type: string
          enum:
            - confluence
          description: "Must be `confluence`"
        action:
          type: string
          enum:
            - get_page
          description: "Operation to run — `get_page`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Page ID
            required:
              - name
              - ref
    ConfluenceSearchPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: confluence-search
        agent:
          type: string
          enum:
            - confluence
          description: "Must be `confluence`"
        action:
          type: string
          enum:
            - search
          description: "Operation to run — `search`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: CQL query string
            required:
              - name
              - ref
    ConfluenceUpdatePagePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: confluence-update-page
        agent:
          type: string
          enum:
            - confluence
          description: "Must be `confluence`"
        action:
          type: string
          enum:
            - update_page
          description: "Operation to run — `update_page`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              ref:
                type: string
                description: Page ID
              title:
                type: string
                description: Page title
              file:
                type: string
                description: Workspace file with page HTML body
            required:
              - name
              - ref
              - title
              - file
    CurlDeliverPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: curl-deliver
        agent:
          type: string
          enum:
            - curl
          description: "Must be `curl`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              url:
                type: string
                description: Destination URL
              file:
                type: string
                description: Local workspace file to upload
              method:
                type: string
                description: HTTP method (default POST)
              headers:
                type: object
                additionalProperties: true
                description: Request headers
            required:
              - name
              - url
              - file
    CurlFetchPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: curl-fetch
        agent:
          type: string
          enum:
            - curl
          description: "Must be `curl`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              url:
                type: string
                description: URL to fetch
              method:
                type: string
                description: HTTP method (default GET)
              headers:
                type: object
                additionalProperties: true
                description: Request headers
              body:
                type: string
                description: Request body (implies POST when set)
            required:
              - name
              - url
    DatadogGetEventsPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: datadog-get-events
        agent:
          type: string
          enum:
            - datadog
          description: "Must be `datadog`"
        action:
          type: string
          enum:
            - get_events
          description: "Operation to run — `get_events`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Optional filter
              window:
                type: string
                description: "Lookback window. Default `24h`"
            required:
              - name
    DatadogGetMonitorsPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: datadog-get-monitors
        agent:
          type: string
          enum:
            - datadog
          description: "Must be `datadog`"
        action:
          type: string
          enum:
            - get_monitors
          description: "Operation to run — `get_monitors`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Unused for this action
            required:
              - name
    DatadogPostEventPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: datadog-post-event
        agent:
          type: string
          enum:
            - datadog
          description: "Must be `datadog`"
        action:
          type: string
          enum:
            - post_event
          description: "Operation to run — `post_event`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              file:
                type: string
                description: Workspace file with JSON event payload
            required:
              - name
              - file
    DatadogQueryMetricsPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: datadog-query-metrics
        agent:
          type: string
          enum:
            - datadog
          description: "Must be `datadog`"
        action:
          type: string
          enum:
            - query_metrics
          description: "Operation to run — `query_metrics`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Metric query string
              window:
                type: string
                description: "Lookback window (e.g. `1h`, `24h`). Default `1h`"
            required:
              - name
              - ref
    EmailConfigurePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: email-configure
        agent:
          type: string
          enum:
            - email
          description: "Must be `email`"
        notify:
          type: array
          items:
            type: string
          description: "Pipeline events this agent handles (e.g. on_escalate, on_complete)"
    GdriveDownloadPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: gdrive-download
        agent:
          type: string
          enum:
            - gdrive
          description: "Must be `gdrive`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: "File ID, or `folder/{id}` for listing"
            required:
              - name
              - ref
    GdriveUploadPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: gdrive-upload
        agent:
          type: string
          enum:
            - gdrive
          description: "Must be `gdrive`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the upload
              ref:
                type: string
                description: Destination folder ID
              file:
                type: string
                description: Local workspace file path
            required:
              - name
              - ref
              - file
    GitCreatePrPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: git-create-pr
        agent:
          type: string
          enum:
            - git
          description: "Must be `git`"
        action:
          type: string
          enum:
            - create_pr
          description: "Operation to run — `create_pr`"
        project_dir:
          type: string
          description: Working tree the PR is opened from (defaults to process.cwd())
        base_branch:
          type: string
          description: "Destination branch for the PR (e.g. 'master', 'develop'). Overrides settings.<provider>.base_branch and the remote HEAD auto-detect; falls back to 'main' if none is available"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_complete with action: create_pr)"
    HubspotAddNotePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: hubspot-add-note
        agent:
          type: string
          enum:
            - hubspot
          description: "Must be `hubspot`"
        action:
          type: string
          enum:
            - add_note
          description: "Operation to run — `add_note`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              ref:
                type: string
                description: CRM object ID
              file:
                type: string
                description: Workspace file with note content
            required:
              - name
              - ref
              - file
    HubspotGetCompanyPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: hubspot-get-company
        agent:
          type: string
          enum:
            - hubspot
          description: "Must be `hubspot`"
        action:
          type: string
          enum:
            - get_company
          description: "Operation to run — `get_company`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Company ID
            required:
              - name
              - ref
    HubspotGetContactPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: hubspot-get-contact
        agent:
          type: string
          enum:
            - hubspot
          description: "Must be `hubspot`"
        action:
          type: string
          enum:
            - get_contact
          description: "Operation to run — `get_contact`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Contact ID or email
            required:
              - name
              - ref
    HubspotGetDealPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: hubspot-get-deal
        agent:
          type: string
          enum:
            - hubspot
          description: "Must be `hubspot`"
        action:
          type: string
          enum:
            - get_deal
          description: "Operation to run — `get_deal`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Deal ID
            required:
              - name
              - ref
    HubspotSearchPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: hubspot-search
        agent:
          type: string
          enum:
            - hubspot
          description: "Must be `hubspot`"
        action:
          type: string
          enum:
            - search
          description: "Operation to run — `search`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Search query string
            required:
              - name
              - ref
    JiraAddCommentPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-add-comment
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - add_comment
          description: "Operation to run — `add_comment`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              ref:
                type: string
                description: Issue key
              file:
                type: string
                description: Workspace file with plain-text comment body
            required:
              - name
              - ref
              - file
    JiraCreateIssuePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-create-issue
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - create_issue
          description: "Operation to run — `create_issue`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              file:
                type: string
                description: "Workspace `dispatch.json` with a `jobs` array"
              ref:
                type: string
                description: "Default parent / Epic key when a job has no `parent`"
            required:
              - name
              - file
    JiraGetCommentsPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-get-comments
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - get_comments
          description: "Operation to run — `get_comments`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Issue key
            required:
              - name
              - ref
    JiraGetIssuePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-get-issue
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - get_issue
          description: "Operation to run — `get_issue`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: "Issue key (e.g. `PROJ-123`)"
            required:
              - name
              - ref
    JiraGetIssueTreePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-get-issue-tree
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - get_issue_tree
          description: "Operation to run — `get_issue_tree`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Primary ticket filename (also workspace `ticket.json` basename)"
              ref:
                type: string
                description: Root issue key (epic / story / task)
            required:
              - name
              - ref
    JiraSearchPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-search
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - search
          description: "Operation to run — `search`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: JQL query string
            required:
              - name
              - ref
    JiraTransitionPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-transition
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - transition
          description: "Operation to run — `transition`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              ref:
                type: string
                description: Issue key
              file:
                type: string
                description: "Workspace file containing the transition **ID**"
            required:
              - name
              - ref
              - file
    JiraUpdateFieldsPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-update-fields
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - update_fields
          description: "Operation to run — `update_fields`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              file:
                type: string
                description: "Workspace `dispatch.json` with jobs that already have `jira_key`"
              ref:
                type: string
                description: Unused for updates; optional default parent
            required:
              - name
              - file
    JiraUpdateIssuePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: jira-update-issue
        agent:
          type: string
          enum:
            - jira
          description: "Must be `jira`"
        action:
          type: string
          enum:
            - update_issue
          description: "Operation to run — `update_issue`"
        notify:
          type: object
          additionalProperties: true
          description: "Pipeline lifecycle events this agent can handle (e.g. on_escalate, on_complete)"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              file:
                type: string
                description: "Workspace `dispatch.json` with jobs that already have `jira_key`"
              ref:
                type: string
                description: Unused for updates; optional default parent
            required:
              - name
              - file
    S3DownloadPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: s3-download
        agent:
          type: string
          enum:
            - s3
          description: "Must be `s3`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: "S3 URI `s3://bucket/key` or `bucket/key`"
            required:
              - name
              - ref
    S3UploadPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: s3-upload
        agent:
          type: string
          enum:
            - s3
          description: "Must be `s3`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the upload
              ref:
                type: string
                description: Destination S3 URI
              file:
                type: string
                description: Local workspace file path
            required:
              - name
              - ref
              - file
    SlackConfigurePhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: slack-configure
        agent:
          type: string
          enum:
            - slack
          description: "Must be `slack`"
        notify:
          type: array
          items:
            type: string
          description: "Pipeline events this agent handles (e.g. on_escalate, on_complete)"
    ZendeskAddCommentPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: zendesk-add-comment
        agent:
          type: string
          enum:
            - zendesk
          description: "Must be `zendesk`"
        action:
          type: string
          enum:
            - add_comment
          description: "Operation to run — `add_comment`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              ref:
                type: string
                description: Ticket ID
              file:
                type: string
                description: Workspace file with comment text
            required:
              - name
              - ref
              - file
    ZendeskGetCommentsPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: zendesk-get-comments
        agent:
          type: string
          enum:
            - zendesk
          description: "Must be `zendesk`"
        action:
          type: string
          enum:
            - get_comments
          description: "Operation to run — `get_comments`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Ticket ID
            required:
              - name
              - ref
    ZendeskGetTicketPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: zendesk-get-ticket
        agent:
          type: string
          enum:
            - zendesk
          description: "Must be `zendesk`"
        action:
          type: string
          enum:
            - get_ticket
          description: "Operation to run — `get_ticket`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Ticket ID
            required:
              - name
              - ref
    ZendeskSearchPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - sources
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: zendesk-search
        agent:
          type: string
          enum:
            - zendesk
          description: "Must be `zendesk`"
        action:
          type: string
          enum:
            - search
          description: "Operation to run — `search`"
        sources:
          type: array
          description: Read sources for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: "Output filename under `.cliq/files/{phase}/`"
              ref:
                type: string
                description: Search query string
            required:
              - name
              - ref
    ZendeskUpdateStatusPhase:
      type: object
      additionalProperties: true
      required:
        - name
        - agent
        - action
        - target_entries
      properties:
        name:
          type: string
          description: Phase name in team.yml
          example: zendesk-update-status
        agent:
          type: string
          enum:
            - zendesk
          description: "Must be `zendesk`"
        action:
          type: string
          enum:
            - update_status
          description: "Operation to run — `update_status`"
        target_entries:
          type: array
          description: Write targets for this action
          minItems: 1
          items:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                description: Identifier for the operation
              ref:
                type: string
                description: Ticket ID
              file:
                type: string
                description: Workspace file with status value
            required:
              - name
              - ref
              - file
