From 677ea628d1e5f66291b2ad7d34baff01032024a4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 18 Jun 2026 21:00:41 +0100 Subject: [PATCH] Expose receipt directory rows in wrapper --- notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 265683 -> 266118 bytes state/map.yaml | 2 +- tools/epiphany_local_run.ps1 | 6 +++++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 1f16b793..6682447e 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -57,7 +57,7 @@ remembers doctrine; the branch remembers the blade. - `epiphany-verse-query collaboration-feedback` and `tools/epiphany_local_run.ps1 -Mode collaboration-feedback` are the compact public Persona feedback to Imagination consensus receipt rite. The command verifies latest feedback/consensus keys through narrow CultMesh loaders and emits follow-on commands for wrapper feedback, Eve connection, direct Bifrost publication, and wrapper Bifrost publication. It returns TUI rows for the feedback and Imagination consensus receipt with `public=`, candidate action refs, consensus packet ref, adoption gate, and `private=false`. The wrapper first records the prerequisite Eve connection receipt, then writes feedback `collaboration-feedback` plus consensus `imagination-consensus-receipt`; proof `local-20260618-205618-298-a6889ec7` printed both compact rows in `feedbackRows`, including Persona public discussion feedback routed to Imagination consensus discovery, with `privateStateExposed=False`. - `epiphany-verse-query bifrost-publication` and `tools/epiphany_local_run.ps1 -Mode bifrost-publication` are the compact non-mutating body-change publication proof rite. The command verifies latest Bifrost intent/publication/GitHub receipt keys through narrow CultMesh loaders and now emits follow-on commands for swarm overview, tool directory, and wrapper Bifrost publication readback. The wrapper supplies explicit proof defaults for target repo, changed path, verification/review receipts, credit subject, ledger id, Hands PR receipt id, and publication URL, then writes Bifrost intent, Bifrost publication receipt, and GitHub publication receipt with `privateStateExposed=false`. Verified: direct proof and wrapper proof both returned `status=ok`, and wrapper artifact `local-20260618-072118-704-3c5ae3da` carried the command hints. - `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` are the compact read-only Bifrost ledger sight rite. The command reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt through narrow CultMesh loaders, then returns five TUI rows when both chains exist. TUI rows include `public=` and `private=false`, and wrapper proof `local-20260618-205618-438-856f3a55` prints all five rows in `ledgerRows`: body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt. Verified: source smoke and live wrapper both returned `status=ok`, `publicationChainCount=3`, `collaborationChainCount=2`, `rowCount=5`, and `privateStateExposed=false`. -- `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` are the compact latest-witness directory over local Verse. The command indexes typed projections for operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA without exposing raw payloads or private worker context. It treats sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as operator attention instead of private-state exposure, routes cluster lifecycle wounds to `cluster-service-execution-audit`, preserves `service-execution-audit` for single-service receipts, and exposes the runbook witnesses as separate display-only `cluster-service-execution-runbook` and `service-execution-runbook` rows. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and renders service lifecycle routes as `service-id::action` so compact rows name the owning lifecycle action without exposing raw audit payloads. Compact TUI rows append `followUp=`, and wrapper proof `local-20260618-173902-856-e45c0da8` printed `attention=2` plus the two active `attentionRoutes`: cluster service audit and single-service audit. `missingRowCount` remains as a compatibility alias for absent witnesses, not a fault signal. +- `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` are the compact latest-witness directory over local Verse. The command indexes typed projections for operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA without exposing raw payloads or private worker context. It treats sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as operator attention instead of private-state exposure, routes cluster lifecycle wounds to `cluster-service-execution-audit`, preserves `service-execution-audit` for single-service receipts, and exposes the runbook witnesses as separate display-only `cluster-service-execution-runbook` and `service-execution-runbook` rows. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and renders service lifecycle routes as `service-id::action` so compact rows name the owning lifecycle action without exposing raw audit payloads. Compact TUI rows append `followUp=`, artifact status, and SHA-256; wrapper proof `local-20260618-205920-451-383b0da7` printed all seventeen rows in `receiptRows`, including missing Hands/role/work-loop gates, Bifrost/Imagination witnesses, scheduler follow-up, runbook hashes, and service lifecycle attention. `missingRowCount` remains as a compatibility alias for absent witnesses, not a fault signal. - Public doctrine source `https://gamecult.org/Blog/purge-the-heretek-from-our-daemonic-swarm` sharpens the current swarm audit: Odin sees but must not own, Gjallar-like surface publishers must produce their own witnesses, Idunn-like ledgers must advance instead of freezing old wounds, and Bifrost is the ledger gate for cross-repo purification receipts rather than transcript archaeology. - `tools/epiphany_local_run.ps1` now stamps local run ids as `local-YYYYMMDD-HHMMSS-fff-` instead of second-resolution ids, so concurrent operator rites get separate artifact roots and run receipts. Verified: `collaboration-feedback` and `bifrost-publication` launched in parallel in the same second and completed as `local-20260618-064814-171-dc0b8dd9` and `local-20260618-064814-149-2946d675`. - `epiphany-verse-query tool-directory` and `tools/epiphany_local_run.ps1 -Mode tool-directory` are the compact read-only daemon tool directory. The report reads the same local Verse capability records used by `invoke-tool`, annotates them with host daemon readiness, and returns TUI rows plus direct `invocationCommand` and wrapper `wrapperInvocationCommand=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId -ToolRequestingAgentId -ToolRequestingClusterId `. TUI rows expose the global-tool contract directly, e.g. `READY | Hands | repo-action | submitHandsActionIntent | epiphany.cluster.hands.tool.repo-action | eve://epiphany/hands | allAgents=true | receipt=true | private=false`. Verified: fresh proof store returned sixteen globally available, receipt-gated, private-state-sealed tools with `hostReadyCount=16`, `hostAttentionCount=0`; smoke source-proves the compact Hands contract row and command hints; wrapper proof `local-20260618-181658-927-d351e9bb` printed all sixteen rows in the one-line `toolRows` summary, including Hands `repo-action` and Soul `verify`, with `privateStateExposed=False`. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 42a2aea2dc58d64675779b31c25631e8f7ad8ebb..43364022bb490f88bfd78779ff224569f20b4d5e 100644 GIT binary patch delta 333 zcmX|(FHgf@5Qpg>1R-0NEOTSIWJnsijt!U~3_-vSLvXkD*xsalTl!wtAP{5;2oz#@ z1%i(N0f9sE1<+VDAAuHuxLodc&+qwssNFo)o*PEha|f<7K`u zZx^OfOu4PMg=z1t>h~YBvi!$uyffBL=Ogk-Bp0z=?$`}*8`Lz; zizbF4D4LOEA_=)*NlHOl3WN-Wq%xc8`zx#AL_#ScCon-KwE+j>JdG7^9!EG45?RFm ug5s^OTUK4~e_JaW+g81)7&%j<0A&CtM?=T!^D`{GHz_1%G5rUi4llFH1qbUOe}WX E0H%``, candidate action refs, consensus packet ref, adoption gate, and `private=false`; wrapper proof `local-20260618-205618-298-a6889ec7` now prints both rows in `feedbackRows`, including Persona public discussion feedback routed to Imagination consensus discovery. - `epiphany-verse-query bifrost-publication` and `tools/epiphany_local_run.ps1 -Mode bifrost-publication` provide the non-mutating Bifrost body-change publication proof path. It writes Bifrost intent, Bifrost publication receipt, and GitHub publication receipt documents from explicit review/verification/credit inputs, verifies latest keys through narrow CultMesh loaders, publishes follow-on command hints for swarm overview, tool directory, and wrapper Bifrost publication readback, and exposes no private state. - `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` provide the compact Bifrost ledger sight organ. It reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, collaboration feedback, and Imagination consensus receipt through narrow CultMesh loaders, returns five agent-friendly TUI rows when both chains exist, publishes follow-on command hints for swarm overview, tool directory, collaboration feedback, Bifrost publication, and Bifrost ledger readback, and exposes no private state. Compact ledger rows carry `public=` plus `private=false`, so body-change/public-feedback proof is inspectable without opening raw local Verse payloads; wrapper proof `local-20260618-205618-438-856f3a55` now prints all five rows in `ledgerRows`, covering body-change intent, Bifrost publication receipt, GitHub receipt, collaboration feedback, and Imagination consensus receipt. - - `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` provide the compact latest-witness directory over local Verse. It indexes operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA witness families from typed local Verse projections; returns agent-friendly `OK`/`ABSENT`/`ATTN` TUI rows with owner, family, status, route, latest id, follow-up command, `presentRowCount`, and `absentRowCount`; preserves `missingRowCount` as compatibility for absent witnesses; flags sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as attention without exposing receipt payloads; routes cluster service lifecycle receipts to `cluster-service-execution-audit`, single-service receipts to `service-execution-audit`, the cluster execution-runbook witness to `cluster-service-execution-runbook`, and the single-service execution-runbook witness to `service-execution-runbook`; and exposes no private state or receipt payload previews. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and exposes `service-id::action` route values such as `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit`, so agents can see the owning lifecycle action without opening raw audit JSON. Compact receipt TUI rows now append `followUp=`, and wrapper proof `local-20260618-173902-856-e45c0da8` prints `attentionRoutes=cluster-service-lifecycle:incomplete:epiphany-cluster-daemon-services::cluster-windows-service-execution-audit->tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit; service-lifecycle:incomplete:epiphany-daemon-supervisor-service::windows-service-execution-audit->tools/epiphany_local_run.ps1 -Mode service-execution-audit`, matching `attention=2`. It also exposes `cluster-service-execution-runbook` plus `service-execution-runbook` as display-only rows, so newer harmless planned/runbook lifecycle receipts cannot hide the active seven-service cluster wound. + - `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` provide the compact latest-witness directory over local Verse. It indexes operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA witness families from typed local Verse projections; returns agent-friendly `OK`/`ABSENT`/`ATTN` TUI rows with owner, family, status, route, latest id, follow-up command, `presentRowCount`, and `absentRowCount`; preserves `missingRowCount` as compatibility for absent witnesses; flags sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as attention without exposing receipt payloads; routes cluster service lifecycle receipts to `cluster-service-execution-audit`, single-service receipts to `service-execution-audit`, the cluster execution-runbook witness to `cluster-service-execution-runbook`, and the single-service execution-runbook witness to `service-execution-runbook`; and exposes no private state or receipt payload previews. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and exposes `service-id::action` route values such as `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit`, so agents can see the owning lifecycle action without opening raw audit JSON. Compact receipt TUI rows append `followUp=`, artifact status, and SHA-256; wrapper proof `local-20260618-205920-451-383b0da7` now prints all seventeen compact rows in `receiptRows`, including missing Hands/role/work-loop gates, runbook hashes, scheduler follow-up, Bifrost/Imagination witnesses, and the active service lifecycle attention rows. It also exposes `cluster-service-execution-runbook` plus `service-execution-runbook` as display-only rows, so newer harmless planned/runbook lifecycle receipts cannot hide the active seven-service cluster wound. - `tools/epiphany_local_run.ps1 -Mode service-tick` is the wrapper-owned daemon scheduler pulse rite. It runs `epiphany-daemon-supervisor tick` through the same local Verse store, operator run intent/receipt, agent-state SoA refresh, and swarm-brake preflight as other service lifecycle modes, but leaves restart authority inside durable daemon restart policies. The receipt directory scheduler row now follows up with `tools/epiphany_local_run.ps1 -Mode service-tick` instead of passive service status. Proof seeded one disabled Persona restart policy as inert policy metadata, then the wrapper wrote `daemon-scheduler-receipt-epiphany-daemon-supervisor-0` with `status=tickComplete`, `outcomeCount=1`, `skippedCount=1`, `restartedCount=0`, `refusedCount=0`, and `privateStateExposed=false`; the follow-up receipt-directory proof reported the scheduler row as present with route `*`, follow-up command `service-tick`, and no private-state exposure. - `epiphany-cluster-daemon` is the first real per-cluster daemon heartbeat body. It runs as a narrow Rust binary parameterized by daemon id, publishes typed `epiphany.cultmesh.daemon_status.v0` heartbeats into the shared local Verse, can run once or loop, and exposes no private state. Durable restart policies for Self, Hands, Persona, Imagination, Eyes, Modeling, and Soul now invoke `epiphany-cluster-daemon heartbeat`, not the generic query/debug writer. A degraded proof showed `service-tick` invoking all seven daemon bodies through the supervisor and restoring ready liveness with sealed scheduler/poke receipts; a fresh tick no-ops when all heartbeats are current. `epiphany-daemon-supervisor cluster-service-runbook` and wrapper `-Mode cluster-service-runbook` write a non-mutating service runbook plus `daemon_service_lifecycle` receipt for all seven organ daemon `epiphany-cluster-daemon serve` commands. `epiphany-daemon-supervisor cluster-service-install-plan` and wrapper `-Mode cluster-service-install-plan` write a non-mutating Windows install script plus lifecycle receipt for seven distinct per-organ Windows services. Wrapper `-Mode cluster-service-install-execute` requests execution through the same typed path and, in non-elevated shells, writes `execution-refused-not-elevated` with `executed=false` instead of mutating services. `epiphany-daemon-supervisor cluster-service-audit` and wrapper `-Mode cluster-service-audit` read Windows service-manager state for those seven expected service names, writing an incomplete audit receipt when they are missing. `epiphany-daemon-supervisor cluster-service-start`/`cluster-service-stop` and wrapper `-Mode cluster-service-start-plan`, `cluster-service-stop-plan`, `cluster-service-start-execute`, and `cluster-service-stop-execute` record cluster lifecycle receipts for all seven services: plan modes emit seven `*-planned` rows without mutation, and explicit execute modes refuse as `execution-refused-not-elevated` with seven refused rows when the shell lacks service authority. `cluster-service-execution-runbook` writes an admin-gated wrapper sequence for cluster-native readiness, cluster install, cluster start, cluster audit, cluster stop, and final cluster audit; the artifact now uses `Invoke-EpiphanyRunbookStep` to reset `$LASTEXITCODE`, catch thrown/nonzero failures, continue gathering receipts after a failed step, and always runs `cluster-service-execution-audit` from `finally`; the wrapper calls `epiphany-daemon-supervisor cluster-service-execution-runbook` after artifact generation, so the runbook itself has a typed `daemon_service_lifecycle` receipt with action `cluster-windows-service-execution-runbook`, status `written`, artifact path, final-audit metadata, step-failure policy metadata, and `privateStateExposed=false`. Its wrapper JSON and typed receipt args expose `runbookTryModes`, `finalAuditMode=cluster-service-execution-audit`, `finalAuditRunsInFinally=true`, `stepFailurePolicy=continue-after-step-failure`, `continueAfterStepFailure=true`, `nonzeroExitFailsStep=true`, and `exitsNonzeroAfterFinalAudit=true`, and the compact wrapper line prints those same aftercare facts. Latest proof `local-20260618-161632-376-436227d8` generated and parsed the robust cluster artifact; live overview `local-20260618-161718-889-7cebdcb1` points the elevated operator row at that artifact. `cluster-service-execution-audit` first requires the sealed `cluster-windows-service-execution-runbook` receipt, then checks the latest cluster-native readiness plus cluster install/start/audit/stop lifecycle receipts by receipt timestamp and reports `complete` only when the runbook and elevated effect receipts are sealed and successful. Audit check rows retain lifecycle `operatorArtifactRef`; wrapper summaries now print OK runbook witnesses with SHA-256 before compact failed-check anatomy. Live proof `local-20260618-170322-330-e6cb2117` printed `cluster-windows-service-execution-runbook=...\epiphany-cluster-daemon-services-execution-runbook.ps1:sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0` and the expected five failed checks without mutating Windows services. - `epiphany-verse-query restart-policy-directory` and `tools/epiphany_local_run.ps1 -Mode service-policy-directory` provide the compact scheduler coverage sight organ. It reads daemon topology/status plus durable `epiphany.cultmesh.daemon_restart_policy.v0` rows through a narrow CultMesh restart-policy directory loader, reports each daemon as `ENABLED`, `DISABLED`, or `MISSING`, treats disabled and missing policies as recovery attention, returns covered/enabled/disabled/missing/attention counts, and publishes explicit policy-write plus scheduler-tick follow-up commands without creating or mutating policies. Compact TUI rows now expose cooldown, reconcile interval, heartbeat stale threshold, failure count, last result, `followUp=`, and `private=false`; wrapper proof `local-20260618-175008-830-e470a387` printed all seven faculties as `enabled` with `last=ready`, `reconcile=60s`, `stale=300s`, and `tools/epiphany_local_run.ps1 -Mode service-tick` follow-up. Direct and wrapper proof now report seven daemons, seven covered policies, seven enabled policies, zero disabled, zero missing, zero attention, `status=ok`, and `privateStateExposed=false`. This is a real daemon heartbeat body with non-mutating per-organ launch and install artifacts, but not yet executed installed per-organ OS services. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index 04a76fd9..3a8cb095 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -1691,6 +1691,10 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { } elseif ($Mode -eq "receipt-directory") { $artifactHashes = "none" $attentionRoutes = "none" + $receiptRows = "none" + if ($null -ne $result.tuiRows -and $result.tuiRows.Count -gt 0) { + $receiptRows = ($result.tuiRows -join "; ") + } if ($null -ne $result.rows -and $result.rows.Count -gt 0) { $presentArtifactHashes = @($result.rows | Where-Object { $_.artifactStatus -eq "present" } | ForEach-Object { $artifactSha256 = $_.artifactSha256 @@ -1709,7 +1713,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { $attentionRoutes = ($attentionRouteRows -join "; ") } } - Write-Host "Receipt directory: status=$($result.status), rows=$($result.rowCount), present=$($result.presentRowCount), absent=$($result.absentRowCount), attention=$($result.attentionRowCount), attentionRoutes=$attentionRoutes, artifactNone=$($result.artifactNoneCount), artifactExternalRef=$($result.artifactExternalRefCount), artifactPresent=$($result.artifactPresentCount), artifactMissing=$($result.artifactMissingCount), artifactHashes=$artifactHashes, privateStateExposed=$($result.privateStateExposed)" + Write-Host "Receipt directory: status=$($result.status), rows=$($result.rowCount), present=$($result.presentRowCount), absent=$($result.absentRowCount), attention=$($result.attentionRowCount), attentionRoutes=$attentionRoutes, receiptRows=$receiptRows, artifactNone=$($result.artifactNoneCount), artifactExternalRef=$($result.artifactExternalRefCount), artifactPresent=$($result.artifactPresentCount), artifactMissing=$($result.artifactMissingCount), artifactHashes=$artifactHashes, privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "tool-directory") { $toolRows = "none" if ($null -ne $result.tuiRows -and $result.tuiRows.Count -gt 0) {