shellbrain 0.1.23__tar.gz → 0.1.24__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.
- {shellbrain-0.1.23 → shellbrain-0.1.24}/PKG-INFO +1 -1
- shellbrain-0.1.24/app/boot/migrations.py +115 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/init.py +5 -2
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/cli/main.py +6 -2
- {shellbrain-0.1.23 → shellbrain-0.1.24}/pyproject.toml +1 -1
- {shellbrain-0.1.23 → shellbrain-0.1.24}/shellbrain.egg-info/PKG-INFO +1 -1
- shellbrain-0.1.23/app/boot/migrations.py +0 -61
- {shellbrain-0.1.23 → shellbrain-0.1.24}/README.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/__main__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/_dsn_resolution.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/admin_db.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/config.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/create_policy.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/db.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/embeddings.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/home.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/read_policy.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/repos.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/retrieval.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/thresholds.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/update_policy.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/boot/use_cases.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/config/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/config/defaults/create_policy.yaml +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/config/defaults/read_policy.yaml +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/config/defaults/runtime.yaml +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/config/defaults/thresholds.yaml +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/config/defaults/update_policy.yaml +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/config/loader.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/contracts/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/contracts/errors.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/contracts/requests.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/contracts/responses.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/associations.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/episodes.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/evidence.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/facts.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/guidance.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/identity.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/memory.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/runtime_context.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/session_state.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/telemetry.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/entities/utility.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/clock.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/config.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/embeddings.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/idgen.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/repos.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/retrieval.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/session_state_store.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/interfaces/unit_of_work.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/_shared/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/_shared/executor.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/_shared/side_effects.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/create_policy/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/create_policy/pipeline.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/bm25.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/context_pack_builder.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/expansion.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/fusion_rrf.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/lexical_query.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/pipeline.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/scoring.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/seed_retrieval.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/update_policy/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/update_policy/pipeline.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/build_guidance.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/create_memory.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/manage_session_state.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/read_memory.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/record_episode_sync_telemetry.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/record_model_usage_telemetry.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/record_operation_telemetry.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/sync_episode.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/use_cases/update_memory.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/env.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260226_0001_initial_schema.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260312_0002_add_hard_invariants.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260312_0003_drop_create_confidence.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260313_0004_episode_sync_hardening.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260313_0005_evidence_episode_event_refs.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260318_0006_usage_telemetry_schema.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260319_0007_identity_session_guidance.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260320_0008_instance_metadata_and_backup_safety.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260410_0009_frontier_memory_family.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260414_0010_model_usage_telemetry.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260414_0011_usage_problem_tokens_multi_solution_metrics.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260415_0012_read_pack_cost_and_read_roi.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/claude/CLAUDE.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/claude/skills/shellbrain-session-start/SKILL.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/claude/skills/shellbrain-usage-review/SKILL.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/AGENTS.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-session-start/SKILL.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-session-start/agents/openai.yaml +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-session-start/assets/shellbrain-large.svg +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-session-start/assets/shellbrain-small.svg +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-session-start/assets/shellbrain_logo.png +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-session-start/references/request-shapes.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-session-start/references/session-workflow.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-usage-review/SKILL.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-usage-review/agents/openai.yaml +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-usage-review/assets/shellbrain-small.svg +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-usage-review/assets/shellbrain_logo.png +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/cursor/skills/shellbrain-session-start/SKILL.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/cursor/skills/shellbrain-usage-review/SKILL.md +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/agent_behavior_analysis.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/analytics.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/analytics_diagnostics.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/analytics_queries.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/backup.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/destructive_guard.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/doctor.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/external_runtime.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/init_errors.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/instance_guard.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/machine_state.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/managed_runtime.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/model_usage_backfill.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/privileges.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/repo_state.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/restore.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/storage_setup.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/admin/upgrade.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/cli/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/cli/handlers.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/cli/hydration.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/cli/presenter_json.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/cli/schema_validation.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/engine.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/associations.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/episodes.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/evidence.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/experiences.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/instance_metadata.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/memories.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/metadata.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/registry.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/telemetry.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/utility.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/models/views.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/associations_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/episodes_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/evidence_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/experiences_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/memories_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/read_policy_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/telemetry_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/utility_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/semantic/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/semantic/keyword_retrieval_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/semantic/semantic_retrieval_repo.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/session.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/uow.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/embeddings/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/embeddings/local_provider.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/embeddings/query_vector_search.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/claude_code.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/codex.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/cursor.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/launcher.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/model_usage.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/normalization.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/poller.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/poller_lock.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/source_discovery.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/episodes/tool_filter.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/identity/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/identity/claude_hook_install.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/identity/claude_runtime.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/identity/codex_runtime.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/identity/compatibility.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/identity/cursor_statusline.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/identity/resolver.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/metrics/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/metrics/artifacts.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/metrics/browser.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/metrics/queries.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/metrics/render_html.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/metrics/service.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/onboarding/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/onboarding/host_assets.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/session_state/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/session_state/file_store.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/telemetry/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/telemetry/operation_summary.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/telemetry/session_selection.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/telemetry/sync_summary.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/validation/__init__.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/validation/integrity_validation.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/validation/semantic_validation.py +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/setup.cfg +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/shellbrain.egg-info/SOURCES.txt +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/shellbrain.egg-info/dependency_links.txt +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/shellbrain.egg-info/entry_points.txt +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/shellbrain.egg-info/requires.txt +0 -0
- {shellbrain-0.1.23 → shellbrain-0.1.24}/shellbrain.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""Packaged Alembic bootstrap helpers for installed-shellbrain database migrations."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from importlib.resources import as_file, files
|
|
6
|
+
import importlib.metadata
|
|
7
|
+
|
|
8
|
+
from alembic import command
|
|
9
|
+
from alembic.config import Config
|
|
10
|
+
from alembic.script import ScriptDirectory
|
|
11
|
+
from alembic.script.revision import ResolutionError
|
|
12
|
+
|
|
13
|
+
from app.boot.admin_db import get_admin_db_dsn, get_backup_dir, get_backup_mirror_dir, get_instance_mode_default
|
|
14
|
+
from app.boot.db import get_optional_db_dsn
|
|
15
|
+
from app.periphery.admin.destructive_guard import backup_and_verify_before_destructive_action
|
|
16
|
+
from app.periphery.admin.instance_guard import ensure_instance_metadata, fetch_instance_metadata
|
|
17
|
+
from app.periphery.admin.privileges import reconcile_app_role_privileges
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DatabaseRevisionAheadOfInstalledPackageError(RuntimeError):
|
|
21
|
+
"""Raised when the target database revision is newer than the installed package knows about."""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def upgrade_database(revision: str = "head") -> None:
|
|
25
|
+
"""Apply packaged Alembic migrations to the configured database."""
|
|
26
|
+
|
|
27
|
+
config = Config()
|
|
28
|
+
admin_dsn = get_admin_db_dsn()
|
|
29
|
+
with as_file(files("app").joinpath("migrations")) as migrations_path:
|
|
30
|
+
config.set_main_option("script_location", str(migrations_path))
|
|
31
|
+
script = ScriptDirectory.from_config(config)
|
|
32
|
+
if _database_has_shellbrain_objects(admin_dsn):
|
|
33
|
+
_assert_database_revision_is_known(admin_dsn=admin_dsn, script=script)
|
|
34
|
+
backup_and_verify_before_destructive_action(
|
|
35
|
+
admin_dsn=admin_dsn,
|
|
36
|
+
backup_root=get_backup_dir(),
|
|
37
|
+
mirror_root=get_backup_mirror_dir(),
|
|
38
|
+
)
|
|
39
|
+
config.set_main_option("sqlalchemy.url", admin_dsn)
|
|
40
|
+
command.upgrade(config, revision)
|
|
41
|
+
if fetch_instance_metadata(admin_dsn) is None:
|
|
42
|
+
ensure_instance_metadata(
|
|
43
|
+
admin_dsn,
|
|
44
|
+
instance_mode=get_instance_mode_default(),
|
|
45
|
+
created_by="app.admin.migrate",
|
|
46
|
+
notes="Stamped by packaged migration runner.",
|
|
47
|
+
)
|
|
48
|
+
app_dsn = get_optional_db_dsn()
|
|
49
|
+
if app_dsn:
|
|
50
|
+
reconcile_app_role_privileges(admin_dsn=admin_dsn, app_dsn=app_dsn)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _database_has_shellbrain_objects(admin_dsn: str) -> bool:
|
|
54
|
+
"""Return whether the target database already contains Shellbrain-managed tables."""
|
|
55
|
+
|
|
56
|
+
import psycopg
|
|
57
|
+
|
|
58
|
+
with psycopg.connect(admin_dsn.replace("+psycopg", "")) as conn:
|
|
59
|
+
with conn.cursor() as cur:
|
|
60
|
+
cur.execute(
|
|
61
|
+
"""
|
|
62
|
+
SELECT EXISTS (
|
|
63
|
+
SELECT 1
|
|
64
|
+
FROM information_schema.tables
|
|
65
|
+
WHERE table_schema = 'public'
|
|
66
|
+
AND table_name IN ('memories', 'episodes', 'episode_events', 'operation_invocations')
|
|
67
|
+
)
|
|
68
|
+
"""
|
|
69
|
+
)
|
|
70
|
+
return bool(cur.fetchone()[0])
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _assert_database_revision_is_known(*, admin_dsn: str, script: ScriptDirectory) -> None:
|
|
74
|
+
"""Fail early with a user-facing error when the database revision is newer than this package."""
|
|
75
|
+
|
|
76
|
+
current_revision = _fetch_database_revision(admin_dsn)
|
|
77
|
+
if current_revision is None:
|
|
78
|
+
return
|
|
79
|
+
try:
|
|
80
|
+
script.get_revision(current_revision)
|
|
81
|
+
except ResolutionError as exc:
|
|
82
|
+
installed_version = _installed_shellbrain_version()
|
|
83
|
+
raise DatabaseRevisionAheadOfInstalledPackageError(
|
|
84
|
+
"Installed Shellbrain package "
|
|
85
|
+
f"({installed_version}) cannot manage database revision {current_revision}. "
|
|
86
|
+
"This database was likely migrated by a newer Shellbrain release than the one currently installed. "
|
|
87
|
+
"Upgrade Shellbrain to a build that includes this revision, then rerun `shellbrain init` or "
|
|
88
|
+
"`shellbrain admin migrate`."
|
|
89
|
+
) from exc
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _fetch_database_revision(admin_dsn: str) -> str | None:
|
|
93
|
+
"""Return the current alembic revision when present."""
|
|
94
|
+
|
|
95
|
+
import psycopg
|
|
96
|
+
|
|
97
|
+
try:
|
|
98
|
+
with psycopg.connect(admin_dsn.replace("+psycopg", "")) as conn:
|
|
99
|
+
with conn.cursor() as cur:
|
|
100
|
+
cur.execute("SELECT version_num FROM alembic_version")
|
|
101
|
+
row = cur.fetchone()
|
|
102
|
+
except psycopg.Error:
|
|
103
|
+
return None
|
|
104
|
+
if row is None or row[0] is None:
|
|
105
|
+
return None
|
|
106
|
+
return str(row[0])
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _installed_shellbrain_version() -> str:
|
|
110
|
+
"""Return the installed Shellbrain package version when available."""
|
|
111
|
+
|
|
112
|
+
try:
|
|
113
|
+
return importlib.metadata.version("shellbrain")
|
|
114
|
+
except importlib.metadata.PackageNotFoundError:
|
|
115
|
+
return "dev"
|
|
@@ -469,10 +469,13 @@ def _reconcile_database(config: MachineConfig) -> tuple[bool, MachineConfig]:
|
|
|
469
469
|
def _apply_schema_migrations(config: MachineConfig) -> bool:
|
|
470
470
|
"""Apply packaged schema migrations to the configured Shellbrain database."""
|
|
471
471
|
|
|
472
|
-
from app.boot.migrations import upgrade_database
|
|
472
|
+
from app.boot.migrations import DatabaseRevisionAheadOfInstalledPackageError, upgrade_database
|
|
473
473
|
|
|
474
474
|
before_revision = _fetch_schema_revision(config.database.admin_dsn)
|
|
475
|
-
|
|
475
|
+
try:
|
|
476
|
+
upgrade_database()
|
|
477
|
+
except DatabaseRevisionAheadOfInstalledPackageError as exc:
|
|
478
|
+
raise InitConflictError(str(exc)) from exc
|
|
476
479
|
after_revision = _fetch_schema_revision(config.database.admin_dsn)
|
|
477
480
|
return before_revision != after_revision
|
|
478
481
|
|
|
@@ -714,9 +714,13 @@ def _run_admin_command(args: argparse.Namespace) -> int:
|
|
|
714
714
|
"""Execute one admin command."""
|
|
715
715
|
|
|
716
716
|
if args.admin_command == "migrate":
|
|
717
|
-
from app.boot.migrations import upgrade_database
|
|
717
|
+
from app.boot.migrations import DatabaseRevisionAheadOfInstalledPackageError, upgrade_database
|
|
718
718
|
|
|
719
|
-
|
|
719
|
+
try:
|
|
720
|
+
upgrade_database()
|
|
721
|
+
except DatabaseRevisionAheadOfInstalledPackageError as exc:
|
|
722
|
+
print(str(exc), file=sys.stderr)
|
|
723
|
+
return 1
|
|
720
724
|
print("Applied shellbrain schema migrations to head.")
|
|
721
725
|
return 0
|
|
722
726
|
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"""Packaged Alembic bootstrap helpers for installed-shellbrain database migrations."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from importlib.resources import as_file, files
|
|
6
|
-
|
|
7
|
-
from alembic import command
|
|
8
|
-
from alembic.config import Config
|
|
9
|
-
|
|
10
|
-
from app.boot.admin_db import get_admin_db_dsn, get_backup_dir, get_backup_mirror_dir, get_instance_mode_default
|
|
11
|
-
from app.boot.db import get_optional_db_dsn
|
|
12
|
-
from app.periphery.admin.destructive_guard import backup_and_verify_before_destructive_action
|
|
13
|
-
from app.periphery.admin.instance_guard import ensure_instance_metadata, fetch_instance_metadata
|
|
14
|
-
from app.periphery.admin.privileges import reconcile_app_role_privileges
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def upgrade_database(revision: str = "head") -> None:
|
|
18
|
-
"""Apply packaged Alembic migrations to the configured database."""
|
|
19
|
-
|
|
20
|
-
config = Config()
|
|
21
|
-
admin_dsn = get_admin_db_dsn()
|
|
22
|
-
if _database_has_shellbrain_objects(admin_dsn):
|
|
23
|
-
backup_and_verify_before_destructive_action(
|
|
24
|
-
admin_dsn=admin_dsn,
|
|
25
|
-
backup_root=get_backup_dir(),
|
|
26
|
-
mirror_root=get_backup_mirror_dir(),
|
|
27
|
-
)
|
|
28
|
-
config.set_main_option("sqlalchemy.url", admin_dsn)
|
|
29
|
-
with as_file(files("app").joinpath("migrations")) as migrations_path:
|
|
30
|
-
config.set_main_option("script_location", str(migrations_path))
|
|
31
|
-
command.upgrade(config, revision)
|
|
32
|
-
if fetch_instance_metadata(admin_dsn) is None:
|
|
33
|
-
ensure_instance_metadata(
|
|
34
|
-
admin_dsn,
|
|
35
|
-
instance_mode=get_instance_mode_default(),
|
|
36
|
-
created_by="app.admin.migrate",
|
|
37
|
-
notes="Stamped by packaged migration runner.",
|
|
38
|
-
)
|
|
39
|
-
app_dsn = get_optional_db_dsn()
|
|
40
|
-
if app_dsn:
|
|
41
|
-
reconcile_app_role_privileges(admin_dsn=admin_dsn, app_dsn=app_dsn)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def _database_has_shellbrain_objects(admin_dsn: str) -> bool:
|
|
45
|
-
"""Return whether the target database already contains Shellbrain-managed tables."""
|
|
46
|
-
|
|
47
|
-
import psycopg
|
|
48
|
-
|
|
49
|
-
with psycopg.connect(admin_dsn.replace("+psycopg", "")) as conn:
|
|
50
|
-
with conn.cursor() as cur:
|
|
51
|
-
cur.execute(
|
|
52
|
-
"""
|
|
53
|
-
SELECT EXISTS (
|
|
54
|
-
SELECT 1
|
|
55
|
-
FROM information_schema.tables
|
|
56
|
-
WHERE table_schema = 'public'
|
|
57
|
-
AND table_name IN ('memories', 'episodes', 'episode_events', 'operation_invocations')
|
|
58
|
-
)
|
|
59
|
-
"""
|
|
60
|
-
)
|
|
61
|
-
return bool(cur.fetchone()[0])
|
|
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
|
|
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
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/core/policies/read_policy/context_pack_builder.py
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
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260226_0001_initial_schema.py
RENAMED
|
File without changes
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/migrations/versions/20260312_0002_add_hard_invariants.py
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
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/onboarding_assets/codex/shellbrain-usage-review/SKILL.md
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
|
|
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
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/associations_repo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/experiences_repo.py
RENAMED
|
File without changes
|
|
File without changes
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/relational/read_policy_repo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/semantic/keyword_retrieval_repo.py
RENAMED
|
File without changes
|
{shellbrain-0.1.23 → shellbrain-0.1.24}/app/periphery/db/repos/semantic/semantic_retrieval_repo.py
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
|
|
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
|