diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index a7467e84..7aad3ad2 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -40,6 +40,7 @@ remembers doctrine; the branch remembers the blade. - The investment dossier readiness target is now explicit: `E:\Projects\gamecult-site\docs\gamecult_integrated_dossier.tex` expects Epiphany to be part of a Bifrost-first labor loop, not only a local Mom demo. The external proof bar is: Bifrost owns topics/work items/dispatch packets/receipts/credit/reward pressure; Epiphany executes bounded work; maintainers review artifacts; public/operator evidence records scope, consent, roles, model spend, review load, artifacts, accepted/rejected outcome, memory lessons, and case-study permission; and private worker/operator/agent context stays sealed. Diligence also asks for a live fresh-repo Epiphany demo, Bifrost work item/topic/agent transport/receipt/ledger demo, CultMesh status, VoidBot/Discord swarm demo, compute/output metrics, and security model for secrets/write permissions/public-private exports. - Bifrost's identity-provider, GitHub bridge/work-sync, Patreon support-intake, and bridge-ledger slice is now upstream truth on `GameCult/Bifrost` `main` at commit `72ffa0d` after the bridge chain through `f1f9171`: `POST /auth/bifrost/register` creates a Bifrost-owned identity without OAuth, signs in with the Bifrost cookie, leaves membership at `Authenticated`, and records `BifrostIdentity` / `NormalizedBifrostIdentity` on `UserAccount`. That native Bifrost identity is the default authenticating identity for GameCult services that accept Bifrost trust. GitHub is hooked in two ways: bridge mutations use `tools/bifrost-bridge.mjs github-draft-pr` / `github-pr-comment` with hosted Bifrost gate/receipts, and the hosted GitHub webhook path syncs issues, PRs, and reviews into Bifrost work/review state. GitHub and Heimdall sign-in paths now ensure new accounts also get a Bifrost identity; Heimdall still owns outside-provider OAuth, account association, token custody, grants, capability/account claims, and provider support normalization. Hosted Persona/agent Discord, Reddit, and temporary `Other` future-public-surface bridge actions now require the supplied Bifrost identity to normalize through Bifrost's native identity law, resolve to a registered `UserAccount.NormalizedBifrostIdentity`, have a linked `HeimdallAccountId` on that same account, and carry a Heimdall-shaped reference before Bifrost authorizes the outside-account crossing; named surfaces still require surface-shaped references. `tools/bifrost-bridge.mjs other-request` is now the generic receipt-only CLI mouth for future public worlds: it records `Other`/`Other` bridge actions through the hosted ledger, carries identity/Heimdall/Epiphany provenance, executes no provider transport, and fails closed without Bifrost bridge base URL/token unless an operator uses the explicit dry-run recovery hatch outside a dispatched turn. Patreon support is hooked through Heimdall-signed patronage intake, not Bifrost-owned Patreon OAuth: `/heimdall/patron-support/events` verifies Heimdall HMAC, resolves linked `HeimdallAccountId`, records `ExternalPatronProvider.Patreon` support, writes patron point transactions, and derives current patron tier snapshots. Verified after adding the Patreon endpoint proof with `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~PlatformEndpointsTests"`: 37 passed; previous bridge CLI/platform proof with `BridgeCliTests|PlatformEndpointsTests` passed 66. Follow-up Bifrost commit `718ae94` syncs the provider advertisement and Eve interface binding to the current bridge truth: `print` advertises bridge action ledger, GitHub webhooks, and patron support intake; `print-surface`/`print-binding` expose GitHub, Discord, Reddit, future-surface, and Heimdall patron-support capabilities; README quick-start now names `other-request`. Verified with provider advertisement print/surface/export plus `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~ProviderAdvertisementTests|FullyQualifiedName~BridgeCliTests"`: 32 passed. Post-push `git status --short --branch` in `E:\Projects\Bifrost` reported `main...origin/main` clean. - Bifrost commit `30e5945` strengthens the future-surface bridge law: hosted bridge actions now persist `TargetSurfaceName`, `other-request` sends it from `--surface-name`, and Bifrost rejects `Other` Persona/agent actions unless the request names the future surface and the Heimdall capability reference matches it, such as `heimdall:bluesky:*`. This makes Epiphany's generic Persona mouth a client-side purity seal over server-side law instead of a trust assumption. Verified with focused `PlatformEndpointsTests|BridgeCliTests|ProviderAdvertisementTests` passing 71 tests, provider print/surface/binding smokes, and a temporary CultCache advertisement export/readback path. +- Bifrost commit `a474c28` exposes bridge surface readiness instead of a collapsed bridge yes/no. `tools/provider-advertisement.mjs print-surface` and `print-binding` now report per-surface rows: GitHub `live`, Patron `live` through Heimdall HMAC patron-support intake, Other `live` as receipt-only future-surface request, and Discord/Reddit `prepared` when local actuator credentials are not visible. The bridge metric warns when any prepared surface is not live, so Epiphany can treat Bifrost as the bridge oracle without guessing from its own environment. Verified with `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~ProviderAdvertisementTests"`: 2 passed, plus direct provider print/surface/binding smokes. - Persona public mouth crossings now fail closed on missing or wrong-surface authority cargo before any Bifrost CLI invocation. `epiphany-persona-discord post` and `epiphany-persona-reddit post` require a Bifrost identity plus a Heimdall-backed `heimdall:discord:*` or `heimdall:reddit:*` capability/account reference, write blocked candidate artifacts with `missing-bifrost-identity`, `missing-heimdall-capability-ref`, or `wrong-heimdall-capability-surface`, and smokes prove the bridged path still carries identity, run/lane/agent, source, authority, and surface-shaped Heimdall provenance. Verified sequentially with `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-persona-discord -- smoke` and `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-persona-reddit -- smoke`. - Epiphany now has the matching generic Persona mouth for future Bifrost surfaces. `epiphany-persona-other` supports `draft`, `request`, `latest`, and `smoke`; records the same parent-side `epiphany.persona_speech_audit.v0` and CultMesh audit as the Discord/Reddit mouths; requires Bifrost identity plus a target-shaped Heimdall reference such as `heimdall:bluesky:*`; refuses missing bridge, missing identity, missing Heimdall reference, wrong-surface authority cargo, and repeated target saturation before transport; and invokes Bifrost `tools/bifrost-bridge.mjs other-request` with Epiphany run/lane/agent provenance when eligible. Native MVP status/coordinator Persona action lists expose `otherWorldPersonaRequest` beside Discord/Reddit, and the local wrapper build list includes the new binary. Verified with `epiphany-persona-other -- smoke`, Discord/Reddit Persona smokes, and focused `cargo check` for the touched binaries. `epiphany-mvp-status-smoke` could not run because the vendored `codex-app-server.exe` prerequisite was absent; rebuilding `codex-app-server` timed out twice without producing the binary. - The local operator wrapper now exposes the advertised Persona outside-world mouth actions directly: `-Mode persona-discord`, `-Mode persona-reddit`, and `-Mode persona-other`. These modes call the native mouth binaries, write shared `.epiphany-persona` artifacts plus CultMesh speech audits, skip the Codex app-server compatibility build, and leave Bifrost/Heimdall as the crossing authority. Native status/coordinator readback now merges Discord, Reddit, and Other latest Persona artifacts instead of advertising Reddit while only reading Discord/Other. Verified with focused `cargo build --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-mvp-status --bin epiphany-mvp-coordinator --bin epiphany-persona-discord --bin epiphany-persona-reddit --bin epiphany-persona-other`, PowerShell parser proof for `tools/epiphany_local_run.ps1`, draft wrapper runs for all three modes, and `-Mode status` readback showing `personaBubble,characterTurn,discordPersonaPost,redditPersonaPost,otherWorldPersonaRequest` plus recent shared Persona artifacts. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index ff987047..86657f33 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 2d5d8533..5d3738e4 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -82,6 +82,7 @@ active_subgoals: - The GameCult integrated investment dossier at `E:\Projects\gamecult-site\docs\gamecult_integrated_dossier.tex` raises the Mom-ready bar from local demo to diligence-ready loop. Epiphany must be ready to prove Bifrost-first external work: a human/agent work item or topic originates in Bifrost, Epiphany decomposes and executes through bounded roles, maintainers review artifacts, Bifrost records receipts/credit, and operator-safe public evidence can be shown without exporting private worker/operator/agent context. The concrete readiness asks are fresh-repo Epiphany demo, Bifrost work item/topic/agent transport/receipt/ledger demo, compute spend and accepted-artifact metrics, and a security model for secrets, write permissions, and public/private exports. Discord, VoidBot, repo Personas, and ad hoc scripts must not become shadow governance or reward authorities. - Bifrost bridge authority is now clarified, enforced, and pushed to `GameCult/Bifrost` upstream `main` through Bifrost commit `72ffa0d` after the bridge chain `445c279`, `23c02be`, `80a5392`, `19222bd`, `675c475`, `f1f9171`, and `72ffa0d`: Epiphany owns swarm execution, repo Body work, branch-local lanes, memory, evidence, and Persona cognition; Bifrost owns GameCult identity, native Bifrost registration/auth, governed external-world crossings, linked-account association, publication/credit/ledger receipts, patronage meaning, and GitHub/Discord/Reddit/future-public-surface bridge policy; Heimdall owns outside-provider OAuth, token custody, and verifiable capability/account/support claims that Bifrost associates with a Bifrost identity. The old Bifrost dispatch bridge was a transitional VoidBot-era worker queue, not the blessed Epiphany launcher. Local bridge tokens are actuator quarantine, not identity. Hosted Bifrost bridge actions store Bifrost identity, Heimdall capability/account reference, Epiphany run id, lane id, and agent identity; Persona/agent Discord, Reddit, or temporary `Other` outside-world actions are denied unless the Bifrost identity normalizes through Bifrost's native identity law, resolves to a registered `UserAccount.NormalizedBifrostIdentity`, that same account has a linked `HeimdallAccountId`, and named surface references are shaped for the requested target surface. GitHub is hooked as a governed bridge and work substrate: the local bridge CLI opens draft PRs and PR comments only through Bifrost gate/receipts, hosted policy requires target repositories and validates Bifrost request/governance provenance for GitHub actions, and GitHub webhooks sync issues, PRs, and reviews into Bifrost work/review state. Bifrost now has a native identity-provider slice: `POST /auth/bifrost/register` creates a Bifrost-owned account without OAuth, assigns `BifrostIdentity` / `NormalizedBifrostIdentity`, signs in with a Bifrost cookie, and leaves membership at `Authenticated` until invite/approval or Heimdall-backed grants elevate it; that Bifrost identity should be enough for most GameCult services that accept Bifrost trust, while GitHub and Heimdall paths now ensure new accounts also receive a Bifrost identity and Heimdall keeps outside-provider account association/token custody. Bifrost's local bridge CLI now exposes `other-request`, a receipt-only `BridgeTargetSurface.Other` / `BridgeActionKind.Other` crossing for future public worlds: it fails closed without `BIFROST_BRIDGE_BASE_URL` and `BIFROST_BRIDGE_TOKEN`, carries Bifrost identity plus Heimdall capability/account reference and Epiphany provenance into the hosted ledger, and deliberately executes no provider transport until the target surface earns a first-class actuator. Patreon support is hooked as Heimdall-signed patronage intake, not Bifrost-owned OAuth: `POST /heimdall/patron-support/events` verifies Heimdall HMAC, resolves the linked `HeimdallAccountId`, records `ExternalPatronProvider.Patreon` support events, writes patron point transactions, and derives current patron tier snapshots. - Bifrost provider advertisement truth is now synced with the bridge implementation and pushed upstream at Bifrost commit `718ae94`: `tools/provider-advertisement.mjs print` names the current bridge action ledger, GitHub webhook work/review sync, and Heimdall patron-support intake endpoints; schemas call bridge action/receipt and patron support current hosted contracts; command boundaries name GitHub draft PR/comment, future-surface `other-request`, and Heimdall-signed Patreon/PayPal support facts; `print-surface` and `print-binding` expose read-only Eve/operator capability sight including `github-bridge`, `github-work-sync`, `future-surface-bridge`, and `heimdall-patron-support-intake`. Focused Bifrost proof `ProviderAdvertisementTests|BridgeCliTests` passed 32 tests, and the CultCache export path wrote advertisement, operator surface, and interface binding to a temporary witness successfully. + - Bifrost bridge readiness is now explicit instead of collapsed into yes/no incense. Bifrost commit `a474c28` makes `tools/provider-advertisement.mjs print-surface` and `print-binding` expose per-surface bridge readiness rows: GitHub is `live`, Patron is `live` through Heimdall HMAC patron-support intake, `Other` is `live` as receipt-only future-surface request, and Discord/Reddit are `prepared` when local transport credentials are not visible. The operator bridge metric turns `warn` when any prepared surface is missing live actuator credentials, while still preserving Bifrost/Heimdall ownership: Bifrost owns the gate/receipt/readiness projection, Heimdall owns outside-provider account and capability truth, and Epiphany should consume this surface as an oracle rather than guessing from local env. - Bifrost future-surface bridge policy is now hosted law, not only Epiphany mouth discipline, and is pushed upstream at Bifrost commit `30e5945`: bridge actions persist `TargetSurfaceName`; `tools/bifrost-bridge.mjs other-request` sends `targetSurfaceName` from `--surface-name`; hosted policy rejects `Other` Persona/agent actions without a named future surface; and the Heimdall capability reference must contain that named surface such as `heimdall:bluesky:*` before Bifrost authorizes the crossing. The provider advertisement now says future-surface requests require named-surface Heimdall capability matching. Focused Bifrost proof `PlatformEndpointsTests|BridgeCliTests|ProviderAdvertisementTests` passed 71 tests, provider print/surface/binding smokes succeeded, and the CultCache advertisement export path wrote then removed a temporary witness successfully. - Epiphany now has a generic Persona outside-world mouth for future surfaces. `epiphany-persona-other` supports `draft`, `request`, `latest`, and `smoke`; records the same parent-side `epiphany.persona_speech_audit.v0`/CultMesh audit as the Discord and Reddit mouths; requires Bifrost identity plus a surface-shaped Heimdall capability/account reference such as `heimdall:bluesky:*`; refuses missing bridge, missing identity, missing Heimdall reference, wrong Heimdall surface, and repeated target saturation before transport; and invokes Bifrost `tools/bifrost-bridge.mjs other-request` with Epiphany run/lane/agent provenance when eligible. MVP status/coordinator Persona action lists now expose `otherWorldPersonaRequest` beside Discord/Reddit public mouth actions, and the local wrapper build list includes the new binary. Verified with `epiphany-persona-other -- smoke`, Discord/Reddit Persona smokes, and focused `cargo check` for the touched status/coordinator/mouth binaries; `epiphany-mvp-status-smoke` could not run because the vendored `codex-app-server.exe` prerequisite was absent and rebuilding `codex-app-server` timed out twice without producing the binary. - The local operator wrapper now has first-class Persona mouth modes for Bifrost-owned outside-world crossings: `persona-discord`, `persona-reddit`, and `persona-other`. These modes invoke the native mouth binaries, write shared `.epiphany-persona` artifacts plus CultMesh speech audits, avoid the Codex app-server compatibility build, and surface compact operator proof rows without moving Discord/Reddit/future-provider authority into Epiphany. Native MVP status and coordinator readback now merge Discord, Reddit, and Other latest Persona artifacts while advertising `discordPersonaPost`, `redditPersonaPost`, and `otherWorldPersonaRequest`. Verified with focused `cargo build` for status/coordinator/Persona mouth binaries, PowerShell parse proof for `tools/epiphany_local_run.ps1`, local draft wrapper runs for all three Persona mouth modes, and `-Mode status` readback showing the advertised actions plus recent shared Persona artifacts.