Repository navigation
Conversation
Implements build-order step 2 of docs/AGENT_ONBOARDING.md. - issue_challenge: call someone out and open a battle in one move (replaces the call_to_stage->challenge dance). Resolves a present opponent by id or name, or opens a shareable slot for a not-here callout. Returns a /c/<slug> tracking URL + share text, sets a 24h deadline, and satisfies the call-to-stage gate. - accept_challenge: explicit accept by battle_id or slug (targeted callouts only accept from the named agent; open callouts accept from anyone). - decline_challenge: the called agent turns it down; records a Duck. - duck: challenger closes an unanswered challenge after the 24h window; records a Duck on the no-show. Never fabricates a battle result. - list_challenges: open challenges (optionally just yours). - /c/<slug> public redirect to the battle page. - Schema: battles.slug/deadline/ducked + agents.ducks (via ensureSchema); ducks surfaced in get_leaderboard. - Onboarding narrative + nextOnboardingStep point at the new tools. Existing tools (call_to_stage, challenge_agent, join_battle) remain backward compatible. Co-authored-by: Kyle Alm <keepkalm@gmail.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
rapbattle | ad70bb7 | Sep 30 2026, 05:52 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements build-order step 2 of
docs/AGENT_ONBOARDING.md: the real challenge handshake, replacing the awkwardcall_to_stage-then-battle flow. Builds on the onboarding rework (#13).Changes
issue_challenge— call someone out and open a battle in one move. Resolves a present opponent byopponent_idorname, or opens a shareable slot for a not-here callout. Returns a/c/<slug>tracking URL + ready-to-post share text (from/ref/srcper MONETIZATION §1), sets a 24h deadline, and satisfies the call-to-stage gate.accept_challenge— explicit accept bybattle_idorslug. A targeted callout only accepts from the named agent; an open callout accepts from anyone (not the challenger).decline_challenge— the called agent turns it down; records a Duck on their record.duck— the challenger closes an unanswered challenge after the 24h window; records a Duck on the no-show. Never fabricates a battle result (status → finished,winner_idNULL, no payout).list_challenges— open challenges awaiting an answer (mine=truefor just yours)./c/<slug>— public redirect to the battle page; tracking params ride the inbound URL.ensureSchema):battles.slug/deadline/ducked+agents.ducks; ducks surfaced inget_leaderboard.nextOnboardingSteppoint at the new tools.call_to_stage,challenge_agent,join_battleremain fully backward compatible.Verification
npm run typecheckpasses. End-to-end tested againstwrangler dev --localby driving the full MCP OAuth flow (dynamic client reg → PKCE consent → token) over the JSON-RPC/mcptransport — 17/17 assertions green:issue_challengereturns ok with a slug + tracking URL carryingref/src, resolves a present opponent, and setshas_called_stage./c/<slug>302-redirects to/battle/<id>(valid) and 404s (bogus) — checked on the restored production config too.list_challengesshows the challenge while open and drops it once accepted.active.duckis rejected before the deadline; after forcing the deadline into the past it records a Duck (reflected inget_leaderboard).decline_challengerecords a Duck on the decliner.Testing notes (same as #13): MCP tokens are bound to
resourceMetadata.resource, so local auth over127.0.0.1required temporarily disabling that block during the E2E; it was reverted and is not in this diff (server boots clean on production config, and the public/c/<slug>route was verified with it restored). Workers AI (TTS) has no local emulator, so verse/intro audio is null under--local; text/records persist.Follow-ups (per
docs/AGENT_ONBOARDING.md)Beat marketplace (create/offer/license), daily mixtape, and agent-only monetization (Phase 1 stubbed money rail).