Expose Idunn policy directory tool

This commit is contained in:
Meta Vens 2026-06-19 03:56:19 +01:00
commit 650a7d900a
6 changed files with 189 additions and 10 deletions

View file

@ -1483,7 +1483,7 @@ fn run_cli() -> Result<()> {
{
anyhow::bail!("local Verse query smoke lost Eve connection intent/receipt");
}
if context.daemon_tool_capabilities.len() < 18 {
if context.daemon_tool_capabilities.len() < 19 {
anyhow::bail!("local Verse query smoke expected daemon tool capabilities");
}
if !context.daemon_tool_capabilities.iter().all(|capability| {
@ -1498,7 +1498,7 @@ fn run_cli() -> Result<()> {
let tool_directory =
load_epiphany_cultmesh_daemon_tool_directory(&args.store, args.runtime_id.clone())?;
let tool_report = daemon_tool_directory_report(&tool_directory);
if tool_report.rows.len() < 18 || tool_report.host_attention_count != 0 {
if tool_report.rows.len() < 19 || tool_report.host_attention_count != 0 {
anyhow::bail!(
"local Verse query smoke expected globally visible tools hosted by ready daemons"
);
@ -1536,6 +1536,23 @@ fn run_cli() -> Result<()> {
"local Verse query smoke lost compact Self service-health tool contract row"
);
}
if !tool_report.tui_rows.iter().any(|row| {
row.contains("READY")
&& row.contains("Self")
&& row.contains("service-policy-directory")
&& row.contains("epiphany.cluster.self.tool.service-policy-directory")
&& row.contains("authority=daemon.service_lifecycle")
&& row.contains("input=epiphany.cultmesh.daemon_restart_policy_directory_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-policy-directory tool contract row"
);
}
if !tool_report.tui_rows.iter().any(|row| {
row.contains("READY")
&& row.contains("Self")
@ -1922,6 +1939,62 @@ fn run_cli() -> Result<()> {
"local Verse query smoke lost service-health daemon tool readback route"
);
}
let service_policy_directory = context
.daemon_tool_capabilities
.iter()
.find(|capability| {
capability.capability_id
== "epiphany.cluster.self.tool.service-policy-directory"
})
.context("missing Self service-policy-directory daemon tool capability")?;
let service_policy_directory_receipt_status =
default_daemon_tool_receipt_status(service_policy_directory);
let service_policy_directory_result_ref = default_daemon_tool_result_ref(
service_policy_directory,
"daemon-tool-receipt-service-policy-directory-smoke",
);
let service_policy_directory_row =
daemon_tool_invocation_tui_row(DaemonToolInvocationTuiFields {
requester: "Persona",
requesting_agent_id: "epiphany.Persona",
requesting_private_verse: "epiphany.cluster.persona.private",
requesting_surface: "eve://epiphany/persona",
host: "Self",
host_daemon_id: &service_policy_directory.host_daemon_id,
host_private_verse: "epiphany.cluster.self.private",
host_surface: "eve://epiphany/self",
capability_id: &service_policy_directory.capability_id,
tool_name: &service_policy_directory.tool_name,
operation: &service_policy_directory.operation,
intent_id: "daemon-tool-intent-service-policy-directory-smoke",
receipt_id: "daemon-tool-receipt-service-policy-directory-smoke",
receipt_status: &service_policy_directory_receipt_status,
receipt_contract_type: &service_policy_directory.receipt_contract_type,
result_ref: &service_policy_directory_result_ref,
authority_gate: &service_policy_directory.authority_gate,
all_agents: service_policy_directory.available_to_all_agents,
requires_receipt: service_policy_directory.requires_receipt,
private_state_exposed: false,
});
if !service_policy_directory_row.contains("tool=service-policy-directory")
|| !service_policy_directory_row.contains("host=Self")
|| !service_policy_directory_row.contains("operation=readServicePolicyDirectory")
|| !service_policy_directory_row
.contains("receiptStatus=accepted-for-service-policy-directory-readback")
|| !service_policy_directory_row
.contains("receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt")
|| !service_policy_directory_row.contains(
"resultRef=cultmesh://epiphany-local/daemon-service-lifecycle/service-policy-directory",
)
|| !service_policy_directory_row.contains("authority=daemon.service_lifecycle")
|| !service_policy_directory_row.contains("allAgents=true")
|| !service_policy_directory_row.contains("receiptRequired=true")
|| !service_policy_directory_row.contains("private=false")
{
anyhow::bail!(
"local Verse query smoke lost service-policy-directory daemon tool readback route"
);
}
let swarm_online_runbook = context
.daemon_tool_capabilities
.iter()
@ -2005,10 +2078,13 @@ fn run_cli() -> Result<()> {
!= Some("epiphany.cluster.self.private")
|| daemon_status_readback["eveSurfaceId"].as_str() != Some("eve://epiphany/self")
|| daemon_status_readback["availableToAllAgents"].as_bool() != Some(true)
|| daemon_status_readback["hostedToolCount"].as_u64() != Some(4)
|| daemon_status_readback["hostedToolCount"].as_u64() != Some(5)
|| !hosted_tool_ids
.iter()
.any(|id| id.as_str() == Some("epiphany.cluster.self.tool.service-health"))
|| !hosted_tool_ids.iter().any(|id| {
id.as_str() == Some("epiphany.cluster.self.tool.service-policy-directory")
})
|| !hosted_tool_ids.iter().any(|id| {
id.as_str() == Some("epiphany.cluster.self.tool.swarm-online-runbook")
})
@ -6483,6 +6559,12 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> {
} else {
(serde_json::Value::Null, false)
};
let (service_policy_directory_readback, service_policy_directory_private_state_exposed) =
if is_service_policy_directory_capability(capability) {
service_policy_directory_readback_from_idunn(args)?
} else {
(serde_json::Value::Null, false)
};
let (daemon_status_readback, daemon_status_readback_private_state_exposed) =
if is_daemon_status_capability(capability) {
let host_capabilities = tool_directory
@ -6521,6 +6603,7 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> {
let private_state_exposed = written_receipt.private_state_exposed
|| service_health_readback_private_state_exposed
|| swarm_online_runbook_readback_private_state_exposed
|| service_policy_directory_private_state_exposed
|| daemon_status_readback_private_state_exposed
|| eve_connection_readback_private_state_exposed
|| authority_tool_readback_private_state_exposed;
@ -6608,6 +6691,14 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> {
"swarmOnlineRunbookReadbackPrivateStateExposed".to_string(),
json!(swarm_online_runbook_readback_private_state_exposed),
);
output_map.insert(
"servicePolicyDirectoryReadback".to_string(),
service_policy_directory_readback,
);
output_map.insert(
"servicePolicyDirectoryReadbackPrivateStateExposed".to_string(),
json!(service_policy_directory_private_state_exposed),
);
output_map.insert(
"invocationRows".to_string(),
json!([invocation_tui_row.clone()]),
@ -6624,6 +6715,8 @@ fn default_daemon_tool_receipt_status(
"accepted-for-service-lifecycle-readback".to_string()
} else if is_swarm_online_runbook_capability(capability) {
"accepted-for-swarm-online-runbook-readback".to_string()
} else if is_service_policy_directory_capability(capability) {
"accepted-for-service-policy-directory-readback".to_string()
} else if is_daemon_status_capability(capability) {
"accepted-for-daemon-status-readback".to_string()
} else if is_eve_connect_capability(capability) {
@ -6917,6 +7010,40 @@ fn swarm_online_runbook_readback_from_idunn(args: &Args) -> Result<(serde_json::
))
}
fn service_policy_directory_readback_from_idunn(args: &Args) -> Result<(serde_json::Value, bool)> {
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
let policy_directory = load_epiphany_cultmesh_daemon_restart_policy_directory(
&args.store,
args.runtime_id.clone(),
)?;
let report = daemon_restart_policy_directory_report_from_rows(&policy_directory);
Ok((
json!({
"status": report.status,
"lifecycleOwner": report.lifecycle_owner,
"hostedBody": report.hosted_body,
"daemonCount": report.rows.len(),
"coveredCount": report.covered_count,
"enabledCount": report.enabled_count,
"disabledCount": report.disabled_count,
"missingCount": report.missing_count,
"attentionCount": report.attention_count,
"policyCommand": "epiphany-daemon-supervisor policy --daemon-id <daemon> --restart-command <exe> [--restart-arg <arg>...]",
"wrapperPolicyDirectory": WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND,
"tickCommand": "epiphany-daemon-supervisor tick",
"wrapperTick": WRAPPER_SERVICE_TICK_COMMAND,
"policyRows": report.rows,
"policyTuiRows": report.tui_rows,
"privateStateExposed": report.private_state_exposed,
}),
report.private_state_exposed,
))
}
fn default_daemon_tool_result_ref(
capability: &EpiphanyCultMeshDaemonToolCapabilityEntry,
receipt_id: &str,
@ -6925,6 +7052,8 @@ fn default_daemon_tool_result_ref(
"cultmesh://epiphany-local/daemon-service-lifecycle/receipt-directory".to_string()
} else if is_swarm_online_runbook_capability(capability) {
"cultmesh://epiphany-local/daemon-service-lifecycle/swarm-online-runbook".to_string()
} else if is_service_policy_directory_capability(capability) {
"cultmesh://epiphany-local/daemon-service-lifecycle/service-policy-directory".to_string()
} else if is_daemon_status_capability(capability) {
format!(
"cultmesh://epiphany-local/daemon-status/{}",
@ -6959,6 +7088,11 @@ fn default_daemon_tool_result_summary(
"{requesting_agent_id} requested Idunn swarm online runbook handoff; {} returned compact preflight/readback for {} without executing elevated service control.",
capability.host_daemon_id, WRAPPER_SWARM_ONLINE_RUNBOOK_COMMAND
)
} else if is_service_policy_directory_capability(capability) {
format!(
"{requesting_agent_id} requested Idunn scheduler policy coverage; {} returned compact restart-policy directory readback for {} without executing service control.",
capability.host_daemon_id, WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND
)
} else if is_daemon_status_capability(capability) {
format!(
"{requesting_agent_id} requested daemon status; {} returned compact topology/liveness/tool readback through the daemon tool bus.",
@ -6998,6 +7132,15 @@ fn is_swarm_online_runbook_capability(
&& capability.receipt_contract_type == "epiphany.cultmesh.daemon_service_lifecycle_receipt"
}
fn is_service_policy_directory_capability(
capability: &EpiphanyCultMeshDaemonToolCapabilityEntry,
) -> bool {
capability.capability_id == "epiphany.cluster.self.tool.service-policy-directory"
&& capability.tool_name == "service-policy-directory"
&& capability.operation == "readServicePolicyDirectory"
&& capability.receipt_contract_type == "epiphany.cultmesh.daemon_service_lifecycle_receipt"
}
fn is_daemon_status_capability(capability: &EpiphanyCultMeshDaemonToolCapabilityEntry) -> bool {
capability.tool_name == "status"
&& capability.operation == "readStatus"

View file

@ -5113,6 +5113,17 @@ pub fn epiphany_cultmesh_daemon_tool_capabilities() -> Vec<EpiphanyCultMeshDaemo
EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE,
"daemon.service_lifecycle",
));
capabilities.push(epiphany_cultmesh_daemon_tool_capability(
&epiphany_cultmesh_cluster_topology()
.into_iter()
.find(|cluster| cluster.cluster_id == "epiphany.cluster.self")
.expect("self cluster topology exists"),
"service-policy-directory",
"readServicePolicyDirectory",
"epiphany.cultmesh.daemon_restart_policy_directory_query",
EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE,
"daemon.service_lifecycle",
));
capabilities.push(epiphany_cultmesh_daemon_tool_capability(
&epiphany_cultmesh_cluster_topology()
.into_iter()
@ -6726,7 +6737,7 @@ mod tests {
let temp = tempfile::tempdir()?;
let store = temp.path().join("epiphany-daemon-tools.ccmp");
let written = write_epiphany_cultmesh_daemon_tool_capabilities(&store, "epiphany-test")?;
assert!(written.len() >= 18);
assert!(written.len() >= 19);
let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?;
let persona_status = node.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
@ -6735,6 +6746,10 @@ mod tests {
let self_service_health = node.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
"epiphany.cluster.self.tool.service-health",
)?;
let self_service_policy_directory = node
.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
"epiphany.cluster.self.tool.service-policy-directory",
)?;
let self_swarm_online_runbook = node
.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
"epiphany.cluster.self.tool.swarm-online-runbook",
@ -6749,6 +6764,7 @@ mod tests {
for capability in [
persona_status.clone(),
self_service_health.clone(),
self_service_policy_directory.clone(),
self_swarm_online_runbook.clone(),
hands_action.clone(),
soul_verify.clone(),
@ -6773,6 +6789,22 @@ mod tests {
self_service_health.receipt_contract_type,
EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE
);
assert_eq!(
self_service_policy_directory.authority_gate,
"daemon.service_lifecycle"
);
assert_eq!(
self_service_policy_directory.operation,
"readServicePolicyDirectory"
);
assert_eq!(
self_service_policy_directory.input_contract_type,
"epiphany.cultmesh.daemon_restart_policy_directory_query"
);
assert_eq!(
self_service_policy_directory.receipt_contract_type,
EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE
);
assert_eq!(
self_swarm_online_runbook.authority_gate,
"daemon.service_lifecycle"

View file

@ -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-<guid8>` 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 <capability> -ToolRequestingAgentId <agent> -ToolRequestingClusterId <cluster>`. 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=<gate>`, 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=<command>`, 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 <agent> -ToolRequestingClusterId <cluster>`, 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, nineteen 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=<command>`, 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=19`. Verified focused proof: live Gjallar artifact `local-20260619-035353-171-34fb0d31` returned `tools=19`, `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 <agent> -ToolRequestingClusterId <cluster>`, 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.
@ -79,7 +79,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-19: The daemon tool directory now advertises Self `swarm-online-runbook` beside Self `service-health` as globally available, receipt-gated, private-state-sealed CultMesh capabilities over the daemon service lifecycle contract. Source smoke reports `daemonTools=18`, and live wrapper proof `local-20260619-032243-566-545b148c` printed `READY | Self | swarm-online-runbook | prepareSwarmOnlineRunbook | epiphany.cluster.self.tool.swarm-online-runbook | eve://epiphany/self | authority=daemon.service_lifecycle | input=epiphany.cultmesh.daemon_service_online_runbook_request | receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt | allAgents=true | receipt=true | private=false`.
- 2026-06-19: The daemon tool directory now advertises Self `service-policy-directory` and `swarm-online-runbook` beside Self `service-health` as globally available, receipt-gated, private-state-sealed CultMesh capabilities over the daemon service lifecycle contract. Source smoke reports `daemonTools=19`, and live wrapper proof `local-20260619-035238-504-782f1283` printed `READY | Self | service-policy-directory | readServicePolicyDirectory | epiphany.cluster.self.tool.service-policy-directory | eve://epiphany/self | authority=daemon.service_lifecycle | input=epiphany.cultmesh.daemon_restart_policy_directory_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-19: The `swarm-overview`/`swarm-triage`/`gjallar` action queue now carries scoped sealed service-execution wound counts on non-mutating service-lifecycle readback rows as well as elevated service-control rows, with compact wrapper/TUI rows rendering `failedChecks=<n>` and `missingChecks=<n>`. Live Gjallar proof `local-20260619-012440-577-3f18a143` printed priority 40 `cluster-service-execution-audit` with `failedChecks=5` and priority 41 `service-execution-audit` with `failedChecks=6`, while both rows stayed non-mutating, non-elevated, Idunn-owned, 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.
@ -116,7 +116,7 @@ remembers doctrine; the branch remembers the blade.
- `bifrost-publication` is the compact non-mutating Bifrost publication proof; use it to prove body-change routing, credit, and GitHub publication receipt state without performing GitHub mutation. Its JSON now points back to compact swarm overview and tool-directory readback.
- `bifrost-ledger` is the compact Bifrost/Imagination readback rite; use it after collaboration or publication writes to see the latest body-change, GitHub, feedback, and consensus receipts without opening the full local Verse.
- `tool-directory` is the non-mutating daemon tool sight rite; it shows which globally available daemon-hosted tools any agent can invoke through typed intents and receipts, while still exposing host readiness.
- `tool-invoke` now embeds compact readbacks for common daemon-hosted tools. Status calls return `daemonStatusReadback`, Eve calls return `eveConnectionReadback`, Self `service-health` returns Idunn-owned `serviceHealthReadback`, Self `swarm-online-runbook` returns Idunn-owned `swarmOnlineRunbookReadback`, and Hands/Soul authority tools return `authorityToolReadback` with gate, input contract, receipt contract, intent/receipt routes, host cluster, and private-state seal. This proves global tool ergonomics without moving action, verification, or daemon lifecycle ownership into the wrapper; live proofs routed Persona to Hands `repo-action` (`local-20260619-021628-143-7bf7f2e0`), Soul `verify` (`local-20260619-021701-458-852cfa6f`), and Self `swarm-online-runbook` (`local-20260619-032244-273-acb3c6a4`) with `privateStateExposed=false`.
- `tool-invoke` now embeds compact readbacks for common daemon-hosted tools. Status calls return `daemonStatusReadback`, Eve calls return `eveConnectionReadback`, Self `service-health` returns Idunn-owned `serviceHealthReadback`, Self `service-policy-directory` returns Idunn-owned `servicePolicyDirectoryReadback`, Self `swarm-online-runbook` returns Idunn-owned `swarmOnlineRunbookReadback`, and Hands/Soul authority tools return `authorityToolReadback` with gate, input contract, receipt contract, intent/receipt routes, host cluster, and private-state seal. This proves global tool ergonomics without moving action, verification, or daemon lifecycle ownership into the wrapper; live proofs routed Persona to Hands `repo-action` (`local-20260619-021628-143-7bf7f2e0`), Soul `verify` (`local-20260619-021701-458-852cfa6f`), Self `swarm-online-runbook` (`local-20260619-032244-273-acb3c6a4`), and Self `service-policy-directory` (`local-20260619-035238-138-633f3ff0`) with `privateStateExposed=false`.
- 2026-06-19: The Self service tool readbacks now carry Idunn ownership at the top-level tool mouth, not only inside action rows. `serviceHealthReadback` and `swarmOnlineRunbookReadback` both include `lifecycleOwner=Idunn` and `hostedBody=Epiphany`; source smoke guards both fields; wrapper `tool-invoke` summaries print `owner=Idunn:hostedBody=Epiphany`. Live proofs `local-20260619-034243-246-b5704cd8` (`service-health`) and `local-20260619-034148-683-ea6c0ed6` (`swarm-online-runbook`) stayed non-mutating and `privateStateExposed=False`.
- `gjallar` is the non-mutating whole-Verse herald to run first when reorienting; `swarm-overview` remains its compatibility name. It locates agents, cluster/private-Verse topology, daemon liveness, Eve surfaces, and daemon tools in one compact report without opening private Verse state or full-context debug serialization.
- Idunn, not Codex/Self/Gjallar, owns daemon survival and service lifecycle physiology. `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now generates an Idunn-owned service lifecycle runbook for the Epiphany hosted body: the artifact verifies each sealed child runbook artifact exists and matches its advertised SHA-256 before launching it with `Start-Process ... -PassThru`, records child exit codes, continues after child failure, runs aftercare audits through `tools\epiphany_local_run.ps1` with explicit arguments instead of string evaluation, and exits nonzero if any child or aftercare step fails. Its wrapper JSON and one-line summary print the exact swarm-level `elevatedCommand=Start-Process PowerShell -Verb RunAs -Wait ...`, parent artifact SHA-256, `verifiesChildArtifactSha256=True`, `usesExplicitAftercareArguments=True`, child/aftercare row counts, aftercare commands, owner, hosted body, and private-state seal; JSON now includes structured `childRunbookRows` and `aftercareRows` with service ids, routes, SHA-256s, audit modes, authority gates, failed-check counts, and private-state seals. Proof `local-20260619-013021-159-c93088be` generated and inspected that guard without mutating services. It still requires explicit elevated operator authority before service mutation.

Binary file not shown.

View file

@ -71,7 +71,7 @@ data_flow:
active_subgoals:
- Gjallar is Odin's herald for whole-Verse sight: Odin coordinates and discovers advertised Verse metadata, while Gjallar publishes compact operator-safe rows for topology, liveness, Eve surfaces, daemon tools, receipts, and action queues without opening private state. The first native Gjallar surface is a read-only alias over the compact swarm overview: `epiphany-verse-query gjallar` and `tools/epiphany_local_run.ps1 -Mode gjallar`.
- Idunn owns daemon survival and service lifecycle physiology. Codex/operator sessions may inspect, generate runbooks, and route explicit operator authority, but keeping daemons alive belongs to Idunn-owned service lifecycle receipts, scheduler policy, audits, and aftercare. Do not let Self, Gjallar, or ad hoc wrapper summaries become a second daemon-keeper. Global tool readbacks for Self `service-health` and `swarm-online-runbook` now state `lifecycleOwner=Idunn` and `hostedBody=Epiphany` at the top-level operator mouth, with wrapper proofs `local-20260619-034243-246-b5704cd8` and `local-20260619-034148-683-ea6c0ed6` showing the compact `tool-invoke` summaries carry those fields without service mutation or private-state exposure.
- Idunn owns daemon survival and service lifecycle physiology. Codex/operator sessions may inspect, generate runbooks, and route explicit operator authority, but keeping daemons alive belongs to Idunn-owned service lifecycle receipts, scheduler policy, audits, and aftercare. Do not let Self, Gjallar, or ad hoc wrapper summaries become a second daemon-keeper. Global tool readbacks for Self `service-health`, `service-policy-directory`, and `swarm-online-runbook` now state `lifecycleOwner=Idunn` and `hostedBody=Epiphany` at the top-level operator mouth, with wrapper proofs `local-20260619-034243-246-b5704cd8`, `local-20260619-035238-138-633f3ff0`, and `local-20260619-034148-683-ea6c0ed6` showing the compact `tool-invoke` summaries carry those fields without service mutation or private-state exposure.
- Use `notes/epiphany-cultmesh-dreaming-roadmap.md` as the design authority for distributed Epiphany dreaming. Public dreams are separately authored typed documents distributed through CultMesh/CultNet; private state remains local and cannot be shared by flipping a visibility flag. Foreign dreams are external thought weather until a reviewed local adoption receipt digests them into memory, planning, doctrine, or governance.
- CultMesh is now the preferred ergonomic Rust abstraction over CultCache and CultNet for Epiphany-owned local database surfaces. The Rust substrate is repo-contained under `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`; the old `E:\Projects\CultLib\crates\*` path is dead in this checkout and must not be reintroduced as a compile-time dependency. Future local Verse/dream/status work should start at CultMesh unless it is explicitly polishing CultMesh internals. `CultMeshNode::get_all_with_keys<T>()` now exposes typed document enumeration through the mesh organ, and `CultMeshNode::soa<T>()` exposes CultCache's typed SoA table projection without bypassing the mesh organ. Compact audits can scan local Verse receipt families, and agent-state summary documents now prove SoA readback through CultMesh columns. `epiphany-verse-query agent-state-report` and wrapper `-Mode agent-state-soa` refresh/mirror the persisted seven-row agent-state SoA into local Verse, then emit a compact TUI/JSON report from CultMesh SoA columns without full local Verse serialization. Compact SoA rows now include each standing faculty's role id, agent id, profile kind, portable contract, memory/goal/value counts, and `private=false`; wrapper proof `local-20260618-175913-074-b22ff01c` printed all seven faculties in one sealed line. Preserve the three-Verse boundary: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult project sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Persona posts.
- Use `notes/epiphany-verse-architecture.md` as the source note for local Verse/Odin/Yggdrasil prompt-context architecture. Odin is the all-seer discovery/coordinator surface for advertised Verse metadata, not a trust-boundary bypass. Yggdrasil is the hosting spine for important trusted GameCult Verses such as Bifrost. The first native local Verse query surface is `epiphany-verse-query`, which seeds/queries compact CultMesh policy/status/contract context for dynamic prompt assembly and operator inspection; `epiphany-prompt-context-smoke` proves that compact local Verse context plus a semantic memory graph context cut can render a bounded dynamic prompt packet, omit unrelated private-looking text, and preserve the packet inside a role worker launch document. Live bridge role/reorient launch paths now feed `dynamicPromptContext` from sibling `local-verse.ccmp` and `memory-graph.msgpack` stores beside runtime-spine, refreshing the memory graph from current typed thread-state repo graphs when absent; the bridge launch-context test proves that packet survives into a persisted runtime-spine worker launch request. `tools/epiphany_local_run.ps1 -Mode status` now uses `.epiphany-run/cultmesh/local-verse.ccmp` as the shared local operator Verse store for run intent, operator snapshot, run receipt, and final `local-verse-context.json`, so the read path sees the latest operator witnesses instead of a policy-only seed packet. Local runs also refresh persisted `epiphany.agent_state_soa.v0` from `state/agents.msgpack` and mirror it into local Verse as sealed `epiphany.cultmesh.agent_state_soa_summary.v0`, preserving seven-faculty row/column shape and contract/count metadata without exposing memory text. `epiphany-verse-query poke-daemon --daemon-id <id>` now records an operator-safe `epiphany.cultmesh.daemon_poke_intent.v0` plus `epiphany.cultmesh.daemon_poke_receipt.v0` in local Verse, so a down daemon has a typed lifecycle intervention path without private Verse rummaging; follow-up daemon status remains the liveness authority. `epiphany-verse-query connect-eve` now selects an Odin advertisement by id or target cluster through the narrow Eve surface directory, records Eve connection intent/receipt documents, and verifies latest receipts through narrow CultMesh loaders; `tools/epiphany_local_run.ps1 -Mode eve-connect` wraps the same receipt path, defaulting to the Persona public discussion surface without full local Verse serialization. `epiphany-verse-query bifrost-publication` now records the Bifrost body-change publication intent, Bifrost publication receipt, and GitHub publication receipt from explicit changed path, verification, review, authorship, credit, ledger, Hands PR, and publication URL inputs, verifies the latest chain through narrow CultMesh loaders, and is wrapped by `tools/epiphany_local_run.ps1 -Mode bifrost-publication` for non-mutating operator proof defaults. `epiphany-verse-query collaboration-feedback` now records public Persona/peer collaboration feedback plus an Imagination consensus-discovery receipt from explicit public refs, Eve receipt, topic, summary, and candidate action refs, verifies latest feedback/consensus through narrow CultMesh loaders, and is wrapped by `tools/epiphany_local_run.ps1 -Mode collaboration-feedback`, which first records the prerequisite Eve receipt; adoption still requires Mind/Bifrost gates. `-Mode mvp` now seeds the same local Verse, routes Persona front-door `bubble` speech audits into that store, and writes final `local-verse-context.json` so the Persona mouth-edge witness is visible beside operator run witnesses. `epiphany-operator-snapshot from-status` now also distills the latest native status `tools.invocations[]` row into local Verse daemon-tool invocation intent/receipt mirrors, so operator-safe runtime tool calls become discoverable as `epiphany.cultmesh.daemon_tool_invocation_*` while runtime-spine remains lifecycle owner and raw MCP JSON stays quarantined behind typed tool documents. Plan/run/MVP coordinator summaries can now mirror their runtime-spine `epiphany.coordinator_run_receipt.v0` into local Verse as `epiphany.cultmesh.coordinator_run_receipt.v0`, referencing sealed artifacts by path only while keeping runtime-spine as lifecycle owner. When that summary contains a `finalAction.handsActionGate`, the same distillation pass writes `epiphany.cultmesh.hands_action_gate.v0` into local Verse with the Hands intent/review ids, Substrate Gate grant id, requested paths, required receipt types, and record-pass command template; runtime-spine Hands/Substrate Gate receipts remain the only action owners. When coordinator steps contain `roleAccept` or `roleFailureReview`, the same pass writes the latest operator-safe `epiphany.cultmesh.role_review_event.v0` mirror with surface, role id, status, source coordinator receipt id, and any exposed acceptance receipt/result/job ids; thread-state acceptance receipts remain the review owner.
@ -620,7 +620,7 @@ current_status:
- `tools/epiphany_local_run.ps1` now uses collision-resistant local run ids (`local-YYYYMMDD-HHMMSS-fff-<guid8>`) 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 <capability> -ToolRequestingAgentId <agent> -ToolRequestingClusterId <cluster>`, 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, 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=<command>`, 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 <agent> -ToolRequestingClusterId <cluster>`, 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-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, nineteen 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=<command>`, 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-035353-171-34fb0d31` returns `status=attention`, `livenessStatus=ready`, `recoveryStatus=attention`, `tools=19`, `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 <agent> -ToolRequestingClusterId <cluster>`, 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.

View file

@ -2132,6 +2132,10 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
if ($null -ne $result.swarmOnlineRunbookReadback -and $null -ne $result.swarmOnlineRunbookReadback.status) {
$swarmOnlineRunbook = "status=$($result.swarmOnlineRunbookReadback.status):owner=$($result.swarmOnlineRunbookReadback.lifecycleOwner):hostedBody=$($result.swarmOnlineRunbookReadback.hostedBody):childRunbooks=$($result.swarmOnlineRunbookReadback.childRunbookCount):present=$($result.swarmOnlineRunbookReadback.childArtifactPresentCount):hashVerified=$($result.swarmOnlineRunbookReadback.childArtifactHashVerifiedCount):missingArtifacts=$($result.swarmOnlineRunbookReadback.childArtifactMissingCount):failedChecks=$($result.swarmOnlineRunbookReadback.serviceExecutionFailedCheckCount):missingChecks=$($result.swarmOnlineRunbookReadback.serviceExecutionMissingCheckCount):operatorRequired=$($result.swarmOnlineRunbookReadback.elevatedExecutionRequiresOperator):private=$($result.swarmOnlineRunbookReadback.privateStateExposed)"
}
$servicePolicyDirectory = "none"
if ($null -ne $result.servicePolicyDirectoryReadback -and $null -ne $result.servicePolicyDirectoryReadback.status) {
$servicePolicyDirectory = "status=$($result.servicePolicyDirectoryReadback.status):owner=$($result.servicePolicyDirectoryReadback.lifecycleOwner):hostedBody=$($result.servicePolicyDirectoryReadback.hostedBody):daemons=$($result.servicePolicyDirectoryReadback.daemonCount):covered=$($result.servicePolicyDirectoryReadback.coveredCount):enabled=$($result.servicePolicyDirectoryReadback.enabledCount):disabled=$($result.servicePolicyDirectoryReadback.disabledCount):missing=$($result.servicePolicyDirectoryReadback.missingCount):attention=$($result.servicePolicyDirectoryReadback.attentionCount):tick=$($result.servicePolicyDirectoryReadback.wrapperTick):private=$($result.servicePolicyDirectoryReadback.privateStateExposed)"
}
$daemonStatus = "none"
if ($null -ne $result.daemonStatusReadback -and $null -ne $result.daemonStatusReadback.status) {
$daemonStatus = "status=$($result.daemonStatusReadback.status):cluster=$($result.daemonStatusReadback.clusterId):daemon=$($result.daemonStatusReadback.daemonId):surface=$($result.daemonStatusReadback.eveSurfaceId):tools=$($result.daemonStatusReadback.hostedToolCount):private=$($result.daemonStatusReadback.privateStateExposed)"
@ -2144,7 +2148,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
if ($null -ne $result.authorityToolReadback -and $null -ne $result.authorityToolReadback.authorityGate) {
$authorityTool = "gate=$($result.authorityToolReadback.authorityGate):input=$($result.authorityToolReadback.inputContractType):receipt=$($result.authorityToolReadback.receiptContractType):host=$($result.authorityToolReadback.hostClusterId):private=$($result.authorityToolReadback.privateStateExposed)"
}
Write-Host "Tool invoke: status=$($result.status), requester=$($result.requestingDisplayName), host=$($result.hostDisplayName), tool=$($result.toolName), receipt=$($result.receiptId), daemonStatus=$daemonStatus, eveConnection=$eveConnection, authorityTool=$authorityTool, serviceHealth=$serviceHealth, swarmOnlineRunbook=$swarmOnlineRunbook, invocationRows=$invocationRows, privateStateExposed=$($result.privateStateExposed)"
Write-Host "Tool invoke: status=$($result.status), requester=$($result.requestingDisplayName), host=$($result.hostDisplayName), tool=$($result.toolName), receipt=$($result.receiptId), daemonStatus=$daemonStatus, eveConnection=$eveConnection, authorityTool=$authorityTool, serviceHealth=$serviceHealth, swarmOnlineRunbook=$swarmOnlineRunbook, servicePolicyDirectory=$servicePolicyDirectory, invocationRows=$invocationRows, privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "swarm-overview" -or $Mode -eq "gjallar") {
$attention = "none"
if ($null -ne $result.attentionDaemonIds -and $result.attentionDaemonIds.Count -gt 0) {