You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(email-release): publish frozen binaries to R2 via rclone (#1688)
## Why this matters
Before: the email release workflow targeted the agent-hub Worker `POST
/publish` API, and `@amd-gaia/agent-email` shipped with placeholder
hashes — not actually installable. After: one `agent-pkg-email-v*` tag
freezes all four platforms, uploads them by `rclone` to a **dedicated**
`gaia-hub` R2 bucket (served at its own subdomain `hub.amd-gaia.ai`),
regenerates `binaries.lock.json` with **real** SHA-256s, fetch-verifies
every platform via the real `fetch` CLI, then `npm publish`es via OIDC
trusted publishing. This is the last code piece before email v0.1.0 can
ship for real (#1685).
Distribution model: a plain public GET serves each binary at
`https://hub.amd-gaia.ai/agents/python/email/<version>/...`; the SHA-256
in `binaries.lock.json` is the integrity gate the `fetch` CLI enforces
(no server-side checksum). Atomic + idempotent: rclone copy is
content-addressed by the pre-computed hash, the post-upload fetch-verify
fails the release on any mismatch, and `npm publish` is skipped if the
version already exists.
The hub gets its own bucket + subdomain rather than riding on the
videos' `amd-gaia`/`assets.amd-gaia.ai` store — so its API token is
scoped to `gaia-hub` only and can never touch the docs assets.
`publish_to_r2.py` (the Worker `POST /publish` path) is **kept as a
testing helper** — its summary JSON is a valid `--meta` for the lock
generator.
> Maintainer prerequisites (one-time, before tagging): create the
`gaia-hub` R2 bucket and connect the `hub.amd-gaia.ai` custom domain to
it; create an Object-Read/Write token scoped to `gaia-hub` and set repo
secrets `R2_ACCESS_KEY_ID` / `R2_SECRET_ACCESS_KEY` / `R2_ACCOUNT_ID`;
optional var `HUB_BASE_URL` (defaults to `https://hub.amd-gaia.ai`);
register the npm trusted publisher for `@amd-gaia/agent-email` against
`release_agent_email.yml`. First release ships **unsigned** binaries
(#732 / #733 / #1650).
## Test plan
- [x] `gen_binaries_lock.py` functional round-trip: verbatim
`--base-url`, meta-driven win32 entry, placeholders preserved for absent
platforms, bad/non-http URL fails loudly
- [x] `python -m py_compile` + `black` + `isort` clean on changed Python
- [x] `bash -n upload_to_r2.sh` + `release_agent_email.yml` parses as
valid YAML
- [ ] Dry-run a real `agent-pkg-email-v0.1.0` once the `gaia-hub` bucket
+ repo secrets are set (CI freezes 4 platforms → R2 → lock →
fetch-verify → npm)
---------
Co-authored-by: Ovtcharov <kovtchar@amd.com>
Co-authored-by: Kalin Ovtcharov <kalin@extropolis.ai>
Copy file name to clipboardExpand all lines: hub/agents/npm/agent-email/binaries.lock.json
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
{
2
2
"schemaVersion": "1.0",
3
3
"agentVersion": "0.1.0",
4
-
"_comment": "Per-platform frozen email-agent binary manifest. baseUrl + sha256 values are PLACEHOLDERS pending real R2 publishing (issue #1648). fetch is intentionally blocked while sha256 is a placeholder so a bad binary can never be trusted. Override baseUrl at fetch time and replace these hashes once artifacts are published. NO binaries are committed to the repo or the npm tarball — this manifest + the fetch CLI pull them at build time.",
0 commit comments