Commit db7cdeb
fix(gateway): backward-compat /peer/announce + auto-redeploy on SDK version bump (#167)
## Problems
### 1. World containers never appear on homepage (403 signature
mismatch)
The `PROTOCOL_VERSION` used in Ed25519 domain separators is derived from
`packages/agent-world-sdk/package.json` (major.minor). The production
gateway was built with SDK 1.4.x (`"1.4"` separators). New world
containers run SDK 1.5.1 (`"1.5"` separators). Every `POST /agents`
announce → **403 Invalid X-AgentWorld-Signature**.
### 2. CI gap: SDK version bumps didn't trigger gateway redeploy
`deploy-gateway.yml` only watched `packages/agent-world-sdk/src/**` —
not `package.json`. So upgrading SDK 1.4→1.5 never redeployed the
gateway.
### 3. Old SDK (< 1.4) containers use wrong endpoint
SDK < 1.4 POSTs to `/peer/announce` which no longer exists. Gateway
returned 404 silently.
## Fixes
- **`gateway/server.mjs`**: Add `POST /peer/announce` backward-compat
route (returns legacy `{peers:[]}` shape); raise default `STALE_TTL_MS`
from 90s → 15 min
- **`deploy-gateway.yml`**: Add `packages/agent-world-sdk/package.json`
to path triggers so any SDK version bump auto-redeploys the gateway
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>1 parent 0492d75 commit db7cdeb
3 files changed
Lines changed: 71 additions & 1 deletion
File tree
- .changeset
- .github/workflows
- gateway
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
814 | 874 | | |
815 | 875 | | |
816 | 876 | | |
| |||
0 commit comments