From 89ae7fe6dccf6ef5723964181d8fcd1a9e37e352 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 19 Jun 2026 03:35:44 +0100 Subject: [PATCH] Surface swarm online tool hint --- epiphany-core/src/bin/epiphany-verse-query.rs | 10 ++++++++-- notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 296377 -> 296869 bytes state/map.yaml | 2 +- tools/epiphany_local_run.ps1 | 6 +++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 6b752a41..0ef8c23c 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -95,6 +95,7 @@ const WRAPPER_POKE_NON_READY_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode const DIRECT_INVOKE_TOOL_COMMAND: &str = "epiphany-verse-query invoke-tool --capability-id "; const WRAPPER_INVOKE_TOOL_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId -ToolRequestingAgentId -ToolRequestingClusterId "; +const WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId epiphany.cluster.self.tool.swarm-online-runbook -ToolRequestingAgentId -ToolRequestingClusterId "; const WRAPPER_CONNECT_EVE_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode eve-connect -EveTargetClusterId "; const WRAPPER_COLLABORATION_FEEDBACK_COMMAND: &str = @@ -753,7 +754,8 @@ fn run_cli() -> Result<()> { "bifrostLedger": "epiphany-verse-query bifrost-ledger", "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, "invokeTool": DIRECT_INVOKE_TOOL_COMMAND, - "wrapperInvokeTool": WRAPPER_INVOKE_TOOL_COMMAND + "wrapperInvokeTool": WRAPPER_INVOKE_TOOL_COMMAND, + "wrapperInvokeSwarmOnlineRunbookTool": WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND }); println!( "{}", @@ -1648,6 +1650,9 @@ fn run_cli() -> Result<()> { || !WRAPPER_RECEIPT_DIRECTORY_COMMAND.contains("-Mode receipt-directory") || !WRAPPER_GJALLAR_COMMAND.contains("-Mode gjallar") || !WRAPPER_SWARM_ONLINE_RUNBOOK_COMMAND.contains("-Mode swarm-online-runbook") + || !WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND.contains("-Mode tool-invoke") + || !WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND + .contains("-ToolCapabilityId epiphany.cluster.self.tool.swarm-online-runbook") || !WRAPPER_SERVICE_TICK_COMMAND.contains("-Mode service-tick") || !WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND .contains("-Mode service-policy-directory") @@ -4060,7 +4065,8 @@ impl SwarmTriageOutput { "bifrostLedger": "epiphany-verse-query bifrost-ledger", "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, "invokeTool": DIRECT_INVOKE_TOOL_COMMAND, - "wrapperInvokeTool": WRAPPER_INVOKE_TOOL_COMMAND + "wrapperInvokeTool": WRAPPER_INVOKE_TOOL_COMMAND, + "wrapperInvokeSwarmOnlineRunbookTool": WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND }), topology_tui_rows: report.topology_report.tui_rows, daemon_tui_rows: report.daemon_report.tui_rows, diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 4270ec26..1fce8e90 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -63,7 +63,7 @@ remembers doctrine; the branch remembers the blade. - `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 | authority=hands | input=epiphany.hands.action_intent | receiptType=epiphany.hands.action_review | allAgents=true | receipt=true | private=false`. Verified: fresh proof store returned eighteen globally available, receipt-gated, private-state-sealed tools with no host attention; smoke source-proves the compact Hands, Self `service-health`, Self `swarm-online-runbook`, and status readback rows plus command hints; wrapper proof `local-20260619-032243-566-545b148c` printed all eighteen rows in the one-line `toolRows` summary with authority gates and advertised input/receipt contract types, including status tools, Self `service-health`, Self `swarm-online-runbook`, Hands `repo-action`, and Soul `verify`, with `privateStateExposed=False`. - 2026-06-18: Tool-directory TUI rows now render the advertised capability `authorityGate` as `authority=`, matching the JSON surface and invocation receipt row. Source smoke guards the Hands `repo-action` row with `authority=hands`; live wrapper proof `local-20260618-223032-345-74d9bdb2` printed all sixteen tool rows with authority gates, including `authority=imagination.consensus_discovery` for Eve connection tools, `authority=hands` for Hands repo-action, `authority=soul` for Soul verify, and `authority=none` for read-only status. -- `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` are the one-command compact global-agent sight rite; `epiphany-verse-query gjallar` and `tools/epiphany_local_run.ps1 -Mode gjallar` are the first named Gjallar herald aliases over the same sealed whole-Verse report. The report 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; returns seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, eighteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/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, explicit `serviceLifecycleRecommended*` fields for service-manager follow-up, ordered `swarmActionRows`/TUI rows with Idunn/Epiphany lifecycle ownership on daemon/service physiology rows, authority/effect/wrapper-command/mutation/elevation metadata plus sealed `operatorArtifactRef`, `operatorArtifactStatus`, `operatorArtifactSha256`, `operatorArtifactExecutionCommand`, `operatorAftercareCommand`, and `completionAuditWrapper*` pointers for operator-runbook rows, `serviceExecutionFailedCheckRows`/TUI rows naming the failed sealed execution checks, and `privateStateExposed=false`; and avoids full local Verse serialization. Compact action TUI rows and wrapper `actionQueue` now include `owner=Idunn`, `hostedBody=Epiphany`, `aftercare=`, and scoped `failedChecks`/`missingChecks` on both service-lifecycle readback rows and elevated authority rows, so Gjallar remains sight while Idunn remains daemon keeper. Live `epiphany-verse-query` defaults to `.epiphany-run\cultmesh\local-verse.ccmp`, matching the wrapper and daemon supervisor; bare `epiphany-verse-query smoke` uses disposable `.epiphany-smoke\verse-query-default\local-verse.ccmp` unless an explicit `--store` is provided. The previous Windows debug stack-overflow wound is cut by running the CLI body on a larger worker-thread stack; broad `epiphany-verse-query smoke` now returns `status=ok` and `daemonTools=18`. Verified focused proof: live Gjallar artifact `local-20260619-012440-577-3f18a143` returned `recommended=swarm-online-runbook`, `serviceRecommended=cluster-service-execution-audit`, and four action rows whose non-mutating service readback plus elevated cluster/single-service runbook rows all carried `owner=Idunn`, `hostedBody=Epiphany`, aftercare, artifact hashes where present, failed/missing check counts, and `privateStateExposed=False`. +- `epiphany-verse-query swarm-overview` and `tools/epiphany_local_run.ps1 -Mode swarm-overview` are the one-command compact global-agent sight rite; `epiphany-verse-query gjallar` and `tools/epiphany_local_run.ps1 -Mode gjallar` are the first named Gjallar herald aliases over the same sealed whole-Verse report. The report 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; returns seven agents/daemons, seven clusters, seven private Verse ids, seven Eve surfaces, one public Persona discussion surface, eighteen globally invokable receipt-gated tools, command hints for topology/liveness/surfaces/tools/receipts/poke/connect/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, explicit `serviceLifecycleRecommended*` fields for service-manager follow-up, ordered `swarmActionRows`/TUI rows with Idunn/Epiphany lifecycle ownership on daemon/service physiology rows, authority/effect/wrapper-command/mutation/elevation metadata plus sealed `operatorArtifactRef`, `operatorArtifactStatus`, `operatorArtifactSha256`, `operatorArtifactExecutionCommand`, `operatorAftercareCommand`, and `completionAuditWrapper*` pointers for operator-runbook rows, `serviceExecutionFailedCheckRows`/TUI rows naming the failed sealed execution checks, and `privateStateExposed=false`; and avoids full local Verse serialization. Compact action TUI rows and wrapper `actionQueue` now include `owner=Idunn`, `hostedBody=Epiphany`, `aftercare=`, and scoped `failedChecks`/`missingChecks` on both service-lifecycle readback rows and elevated authority rows, so Gjallar remains sight while Idunn remains daemon keeper. Live `epiphany-verse-query` defaults to `.epiphany-run\cultmesh\local-verse.ccmp`, matching the wrapper and daemon supervisor; bare `epiphany-verse-query smoke` uses disposable `.epiphany-smoke\verse-query-default\local-verse.ccmp` unless an explicit `--store` is provided. The previous Windows debug stack-overflow wound is cut by running the CLI body on a larger worker-thread stack; broad `epiphany-verse-query smoke` now returns `status=ok` and `daemonTools=18`. Verified focused proof: live Gjallar artifact `local-20260619-033236-595-c0bc6a90` returned `recommended=swarm-online-runbook`, `serviceRecommended=cluster-service-execution-audit`, exact `swarmOnlineTool=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId epiphany.cluster.self.tool.swarm-online-runbook -ToolRequestingAgentId -ToolRequestingClusterId `, and four action rows whose non-mutating service readback plus elevated cluster/single-service runbook rows all carried `owner=Idunn`, `hostedBody=Epiphany`, aftercare, artifact hashes where present, failed/missing check counts, and `privateStateExposed=False`. - 2026-06-19: Service lifecycle readback follow-ups are now derived from the typed receipt action instead of hardcoding audit as the only compact action-row wrapper. `cluster-windows-service-execution-readiness` routes to `cluster-service-execution-readiness`; install/start/stop/status/reconcile route to their receipt-producing wrappers; audit still routes to audit. Source smoke now includes a synthetic readiness receipt guard, and live Gjallar proof `local-20260619-005713-795-96fd5370` still shows the current latest audit receipts as audit rows while failed-check anatomy preserves readiness/install/start/stop follow-ups, `owner=Idunn`, `hostedBody=Epiphany`, and `privateStateExposed=False`. - `epiphany-verse-query swarm-triage` and `tools/epiphany_local_run.ps1 -Mode swarm-triage` are the compact "see the swarm, then poke only if liveness attention exists" rite. It reads the compact overview first, writes no poke receipt when liveness is ready, routes non-ready daemons through the existing brake-aware `poke-down-daemons` receipt writer, carries overview's sealed service lifecycle attention rows, failed service-execution check rows, explicit service lifecycle recommendation, and ordered/effect-classified action queue with sealed runbook artifact and audit pointers without treating service-manager wounds as daemon-poke authority, and carries sealed `toolHostAttentionRows`/TUI rows so agents can see which advertised tools are blocked by a sick host daemon. Current overview routing means liveness-ready service execution attention recommends `swarm-online-runbook` globally while preserving `serviceRecommended=cluster-service-execution-audit` for readback. Live triage artifact `local-20260619-004523-003-a44ad06d` proved the no-poke path still prints Idunn/Epiphany ownership on service readback and elevated service-control action rows while `poked=0`. The older degraded Hands proof still routes through the topology-aware poke path and exposes blocked Hands tool-host rows plus liveness/tool-host action rows; source smoke `verse-query-completion-audit-row-smoke` proves the degraded single-poke triage path without a post-receipt full-context readback. - `swarmActionTuiRows` now carry the same audit and artifact-provenance visibility as JSON rows. Fresh source smoke `verse-query-action-tui-audit-smoke` and live artifact `local-20260618-164403-238-dba797ce` prove the compact rows include `artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0 | audit=cluster-service-execution-audit` on the `service-execution-authority` row and `artifact=none | sha256=none | audit=none` on the readback row, while service mutation still requires explicit elevated operator authority and private state remains sealed. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index a83e298f21f86cc2dbdc6d005936f4b5b5be17cf..7d2de122892bb18a29755435b96306efc05dd658 100644 GIT binary patch delta 427 zcmYL_ze@u#6vw^x7IhP(9RwfP(H_;(VyhOUpmY*{El#F)@7idZv`Nm|K?Ey0bWo6T zvx9rVL0lZ2{a5raFgXQ>knrC3^L_7|x6$15{oEw$%oa=4LizY(%DugQS#o-g^F17= z?#3y{9DAo<$0;{Aj34&Wvon>$!fG`k9-lH<=RH2TbTbVu`k*2i5+4=d1@SegK9QYW z&M3!2AsA48E_|Y?;LxUALntKZHbNtaxG51Hh%l_ildn{+q79I@z!^f`(sj}$P0FYq zGy=db?Hc{S^I4=cN>3pRJ4&8wRK?h9AW2_Fh(SFr4S)7lQCWxrKjW18`s?` wt`^JrQl*sl3r)XFDg`4m;W0>}C;!l=x}7+2RLYDZ!C)C|7&~J*Cfn)7A3Ls=asU7T delta 49 zcmZ45FSN5;XoCbJw~@J(p<&c929}m-o0S<085ut|Pi1PK%ESo7AewpmR3;XcW&n+e B4`KiS diff --git a/state/map.yaml b/state/map.yaml index 82e6f9da..bc04f4b7 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -620,7 +620,7 @@ current_status: - `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 eighteen 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-20260619-032243-566-545b148c` prints all eighteen rows in the one-line `toolRows` summary, including Self `service-health` as `readServiceLifecycleStatus` and Self `swarm-online-runbook` as `prepareSwarmOnlineRunbook`, both under `authority=daemon.service_lifecycle` with private-state-sealed lifecycle receipt contracts, 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`; status invocation embeds `daemonStatusReadback` with compact topology/liveness/tool-count fields, Eve connection invocation embeds `eveConnectionReadback` with compact CultMesh surface routing and collaboration commands, service-health invocation embeds `serviceHealthReadback` with Idunn lifecycle attention/action/failed-check rows plus swarm-online preflight proof, and swarm-online-runbook invocation embeds `swarmOnlineRunbookReadback` with `ready-for-elevated-operator`, two present child runbooks, two verified hashes, zero missing artifacts, eleven failed checks, zero missing checks, and `operatorRequired=True`. This makes the Idunn handoff globally discoverable without opening full local Verse state or taking over Idunn's daemon-keeper role; live invocation proof `local-20260619-032244-273-acb3c6a4` returned `privateStateExposed=False`. - `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/swarm-online-runbook/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-20260619-001128-955-195f4e65` returns `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `recommendedWrapperMode=swarm-online-runbook`, `recommendedWrapperCommand=tools/epiphany_local_run.ps1 -Mode swarm-online-runbook`, `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`. `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now prints and stores the swarm-level elevated command for its generated Idunn-owned artifact, and the generated parent runbook verifies each child runbook artifact exists and matches its advertised SHA-256 before launching it elevated, then runs aftercare audits through the known wrapper `ScriptPath` plus explicit argument arrays instead of string evaluation. The operator sees the exact `Start-Process PowerShell -Verb RunAs -Wait ...` command, parent artifact hash, child hash guard, aftercare, owner, hosted body, and private-state seal before granting service mutation authority; the wrapper JSON also carries structured `childRunbookRows` and `aftercareRows` with service ids, routes, SHA-256s, audit modes, authority gates, failed-check counts, and private-state seals. Live proof `local-20260619-013021-159-c93088be` generated the parent artifact with two child rows, two aftercare rows, `usesExplicitAftercareArguments=true`, no `Invoke-Expression`, child hash guards, and wrapper-path aftercare calls. 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-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, eighteen 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/swarm-online-runbook/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 Gjallar proof `local-20260619-033236-595-c0bc6a90` returns `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `tools=18`, `recommendedWrapperMode=swarm-online-runbook`, `serviceLifecycleRecommendedWrapperMode=cluster-service-execution-audit`, exact `swarmOnlineTool=tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId epiphany.cluster.self.tool.swarm-online-runbook -ToolRequestingAgentId -ToolRequestingClusterId `, non-mutating service lifecycle readback rows, elevated service authority rows with aftercare audit commands, present runbook artifacts, SHA-256 provenance, failed/missing check counts, and `privateStateExposed=false`. `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now prints and stores the swarm-level elevated command for its generated Idunn-owned artifact, and the generated parent runbook verifies each child runbook artifact exists and matches its advertised SHA-256 before launching it elevated, then runs aftercare audits through the known wrapper `ScriptPath` plus explicit argument arrays instead of string evaluation. The operator sees the exact `Start-Process PowerShell -Verb RunAs -Wait ...` command, parent artifact hash, child hash guard, aftercare, owner, hosted body, and private-state seal before granting service mutation authority; the wrapper JSON also carries structured `childRunbookRows` and `aftercareRows` with service ids, routes, SHA-256s, audit modes, authority gates, failed-check counts, and private-state seals. Live proof `local-20260619-013021-159-c93088be` generated the parent artifact with two child rows, two aftercare rows, `usesExplicitAftercareArguments=true`, no `Invoke-Expression`, child hash guards, and wrapper-path aftercare calls. 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. - Compact `swarmActionTuiRows` now match the JSON service-execution queue including local runbook SHA-256 provenance: live artifact `local-20260618-164403-238-dba797ce` shows `050 | service-execution-authority | operator-authority-required | operator-elevated-runbook | operator.elevated_windows_service_control | mutates=true | elevated=true | artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0 | audit=cluster-service-execution-audit`, while the readback row stays `artifact=none | sha256=none | audit=none`. Source smoke `verse-query-action-tui-audit-smoke` guards this agent-friendly TUI surface. - Receipt directory rows now carry `artifactStatus` and `artifactSha256` beside `artifactRef`, using the same `none` / `external-ref` / `present` / `missing` vocabulary as action rows and hashing present local artifacts at the receipt-directory layer. Live wrapper artifact `local-20260618-165005-139-6188fe30` proves the cluster service execution runbook row reports `artifactStatus=present`, `artifactSha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`, and TUI `artifact=present | sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0`; the per-service execution runbook row reports `artifactSha256=b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7`; non-artifact rows report `artifactSha256=none`. Wrapper proof `local-20260618-165319-478-e929d2bd` also prints compact `artifactHashes=cluster-service-execution-runbook:3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0; service-execution-runbook:b213a3c11a8f11a03061fcd743f507edaa59bc6767257b79cef63329596375e7` in the one-line receipt-directory summary. Source smoke guards present-artifact SHA-256 in receipt-directory JSON/TUI, action-row SHA-256, missing-artifact demotion, and failed-check anatomy. `epiphany-verse-query receipt-directory` also derives compact artifact counts (`artifactNoneCount`, `artifactExternalRefCount`, `artifactPresentCount`, `artifactMissingCount`) from rows instead of storing a second truth. Live readback reports `artifactNone=13`, `artifactExternalRef=2`, `artifactPresent=2`, `artifactMissing=0`, and `privateStateExposed=false`; a clean direct empty-store readback reported all 17 rows as `artifactNone`. The earlier all-in-one `epiphany-verse-query smoke` Windows stack overflow was fixed by cutting full `query_epiphany_local_verse_context` out of `load_swarm_overview_report`; overview now reads daemon service lifecycle rows through narrow history/latest loaders. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index d5b5f164..08b30a78 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -2232,11 +2232,15 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { $daemonRows = Format-TuiRows $result.daemonTuiRows $toolRows = Format-TuiRows $result.toolTuiRows $policyRows = Format-TuiRows $result.policyTuiRows + $swarmOnlineTool = "none" + if ($null -ne $result.commands -and $null -ne $result.commands.wrapperInvokeSwarmOnlineRunbookTool) { + $swarmOnlineTool = $result.commands.wrapperInvokeSwarmOnlineRunbookTool + } $overviewLabel = "Swarm overview" if ($Mode -eq "gjallar") { $overviewLabel = "Gjallar" } - Write-Host "${overviewLabel}: status=$($result.status), liveness=$($result.livenessStatus), recovery=$($result.recoveryStatus), agents=$($result.agentCount), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), surfaces=$($result.surfaceCount), tools=$($result.toolCount), nonReady=$($result.nonReadyDaemonCount), policyMissing=$($result.policyMissingCount), recommended=$($result.recommendedWrapperMode), serviceRecommended=$($result.serviceLifecycleRecommendedWrapperMode), actionQueue=$actionQueue, actionRows=$actionRows, attention=$attention, daemonRows=$daemonRows, toolRows=$toolRows, policyRows=$policyRows, toolHostAttention=$toolHostAttention, toolAttentionRows=$toolAttentionRows, serviceLifecycleAttention=$serviceLifecycleAttention, serviceAttentionRows=$serviceAttentionRows, serviceExecutionFailedChecks=$serviceExecutionFailedChecks, serviceFailedCheckRows=$serviceFailedCheckRows, privateStateExposed=$($result.privateStateExposed)" + Write-Host "${overviewLabel}: status=$($result.status), liveness=$($result.livenessStatus), recovery=$($result.recoveryStatus), agents=$($result.agentCount), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), surfaces=$($result.surfaceCount), tools=$($result.toolCount), nonReady=$($result.nonReadyDaemonCount), policyMissing=$($result.policyMissingCount), recommended=$($result.recommendedWrapperMode), serviceRecommended=$($result.serviceLifecycleRecommendedWrapperMode), swarmOnlineTool=$swarmOnlineTool, actionQueue=$actionQueue, actionRows=$actionRows, attention=$attention, daemonRows=$daemonRows, toolRows=$toolRows, policyRows=$policyRows, toolHostAttention=$toolHostAttention, toolAttentionRows=$toolAttentionRows, serviceLifecycleAttention=$serviceLifecycleAttention, serviceAttentionRows=$serviceAttentionRows, serviceExecutionFailedChecks=$serviceExecutionFailedChecks, serviceFailedCheckRows=$serviceFailedCheckRows, privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "swarm-online-runbook") { $aftercare = "none" if ($null -ne $result.aftercareCommands -and $result.aftercareCommands.Count -gt 0) {