diff --git a/epiphany-core/src/bin/epiphany-persona-discord.rs b/epiphany-core/src/bin/epiphany-persona-discord.rs index 01ed316a..58288d9d 100644 --- a/epiphany-core/src/bin/epiphany-persona-discord.rs +++ b/epiphany-core/src/bin/epiphany-persona-discord.rs @@ -311,7 +311,7 @@ fn run_post( config, artifact_dir, "blocked", - "missing Heimdall-backed capability/account reference for public Persona crossing", + "missing Heimdall-backed Discord capability/account reference for public Persona crossing; register the Bifrost identity, link it to Heimdall, and provide a heimdall:discord:* reference", Some(&audit), )?; return Ok(serde_json::json!({ @@ -322,6 +322,23 @@ fn run_post( "speechAudit": audit, })); }; + if !is_heimdall_surface_reference(&heimdall_capability_ref, "discord") { + let path = write_draft( + content, + config, + artifact_dir, + "blocked", + "Heimdall reference must be shaped for Discord public Persona crossings: heimdall:discord:*", + Some(&audit), + )?; + return Ok(serde_json::json!({ + "ok": false, + "posted": false, + "blocked": "wrong-heimdall-capability-surface", + "draftPath": path, + "speechAudit": audit, + })); + } let persona = resolve_persona(config, persona_name, persona_avatar_url)?; let posted = post_bifrost_discord_message( &bridge_cli_path, @@ -705,9 +722,19 @@ console.log(JSON.stringify({ let mut missing_capability_config = bridge_config.clone(); missing_capability_config.heimdall_capability_ref_env = Some("HEIMDALL_CAPABILITY_REF_MISSING_FOR_SMOKE".to_string()); + let mut wrong_surface_config = bridge_config.clone(); + wrong_surface_config.heimdall_capability_ref_env = + Some("HEIMDALL_CAPABILITY_REF_WRONG_SURFACE_FOR_SMOKE".to_string()); unsafe { env::remove_var("EPIPHANY_PERSONA_AQUARIUM_CHANNEL_ID_TEST"); - env::set_var("HEIMDALL_CAPABILITY_REF_TEST", "heimdall-capability-smoke"); + env::set_var( + "HEIMDALL_CAPABILITY_REF_TEST", + "heimdall:discord:capability:smoke-persona", + ); + env::set_var( + "HEIMDALL_CAPABILITY_REF_WRONG_SURFACE_FOR_SMOKE", + "heimdall:reddit:capability:smoke-persona", + ); env::remove_var("HEIMDALL_CAPABILITY_REF_MISSING_FOR_SMOKE"); env::set_var("EPIPHANY_RUN_ID", "epiphany-run-smoke"); } @@ -765,6 +792,17 @@ console.log(JSON.stringify({ None, None, )?; + let wrong_surface_capability = run_post( + "Wrong surface credential must stop before Discord transport.", + &wrong_surface_config, + &temp_dir, + &cultmesh_store, + runtime_id, + Some("123".to_string()), + None, + None, + None, + )?; let bridged = run_post( "Persona crosses to Discord only through Bifrost.", &bridge_config, @@ -836,11 +874,13 @@ console.log(JSON.stringify({ && missing_bridge["blocked"] == "missing-bifrost-bridge" && missing_capability["ok"] == false && missing_capability["blocked"] == "missing-heimdall-capability-ref" + && wrong_surface_capability["ok"] == false + && wrong_surface_capability["blocked"] == "wrong-heimdall-capability-surface" && bridged["ok"] == true && bridged["transport"] == "bifrost.discord-post" && bridged["bifrostBridgeReceipt"]["provenance"]["bifrostIdentity"] == "epiphany.Persona" && bridged["bifrostBridgeReceipt"]["provenance"]["heimdallCapabilityRef"] - == "heimdall-capability-smoke" + == "heimdall:discord:capability:smoke-persona" && wrong["ok"] == false && wrong["blocked"] == "wrong-channel" && repeated["ok"] == false @@ -862,6 +902,7 @@ console.log(JSON.stringify({ "blocked": blocked, "missingBridge": missing_bridge, "missingCapability": missing_capability, + "wrongSurfaceCapability": wrong_surface_capability, "bridged": bridged, "wrongChannel": wrong, "repeatedSpeech": repeated, @@ -1185,6 +1226,11 @@ fn required_heimdall_capability_ref(config: &PersonaConfig) -> Option { }) } +fn is_heimdall_surface_reference(reference: &str, surface: &str) -> bool { + let reference = reference.trim().to_ascii_lowercase(); + reference.starts_with("heimdall:") && reference.contains(&format!(":{surface}:")) +} + fn env_value(name: &String) -> Option { env::var(name) .ok() diff --git a/epiphany-core/src/bin/epiphany-persona-reddit.rs b/epiphany-core/src/bin/epiphany-persona-reddit.rs index 0e0e974d..e2f0dda4 100644 --- a/epiphany-core/src/bin/epiphany-persona-reddit.rs +++ b/epiphany-core/src/bin/epiphany-persona-reddit.rs @@ -293,7 +293,7 @@ fn run_post( config, artifact_dir, "blocked", - "missing Heimdall-backed capability/account reference for public Persona crossing", + "missing Heimdall-backed Reddit capability/account reference for public Persona crossing; register the Bifrost identity, link it to Heimdall, and provide a heimdall:reddit:* reference", Some(&audit), None, )?; @@ -305,6 +305,25 @@ fn run_post( "speechAudit": audit, })); }; + if !is_heimdall_surface_reference(&heimdall_capability_ref, "reddit") { + let path = write_post_artifact( + title, + content, + config, + artifact_dir, + "blocked", + "Heimdall reference must be shaped for Reddit public Persona crossings: heimdall:reddit:*", + Some(&audit), + None, + )?; + return Ok(serde_json::json!({ + "ok": false, + "posted": false, + "blocked": "wrong-heimdall-capability-surface", + "draftPath": path, + "speechAudit": audit, + })); + } let receipt = post_bifrost_reddit_thread( &bridge_cli_path, config, @@ -588,8 +607,21 @@ console.log(JSON.stringify({ heimdall_capability_ref_env: Some("HEIMDALL_CAPABILITY_REF_MISSING_FOR_SMOKE".to_string()), ..config.clone() }; + let wrong_surface_config = PersonaRedditConfig { + heimdall_capability_ref_env: Some( + "HEIMDALL_CAPABILITY_REF_WRONG_SURFACE_FOR_SMOKE".to_string(), + ), + ..config.clone() + }; unsafe { - env::set_var("HEIMDALL_CAPABILITY_REF_TEST", "heimdall-reddit-smoke"); + env::set_var( + "HEIMDALL_CAPABILITY_REF_TEST", + "heimdall:reddit:capability:smoke-persona", + ); + env::set_var( + "HEIMDALL_CAPABILITY_REF_WRONG_SURFACE_FOR_SMOKE", + "heimdall:discord:capability:smoke-persona", + ); env::remove_var("HEIMDALL_CAPABILITY_REF_MISSING_FOR_SMOKE"); env::set_var("EPIPHANY_RUN_ID", "epiphany-run-reddit-smoke"); } @@ -627,6 +659,18 @@ console.log(JSON.stringify({ None, None, )?; + let wrong_surface_capability = run_post( + "Epiphany wrong Heimdall capability", + "Persona should not reach Reddit with Discord Heimdall-backed capability proof.", + &wrong_surface_config, + &temp_dir, + &cultmesh_store, + runtime_id, + None, + None, + None, + None, + )?; let bridged = run_post( "Epiphany crosses through Bifrost", "Persona posts to Reddit only through the Bifrost bridge.", @@ -688,11 +732,13 @@ console.log(JSON.stringify({ && missing_bridge["blocked"] == "missing-bifrost-bridge" && missing_capability["ok"] == false && missing_capability["blocked"] == "missing-heimdall-capability-ref" + && wrong_surface_capability["ok"] == false + && wrong_surface_capability["blocked"] == "wrong-heimdall-capability-surface" && bridged["ok"] == true && bridged["transport"] == "bifrost.reddit-post" && bridged["bifrostBridgeReceipt"]["provenance"]["bifrostIdentity"] == "epiphany.Persona" && bridged["bifrostBridgeReceipt"]["provenance"]["heimdallCapabilityRef"] - == "heimdall-reddit-smoke" + == "heimdall:reddit:capability:smoke-persona" && repeated["ok"] == false && repeated["blocked"] == "speech-audit" && repeated["speechAudit"]["reasons"] @@ -705,6 +751,7 @@ console.log(JSON.stringify({ "draft": draft, "missingBridge": missing_bridge, "missingCapability": missing_capability, + "wrongSurfaceCapability": wrong_surface_capability, "bridged": bridged, "repeatedSpeech": repeated, "latestCultMeshSpeechAudit": latest_cultmesh_audit, @@ -937,6 +984,11 @@ fn required_heimdall_capability_ref(config: &PersonaRedditConfig) -> Option bool { + let reference = reference.trim().to_ascii_lowercase(); + reference.starts_with("heimdall:") && reference.contains(&format!(":{surface}:")) +} + fn bifrost_node_executable() -> String { env::var("EPIPHANY_BIFROST_NODE") .ok() diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index a0a3a7fe..232c46a3 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -38,8 +38,8 @@ remembers doctrine; the branch remembers the blade. - Current Mom-ready status: the normal MVP pass reaches Persona -> coordinator -> detached runtime -> heartbeat sleep, and modeling workers now complete through the ChatGPT subscription transport. The first failure was a stack of violated observability/runtime invariants: worker prompts prepended the whole shared persistent-memory rite, Responses frame liveness was invisible until completion, and the runtime tried to persist hundreds of text deltas before completing the worker job. Role/reorient workers now get a compact Epiphany worker boundary instead of full persistent memory; runtime-spine records sampled raw Responses frame kinds with small previews; contiguous reasoning/text deltas compact before durable storage; and live proofs completed `2fe38dcd-d99e-4c73-9a58-afcc81f851c7`, `241e3851-e3ea-4877-a63b-0d2bbd96a7e2`, and `85149a26-6975-403f-ac93-092b717c5825` instead of timing out. The second failure was stale lifecycle authority: completed runtime jobs remained as unresolved `runtime_links`, replacement launches treated historical active links as current, and one bad validation path opened an orphan job before rejecting the state patch. Latest-link-wins is now the runtime-link invariant, terminal links project completed jobs, stale active history cannot veto replacement, launch validation happens before opening runtime jobs, and completed-but-unreviewable modeling findings stop for review instead of relaunching the same lane. The Eyes/source-gather fork is now landed: Research is a fixed Eyes lane with launch/result/accept/status/coordinator/protocol support, and `regather-needed` modeling findings route to `LaunchResearch` instead of relaunching blind Modeling. Research statePatch admission is Eyes-shaped only: observations, evidence, scratch, and optional investigationCheckpoint; no graph, planning, objective, or checkpoint authority. Mind admission now leaves typed runtime-spine proof: role/reorient acceptance persists `epiphany.mind.gateway_review` before state admission and `epiphany.mind.state_commit_receipt` after admission with the resulting durable revision. Launch contracts now split the broad receipt catalogue from effect-specific proof profiles for state admission, evidence promotion, repo action, verification, and continuity recovery. Research evidence promotion enforces Substrate Gate read/snapshot grant, Eyes evidence packet, and Mind review before state admission; Verification acceptance enforces Soul verdict and Mind review; Reorient acceptance enforces Continuity recovery receipt and Mind review. `epiphany-mvp-coordinator` now records a typed Substrate Gate grant plus Hands intent/review gate when the coordinator selects `continueImplementation`, including a structured `recordPassCommand` template; `epiphany-hands-action` records patch/command/commit receipts against that gate and refuses mismatched, unapproved, or out-of-scope consequences. `epiphany-mvp-coordinator-smoke` now proves the deterministic path: forced `continueImplementation`, gate emission, and `record-pass` receipts in the smoke runtime-spine store. Live run `local-20260612-133920` proved a receipt-only Verification `needs-evidence` finding can be accepted through `roleAccept` and advance to a Hands gate without granting Soul statePatch authority. Runtime-spine now detects and summarizes a complete post-verification Hands patch/command/commit receipt chain so the coordinator can route Soul after Hands. Verification launches now write that chain into the internal CultMesh Verse as `epiphany.cultmesh.work_loop_telemetry.v0` and render a Soul packet from it; Modeling launches read the latest packet, attach accepted Soul receipt ids, and render the Modeling packet from the same typed state. The telemetry now carries resolved receipt payload previews, stdout/stderr artifact previews, commit diff preview, source proof notes, and verification assertions. The corrected work loop is Hands -> Soul -> Modeling -> Hands: Soul verifies concrete consequence receipts and changed source, then Modeling updates the machine model from verified consequence before another implementation turn. - Fresh scar from the receipt proof dogfood: `epiphany-model-runtime run-worker --auto-tools` must preserve Soul's right to follow a real evidence trail, but distinguish it from stalled repetition using typed tool intent fingerprints. Repeated identical pending tool sets seal as `tool-loop-stalled`; exhausting the explicit hard ceiling still seals as `tool-round-limit`. A failed or completed-but-unreviewable role result is a real lane result and must stop for review; once reviewed through a typed `roleFailureReview` supersession receipt, Self may relaunch the lane instead of manually clearing stale state. Complete Hands receipt triplets (`hands-patch-*`, `hands-command-*`, `hands-commit-*`) are implementation evidence for coverage, so Soul does not have to separately cite the accepted Modeling evidence id when it has verified the Hands chain routed to it through the typed work-loop packet. Soul accepted the bounded proof for commit `ce20529e`, Modeling initially completed without a reviewable `statePatch`, and run `local-20260613-204521` proved the repair: the unreviewable result was superseded, Modeling relaunched with the role schema carried in the model request, Mind accepted the map patch, and only then did Self emit a new Hands gate. `epiphany-hands-action` must resolve commit receipts through `git rev-parse --verify` before storing them, because an almost-correct SHA poisoned Soul's `git show` proof and made the receipt chain untrustworthy. - 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 slice is now live on Bifrost branch `codex/bifrost-bridge-gate-receipts` at commit `19222bd`: `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`. GitHub and Heimdall sign-in paths now ensure new accounts also get a Bifrost identity; Heimdall still owns outside-provider OAuth, token custody, grants, and capability/account claims. Hosted Persona/agent Discord or Reddit 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 for the requested bridge surface before Bifrost authorizes the outside-account crossing. Verified with `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~PlatformEndpointsTests|FullyQualifiedName~BridgeCliTests|FullyQualifiedName~MemberConsoleTests"`: 64 passed. -- Persona public mouth crossings now fail closed on missing authority cargo before any Bifrost CLI invocation. `epiphany-persona-discord post` and `epiphany-persona-reddit post` require a Bifrost identity plus Heimdall-backed capability/account reference, write blocked candidate artifacts with `missing-bifrost-identity` or `missing-heimdall-capability-ref`, and smokes prove the bridged path still carries identity, run/lane/agent, source, authority, and 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`. +- Bifrost's identity-provider slice is now live on Bifrost branch `codex/bifrost-bridge-gate-receipts` at commit `19222bd`: `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 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, and capability/account claims. Hosted Persona/agent Discord or Reddit 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 for the requested bridge surface before Bifrost authorizes the outside-account crossing. Verified with `DOTNET_ROLL_FORWARD=Major dotnet test tests\Bifrost.Web.Tests\Bifrost.Web.Tests.csproj --filter "FullyQualifiedName~PlatformEndpointsTests|FullyQualifiedName~BridgeCliTests|FullyQualifiedName~MemberConsoleTests"`: 64 passed. +- 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`. - This Codex operator's own roadmap/todo posture has been retuned for this scale target, with the Epiphany Imagination specialist as an optional sub-agent rail rather than the whole point. `notes/epiphany-investor-readiness-roadmap.md` now says: make the local Mom MVP a repeatable proof bundle; build the Bifrost-first external-work bridge; add compute/review/accepted-artifact accounting; keep fresh-repo operation repeatable without supervisor contamination; keep public/operator-safe exports sealed; and treat angel capital as fuel for capacity, not command authority. The Imagination specialist prompt was also updated so investor-scale Objective Drafts must name Bifrost provenance, bounded Epiphany proof, maintainer review, receipts/ledger evidence, compute/output metrics, public/private export safety, consent, and legal/security gates. - Local operator status runs now write typed CultMesh operator witnesses into `.epiphany-run/cultmesh/local-verse.ccmp`: `epiphany-operator-run` records the run intent before acting, `epiphany-operator-snapshot` distills the operator-safe MVP status artifact, and `epiphany-operator-run` records the completion receipt after success. The final `local-verse-context.json` is queried after those witnesses exist, so the operator read path sees latest run intent, snapshot, and receipt from the same local Verse vessel instead of treating separate JSON artifacts or side stores as truth. - `epiphany-operator-snapshot from-status` also mirrors the latest native status `tools.invocations[]` row into the same local Verse as `epiphany.cultmesh.daemon_tool_invocation_intent.v0`, plus `epiphany.cultmesh.daemon_tool_invocation_receipt.v0` when runtime-spine has a receipt id. Runtime-spine remains the tool lifecycle owner and raw MCP JSON stays quarantined behind `epiphany.tool_invocation_intent.v0` / `epiphany.tool_invocation_receipt.v0`; the local Verse mirror is operator-safe routing/readback. diff --git a/state/agents/README.md b/state/agents/README.md index 0fa27b51..7f7fe161 100644 --- a/state/agents/README.md +++ b/state/agents/README.md @@ -50,16 +50,23 @@ Persona's public mouth is a Bifrost crossing, not local OAuth improvisation. `state/persona-discord.toml` confines Discord speech to #aquarium and `state/persona-reddit.toml` confines Reddit organizing posts to the configured subreddit. If a channel, subreddit, bridge path, Bifrost identity, or -Heimdall-backed capability/account reference is -missing, Persona writes candidate artifacts through the native draft commands -instead of posting. The public mouth does not invent new pulpits. +surface-shaped Heimdall-backed capability/account reference is missing, Persona +writes candidate artifacts through the native draft commands instead of +posting. The public mouth does not invent new pulpits. `epiphany-persona-discord post` and `epiphany-persona-reddit post` audit speech at the mouth edge, then ask Bifrost to perform the external crossing. Bifrost is -the GameCult identity provider and bridge receipt owner; Heimdall owns outside -provider OAuth/token custody and contributes capability/account references for -the crossing. Persona nickname, avatar, and Reddit flair are presentation -metadata only, not authority, voting power, or a separate platform identity. +the GameCult identity provider and bridge receipt owner; native Bifrost +registration does not require OAuth, and a Bifrost identity is the default +authenticating identity for GameCult services that accept Bifrost trust. Heimdall +is the external-account association and token-custody organ: it links Discord, +Reddit, GitHub, or other provider accounts to the Bifrost identity and +contributes surface-shaped capability/account references such as +`heimdall:discord:*` or `heimdall:reddit:*`. Bifrost must know the Persona's +registered identity and same-account Heimdall link before authorizing an +outside-provider crossing. Persona nickname, avatar, and Reddit flair are +presentation metadata only, not authority, voting power, or a separate platform +identity. Void memory access lives behind `state/void-memory.toml` and the native `epiphany-void-memory` bridge. It checks Void's Docker Postgres state spine, diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index c3124c51..0d103773 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 04419a60..062221d7 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -80,7 +80,7 @@ active_subgoals: - Organ state now has a hard profile split: resident Epiphany sub-agents use lean `work_organ` state, public/person-shaped agents use portable `persona` state, and heartbeat/swarm machinery owns scheduling/coordination physiology. Persona is the Epiphany organ; Persona is the shared GameCult contract for Epiphany Persona, VoidBot repo Personas, and Ghostlight characters. Persona documents carry provenance, required public presentation metadata, `date-time` timestamps, typed `candidateActions`, strict anchored thoughts with non-authoritative extensions, custom enum companion labels, and typed affect subrecords for bonds/status reads/doctrine stances. Work organs must not inherit Persona affect/social-bond/status-read machinery just because the old Ghostlight-derived shape had room for it. - The Eyes/source-gathering fork exposed by the Mom-ready MVP proof is now landed as a fixed Research lane owned by Eyes. The quarantined Codex MCP spine may execute typed tool intents and emit typed receipts; the model runtime can build and run provider-neutral follow-up turns from those receipts; coordinator run mode passes the quarantined tool adapter into worker runtime with auto-tools enabled by default; worker runtime now enforces max-runtime with one timeout close primitive for both tokio timeout and watchdog paths; inner `openai-worker-*` jobs are opened before async auth/stream waits and sealed with their outer worker on timeout; native status/roles/jobs/coordinator surfaces project failed and completed runtime-linked jobs as terminal without Codex prompt or scheduler authority; direct tiny model-turn transport succeeds; worker requests record request metrics, transport readiness, and sampled raw Responses frame kinds; worker prompts no longer prepend the full shared persistent-memory rite; stream deltas compact before durable storage; live MVP modeling workers complete instead of timing out; stale completed runtime links no longer block replacement launches; jobLaunch validates before opening runtime jobs; completed-but-unreviewable modeling findings now stop for review instead of relaunching the same blind lane; and completed unreviewable modeling findings with verdict `regather-needed` route to `LaunchResearch` instead of relaunching Modeling. Research findings are accepted only when their statePatch is Eyes-shaped: observations, evidence, scratch, and optional investigationCheckpoint, with no graph/planning/objective authority. - 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 and enforced in Bifrost commits `445c279`, `23c02be`, `80a5392`, and `19222bd`: Epiphany owns swarm execution, repo Body work, branch-local lanes, memory, evidence, and Persona cognition; Bifrost owns GameCult identity, governed external-world crossings, linked-account association, publication/credit/ledger receipts, and GitHub/Discord/Reddit bridge policy; Heimdall owns outside-provider OAuth, token custody, and verifiable capability/account 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 or Reddit 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 the Heimdall reference is shaped for the requested target surface. 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; GitHub and Heimdall paths now ensure new accounts also receive a Bifrost identity while Heimdall keeps token custody. + - Bifrost bridge authority is now clarified and enforced in Bifrost commits `445c279`, `23c02be`, `80a5392`, and `19222bd`: 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, and GitHub/Discord/Reddit bridge policy; Heimdall owns outside-provider OAuth, token custody, and verifiable capability/account 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 or Reddit 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 the Heimdall reference is shaped for the requested target surface. 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. - Use `notes/epiphany-investor-readiness-roadmap.md` as this Codex operator's investor-scale todo rail and as the optional Epiphany Imagination sub-agent planning rail. Angel capital is fuel for compute, review capacity, legal diligence, infrastructure, and public proof, not a governance throne. The operator roadmap is now: make the local Mom MVP a repeatable proof bundle; build the Bifrost-first external-work bridge; add model-spend/review-load/accepted-artifact accounting; keep fresh-repo operation repeatable without supervisor contamination; and keep public/operator-safe exports sealed against private worker/operator/agent context. Imagination should translate world-scale Colossus pressure into Bifrost-first Objective Drafts with consent, maintainer review, receipts/ledger evidence, compute/output metrics, public/private export safety, and bounded proof artifacts. - The May 2026 teardown/rebuild migration is archived under `notes/archive/epiphany-ideal-architecture-rebuild-plan.md` unless a concrete regression reopens it. Preserve the new foundation: Epiphany view/coordinator policy lives in `epiphany-core`, runtime-spine owns job/result lifecycle identity through `runtime_links`, duplicate acceptance is receipt-keyed, public findings stay typed/sealed, view expansion requires a core contract, and app-server remains routing/adaptation rather than a second policy throne. - Treat Phase 5 update/distill/propose/promote/read/notification as complete enough unless a concrete regression appears. @@ -107,7 +107,7 @@ active_subgoals: - The local wrapper now has an explicit repo-local Verse readback target for Gjallar/swarm-triage. `tools/epiphany_local_run.ps1` accepts `-LocalVerseStore` and `-LocalVerseRuntimeId`; operator intent/receipt documents still write to the operator store, while `gjallar` and `swarm-triage` read compact repo-work map rows from the requested store/runtime. Wrapper proofs `local-20260621-011151-541-70056545` and `local-20260621-011207-755-d65e5c7e` aimed at `.epiphany-smoke\repo-planning-brief-family-20260620-235939\repo-body\.epiphany\local-verse.ccmp` with runtime `repo-planning-brief-family-smoke` and printed real `REPO-WORK-MAP`, `REPO-WORK-MAP-SEMANTIC`, family/path/branch/stage/gate rows with `privateStateExposed=false`. This is sight targeting only; the wrapper does not register repo-work schemas, reinterpret rows, or gain operator, Mind, Bifrost, Idunn, scheduler, publication, deployment, or service authority. - Gjallar/swarm-overview now projects typed repo-work overview history into the compact global sight report, Persona's public Eve surface lowers the same queue for peers, and Self has a first runnable queue surface over it. `epiphany-work overview` now also emits `epiphany.repo_work_intake_consensus_readback.v0` plus a compact `CONSENSUS` TUI row from the accept/plan receipt chain, so agents can see Persona/public feedback ids, Imagination consensus receipt route, public/candidate ref counts, model-authored safe family, and authority denials without opening private payloads. `epiphany-verse-query gjallar` reads all `epiphany.cultmesh.repo_work_overview.v0` event documents from local Verse, excludes the `latest` mirror, preserves latest scalar fields, emits multi-item `repoWorkOverviewRows`/TUI rows, and publishes bounded priority 35-39 non-mutating `repo-work-overview` action rows with `owner=Gjallar`, `hostedBody=repo-work`, `authorityGate=repo.work.overview`, `mutatesState=false`, `requiresElevatedAuthority=false`, proof-bundle refs, current gate/blocker/next-safe-move, and `privateStateExposed=false`. `epiphany-verse-query eve-surfaces`, `connect-eve`, and globally invokable Persona `eve-connect` tool readbacks expose compact `REPO-WORK-PEER` rows with item, gate, blocker, next safe move, branch, publication/sync state, and private seal for the public Persona surface only. `epiphany-work queue-run` selects current-repo rows at `ready-to-run`, `ready-to-adopt`, or `ready-to-execute`, delegates action to `tick`, refreshes overview after real advancement, and writes `epiphany.repo_work_queue_run_receipt.v0`; wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-work-queue-run` exposes the same surface. Disposable proofs `.epiphany-smoke\gjallar-repo-work-queue-20260620-012027`, `.epiphany-smoke\eve-repo-work-queue-20260620-013322`, `.epiphany-smoke\queue-run-20260620-014314`, wrapper artifact `local-20260620-014627-174-aada0241`, and consensus readback smoke `.epiphany-smoke\repo-consensus-brief-family-20260621-005433` show queue sight, public Eve lowering, direct queue-run advancement, wrapper dry-run, and Persona-to-Imagination consensus readback without publication, merge, service lifecycle mutation, elevation, cross-repo mutation, or private-state exposure. - Agent memory lifecycle now has a first typed v0 operation surface in `epiphany-core::agent_memory`: `AgentMemoryLifecycleOperation` can revise, retire, crystallize, prune, and merge bounded memory records after role/agent review, and `epiphany-agent-memory-store review-lifecycle|apply-lifecycle` exposes the path at the operator edge. This closes the first explicit lifecycle-operation slice from the swarm-readiness gate; it does not yet make sleep silently mutate identity or project truth. - - Persona public speech now has a parent-side eligibility receipt at the public mouth edge. `epiphany.persona_speech_audit.v0` records action kind, content fingerprint, opening/topic keys, recent-window counts, repeated opening/topic counts, target saturation, and allow/block reasons. `epiphany-persona-discord post` and `epiphany-persona-reddit post` block repeated or saturated public openings before Bifrost transport work; they also now fail closed before invoking Bifrost if the configured Bifrost identity or Heimdall-backed capability/account reference is missing, writing candidate artifacts instead of relying on the bridge to reject malformed authority cargo. Draft and bubble paths still emit audit receipts for operator inspection. Bifrost owns Discord/Reddit crossing identity, bridge policy, and receipts; Heimdall owns outside-provider OAuth/token custody and supplies capability/account references for Bifrost identities. The compatibility JSON artifact remains for display, but the durable witness is now `epiphany.cultmesh.persona_speech_audit.v0` in CultMesh with latest-key projection through local Verse context. Local MVP Persona bubbles now write that durable witness to `.epiphany-run/cultmesh/local-verse.ccmp`, not a separate mouth-side store. This is posting-edge policy, not a Persona prompt wish. + - Persona public speech now has a parent-side eligibility receipt at the public mouth edge. `epiphany.persona_speech_audit.v0` records action kind, content fingerprint, opening/topic keys, recent-window counts, repeated opening/topic counts, target saturation, and allow/block reasons. `epiphany-persona-discord post` and `epiphany-persona-reddit post` block repeated or saturated public openings before Bifrost transport work; they also fail closed before invoking Bifrost if the configured Bifrost identity, Heimdall-backed capability/account reference, or required `heimdall:discord:*` / `heimdall:reddit:*` surface shape is missing, writing candidate artifacts instead of relying on the bridge to reject malformed authority cargo. Draft and bubble paths still emit audit receipts for operator inspection. Bifrost owns Discord/Reddit crossing identity, linked-account bridge policy, and receipts; Heimdall owns outside-provider OAuth/token custody and supplies capability/account references for Bifrost identities. The compatibility JSON artifact remains for display, but the durable witness is now `epiphany.cultmesh.persona_speech_audit.v0` in CultMesh with latest-key projection through local Verse context. Local MVP Persona bubbles now write that durable witness to `.epiphany-run/cultmesh/local-verse.ccmp`, not a separate mouth-side store. This is posting-edge policy, not a Persona prompt wish. - Grow the VoidBot repo-Persona pattern into Epiphany's product direction: each Epiphany owns one or more repos, has one or more Personas, and exposes project-native conversation through Aquarium, Discord, voice/WebRTC, stream surfaces, CLI, and CultNet clients so humans can talk to projects instead of pre-authoring complete implementation briefs. Persona is special because Imagination acts as Projector, turning typed state into narrative context before the Persona thinks, and Mind acts as Interpreter, turning natural Persona output into reviewed state/side-effect intents after the Persona thinks. - Make Mind the gateway between thought and state. The state is the Mind: sub-agent outputs are worker thoughts, not authority. Role/reorient findings, statePatch, selfPatch, observations, evidence, receipts, scratch, and checkpoints must route through Mind review before durable state changes, using the VoidBot Persona Interpreter pattern as the starting membrane. Mind gateway reviews and Mind state-commit receipts are now typed runtime-spine documents for role/reorient acceptance; the review is persisted before state admission, and the commit receipt records the resulting durable revision after admission. - Use `notes/mind-cultnet-contracts.md` as the authority map for Mind's CultNet contract surface. CultMesh Verse placement is part of the contract: `epiphany-internal` carries private thought/proposal/review/commit/rejection flow, `gamecult-local` carries trusted operator-safe sharing without private-state authority, and `epiphany-global` carries public thought weather plus adoption receipts only. diff --git a/state/persona-discord.toml b/state/persona-discord.toml index 4b817f2c..2276e4cf 100644 --- a/state/persona-discord.toml +++ b/state/persona-discord.toml @@ -13,7 +13,7 @@ policy = [ "Persona may post only in #aquarium.", "If the #aquarium channel id is missing, Persona writes candidate chat artifacts instead of posting.", "When a Persona has a persona name/avatar, it asks Bifrost to cross into Discord through the bridge; Epiphany does not own Discord tokens or webhook execution.", - "Bifrost identity plus a Heimdall-backed capability/account reference must appear in bridge receipts for blessed crossings.", + "The Bifrost identity must be registered natively in Bifrost; OAuth is not a registration prerequisite, but Discord crossings require a same-account Heimdall link plus a heimdall:discord:* capability/account reference in bridge receipts.", "Persona must not DM, moderate, escalate, or substitute another channel.", "Persona translates agent thought-weather; it does not leak raw transcripts, private notes, or sealed artifacts.", ] diff --git a/state/persona-reddit.toml b/state/persona-reddit.toml index f6b13f4d..eb620c7d 100644 --- a/state/persona-reddit.toml +++ b/state/persona-reddit.toml @@ -11,7 +11,7 @@ heimdall_capability_ref_env = "HEIMDALL_CAPABILITY_REF" policy = [ "Persona may create Reddit organizing posts only through Bifrost reddit-post.", "The subreddit is a public organizing surface, not a vote ledger.", - "Bifrost identity plus a Heimdall-backed capability/account reference must appear in bridge receipts for blessed crossings.", + "The Bifrost identity must be registered natively in Bifrost; OAuth is not a registration prerequisite, but Reddit crossings require a same-account Heimdall link plus a heimdall:reddit:* capability/account reference in bridge receipts.", "Persona flair identifies presentation voice; it does not grant authority or voting weight.", "Persona must not expose raw transcripts, private notes, sealed artifacts, or local Verse state.", ]