Use Realmroot only for human and machine authentication, authorize AMA through the browser user's multi-resource grant, and restore AK-managed Ed25519 Agent sessions.
Preserve Better Auth source tables while removing the mistaken Realmroot Agent binding and machine M2M paths.
BREAKING CHANGE: AK no longer accepts Realmroot Agent tokens or AMA machine credentials; active browser users must sign in again to authorize the AMA resource.
Replace Better Auth user, machine, and agent authentication with Realmroot native flows, migrate tenant ownership, and route AMA access through the cutover adapter. Preserve this deployed migration state as the baseline for the narrower user-auth-only redesign.
Cloud sandbox pushes/PRs now authenticate with a repository-scoped ~1h
installation access token from the AK GitHub App, minted per dispatch,
delivered via a per-session AMA vault credential and revoked at binding
teardown (tracked in the ama.ghCredentialId annotation). PRs are authored
by the App bot. GITHUB_AGENT_TOKEN stays as the fallback when the App is
unconfigured or not installed on the repository.
Also decouple the runner federation issuer from AK_API_URL
(AK_FEDERATED_ISSUER): the issuer is the AK instance's stable identity in
the OIDC provider's trusted-issuer registry, while AK_API_URL may be an
ephemeral dev tunnel.
Unify daemon HTTP poll + Worker-level SSE + single-instance TunnelRelay
WebSocket into a per-board Durable Object event bus. Specifies the
event protocol, per-phase done criteria for a 6-phase rollout with
rollback paths, and records the "why not SSE / why not Queue" analysis
for future reference.
Project is a resource container, not 1:1 with a repo. Task only links to
Project, never to specific Resources — resource selection is the Agent's
decision. Added industry examples (game dev, self-media, finance, real estate)
and resource types (git_repo, credentials, database, storage, document, data_feed).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>