diff --git a/.gitignore b/.gitignore index af8f556b5..1a4607d74 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,8 @@ logs/ .coverage tests/fixtures/journal/agents/*/*.jsonl tests/fixtures/journal/tokens/*.json -tests/fixtures/journal/*/health/*_dream.jsonl -tests/fixtures/journal/chronicle/*/health/*_dream.jsonl +tests/fixtures/journal/*/health/*.jsonl +tests/fixtures/journal/chronicle/*/health/*.jsonl *.sqlite *.sqlite-shm *.sqlite-wal diff --git a/AGENTS.md b/AGENTS.md index af948284c..20ac015b8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,7 +43,7 @@ make dev # Start stack (Ctrl+C to stop) Cogitate talents have access to all `sol` commands. The following infrastructure commands must never be called by talents because they manage services and data pipelines that should only be operated by the supervisor or a human operator: - `sol supervisor` / `sol start` -- `sol dream` except heartbeat's targeted `sol dream --segment` +- `sol think` except heartbeat's targeted `sol think --segment` - `sol import` - `sol config` - `sol cortex` diff --git a/apps/entities/events.py b/apps/entities/events.py index 6f86a91d1..c7120528e 100644 --- a/apps/entities/events.py +++ b/apps/entities/events.py @@ -1,66 +1,4 @@ # SPDX-License-Identifier: AGPL-3.0-only # Copyright (c) 2026 sol pbc -"""Entity activity tracking via Callosum event handlers. - -Updates last_seen on attached entities when they appear in daily outputs. -Triggered after dream processing completes for each day. -""" - -import logging - -from apps.events import EventContext, on_event -from think.entities import parse_knowledge_graph_entities, touch_entities_from_activity -from think.facets import get_facets - -logger = logging.getLogger(__name__) - - -@on_event("dream", "generators_completed") -def update_entity_activity(ctx: EventContext) -> None: - """Update last_seen for entities mentioned in today's knowledge graph. - - Triggered after generator processing completes. Parses the knowledge graph - for entity names and updates last_seen on matching attached entities - across all facets. - """ - # Only process daily mode (knowledge graph is a daily insight) - if ctx.msg.get("mode") != "daily": - return - - day = ctx.msg.get("day") - if not day: - logger.warning("generators_completed event missing day field") - return - - # Parse entity names from knowledge graph - kg_names = parse_knowledge_graph_entities(day) - if not kg_names: - logger.debug(f"No entities found in knowledge graph for {day}") - return - - logger.info(f"Found {len(kg_names)} entities in knowledge graph for {day}") - - # Update each facet's attached entities - facets = get_facets() - total_updated = 0 - total_matched = 0 - - for facet_name in facets: - result = touch_entities_from_activity(facet_name, kg_names, day) - matched_count = len(result["matched"]) - updated_count = len(result["updated"]) - - if matched_count > 0: - logger.info( - f"Facet '{facet_name}': matched {matched_count}, " - f"updated {updated_count} entities for {day}" - ) - total_matched += matched_count - total_updated += updated_count - - if total_matched > 0: - logger.info( - f"Entity activity update complete for {day}: " - f"{total_matched} matches, {total_updated} updates across {len(facets)} facets" - ) +"""Entity activity tracking via Callosum event handlers.""" diff --git a/apps/health/call.py b/apps/health/call.py index 8f8ed1a7c..68f28ae74 100644 --- a/apps/health/call.py +++ b/apps/health/call.py @@ -25,7 +25,7 @@ def pipeline( False, "--yesterday", help="Summarize yesterday's pipeline." ), ) -> None: - """Summarize dream pipeline health for one day.""" + """Summarize think pipeline health for one day.""" if day is not None and yesterday: typer.echo("--day and --yesterday are mutually exclusive", err=True) raise typer.Exit(1) diff --git a/apps/health/tests/test_call.py b/apps/health/tests/test_call.py index 5c9f4c61b..c62b7990a 100644 --- a/apps/health/tests/test_call.py +++ b/apps/health/tests/test_call.py @@ -57,7 +57,7 @@ def test_mutual_exclusion_error(health_env): def test_pipeline_with_real_fixture(health_env): env = health_env() day = "20260101" - health_path = env.journal / day / "health" / "123_segment_dream.jsonl" + health_path = env.journal / day / "health" / "123_segment.jsonl" health_path.parent.mkdir(parents=True, exist_ok=True) health_path.write_text( "\n".join( diff --git a/apps/health/workspace.html b/apps/health/workspace.html index 3728f5826..96e8c72c6 100644 --- a/apps/health/workspace.html +++ b/apps/health/workspace.html @@ -784,16 +784,16 @@ color: #a78bfa; } -/* Dream Card */ -.dream-card { +/* Think Card */ +.think-card { border-left: 4px solid #f59e0b; } -.dream-card.hidden { +.think-card.hidden { display: none; } -.dream-info { +.think-info { display: flex; flex-wrap: wrap; gap: 1.5em; @@ -812,17 +812,17 @@ color: #6b7280; } -.dream-progress { +.think-progress { margin-bottom: 0.75em; } -.dream-progress-label { +.think-progress-label { font-size: 0.85em; color: #374151; margin-bottom: 0.3em; } -.dream-progress-bar { +.think-progress-bar { width: 100%; height: 6px; background: #e5e7eb; @@ -830,13 +830,13 @@ overflow: hidden; } -.dream-progress-fill { +.think-progress-fill { height: 100%; background: #f59e0b; transition: width 0.3s ease; } -.dream-agents { +.think-agents { font-size: 0.85em; color: #6b7280; margin-top: 0.5em; @@ -1211,14 +1211,14 @@ - -