brainlayer 1.6.2__tar.gz → 1.6.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brainlayer-1.6.2 → brainlayer-1.6.4}/PKG-INFO +1 -1
- {brainlayer-1.6.2 → brainlayer-1.6.4}/pyproject.toml +1 -1
- {brainlayer-1.6.2 → brainlayer-1.6.4}/server.json +2 -2
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/__init__.py +1 -1
- brainlayer-1.6.4/src/brainlayer/_build.py +1 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/brainbar_auto_activation.py +18 -4
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/brainbar_identity.py +1 -1
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/health_facts.py +1 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/watcher.py +244 -11
- brainlayer-1.6.2/src/brainlayer/_build.py +0 -1
- {brainlayer-1.6.2 → brainlayer-1.6.4}/.gitignore +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/LICENSE +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/README.md +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/brainlayer-version-check.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/hotlane_brainbar_daemon.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/backup-daily.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/brainlayer-env-run.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/brainlayer.env.example +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.backup-daily.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.daemon.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.decay.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.drain.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.health-check.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.hotlane-brainbar.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.index.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.jsonl-backup.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.log-cap.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.maintenance-nightly.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.maintenance-weekly.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.maintenance.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.observability.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.p0-counter.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.repair-fts.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.t3-ingest.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.throughput-watchdog.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.tier0-watchdog.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.wal-checkpoint.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.watch.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.etanhey.brainlayer-fleet-watchdog.plist +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/fleet-watchdog.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/install.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/jsonl-backup.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/throughput-watchdog.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/release-verify-signatures.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/tier0-watchdog.sh +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/__main__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/_helpers.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/agent_census.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/agent_profiles.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/agent_provenance.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/agy_attribution.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/alarm.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/archive_collapse.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/archive_lifecycle.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/backup_daily.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/backup_retention_invariant.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/badge_state.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/bitemporal.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/brainbar_activation.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/brainbar_hybrid_helper.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/cachedelete_purge.swift +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/calibrate.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/chunk_origin.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/chunk_origin_backfill.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/chunk_origin_wipe.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/chunk_write.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/classify.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/claude_paths.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/cli/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/cli/wizard.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/cli_jobs.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/cli_new.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/cloud_backfill.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/clustering.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/codex_zst.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/component_jobs.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/config.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/consolidation_plan.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/content_class.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/content_hash_repair.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/correction_judge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/data/agents_registry.yaml +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/data/sandbox_seeds/skill-eval-baseline.json +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/db_shrink.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/decay.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/decay_backfill.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/decay_job.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/dedupe.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/dedupe_merge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/deploy_drift.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/disk_space.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/doctor.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/drain.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/drain_liveness.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/drive_credentials.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/embeddings.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/engine.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/enrichment_replay.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/abcde_enrich_runner.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/abcde_variants.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/abcde_variants.yaml +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/benchmark.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/enrichment_gold.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/enrichment_graders.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/enrichment_judge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/enrichment_llm_judge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/enrichment_quality_benchmark.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/experiment_store.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/fixtures/README.md +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/labeling/enrichment-labeler.html +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/__main__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/baseline_store.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/cli.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/models.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/phoenix_client.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/regression_gate.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/phoenix_gate/triggers.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/eval/pilot_artifact_report.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/fallback_replay.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/git_learning.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/health_check.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/health_verdict.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/hook_python.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/hooks/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/hooks/indexer.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/hotlane_budget.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/import_sweep.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/index_admission.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/index_budget.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/index_completeness.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/index_new.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/index_watchdog.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/ingest/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/ingest/codex.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/ingest/codex_manifest.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/ingest/t3.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/ingest_denylist.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/ingest_guard.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/isolation_proof.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/job_alerts.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/job_lifecycle_health.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/jobs.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/jsonl_backup.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg_cleanup.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg_judge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg_promotion.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg_repo.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg_review_session.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg_session_finish.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/kg_session_harvest.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/launchd_consolidation.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/launchd_install.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/launchd_primitive.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/launchd_revert.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/launcher_policy_reconcile.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/lexical_defense.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/lexical_defense_dictionary.json +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/linkedin_import.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/log_cap.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/maintenance.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/maintenance_calendar.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/maintenance_control.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/maintenance_upload_recovery.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/_format.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/_shared.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/enrich_handler.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/entity_handler.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/palette.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/search_handler.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/store_handler.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp/tags_handler.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp_socket_config.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/mcp_stdio_bridge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/memory_types.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/migrate.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/migration_custody.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/migration_journal.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/migration_runtime.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/notification_policy.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/observability_backup.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/observability_indexes.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/observability_surface.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/observability_transport.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/p0_longitudinal_count.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/parent_death.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/paths.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pause.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/phonetic.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/__init__.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/agent_enrichment.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/analyze_communication.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/batch_extraction.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/brain_graph.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/chat_tags.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/chunk.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/classify.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/cloud_scrub.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/cluster_sampling.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/code_intelligence.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/correction_detection.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/correction_mining.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/digest.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/enrichment_prompts.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/enrichment_results.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/enrichment_tiers.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/entity_extraction.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/entity_resolution.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/extract.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/extract_claude_desktop.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/extract_corrections.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/extract_markdown.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/extract_whatsapp.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/frustration_mining.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/git_overlay.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/kg_extraction.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/kg_extraction_groq.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/longitudinal_analyzer.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/obsidian_export.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/operation_grouping.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/plan_linking.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/rate_limiter.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/relation_backfill.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/relation_verification.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/sanitize.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/secret_scrub.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/semantic_style.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/sentiment.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/session_history.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/style_embed.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/style_index.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/tag_entity_promotion.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/temporal_chains.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/time_batcher.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/unified_timeline.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/pipeline/write_queue.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/policy_reconcile.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/provenance.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/provenance_autosupersede.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/provenance_integration.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/queue_io.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/queue_merge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/readonly_snapshot.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/reembed_backfill.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/retired_services.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/runtime_store.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/sandbox_db.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/schema_ddl_ledger.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/scoping.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/scrub_at_rest.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/search_fanout.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/search_profile.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/search_repo.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/search_response.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/service_supervisor.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/session_repo.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/setup.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/socket_hygiene.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/source_class_migration.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/spotlight.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/storage.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/store.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/supervisor_adapters.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/supervisor_child.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/supervisor_diagnostics.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/supervisor_guard.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/supervisor_jobs.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/system_prompt_guard.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/t3_linkage_alarm.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/t3_provenance.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/t3_sources.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/tag_normalization.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/taxonomy.json +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/telemetry.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/timestamp_iso.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/types.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/vector_store.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/wal_checkpoint.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/watcher_bridge.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/writer_policy.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/writer_telemetry.py +0 -0
- {brainlayer-1.6.2 → brainlayer-1.6.4}/src/brainlayer/zstd_stream.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: brainlayer
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.4
|
|
4
4
|
Summary: Persistent local memory for AI agents — 16 BrainBar MCP tools, semantic search, knowledge graph, SQLite
|
|
5
5
|
Project-URL: Homepage, https://brainlayer.etanheyman.com
|
|
6
6
|
Project-URL: Repository, https://github.com/EtanHey/brainlayer
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.etanhey/brainlayer",
|
|
4
4
|
"title": "BrainLayer",
|
|
5
5
|
"description": "Persistent local memory for AI agents \u2014 semantic search, knowledge graph, and 16 BrainBar MCP tools with ToolAnnotations over SQLite.",
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.4",
|
|
7
7
|
"websiteUrl": "https://brainlayer.etanheyman.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/EtanHey/brainlayer",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"registryType": "pypi",
|
|
15
15
|
"registryBaseUrl": "https://pypi.org",
|
|
16
16
|
"identifier": "brainlayer",
|
|
17
|
-
"version": "1.6.
|
|
17
|
+
"version": "1.6.4",
|
|
18
18
|
"runtimeHint": "pipx",
|
|
19
19
|
"transport": {
|
|
20
20
|
"type": "stdio"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
__version__ = "1.6.
|
|
5
|
+
__version__ = "1.6.4"
|
|
6
6
|
# Git sha the distributed package was built from; stamped by the release build, None in a source tree.
|
|
7
7
|
# scripts/sprint_gate.py reads it in "keg" mode to prove the served package is the code under test.
|
|
8
8
|
# No runtime `str | None` annotation: launchd/install.sh imports this under /usr/bin/python3 (3.9).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
BUILD_SHA = "5491e61d0338ea848105feea0f674dcaa0add738"
|
|
@@ -20,6 +20,15 @@ class ProcessScanUnavailable(Exception):
|
|
|
20
20
|
"""Detection is unknown; only the safe exception class name may escape."""
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
def inspect_processes(function, *args):
|
|
24
|
+
try:
|
|
25
|
+
return function(*args)
|
|
26
|
+
except (subprocess.TimeoutExpired, TimeoutError) as exc:
|
|
27
|
+
error = ProcessScanUnavailable(type(exc).__name__)
|
|
28
|
+
error.inspection_timeout = True
|
|
29
|
+
raise error from None
|
|
30
|
+
|
|
31
|
+
|
|
23
32
|
def process_table():
|
|
24
33
|
result = subprocess.run(
|
|
25
34
|
["/bin/ps", "-axo", "pid=,ppid=,comm=,args="], capture_output=True, text=True, check=True, timeout=5
|
|
@@ -68,10 +77,12 @@ class AutoActivator:
|
|
|
68
77
|
except BlockingIOError:
|
|
69
78
|
return
|
|
70
79
|
failures = self.state.with_suffix(".scan.json")
|
|
80
|
+
prior = json.loads(failures.read_text()) if failures.exists() else {}
|
|
71
81
|
try:
|
|
72
82
|
self._tick()
|
|
73
83
|
except ProcessScanUnavailable as exc:
|
|
74
|
-
|
|
84
|
+
if not getattr(exc, "inspection_timeout", False):
|
|
85
|
+
prior = json.loads(failures.read_text()) if failures.exists() else {}
|
|
75
86
|
count = min(prior.get("failures", 0) + 1, 12)
|
|
76
87
|
_atomic_write_json(failures, {"failures": count})
|
|
77
88
|
if count >= 12:
|
|
@@ -105,11 +116,14 @@ class AutoActivator:
|
|
|
105
116
|
(
|
|
106
117
|
"BrainBar activation process scan failed for >=12 ticks:",
|
|
107
118
|
"BrainBar activation monitor refused: Command '['/bin/ps',",
|
|
119
|
+
"BrainBar activation monitor refused: Command '['/usr/sbin/lsof',",
|
|
120
|
+
"BrainBar activation monitor refused: Command '['/bin/launchctl',",
|
|
121
|
+
"BrainBar activation monitor refused: running-bundle inspection deadline exceeded",
|
|
108
122
|
"BrainBar activation monitor refused: unreadable process table",
|
|
109
123
|
)
|
|
110
124
|
):
|
|
111
125
|
report("brainbar-activation", None)
|
|
112
|
-
absent = bool(processes) and all(loaded
|
|
126
|
+
absent = bool(processes) and all(inspect_processes(loaded, label).returncode == 113 for label, _ in JOBS)
|
|
113
127
|
if not absent:
|
|
114
128
|
if prior:
|
|
115
129
|
path.unlink()
|
|
@@ -153,8 +167,8 @@ class AutoActivator:
|
|
|
153
167
|
prior = json.loads(self.state.read_text()) if self.state.exists() else {}
|
|
154
168
|
if prior.get("identity") == identity and prior.get("stage") == "ready":
|
|
155
169
|
return
|
|
156
|
-
states = [loaded
|
|
157
|
-
if all(code == 0 for code in states) and running_bundle_matches
|
|
170
|
+
states = [inspect_processes(loaded, label).returncode for label, _ in JOBS]
|
|
171
|
+
if all(code == 0 for code in states) and inspect_processes(running_bundle_matches, app):
|
|
158
172
|
_atomic_write_json(self.state, {"identity": identity, "stage": "ready"})
|
|
159
173
|
report("brainbar-activation", None)
|
|
160
174
|
return
|
|
@@ -59,7 +59,7 @@ def running_bundle_matches(app: Path, *, timeout=10) -> bool:
|
|
|
59
59
|
program = re.search(r"(?m)^\s*program\s*=\s*(.*?)\s*$", state.stdout)
|
|
60
60
|
if state.returncode or not pid or not program or program[1].strip('"') != str(executable):
|
|
61
61
|
return False
|
|
62
|
-
result = run(["/usr/sbin/lsof", "-a", "-p", pid[1], "-d", "txt", "-F", "Din"], remaining())
|
|
62
|
+
result = run(["/usr/sbin/lsof", "-b", "-w", "-a", "-p", pid[1], "-d", "txt", "-F", "Din"], remaining())
|
|
63
63
|
if result.returncode:
|
|
64
64
|
return False
|
|
65
65
|
device = inode = None
|
|
@@ -204,6 +204,7 @@ def watcher_stall_codes(payload: Mapping[str, Any]) -> Any:
|
|
|
204
204
|
):
|
|
205
205
|
return UNOBSERVED
|
|
206
206
|
codes = [r for r in WATCHER_STALL_REASONS if r in reasons]
|
|
207
|
+
codes += sorted({r for r in reasons if r.startswith("growth_not_indexed:")})
|
|
207
208
|
if probe and probe_for >= WATCHER_DB_PROBE_GRACE_S:
|
|
208
209
|
codes.append("db_probe_failed")
|
|
209
210
|
return tuple(codes + [f"root_missing:{r}" for r in roots])
|
|
@@ -498,6 +498,89 @@ def _agy_step_text(entry: dict[str, Any], role: str) -> str:
|
|
|
498
498
|
return stripped
|
|
499
499
|
|
|
500
500
|
|
|
501
|
+
_GROWTH_PROVIDERS = frozenset({"claude", "codex", "cursor", "cursor-agent-transcripts", "gemini"})
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
_GROWTH_CONTENT_ROLES = frozenset({"user", "assistant", "model", "gemini", "ai", "bot"})
|
|
505
|
+
_GROWTH_NEUTRAL_TYPES = frozenset({"summary", "system", "progress", "file-history-snapshot", "queue-operation"})
|
|
506
|
+
_GROWTH_CODEX_METADATA = frozenset({"session_meta", "turn_context", "event_msg"})
|
|
507
|
+
_GROWTH_CODEX_SKIPPED_ITEMS = frozenset({"function_call", "function_call_output"})
|
|
508
|
+
_GROWTH_CURSOR_METADATA = frozenset({"tool"})
|
|
509
|
+
_GROWTH_AGY_METADATA = frozenset({"GENERIC", "ERROR_MESSAGE"})
|
|
510
|
+
_GROWTH_TOOL_BLOCKS = frozenset({"tool_use", "tool_result", "function_call", "function_call_output"})
|
|
511
|
+
|
|
512
|
+
_GROWTH_LIST_BLOCKS = frozenset({None, "text", "input_text", "output_text"}) | _GROWTH_TOOL_BLOCKS
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def _growth_content_shape(value: Any) -> bool:
|
|
516
|
+
if _content_to_text(value):
|
|
517
|
+
return True
|
|
518
|
+
if isinstance(value, str):
|
|
519
|
+
return True
|
|
520
|
+
if isinstance(value, list):
|
|
521
|
+
return all(
|
|
522
|
+
(not isinstance(item, dict) or item.get("type") in _GROWTH_LIST_BLOCKS) and _growth_content_shape(item)
|
|
523
|
+
for item in value
|
|
524
|
+
)
|
|
525
|
+
if isinstance(value, dict):
|
|
526
|
+
if value.get("type") in _GROWTH_TOOL_BLOCKS:
|
|
527
|
+
return any(key in value for key in ("name", "content", "output", "tool_use_id"))
|
|
528
|
+
return any(key in value and _growth_content_shape(value[key]) for key in ("text", "content", "message"))
|
|
529
|
+
return False
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
def growth_entry_class(entry: dict, provider: str) -> str:
|
|
533
|
+
"""Content shape, deliberately skipped metadata, or unknown format; never type-only content."""
|
|
534
|
+
kind = entry.get("type")
|
|
535
|
+
if provider == "gemini" and kind in _AGY_STEP_ROLES:
|
|
536
|
+
return "recognised" if "step_index" in entry and isinstance(entry.get("content"), str) else "unrecognised"
|
|
537
|
+
if kind in {"user", "assistant"} and isinstance(entry.get("message"), dict):
|
|
538
|
+
message = entry["message"]
|
|
539
|
+
return "recognised" if "content" in message and _growth_content_shape(message["content"]) else "unrecognised"
|
|
540
|
+
payload = entry.get("payload")
|
|
541
|
+
candidate = payload if isinstance(payload, dict) and payload else entry
|
|
542
|
+
if provider == "codex" and kind == "response_item":
|
|
543
|
+
if candidate.get("type") in _GROWTH_CODEX_SKIPPED_ITEMS:
|
|
544
|
+
return "neutral" if any(key in candidate for key in ("name", "output")) else "unrecognised"
|
|
545
|
+
if not isinstance(payload, dict) or payload.get("type") != "message":
|
|
546
|
+
return "unrecognised"
|
|
547
|
+
role = (
|
|
548
|
+
candidate.get("role")
|
|
549
|
+
or candidate.get("sender")
|
|
550
|
+
or candidate.get("speaker")
|
|
551
|
+
or _mapping_value(candidate.get("author")).get("role")
|
|
552
|
+
or _mapping_value(candidate.get("message")).get("role")
|
|
553
|
+
)
|
|
554
|
+
if str(role or "").lower() in _GROWTH_CONTENT_ROLES:
|
|
555
|
+
body = candidate.get("content") or candidate.get("text") or candidate.get("message")
|
|
556
|
+
if body is None:
|
|
557
|
+
body = next((candidate[key] for key in ("content", "text", "message") if key in candidate), None)
|
|
558
|
+
return "recognised" if _growth_content_shape(body) else "unrecognised"
|
|
559
|
+
# Generic role-bearing metadata can carry content: test the normaliser's role gate first.
|
|
560
|
+
if not role and (
|
|
561
|
+
kind in _GROWTH_NEUTRAL_TYPES
|
|
562
|
+
or provider == "codex"
|
|
563
|
+
and kind in _GROWTH_CODEX_METADATA
|
|
564
|
+
or provider in ("cursor", "cursor-agent-transcripts")
|
|
565
|
+
and kind in _GROWTH_CURSOR_METADATA
|
|
566
|
+
or provider == "gemini"
|
|
567
|
+
and kind in _GROWTH_AGY_METADATA
|
|
568
|
+
):
|
|
569
|
+
return "neutral"
|
|
570
|
+
return "unrecognised"
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
def recognised_provider_entry(entry: dict, provider: str) -> bool:
|
|
574
|
+
return growth_entry_class(entry, provider) == "recognised"
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
def _growth_timestamp(value: Any) -> bool:
|
|
578
|
+
try:
|
|
579
|
+
return type(value) in (int, float) and math.isfinite(value)
|
|
580
|
+
except OverflowError:
|
|
581
|
+
return False
|
|
582
|
+
|
|
583
|
+
|
|
501
584
|
def normalize_provider_entry(entry: dict[str, Any], provider: str) -> dict[str, Any] | None:
|
|
502
585
|
if not isinstance(entry, dict):
|
|
503
586
|
return None
|
|
@@ -1332,6 +1415,13 @@ class JSONLTailer:
|
|
|
1332
1415
|
"""Return whether an already-read complete record is waiting to be emitted."""
|
|
1333
1416
|
return b"\n" in self._buffer
|
|
1334
1417
|
|
|
1418
|
+
def _count_source_line(self, end_offset: int, *, neutral: bool = False) -> None:
|
|
1419
|
+
self.lines_read_total = getattr(self, "lines_read_total", 0) + 1
|
|
1420
|
+
self.neutral_lines_total = getattr(self, "neutral_lines_total", 0) + int(neutral)
|
|
1421
|
+
if end_offset > getattr(self, "growth_frontier", 0):
|
|
1422
|
+
self.growth_lines_total = getattr(self, "growth_lines_total", 0) + 1
|
|
1423
|
+
self.growth_neutral_total = getattr(self, "growth_neutral_total", 0) + int(neutral)
|
|
1424
|
+
|
|
1335
1425
|
def read_buffered_lines(self, max_lines: int | None = None) -> list[dict]:
|
|
1336
1426
|
"""Parse complete buffered records without reading more bytes from disk."""
|
|
1337
1427
|
lines = []
|
|
@@ -1351,6 +1441,7 @@ class JSONLTailer:
|
|
|
1351
1441
|
|
|
1352
1442
|
if not line_data.strip():
|
|
1353
1443
|
consumed_bytes = nl_idx + 1
|
|
1444
|
+
self._count_source_line(starting_offset + nl_idx + 1, neutral=True)
|
|
1354
1445
|
continue
|
|
1355
1446
|
|
|
1356
1447
|
if self.max_record_bytes is not None and len(line_data) > self.max_record_bytes:
|
|
@@ -1367,6 +1458,7 @@ class JSONLTailer:
|
|
|
1367
1458
|
from .t3_provenance import compact_codex_header
|
|
1368
1459
|
|
|
1369
1460
|
self.first_record = compact_codex_header(parsed, nl_idx + 1)
|
|
1461
|
+
self._count_source_line(starting_offset + nl_idx + 1)
|
|
1370
1462
|
line_end_offset = starting_offset + nl_idx + 1
|
|
1371
1463
|
consumed_bytes = nl_idx + 1
|
|
1372
1464
|
if isinstance(parsed, dict):
|
|
@@ -1708,6 +1800,49 @@ class JSONLWatcher:
|
|
|
1708
1800
|
self._stop = threading.Event()
|
|
1709
1801
|
self._last_registry_flush = time.monotonic()
|
|
1710
1802
|
self.health_path = Path(health_path).expanduser() if health_path else None
|
|
1803
|
+
self._growth = {}
|
|
1804
|
+
self._growth_backfill = {}
|
|
1805
|
+
if self.health_path and self.health_path.exists():
|
|
1806
|
+
try:
|
|
1807
|
+
restored = json.loads(self.health_path.read_text())
|
|
1808
|
+
prior = restored.get("source_growth", {})
|
|
1809
|
+
backfill = restored.get("growth_backfill", {})
|
|
1810
|
+
if isinstance(backfill, dict):
|
|
1811
|
+
self._growth_backfill = {
|
|
1812
|
+
k: v
|
|
1813
|
+
for k, v in backfill.items()
|
|
1814
|
+
if isinstance(k, str)
|
|
1815
|
+
and isinstance(v, dict)
|
|
1816
|
+
and ("compressed" not in v or isinstance(v["compressed"], bool))
|
|
1817
|
+
and ("frontier_known" not in v or isinstance(v["frontier_known"], bool))
|
|
1818
|
+
and ("physical_size" not in v or type(v["physical_size"]) is int and v["physical_size"] >= 0)
|
|
1819
|
+
and all(
|
|
1820
|
+
type(v.get(field)) is int and v[field] >= 0 for field in ("frontier", "inode", "generation")
|
|
1821
|
+
)
|
|
1822
|
+
}
|
|
1823
|
+
for provider in {r.provider for r in self.watch_roots} & _GROWTH_PROVIDERS:
|
|
1824
|
+
state = prior.get(provider)
|
|
1825
|
+
if (
|
|
1826
|
+
isinstance(state, dict)
|
|
1827
|
+
and _growth_timestamp(state.get("since"))
|
|
1828
|
+
and _growth_timestamp(state.get("last_line_at", state.get("since")))
|
|
1829
|
+
and isinstance(state.get("alerting"), bool)
|
|
1830
|
+
and isinstance(state.get("samples"), list)
|
|
1831
|
+
and all(
|
|
1832
|
+
isinstance(s, list)
|
|
1833
|
+
and len(s) == 2
|
|
1834
|
+
and _growth_timestamp(s[0])
|
|
1835
|
+
and type(s[1]) is int
|
|
1836
|
+
and s[1] >= 0
|
|
1837
|
+
for s in state["samples"]
|
|
1838
|
+
)
|
|
1839
|
+
):
|
|
1840
|
+
state.setdefault("last_line_at", max([state["since"], *[s[0] for s in state["samples"]]]))
|
|
1841
|
+
self._growth[provider] = state
|
|
1842
|
+
except (OSError, ValueError, AttributeError):
|
|
1843
|
+
logger.warning("Could not restore source growth window", exc_info=True)
|
|
1844
|
+
self._growth_poll = {}
|
|
1845
|
+
self._growth_activity = {}
|
|
1711
1846
|
self.db_path = Path(db_path).expanduser() if db_path else None
|
|
1712
1847
|
self.coverage_watchdog = coverage_watchdog or CoverageWatchdog()
|
|
1713
1848
|
self._health_window_started = time.monotonic()
|
|
@@ -2320,6 +2455,60 @@ class JSONLWatcher:
|
|
|
2320
2455
|
missing.append(root.provider)
|
|
2321
2456
|
return sorted(missing)
|
|
2322
2457
|
|
|
2458
|
+
def _growth_frontier(self, filepath: str, inode: int, generation: int) -> int:
|
|
2459
|
+
marker = self._growth_backfill.get(filepath)
|
|
2460
|
+
current = self._current_file_stats.get(filepath)
|
|
2461
|
+
compressed = self._physical_files.get(filepath, filepath).endswith(".zst")
|
|
2462
|
+
if marker and marker["generation"] == generation:
|
|
2463
|
+
prior_compressed = marker.get("compressed", compressed)
|
|
2464
|
+
frontier_known = marker.get("frontier_known", not prior_compressed)
|
|
2465
|
+
representation_changed = prior_compressed != compressed
|
|
2466
|
+
physical_size = marker.get("physical_size", 0 if prior_compressed else marker["frontier"])
|
|
2467
|
+
same_source = marker["inode"] == inode and (current is None or current[1] >= physical_size)
|
|
2468
|
+
if representation_changed:
|
|
2469
|
+
# An unchanged generation verifies the representation transition. A known decoded
|
|
2470
|
+
# frontier survives both directions, independently of the current physical bytes.
|
|
2471
|
+
if not frontier_known and not compressed and current is not None:
|
|
2472
|
+
marker["frontier"] = current[1]
|
|
2473
|
+
frontier_known = True
|
|
2474
|
+
marker.update(inode=inode, compressed=compressed, frontier_known=frontier_known)
|
|
2475
|
+
if current is not None:
|
|
2476
|
+
marker["physical_size"] = current[1]
|
|
2477
|
+
if representation_changed or same_source:
|
|
2478
|
+
return marker["frontier"] if frontier_known else (1 << 63) - 1
|
|
2479
|
+
self._growth_backfill.pop(filepath, None)
|
|
2480
|
+
return 0
|
|
2481
|
+
|
|
2482
|
+
def _growth_snapshot(self) -> list[str]:
|
|
2483
|
+
# Keep 31 minutes of samples to include a boundary poll at the 30-minute age.
|
|
2484
|
+
# Wall time survives restarts; no source lines while asleep/idle can meet the count.
|
|
2485
|
+
now = time.time()
|
|
2486
|
+
reasons = []
|
|
2487
|
+
for provider in {r.provider for r in self.watch_roots} & _GROWTH_PROVIDERS:
|
|
2488
|
+
lines, recognised = self._growth_poll.get(provider, (0, 0))
|
|
2489
|
+
state = self._growth.setdefault(
|
|
2490
|
+
provider, {"since": now, "last_line_at": now, "samples": [], "alerting": False}
|
|
2491
|
+
)
|
|
2492
|
+
state["samples"] = [s for s in state["samples"] if now - 1860 <= s[0] <= now]
|
|
2493
|
+
if now - state["last_line_at"] >= 21600:
|
|
2494
|
+
state.update(since=now, samples=[], alerting=False)
|
|
2495
|
+
if self._growth_activity.get(provider, 0):
|
|
2496
|
+
state["last_line_at"] = now
|
|
2497
|
+
if recognised:
|
|
2498
|
+
state.update(since=now, samples=[], alerting=False)
|
|
2499
|
+
else:
|
|
2500
|
+
if lines:
|
|
2501
|
+
if not state["samples"] and not state["alerting"]:
|
|
2502
|
+
state["since"] = now
|
|
2503
|
+
state["samples"].append([now, lines])
|
|
2504
|
+
if now - state["since"] >= 1800 and sum(s[1] for s in state["samples"]) >= 200:
|
|
2505
|
+
state["alerting"] = True
|
|
2506
|
+
state["lines_read"] = lines
|
|
2507
|
+
state["recognised_lines"] = recognised
|
|
2508
|
+
if state["alerting"]:
|
|
2509
|
+
reasons.append(f"growth_not_indexed:{provider}")
|
|
2510
|
+
return sorted(reasons)
|
|
2511
|
+
|
|
2323
2512
|
def _write_health_snapshot(self, files: list[str]):
|
|
2324
2513
|
if not self.health_path:
|
|
2325
2514
|
return
|
|
@@ -2357,14 +2546,15 @@ class JSONLWatcher:
|
|
|
2357
2546
|
]
|
|
2358
2547
|
failure_payloads = all_failure_payloads[:_MAX_HEALTH_FAILURE_DETAILS]
|
|
2359
2548
|
failure_overflow_count = len(all_failure_payloads) - len(failure_payloads)
|
|
2360
|
-
alert_reasons = list(watchdog.get("alert_reasons", []))
|
|
2549
|
+
alert_reasons = list(watchdog.get("alert_reasons", [])) + self._growth_snapshot()
|
|
2361
2550
|
if all_failure_payloads and "file_ingestion_failure" not in alert_reasons:
|
|
2362
2551
|
alert_reasons.append("file_ingestion_failure")
|
|
2363
2552
|
if self._quarantined_record_count_total and "quarantined_record" not in alert_reasons:
|
|
2364
2553
|
alert_reasons.append("quarantined_record")
|
|
2365
2554
|
watchdog = {
|
|
2366
2555
|
**watchdog,
|
|
2367
|
-
"alerting": bool(
|
|
2556
|
+
"alerting": bool(alert_reasons)
|
|
2557
|
+
or bool(watchdog.get("alerting"))
|
|
2368
2558
|
or bool(all_failure_payloads)
|
|
2369
2559
|
or bool(self._quarantined_record_count_total),
|
|
2370
2560
|
"alert_reasons": alert_reasons,
|
|
@@ -2379,6 +2569,8 @@ class JSONLWatcher:
|
|
|
2379
2569
|
"updated_at": datetime.now(timezone.utc).isoformat(),
|
|
2380
2570
|
"poll_count": self.poll_count,
|
|
2381
2571
|
"providers": sorted({root.provider for root in self.watch_roots}),
|
|
2572
|
+
"source_growth": self._growth,
|
|
2573
|
+
"growth_backfill": self._growth_backfill,
|
|
2382
2574
|
"files_tracked": len(files),
|
|
2383
2575
|
"active_jsonl_entries_per_minute": active_entries_per_min,
|
|
2384
2576
|
"normalized_jsonl_entries_per_minute": normalized_entries_per_min,
|
|
@@ -2623,6 +2815,8 @@ class JSONLWatcher:
|
|
|
2623
2815
|
"""Run one poll cycle. Returns number of new lines found."""
|
|
2624
2816
|
total_new = 0
|
|
2625
2817
|
files: list[str] = []
|
|
2818
|
+
self._growth_poll = {}
|
|
2819
|
+
self._growth_activity = {}
|
|
2626
2820
|
self.poll_count += 1
|
|
2627
2821
|
self.last_poll_made_progress = False
|
|
2628
2822
|
|
|
@@ -2744,18 +2938,33 @@ class JSONLWatcher:
|
|
|
2744
2938
|
)
|
|
2745
2939
|
tailer.rewound = False
|
|
2746
2940
|
|
|
2941
|
+
first_ingest = tailer is None and self.registry.get(filepath)[0] == 0
|
|
2942
|
+
if not drain_buffer:
|
|
2943
|
+
tailer = self._ensure_tailer(filepath)
|
|
2944
|
+
lines_before = getattr(tailer, "lines_read_total", 0)
|
|
2945
|
+
neutral_before = getattr(tailer, "neutral_lines_total", 0)
|
|
2946
|
+
eligible_before = getattr(tailer, "growth_lines_total", 0)
|
|
2947
|
+
eligible_neutral_before = getattr(tailer, "growth_neutral_total", 0)
|
|
2948
|
+
read_start_offset = tailer.offset
|
|
2949
|
+
tailer_snapshot = tailer.snapshot()
|
|
2950
|
+
source_inode = tailer.observed_inode
|
|
2951
|
+
source_generation = self.registry.generation(filepath)
|
|
2952
|
+
if first_ingest:
|
|
2953
|
+
self._growth_backfill.setdefault(
|
|
2954
|
+
filepath,
|
|
2955
|
+
{
|
|
2956
|
+
"frontier": self._current_file_stats.get(filepath, (0, 0, 0))[1],
|
|
2957
|
+
"compressed": compressed,
|
|
2958
|
+
"frontier_known": not compressed,
|
|
2959
|
+
"physical_size": self._current_file_stats.get(filepath, (0, 0, 0))[1],
|
|
2960
|
+
"inode": source_inode,
|
|
2961
|
+
"generation": source_generation,
|
|
2962
|
+
},
|
|
2963
|
+
)
|
|
2964
|
+
tailer.growth_frontier = self._growth_frontier(filepath, source_inode, source_generation)
|
|
2747
2965
|
if drain_buffer:
|
|
2748
|
-
read_start_offset = tailer.offset
|
|
2749
|
-
tailer_snapshot = tailer.snapshot()
|
|
2750
|
-
source_inode = tailer.observed_inode
|
|
2751
|
-
source_generation = self.registry.generation(filepath)
|
|
2752
2966
|
new_lines = tailer.read_buffered_lines(max_lines=self.max_lines_per_file)
|
|
2753
2967
|
else:
|
|
2754
|
-
tailer = self._ensure_tailer(filepath)
|
|
2755
|
-
read_start_offset = tailer.offset
|
|
2756
|
-
tailer_snapshot = tailer.snapshot()
|
|
2757
|
-
source_inode = tailer.observed_inode
|
|
2758
|
-
source_generation = self.registry.generation(filepath)
|
|
2759
2968
|
new_lines = tailer.read_new_lines(
|
|
2760
2969
|
max_lines=self.max_lines_per_file,
|
|
2761
2970
|
max_bytes=min(self.max_read_bytes_per_file, zst_bytes)
|
|
@@ -2797,6 +3006,30 @@ class JSONLWatcher:
|
|
|
2797
3006
|
filepath, tailer, new_lines, read_start_offset, source_inode
|
|
2798
3007
|
)
|
|
2799
3008
|
normalized_lines = self._normalize_lines(filepath, new_lines) if new_lines else []
|
|
3009
|
+
provider = self.provider_for_file(filepath)
|
|
3010
|
+
frontier = self._growth_frontier(filepath, source_inode, source_generation)
|
|
3011
|
+
if frontier == tailer.growth_frontier:
|
|
3012
|
+
raw_count = getattr(tailer, "growth_lines_total", 0) - eligible_before
|
|
3013
|
+
blanks = getattr(tailer, "growth_neutral_total", 0) - eligible_neutral_before
|
|
3014
|
+
else: # The read detected a rewrite: count its new generation, not the obsolete frontier.
|
|
3015
|
+
raw_count = getattr(tailer, "lines_read_total", 0) - lines_before
|
|
3016
|
+
blanks = getattr(tailer, "neutral_lines_total", 0) - neutral_before
|
|
3017
|
+
classes = [
|
|
3018
|
+
growth_entry_class(line, provider)
|
|
3019
|
+
for line in new_lines
|
|
3020
|
+
if line.get("_line_end_offset", 0) > frontier
|
|
3021
|
+
]
|
|
3022
|
+
self._growth_activity[provider] = self._growth_activity.get(provider, 0) + raw_count
|
|
3023
|
+
read, recognised = self._growth_poll.get(provider, (0, 0))
|
|
3024
|
+
self._growth_poll[provider] = (
|
|
3025
|
+
read + raw_count - classes.count("neutral") - blanks,
|
|
3026
|
+
recognised + classes.count("recognised"),
|
|
3027
|
+
)
|
|
3028
|
+
if filepath in self._growth_backfill and (
|
|
3029
|
+
(compressed and tailer.decoded_eof and not tailer._buffer)
|
|
3030
|
+
or (not compressed and tailer.offset >= frontier)
|
|
3031
|
+
):
|
|
3032
|
+
self._growth_backfill.pop(filepath, None)
|
|
2800
3033
|
reconcile_through = getattr(tailer, "_archive_reconcile_through", 0)
|
|
2801
3034
|
if normalized_lines:
|
|
2802
3035
|
for line in normalized_lines:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
BUILD_SHA = "3a2e1f02b31c78cac2de61f7408d13e0ad7d478f"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.maintenance-nightly.plist
RENAMED
|
File without changes
|
{brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.maintenance-weekly.plist
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.brainlayer.throughput-watchdog.plist
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brainlayer-1.6.2 → brainlayer-1.6.4}/scripts/launchd/com.etanhey.brainlayer-fleet-watchdog.plist
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|