Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/publish-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@ jobs:
upload-schema:
permissions:
contents: write # to upload release assets
if: github.repository_owner == 'agentclientprotocol' && startsWith(github.event.release.name, 'v')
if: github.repository_owner == 'agentclientprotocol' && (startsWith(github.event.release.tag_name, 'schema-v1') || startsWith(github.event.release.tag_name, 'schema-v2'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Upload schema files to release
- name: Upload v1 schema files to release
if: startsWith(github.event.release.tag_name, 'schema-v1')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.event.release.name }}" schema/schema.json schema/meta.json schema/schema.unstable.json schema/meta.unstable.json
gh release upload "${{ github.event.release.tag_name }}" schema/v1/*.json

- name: Upload v2 schema files to release
if: startsWith(github.event.release.tag_name, 'schema-v2')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.event.release.tag_name }}" schema/v2/*.json
25 changes: 25 additions & 0 deletions .release-plz.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
[workspace]
git_only = true
git_release_latest = false
git_release_name = "Schema v{{ version }}"
git_release_type = "auto"
git_tag_name = "schema-v{{ version }}"
publish = false
semver_check = false

[[package]]
name = "agent-client-protocol-schema"
git_only = false
git_tag_name = "v{{ version }}"
git_release_name = "v{{ version }}"
publish = true
semver_check = true

[[package]]
name = "agent-client-protocol-json-schema-v1"
changelog_path = "schema/v1/CHANGELOG.md"
git_release_latest = true

[[package]]
name = "agent-client-protocol-json-schema-v2"
changelog_path = "schema/v2/CHANGELOG.md"
git_release_type = "pre"
release = false
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ categories = ["development-tools", "api-bindings"]
include = ["/src/**/*.rs", "/README.md", "/LICENSE", "/Cargo.toml"]
rust-version = "1.88.0"

[workspace]
default-members = [".", "schema/v1", "schema/v2"]
members = ["schema/v1", "schema/v2"]
resolver = "3"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ The published crate and schema package versions describe the Rust crate and JSON

**The current stable ACP protocol version is `1`.**

ACP wire compatibility is determined separately by the protocol version exchanged during `initialize` via `protocolVersion`. The `version` field in `schema/meta*.json` also describes the ACP protocol version that the corresponding schema represents.
ACP wire compatibility is determined separately by the protocol version exchanged during `initialize` via `protocolVersion`. The `version` field in the versioned `schema/*/meta*.json` files also describes the ACP protocol version that the corresponding schema represents.

This means two versions of the JSON Schema artifacts can describe the same wire-compatible ACP protocol version while having different schema structure for SDK generators. For example, a release might change how definitions are organized, named, or emitted in the JSON Schema in a way that affects downstream code generation without changing the JSON messages exchanged by ACP clients and agents.

Consumers should not infer wire compatibility from the crate or schema package version alone. Use the negotiated `protocolVersion` to determine the ACP wire protocol shape and breaking-compatibility level. Within a protocol version, use the exchanged capabilities to decide which optional ACP messages and features are supported. Use artifact versions to manage compatibility with this repository's Rust and schema outputs.

## Integrations

- [Schema](./schema/schema.json)
- [Schema](./schema/v1/schema.json)
- [Agents](https://agentclientprotocol.com/overview/agents)
- [Clients](https://agentclientprotocol.com/overview/clients)
- Official Libraries
Expand Down
7 changes: 4 additions & 3 deletions docs/protocol/v2/draft/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: "Schema definitions for the Agent Client Protocol"
---

<Note>
The v2 schema is generated in this repository at
[`schema/schema.v2.unstable.json`](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/schema/schema.v2.unstable.json).
ACP v2 remains hidden while it is being drafted.
This v2 schema file is generated in this repository at
[`schema/v2/schema.unstable.json`](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/schema/v2/schema.unstable.json).
ACP v2 remains hidden while it is being drafted, and v2 schema GitHub releases
are not published yet.
</Note>

## Agent
Expand Down
6 changes: 4 additions & 2 deletions docs/protocol/v2/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ description: "Schema definitions for the Agent Client Protocol"
---

<Note>
This page is generated from the v2 Rust schema types. The stable v2 JSON
schema and metadata files are not emitted yet while ACP v2 remains hidden.
This v2 schema file is generated in this repository at
[`schema/v2/schema.json`](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/schema/v2/schema.json).
ACP v2 remains hidden while it is being drafted, and v2 schema GitHub releases
are not published yet.
</Note>

## Agent
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"scripts": {
"generate:json-schema": "cargo run --bin generate",
"generate:json-schema:unstable": "cargo run --bin generate --features unstable",
"generate:schema-docs:v2": "cargo run --bin generate --features unstable_protocol_v2",
"generate:json-schema:v2": "cargo run --bin generate --features unstable_protocol_v2",
"generate:json-schema:v2-unstable": "cargo run --bin generate --features unstable,unstable_protocol_v2",
"generate": "npm run generate:json-schema && npm run generate:json-schema:unstable && npm run generate:schema-docs:v2 && npm run generate:json-schema:v2-unstable && npm run format",
"generate": "npm run generate:json-schema && npm run generate:json-schema:unstable && npm run generate:json-schema:v2 && npm run generate:json-schema:v2-unstable && npm run format",
"format": "prettier --write --log-level warn . && cargo fmt",
"format:check": "prettier --check . && cargo fmt -- --check",
"spellcheck": "./scripts/spellcheck.sh",
Expand Down
1 change: 1 addition & 0 deletions schema/v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
9 changes: 9 additions & 0 deletions schema/v1/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "agent-client-protocol-json-schema-v1"
version = "1.13.6"
edition = "2024"
license = "Apache-2.0"
description = "Version marker for ACP v1 JSON Schema GitHub releases"
repository = "https://github.com/agentclientprotocol/agent-client-protocol"
publish = false
include = ["/Cargo.toml", "/CHANGELOG.md", "/src/lib.rs", "/*.json"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions schema/v1/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//! Version marker package for ACP v1 JSON Schema GitHub releases.

#![doc(hidden)]
1 change: 1 addition & 0 deletions schema/v2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
9 changes: 9 additions & 0 deletions schema/v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "agent-client-protocol-json-schema-v2"
version = "2.0.0-alpha.0"
edition = "2024"
license = "Apache-2.0"
description = "Version marker for ACP v2 JSON Schema artifacts"
repository = "https://github.com/agentclientprotocol/agent-client-protocol"
publish = false
include = ["/Cargo.toml", "/CHANGELOG.md", "/src/lib.rs", "/*.json"]
21 changes: 21 additions & 0 deletions schema/v2/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"agentMethods": {
"authenticate": "authenticate",
"initialize": "initialize",
"logout": "logout",
"session_cancel": "session/cancel",
"session_close": "session/close",
"session_delete": "session/delete",
"session_list": "session/list",
"session_load": "session/load",
"session_new": "session/new",
"session_prompt": "session/prompt",
"session_resume": "session/resume",
"session_set_config_option": "session/set_config_option"
},
"clientMethods": {
"session_request_permission": "session/request_permission",
"session_update": "session/update"
},
"version": 2
}
File renamed without changes.
Loading