Skip to content

Commit 6d73c71

Browse files
feat: rename package and repo to opencode-a2a (#282)
1 parent 0d397b3 commit 6d73c71

File tree

72 files changed

+204
-205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+204
-205
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ jobs:
4949
run: uv build --no-sources
5050

5151
- name: Smoke test built wheel
52-
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a_server-*.whl
52+
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.whl
5353

5454
- name: Smoke test built sdist
55-
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a_server-*.tar.gz
55+
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.tar.gz
5656

5757
runtime-matrix:
5858
runs-on: ubuntu-latest

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ jobs:
4949
import pathlib
5050
5151
dist_dir = pathlib.Path("dist")
52-
wheels = sorted(dist_dir.glob("opencode_a2a_server-*.whl"))
53-
sdists = sorted(dist_dir.glob("opencode_a2a_server-*.tar.gz"))
52+
wheels = sorted(dist_dir.glob("opencode_a2a-*.whl"))
53+
sdists = sorted(dist_dir.glob("opencode_a2a-*.tar.gz"))
5454
if len(wheels) != 1:
5555
raise SystemExit(f"Expected exactly one wheel in dist/, found {len(wheels)}")
5656
if len(sdists) != 1:
5757
raise SystemExit(f"Expected exactly one sdist in dist/, found {len(sdists)}")
5858
wheel = wheels[0].name
5959
sdist = sdists[0].name
60-
version = wheel.removeprefix("opencode_a2a_server-").split("-py3", 1)[0]
61-
sdist_version = sdist.removeprefix("opencode_a2a_server-").removesuffix(".tar.gz")
60+
version = wheel.removeprefix("opencode_a2a-").split("-py3", 1)[0]
61+
sdist_version = sdist.removeprefix("opencode_a2a-").removesuffix(".tar.gz")
6262
tag = os.environ["GITHUB_REF_NAME"].removeprefix("v")
6363
if version != tag:
6464
raise SystemExit(f"Wheel version {version!r} does not match tag {tag!r}")
@@ -68,10 +68,10 @@ jobs:
6868
PY
6969
7070
- name: Smoke test wheel install
71-
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a_server-*.whl
71+
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.whl
7272

7373
- name: Smoke test sdist install
74-
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a_server-*.tar.gz
74+
run: bash ./scripts/smoke_test_built_cli.sh dist/opencode_a2a-*.tar.gz
7575

7676
- name: Publish to PyPI
7777
uses: pypa/gh-action-pypi-publish@release/v1

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
hooks:
2828
- id: mypy
2929
name: mypy
30-
entry: uv run mypy src/opencode_a2a_server
30+
entry: uv run mypy src/opencode_a2a
3131
language: system
3232
pass_filenames: false
3333
- id: bash-n

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contributing
22

3-
Thanks for contributing to `opencode-a2a-server`.
3+
Thanks for contributing to `opencode-a2a`.
44

5-
This repository maintains an A2A adapter service around OpenCode. Changes
5+
This repository maintains an OpenCode A2A runtime. Changes
66
should keep runtime behavior, Agent Card declarations, OpenAPI examples, and
77
machine-readable extension contracts aligned.
88

@@ -32,13 +32,13 @@ Start OpenCode in one terminal:
3232
opencode serve --hostname 127.0.0.1 --port 4096
3333
```
3434

35-
Then start the A2A server in another terminal:
35+
Then start the A2A runtime in another terminal:
3636

3737
```bash
3838
A2A_BEARER_TOKEN=dev-token \
3939
OPENCODE_BASE_URL=http://127.0.0.1:4096 \
4040
OPENCODE_WORKSPACE_ROOT=/abs/path/to/workspace \
41-
uv run opencode-a2a-server serve
41+
uv run opencode-a2a serve
4242
```
4343

4444
## Validation
@@ -63,7 +63,7 @@ contract surfaces, also run:
6363

6464
```bash
6565
uv run pytest tests/contracts/test_extension_contract_consistency.py
66-
uv run mypy src/opencode_a2a_server
66+
uv run mypy src/opencode_a2a
6767
```
6868

6969
## Change Expectations
@@ -95,7 +95,7 @@ Keep compatibility guidance centralized in [docs/guide.md](docs/guide.md) unless
9595
new standalone document is clearly necessary.
9696

9797
When changing extension contracts, update
98-
[`src/opencode_a2a_server/contracts/extensions.py`](src/opencode_a2a_server/contracts/extensions.py)
98+
[`src/opencode_a2a/contracts/extensions.py`](src/opencode_a2a/contracts/extensions.py)
9999
first and keep these generated/documented surfaces aligned:
100100

101101
- Agent Card extension params

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# opencode-a2a-server
1+
# opencode-a2a
22

33
> Expose OpenCode through A2A.
44
5-
`opencode-a2a-server` adds an A2A service layer to `opencode serve`, with
5+
`opencode-a2a` adds an A2A runtime layer to `opencode serve`, with
66
auth, streaming, session continuity, interrupt handling, and a clear
77
deployment boundary.
88

@@ -17,7 +17,7 @@ flowchart TD
1717
Client["a2a-client-hub / any A2A client"]
1818
1919
subgraph ServerSide["Server-side"]
20-
Adapter["opencode-a2a-server\nA2A adapter service"]
20+
Adapter["opencode-a2a\nA2A adapter service"]
2121
Runtime["opencode serve\nOpenCode runtime"]
2222
2323
Adapter <--> Runtime
@@ -31,13 +31,13 @@ flowchart TD
3131
Install the released CLI with `uv tool`:
3232

3333
```bash
34-
uv tool install opencode-a2a-server
34+
uv tool install opencode-a2a
3535
```
3636

3737
Upgrade later with:
3838

3939
```bash
40-
uv tool upgrade opencode-a2a-server
40+
uv tool upgrade opencode-a2a
4141
```
4242

4343
Make sure provider credentials and a default model are configured on the
@@ -49,7 +49,7 @@ opencode models
4949
opencode serve --hostname 127.0.0.1 --port 4096
5050
```
5151

52-
Then start `opencode-a2a-server` against that upstream:
52+
Then start `opencode-a2a` against that upstream:
5353

5454
```bash
5555
A2A_BEARER_TOKEN=dev-token \
@@ -59,7 +59,7 @@ A2A_PORT=8000 \
5959
A2A_PUBLIC_URL=http://127.0.0.1:8000 \
6060
A2A_STREAM_SSE_PING_SECONDS=15 \
6161
OPENCODE_WORKSPACE_ROOT=/abs/path/to/workspace \
62-
opencode-a2a-server serve
62+
opencode-a2a serve
6363
```
6464

6565
Verify that the service is up:

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Scope
44

5-
This repository wraps OpenCode as an A2A adapter service. It exposes A2A
5+
This repository wraps OpenCode as an A2A runtime. It exposes A2A
66
HTTP+JSON and JSON-RPC interfaces, and adds authentication, task/session
77
contracts, streaming, interrupt handling, and runtime guidance. It does not
88
fully isolate upstream model credentials from OpenCode runtime behavior.
@@ -11,7 +11,7 @@ fully isolate upstream model credentials from OpenCode runtime behavior.
1111

1212
- `A2A_BEARER_TOKEN` protects access to the A2A surface, but it is not a
1313
tenant-isolation boundary inside one deployed instance.
14-
- One `OpenCode + opencode-a2a-server` instance pair is treated as a
14+
- One `OpenCode + opencode-a2a` instance pair is treated as a
1515
single-tenant trust boundary by design.
1616
- Tenant isolation across consumers is expected to come from parameterized
1717
self-deployment.

docs/guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ JSON-RPC extension details; README stays at overview level.
1919

2020
This section keeps only the protocol-relevant variables.
2121
For the full runtime variable catalog and defaults, see
22-
[`../src/opencode_a2a_server/config.py`](../src/opencode_a2a_server/config.py).
22+
[`../src/opencode_a2a/config.py`](../src/opencode_a2a/config.py).
2323
Deployment supervision is intentionally out of scope for this project; use your
2424
own process manager, container runtime, or host orchestration.
2525

@@ -99,7 +99,7 @@ starting that upstream process:
9999
If your provider uses environment variables for auth, export them before
100100
starting `opencode serve`.
101101

102-
Then start `opencode-a2a-server` against that explicit upstream URL:
102+
Then start `opencode-a2a` against that explicit upstream URL:
103103

104104
```bash
105105
OPENCODE_BASE_URL=http://127.0.0.1:4096 \
@@ -108,7 +108,7 @@ A2A_HOST=127.0.0.1 \
108108
A2A_PORT=8000 \
109109
A2A_PUBLIC_URL=http://127.0.0.1:8000 \
110110
OPENCODE_WORKSPACE_ROOT=/abs/path/to/workspace \
111-
opencode-a2a-server serve
111+
opencode-a2a serve
112112
```
113113

114114
## Core Behavior
@@ -443,7 +443,7 @@ Consumer guidance:
443443
- Treat `metadata.shared.model` as request-scoped preference data rather than
444444
deployment configuration.
445445
- Provider auth and service-level model defaults belong to `opencode serve`,
446-
not to `opencode-a2a-server`.
446+
not to `opencode-a2a`.
447447

448448
Minimal example:
449449

@@ -856,7 +856,7 @@ If an SSE connection drops, use `GET /v1/tasks/{task_id}:subscribe` to re-subscr
856856
- Idempotency contract: repeated `tasks/cancel` on an already `canceled` task returns the current terminal task state without error.
857857
- Terminal subscribe contract: calling `subscribe` on a terminal task replays one terminal `Task` snapshot and then closes the stream.
858858
- These two semantics are also declared as machine-readable `service_behaviors` in the compatibility profile and wire contract extensions.
859-
- The service emits lightweight metric log records (`logger=opencode_a2a_server.execution.executor`):
859+
- The service emits lightweight metric log records (`logger=opencode_a2a.execution.executor`):
860860
- `a2a_stream_requests_total`
861861
- `a2a_stream_active` (`value=1` when a stream starts, `value=-1` when it closes)
862862
- `opencode_stream_retries_total`

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ requires = ["setuptools>=77", "setuptools-scm[toml]>=8"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "opencode-a2a-server"
6+
name = "opencode-a2a"
77
dynamic = ["version"]
8-
description = "A2A wrapper service for opencode"
8+
description = "OpenCode A2A runtime"
99
readme = "README.md"
1010
requires-python = ">=3.11"
1111
license = "Apache-2.0"
@@ -45,12 +45,12 @@ dev = [
4545
]
4646

4747
[project.scripts]
48-
opencode-a2a-server = "opencode_a2a_server.cli:main"
48+
opencode-a2a = "opencode_a2a.cli:main"
4949

5050
[project.urls]
51-
Homepage = "https://github.com/Intelligent-Internet/opencode-a2a-server"
52-
Repository = "https://github.com/Intelligent-Internet/opencode-a2a-server"
53-
Issues = "https://github.com/Intelligent-Internet/opencode-a2a-server/issues"
51+
Homepage = "https://github.com/Intelligent-Internet/opencode-a2a"
52+
Repository = "https://github.com/Intelligent-Internet/opencode-a2a"
53+
Issues = "https://github.com/Intelligent-Internet/opencode-a2a/issues"
5454

5555
[tool.ruff]
5656
line-length = 100
@@ -71,7 +71,7 @@ tag_regex = "^v?(?P<version>.+)$"
7171

7272
[tool.mypy]
7373
python_version = "3.11"
74-
files = ["src/opencode_a2a_server"]
74+
files = ["src/opencode_a2a"]
7575
show_error_codes = true
7676
pretty = true
7777
warn_redundant_casts = true
@@ -80,4 +80,4 @@ check_untyped_defs = true
8080
warn_return_any = true
8181

8282
[tool.pytest.ini_options]
83-
addopts = "--cov=src/opencode_a2a_server --cov-report=term-missing --cov-report=json:.coverage.json --cov-fail-under=90"
83+
addopts = "--cov=src/opencode_a2a --cov-report=term-missing --cov-report=json:.coverage.json --cov-fail-under=90"

scripts/check_coverage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
OVERALL_MINIMUM = 90.0
99
PER_FILE_MINIMUMS = {
10-
"src/opencode_a2a_server/execution/executor.py": 90.0,
11-
"src/opencode_a2a_server/server/application.py": 90.0,
12-
"src/opencode_a2a_server/jsonrpc/application.py": 85.0,
13-
"src/opencode_a2a_server/opencode_upstream_client.py": 85.0,
10+
"src/opencode_a2a/execution/executor.py": 90.0,
11+
"src/opencode_a2a/server/application.py": 90.0,
12+
"src/opencode_a2a/jsonrpc/application.py": 85.0,
13+
"src/opencode_a2a/opencode_upstream_client.py": 85.0,
1414
}
1515

1616

scripts/smoke_test_built_cli.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ artifact_path="${1:-${SMOKE_TEST_ARTIFACT_PATH:-${SMOKE_TEST_WHEEL_PATH:-}}}"
3333

3434
if [[ -z "${artifact_path}" ]]; then
3535
shopt -s nullglob
36-
wheel_paths=(dist/opencode_a2a_server-*.whl)
36+
wheel_paths=(dist/opencode_a2a-*.whl)
3737
shopt -u nullglob
3838

3939
if [[ "${#wheel_paths[@]}" -eq 0 ]]; then
@@ -92,7 +92,7 @@ bearer_token="smoke-test-token"
9292
A2A_BEARER_TOKEN="${bearer_token}" \
9393
A2A_PORT="${port}" \
9494
A2A_HOST="127.0.0.1" \
95-
"${tool_bin_dir}/opencode-a2a-server" >"${server_log}" 2>&1 &
95+
"${tool_bin_dir}/opencode-a2a" >"${server_log}" 2>&1 &
9696
server_pid="$!"
9797

9898
health_url="http://127.0.0.1:${port}/health"

0 commit comments

Comments
 (0)