forked from agentclientprotocol/registry
-
Notifications
You must be signed in to change notification settings - Fork 0
167 lines (145 loc) · 5.27 KB
/
daily-protocol-matrix.yml
File metadata and controls
167 lines (145 loc) · 5.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Nightly Protocol Matrix
on:
schedule:
# Run nightly after the hourly version update workflow.
- cron: "15 5 * * *"
workflow_dispatch:
inputs:
agents:
description: "Comma-separated agent IDs (optional)"
required: false
default: ""
type: string
skip_agents:
description: "Comma-separated agent IDs to skip (optional)"
required: false
default: ""
type: string
table_mode:
description: "Main markdown table mode"
required: false
default: capabilities
type: choice
options:
- capabilities
- full
changed_only:
description: "Probe only changed agent versions"
required: false
default: false
type: boolean
permissions:
contents: write
jobs:
generate:
concurrency:
group: registry-main-write
cancel-in-progress: false
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Generate GitHub token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf
id: generate-token
with:
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Install uv
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- name: Generate matrix
env:
CI: "1"
TERM: dumb
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
PYTHON_KEYRING_DISABLED: "1"
UV_CACHE_DIR: ${{ runner.temp }}/uv-cache
NPM_CONFIG_CACHE: ${{ runner.temp }}/npm-cache
XDG_CACHE_HOME: ${{ runner.temp }}/xdg-cache
XDG_CONFIG_HOME: ${{ runner.temp }}/xdg-config
run: |
AGENTS_INPUT=""
SKIP_INPUT=""
TABLE_MODE="capabilities"
CHANGED_ONLY="false"
if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
AGENTS_INPUT="${{ inputs.agents }}"
SKIP_INPUT="${{ inputs.skip_agents }}"
TABLE_MODE="${{ inputs.table_mode }}"
CHANGED_ONLY="${{ inputs.changed_only }}"
fi
mkdir -p "$UV_CACHE_DIR" "$NPM_CONFIG_CACHE" "$XDG_CACHE_HOME" "$XDG_CONFIG_HOME"
ARGS=(
--sandbox-dir .matrix-sandbox
--output-dir .protocol-matrix
--init-timeout 120
--rpc-timeout 5
--table-mode "$TABLE_MODE"
)
if [ "$CHANGED_ONLY" = "true" ]; then
ARGS+=(--changed-only)
fi
if [ -n "$AGENTS_INPUT" ]; then
ARGS+=(--agent "$AGENTS_INPUT")
fi
if [ -n "$SKIP_INPUT" ]; then
ARGS+=(--skip-agent "$SKIP_INPUT")
fi
python3 .github/workflows/protocol_matrix.py "${ARGS[@]}"
- name: Summarize matrix run
id: summary
run: |
python3 - <<'PY'
import json
import os
from pathlib import Path
data = json.loads(Path('.protocol-matrix/latest.json').read_text())
summary = data.get('summary', {})
with open(os.environ['GITHUB_OUTPUT'], 'a') as output:
print(f"report_date={data.get('date', '')}", file=output)
print(
f"agents_probed_this_run={summary.get('agentsProbedThisRun', 0)}",
file=output,
)
print(f"agents_reused={summary.get('agentsReused', 0)}", file=output)
print(
f"initialize_success={summary.get('initializeSuccess', 0)}",
file=output,
)
print(
f"session_new_auth_required={summary.get('sessionNewAuthRequired', 0)}",
file=output,
)
PY
- name: Commit matrix update
id: commit
run: |
git config user.name "acp-release[bot]"
git config user.email "2373403+acp-release[bot]@users.noreply.github.com"
git add .protocol-matrix/
if git diff --cached --quiet; then
echo "committed=false" >> "$GITHUB_OUTPUT"
exit 0
fi
git commit -m "docs: update protocol matrix for ${{ steps.summary.outputs.report_date }}"
git push origin "HEAD:${GITHUB_REF_NAME}"
echo "committed=true" >> "$GITHUB_OUTPUT"
- name: Write workflow summary
run: |
{
echo "## Protocol matrix"
echo
echo "- Date: `${{ steps.summary.outputs.report_date }}`"
echo "- Agents probed this run: `${{ steps.summary.outputs.agents_probed_this_run }}`"
echo "- Reused unchanged versions: `${{ steps.summary.outputs.agents_reused }}`"
echo "- Initialize success: `${{ steps.summary.outputs.initialize_success }}`"
echo "- `session/new` auth-required: `${{ steps.summary.outputs.session_new_auth_required }}`"
echo "- Committed update: `${{ steps.commit.outputs.committed }}`"
} >> "$GITHUB_STEP_SUMMARY"