Skip to content

Commit e7f8bbb

Browse files
bokelleyclaude
andcommitted
feat: add automated versioning and PyPI publishing
## Release Automation - Integrated Release Please for PR-based versioning - Automated PyPI publishing on release - Conventional Commits for version bumps - CHANGELOG generation ## Conductor Integration - Added .conductor.json for automatic environment setup - Simplified documentation with auto-setup - No manual setup needed in new worktrees ## Security & Cleanup - Removed private agent credentials from examples - Deleted temporary documentation files - Created generic .env.example without secrets - Removed integration tests with private tokens ## Documentation - RELEASING.md: Complete versioning and release guide - CONDUCTOR.md: Simplified setup instructions - Updated .env.example with generic examples only ## Release Please Configuration - Version bumping per PR (not per commit) - Automatic CHANGELOG generation - PyPI publishing on release - Conventional commit format required Next: Set PYPI_API_TOKEN secret in GitHub for publishing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 25d9b8a commit e7f8bbb

13 files changed

+468
-1063
lines changed

.conductor.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "adcp-client-python",
3+
"description": "Python client for Ad Context Protocol (AdCP)",
4+
"setup": {
5+
"commands": [
6+
{
7+
"name": "setup-env",
8+
"description": "Copy .env configuration from repository root",
9+
"command": "python3 scripts/setup_conductor_env.py",
10+
"runOnCreate": true
11+
}
12+
]
13+
},
14+
"python": {
15+
"version": "3.10+",
16+
"install": "pip install -e .[dev]"
17+
}
18+
}

.env.example

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,10 @@
55
CREATIVE_AGENT_URI=https://creative.adcontextprotocol.org
66
CREATIVE_AGENT_PROTOCOL=mcp
77

8-
# Optable Signals Agent (MCP)
9-
OPTABLE_AGENT_URI=https://sandbox.optable.co/admin/adcp/signals/mcp
10-
OPTABLE_AGENT_PROTOCOL=mcp
11-
OPTABLE_AGENT_TOKEN=5ZWQoDY8sReq7CTNQdgPokHdEse8JB2LDjOfo530_9A=
12-
13-
# Wonderstruck Sales Agent (MCP)
14-
WONDERSTRUCK_AGENT_ID=principal_8ac9e391
15-
WONDERSTRUCK_AGENT_NAME=Wonderstruck (MCP)
16-
WONDERSTRUCK_AGENT_URI=https://wonderstruck.sales-agent.scope3.com/mcp/
17-
WONDERSTRUCK_AGENT_PROTOCOL=mcp
18-
WONDERSTRUCK_AGENT_TOKEN=UhwoigyVKdd6GT8hS04cc51ckGfi8qXpZL6OvS2i2cU
19-
20-
# Test Agent (A2A) - Currently returning 404 errors
21-
TEST_AGENT_ID=principal_3bd0d4a8
22-
TEST_AGENT_NAME=Test Agent
23-
TEST_AGENT_URI=https://test-agent.adcontextprotocol.org
24-
TEST_AGENT_PROTOCOL=a2a
25-
TEST_AGENT_TOKEN=L4UCklW_V_40eTdWuQYF6HD5GWeKkgV8U6xxK-jwNO8
8+
# Example Agent (MCP) - Replace with your agent details
9+
EXAMPLE_AGENT_URI=https://your-agent.example.com/mcp
10+
EXAMPLE_AGENT_PROTOCOL=mcp
11+
EXAMPLE_AGENT_TOKEN=your-token-here
2612

2713
# Multi-Agent Configuration (JSON format)
2814
# This is the format expected by ADCPMultiAgentClient.from_env()
@@ -34,25 +20,11 @@ ADCP_AGENTS='[
3420
"protocol": "mcp"
3521
},
3622
{
37-
"id": "optable_signals",
38-
"name": "Optable Signals",
39-
"agent_uri": "https://sandbox.optable.co/admin/adcp/signals/mcp",
23+
"id": "your_agent",
24+
"name": "Your Agent",
25+
"agent_uri": "https://your-agent.example.com",
4026
"protocol": "mcp",
41-
"auth_token": "5ZWQoDY8sReq7CTNQdgPokHdEse8JB2LDjOfo530_9A="
42-
},
43-
{
44-
"id": "principal_8ac9e391",
45-
"name": "Wonderstruck (MCP)",
46-
"agent_uri": "https://wonderstruck.sales-agent.scope3.com/mcp/",
47-
"protocol": "mcp",
48-
"auth_token": "UhwoigyVKdd6GT8hS04cc51ckGfi8qXpZL6OvS2i2cU"
49-
},
50-
{
51-
"id": "principal_3bd0d4a8",
52-
"name": "Test Agent",
53-
"agent_uri": "https://test-agent.adcontextprotocol.org",
54-
"protocol": "a2a",
55-
"auth_token": "L4UCklW_V_40eTdWuQYF6HD5GWeKkgV8U6xxK-jwNO8"
27+
"auth_token": "your-token-here"
5628
}
5729
]'
5830

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
id: release
18+
with:
19+
release-type: python
20+
package-name: adcp
21+
22+
# Publish to PyPI when a release is created
23+
- name: Checkout
24+
if: ${{ steps.release.outputs.release_created }}
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Python
28+
if: ${{ steps.release.outputs.release_created }}
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.10'
32+
33+
- name: Install build dependencies
34+
if: ${{ steps.release.outputs.release_created }}
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install build twine
38+
39+
- name: Build package
40+
if: ${{ steps.release.outputs.release_created }}
41+
run: python -m build
42+
43+
- name: Publish to PyPI
44+
if: ${{ steps.release.outputs.release_created }}
45+
env:
46+
TWINE_USERNAME: __token__
47+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
48+
run: twine upload dist/*

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0"
3+
}

CONDUCTOR.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Conductor Setup
2+
3+
## Automatic Setup
4+
5+
When you create a new Conductor worktree, the environment is automatically configured via `.conductor.json`.
6+
7+
The setup script copies `.env` from the repository root to your worktree, giving you instant access to configured agents.
8+
9+
## First-Time Setup
10+
11+
### 1. Configure Repository Root
12+
13+
In the **repository root** (not in a worktree):
14+
15+
```bash
16+
cd /path/to/adcp-client-python
17+
cp .env.example .env
18+
# Edit .env with your agent configurations
19+
```
20+
21+
### 2. Start Working
22+
23+
That's it! When you create or enter a Conductor worktree, the setup happens automatically.
24+
25+
## Environment Variables
26+
27+
### ADCP_AGENTS (Recommended)
28+
29+
Use this JSON format for multi-agent configuration:
30+
31+
```bash
32+
ADCP_AGENTS='[
33+
{
34+
"id": "creative_agent",
35+
"name": "Creative Agent",
36+
"agent_uri": "https://creative.adcontextprotocol.org",
37+
"protocol": "mcp"
38+
},
39+
{
40+
"id": "my_agent",
41+
"name": "My Agent",
42+
"agent_uri": "https://my-agent.example.com",
43+
"protocol": "mcp",
44+
"auth_token": "your-token-here"
45+
}
46+
]'
47+
```
48+
49+
Then in code:
50+
51+
```python
52+
from adcp import ADCPMultiAgentClient
53+
54+
client = ADCPMultiAgentClient.from_env()
55+
agent = client.agent("my_agent")
56+
```
57+
58+
### Individual Variables
59+
60+
For single-agent usage:
61+
62+
```bash
63+
AGENT_URI=https://agent.example.com
64+
AGENT_PROTOCOL=mcp
65+
AGENT_TOKEN=your-token
66+
```
67+
68+
## Manual Setup
69+
70+
If automatic setup doesn't work, run manually:
71+
72+
```bash
73+
python3 scripts/setup_conductor_env.py
74+
```
75+
76+
## Security
77+
78+
-`.env` is gitignored
79+
- ✅ Store tokens in `.env` at repository root
80+
- ✅ Use `.env.example` for documentation
81+
- ❌ Never commit actual tokens to git
82+
83+
## Testing
84+
85+
```bash
86+
# Creative agent (public, no auth)
87+
python3 tests/integration/test_creative_agent.py
88+
89+
# Your own agents (configured in .env)
90+
python3 tests/integration/test_your_agent.py
91+
```
92+
93+
## Troubleshooting
94+
95+
**"No .env file found"**:
96+
```bash
97+
cd /path/to/adcp-client-python # Repository root
98+
cp .env.example .env
99+
# Edit .env
100+
```
101+
102+
**Setup didn't run automatically**:
103+
```bash
104+
# Run manually in your worktree
105+
python3 scripts/setup_conductor_env.py
106+
```
107+
108+
See full documentation in README.md for complete usage examples.

0 commit comments

Comments
 (0)