{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.checkfu.com/harness-acp-v1-extension.schema.json",
  "title": "Checkfu ACP v1 extension golden vectors",
  "description": "Closed schema for the versioned ACP v1 extension carriers exercised by Checkfu shims and the generic normalizer.",
  "type": "object",
  "properties": {
    "schema_id": {
      "type": "string",
      "enum": [
        "https://docs.checkfu.com/harness-acp-v1-extension.schema.json"
      ]
    },
    "revision": {
      "type": "string",
      "enum": [
        "checkfu:acp-v1-extension-vectors@3"
      ]
    },
    "protocol": {
      "type": "string",
      "enum": [
        "acp-v1"
      ]
    },
    "wire_protocol_version": {
      "type": "number",
      "enum": [
        1
      ]
    },
    "driver_version": {
      "type": "string",
      "enum": [
        "checkfu:acp-v1@1"
      ]
    },
    "vectors": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "initialize.full-declaration"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "$ref": "#/$defs/Objects_"
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "initialize.subagents-declaration"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "$ref": "#/$defs/Objects_"
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "initialize.controls-declaration"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "$ref": "#/$defs/Objects_"
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "session.new.builtin-tools"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "runner_to_agent"
                ]
              },
              "wire": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "$ref": "#/$defs/Union_"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "session/new"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "cwd": {
                        "type": "string"
                      },
                      "mcpServers": {
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/JsonValue"
                        }
                      },
                      "_meta": {
                        "type": "object",
                        "properties": {
                          "checkfu.builtin_tools": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "bash",
                                "read",
                                "write",
                                "edit",
                                "web_search",
                                "web_fetch"
                              ]
                            }
                          }
                        },
                        "required": [
                          "checkfu.builtin_tools"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "cwd",
                      "mcpServers",
                      "_meta"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method",
                  "params"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "session.new.output-schema"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "runner_to_agent"
                ]
              },
              "wire": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "$ref": "#/$defs/Union_"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "session/new"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "cwd": {
                        "type": "string"
                      },
                      "mcpServers": {
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/JsonValue"
                        }
                      },
                      "_meta": {
                        "type": "object",
                        "properties": {
                          "checkfu.output_schema": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "object",
                                "additionalProperties": {
                                  "$ref": "#/$defs/JsonValue"
                                }
                              }
                            ]
                          }
                        },
                        "required": [
                          "checkfu.output_schema"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "cwd",
                      "mcpServers",
                      "_meta"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method",
                  "params"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "session.update.subagent-started"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "$ref": "#/$defs/Objects_1"
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "session.update.subagent-activity"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "$ref": "#/$defs/Objects_1"
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "session.update.subagent-completed"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "$ref": "#/$defs/Objects_1"
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "session.prompt.turn-telemetry"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "$ref": "#/$defs/Union_"
                  },
                  "result": {
                    "type": "object",
                    "properties": {
                      "stopReason": {
                        "type": "string",
                        "enum": [
                          "end_turn"
                        ]
                      },
                      "_meta": {
                        "type": "object",
                        "properties": {
                          "checkfu.turn": {
                            "type": "object",
                            "properties": {
                              "execution": {
                                "type": "string",
                                "enum": [
                                  "shell",
                                  "model_only"
                                ]
                              },
                              "shell_commands": {
                                "type": "integer",
                                "allOf": [
                                  {
                                    "minimum": 0
                                  },
                                  {
                                    "maximum": 1000000
                                  }
                                ]
                              },
                              "filesystem_commands": {
                                "type": "integer",
                                "allOf": [
                                  {
                                    "minimum": 0
                                  },
                                  {
                                    "maximum": 1000000
                                  }
                                ]
                              },
                              "mcp_calls": {
                                "type": "integer",
                                "allOf": [
                                  {
                                    "minimum": 0
                                  },
                                  {
                                    "maximum": 1000000
                                  }
                                ]
                              },
                              "model_calls": {
                                "type": "integer",
                                "allOf": [
                                  {
                                    "minimum": 0
                                  },
                                  {
                                    "maximum": 1000000
                                  }
                                ]
                              },
                              "wall_time_ms": {
                                "type": "integer",
                                "allOf": [
                                  {
                                    "minimum": 0
                                  },
                                  {
                                    "maximum": 604800000
                                  }
                                ]
                              },
                              "model_transient_retries": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "allOf": [
                                      {
                                        "minimum": 0
                                      },
                                      {
                                        "maximum": 1000000
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "model_overflow_recoveries": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "allOf": [
                                      {
                                        "minimum": 0
                                      },
                                      {
                                        "maximum": 1000000
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "execution",
                              "shell_commands",
                              "filesystem_commands",
                              "mcp_calls",
                              "model_calls",
                              "wall_time_ms"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "checkfu.turn"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "stopReason",
                      "_meta"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "result"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "extension.steer.request"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "runner_to_agent"
                ]
              },
              "wire": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "$ref": "#/$defs/Union_"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "_checkfu/session/steer"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "sessionId": {
                        "type": "string",
                        "allOf": [
                          {
                            "minLength": 1
                          }
                        ]
                      },
                      "id": {
                        "type": "string",
                        "allOf": [
                          {
                            "minLength": 1
                          }
                        ]
                      },
                      "content": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "sessionId",
                      "id",
                      "content"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method",
                  "params"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "extension.steer.response"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "$ref": "#/$defs/Union_"
                  },
                  "result": {
                    "type": "object",
                    "properties": {
                      "disposition": {
                        "type": "string",
                        "enum": [
                          "delivered",
                          "queued",
                          "refused"
                        ]
                      }
                    },
                    "required": [
                      "disposition"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "result"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "extension.interrupt.request"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "runner_to_agent"
                ]
              },
              "wire": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "$ref": "#/$defs/Union_"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "_checkfu/session/interrupt"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "sessionId": {
                        "type": "string",
                        "allOf": [
                          {
                            "minLength": 1
                          }
                        ]
                      }
                    },
                    "required": [
                      "sessionId"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "method",
                  "params"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "extension.interrupt.response"
                ]
              },
              "direction": {
                "type": "string",
                "enum": [
                  "agent_to_runner"
                ]
              },
              "wire": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ]
                  },
                  "id": {
                    "$ref": "#/$defs/Union_"
                  },
                  "result": {
                    "type": "object",
                    "properties": {
                      "disposition": {
                        "type": "string",
                        "enum": [
                          "draining",
                          "refused"
                        ]
                      }
                    },
                    "required": [
                      "disposition"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "jsonrpc",
                  "id",
                  "result"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "direction",
              "wire"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "required": [
    "schema_id",
    "revision",
    "protocol",
    "wire_protocol_version",
    "driver_version",
    "vectors"
  ],
  "additionalProperties": false,
  "$defs": {
    "Union_": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ]
    },
    "Objects_": {
      "type": "object",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "enum": [
            "2.0"
          ]
        },
        "id": {
          "$ref": "#/$defs/Union_"
        },
        "result": {
          "type": "object",
          "properties": {
            "protocolVersion": {
              "type": "number",
              "enum": [
                1
              ]
            },
            "agentCapabilities": {
              "type": "object",
              "properties": {
                "mcpCapabilities": {
                  "type": "object",
                  "properties": {
                    "http": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "http"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "mcpCapabilities"
              ],
              "additionalProperties": false
            },
            "agentInfo": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "version"
              ],
              "additionalProperties": false
            },
            "_meta": {
              "type": "object",
              "properties": {
                "checkfu.capabilities": {
                  "type": "object",
                  "properties": {
                    "subagents": {
                      "type": "string",
                      "enum": [
                        "observed"
                      ]
                    },
                    "steer": {
                      "type": "string",
                      "enum": [
                        "native"
                      ]
                    },
                    "interrupt": {
                      "type": "string",
                      "enum": [
                        "cooperative"
                      ]
                    },
                    "builtin_tool_scoping": {
                      "type": "string",
                      "enum": [
                        "enforced"
                      ]
                    },
                    "structured_output": {
                      "type": "string",
                      "enum": [
                        "response_format",
                        "submit_tool"
                      ]
                    },
                    "staged_files": {
                      "type": "string",
                      "enum": [
                        "resource_links"
                      ]
                    },
                    "native_checkpoint": {
                      "type": "string",
                      "enum": [
                        "external_custody"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "checkfu.capabilities"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "protocolVersion",
            "agentCapabilities",
            "agentInfo",
            "_meta"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "jsonrpc",
        "id",
        "result"
      ],
      "additionalProperties": false
    },
    "JsonValue": {
      "description": "A value in the JSON data model: null, boolean, finite number, string, array, or object."
    },
    "Objects_1": {
      "type": "object",
      "properties": {
        "jsonrpc": {
          "type": "string",
          "enum": [
            "2.0"
          ]
        },
        "method": {
          "type": "string",
          "enum": [
            "session/update"
          ]
        },
        "params": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string"
            },
            "update": {
              "type": "object",
              "properties": {
                "sessionUpdate": {
                  "type": "string",
                  "enum": [
                    "session_info_update"
                  ]
                },
                "updatedAt": {
                  "type": "string"
                },
                "_meta": {
                  "type": "object",
                  "properties": {
                    "checkfu.subagent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "phase": {
                              "type": "string",
                              "enum": [
                                "started"
                              ]
                            },
                            "subagent": {
                              "type": "string",
                              "allOf": [
                                {
                                  "minLength": 1
                                },
                                {
                                  "maxLength": 256
                                }
                              ]
                            },
                            "name": {
                              "type": "string",
                              "allOf": [
                                {
                                  "minLength": 1
                                },
                                {
                                  "maxLength": 256
                                }
                              ]
                            },
                            "description": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "phase",
                            "subagent",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "phase": {
                              "type": "string",
                              "enum": [
                                "activity"
                              ]
                            },
                            "subagent": {
                              "type": "string",
                              "allOf": [
                                {
                                  "minLength": 1
                                },
                                {
                                  "maxLength": 256
                                }
                              ]
                            }
                          },
                          "required": [
                            "phase",
                            "subagent"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "phase": {
                              "type": "string",
                              "enum": [
                                "completed"
                              ]
                            },
                            "subagent": {
                              "type": "string",
                              "allOf": [
                                {
                                  "minLength": 1
                                },
                                {
                                  "maxLength": 256
                                }
                              ]
                            },
                            "disposition": {
                              "type": "string",
                              "enum": [
                                "completed",
                                "failed",
                                "canceled"
                              ]
                            }
                          },
                          "required": [
                            "phase",
                            "subagent",
                            "disposition"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "checkfu.subagent"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "sessionUpdate",
                "updatedAt",
                "_meta"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "sessionId",
            "update"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "jsonrpc",
        "method",
        "params"
      ],
      "additionalProperties": false
    }
  }
}
