A2A adapter service for Compass
Project description
compass-a2a
compass-a2a is the dedicated A2A adapter service for Compass.
It is intentionally positioned as a separate process boundary:
- Compass stays the source of truth for LifeOS data and domain rules.
compass-a2aexposes an A2A-facing runtime surface for hub and peer agents.- The adapter can evolve independently from Compass internals.
Bootstrap Scope
This repository is initialized with:
uvfor dependency and environment managementpre-commitfor basic code quality checks- a minimal A2A server surface
- a public agent card endpoint
- HTTP Basic authentication bridged to Compass account credentials
Quick Start
uv sync --extra dev
cp .env.example .env
uv run pre-commit install
uv run compass-a2a
By default the server listens on http://127.0.0.1:8000.
Public endpoints:
GET /.well-known/agent-card.jsonGET /.well-known/agent.jsonGET /healthz
Protected endpoints:
POST /POST /v1/message:sendPOST /v1/message:streamGET /v1/card
Authentication
Runtime access uses HTTP Basic authentication.
The adapter does not maintain its own account system. Instead, the Basic Auth username and password are treated as Compass login credentials. The current authenticated Compass identity is propagated into the request context so later Compass-facing logic can apply user-aware routing, token reuse, and policy.
The Basic Auth username should match the Compass login identifier currently expected by Compass, which is typically the account email.
The adapter does not inject user personalization fields such as locale or time zone. Those preferences remain owned by Compass itself.
Access tokens are cached in memory on a per-user basis, but they are no longer treated as unbounded session state. The adapter now applies token expiration, refresh skew, and cache size limits so expired or cold entries are recycled.
Optional cache tuning env vars:
COMPASS_A2A_TOKEN_CACHE_TTL_SECONDSCOMPASS_A2A_TOKEN_CACHE_REFRESH_SKEW_SECONDSCOMPASS_A2A_TOKEN_CACHE_MAX_ENTRIES
Capability Model
The current branch keeps a deliberate split between read skills and write commands.
- Read skills are the current public capability surface.
- Write commands are reserved for approval-aware mutations and have a separate execution path, even though no write commands are enabled yet.
The current bootstrap skill catalog internally uses Compass /agentic/* facade
endpoints as the initial data source.
review_time_and_activitysearch_personal_knowledgereview_planningreview_finance_statereview_vision_focus
Recommended invocation style is metadata-driven:
{
"compass": {
"skill": "review_planning",
"arguments": {
"view_type": "day",
"selected_date": "2026-03-25T00:00:00Z",
"include_notes": true
}
}
}
Contract rules for capability requests:
metadata.compassmust be an object when provided- exactly one of
metadata.compass.skillormetadata.compass.commandmay be set metadata.compass.argumentsmust be a JSON object- slash-style read skill arguments must also be a JSON object
- invalid capability contracts fail fast with an explicit adapter error instead of silently falling back to help text
Future write commands will use a separate metadata field:
{
"compass": {
"command": "create_note",
"arguments": {
"title": "Draft"
}
}
}
For quick manual testing, slash-style text commands also work:
/review_time_and_activity {"start_date":"2026-03-25T00:00:00Z","end_date":"2026-03-25T23:59:59Z"}
These Compass endpoints are treated as an internal bootstrap gateway, not as
the long-term external A2A contract. Authentication is also bridged through
Compass itself, so compass-a2a remains a thin protocol and policy layer.
Development
Run checks:
uv run pytest
uv run ruff check .
uv run ruff format --check .
Build and smoke test release artifacts locally:
uv build --no-sources
bash ./scripts/smoke_test_built_cli.sh dist/compass_a2a-*.whl
bash ./scripts/smoke_test_built_cli.sh dist/compass_a2a-*.tar.gz
Release
compass-a2a uses tag-driven releases.
- Merge the release-ready commit into
master - Create and push a version tag in the form
vX.Y.Z - The publish workflow will only proceed when the tag commit is reachable from
origin/master - The workflow builds artifacts, verifies that the package version matches the tag, publishes to PyPI, and creates a GitHub Release
PyPI publishing is configured for GitHub OIDC trusted publishing. The PyPI
project must trust this repository and the publish.yml workflow before the
first release can succeed.
Roadmap
This bootstrap intentionally keeps the runtime thin. The next steps are expected to include:
- Compass API integration
- approval-aware write operations
- richer task execution and streaming behavior
- durable task/session storage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file compass_a2a-0.1.0.tar.gz.
File metadata
- Download URL: compass_a2a-0.1.0.tar.gz
- Upload date:
- Size: 80.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6127cb9a5641d30ea6b7427c74981a603ea3f4040a4eec4c3322c47ade100d50
|
|
| MD5 |
03c6b8a06f5dbc2abf9d371986c3f097
|
|
| BLAKE2b-256 |
18c2b79387a3b92778f7aa6b5a0601b0190b0c5443950694a830a8d57150ac1d
|
Provenance
The following attestation bundles were made for compass_a2a-0.1.0.tar.gz:
Publisher:
publish.yml on liujuanjuan1984/compass-a2a
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compass_a2a-0.1.0.tar.gz -
Subject digest:
6127cb9a5641d30ea6b7427c74981a603ea3f4040a4eec4c3322c47ade100d50 - Sigstore transparency entry: 1180111770
- Sigstore integration time:
-
Permalink:
liujuanjuan1984/compass-a2a@b9934c455e2307321e2b724a6bae39745a5c1ab5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/liujuanjuan1984
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9934c455e2307321e2b724a6bae39745a5c1ab5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file compass_a2a-0.1.0-py3-none-any.whl.
File metadata
- Download URL: compass_a2a-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
982713cbcd45cfbc99589fc674c468fcda521dd3eab704bbf777a99208a459c8
|
|
| MD5 |
de23e268d62bb50a0352a4422abe468b
|
|
| BLAKE2b-256 |
cbf8ed7aabea81b5ae3cc538a6bae0e1ce61acdb5a2148cfd188e1cc6bba29cc
|
Provenance
The following attestation bundles were made for compass_a2a-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on liujuanjuan1984/compass-a2a
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compass_a2a-0.1.0-py3-none-any.whl -
Subject digest:
982713cbcd45cfbc99589fc674c468fcda521dd3eab704bbf777a99208a459c8 - Sigstore transparency entry: 1180111779
- Sigstore integration time:
-
Permalink:
liujuanjuan1984/compass-a2a@b9934c455e2307321e2b724a6bae39745a5c1ab5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/liujuanjuan1984
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9934c455e2307321e2b724a6bae39745a5c1ab5 -
Trigger Event:
push
-
Statement type: