From 76cfe9b6b21f673b4e9c07dd7a8db7f9920ba3b7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 18 Jun 2026 23:39:57 +0100 Subject: [PATCH] Advertise service health tool --- epiphany-core/src/bin/epiphany-verse-query.rs | 16 ++++++++++++ epiphany-core/src/cultmesh_integration.rs | 24 ++++++++++++++++++ notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 281475 -> 282141 bytes state/map.yaml | 2 +- 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 9dd813fc..dba36aa5 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -1488,6 +1488,22 @@ fn main() -> Result<()> { "local Verse query smoke lost compact Hands repo-action tool contract row" ); } + if !tool_report.tui_rows.iter().any(|row| { + row.contains("READY") + && row.contains("Self") + && row.contains("service-health") + && row.contains("epiphany.cluster.self.tool.service-health") + && row.contains("authority=daemon.service_lifecycle") + && row.contains("input=epiphany.cultmesh.daemon_service_lifecycle_query") + && row.contains("receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt") + && row.contains("allAgents=true") + && row.contains("receipt=true") + && row.contains("private=false") + }) { + anyhow::bail!( + "local Verse query smoke lost compact Self service-health tool contract row" + ); + } if DIRECT_INVOKE_TOOL_COMMAND != "epiphany-verse-query invoke-tool --capability-id " || !WRAPPER_INVOKE_TOOL_COMMAND.contains("-Mode tool-invoke") diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index 16a4fb85..73e8f599 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -5102,6 +5102,17 @@ pub fn epiphany_cultmesh_daemon_tool_capabilities() -> Vec( "epiphany.cluster.persona.tool.status", )?; + let self_service_health = node.get_required::( + "epiphany.cluster.self.tool.service-health", + )?; let hands_action = node.get_required::( "epiphany.cluster.hands.tool.repo-action", )?; @@ -6719,6 +6733,7 @@ mod tests { for capability in [ persona_status.clone(), + self_service_health.clone(), hands_action.clone(), soul_verify.clone(), ] { @@ -6730,6 +6745,15 @@ mod tests { assert_eq!(hands_action.authority_gate, "hands"); assert_eq!(soul_verify.authority_gate, "soul"); assert_eq!(persona_status.authority_gate, "none"); + assert_eq!(self_service_health.authority_gate, "daemon.service_lifecycle"); + assert_eq!( + self_service_health.input_contract_type, + "epiphany.cultmesh.daemon_service_lifecycle_query" + ); + assert_eq!( + self_service_health.receipt_contract_type, + EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE + ); assert!( hands_action .notes diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index af48ece2..216a9fca 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -78,6 +78,7 @@ remembers doctrine; the branch remembers the blade. - 2026-06-18: Direct status/reconcile/readiness summaries now print the next wrapper route beside the sealed receipt. `service-status` proof `local-20260618-231732-162-b1abd238` points missing supervisor-service status to `service-reconcile` plus `service-execution-audit`; `service-reconcile` proof `local-20260618-231754-575-25cc8a48` points the missing service to `service-install-plan` plus `service-execution-audit`; `service-execution-readiness` proof `local-20260618-231825-381-8d28f3a9` points `not-elevated` to `service-execution-runbook` plus `service-execution-audit`; and `cluster-service-execution-readiness` proof `local-20260618-231849-435-65651fe1` points the seven-service `not-elevated` cluster wound to `cluster-service-execution-runbook` plus `cluster-service-execution-audit`. - 2026-06-18: Direct launch runbook and cluster-audit summaries now share the same artifact/follow-up ergonomics as execution runbooks. `service-runbook` proof `local-20260618-232133-314-4e55120e` printed hash `85a956f768e584a9d098f13a9bf03fc3560915821a2ae7eaab94889dd9ecda85`, `followUp=tools/epiphany_local_run.ps1 -Mode service-launch`, and `aftercare=tools/epiphany_local_run.ps1 -Mode service-status`; `cluster-service-runbook` proof `local-20260618-232146-541-982dd60b` printed hash `40616423a9210101486949d07291bf795175579a39e99de5e5a759f8e0d7a78c`, `followUp=tools/epiphany_local_run.ps1 -Mode service-tick`, and `aftercare=tools/epiphany_local_run.ps1 -Mode swarm-overview`; `cluster-service-audit` proof `local-20260618-232200-992-b842ae01` printed seven missing services with `followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-install-plan` plus `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`. - 2026-06-18: Wrapper `service-plan` and `service-launch` now expose the native daemon-supervisor service lifecycle surfaces that handoff state already named. `service-plan` proof `local-20260618-232839-812-8dfa0c9e` printed the planned `epiphany-daemon-supervisor serve` command with `--max-iterations 1`, `followUp=service-runbook`, and `aftercare=service-status`. The first bounded `service-launch` proof exposed parent/child JSON contamination; `epiphany-daemon-supervisor service-launch` now silences child stdout/stderr so the parent lifecycle receipt owns stdout. Clean bounded proof `local-20260618-232935-349-7e3901c8` completed with `exitCode=0`, `followUp=service-status`, `aftercare=service-tick`, and `privateStateExposed=false`; follow-up runbook proof `local-20260618-233008-988-51fd6a36` confirmed `followUp=tools/epiphany_local_run.ps1 -Mode service-launch` is now a valid wrapper route. +- 2026-06-18: The daemon tool directory now advertises Self `service-health` as a globally available, receipt-gated, private-state-sealed CultMesh capability over the daemon service lifecycle contract. Source smoke reports `daemonTools=17`, and live wrapper proof `local-20260618-233719-320-e38a5549` printed `READY | Self | service-health | readServiceLifecycleStatus | epiphany.cluster.self.tool.service-health | eve://epiphany/self | authority=daemon.service_lifecycle | input=epiphany.cultmesh.daemon_service_lifecycle_query | receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt | allAgents=true | receipt=true | private=false`. - 2026-06-18: Direct install plan/execute summaries now print install artifact hashes and receipt-producing follow-up wrappers. Cluster install plan proof `local-20260618-230937-335-71c4fdaa` and non-elevated execute proof `local-20260618-230937-313-cb288388` printed `artifactSha256=c6b697e173eb319073da341fc90c2963bcd6bee63d804349205b6309c88df764` plus `followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-install-execute`; supervisor-service plan proof `local-20260618-230937-331-2e34b579` and non-elevated execute proof `local-20260618-231007-138-1dacc61b` printed `artifactSha256=7760943f618d13425f034226e0c5913f971d05f395b3abc12ae386acd2aaf56f` plus `followUp=tools/epiphany_local_run.ps1 -Mode service-install-execute`. - 2026-06-18: The `swarm-overview`/`swarm-triage` action queue now carries aggregate sealed service-execution wound counts on the elevated service-control row as `serviceExecutionFailedCheckCount` and `serviceExecutionMissingCheckCount`, with compact wrapper/TUI rows rendering `failedChecks=` and `missingChecks=`. Non-mutating readback rows keep both counts at zero. Live proofs `local-20260618-220534-199-d8e90287` and `local-20260618-220534-205-59582da5` printed the priority-50 `service-execution-authority` row with `failedChecks=11`, `missingChecks=6`, `artifactStatus=present`, the sealed cluster runbook SHA-256, and `privateStateExposed=false`. - 2026-06-18: The elevated service-control action queue now emits one `service-execution-authority` row per sealed runbook witness instead of attaching all failed checks to the recommended cluster artifact. Source smoke seeds both cluster and single-service runbook witnesses and proves separate scoped rows. Live overview proof `local-20260618-221339-826-b1981064` and triage proof `local-20260618-221340-099-4b4baba8` printed priority 50 for `cluster-service-execution-runbook` with `failedChecks=5`, `missingChecks=0`, SHA-256 `3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, and aftercare `cluster-service-execution-audit`; and priority 51 for `service-execution-runbook` with `failedChecks=6`, `missingChecks=6`, SHA-256 `b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`, and aftercare `service-execution-audit`, with no private state exposure. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index fe8f394c949579b978f4fc612fce5065f441bd5c..6335fc9da0724fe290c0cedae53dd10ed7155d1c 100644 GIT binary patch delta 470 zcmZvYziJyn5XOCfz~Ca_#KA}yJV{7l&c;=VfeoJhTqKX=7;y2pBvsruOIi`eqRe; zUw?V#U3%Wn`NDs<@I6Cnz6^F!MWs}R^4svC%hrSV5U|MMtU{GL$&3k@oRr86C^@qqA$)$4riXDaN|R1R z=@A|r?DwElyjVs34|T>@ypab delta 48 zcmbO`N3eOi;08%XE<-C*!>D5nEM5tll^F{e880`, and `private=false`; wrapper proof `local-20260618-213147-804-7dec3346` prints the Rust-owned `tuiRows` directly for all seven faculties as `ENABLED` with `last=ready`, `cooldown=30s`, `reconcile=60s`, `stale=300s`, `followUp=tools/epiphany_local_run.ps1 -Mode service-tick`, and `private=false`, instead of rebuilding policy text in PowerShell. 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. - `https://gamecult.org/Blog/purge-the-heretek-from-our-daemonic-swarm` is a public doctrine receipt for the Perfect Machine audit pressure: organs must not borrow each other's crowns, witnesses need owning mouths, surfaces reflect rather than rule, and cross-repo purification needs Bifrost-shaped ledger evidence instead of relying on recoverable transcripts or commit trails alone. - `tools/epiphany_local_run.ps1` now uses collision-resistant local run ids (`local-YYYYMMDD-HHMMSS-fff-`) for artifact roots and operator run receipts. Same-second parallel compact wrapper proofs for `collaboration-feedback` and `bifrost-publication` produce separate artifact drawers and both complete, so operator rites no longer collide on second-resolution run ids. - - `epiphany-verse-query tool-directory` and `tools/epiphany_local_run.ps1 -Mode tool-directory` provide the compact daemon tool sight organ over the same local Verse capability records used by `invoke-tool`. It returns sixteen globally available daemon-hosted capabilities, host readiness counts, direct `invocationCommand`, wrapper `wrapperInvocationCommand=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId -ToolRequestingAgentId -ToolRequestingClusterId `, and the invariants `availableToAllAgents=true`, `requiresReceipt=true`, `privateStateExposed=false`. Agent-friendly TUI rows now carry the same contract bits, authority gate, and advertised payload/review contract types, e.g. `READY | Hands | repo-action | submitHandsActionIntent | epiphany.cluster.hands.tool.repo-action | eve://epiphany/hands | authority=hands | input=epiphany.hands.action_intent | receiptType=epiphany.hands.action_review | allAgents=true | receipt=true | private=false`; wrapper proof `local-20260618-223557-260-7acb1cd1` prints all sixteen rows in the one-line `toolRows` summary with authority gates and contract types, including `input=epiphany.cultmesh.eve_connection_intent` / `receiptType=epiphany.cultmesh.eve_connection_receipt` for Eve connection tools, `input=epiphany.hands.action_intent` / `receiptType=epiphany.hands.action_review` for Hands `repo-action`, and `input=epiphany.soul.verification_request` / `receiptType=epiphany.soul.verdict_receipt` for Soul `verify`. `invoke-tool` runs through a smaller extracted command handler and emits compact invocation rows with requester/host display names, requesting/host private Verses and Eve surfaces, host daemon id, tool operation, capability id, intent id, receipt id/status, authority gate, `allAgents=true`, `receiptRequired=true`, and `private=false`; live wrapper proof `local-20260618-181426-520-e3b051b8` routed Persona to Hands `repo-action` and printed the full compact row. + - `epiphany-verse-query tool-directory` and `tools/epiphany_local_run.ps1 -Mode tool-directory` provide the compact daemon tool sight organ over the same local Verse capability records used by `invoke-tool`. It returns seventeen globally available daemon-hosted capabilities, host readiness counts, direct `invocationCommand`, wrapper `wrapperInvocationCommand=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId -ToolRequestingAgentId -ToolRequestingClusterId `, and the invariants `availableToAllAgents=true`, `requiresReceipt=true`, `privateStateExposed=false`. Agent-friendly TUI rows now carry the same contract bits, authority gate, and advertised payload/review contract types, e.g. `READY | Hands | repo-action | submitHandsActionIntent | epiphany.cluster.hands.tool.repo-action | eve://epiphany/hands | authority=hands | input=epiphany.hands.action_intent | receiptType=epiphany.hands.action_review | allAgents=true | receipt=true | private=false`; wrapper proof `local-20260618-233719-320-e38a5549` prints all seventeen rows in the one-line `toolRows` summary, including Self `service-health` as `readServiceLifecycleStatus` with `authority=daemon.service_lifecycle`, `input=epiphany.cultmesh.daemon_service_lifecycle_query`, and `receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt`, plus Eve connection tools, Hands `repo-action`, and Soul `verify`. `invoke-tool` runs through a smaller extracted command handler and emits compact invocation rows with requester/host display names, requesting/host private Verses and Eve surfaces, host daemon id, tool operation, capability id, intent id, receipt id/status, authority gate, `allAgents=true`, `receiptRequired=true`, and `private=false`; live wrapper proof `local-20260618-181426-520-e3b051b8` routed Persona to Hands `repo-action` and printed the full compact row. - `epiphany-verse-query cluster-topology` and `tools/epiphany_local_run.ps1 -Mode cluster-topology` provide the compact cluster/body/private-Verse/daemon sight organ over local Verse topology rows through a narrow CultMesh loader. The report returns seven clusters, seven private Verse ids, seven daemon ids, one public Persona discussion cluster, agent-friendly TUI rows such as `PUBLIC | Persona | cluster=epiphany.cluster.persona | role=Persona | privateVerse=epiphany.cluster.persona.private | body=repo:E:/Projects/EpiphanyAgent | bodyKind=repository | daemon=epiphany-daemon-persona | surface=eve://epiphany/persona`, and `privateStateExposed=false`; `epiphany-verse-query smoke` source-proves the compact topology invariants, and wrapper proof `local-20260618-225347-337-cea74491` prints all seven standing-faculty rows in the one-line `topologyRows` summary. - `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` provide the one-command compact global-agent sight rite. It composes narrow cluster topology, liveness, Odin/Eve surface, daemon tool, restart-policy coverage, receipt-directory service-lifecycle attention, and the shared core service-execution audit report without full local Verse serialization, returning seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, sixteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/invoke/Bifrost-ledger/restart-policy coverage, wrapper command hints for overview/receipts/poke/connect/tool-invoke/Bifrost-ledger/service-policy-directory/service-execution-audit, sealed `toolHostAttentionRows`/TUI rows for blocked daemon-hosted capabilities, sealed `serviceLifecycleAttentionRows`/TUI rows copied from the receipt directory, `serviceExecutionFailedCheckRows`/TUI rows naming failed sealed execution checks, explicit `serviceLifecycleRecommended*` fields so service-manager follow-up remains visible even when global `recommendedWrapperMode` is occupied by liveness or policy, and ordered `swarmActionRows`/TUI rows with authority gates, effect class, wrapper command, mutation flag, elevation flag, sealed `operatorArtifactRef`, `operatorArtifactStatus`, `operatorArtifactSha256`, `operatorArtifactExecutionCommand`, `operatorAftercareCommand`, and `completionAuditWrapper*` for operator-runbook rows. Compact action TUI rows now also render `aftercare=`, so the Rust-owned row itself names the post-run audit command instead of relying on wrapper compatibility summaries. Current live overview `local-20260618-224500-790-1cd9f63f` returns `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `recommendedWrapperMode=cluster-service-execution-audit`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, `toolHostAttentionCount=0`, `serviceLifecycleAttentionCount=2`, `swarmActionCount=4`, non-mutating service lifecycle readback rows with `aftercare=none`, and elevated service authority rows with `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit` / `aftercare=tools/epiphany_local_run.ps1 -Mode service-execution-audit`, present runbook artifacts, SHA-256 provenance, failed/missing check counts, and `privateStateExposed=false`. If a local runbook artifact is missing, source smoke proves the same row is demoted to `status=runbook-artifact-missing`, `wrapperMode=cluster-service-execution-runbook`, `effectClass=service-lifecycle-runbook-regeneration`, `operatorArtifactSha256=none`, `operatorArtifactExecutionCommand=none`, `operatorAftercareCommand=none`, `mutatesState=false`, and `requiresElevatedAuthority=false` instead of pretending elevated service authority is actionable. Degraded daemon overview still routes global recommendation to `swarm-poke-down` first while independent action rows preserve the liveness/tool-host duties; liveness action rows are explicitly mutating typed lifecycle pokes but do not require elevation, while service execution authority rows make the operator grant boundary visible. `epiphany-verse-query` defaults to the shared `.epiphany-run\cultmesh\local-verse.ccmp` store for live query/readback, while bare `epiphany-verse-query smoke` now uses a disposable `.epiphany-smoke\verse-query-default\local-verse.ccmp` fixture unless an explicit `--store` is provided. - `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` compose the compact swarm overview with the existing brake-aware daemon poke receipt writer. Triage pokes only daemon liveness attention; service-manager lifecycle wounds are reflected from overview as sealed `serviceLifecycleAttentionRows`/TUI rows, `serviceExecutionFailedCheckRows`/TUI rows, explicit `serviceLifecycleRecommended*` fields, and ordered `swarmActionRows`, but do not cause daemon poke receipts, while blocked daemon-hosted tools ride as sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised capabilities are unavailable because their host body is sick. Current live triage `local-20260618-150015-844-aba20563` returns `status=noop`, `overviewStatus=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `clusterCount=7`, `privateVerseCount=7`, `pokedDaemonCount=0`, `recommendedWrapperMode=cluster-service-execution-audit`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, `swarmActionCount=2`, the same sealed service readback plus operator-elevated runbook rows, including `operatorArtifactStatus=present`, `operatorArtifactRef=E:\Projects\EpiphanyAgent\.epiphany-run\local-20260618-132257-139-26213a29\epiphany-cluster-daemon-services-execution-runbook.ps1`, and `completionAuditWrapperCommand=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit` on the elevated row, empty daemon/tool-host attention arrays, `serviceLifecycleAttentionCount=2`, routes `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit` and `epiphany-daemon-supervisor-service::windows-service-execution-audit`, direct and wrapper command hints including `wrapperInvokeTool` and `wrapperBifrostLedger=tools/epiphany_local_run.ps1 -Mode bifrost-ledger`, and `privateStateExposed=false`; degraded Hands proof returns `status=ok`, `overviewStatus=attention`, topology and daemon TUI rows, blocked Hands-hosted tool rows, one sealed topology-aware poke receipt for `epiphany-daemon-hands` with `bodyDomain=repo:E:/Projects/EpiphanyAgent`, `privateVerseId=epiphany.cluster.hands.private`, `eveSurfaceId=eve://epiphany/hands`, `observedStatus=degraded`, `attentionDaemonIds=[epiphany-daemon-hands]`, `attentionToolHostDaemonIds=[epiphany-daemon-hands]`, and liveness/tool-host action rows with no private-state exposure. Source smoke `verse-query-service-execution-failed-checks-clean` proves a physical synthetic written runbook plus incomplete service audit receipts expose both service lifecycle readback and failed-check anatomy with no Windows service mutation.