brainlayer 1.6.6__tar.gz → 1.6.7__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.6 → brainlayer-1.6.7}/PKG-INFO +1 -1
- {brainlayer-1.6.6 → brainlayer-1.6.7}/pyproject.toml +1 -1
- {brainlayer-1.6.6 → brainlayer-1.6.7}/server.json +2 -2
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/__init__.py +1 -1
- brainlayer-1.6.7/src/brainlayer/_build.py +1 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/agent_provenance.py +4 -1
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/t3_provenance.py +57 -1
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/watcher.py +140 -8
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/watcher_bridge.py +42 -5
- brainlayer-1.6.6/src/brainlayer/_build.py +0 -1
- {brainlayer-1.6.6 → brainlayer-1.6.7}/.gitignore +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/LICENSE +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/README.md +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/brainlayer-version-check.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/hotlane_brainbar_daemon.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/backup-daily.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/brainlayer-env-run.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/brainlayer.env.example +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.backup-daily.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.daemon.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.decay.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.drain.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.health-check.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.hotlane-brainbar.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.index.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.jsonl-backup.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.log-cap.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.maintenance-nightly.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.maintenance-weekly.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.maintenance.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.observability.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.p0-counter.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.repair-fts.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.t3-ingest.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.throughput-watchdog.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.tier0-watchdog.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.wal-checkpoint.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.watch.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/com.etanhey.brainlayer-fleet-watchdog.plist +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/fleet-watchdog.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/install.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/jsonl-backup.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/launchd/throughput-watchdog.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/release-verify-signatures.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/scripts/tier0-watchdog.sh +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/__main__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/_helpers.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/agent_census.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/agent_profiles.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/agy_attribution.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/alarm.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/archive_collapse.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/archive_lifecycle.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/backup_daily.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/backup_retention_invariant.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/badge_state.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/bitemporal.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/brainbar_activation.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/brainbar_auto_activation.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/brainbar_hybrid_helper.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/brainbar_identity.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/cachedelete_purge.swift +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/calibrate.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/chunk_origin.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/chunk_origin_backfill.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/chunk_origin_wipe.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/chunk_write.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/classify.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/claude_paths.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/cli/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/cli/wizard.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/cli_jobs.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/cli_new.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/cloud_backfill.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/clustering.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/codex_zst.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/component_jobs.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/config.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/consolidation_plan.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/content_class.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/content_hash_repair.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/correction_judge.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/data/agents_registry.yaml +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/data/sandbox_seeds/skill-eval-baseline.json +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/db_shrink.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/decay.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/decay_backfill.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/decay_job.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/dedupe.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/dedupe_merge.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/deploy_drift.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/disk_space.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/doctor.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/drain.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/drain_liveness.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/drive_credentials.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/embeddings.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/engine.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/enrichment_replay.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/abcde_enrich_runner.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/abcde_variants.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/abcde_variants.yaml +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/benchmark.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/enrichment_gold.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/enrichment_graders.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/enrichment_judge.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/enrichment_llm_judge.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/enrichment_quality_benchmark.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/experiment_store.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/fixtures/README.md +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/labeling/enrichment-labeler.html +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/__main__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/baseline_store.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/cli.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/models.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/phoenix_client.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/regression_gate.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/phoenix_gate/triggers.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/eval/pilot_artifact_report.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/fallback_replay.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/git_learning.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/health_check.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/health_facts.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/health_verdict.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/hook_python.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/hooks/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/hooks/indexer.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/hotlane_budget.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/import_sweep.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/index_admission.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/index_budget.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/index_completeness.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/index_new.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/index_watchdog.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/ingest/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/ingest/codex.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/ingest/codex_manifest.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/ingest/t3.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/ingest/t3_bookmark.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/ingest_denylist.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/ingest_guard.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/isolation_proof.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/job_alerts.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/job_lifecycle_health.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/jobs.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/jsonl_backup.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg_cleanup.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg_judge.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg_promotion.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg_repo.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg_review_session.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg_session_finish.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/kg_session_harvest.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/launchd_consolidation.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/launchd_install.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/launchd_primitive.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/launchd_revert.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/launcher_policy_reconcile.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/lexical_defense.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/lexical_defense_dictionary.json +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/linkedin_import.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/log_cap.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/maintenance.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/maintenance_calendar.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/maintenance_control.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/maintenance_upload_recovery.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/_format.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/_shared.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/enrich_handler.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/entity_handler.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/palette.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/search_handler.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/store_handler.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp/tags_handler.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp_socket_config.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/mcp_stdio_bridge.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/memory_types.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/migrate.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/migration_custody.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/migration_journal.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/migration_runtime.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/notification_policy.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/observability_backup.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/observability_indexes.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/observability_surface.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/observability_transport.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/p0_longitudinal_count.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/parent_death.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/paths.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pause.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/phonetic.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/__init__.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/agent_enrichment.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/analyze_communication.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/batch_extraction.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/brain_graph.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/chat_tags.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/chunk.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/classify.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/cloud_scrub.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/cluster_sampling.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/code_intelligence.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/correction_detection.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/correction_mining.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/digest.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/enrichment_prompts.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/enrichment_results.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/enrichment_tiers.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/entity_extraction.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/entity_resolution.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/extract.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/extract_claude_desktop.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/extract_corrections.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/extract_markdown.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/extract_whatsapp.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/frustration_mining.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/git_overlay.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/kg_extraction.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/kg_extraction_groq.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/longitudinal_analyzer.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/obsidian_export.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/operation_grouping.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/plan_linking.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/rate_limiter.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/relation_backfill.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/relation_verification.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/sanitize.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/secret_scrub.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/semantic_style.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/sentiment.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/session_history.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/style_embed.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/style_index.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/tag_entity_promotion.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/temporal_chains.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/time_batcher.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/unified_timeline.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/pipeline/write_queue.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/policy_reconcile.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/provenance.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/provenance_autosupersede.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/provenance_integration.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/queue_io.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/queue_merge.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/readonly_snapshot.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/reembed_backfill.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/retired_services.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/runtime_store.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/sandbox_db.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/schema_ddl_ledger.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/scoping.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/scrub_at_rest.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/search_fanout.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/search_profile.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/search_repo.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/search_response.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/service_supervisor.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/session_repo.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/setup.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/socket_hygiene.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/source_class_migration.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/spotlight.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/storage.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/store.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/supervisor_adapters.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/supervisor_child.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/supervisor_diagnostics.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/supervisor_guard.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/supervisor_jobs.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/system_prompt_guard.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/t3_linkage_alarm.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/t3_sources.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/tag_normalization.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/taxonomy.json +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/telemetry.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/timestamp_iso.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/types.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/vector_store.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/wal_checkpoint.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/writer_policy.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/src/brainlayer/writer_telemetry.py +0 -0
- {brainlayer-1.6.6 → brainlayer-1.6.7}/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.7
|
|
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.7",
|
|
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.7",
|
|
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.7"
|
|
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 = "983d28262294c217eb1c4ca0e2c8cb17b728d313"
|
|
@@ -17,7 +17,7 @@ from typing import Literal, cast
|
|
|
17
17
|
from .agy_attribution import agy_conversation, read_conversation_agent
|
|
18
18
|
from .content_class import normalize_content_class
|
|
19
19
|
from .ingest_denylist import MEMORY_READER_ATTRIBUTIONS, is_denylisted, memory_reader_attribution
|
|
20
|
-
from .t3_provenance import T3_APP_SESSION, CompactCodexHeader, is_t3_app_initiated_codex_session
|
|
20
|
+
from .t3_provenance import T3_APP_SESSION, T3_UNLINKED, CompactCodexHeader, is_t3_app_initiated_codex_session
|
|
21
21
|
|
|
22
22
|
SearchPolicy = Literal["KEEP", "ISOLATE", "OUT"]
|
|
23
23
|
EffectiveVisibility = Literal["default", "operational", "cold"]
|
|
@@ -33,6 +33,7 @@ ProvenanceClass = Literal[
|
|
|
33
33
|
"recon-agent",
|
|
34
34
|
"t3-app-session",
|
|
35
35
|
"t3-thread",
|
|
36
|
+
"t3-unlinked",
|
|
36
37
|
"unknown",
|
|
37
38
|
"workflow-agent",
|
|
38
39
|
]
|
|
@@ -47,6 +48,7 @@ PROVENANCE_CLASSES = frozenset(
|
|
|
47
48
|
"recon-agent",
|
|
48
49
|
T3_APP_SESSION,
|
|
49
50
|
"t3-thread",
|
|
51
|
+
T3_UNLINKED,
|
|
50
52
|
"unknown",
|
|
51
53
|
"workflow-agent",
|
|
52
54
|
}
|
|
@@ -265,6 +267,7 @@ def derive_source_class(
|
|
|
265
267
|
provenance_map: dict[str, SourceClass] = {
|
|
266
268
|
T3_APP_SESSION: "cli-agent",
|
|
267
269
|
"t3-thread": "cli-agent",
|
|
270
|
+
T3_UNLINKED: "cli-agent",
|
|
268
271
|
"recon-agent": "brain-worker",
|
|
269
272
|
"fleet-subagent": "fleet-coordination",
|
|
270
273
|
"product-subagent": "subagent",
|
|
@@ -3,19 +3,32 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
|
+
import math
|
|
6
7
|
import os
|
|
7
8
|
import re
|
|
8
9
|
import sqlite3
|
|
10
|
+
import time
|
|
9
11
|
from dataclasses import dataclass
|
|
10
12
|
from pathlib import Path
|
|
11
13
|
from typing import NoReturn
|
|
12
14
|
|
|
13
15
|
from . import t3_linkage_alarm
|
|
14
|
-
from .alarm import build_alarm, raise_alarm
|
|
16
|
+
from .alarm import BrainLayerAlarm, build_alarm, raise_alarm
|
|
15
17
|
from .t3_sources import DEFAULT_T3_STATE_DB as DEFAULT_T3_STATE_DB
|
|
16
18
|
from .t3_sources import resolve_t3_sources
|
|
17
19
|
|
|
18
20
|
T3_APP_SESSION = "t3-app-session"
|
|
21
|
+
# A T3-origin Codex session T3 never linked within the hold window: indexed, labelled, no thread link.
|
|
22
|
+
T3_UNLINKED = "t3-unlinked"
|
|
23
|
+
# How long a T3-origin Codex session is held for T3 to link it, counted from the session's own start.
|
|
24
|
+
# Evidence (2026-11-19): on the M4, 0 of 87 sessions that ever raised t3_runtime_linkage_pending
|
|
25
|
+
# (16 Oct - 19 Nov) were linked later, and no linked session ever raised it, so T3 links before
|
|
26
|
+
# the watcher's first read (one 30 s poll); on the M1, 0 of 8 in 7 days. 24 h is far above that.
|
|
27
|
+
DEFAULT_T3_LINKAGE_HOLD_S = 24 * 3600.0
|
|
28
|
+
T3_LINKAGE_HOLD_ENV = "BRAINLAYER_T3_LINKAGE_HOLD_S"
|
|
29
|
+
# Set by the flush callback on an entry it defers this flush while its session waits for T3 linkage:
|
|
30
|
+
# the hold's start (epoch seconds). The watcher reads it to report held_for_linkage instead of lag.
|
|
31
|
+
T3_LINKAGE_HOLD_KEY = "_t3_linkage_hold_started_at"
|
|
19
32
|
_CODEX_SESSION_ID_RE = re.compile(r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", re.IGNORECASE)
|
|
20
33
|
_REQUIRED_RUNTIME_COLUMNS = frozenset({"thread_id", "provider_name", "resume_cursor_json"})
|
|
21
34
|
_V2_TABLE = "orchestration_v2_projection_provider_threads"
|
|
@@ -124,6 +137,49 @@ def codex_header_identity(
|
|
|
124
137
|
)
|
|
125
138
|
|
|
126
139
|
|
|
140
|
+
def t3_linkage_hold_window_s() -> float:
|
|
141
|
+
"""The hold window in seconds; a missing, non-finite or negative value is the default."""
|
|
142
|
+
raw = os.environ.get(T3_LINKAGE_HOLD_ENV)
|
|
143
|
+
try:
|
|
144
|
+
value = float(raw) if raw is not None else DEFAULT_T3_LINKAGE_HOLD_S
|
|
145
|
+
except ValueError:
|
|
146
|
+
value = math.nan
|
|
147
|
+
return value if math.isfinite(value) and value >= 0 else DEFAULT_T3_LINKAGE_HOLD_S
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def codex_session_started_at(session_id: str) -> float | None:
|
|
151
|
+
"""Epoch seconds embedded in a UUIDv7 Codex session id; None for any other UUID version."""
|
|
152
|
+
digits = session_id.replace("-", "").lower()
|
|
153
|
+
if len(digits) != 32 or digits[12] != "7" or not _CODEX_SESSION_ID_RE.fullmatch(session_id):
|
|
154
|
+
return None
|
|
155
|
+
return int(digits[:12], 16) / 1000.0
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def t3_linkage_hold_started_at(
|
|
159
|
+
source_file: str | Path, *, session_header: CompactCodexHeader | None = None, cache: dict | None = None
|
|
160
|
+
) -> float:
|
|
161
|
+
"""When a session's linkage hold began: the session's own start, read from its header id.
|
|
162
|
+
|
|
163
|
+
T3 links a session it adopts within seconds of starting it, so the start is the clock. It lives
|
|
164
|
+
in the data, so a restart, a copied file or a touched mtime cannot restart the hold. A header
|
|
165
|
+
without a UUIDv7 id falls back to the file's mtime, which is never earlier than the start, so
|
|
166
|
+
the fallback only ever holds longer.
|
|
167
|
+
"""
|
|
168
|
+
started = None
|
|
169
|
+
try:
|
|
170
|
+
with t3_linkage_alarm.read_only():
|
|
171
|
+
session_id, _ = codex_header_identity(source_file, cache, session_header)
|
|
172
|
+
started = codex_session_started_at(session_id)
|
|
173
|
+
except BrainLayerAlarm:
|
|
174
|
+
started = None
|
|
175
|
+
if started is None:
|
|
176
|
+
try:
|
|
177
|
+
started = Path(source_file).stat().st_mtime
|
|
178
|
+
except OSError:
|
|
179
|
+
started = time.time()
|
|
180
|
+
return started
|
|
181
|
+
|
|
182
|
+
|
|
127
183
|
def codex_session_id_from_source(source_file: str | Path) -> str | None:
|
|
128
184
|
"""Return the final UUID in a Codex JSONL filename, if present."""
|
|
129
185
|
matches = _CODEX_SESSION_ID_RE.findall(Path(source_file).stem)
|
|
@@ -1762,6 +1762,23 @@ class BatchIndexer:
|
|
|
1762
1762
|
logger.error("Batch flush failed (%d items), retaining in buffer: %s", count, e)
|
|
1763
1763
|
self.total_failed_inputs += self._isolate_failed_flush(batch, e)
|
|
1764
1764
|
|
|
1765
|
+
def linkage_holds(self) -> dict[str, float]:
|
|
1766
|
+
"""{source file: earliest hold start} for entries the flush deferred for T3 linkage.
|
|
1767
|
+
|
|
1768
|
+
Only the last flush's deferral tag counts: the bridge clears it on every attempt, so an
|
|
1769
|
+
entry deferred for any other reason (an unreadable T3 runtime, a failed write) is not here.
|
|
1770
|
+
"""
|
|
1771
|
+
from .t3_provenance import T3_LINKAGE_HOLD_KEY
|
|
1772
|
+
|
|
1773
|
+
holds: dict[str, float] = {}
|
|
1774
|
+
with self._lock:
|
|
1775
|
+
for item in self._buffer:
|
|
1776
|
+
started = item.get(T3_LINKAGE_HOLD_KEY)
|
|
1777
|
+
source = item.get("_source_file")
|
|
1778
|
+
if isinstance(source, str) and isinstance(started, (int, float)) and math.isfinite(started):
|
|
1779
|
+
holds[source] = min(holds.get(source, started), started)
|
|
1780
|
+
return holds
|
|
1781
|
+
|
|
1765
1782
|
def retained_failed_input_count(self) -> int:
|
|
1766
1783
|
"""Return currently retained flush-failed inputs without counting retry attempts."""
|
|
1767
1784
|
with self._lock:
|
|
@@ -1966,6 +1983,9 @@ class JSONLWatcher:
|
|
|
1966
1983
|
self._quarantined_record_count_total = 0
|
|
1967
1984
|
self._quarantined_records: list[dict[str, Any]] = []
|
|
1968
1985
|
self._pending_quarantined_offsets: dict[str, list[tuple[int, int, int, int]]] = {}
|
|
1986
|
+
# {file: (read end, offset that must be confirmed first, inode, generation)}: a no-entry
|
|
1987
|
+
# tail whose checkpoint waits for the entries ahead of it (_retry_discarded_progress).
|
|
1988
|
+
self._pending_discarded_progress: dict[str, tuple[int, int, int, int]] = {}
|
|
1969
1989
|
# Sources confirmed gone (lstat ENOENT). Their tailer and registry checkpoint are kept;
|
|
1970
1990
|
# a path leaves the set when discovery sees it again (#732).
|
|
1971
1991
|
self._vanished_sources: set[str] = set()
|
|
@@ -2043,6 +2063,33 @@ class JSONLWatcher:
|
|
|
2043
2063
|
self._last_offset_prune_attempt = float("-inf")
|
|
2044
2064
|
self._last_prune_parent_dirs: frozenset[str] | None = None
|
|
2045
2065
|
|
|
2066
|
+
def _retry_discarded_progress(self) -> None:
|
|
2067
|
+
"""Confirm a remembered no-entry tail once every entry ahead of it is confirmed.
|
|
2068
|
+
|
|
2069
|
+
Same rule as _checkpoint_discarded_progress, applied after a flush: nothing of the file
|
|
2070
|
+
still buffered, the confirmed offset at the last indexable line, and the same tailer, inode
|
|
2071
|
+
and generation that read the bytes. Never past the read end the tailer recorded.
|
|
2072
|
+
"""
|
|
2073
|
+
for filepath, (read_end, required, inode, generation) in list(self._pending_discarded_progress.items()):
|
|
2074
|
+
tailer = self._tailers.get(filepath)
|
|
2075
|
+
if (
|
|
2076
|
+
tailer is None
|
|
2077
|
+
or self.registry.generation(filepath) != generation
|
|
2078
|
+
or tailer.observed_inode not in (0, inode)
|
|
2079
|
+
or tailer.offset < read_end
|
|
2080
|
+
):
|
|
2081
|
+
self._pending_discarded_progress.pop(filepath, None)
|
|
2082
|
+
continue
|
|
2083
|
+
if (
|
|
2084
|
+
self.indexer.has_buffered_source(filepath)
|
|
2085
|
+
or self._pending_quarantined_offsets.get(filepath)
|
|
2086
|
+
or filepath in self._file_ingestion_failures
|
|
2087
|
+
or self.registry.get(filepath)[0] < required
|
|
2088
|
+
):
|
|
2089
|
+
continue
|
|
2090
|
+
self._pending_discarded_progress.pop(filepath, None)
|
|
2091
|
+
self._advance_confirmed_offsets({filepath: (read_end, inode, generation)})
|
|
2092
|
+
|
|
2046
2093
|
def _advance_confirmed_offsets(self, confirmations: dict[str, tuple[int, int, int]]) -> None:
|
|
2047
2094
|
for filepath, (offset, source_inode, source_generation) in confirmations.items():
|
|
2048
2095
|
current_offset, _current_inode = self.registry.get(filepath)
|
|
@@ -2571,17 +2618,38 @@ class JSONLWatcher:
|
|
|
2571
2618
|
source_inode: int,
|
|
2572
2619
|
source_generation: int,
|
|
2573
2620
|
) -> None:
|
|
2574
|
-
"""Confirm intentionally discarded bytes without crossing indexable work.
|
|
2575
|
-
|
|
2621
|
+
"""Confirm intentionally discarded bytes without crossing indexable work.
|
|
2622
|
+
|
|
2623
|
+
When entries ahead of these bytes are still unconfirmed (buffered for the next flush, or
|
|
2624
|
+
held for T3 linkage), the frontier is remembered and retried after a flush
|
|
2625
|
+
(_retry_discarded_progress) instead of dropped: a finished file's no-entry tail would
|
|
2626
|
+
otherwise never be confirmed, because a reader at EOF reads nothing more, and since #1827
|
|
2627
|
+
that tail counts as lag no catch-up round can drain. A later slice with no indexable line
|
|
2628
|
+
extends a contiguous remembered frontier; it never confirms past what the reader read.
|
|
2629
|
+
"""
|
|
2630
|
+
slice_required = max(
|
|
2576
2631
|
(line["_line_end_offset"] for line in normalized_lines if isinstance(line.get("_line_end_offset"), int)),
|
|
2577
|
-
default=
|
|
2632
|
+
default=None,
|
|
2578
2633
|
)
|
|
2634
|
+
pending = self._pending_discarded_progress.pop(filepath, None)
|
|
2635
|
+
if slice_required is not None:
|
|
2636
|
+
required_confirmed_offset = slice_required
|
|
2637
|
+
elif (
|
|
2638
|
+
pending is not None and pending[0] == read_start_offset and pending[2:] == (source_inode, source_generation)
|
|
2639
|
+
):
|
|
2640
|
+
required_confirmed_offset = pending[1]
|
|
2641
|
+
else:
|
|
2642
|
+
required_confirmed_offset = read_start_offset
|
|
2579
2643
|
if read_end_offset <= required_confirmed_offset:
|
|
2580
2644
|
return
|
|
2581
|
-
if self.indexer.has_buffered_source(filepath):
|
|
2582
|
-
return
|
|
2583
2645
|
confirmed_offset, _confirmed_inode = self.registry.get(filepath)
|
|
2584
|
-
if confirmed_offset < required_confirmed_offset:
|
|
2646
|
+
if self.indexer.has_buffered_source(filepath) or confirmed_offset < required_confirmed_offset:
|
|
2647
|
+
self._pending_discarded_progress[filepath] = (
|
|
2648
|
+
read_end_offset,
|
|
2649
|
+
required_confirmed_offset,
|
|
2650
|
+
source_inode,
|
|
2651
|
+
source_generation,
|
|
2652
|
+
)
|
|
2585
2653
|
return
|
|
2586
2654
|
self._advance_confirmed_offsets(
|
|
2587
2655
|
{
|
|
@@ -2799,6 +2867,61 @@ class JSONLWatcher:
|
|
|
2799
2867
|
lags[filepath] = size - offset
|
|
2800
2868
|
return lags
|
|
2801
2869
|
|
|
2870
|
+
def _split_linkage_holds(self, lags: dict[str, int]) -> tuple[dict[str, int], dict[str, int], dict[str, Any]]:
|
|
2871
|
+
"""Take bytes held for T3 linkage out of the lag: (drainable lags, read offsets, held_for_linkage).
|
|
2872
|
+
|
|
2873
|
+
A T3-origin Codex session T3 has not linked yet is read but deliberately left unconfirmed
|
|
2874
|
+
until T3 links it or its hold window (t3_linkage_hold_window_s) ends, when the flush
|
|
2875
|
+
indexes it as t3-unlinked. Inside the window those read bytes are not a stall: no catch-up
|
|
2876
|
+
round can drain them and nobody can act on them, so they are published as
|
|
2877
|
+
catch_up.held_for_linkage and never as lag. Bytes not read yet stay ordinary lag, measured
|
|
2878
|
+
from the read offset (returned so the progress check uses it). A hold past its window is
|
|
2879
|
+
not taken out: whatever keeps it unconfirmed is a real fault and stays offset_lag.
|
|
2880
|
+
"""
|
|
2881
|
+
from .t3_provenance import t3_linkage_hold_window_s
|
|
2882
|
+
|
|
2883
|
+
window = t3_linkage_hold_window_s()
|
|
2884
|
+
wall_now = time.time()
|
|
2885
|
+
holds = self.indexer.linkage_holds()
|
|
2886
|
+
drainable = dict(lags)
|
|
2887
|
+
read_offsets: dict[str, int] = {}
|
|
2888
|
+
held_files = 0
|
|
2889
|
+
held_bytes = 0
|
|
2890
|
+
oldest_age: float | None = None
|
|
2891
|
+
for filepath, started in holds.items():
|
|
2892
|
+
lag = drainable.get(filepath)
|
|
2893
|
+
tailer = self._tailers.get(filepath)
|
|
2894
|
+
if (
|
|
2895
|
+
lag is None
|
|
2896
|
+
or tailer is None
|
|
2897
|
+
or hasattr(tailer, "decoder")
|
|
2898
|
+
or self._physical_files.get(filepath, filepath).endswith(".zst")
|
|
2899
|
+
or wall_now - started > window
|
|
2900
|
+
):
|
|
2901
|
+
continue
|
|
2902
|
+
confirmed = self.registry.get(filepath)[0]
|
|
2903
|
+
size = confirmed + lag # a plain file's lag is measured from its confirmed offset
|
|
2904
|
+
read = min(max(tailer.offset, confirmed), size)
|
|
2905
|
+
held = read - confirmed
|
|
2906
|
+
if held <= 0:
|
|
2907
|
+
continue
|
|
2908
|
+
held_files += 1
|
|
2909
|
+
held_bytes += held
|
|
2910
|
+
age = max(0.0, wall_now - started)
|
|
2911
|
+
oldest_age = age if oldest_age is None else max(oldest_age, age)
|
|
2912
|
+
if size > read:
|
|
2913
|
+
drainable[filepath] = size - read
|
|
2914
|
+
read_offsets[filepath] = read
|
|
2915
|
+
else:
|
|
2916
|
+
drainable.pop(filepath)
|
|
2917
|
+
summary = {
|
|
2918
|
+
"files": held_files,
|
|
2919
|
+
"bytes": held_bytes,
|
|
2920
|
+
"oldest_age_s": round(oldest_age, 1) if oldest_age is not None else None,
|
|
2921
|
+
"window_s": window,
|
|
2922
|
+
}
|
|
2923
|
+
return drainable, read_offsets, summary
|
|
2924
|
+
|
|
2802
2925
|
def _db_realtime_inserts_since_window_start(self) -> int | None:
|
|
2803
2926
|
if not self.db_path:
|
|
2804
2927
|
return None
|
|
@@ -2949,13 +3072,19 @@ class JSONLWatcher:
|
|
|
2949
3072
|
self._db_probe_failed_since = now
|
|
2950
3073
|
db_probe_failed_for_s = now - self._db_probe_failed_since if db_probe_failed else 0.0
|
|
2951
3074
|
roots_missing = self._missing_roots(now)
|
|
2952
|
-
|
|
3075
|
+
# Bytes held for T3 linkage inside their window are not lag (see _split_linkage_holds).
|
|
3076
|
+
lags, held_read_offsets, held_for_linkage = self._split_linkage_holds(self._offset_lags(files))
|
|
2953
3077
|
max_lag = max(lags.values(), default=0)
|
|
2954
3078
|
# Measured progress: a plain file's confirmed offset and its registry generation. An
|
|
2955
3079
|
# archive has no confirmed decoded checkpoint comparable to its physical size, so it gets
|
|
2956
3080
|
# no entry and can never read as catching up; its lag still raises offset_lag (#1827).
|
|
3081
|
+
# A partly read file held for linkage confirms nothing until its hold ends, so its
|
|
3082
|
+
# progress is its read offset: the unread bytes are what is still draining.
|
|
2957
3083
|
progress = {
|
|
2958
|
-
filepath: (
|
|
3084
|
+
filepath: (
|
|
3085
|
+
held_read_offsets.get(filepath, self.registry.get(filepath)[0]),
|
|
3086
|
+
self.registry.generation(filepath),
|
|
3087
|
+
)
|
|
2959
3088
|
for filepath in lags
|
|
2960
3089
|
if not self._physical_files.get(filepath, filepath).endswith(".zst")
|
|
2961
3090
|
}
|
|
@@ -2975,6 +3104,8 @@ class JSONLWatcher:
|
|
|
2975
3104
|
"last_poll_rounds": self._catch_up_rounds,
|
|
2976
3105
|
"last_poll_s": round(self._catch_up_s, 3),
|
|
2977
3106
|
"budget_s": self.catch_up_budget_s,
|
|
3107
|
+
# Visible, never a stall: T3-origin sessions read and waiting for T3 to link them.
|
|
3108
|
+
"held_for_linkage": held_for_linkage,
|
|
2978
3109
|
}
|
|
2979
3110
|
all_failure_payloads = [
|
|
2980
3111
|
{key: value for key, value in failure.items() if key != "_fingerprint"}
|
|
@@ -3542,6 +3673,7 @@ class JSONLWatcher:
|
|
|
3542
3673
|
self._record_file_ingestion_failure(filepath, error)
|
|
3543
3674
|
|
|
3544
3675
|
self.indexer.tick()
|
|
3676
|
+
self._retry_discarded_progress()
|
|
3545
3677
|
if self.on_tick:
|
|
3546
3678
|
try:
|
|
3547
3679
|
self.on_tick()
|
|
@@ -23,7 +23,7 @@ from typing import Any
|
|
|
23
23
|
|
|
24
24
|
import apsw
|
|
25
25
|
|
|
26
|
-
from .agent_provenance import classify_provenance, effective_visibility
|
|
26
|
+
from .agent_provenance import ProvenanceDecision, classify_provenance, effective_visibility
|
|
27
27
|
from .agy_attribution import STATE_FILE_NAME, AgyAttributionGate
|
|
28
28
|
from .alarm import BrainLayerAlarm
|
|
29
29
|
from .chunk_origin import detect_chunk_origin
|
|
@@ -38,7 +38,13 @@ from .pipeline.classify import classify_content
|
|
|
38
38
|
from .pipeline.correction_detection import build_correction_tags
|
|
39
39
|
from .pipeline.secret_scrub import scrub_secrets
|
|
40
40
|
from .queue_io import enqueue_watcher_chunk
|
|
41
|
-
from .t3_provenance import
|
|
41
|
+
from .t3_provenance import (
|
|
42
|
+
T3_LINKAGE_HOLD_KEY,
|
|
43
|
+
T3_UNLINKED,
|
|
44
|
+
t3_app_codex_session_ids,
|
|
45
|
+
t3_linkage_hold_started_at,
|
|
46
|
+
t3_linkage_hold_window_s,
|
|
47
|
+
)
|
|
42
48
|
from .t3_sources import resolve_t3_sources
|
|
43
49
|
from .vector_store import VectorStore
|
|
44
50
|
from .writer_telemetry import IngestMetrics
|
|
@@ -415,6 +421,7 @@ def create_flush_callback(
|
|
|
415
421
|
resolved_source_identities: dict[str, tuple[int, int, int]] = {}
|
|
416
422
|
unresolved_source_versions: dict[str, tuple[int, int] | None] = {}
|
|
417
423
|
agy_gate = AgyAttributionGate(Path(db_path or get_db_path()).expanduser().parent / STATE_FILE_NAME)
|
|
424
|
+
t3_linkage_released: set[str] = set() # sources whose hold expired, logged once per process
|
|
418
425
|
|
|
419
426
|
def ensure_direct_liveness_schema() -> None:
|
|
420
427
|
if liveness_schema_ready or store is None:
|
|
@@ -460,6 +467,9 @@ def create_flush_callback(
|
|
|
460
467
|
source_files_seen: set[str] = set()
|
|
461
468
|
confirmed_offsets: dict[str, int] = {}
|
|
462
469
|
t3_session_identity_cache: dict = {}
|
|
470
|
+
t3_linkage_hold_window = t3_linkage_hold_window_s()
|
|
471
|
+
t3_linkage_hold_starts: dict[str, float] = {}
|
|
472
|
+
flush_wall_now = time.time()
|
|
463
473
|
|
|
464
474
|
def confirm_entry(entry: dict[str, Any], source_file: str) -> None:
|
|
465
475
|
raw_offset = entry.get("_line_end_offset")
|
|
@@ -509,6 +519,8 @@ def create_flush_callback(
|
|
|
509
519
|
for entry in entries:
|
|
510
520
|
source_file = entry.get("_source_file", "unknown")
|
|
511
521
|
source_files_seen.add(source_file)
|
|
522
|
+
# Recomputed on every attempt: only an entry deferred THIS flush for T3 linkage carries it.
|
|
523
|
+
entry.pop(T3_LINKAGE_HOLD_KEY, None)
|
|
512
524
|
agy_index_now, agy_agent = agy_gate.resolve(source_file)
|
|
513
525
|
if not agy_index_now:
|
|
514
526
|
deferred_entries.append(entry)
|
|
@@ -529,9 +541,34 @@ def create_flush_callback(
|
|
|
529
541
|
t3_session_header=entry.get("_codex_header"),
|
|
530
542
|
agy_agent=agy_agent,
|
|
531
543
|
)
|
|
532
|
-
except BrainLayerAlarm:
|
|
533
|
-
|
|
534
|
-
|
|
544
|
+
except BrainLayerAlarm as alarm_event:
|
|
545
|
+
if alarm_event.code != "t3_runtime_linkage_pending":
|
|
546
|
+
deferred_entries.append(entry)
|
|
547
|
+
continue
|
|
548
|
+
# A T3-origin session T3 has not linked. Hold it for the window, counted from the
|
|
549
|
+
# session's own start; T3 links the sessions it adopts within seconds. Past the
|
|
550
|
+
# window T3 never will (it keeps one Codex session per thread), so index it, labelled
|
|
551
|
+
# t3-unlinked, and confirm it: a hold must never become a permanent gap or a stall.
|
|
552
|
+
if source_file not in t3_linkage_hold_starts:
|
|
553
|
+
t3_linkage_hold_starts[source_file] = t3_linkage_hold_started_at(
|
|
554
|
+
source_file, session_header=entry.get("_codex_header"), cache=t3_session_identity_cache
|
|
555
|
+
)
|
|
556
|
+
hold_started_at = t3_linkage_hold_starts[source_file]
|
|
557
|
+
if flush_wall_now - hold_started_at <= t3_linkage_hold_window:
|
|
558
|
+
entry[T3_LINKAGE_HOLD_KEY] = hold_started_at
|
|
559
|
+
deferred_entries.append(entry)
|
|
560
|
+
continue
|
|
561
|
+
if source_file not in t3_linkage_released:
|
|
562
|
+
t3_linkage_released.add(source_file)
|
|
563
|
+
logger.warning(
|
|
564
|
+
"T3 linkage hold expired after %.0f s for %s; indexing it as %s",
|
|
565
|
+
flush_wall_now - hold_started_at,
|
|
566
|
+
source_file,
|
|
567
|
+
T3_UNLINKED,
|
|
568
|
+
)
|
|
569
|
+
provenance_decision = ProvenanceDecision(
|
|
570
|
+
T3_UNLINKED, "KEEP", "T3-origin Codex session never linked within the hold window", "cli-agent"
|
|
571
|
+
)
|
|
535
572
|
project = source_projects.get(source_file)
|
|
536
573
|
if project is None and entry.get("_compressed_archive"):
|
|
537
574
|
project = _extract_workspace_project(entry)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
BUILD_SHA = "6f7f7ae4b8ab451896dcf8754cc7ca67a0867086"
|
|
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.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.maintenance-nightly.plist
RENAMED
|
File without changes
|
{brainlayer-1.6.6 → brainlayer-1.6.7}/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.6 → brainlayer-1.6.7}/scripts/launchd/com.brainlayer.throughput-watchdog.plist
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brainlayer-1.6.6 → brainlayer-1.6.7}/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
|
|
File without changes
|
|
File without changes
|