brainlayer 1.5.95__tar.gz → 1.5.97__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.5.95 → brainlayer-1.5.97}/PKG-INFO +1 -1
- {brainlayer-1.5.95 → brainlayer-1.5.97}/pyproject.toml +3 -1
- brainlayer-1.5.97/scripts/brainlayer-version-check.sh +271 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.daemon.plist +3 -3
- {brainlayer-1.5.95 → brainlayer-1.5.97}/server.json +2 -2
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/__init__.py +1 -1
- brainlayer-1.5.97/src/brainlayer/_build.py +1 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/backup_daily.py +18 -2
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/cli_jobs.py +3 -1
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/doctor.py +11 -1
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/drive_credentials.py +70 -17
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/health_facts.py +3 -5
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/health_verdict.py +16 -6
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/maintenance_calendar.py +117 -29
- brainlayer-1.5.97/src/brainlayer/maintenance_upload_recovery.py +105 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/service_supervisor.py +13 -10
- brainlayer-1.5.97/src/brainlayer/supervisor_diagnostics.py +157 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/supervisor_jobs.py +16 -0
- brainlayer-1.5.95/src/brainlayer/_build.py +0 -1
- brainlayer-1.5.95/src/brainlayer/supervisor_diagnostics.py +0 -121
- {brainlayer-1.5.95 → brainlayer-1.5.97}/.gitignore +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/LICENSE +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/README.md +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/hotlane_brainbar_daemon.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/backup-daily.sh +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/brainlayer-env-run.sh +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/brainlayer.env.example +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.backup-daily.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.decay.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.drain.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.health-check.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.hotlane-brainbar.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.index.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.jsonl-backup.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.log-cap.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.maintenance-nightly.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.maintenance-weekly.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.maintenance.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.observability.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.p0-counter.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.repair-fts.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.t3-ingest.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.throughput-watchdog.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.tier0-watchdog.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.wal-checkpoint.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.brainlayer.watch.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/com.etanhey.brainlayer-fleet-watchdog.plist +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/fleet-watchdog.sh +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/install.sh +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/jsonl-backup.sh +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/launchd/throughput-watchdog.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/release-verify-signatures.sh +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/scripts/tier0-watchdog.sh +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/__main__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/_helpers.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/agent_profiles.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/agent_provenance.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/alarm.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/archive_collapse.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/archive_lifecycle.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/backup_retention_invariant.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/badge_state.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/bitemporal.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/brainbar_activation.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/brainbar_auto_activation.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/brainbar_hybrid_helper.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/brainbar_identity.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/cachedelete_purge.swift +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/calibrate.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/chunk_origin.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/chunk_origin_backfill.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/chunk_origin_wipe.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/chunk_write.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/classify.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/claude_paths.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/cli/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/cli/wizard.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/cli_new.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/cloud_backfill.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/clustering.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/codex_zst.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/component_jobs.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/config.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/consolidation_plan.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/content_class.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/content_hash_repair.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/correction_judge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/data/agents_registry.yaml +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/data/sandbox_seeds/skill-eval-baseline.json +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/db_shrink.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/decay.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/decay_backfill.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/decay_job.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/dedupe.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/dedupe_merge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/deploy_drift.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/disk_space.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/drain.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/drain_liveness.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/embeddings.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/engine.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/enrichment_replay.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/abcde_enrich_runner.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/abcde_variants.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/abcde_variants.yaml +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/benchmark.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/enrichment_gold.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/enrichment_graders.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/enrichment_judge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/enrichment_llm_judge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/enrichment_quality_benchmark.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/experiment_store.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/fixtures/README.md +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/labeling/enrichment-labeler.html +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/__main__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/baseline_store.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/cli.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/models.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/phoenix_client.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/regression_gate.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/phoenix_gate/triggers.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/eval/pilot_artifact_report.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/fallback_replay.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/git_learning.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/health_check.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/hook_python.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/hooks/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/hooks/indexer.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/hotlane_budget.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/import_sweep.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/index_admission.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/index_budget.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/index_completeness.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/index_new.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/index_watchdog.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/ingest/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/ingest/codex.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/ingest/codex_manifest.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/ingest/t3.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/ingest_denylist.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/ingest_guard.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/isolation_proof.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/job_alerts.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/job_lifecycle_health.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/jobs.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/jsonl_backup.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg_cleanup.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg_judge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg_promotion.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg_repo.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg_review_session.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg_session_finish.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/kg_session_harvest.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/launchd_consolidation.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/launchd_install.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/launchd_primitive.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/launchd_revert.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/launcher_policy_reconcile.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/lexical_defense.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/lexical_defense_dictionary.json +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/linkedin_import.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/log_cap.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/maintenance.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/maintenance_control.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/_format.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/_shared.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/enrich_handler.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/entity_handler.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/palette.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/search_handler.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/store_handler.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp/tags_handler.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp_socket_config.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/mcp_stdio_bridge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/memory_types.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/migrate.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/migration_custody.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/migration_journal.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/migration_runtime.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/notification_policy.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/observability_backup.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/observability_surface.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/observability_transport.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/p0_longitudinal_count.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/parent_death.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/paths.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pause.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/phonetic.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/__init__.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/agent_enrichment.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/analyze_communication.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/batch_extraction.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/brain_graph.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/chat_tags.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/chunk.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/classify.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/cloud_scrub.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/cluster_sampling.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/code_intelligence.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/correction_detection.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/correction_mining.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/digest.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/enrichment_prompts.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/enrichment_results.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/enrichment_tiers.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/entity_extraction.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/entity_resolution.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/extract.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/extract_claude_desktop.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/extract_corrections.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/extract_markdown.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/extract_whatsapp.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/frustration_mining.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/git_overlay.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/kg_extraction.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/kg_extraction_groq.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/longitudinal_analyzer.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/obsidian_export.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/operation_grouping.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/plan_linking.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/rate_limiter.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/relation_backfill.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/relation_verification.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/sanitize.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/secret_scrub.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/semantic_style.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/sentiment.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/session_history.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/style_embed.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/style_index.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/tag_entity_promotion.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/temporal_chains.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/time_batcher.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/unified_timeline.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/pipeline/write_queue.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/policy_reconcile.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/provenance.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/provenance_autosupersede.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/provenance_integration.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/queue_io.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/queue_merge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/readonly_snapshot.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/reembed_backfill.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/retired_services.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/runtime_store.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/sandbox_db.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/schema_ddl_ledger.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/scoping.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/scrub_at_rest.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/search_fanout.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/search_profile.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/search_repo.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/search_response.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/session_repo.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/setup.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/socket_hygiene.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/source_class_migration.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/spotlight.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/storage.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/store.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/supervisor_adapters.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/supervisor_child.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/supervisor_guard.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/system_prompt_guard.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/t3_linkage_alarm.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/t3_provenance.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/t3_sources.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/tag_normalization.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/taxonomy.json +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/telemetry.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/timestamp_iso.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/types.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/vector_store.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/wal_checkpoint.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/watcher.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/watcher_bridge.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/writer_policy.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/writer_telemetry.py +0 -0
- {brainlayer-1.5.95 → brainlayer-1.5.97}/src/brainlayer/zstd_stream.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: brainlayer
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.97
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "brainlayer"
|
|
3
|
-
version = "1.5.
|
|
3
|
+
version = "1.5.97"
|
|
4
4
|
description = "Persistent local memory for AI agents — 16 BrainBar MCP tools, semantic search, knowledge graph, SQLite"
|
|
5
5
|
license = {text = "Apache-2.0"}
|
|
6
6
|
readme = "README.md"
|
|
@@ -150,6 +150,7 @@ exclude = [
|
|
|
150
150
|
"scripts/hotlane_brainbar_daemon.py" = "brainlayer/launchd/hotlane_brainbar_daemon.py"
|
|
151
151
|
"scripts/tier0-watchdog.sh" = "brainlayer/launchd/tier0-watchdog.sh"
|
|
152
152
|
"scripts/release-verify-signatures.sh" = "brainlayer/launchd/release-verify-signatures.sh"
|
|
153
|
+
"scripts/brainlayer-version-check.sh" = "brainlayer/launchd/brainlayer-version-check.sh"
|
|
153
154
|
"src/brainlayer/cachedelete_purge.swift" = "brainlayer/cachedelete_purge.swift"
|
|
154
155
|
|
|
155
156
|
[tool.hatch.build.targets.sdist]
|
|
@@ -159,6 +160,7 @@ only-include = [
|
|
|
159
160
|
"scripts/hotlane_brainbar_daemon.py",
|
|
160
161
|
"scripts/tier0-watchdog.sh",
|
|
161
162
|
"scripts/release-verify-signatures.sh",
|
|
163
|
+
"scripts/brainlayer-version-check.sh",
|
|
162
164
|
"README.md",
|
|
163
165
|
"LICENSE",
|
|
164
166
|
"server.json",
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Release metadata consistency guard for BrainLayer/BrainBar.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
+
PACKAGE_ROOT="${BRAINLAYER_VERSION_CHECK_REPO_ROOT:-$(cd "$SCRIPT_DIR/.." && pwd)}"
|
|
7
|
+
FAILED=0
|
|
8
|
+
|
|
9
|
+
# Doctor passes the version imported by its installed interpreter, and that interpreter.
|
|
10
|
+
# Installed mode compares only what is INSTALLED: the package and BrainBar.app. It ignores
|
|
11
|
+
# release-preparation overrides, checkout git metadata and the Homebrew tap: a tap ahead of
|
|
12
|
+
# this Mac means an update is available, not that the install is inconsistent.
|
|
13
|
+
if [[ "${1:-}" == "--installed" ]]; then
|
|
14
|
+
exec "${4:-python3}" - "$2" "${3:-/Applications/BrainBar.app/Contents/Info.plist}" <<'PYINSTALLED'
|
|
15
|
+
import plistlib
|
|
16
|
+
import sys
|
|
17
|
+
|
|
18
|
+
try:
|
|
19
|
+
version, plist_path = sys.argv[1:]
|
|
20
|
+
with open(plist_path, "rb") as handle:
|
|
21
|
+
app = plistlib.load(handle)
|
|
22
|
+
app_version = app.get("BrainLayerReleaseVersion") or app.get("CFBundleShortVersionString")
|
|
23
|
+
if version != app_version:
|
|
24
|
+
raise ValueError(f"installed package={version}, BrainBar={app_version}")
|
|
25
|
+
except (OSError, ValueError, plistlib.InvalidFileException) as exc:
|
|
26
|
+
print(f"[brainlayer-version-check] ERROR: {exc}", file=sys.stderr)
|
|
27
|
+
raise SystemExit(1)
|
|
28
|
+
print(f"[brainlayer-version-check] PASS: installed package/BrainBar {version}")
|
|
29
|
+
PYINSTALLED
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
default_tap_root() {
|
|
33
|
+
local sibling
|
|
34
|
+
sibling="$(cd "$PACKAGE_ROOT/.." && pwd)/homebrew-layers"
|
|
35
|
+
if [[ -d "$sibling" ]]; then
|
|
36
|
+
printf '%s\n' "$sibling"
|
|
37
|
+
fi
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
TAP_ROOT="${BRAINLAYER_VERSION_CHECK_TAP_ROOT:-${BRAINLAYER_HOMEBREW_TAP_ROOT:-$(default_tap_root)}}"
|
|
41
|
+
|
|
42
|
+
err() {
|
|
43
|
+
printf '[brainlayer-version-check] ERROR: %s\n' "$*" >&2
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
require_file() {
|
|
47
|
+
local label="$1"
|
|
48
|
+
local path="$2"
|
|
49
|
+
if [[ ! -f "$path" ]]; then
|
|
50
|
+
err "$label not found: $path"
|
|
51
|
+
FAILED=1
|
|
52
|
+
fi
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
require_equal() {
|
|
56
|
+
local label="$1"
|
|
57
|
+
local actual="$2"
|
|
58
|
+
local expected="$3"
|
|
59
|
+
if [[ "$actual" != "$expected" ]]; then
|
|
60
|
+
err "$label is '$actual', expected '$expected'"
|
|
61
|
+
FAILED=1
|
|
62
|
+
fi
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
read_pyproject_version() {
|
|
66
|
+
python3 - "$1" <<'PY'
|
|
67
|
+
import sys
|
|
68
|
+
import tomllib
|
|
69
|
+
|
|
70
|
+
with open(sys.argv[1], "rb") as handle:
|
|
71
|
+
print(tomllib.load(handle)["project"]["version"])
|
|
72
|
+
PY
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
read_init_version() {
|
|
76
|
+
python3 - "$1" <<'PY'
|
|
77
|
+
import ast
|
|
78
|
+
import sys
|
|
79
|
+
|
|
80
|
+
module = ast.parse(open(sys.argv[1], encoding="utf-8").read())
|
|
81
|
+
for node in module.body:
|
|
82
|
+
if isinstance(node, ast.Assign):
|
|
83
|
+
for target in node.targets:
|
|
84
|
+
if isinstance(target, ast.Name) and target.id == "__version__":
|
|
85
|
+
print(ast.literal_eval(node.value))
|
|
86
|
+
raise SystemExit(0)
|
|
87
|
+
raise SystemExit("__version__ not found")
|
|
88
|
+
PY
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
read_server_value() {
|
|
92
|
+
python3 - "$1" "$2" <<'PY'
|
|
93
|
+
import json
|
|
94
|
+
import sys
|
|
95
|
+
|
|
96
|
+
manifest = json.load(open(sys.argv[1], encoding="utf-8"))
|
|
97
|
+
field = sys.argv[2]
|
|
98
|
+
if field == "version":
|
|
99
|
+
print(manifest.get("version", ""))
|
|
100
|
+
elif field == "packages[0].version":
|
|
101
|
+
print((manifest.get("packages") or [{}])[0].get("version", ""))
|
|
102
|
+
else:
|
|
103
|
+
raise SystemExit(f"unknown field: {field}")
|
|
104
|
+
PY
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
read_plist_string() {
|
|
108
|
+
python3 - "$1" "$2" <<'PY'
|
|
109
|
+
import plistlib
|
|
110
|
+
import sys
|
|
111
|
+
|
|
112
|
+
with open(sys.argv[1], "rb") as handle:
|
|
113
|
+
print(plistlib.load(handle).get(sys.argv[2], ""))
|
|
114
|
+
PY
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
extract_cask_version() {
|
|
118
|
+
awk '
|
|
119
|
+
/^[[:space:]]*version "/ {
|
|
120
|
+
gsub(/"/, "", $2)
|
|
121
|
+
print $2
|
|
122
|
+
exit
|
|
123
|
+
}
|
|
124
|
+
' "$1"
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
# Prints -1 when $1 < $2, 0 when equal, 1 when $1 > $2. Exits non-zero when
|
|
128
|
+
# either side is not a dotted numeric version (callers must treat that as a
|
|
129
|
+
# hard mismatch rather than an allowed lag).
|
|
130
|
+
compare_versions() {
|
|
131
|
+
python3 - "$1" "$2" <<'PY'
|
|
132
|
+
import sys
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def parse(value):
|
|
136
|
+
parts = value.split(".")
|
|
137
|
+
if not value or not all(part.isdigit() for part in parts):
|
|
138
|
+
raise SystemExit(2)
|
|
139
|
+
return tuple(int(part) for part in parts)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
left = parse(sys.argv[1])
|
|
143
|
+
right = parse(sys.argv[2])
|
|
144
|
+
print(-1 if left < right else (1 if left > right else 0))
|
|
145
|
+
PY
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
warn() {
|
|
149
|
+
printf '[brainlayer-version-check] WARN: %s\n' "$*"
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
GIT_LOCAL_ENV_VARS=(
|
|
153
|
+
GIT_ALTERNATE_OBJECT_DIRECTORIES
|
|
154
|
+
GIT_CONFIG
|
|
155
|
+
GIT_CONFIG_PARAMETERS
|
|
156
|
+
GIT_CONFIG_COUNT
|
|
157
|
+
GIT_OBJECT_DIRECTORY
|
|
158
|
+
GIT_DIR
|
|
159
|
+
GIT_WORK_TREE
|
|
160
|
+
GIT_IMPLICIT_WORK_TREE
|
|
161
|
+
GIT_GRAFT_FILE
|
|
162
|
+
GIT_INDEX_FILE
|
|
163
|
+
GIT_NO_REPLACE_OBJECTS
|
|
164
|
+
GIT_REPLACE_REF_BASE
|
|
165
|
+
GIT_PREFIX
|
|
166
|
+
GIT_SHALLOW_FILE
|
|
167
|
+
GIT_COMMON_DIR
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
git_package_root() {
|
|
171
|
+
local -a env_args=()
|
|
172
|
+
local name
|
|
173
|
+
|
|
174
|
+
for name in "${GIT_LOCAL_ENV_VARS[@]}"; do
|
|
175
|
+
env_args+=(-u "$name")
|
|
176
|
+
done
|
|
177
|
+
|
|
178
|
+
env "${env_args[@]}" git -C "$PACKAGE_ROOT" "$@"
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
latest_git_tag() {
|
|
182
|
+
if [[ -n "${BRAINLAYER_VERSION_CHECK_GIT_TAG:-}" ]]; then
|
|
183
|
+
printf '%s\n' "$BRAINLAYER_VERSION_CHECK_GIT_TAG"
|
|
184
|
+
return
|
|
185
|
+
fi
|
|
186
|
+
if ! git_package_root rev-parse --git-dir >/dev/null 2>&1; then
|
|
187
|
+
printf '\n'
|
|
188
|
+
return
|
|
189
|
+
fi
|
|
190
|
+
git_package_root tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname 2>/dev/null | head -n 1
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if [[ -z "$TAP_ROOT" ]]; then
|
|
194
|
+
err "Homebrew tap root is required. Set BRAINLAYER_VERSION_CHECK_TAP_ROOT or BRAINLAYER_HOMEBREW_TAP_ROOT."
|
|
195
|
+
exit 2
|
|
196
|
+
fi
|
|
197
|
+
|
|
198
|
+
PYPROJECT="$PACKAGE_ROOT/pyproject.toml"
|
|
199
|
+
INIT_PY="$PACKAGE_ROOT/src/brainlayer/__init__.py"
|
|
200
|
+
SERVER_JSON="$PACKAGE_ROOT/server.json"
|
|
201
|
+
INFO_PLIST="$PACKAGE_ROOT/brain-bar/bundle/Info.plist"
|
|
202
|
+
CASK_PATH="$TAP_ROOT/Casks/brainbar.rb"
|
|
203
|
+
|
|
204
|
+
require_file "pyproject.toml" "$PYPROJECT"
|
|
205
|
+
require_file "src/brainlayer/__init__.py" "$INIT_PY"
|
|
206
|
+
require_file "server.json" "$SERVER_JSON"
|
|
207
|
+
require_file "brain-bar/bundle/Info.plist" "$INFO_PLIST"
|
|
208
|
+
require_file "Homebrew cask" "$CASK_PATH"
|
|
209
|
+
|
|
210
|
+
if [[ "$FAILED" -ne 0 ]]; then
|
|
211
|
+
exit 1
|
|
212
|
+
fi
|
|
213
|
+
|
|
214
|
+
canonical_version="$(read_pyproject_version "$PYPROJECT")"
|
|
215
|
+
init_version="$(read_init_version "$INIT_PY")"
|
|
216
|
+
server_version="$(read_server_value "$SERVER_JSON" "version")"
|
|
217
|
+
server_package_version="$(read_server_value "$SERVER_JSON" "packages[0].version")"
|
|
218
|
+
plist_short_version="$(read_plist_string "$INFO_PLIST" "CFBundleShortVersionString")"
|
|
219
|
+
plist_bundle_version="$(read_plist_string "$INFO_PLIST" "CFBundleVersion")"
|
|
220
|
+
plist_release_version="$(read_plist_string "$INFO_PLIST" "BrainLayerReleaseVersion")"
|
|
221
|
+
cask_version="$(extract_cask_version "$CASK_PATH")"
|
|
222
|
+
git_tag="$(latest_git_tag)"
|
|
223
|
+
expected_git_tag="v$canonical_version"
|
|
224
|
+
|
|
225
|
+
if [[ "$canonical_version" =~ ^([0-9]+\.[0-9]+\.[0-9]+)(\.[0-9]+)?$ ]]; then
|
|
226
|
+
expected_plist_short_version="${BASH_REMATCH[1]}"
|
|
227
|
+
else
|
|
228
|
+
err "pyproject.toml version '$canonical_version' must match X.Y.Z or interim X.Y.Z.N"
|
|
229
|
+
FAILED=1
|
|
230
|
+
expected_plist_short_version="$canonical_version"
|
|
231
|
+
fi
|
|
232
|
+
|
|
233
|
+
require_equal "src/brainlayer/__init__.py __version__" "$init_version" "$canonical_version"
|
|
234
|
+
require_equal "server.json version" "$server_version" "$canonical_version"
|
|
235
|
+
require_equal "server.json packages[0].version" "$server_package_version" "$canonical_version"
|
|
236
|
+
require_equal "Info.plist CFBundleShortVersionString" "$plist_short_version" "$expected_plist_short_version"
|
|
237
|
+
require_equal "Info.plist BrainLayerReleaseVersion" "$plist_release_version" "$canonical_version"
|
|
238
|
+
if [[ ! "$plist_bundle_version" =~ ^[0-9]+(\.[0-9]+){0,2}$ ]]; then
|
|
239
|
+
err "Info.plist CFBundleVersion '$plist_bundle_version' must contain one to three numeric components"
|
|
240
|
+
FAILED=1
|
|
241
|
+
fi
|
|
242
|
+
cask_lag_reason="${BRAINLAYER_VERSION_CHECK_CASK_LAG_REASON:-}"
|
|
243
|
+
cask_lag_allowed=0
|
|
244
|
+
if [[ "$cask_version" == "$canonical_version" ]]; then
|
|
245
|
+
:
|
|
246
|
+
elif [[ -n "$cask_lag_reason" ]] && cask_order="$(compare_versions "$cask_version" "$canonical_version" 2>/dev/null)" \
|
|
247
|
+
&& [[ "$cask_order" == "-1" ]]; then
|
|
248
|
+
# BrainBar.app ships as its own GitHub-release artifact, so the cask may
|
|
249
|
+
# legitimately trail the Python package when no Swift change was released.
|
|
250
|
+
cask_lag_allowed=1
|
|
251
|
+
warn "Casks/brainbar.rb is $cask_version (package $canonical_version) — allowed: $cask_lag_reason"
|
|
252
|
+
else
|
|
253
|
+
require_equal "Casks/brainbar.rb version" "$cask_version" "$canonical_version"
|
|
254
|
+
fi
|
|
255
|
+
if [[ -z "$git_tag" ]]; then
|
|
256
|
+
err "latest git tag could not be determined under $PACKAGE_ROOT"
|
|
257
|
+
FAILED=1
|
|
258
|
+
else
|
|
259
|
+
require_equal "latest git tag" "$git_tag" "$expected_git_tag"
|
|
260
|
+
fi
|
|
261
|
+
|
|
262
|
+
if [[ "$FAILED" -ne 0 ]]; then
|
|
263
|
+
exit 1
|
|
264
|
+
fi
|
|
265
|
+
|
|
266
|
+
if [[ "$cask_lag_allowed" -eq 1 ]]; then
|
|
267
|
+
printf '[brainlayer-version-check] PASS: BrainLayer/BrainBar %s release metadata is consistent (cask %s lag allowed: %s)\n' \
|
|
268
|
+
"$canonical_version" "$cask_version" "$cask_lag_reason"
|
|
269
|
+
else
|
|
270
|
+
printf '[brainlayer-version-check] PASS: BrainLayer/BrainBar %s release metadata is consistent\n' "$canonical_version"
|
|
271
|
+
fi
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
<key>ThrottleInterval</key>
|
|
47
47
|
<integer>10</integer>
|
|
48
48
|
<key>Nice</key>
|
|
49
|
-
<integer>
|
|
49
|
+
<integer>0</integer>
|
|
50
50
|
<key>ProcessType</key>
|
|
51
|
-
<string>
|
|
51
|
+
<string>Standard</string>
|
|
52
52
|
<key>LowPriorityIO</key>
|
|
53
|
-
<
|
|
53
|
+
<false/>
|
|
54
54
|
<key>SoftResourceLimits</key>
|
|
55
55
|
<dict>
|
|
56
56
|
<key>NumberOfFiles</key>
|
|
@@ -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.5.
|
|
6
|
+
"version": "1.5.97",
|
|
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.5.
|
|
17
|
+
"version": "1.5.97",
|
|
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.5.
|
|
5
|
+
__version__ = "1.5.97"
|
|
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 = "daed6d61a41fba13c624b733a7fa1be670f881ea"
|
|
@@ -3829,7 +3829,12 @@ def run_backup(
|
|
|
3829
3829
|
flush=True,
|
|
3830
3830
|
)
|
|
3831
3831
|
local = (
|
|
3832
|
-
_local_upload_receipt(
|
|
3832
|
+
_local_upload_receipt(
|
|
3833
|
+
resolved_log_path,
|
|
3834
|
+
result,
|
|
3835
|
+
Path(staging_dir),
|
|
3836
|
+
snapshot_name=os.environ.get("BRAINLAYER_BACKUP_UPLOAD_SNAPSHOT"),
|
|
3837
|
+
)
|
|
3833
3838
|
if phase == "upload"
|
|
3834
3839
|
else _recent_local_verified_backup(
|
|
3835
3840
|
resolved_log_path,
|
|
@@ -3850,7 +3855,16 @@ def run_backup(
|
|
|
3850
3855
|
now = dt.datetime.fromisoformat(result["attempted_at"])
|
|
3851
3856
|
if created and local_backup_date(created) == local_backup_date(now) and _local_snapshot_intact(local):
|
|
3852
3857
|
return reuse(local)
|
|
3858
|
+
if (
|
|
3859
|
+
phase == "upload"
|
|
3860
|
+
and local is not None
|
|
3861
|
+
and (expected_sha := os.environ.get("BRAINLAYER_BACKUP_UPLOAD_SHA256"))
|
|
3862
|
+
):
|
|
3863
|
+
if local["local_artifact"]["sha256"] != expected_sha:
|
|
3864
|
+
raise RuntimeError("Selected recovery snapshot identity changed")
|
|
3853
3865
|
if phase == "upload" and local is None:
|
|
3866
|
+
if os.environ.get("BRAINLAYER_BACKUP_UPLOAD_SNAPSHOT"):
|
|
3867
|
+
raise RuntimeError("Selected recovery snapshot is no longer pending or intact")
|
|
3854
3868
|
nothing_pending = True
|
|
3855
3869
|
result["upload_state"] = "nothing_pending"
|
|
3856
3870
|
return result
|
|
@@ -4278,7 +4292,9 @@ def _run_backup_process(timeout_seconds: int) -> int:
|
|
|
4278
4292
|
)
|
|
4279
4293
|
|
|
4280
4294
|
result = run_phase()
|
|
4281
|
-
if os.environ.get("BRAINLAYER_BACKUP_PHASE") == "upload"
|
|
4295
|
+
if os.environ.get("BRAINLAYER_BACKUP_PHASE") == "upload" and not os.environ.get(
|
|
4296
|
+
"BRAINLAYER_BACKUP_UPLOAD_SNAPSHOT"
|
|
4297
|
+
):
|
|
4282
4298
|
while result.get("verified"):
|
|
4283
4299
|
next_result = run_phase()
|
|
4284
4300
|
if next_result.get("snapshot") == result.get("snapshot"):
|
|
@@ -17,6 +17,7 @@ def register(app, jobs_app):
|
|
|
17
17
|
state_dir: Path | None = typer.Option(None, "--state-dir"),
|
|
18
18
|
logs_dir: Path = typer.Option(Path.home() / "Library/Logs/brainlayer", "--logs-dir"),
|
|
19
19
|
recover_transcripts: bool = typer.Option(False, "--recover-transcripts"),
|
|
20
|
+
recover_upload: bool = typer.Option(False, "--recover-upload"),
|
|
20
21
|
recover_failed: bool = typer.Option(False, "--recover-failed"),
|
|
21
22
|
status: bool = typer.Option(
|
|
22
23
|
False, "--status", help="Check failed-step recovery admission without running steps"
|
|
@@ -30,7 +31,7 @@ def register(app, jobs_app):
|
|
|
30
31
|
date = dt.date.fromisoformat(scheduled_date) if scheduled_date else dt.date.today()
|
|
31
32
|
except ValueError as exc:
|
|
32
33
|
raise typer.BadParameter("date must be ISO YYYY-MM-DD") from exc
|
|
33
|
-
if recover_failed
|
|
34
|
+
if sum((recover_failed, recover_transcripts, recover_upload)) > 1:
|
|
34
35
|
raise typer.BadParameter("Choose --recover-failed or --recover-transcripts")
|
|
35
36
|
if status and not recover_failed:
|
|
36
37
|
raise typer.BadParameter("--status requires --recover-failed")
|
|
@@ -49,6 +50,7 @@ def register(app, jobs_app):
|
|
|
49
50
|
logs_dir,
|
|
50
51
|
install_signals=True,
|
|
51
52
|
transcript_recovery=recover_transcripts,
|
|
53
|
+
**(dict(upload_recovery=True) if recover_upload else {}),
|
|
52
54
|
**(
|
|
53
55
|
dict(failed_recovery=True, recovery_status=status, recovery_result=result)
|
|
54
56
|
if recover_failed
|
|
@@ -96,7 +96,12 @@ def _running_from_source_checkout() -> bool:
|
|
|
96
96
|
return (root / ".git").exists() and not in_keg
|
|
97
97
|
|
|
98
98
|
|
|
99
|
+
INSTALLED_BRAINBAR_INFO_PLIST = Path("/Applications/BrainBar.app/Contents/Info.plist")
|
|
100
|
+
|
|
101
|
+
|
|
99
102
|
def default_version_check_path() -> Path:
|
|
103
|
+
if not _running_from_source_checkout():
|
|
104
|
+
return Path(__file__).resolve().parent / "launchd" / "brainlayer-version-check.sh"
|
|
100
105
|
current_tree_script = Path(__file__).resolve().parents[2] / "scripts" / "brainlayer-version-check.sh"
|
|
101
106
|
if current_tree_script.is_file():
|
|
102
107
|
return current_tree_script
|
|
@@ -725,7 +730,12 @@ def _check_brainbar_version_consistency(
|
|
|
725
730
|
return
|
|
726
731
|
|
|
727
732
|
try:
|
|
728
|
-
|
|
733
|
+
command = ["bash", str(version_check_path)]
|
|
734
|
+
if not _running_from_source_checkout():
|
|
735
|
+
from brainlayer import __version__
|
|
736
|
+
|
|
737
|
+
command.extend(["--installed", __version__, str(INSTALLED_BRAINBAR_INFO_PLIST), sys.executable])
|
|
738
|
+
check = command_runner(command)
|
|
729
739
|
except Exception as exc:
|
|
730
740
|
result.issues.append(
|
|
731
741
|
DoctorIssue(
|
|
@@ -144,19 +144,51 @@ def _expiry(data: dict[str, Any]) -> dt.datetime | None:
|
|
|
144
144
|
|
|
145
145
|
|
|
146
146
|
def _consent_deadline(data: dict[str, Any]) -> dt.datetime | None:
|
|
147
|
-
"""
|
|
148
|
-
|
|
149
|
-
if
|
|
147
|
+
"""Only a deadline reported by Google's token endpoint is authoritative."""
|
|
148
|
+
raw = data.get("refresh_expires_at")
|
|
149
|
+
if raw is None or raw == "permanent":
|
|
150
150
|
return None
|
|
151
151
|
try:
|
|
152
|
-
|
|
153
|
-
if
|
|
154
|
-
raise ValueError("
|
|
155
|
-
return
|
|
152
|
+
deadline = dt.datetime.fromisoformat(str(raw).replace("Z", "+00:00"))
|
|
153
|
+
if deadline.tzinfo is None:
|
|
154
|
+
raise ValueError("deadline has no timezone")
|
|
155
|
+
return deadline.astimezone(dt.UTC)
|
|
156
156
|
except ValueError:
|
|
157
157
|
raise DriveCredentialError("BrainLayer Drive consent metadata is invalid") from None
|
|
158
158
|
|
|
159
159
|
|
|
160
|
+
def _grant_metadata(response: dict[str, Any], now: dt.datetime) -> str | None:
|
|
161
|
+
seconds = response.get("refresh_token_expires_in")
|
|
162
|
+
if seconds is None:
|
|
163
|
+
return "permanent"
|
|
164
|
+
try:
|
|
165
|
+
if isinstance(seconds, bool):
|
|
166
|
+
raise ValueError("boolean lifetime")
|
|
167
|
+
return (now.astimezone(dt.UTC) + dt.timedelta(seconds=float(seconds))).isoformat()
|
|
168
|
+
except (TypeError, ValueError, OverflowError):
|
|
169
|
+
LOGGER.warning("Ignoring invalid refresh-token lifetime metadata")
|
|
170
|
+
return None
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class _TokenResponseRequest:
|
|
174
|
+
"""Observe successful token responses without changing google-auth's retry behavior."""
|
|
175
|
+
|
|
176
|
+
def __init__(self, request: Any):
|
|
177
|
+
self.request = request
|
|
178
|
+
self.token_response = None
|
|
179
|
+
|
|
180
|
+
def __call__(self, *args: Any, **kwargs: Any):
|
|
181
|
+
response = self.request(*args, **kwargs)
|
|
182
|
+
try:
|
|
183
|
+
if response.status == 200:
|
|
184
|
+
payload = json.loads(response.data)
|
|
185
|
+
if isinstance(payload, dict) and payload.get("access_token"):
|
|
186
|
+
self.token_response = payload
|
|
187
|
+
except (AttributeError, TypeError, ValueError):
|
|
188
|
+
pass # Observation only: an unreadable body must never fail google-auth's own refresh.
|
|
189
|
+
return response
|
|
190
|
+
|
|
191
|
+
|
|
160
192
|
def load_credentials(
|
|
161
193
|
*,
|
|
162
194
|
token_path: Path | None = None,
|
|
@@ -166,6 +198,7 @@ def load_credentials(
|
|
|
166
198
|
request_factory: Any = None,
|
|
167
199
|
migrate: bool = True,
|
|
168
200
|
persist_refresh: bool = True,
|
|
201
|
+
force_refresh: bool = False,
|
|
169
202
|
now: dt.datetime | None = None,
|
|
170
203
|
alert_reporter: Any = job_alerts.report,
|
|
171
204
|
):
|
|
@@ -183,6 +216,7 @@ def load_credentials(
|
|
|
183
216
|
if migrate:
|
|
184
217
|
_migrate_if_missing(token, legacy)
|
|
185
218
|
token_data = _read_object(token, private=True)
|
|
219
|
+
original_token_data = token_data.copy()
|
|
186
220
|
expires = _consent_deadline(token_data)
|
|
187
221
|
if expires is not None:
|
|
188
222
|
remaining = expires - (now or dt.datetime.now(dt.UTC)).astimezone(dt.UTC)
|
|
@@ -209,9 +243,10 @@ def load_credentials(
|
|
|
209
243
|
except (KeyError, TypeError, ValueError, DriveCredentialError):
|
|
210
244
|
raise DriveCredentialError("Google OAuth client or BrainLayer token is invalid") from None
|
|
211
245
|
refresh_before = dt.datetime.now(dt.UTC).replace(tzinfo=None) + dt.timedelta(hours=2)
|
|
212
|
-
if creds.expired or not creds.valid or (creds.expiry and creds.expiry < refresh_before):
|
|
246
|
+
if force_refresh or creds.expired or not creds.valid or (creds.expiry and creds.expiry < refresh_before):
|
|
213
247
|
try:
|
|
214
|
-
|
|
248
|
+
observed = _TokenResponseRequest(request_factory())
|
|
249
|
+
creds.refresh(observed)
|
|
215
250
|
except Exception as exc:
|
|
216
251
|
from google.auth.exceptions import TransportError
|
|
217
252
|
|
|
@@ -233,18 +268,33 @@ def load_credentials(
|
|
|
233
268
|
"Drive token refresh temporarily unavailable: Google's token endpoint failed retryably"
|
|
234
269
|
) from None
|
|
235
270
|
raise DriveCredentialError("Drive token refresh failed; run brainlayer backup auth") from None
|
|
271
|
+
if (
|
|
272
|
+
observed.token_response is not None
|
|
273
|
+
and observed.token_response.get("refresh_token_expires_in") is not None
|
|
274
|
+
):
|
|
275
|
+
lifetime = _grant_metadata(observed.token_response, now or dt.datetime.now(dt.UTC))
|
|
276
|
+
if lifetime is not None:
|
|
277
|
+
token_data["refresh_expires_at"] = lifetime
|
|
236
278
|
if persist_refresh:
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
279
|
+
previous_expiry = _expiry(token_data)
|
|
280
|
+
expiry_changed = (
|
|
281
|
+
creds.expiry != previous_expiry
|
|
282
|
+
if creds.expiry is None or previous_expiry is None
|
|
283
|
+
else abs((creds.expiry - previous_expiry).total_seconds()) > 60
|
|
284
|
+
)
|
|
285
|
+
if creds.token != token_data.get("access_token") or expiry_changed:
|
|
286
|
+
token_data["access_token"] = creds.token
|
|
287
|
+
token_data["expiry"] = creds.expiry.isoformat() if creds.expiry else None
|
|
288
|
+
if token_data != original_token_data:
|
|
289
|
+
_atomic_write(token, token_data)
|
|
290
|
+
creds.brainlayer_refresh_expires_at = token_data.get("refresh_expires_at")
|
|
240
291
|
# Upcoming expiry is credential_status's advisory, not a failed job.
|
|
241
|
-
# Clear a prior consent episode only after credentials load successfully.
|
|
242
292
|
_report_consent(alert_reporter, None)
|
|
243
293
|
return creds
|
|
244
294
|
|
|
245
295
|
|
|
246
296
|
def credential_status(*, now: dt.datetime | None = None, **kwargs: Any) -> dict[str, Any]:
|
|
247
|
-
"""
|
|
297
|
+
"""Probe the owned grant without migration; persist only changed refresh facts."""
|
|
248
298
|
from google.auth.exceptions import TransportError
|
|
249
299
|
|
|
250
300
|
token, _, _ = _paths(kwargs.get("token_path"), kwargs.get("client_path"), None)
|
|
@@ -265,7 +315,10 @@ def credential_status(*, now: dt.datetime | None = None, **kwargs: Any) -> dict[
|
|
|
265
315
|
reason = f"Drive access expired at {expires.isoformat()}: Reconnect in BrainBar"
|
|
266
316
|
_report_consent(kwargs.get("alert_reporter", job_alerts.report), reason)
|
|
267
317
|
return {"state": "invalid", "reason": reason, **timing}
|
|
268
|
-
load_credentials(**kwargs, migrate=False, persist_refresh=
|
|
318
|
+
creds = load_credentials(**kwargs, migrate=False, persist_refresh=True, force_refresh=True, now=now)
|
|
319
|
+
expires = _consent_deadline({"refresh_expires_at": creds.brainlayer_refresh_expires_at})
|
|
320
|
+
days_left = max(0.0, (expires - current).total_seconds() / 86400) if expires else None
|
|
321
|
+
timing = {"expires_at": expires.isoformat() if expires else None, "days_left": days_left}
|
|
269
322
|
except (TransportError, DriveRefreshUnavailableError) as exc:
|
|
270
323
|
reason = "status checked offline; last known state"
|
|
271
324
|
if isinstance(exc, DriveRefreshUnavailableError):
|
|
@@ -273,8 +326,7 @@ def credential_status(*, now: dt.datetime | None = None, **kwargs: Any) -> dict[
|
|
|
273
326
|
if days_left is not None and days_left <= 2:
|
|
274
327
|
# Text --status prints only the reason, so name the local consent deadline (never a server time).
|
|
275
328
|
reason = f"{reason}: Drive access expires at {expires.isoformat()}: Reconnect in BrainBar"
|
|
276
|
-
|
|
277
|
-
return {"state": "valid", "reason": reason, **timing}
|
|
329
|
+
return {"state": "unknown", "reason": reason, **timing}
|
|
278
330
|
except DriveCredentialError as exc:
|
|
279
331
|
return {"state": "invalid", "reason": str(exc), "expires_at": None, "days_left": None}
|
|
280
332
|
if days_left is not None and days_left <= 2:
|
|
@@ -325,6 +377,7 @@ def authorize(
|
|
|
325
377
|
"scope": " ".join(DRIVE_SCOPES),
|
|
326
378
|
"consented_at": (now or dt.datetime.now(dt.UTC)).astimezone(dt.UTC).isoformat(),
|
|
327
379
|
}
|
|
380
|
+
payload["refresh_expires_at"] = _grant_metadata(flow.oauth2session.token, now or dt.datetime.now(dt.UTC))
|
|
328
381
|
with _token_lock(token):
|
|
329
382
|
_atomic_write(token, payload)
|
|
330
383
|
_report_consent(alert_reporter, None)
|
|
@@ -29,7 +29,6 @@ RECEIPT_TAIL_BYTES = 4 * 1024 * 1024
|
|
|
29
29
|
STORE_ROUNDTRIP_MAX_AGE_S = 36 * 3600
|
|
30
30
|
STORE_ROUNDTRIP_FILE = "store-roundtrip.json"
|
|
31
31
|
EMBEDDING_WINDOW_HOURS = 24
|
|
32
|
-
DRIVE_CONSENT_DAYS = 7 # Same testing-app consent lifetime drive_credentials.credential_status uses.
|
|
33
32
|
|
|
34
33
|
# "Couldn't look" codes: the monitor's own blind spots, never an outcome.
|
|
35
34
|
BLIND_CODES = frozenset(
|
|
@@ -152,7 +151,8 @@ def drive_auth_fact(
|
|
|
152
151
|
if token is None or not token.get("refresh_token"):
|
|
153
152
|
return "consent_needed"
|
|
154
153
|
consented = _aware(token.get("consented_at"))
|
|
155
|
-
|
|
154
|
+
expires = _aware(token.get("refresh_expires_at"))
|
|
155
|
+
if expires is not None and now >= expires:
|
|
156
156
|
return "consent_needed"
|
|
157
157
|
known = [event for event in events if event is not None and (consented is None or event[0] > consented)]
|
|
158
158
|
return max(known, key=lambda event: event[0])[1] if known else "ok"
|
|
@@ -539,9 +539,6 @@ def collect_facts(
|
|
|
539
539
|
lambda: embedding_activity(got["hotlane_cpu"], got["hotlane_budget"], config.db_path, now)
|
|
540
540
|
)
|
|
541
541
|
progress_at, activity = observed_activity if observed_activity is not UNOBSERVED else (None, None)
|
|
542
|
-
if stalled_since is not UNOBSERVED and stalled_since is not None and progress_at is not None:
|
|
543
|
-
stalled_since = max(stalled_since, progress_at)
|
|
544
|
-
embedding_state["since"] = _iso(stalled_since)
|
|
545
542
|
activity = (
|
|
546
543
|
activity.format(count=got["unvectored"])
|
|
547
544
|
if activity and got["unvectored"] is not UNOBSERVED and got["unvectored"] > 0
|
|
@@ -588,6 +585,7 @@ def collect_facts(
|
|
|
588
585
|
embedding_stalled_since=stalled_since,
|
|
589
586
|
embedding_activity=activity,
|
|
590
587
|
embedding_progress_recent=progress_at is not None,
|
|
588
|
+
embedding_paused_by_load=bool(activity and got["hotlane_cpu"].get("backlog_state") == "high load"),
|
|
591
589
|
disk_free_bytes=free,
|
|
592
590
|
disk_peak_bytes=peak,
|
|
593
591
|
disk_floor_bytes=floor,
|