diff --git a/codex_skills/README.md b/codex_skills/README.md index 04eb74d8..4fccde40 100644 --- a/codex_skills/README.md +++ b/codex_skills/README.md @@ -26,7 +26,7 @@ Codex skills stored in-repo so they can be shared with the community. These are - `homeassistant-dashboard-designer/`: Constrained, button-card-first Lovelace dashboard design system + YAML lint helper. - `homeassistant-yaml-dry-verifier/`: Home Assistant YAML DRY verifier to detect redundant triggers/conditions/actions/sequence blocks and suggest refactors. -- `infrastructure-doc-sync/`: Session closeout workflow to update AGENTS/README/Dashy shortcuts/Infra Info snapshot consistently after infra changes. +- `infrastructure-doc-sync/`: Session closeout workflow to update AGENTS/README/Dashy shortcuts/BearClaw infrastructure snapshot consistently after infra changes. - `network-architecture-diagrammer/`: Mermaid-first homelab/network architecture diagram workflow for Excalidraw-friendly topology and service maps. ### Notes diff --git a/codex_skills/infrastructure-doc-sync/SKILL.md b/codex_skills/infrastructure-doc-sync/SKILL.md index f0f4bf63..c74d971f 100644 --- a/codex_skills/infrastructure-doc-sync/SKILL.md +++ b/codex_skills/infrastructure-doc-sync/SKILL.md @@ -1,6 +1,6 @@ --- name: infrastructure-doc-sync -description: "Use when infra/container placement changes require synchronized AGENTS, docs, and Infra Info updates while keeping AGENTS concise, scoped, and non-runbook." +description: "Use when infra/container placement changes require synchronized AGENTS, docs, Dashy, and BearClaw infrastructure snapshot updates while keeping AGENTS concise, scoped, and non-runbook." --- # Infrastructure Doc Sync @@ -31,8 +31,8 @@ Keep `AGENTS.md` short and task-scoped; move long runbooks to dedicated docs. 5. Dashy shortcuts (if any service URL/host changed): - `h:\hass\docker_files\dashy/conf.yml` - Reload Dashy on docker_17 after edits: `ssh hass@192.168.10.17 "cd ~/docker_files && docker compose up -d dashy"` -6. Infra Info snapshot JSON: - - `docker_69:/home/hass/docker_files/infra_info/data/overview.json` +6. BearClaw infrastructure snapshot: + - `docker_17/codex_appliance` environment map and `/api/admin/infrastructure` ## Workflow @@ -42,12 +42,13 @@ Keep `AGENTS.md` short and task-scoped; move long runbooks to dedicated docs. 4. Move long operational/runbook details out of `AGENTS.md` into a dedicated doc when needed. 5. If end-user entry points changed, update Dashy shortcuts (`dashy/conf.yml`) to match reality. 6. Update README/skill docs impacted by the change (short, factual, no drift). -7. Update `overview.json` to mirror the same outcome at a high level. +7. Refresh/check BearClaw infrastructure context so it mirrors the same outcome at a high level. 8. Validate: - JSON is valid (`python -m json.tool` equivalent). - Dashy `conf.yml` references the intended hostname(s)/ports (no stale LAN IPs unless intentionally required). - AGENTS and README statements do not conflict with runtime. - Repo-level AGENTS do not contain long runbooks duplicated from dedicated docs. + - BearClaw `/api/admin/infrastructure` returns the intended topology/context. ## AGENTS Quality Rules @@ -57,9 +58,9 @@ Keep `AGENTS.md` short and task-scoped; move long runbooks to dedicated docs. - Keep specialized/deeper-scoped AGENTS concise and task-specific. - De-duplicate repeated policy lines across global/workspace/repo scopes. -## Infra Info Content Rules +## BearClaw Snapshot Content Rules -- Keep `overview.json` high-level and planning-focused. +- Keep infrastructure snapshot content high-level and planning-focused. - Do not include secrets, tokens, passwords, or internal file paths. - Avoid step-by-step runbooks. - Prefer host IDs and roles over low-level implementation detail. @@ -79,5 +80,6 @@ Always report: - Final intended topology/placement. - Any Dashy shortcuts touched (or explicitly state "no Dashy updates needed"). - Whether runbook content was moved from AGENTS into a dedicated ops doc. +- BearClaw infrastructure snapshot validation result. - Any unresolved follow-up items. diff --git a/codex_skills/infrastructure-doc-sync/agents/openai.yaml b/codex_skills/infrastructure-doc-sync/agents/openai.yaml index 2029468b..8c06937a 100644 --- a/codex_skills/infrastructure-doc-sync/agents/openai.yaml +++ b/codex_skills/infrastructure-doc-sync/agents/openai.yaml @@ -1,4 +1,4 @@ interface: display_name: "Infrastructure Doc Sync" short_description: "Sync infra docs with concise AGENTS" - default_prompt: "Use $infrastructure-doc-sync to keep AGENTS concise and scoped, move runbook content into dedicated docs when needed, and sync README/Dashy/infra_info overview.json after infra changes." + default_prompt: "Use $infrastructure-doc-sync to keep AGENTS concise and scoped, move runbook content into dedicated docs when needed, and sync README/Dashy/BearClaw infrastructure snapshot context after infra changes." diff --git a/codex_skills/network-architecture-diagrammer/references/excalidraw_mermaid_rules.md b/codex_skills/network-architecture-diagrammer/references/excalidraw_mermaid_rules.md index 344ba187..933b9524 100644 --- a/codex_skills/network-architecture-diagrammer/references/excalidraw_mermaid_rules.md +++ b/codex_skills/network-architecture-diagrammer/references/excalidraw_mermaid_rules.md @@ -50,11 +50,11 @@ flowchart TD end subgraph docker69[docker69] Tunnel[Cloudflared] - Info[Infra Info] + PublicApps[Public Apps] end Tunnel --> Appliance - Tunnel --> Info + Tunnel --> PublicApps HA --> MQTT Frigate --> HA ``` diff --git a/config/.HA_VERSION b/config/.HA_VERSION index 881a774d..5c20f85f 100755 --- a/config/.HA_VERSION +++ b/config/.HA_VERSION @@ -1 +1 @@ -2026.4.4 \ No newline at end of file +2026.5.0 \ No newline at end of file diff --git a/config/dashboards/infrastructure/partials/docker_containers_sections.yaml b/config/dashboards/infrastructure/partials/docker_containers_sections.yaml index 9ceed273..39566f7a 100644 --- a/config/dashboards/infrastructure/partials/docker_containers_sections.yaml +++ b/config/dashboards/infrastructure/partials/docker_containers_sections.yaml @@ -4,12 +4,13 @@ # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # ------------------------------------------------------------------- # Infrastructure Partial - Docker containers sections -# Related Issue: 1560, 1584 +# Related Issue: 1560, 1584, 1725 # Sections layout for the Docker containers view. # ------------------------------------------------------------------- # Notes: Auto-discovers Portainer container entities from `switch.*_container`. # Notes: Keeps cards visible when Portainer telemetry is unavailable (degraded mode). # Notes: Includes stack-level status tiles from Portainer `*_stack_status` entities. +# Notes: Portainer volume usage is visible; volume prune is confined to host maintenance popups with hold-confirm actions. ###################################################################### - type: grid @@ -103,6 +104,65 @@ action: navigate navigation_path: '#infra-docker-14' +- type: grid + column_span: 4 + columns: 1 + square: false + cards: + - type: custom:vertical-stack-in-card + grid_options: + columns: full + card_mod: + style: !include /config/dashboards/infrastructure/card_mod/infra_panel.yaml + cards: + - type: custom:button-card + template: bearstone_infra_panel_header + name: Docker Volumes + - type: custom:auto-entities + show_empty: false + grid_options: + columns: full + card: + type: custom:layout-card + layout_type: custom:grid-layout + layout: + grid-template-columns: repeat(4, minmax(0, 1fr)) + grid-auto-flow: row + grid-auto-rows: min-content + grid-gap: 12px + margin: 0 + mediaquery: + "(max-width: 900px)": + grid-template-columns: repeat(2, minmax(0, 1fr)) + card_param: cards + filter: + include: + - entity_id: "/^sensor\\..*_volume_disk_usage_total_size$/" + options: + type: custom:button-card + template: bearstone_infra_list_row + icon: mdi:database + name: > + [[[ + const friendly = entity?.attributes?.friendly_name + ? String(entity.attributes.friendly_name) + : String(entity?.entity_id ?? 'Volume usage'); + return friendly.replace(/\s+Volume disk usage total size$/, ''); + ]]] + state_display: > + [[[ + const value = Number(entity?.state); + const unit = entity?.attributes?.unit_of_measurement ?? ''; + if (!Number.isFinite(value)) return entity?.state ?? 'unknown'; + if (unit === 'MiB' && value > 0 && value < 1) { + return `${(value * 1024).toFixed(1)} KiB`; + } + const precision = value >= 10 ? 1 : 2; + return `${value.toFixed(precision)} ${unit}`.trim(); + ]]] + sort: + method: name + - type: grid column_span: 4 columns: 1 @@ -150,6 +210,16 @@ sort: method: name +- type: grid + column_span: 4 + columns: 1 + square: false + cards: + - !include /config/dashboards/infrastructure/popups/docker_10_maintenance.yaml + - !include /config/dashboards/infrastructure/popups/docker_17_maintenance.yaml + - !include /config/dashboards/infrastructure/popups/docker_69_maintenance.yaml + - !include /config/dashboards/infrastructure/popups/docker_14_maintenance.yaml + - type: grid column_span: 4 columns: 1 diff --git a/config/dashboards/infrastructure/popups/docker_10_maintenance.yaml b/config/dashboards/infrastructure/popups/docker_10_maintenance.yaml index 481942ad..44b4943d 100644 --- a/config/dashboards/infrastructure/popups/docker_10_maintenance.yaml +++ b/config/dashboards/infrastructure/popups/docker_10_maintenance.yaml @@ -6,8 +6,9 @@ # Infrastructure Popup - docker_10 maintenance # Bubble Card popup for host maintenance details and safe cleanup actions. # ------------------------------------------------------------------- -# Related Issue: 1560 +# Related Issue: 1560, 1725 # Notes: Reuses existing Infrastructure button-card templates inside the popup. +# Notes: Volume prune is destructive; keep it hold-to-act with an explicit confirmation. ###################################################################### type: vertical-stack @@ -35,6 +36,13 @@ cards: last_update_sensor: sensor.docker_10_apt_last_update prune_button: button.carlo_hass_prune_unused_images name: docker_10 + - type: custom:button-card + template: bearstone_infra_volume_prune_tile + name: docker_10 volumes + entity: button.carlo_hass_prune_unused_volumes + variables: + prune_button: button.carlo_hass_prune_unused_volumes + name: docker_10 - type: custom:button-card template: bearstone_infra_tile entity: sensor.docker_10_apt_last_update diff --git a/config/dashboards/infrastructure/popups/docker_14_maintenance.yaml b/config/dashboards/infrastructure/popups/docker_14_maintenance.yaml index ade276f0..73e0151e 100644 --- a/config/dashboards/infrastructure/popups/docker_14_maintenance.yaml +++ b/config/dashboards/infrastructure/popups/docker_14_maintenance.yaml @@ -6,8 +6,9 @@ # Infrastructure Popup - docker_14 maintenance # Bubble Card popup for host maintenance details and safe cleanup actions. # ------------------------------------------------------------------- -# Related Issue: 1560 +# Related Issue: 1560, 1725 # Notes: Reuses existing Infrastructure button-card templates inside the popup. +# Notes: Volume prune is destructive; keep it hold-to-act with an explicit confirmation. ###################################################################### type: vertical-stack @@ -35,6 +36,13 @@ cards: last_update_sensor: sensor.docker_14_apt_last_update prune_button: button.docker2_prune_unused_images name: docker_14 + - type: custom:button-card + template: bearstone_infra_volume_prune_tile + name: docker_14 volumes + entity: button.docker2_prune_unused_volumes + variables: + prune_button: button.docker2_prune_unused_volumes + name: docker_14 - type: custom:button-card template: bearstone_infra_tile entity: sensor.docker_14_apt_last_update diff --git a/config/dashboards/infrastructure/popups/docker_17_maintenance.yaml b/config/dashboards/infrastructure/popups/docker_17_maintenance.yaml index 38398d5b..53c92cf1 100644 --- a/config/dashboards/infrastructure/popups/docker_17_maintenance.yaml +++ b/config/dashboards/infrastructure/popups/docker_17_maintenance.yaml @@ -6,8 +6,9 @@ # Infrastructure Popup - docker_17 maintenance # Bubble Card popup for host maintenance details and safe cleanup actions. # ------------------------------------------------------------------- -# Related Issue: 1560 +# Related Issue: 1560, 1725 # Notes: Reuses existing Infrastructure button-card templates inside the popup. +# Notes: Volume prune is destructive; keep it hold-to-act with an explicit confirmation. ###################################################################### type: vertical-stack @@ -35,6 +36,13 @@ cards: last_update_sensor: sensor.docker_17_apt_last_update prune_button: button.docker17_prune_unused_images name: docker_17 + - type: custom:button-card + template: bearstone_infra_volume_prune_tile + name: docker_17 volumes + entity: button.docker17_prune_unused_volumes + variables: + prune_button: button.docker17_prune_unused_volumes + name: docker_17 - type: custom:button-card template: bearstone_infra_tile entity: sensor.docker_17_apt_last_update diff --git a/config/dashboards/infrastructure/popups/docker_69_maintenance.yaml b/config/dashboards/infrastructure/popups/docker_69_maintenance.yaml index d9eb670b..6cd330b2 100644 --- a/config/dashboards/infrastructure/popups/docker_69_maintenance.yaml +++ b/config/dashboards/infrastructure/popups/docker_69_maintenance.yaml @@ -6,8 +6,9 @@ # Infrastructure Popup - docker_69 maintenance # Bubble Card popup for host maintenance details and safe cleanup actions. # ------------------------------------------------------------------- -# Related Issue: 1560 +# Related Issue: 1560, 1725 # Notes: Reuses existing Infrastructure button-card templates inside the popup. +# Notes: Volume prune is destructive; keep it hold-to-act with an explicit confirmation. ###################################################################### type: vertical-stack @@ -35,6 +36,13 @@ cards: last_update_sensor: sensor.docker_69_apt_last_update prune_button: button.docker69_prune_unused_images name: docker_69 + - type: custom:button-card + template: bearstone_infra_volume_prune_tile + name: docker_69 volumes + entity: button.docker69_prune_unused_volumes + variables: + prune_button: button.docker69_prune_unused_volumes + name: docker_69 - type: custom:button-card template: bearstone_infra_tile entity: sensor.docker_69_apt_last_update diff --git a/config/dashboards/infrastructure/templates/button_card_templates.yaml b/config/dashboards/infrastructure/templates/button_card_templates.yaml index 48f936bf..51b71123 100644 --- a/config/dashboards/infrastructure/templates/button_card_templates.yaml +++ b/config/dashboards/infrastructure/templates/button_card_templates.yaml @@ -158,6 +158,27 @@ bearstone_infra_prune_tile: state: - font-weight: 700 +bearstone_infra_volume_prune_tile: + template: bearstone_infra_tile + show_state: true + icon: mdi:database-remove + label: >- + [[[ + return variables.subtitle ? variables.subtitle : "Hold to prune unused volumes"; + ]]] + hold_action: + action: call-service + service: button.press + service_data: + entity_id: '[[[ return variables.prune_button ]]]' + confirmation: + text: '[[[ return "Prune unused volumes on " + (variables.name ? variables.name : "host") + "?" ]]]' + styles: + icon: + - color: var(--secondary-text-color) + state: + - font-weight: 700 + bearstone_infra_apt_prune_tile: template: bearstone_infra_prune_tile show_state: true diff --git a/config/dashboards/infrastructure/views/03_docker_containers.yaml b/config/dashboards/infrastructure/views/03_docker_containers.yaml index e26df6a8..4184f20f 100644 --- a/config/dashboards/infrastructure/views/03_docker_containers.yaml +++ b/config/dashboards/infrastructure/views/03_docker_containers.yaml @@ -4,10 +4,11 @@ # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # ------------------------------------------------------------------- # Infrastructure View - Docker containers -# Related Issue: 1560 +# Related Issue: 1560, 1725 # Container status + restart controls (Portainer integration). # ------------------------------------------------------------------- # Notes: Uses `binary_sensor.*_status` and `button.*_restart_container` entities (Portainer integration). +# Notes: 2026.5 Portainer volume prune controls are exposed through confirmed host maintenance popups; kill/recreate buttons are intentionally not exposed broadly. ###################################################################### title: Docker diff --git a/config/packages/docker_infrastructure.yaml b/config/packages/docker_infrastructure.yaml index 249e0d54..e68c2f3c 100644 --- a/config/packages/docker_infrastructure.yaml +++ b/config/packages/docker_infrastructure.yaml @@ -4,7 +4,7 @@ # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # ------------------------------------------------------------------- # Docker Infrastructure - Host patching and container alerts -# Related Issue: 1632, 1584 +# Related Issue: 1632, 1584, 1739 # APT results and container down repairs. # ------------------------------------------------------------------- # Notes: Hosts run daily read-only APT pending checks plus Mon/Thu 12:00 APT jobs. @@ -16,6 +16,7 @@ # Notes: Outage escalation keys off the configured monitored group so host-wide telemetry drops do not fall out of scope before the delayed Joanna dispatch runs. # Notes: Weekly reconcile should replace retired container-name switches with the current container-ID-prefixed discovery set. # Notes: Tapple is now served by `games_hub` on `/tapple/`; do not keep a standalone `tapple` container switch in the monitored group. +# Notes: Infra Info was removed; BearClaw Admin is the planning snapshot surface. ###################################################################### input_datetime: @@ -111,8 +112,6 @@ switch: - switch.home_assistant_container_2 - switch.imposter_container - switch.imposter_container_2 - - switch.infra_info_container - - switch.infra_info_container_2 - switch.kingcrafthomes_container - switch.kingcrafthomes_container_2 - switch.lmediaservices_container diff --git a/docs/diagrams/bear-stone-proxmox-docker-topology.md b/docs/diagrams/bear-stone-proxmox-docker-topology.md index 30ed3cc8..8815b655 100644 --- a/docs/diagrams/bear-stone-proxmox-docker-topology.md +++ b/docs/diagrams/bear-stone-proxmox-docker-topology.md @@ -4,4 +4,5 @@ - `docker10` is pinned to ProxMox1 (`qemu/105`) based on the current workspace inventory. - `docker14`, `docker17`, and `docker69` are shown as cluster-managed Docker VMs on shared storage because the current AGENTS inventory does not pin them to a single Proxmox node. - The diagram is intentionally hierarchy-first. It shows hosts and containers, not every runtime network edge between services. +- Infra Info is omitted because it was removed; BearClaw Admin owns the replacement infrastructure planning view. - Use the Mermaid source as the editable system-of-record, then import it into Excalidraw for spacing and visual cleanup when a polished graphic is needed. diff --git a/docs/diagrams/bear-stone-proxmox-docker-topology.mmd b/docs/diagrams/bear-stone-proxmox-docker-topology.mmd index c5b8809b..fe30e524 100644 --- a/docs/diagrams/bear-stone-proxmox-docker-topology.mmd +++ b/docs/diagrams/bear-stone-proxmox-docker-topology.mmd @@ -60,7 +60,6 @@ flowchart TD end subgraph D69[docker69 - public edge and utility apps] - D69_INFO[infra_info] D69_CF_WP[cloudflared_wp] D69_CF_KCH[cloudflared_kch] D69_WP_DB[wordpress_db]