Skip to content

fix: update Yggdrasil apt repo to S3 (old GitHub Pages key is 404)#28

Closed
Jing-yilin wants to merge 7 commits into
mainfrom
develop
Closed

fix: update Yggdrasil apt repo to S3 (old GitHub Pages key is 404)#28
Jing-yilin wants to merge 7 commits into
mainfrom
develop

Conversation

@Jing-yilin
Copy link
Copy Markdown
Contributor

Cherry-pick fix from develop: the old Yggdrasil GitHub Pages apt key URL returns 404, breaking the bootstrap-health CI workflow. Updated to official S3 repo with new GPG key.

Includes:

Backmerge main → develop to sync 3 commits from PR #9 (repo protection +
release PR flow).
## Summary

Adds a complete end-to-end simulation of the DeClaw P2P network with two
Docker containers acting as autonomous AI agents, plus a Remotion-based
animation visualising the communication flow.

## Docker simulation (`docker/`)

| File | Description |
|------|-------------|
| `Dockerfile.sim` | Debian + Yggdrasil binary (GitHub release, bypasses
systemd) + Node 22 |
| `sim-runner.mjs` | Full lifecycle: Yggdrasil daemon → Ed25519 identity
→ peer server → bootstrap discovery → 3-round gpt-4o conversation |
| `docker-compose.sim.yml` | Two containers (alice + bob) with
`NET_ADMIN` + `/dev/net/tun` for real TUN interface |
| `run-sim.sh` | One-command runner; sources `docker/.env` for
`OPENAI_API_KEY` |
| `demo-replay.sh` + `demo.tape` | VHS terminal recording for
`assets/demo.gif` |

Both containers obtain real `200::/7` Yggdrasil addresses, discover ~47
peers via the public mesh, then exchange 3 rounds of Ed25519-signed
messages using gpt-4o as the agent brain.

## Remotion animation (`animation/`)

7-scene animation (24 s, 1920×1080):
1. Title card with project URL
2. alice + bob nodes spring in with Yggdrasil addresses
3. 26 anonymous mesh peer nodes populate (any Yggdrasil node can
bootstrap)
4. Mesh edges animate; alice/bob connect to nearest peers
5. "N peers discovered" counter
6. 3-round message exchange — glowing packets + conversation bubbles +
Ed25519 verification pulse
7. PASS banner + project branding card

Regenerate: `cd animation && npm run render`

## Assets

- `assets/demo-animation.mp4` — rendered Remotion video (2.3 MB, 24 s)
- `assets/demo.gif` — VHS terminal GIF (565 KB)
Extends `bootstrap/server.mjs` to add a `/peer/message` endpoint powered
by Kimi moonshot-v1-8k AI. Solves the cold-start problem — new users
always have
     an AI agent to talk to.

     **Changes:**
- `POST /peer/message` — full trust pipeline (Yggdrasil source, fromYgg
match, Ed25519 sig, TOFU)
     - Kimi API key loaded from AWS SSM Parameter Store at startup
- Per-sender rate limiting (default: 10 msg/hour, configurable via env
vars)
     - Leave tombstone support
- Stateless single-turn AI replies, signed with node's Ed25519 keypair

**New env vars:** `KIMI_SSM_PARAM`, `KIMI_API_KEY`, `RATE_LIMIT_MAX`,
`RATE_LIMIT_WINDOW_MS`
The Kimi bot was returning 401 on all 5 bootstrap nodes because
`callKimi()` was hitting `api.moonshot.cn` (China platform) while the
API key was issued by `api.moonshot.ai` (international platform).

**Root cause:** Wrong base URL in `bootstrap/server.mjs`
```
- https://api.moonshot.cn/v1/chat/completions
+ https://api.moonshot.ai/v1/chat/completions
```

**Verified:** End-to-end test confirmed Kimi reply received at local
peer node after fix.
Documents the always-on AI agent running on all 5 bootstrap nodes.

- **README**: new *Always-On Bootstrap Agents* section — references
`bootstrap.json` dynamically, no hardcoded addresses
- **SKILL.md**: agent discovery tip using `p2p_discover()` + alias
prefix; no model name exposed
- **references/discovery.md**: bootstrap node list now links to live
`bootstrap.json`; bot protocol documented
- **CHANGELOG.md**: Unreleased section covering bot, rate limiting, and
startup race fix
Backmerge main into develop after v0.2.3 release (PR #25).
The old Yggdrasil apt key URL returns 404, breaking bootstrap-health CI.
Updated to official S3 repo with new GPG key per upstream docs.

Changes:
- `.github/workflows/bootstrap-health.yml`: use S3 apt repo + signed-by
keyring
- `skills/declaw/references/install.md`: same fix for Debian install
docs
@Jing-yilin Jing-yilin closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant