diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 0e0b467e..7e48e9b5 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -45,7 +45,6 @@ use epiphany_core::load_latest_epiphany_cultmesh_bifrost_metrics_receipt; use epiphany_core::load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt; use epiphany_core::load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt; use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_intent; -use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_receipt; use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_intent; use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_receipt; use epiphany_core::load_latest_epiphany_cultmesh_idunn_aftercare_audit_receipt; @@ -9894,6 +9893,15 @@ fn write_poke_receipts_for_non_ready_daemons( } fn run_invoke_tool_command(args: &Args) -> Result<()> { + if args.receipt_id.is_some() + || args.receipt_status.is_some() + || args.result_ref.is_some() + || args.receipt_summary.is_some() + { + anyhow::bail!( + "invoke-tool accepts requester intent fields only; the host daemon owns receipt status, result references, and result summaries" + ); + } seed_epiphany_local_verse_context( &args.store, args.runtime_id.clone(), @@ -9916,7 +9924,6 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> { &capability.host_cluster_id, &capability.host_daemon_id, )?; - assert_daemon_ready_for_tool_invocation(daemon_status, capability)?; let topology = load_epiphany_cultmesh_cluster_topology(&args.store, args.runtime_id.clone())?; let requesting_agent_id = args .requesting_agent_id @@ -9931,10 +9938,6 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> { .intent_id .clone() .unwrap_or_else(|| format!("daemon-tool-intent-{}", capability.tool_name)); - let receipt_id = args - .receipt_id - .clone() - .unwrap_or_else(|| format!("daemon-tool-receipt-{}", capability.tool_name)); let payload_ref = args .invocation_ref .clone() @@ -9958,46 +9961,14 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> { args.runtime_id.clone(), intent.clone(), )?; - let receipt_status = args - .receipt_status - .clone() - .unwrap_or_else(|| default_daemon_tool_receipt_status(capability)); - let result_ref = args - .result_ref - .clone() - .unwrap_or_else(|| default_daemon_tool_result_ref(capability, &receipt_id)); - let result_summary = args - .receipt_summary - .clone() - .unwrap_or_else(|| default_daemon_tool_result_summary(capability, &requesting_agent_id)); - let receipt = epiphany_cultmesh_daemon_tool_invocation_receipt_for_intent( - receipt_id, - &intent, - receipt_status, - capability.receipt_contract_type.clone(), - result_ref, - result_summary, - ); - let written_receipt = write_epiphany_cultmesh_daemon_tool_invocation_receipt( - &args.store, - args.runtime_id.clone(), - receipt, - )?; let latest_intent = load_latest_epiphany_cultmesh_daemon_tool_invocation_intent( &args.store, args.runtime_id.clone(), )? .context("local Verse lost latest daemon tool invocation intent after write")?; - let latest_receipt = load_latest_epiphany_cultmesh_daemon_tool_invocation_receipt( - &args.store, - args.runtime_id.clone(), - )? - .context("local Verse lost latest daemon tool invocation receipt after write")?; - if latest_intent.intent_id != written_intent.intent_id - || latest_receipt.receipt_id != written_receipt.receipt_id - { + if latest_intent.intent_id != written_intent.intent_id { anyhow::bail!( - "local Verse latest daemon tool invocation does not match the just-written intent/receipt" + "local Verse latest daemon tool invocation does not match the just-written intent" ); } let requesting_cluster = @@ -10006,93 +9977,8 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> { .iter() .find(|cluster| cluster.cluster_id == written_intent.host_cluster_id) .unwrap_or(host_cluster_from_directory); - let (service_health_readback, service_health_readback_private_state_exposed) = - if is_service_health_capability(capability) { - service_health_readback_from_idunn(args)? - } else { - (serde_json::Value::Null, false) - }; - let (swarm_online_runbook_readback, swarm_online_runbook_readback_private_state_exposed) = - if is_swarm_online_runbook_capability(capability) { - swarm_online_runbook_readback_from_idunn(args)? - } 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 - .iter() - .map(|(_cluster, _status, capability)| capability.clone()) - .collect::>(); - daemon_status_readback_from_host(host_cluster, daemon_status, &host_capabilities) - } else { - (serde_json::Value::Null, false) - }; - let (eve_connection_readback, eve_connection_readback_private_state_exposed) = - if is_eve_connect_capability(capability) { - let surface_directory = - load_epiphany_cultmesh_eve_surface_directory(&args.store, args.runtime_id.clone())?; - let (target_cluster, target_advertisement, target_surface) = surface_directory - .iter() - .find(|(cluster, _advertisement, _surface)| { - cluster.cluster_id == capability.host_cluster_id - }) - .context("local Verse lost Eve surface for eve-connect capability host")?; - let (_latest_repo_work_overview, repo_work_overviews) = - load_repo_work_overview_queue(args)?; - eve_connection_readback_from_host( - target_cluster, - target_advertisement, - target_surface, - capability, - &repo_work_overviews, - ) - } else { - (serde_json::Value::Null, false) - }; - let (authority_tool_readback, authority_tool_readback_private_state_exposed) = - if is_authority_tool_capability(capability) { - authority_tool_readback_from_capability(host_cluster, capability) - } else { - (serde_json::Value::Null, false) - }; - 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; - let invocation_tui_row = daemon_tool_invocation_tui_row(DaemonToolInvocationTuiFields { - requester: &requesting_cluster.display_name, - requesting_agent_id: &written_intent.requesting_agent_id, - requesting_private_verse: &requesting_cluster.private_verse_id, - requesting_surface: &requesting_cluster.eve_surface_id, - host: &host_cluster.display_name, - host_daemon_id: &written_intent.host_daemon_id, - host_private_verse: &host_cluster.private_verse_id, - host_surface: &host_cluster.eve_surface_id, - capability_id: &written_intent.capability_id, - tool_name: &written_intent.tool_name, - operation: &written_intent.operation, - intent_id: &written_intent.intent_id, - receipt_id: &written_receipt.receipt_id, - receipt_status: &written_receipt.status, - receipt_contract_type: &written_receipt.receipt_contract_type, - result_ref: &written_receipt.result_ref, - authority_gate: &written_intent.authority_gate, - all_agents: capability.available_to_all_agents, - requires_receipt: written_intent.requires_receipt, - private_state_exposed, - }); - let mut output = json!({ - "status": "ok", + let output = json!({ + "status": "pending-provider", "store": args.store, "runtimeId": args.runtime_id, "capabilityId": written_intent.capability_id, @@ -10111,61 +9997,19 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> { "toolName": written_intent.tool_name, "operation": written_intent.operation, "intentId": written_intent.intent_id, - "receiptId": written_receipt.receipt_id, - "receiptStatus": written_receipt.status, - "receiptContractType": written_receipt.receipt_contract_type, - "resultRef": written_receipt.result_ref, - "resultSummary": written_receipt.result_summary, + "receiptId": null, + "receiptStatus": null, + "receiptContractType": capability.receipt_contract_type, + "resultRef": null, + "resultSummary": null, + "responseOwner": written_intent.host_daemon_id, + "observedHostStatus": daemon_status.status, "availableToAllAgents": capability.available_to_all_agents, "requiresReceipt": written_intent.requires_receipt, "authorityGate": written_intent.authority_gate, "privateStateRequested": written_intent.private_state_requested, - "privateStateExposed": private_state_exposed, + "privateStateExposed": false, }); - let output_map = output - .as_object_mut() - .context("daemon tool invocation output must be a JSON object")?; - output_map.insert("daemonStatusReadback".to_string(), daemon_status_readback); - output_map.insert( - "daemonStatusReadbackPrivateStateExposed".to_string(), - json!(daemon_status_readback_private_state_exposed), - ); - output_map.insert("eveConnectionReadback".to_string(), eve_connection_readback); - output_map.insert( - "eveConnectionReadbackPrivateStateExposed".to_string(), - json!(eve_connection_readback_private_state_exposed), - ); - output_map.insert("authorityToolReadback".to_string(), authority_tool_readback); - output_map.insert( - "authorityToolReadbackPrivateStateExposed".to_string(), - json!(authority_tool_readback_private_state_exposed), - ); - output_map.insert("serviceHealthReadback".to_string(), service_health_readback); - output_map.insert( - "serviceHealthReadbackPrivateStateExposed".to_string(), - json!(service_health_readback_private_state_exposed), - ); - output_map.insert( - "swarmOnlineRunbookReadback".to_string(), - swarm_online_runbook_readback, - ); - output_map.insert( - "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()]), - ); - output_map.insert("tuiRows".to_string(), json!([invocation_tui_row])); println!("{}", serde_json::to_string_pretty(&output)?); Ok(()) } @@ -10487,35 +10331,6 @@ 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)> { - 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 --restart-command [--restart-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, @@ -10546,48 +10361,6 @@ fn default_daemon_tool_result_ref( } } -fn default_daemon_tool_result_summary( - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, - requesting_agent_id: &str, -) -> String { - if is_service_health_capability(capability) { - format!( - "{requesting_agent_id} requested service health; {} accepted typed routing to daemon service lifecycle readback via epiphany-verse-query receipt-directory or {}.", - capability.host_daemon_id, WRAPPER_RECEIPT_DIRECTORY_COMMAND - ) - } else if is_swarm_online_runbook_capability(capability) { - format!( - "{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.", - capability.host_daemon_id - ) - } else if is_eve_connect_capability(capability) { - format!( - "{requesting_agent_id} requested Eve surface connection readback; {} returned compact CultMesh surface routing for {}.", - capability.host_daemon_id, capability.host_cluster_id - ) - } else if is_authority_tool_capability(capability) { - format!( - "{requesting_agent_id} requested authority contract readback; {} returned the {} input/receipt contract for {}.", - capability.host_daemon_id, capability.authority_gate, capability.tool_name - ) - } else { - format!( - "{} accepted typed invocation routing for {}.", - capability.host_daemon_id, capability.tool_name - ) - } -} - fn is_service_health_capability(capability: &EpiphanyCultMeshDaemonToolCapabilityEntry) -> bool { capability.capability_id == "epiphany.cluster.self.tool.service-health" && capability.tool_name == "service-health" diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 30c31fa6..98a11cb2 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -19,6 +19,15 @@ - Response owners: Bifrost may answer with its publication receipt; the GitHub publication adapter may answer only after real substrate evidence exists. - Negative proof: after request submission, latest intent is present while latest Bifrost publication and GitHub publication receipts are absent. +## Daemon tool request path (2026-07-12) + +- Owner: the requesting agent owns the invocation intent; the advertised host daemon owns the response receipt. +- Input: a persisted capability plus requester identity, requester cluster, payload reference, and bounded reason/summary. +- Output: one `epiphany.cultmesh.daemon_tool_invocation_intent`, status `pending-provider`, and the host daemon id as `responseOwner`. +- Unknown host status does not block request queuing and is never promoted by the requester. +- Forbidden writers: `invoke-tool` cannot accept or synthesize receipt id/status, result reference, or result summary; it no longer executes local readback functions and labels them daemon results. +- Negative proof: request intent persists, latest provider receipt remains absent, and response-shaped CLI fields are refused. + This is the source-grounded map of the live machine. Historical route and bridge anatomy belongs in git history and evidence ledgers, not here. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 14ebf6af..2817c1a9 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -8,6 +8,10 @@ The conceptual-substitution audit found observation manufacturing the body it cl `epiphany-verse-query bifrost-publication` and its wrapper now submit only `gamecult.bifrost.body_change_publication_intent`. The requester can describe the body change, evidence, review, authorship, and credit subjects; it can no longer supply a Bifrost ledger result, Hands PR receipt, GitHub receipt, commit, PR number, or publication URL and have the local CLI bless them. Output is `pending-bifrost` with null response receipt ids. A physical CultCache proof shows the intent row open while both Bifrost publication and GitHub publication receipts remain absent. Ledger intent rows name the requesting agent as author; Bifrost remains the response lane owner. Next apply this ownership split to tool invocation, Eve connection, daemon poke, and the remaining Bifrost accounting commands. +## 2026-07-12 daemon tool requester/provider split + +`invoke-tool` and wrapper mode `tool-invoke` now write only `epiphany.cultmesh.daemon_tool_invocation_intent`. They return `pending-provider`, name the host daemon as `responseOwner`, expose its observed status without promoting it, and leave receipt/result fields null. A request may queue while the host is `unknown`; readiness is daemon-authored state, not a prerequisite the requester may synthesize. Caller-supplied receipt ids/status, result refs, and result summaries are rejected. The former local service-health, runbook, policy, daemon-status, Eve, and authority readback execution was removed from the request path. Physical proof shows a persisted request accepted against an unknown host, no provider receipt, and rejection of counterfeit accepted/result fields. + This is the re-entry rite for `E:\Projects\EpiphanyAgent`: the waking chant for the local machine-spirit before it touches the forge. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index d3771519..4b67eab6 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 901bc1b0..ade02bde 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -70,7 +70,7 @@ data_flow: - move historical proof to git, commits, smoke artifacts, or distilled evidence rather than plan prose active_subgoals: - - Use `notes/conceptual-substitution-audit-2026-07-12.md` as the current authority-corrosion audit. The June 18 typed swarm-surface pass collapsed bootstrap, observation, request routing, and provider receipt authorship into one local CLI. Diagnostics no longer seed state, loaders no longer manufacture topology/provider/capability rows, missing daemon truth remains unknown, and explicit bootstrap no longer writes synthetic ready heartbeats. The Bifrost body-change publication command is now requester-only: it persists an intent, reports `pending-bifrost`, accepts no caller-supplied ledger/PR/publication result, and leaves Bifrost and GitHub receipts absent. Next cut the same dual-writer corruption from tool invocation, Eve connection, daemon poke, public-proof publication, artifact acceptance, and metrics. + - Use `notes/conceptual-substitution-audit-2026-07-12.md` as the current authority-corrosion audit. The June 18 typed swarm-surface pass collapsed bootstrap, observation, request routing, and provider receipt authorship into one local CLI. Diagnostics no longer seed state or manufacture missing provider/liveness truth. Bifrost body-change publication and daemon tool invocation are requester-only: each persists an intent, reports a pending owner, rejects caller-supplied result fields, and leaves the provider receipt absent. Tool requests may queue while host status is unknown; the requester no longer manufactures readiness or executes local readback helpers as the daemon. Next cut Eve connection, daemon poke, public-proof publication, artifact acceptance, and metrics. - `swarm-overview` is an Epiphany-local, renderer-neutral diagnostic projection over provider-owned typed state. It owns no lifecycle, discovery, composition, or mutation authority. Epiphany publishes clean provider-owned Eve surfaces; Odin may discover them; downstream lowerers and compositors remain outside Epiphany's concern. - 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, diagnostic projections, or ad hoc wrapper summaries become a second daemon-keeper. Global tool readbacks for Self `service-health`, `service-policy-directory`, and `swarm-online-runbook` state `lifecycleOwner=Idunn` and `hostedBody=Epiphany` 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. diff --git a/tools/epiphany_local_run.ps1 b/tools/epiphany_local_run.ps1 index 1d06f9dc..a0bcd559 100644 --- a/tools/epiphany_local_run.ps1 +++ b/tools/epiphany_local_run.ps1 @@ -63,7 +63,6 @@ param( [string]$ToolRequestingClusterId = "epiphany.cluster.persona", [string]$ToolInvocationReason = "", [string]$ToolIntentId = "", - [string]$ToolReceiptId = "", [int]$RepoWorkMaxItems = 1, [int]$RepoSwarmMaxIterations = 8, [string]$RepoSwarmUntil = "blocked-or-published", @@ -1262,11 +1261,8 @@ if ($Mode -eq "tool-invoke") { if ($ToolIntentId -ne "") { $toolInvokeArgs += @("--intent-id", $ToolIntentId) } - if ($ToolReceiptId -ne "") { - $toolInvokeArgs += @("--receipt-id", $ToolReceiptId) - } Invoke-Checked ` - -Label "record daemon tool invocation receipt" ` + -Label "submit daemon tool invocation intent" ` -FilePath $verseQueryExe ` -Arguments $toolInvokeArgs ` -WorkingDirectory $Root ` @@ -2932,39 +2928,7 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) { } Write-Host "Tool directory: status=$($result.status), tools=$($result.toolCount), hostReady=$($result.hostReadyCount), hostAttention=$($result.hostAttentionCount), availableToAllAgents=$($result.invariants.availableToAllAgents), requiresReceipt=$($result.invariants.requiresReceipt), toolRows=$toolRows, privateStateExposed=$($result.invariants.privateStateExposed)" } elseif ($Mode -eq "tool-invoke") { - $invocationRows = "none" - if ($null -ne $result.invocationRows -and $result.invocationRows.Count -gt 0) { - $invocationRows = ($result.invocationRows -join "; ") - } - $serviceHealth = "none" - if ($null -ne $result.serviceHealthReadback -and $null -ne $result.serviceHealthReadback.status) { - $serviceHealth = "status=$($result.serviceHealthReadback.status):owner=$($result.serviceHealthReadback.lifecycleOwner):hostedBody=$($result.serviceHealthReadback.hostedBody):preflight=$($result.serviceHealthReadback.onlinePreflightStatus):childRunbooks=$($result.serviceHealthReadback.onlinePreflightChildRunbookCount):present=$($result.serviceHealthReadback.onlinePreflightPresentCount):hashVerified=$($result.serviceHealthReadback.onlinePreflightHashVerifiedCount):missingArtifacts=$($result.serviceHealthReadback.onlinePreflightMissingArtifactCount):attentionRows=$(@($result.serviceHealthReadback.serviceLifecycleAttentionRows).Count):actionRows=$(@($result.serviceHealthReadback.serviceActionRows).Count):failedChecks=$($result.serviceHealthReadback.serviceExecutionFailedCheckCount):missingChecks=$($result.serviceHealthReadback.serviceExecutionMissingCheckCount):private=$($result.serviceHealthReadback.privateStateExposed)" - } - $swarmOnlineRunbook = "none" - 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)" - } - $eveConnection = "none" - if ($null -ne $result.eveConnectionReadback -and $null -ne $result.eveConnectionReadback.targetClusterId) { - $repoWorkQueueRows = "none" - if ($null -ne $result.eveConnectionReadback.repoWorkQueueTuiRows -and $result.eveConnectionReadback.repoWorkQueueTuiRows.Count -gt 0) { - $repoWorkQueueRows = ($result.eveConnectionReadback.repoWorkQueueTuiRows -join "; ") - } - $eveConnection = "target=$($result.eveConnectionReadback.targetClusterId):surface=$($result.eveConnectionReadback.targetEveSurfaceId):publicDiscussion=$($result.eveConnectionReadback.publicPersonaDiscussionAllowed):actions=$(@($result.eveConnectionReadback.supportedActions).Count):repoWorkQueue=$($result.eveConnectionReadback.repoWorkQueueCount):repoWorkRows=$repoWorkQueueRows:private=$($result.eveConnectionReadback.privateStateExposed)" - } - $authorityTool = "none" - 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, servicePolicyDirectory=$servicePolicyDirectory, invocationRows=$invocationRows, privateStateExposed=$($result.privateStateExposed)" + Write-Host "Tool request: status=$($result.status), requester=$($result.requestingDisplayName), host=$($result.hostDisplayName), hostStatus=$($result.observedHostStatus), tool=$($result.toolName), intent=$($result.intentId), responseOwner=$($result.responseOwner), privateStateExposed=$($result.privateStateExposed)" } elseif ($Mode -eq "swarm-overview") { $attention = "none" if ($null -ne $result.attentionDaemonIds -and $result.attentionDaemonIds.Count -gt 0) {