shellbrain 0.1.56__tar.gz → 0.1.58__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.56 → shellbrain-0.1.58}/PKG-INFO +5 -5
- {shellbrain-0.1.56 → shellbrain-0.1.58}/README.md +4 -4
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/backups.py +0 -10
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/concepts.py +0 -23
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/episodes.py +1 -18
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/guidance.py +0 -3
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/identity.py +3 -16
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/ids.py +0 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/inner_agents.py +1 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/memories.py +3 -9
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/settings.py +0 -20
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/snapshots.py +2 -17
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/errors.py +0 -3
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/bm25.py +2 -5
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/lexical_query.py +3 -21
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/ontology_semantics.py +25 -62
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/concept_repositories.py +0 -5
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/episode_repositories.py +1 -19
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/host_apps/inner_agents.py +1 -4
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/backfill_model_usage/__init__.py +0 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/backfill_model_usage/backfill_model_usage.py +3 -4
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/backfill_model_usage/request.py +0 -7
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/add/execute.py +4 -17
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/show/execute.py +27 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/show/request.py +1 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/update/execute.py +10 -9
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/views.py +73 -15
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/episodes/sync_discovered_host_session.py +1 -1
- shellbrain-0.1.58/app/core/use_cases/episodes/sync_episode/request.py +40 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/episodes/sync_episode/sync_episode.py +20 -40
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/build_knowledge/execute.py +23 -82
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/build_knowledge/result.py +0 -4
- shellbrain-0.1.58/app/core/use_cases/knowledge_builder/runs.py +46 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/teach_knowledge/execute.py +22 -82
- shellbrain-0.1.58/app/core/use_cases/knowledge_builder/teach_knowledge/result.py +22 -0
- shellbrain-0.1.58/app/core/use_cases/memories/add/execute.py +121 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/memories/add/request.py +1 -15
- shellbrain-0.1.58/app/core/use_cases/memories/add/result.py +24 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/memories/reference_checks.py +4 -16
- shellbrain-0.1.58/app/core/use_cases/memories/update/execute.py +267 -0
- shellbrain-0.1.58/app/core/use_cases/memories/update/result.py +35 -0
- shellbrain-0.1.58/app/core/use_cases/memories/writes.py +126 -0
- shellbrain-0.1.58/app/core/use_cases/retrieval/build_context/__init__.py +5 -0
- shellbrain-0.1.58/app/core/use_cases/retrieval/build_context/execute.py +224 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/concept_seed_retrieval.py +1 -5
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/context_pack_pipeline.py +7 -24
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/deterministic_graph_recall.py +158 -170
- shellbrain-0.1.58/app/core/use_cases/retrieval/read/__init__.py +19 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/read/execute.py +4 -24
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/read/request.py +2 -35
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/read/result.py +0 -3
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/read_concepts.py +19 -295
- shellbrain-0.1.58/app/core/use_cases/retrieval/recall/__init__.py +9 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/seed_retrieval.py +13 -14
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/code_delta_context/execute.py +6 -10
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/dependencies.py +2 -23
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/human/admin.py +1 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/human/admin_dependencies.py +1 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/episodes/events.py +1 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/episodes/selection.py +1 -34
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/memories/add.py +4 -11
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/memories/update.py +4 -11
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/retrieval/execution.py +2 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/result_envelopes.py +5 -36
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/session_state.py +0 -12
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/working_agent/snapshot.py +1 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/parser/builder.py +5 -5
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/concepts.py +7 -25
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/hydration.py +4 -38
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/memories.py +0 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/scenarios.py +2 -4
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/runner.py +0 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/runtime.py +0 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/backups/logical_backup.py +41 -41
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/connection.py +7 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/provisioning/managed_local.py +15 -28
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/storage_setup.py +1 -10
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/engine.py +1 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/associations.py +0 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/concepts.py +0 -28
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/episodes.py +0 -42
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/registry.py +1 -16
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/telemetry.py +0 -5
- shellbrain-0.1.58/app/infrastructure/db/runtime/repos/memory_visibility.py +27 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/concepts_repo.py +1 -32
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/episodes_repo.py +33 -105
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/evidence_repo.py +17 -52
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/read_policy_repo.py +4 -22
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/telemetry_repo.py +19 -49
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/semantic/keyword_retrieval_repo.py +7 -27
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/semantic/semantic_retrieval_repo.py +5 -24
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/claude.py +1 -8
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/codex.py +3 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/cursor.py +1 -8
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/cursor_statusline_config.py +9 -9
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/service.py +0 -4
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/identity/claude_hook_install.py +5 -8
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/identity/resolver.py +2 -20
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/inner_agents/claude_cli.py +5 -11
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/inner_agents/codex_cli.py +21 -101
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/inner_agents/output_parser.py +1 -17
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/inner_agents/prompt.py +42 -248
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/cursor.py +2 -7
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/session_selection.py +2 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/process/episode_sync/lock_file.py +8 -27
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/process/episode_sync/poller.py +3 -11
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/sink.py +4 -4
- shellbrain-0.1.58/app/infrastructure/telemetry/write_records.py +156 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/settings/internal-agents/defaults.yaml +0 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/admin.py +0 -7
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/admin_dependencies.py +1 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/backup.py +4 -17
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/cli.py +7 -10
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/cli_runtime.py +0 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/embeddings.py +16 -24
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/episode_poller.py +2 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/internal_agents.py +0 -6
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/knowledge_builder.py +2 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/model_usage_backfill.py +3 -4
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/operation_dependencies.py +2 -24
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/read_policy.py +0 -16
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/repo_context.py +1 -7
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/runtime_admin.py +12 -34
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/settings.py +0 -12
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/snapshot_baseline.py +2 -2
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/thresholds.py +0 -6
- shellbrain-0.1.58/migrations/versions/20260901_0039_drop_unused_schema.py +72 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/pyproject.toml +1 -1
- {shellbrain-0.1.56 → shellbrain-0.1.58}/shellbrain.egg-info/PKG-INFO +5 -5
- {shellbrain-0.1.56 → shellbrain-0.1.58}/shellbrain.egg-info/SOURCES.txt +4 -24
- shellbrain-0.1.56/app/core/policies/episodes/event_content.py +0 -18
- shellbrain-0.1.56/app/core/policies/memories/add_plan.py +0 -122
- shellbrain-0.1.56/app/core/policies/memories/update_plan.py +0 -153
- shellbrain-0.1.56/app/core/use_cases/admin/create_backup.py +0 -18
- shellbrain-0.1.56/app/core/use_cases/admin/verify_backup.py +0 -21
- shellbrain-0.1.56/app/core/use_cases/concepts/containment_checks.py +0 -26
- shellbrain-0.1.56/app/core/use_cases/episodes/sync_episode/request.py +0 -74
- shellbrain-0.1.56/app/core/use_cases/knowledge_builder/teach_knowledge/result.py +0 -69
- shellbrain-0.1.56/app/core/use_cases/memories/add/execute.py +0 -55
- shellbrain-0.1.56/app/core/use_cases/memories/add/result.py +0 -35
- shellbrain-0.1.56/app/core/use_cases/memories/effect_plan.py +0 -145
- shellbrain-0.1.56/app/core/use_cases/memories/update/execute.py +0 -110
- shellbrain-0.1.56/app/core/use_cases/memories/update/result.py +0 -62
- shellbrain-0.1.56/app/core/use_cases/plan_execution.py +0 -370
- shellbrain-0.1.56/app/core/use_cases/retrieval/build_context/__init__.py +0 -13
- shellbrain-0.1.56/app/core/use_cases/retrieval/build_context/execute.py +0 -658
- shellbrain-0.1.56/app/core/use_cases/retrieval/read/__init__.py +0 -29
- shellbrain-0.1.56/app/core/use_cases/retrieval/recall/__init__.py +0 -18
- shellbrain-0.1.56/app/core/use_cases/retrieval/recall/execute.py +0 -38
- shellbrain-0.1.56/app/entrypoints/cli/error_responses.py +0 -10
- shellbrain-0.1.56/app/entrypoints/host_hooks/__init__.py +0 -1
- shellbrain-0.1.56/app/entrypoints/host_hooks/claude_session_start.py +0 -11
- shellbrain-0.1.56/app/entrypoints/host_hooks/cursor_statusline.py +0 -9
- shellbrain-0.1.56/app/infrastructure/db/admin/backups/manifest_store.py +0 -39
- shellbrain-0.1.56/app/infrastructure/db/admin/provisioning/init_effects.py +0 -20
- shellbrain-0.1.56/app/infrastructure/telemetry/write_records.py +0 -262
- shellbrain-0.1.56/app/settings/defaults/create_policy.yaml +0 -7
- shellbrain-0.1.56/app/settings/defaults/update_policy.yaml +0 -5
- shellbrain-0.1.56/app/startup/create_policy.py +0 -60
- shellbrain-0.1.56/app/startup/host_hooks.py +0 -24
- shellbrain-0.1.56/app/startup/retrieval.py +0 -3
- shellbrain-0.1.56/app/startup/update_policy.py +0 -47
- shellbrain-0.1.56/app/startup/use_cases.py +0 -22
- shellbrain-0.1.56/onboarding_assets/codex/clean-architecture/SKILL.md +0 -290
- shellbrain-0.1.56/onboarding_assets/codex/clean-code/SKILL.md +0 -243
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/__main__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/admin_errors.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/associations.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/evidence.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/knowledge_builder.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/machine_config.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/runtime_context.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/scenarios.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/session_state.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/structural_memory_relations.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/entities/utility.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/concepts/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/concepts/relation_rules.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/concepts/search_text.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/episodes/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/episodes/knowledge_building.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/memories/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/memories/link_rules.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/context_pack.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/expansion.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/fusion_rrf.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/policies/retrieval/scoring.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/guidance.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/knowledge_builder.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/memory_repositories.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/problem_runs.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/retrieval_repositories.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/snapshots.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/db/unit_of_work.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/embeddings/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/embeddings/provider.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/embeddings/retrieval.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/host_apps/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/local_state/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/local_state/session_state_store.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/local_state/shadow_git.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/system/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/system/clock.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/ports/system/idgen.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/analytics_diagnostics.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/backfill_model_usage/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/diagnose_runtime.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/generate_analytics_report.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/initialize_runtime.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/restore_backup.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/build_guidance.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/add/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/add/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/add/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/embeddings.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/reference_checks.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/show/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/show/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/update/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/update/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/concepts/update/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/episodes/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/episodes/events/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/episodes/events/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/episodes/sync_episode/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/episodes/sync_episode/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/build_knowledge/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/build_knowledge/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/teach_knowledge/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/knowledge_builder/teach_knowledge/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/memories/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/memories/add/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/memories/update/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/memories/update/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/metrics/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/metrics/analyze_agent_behavior.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/expansion.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/recall/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/retrieval/recall/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/scenarios/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/scenarios/record/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/scenarios/record/execute.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/scenarios/record/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/scenarios/record/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/capture_snapshot/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/capture_snapshot/execute.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/capture_snapshot/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/capture_snapshot/result.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/code_delta_context/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/snapshots/code_delta_context/request.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/cli_operation.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/human/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/human/init.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/concepts/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/concepts/add.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/concepts/show.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/concepts/update.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/episodes/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/episodes/serialization.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/memories/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/memories/utility_vote_evidence.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/retrieval/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/retrieval/read.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/scenarios/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/internal_agent/scenarios/record.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/working_agent/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/working_agent/recall.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/handlers/working_agent/teach.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/main.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/parser/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/presenters/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/presenters/init.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/episodes.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/payload_validation.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/prepared.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/retrieval.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/cli/request_parsing/teach.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/jobs/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/entrypoints/jobs/episode_sync.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/app_role_safety.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/backups/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/backups/destructive_guard.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/instance_guard.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/migrations.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/privileges.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/provisioning/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/provisioning/docker_prerequisites.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/admin/provisioning/external_postgres.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/evidence.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/experiences.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/instance_metadata.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/knowledge_builder.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/memories.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/metadata.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/problem_runs.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/snapshots.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/models/utility.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/queries/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/queries/agent_behavior.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/queries/analytics.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/queries/model_usage_backfill.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/associations_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/experiences_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/knowledge_builder_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/memories_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/problem_runs_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/snapshots_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/relational/utility_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/semantic/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/repos/semantic/concept_retrieval_repo.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/session.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/db/runtime/uow.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/embeddings/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/embeddings/local_provider.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/embeddings/prewarm.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/embeddings/query_vector_search.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/inspection.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/managed_markdown.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/managed_tree.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/packaged_assets.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/paths.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/assets/types.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/identity/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/identity/claude_runtime.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/identity/codex_runtime.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/identity/compatibility.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/identity/cursor_statusline.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/inner_agents/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/claude_code.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/codex.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/model_usage.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/normalization.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/source_discovery.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/host_apps/transcripts/tool_filter.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/init_lock.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/machine_config_store.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/operation_registration.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/paths.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/recall_mode_store.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/repo_registration_store.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/session_state_file_store.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/local_state/shadow_git_store.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/process/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/process/episode_sync/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/process/episode_sync/autostart.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/process/episode_sync/launcher.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/process/episode_sync/status_store.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/system/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/system/clock.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/system/id_generator.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/system/package_upgrade.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/inner_agent_records.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/operation_invocations.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/operation_polling.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/read_records.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/recall_records.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/recorder.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/records.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/storage_protocols.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/infrastructure/telemetry/sync_records.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/settings/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/settings/defaults/read_policy.yaml +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/settings/defaults/runtime.yaml +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/settings/defaults/thresholds.yaml +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/admin_db.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/admin_diagnose.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/analytics.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/config.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/db.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/dsn_resolution.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/episode_sync_launcher.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/internal_agent_config.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/migrations.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/repos.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/app/startup/runtime_context.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/_legacy_usage_views.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/_usage_view_sql.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/env.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260226_0001_initial_schema.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260312_0002_add_hard_invariants.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260312_0003_drop_create_confidence.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260313_0004_episode_sync_hardening.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260313_0005_evidence_episode_event_refs.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260318_0006_usage_telemetry_schema.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260319_0007_identity_session_guidance.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260320_0008_instance_metadata_and_backup_safety.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260410_0009_frontier_memory_family.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260414_0010_model_usage_telemetry.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260414_0011_usage_problem_tokens_multi_solution_metrics.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260415_0012_read_pack_cost_and_read_roi.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260421_0013_concept_context_graph.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260422_0014_concept_read_telemetry.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260422_0015_problem_runs.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260508_0016_recall_telemetry.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260511_0017_inner_agent_invocations.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260513_0018_knowledge_build_runs.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260515_0019_scenario_records.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260516_0020_knowledge_build_observability.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260519_0021_knowledge_build_watermark_stable.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260519_0022_update_evidence_links.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260519_0023_explicit_teach_trigger.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260519_0024_read_retrieval_latency_indexes.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260519_0025_repair_recall_source_input_section_constraint.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260519_0026_repair_knowledge_build_trigger_constraint.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260519_0027_concept_embeddings.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260520_0028_knowledge_build_lifecycle.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260522_0029_remove_frontier_and_memory_anchors.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260522_0030_concept_lifecycle_events.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260522_0031_unified_evidence_storage.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260522_0032_memory_lifecycle_events.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260522_0033_concept_memory_role_cleanup.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260522_0034_structural_memory_relations.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260522_0035_retire_legacy_compatibility_tables.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260526_0036_shadow_snapshots.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260606_0037_wiki_summaries.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/20260815_0038_drop_wiki_summaries.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/migrations/versions/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/__init__.py +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/claude/CLAUDE.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/claude/skills/shellbrain/SKILL.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/claude/skills/shellbrain-usage-review/SKILL.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/AGENTS.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain/SKILL.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain/agents/openai.yaml +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain/assets/shellbrain-large.svg +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain/assets/shellbrain-small.svg +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain/assets/shellbrain_logo.png +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain/references/session-workflow.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain-usage-review/SKILL.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain-usage-review/agents/openai.yaml +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain-usage-review/assets/shellbrain-small.svg +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/codex/shellbrain-usage-review/assets/shellbrain_logo.png +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/cursor/skills/shellbrain/SKILL.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/onboarding_assets/cursor/skills/shellbrain-usage-review/SKILL.md +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/setup.cfg +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/shellbrain.egg-info/dependency_links.txt +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/shellbrain.egg-info/entry_points.txt +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/shellbrain.egg-info/requires.txt +0 -0
- {shellbrain-0.1.56 → shellbrain-0.1.58}/shellbrain.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shellbrain
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.58
|
|
4
4
|
Summary: Repo-scoped Shellbrain CLI with explicit evidence-backed writes.
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -20,7 +20,7 @@ Requires-Dist: sentence-transformers<4.0,>=3.0
|
|
|
20
20
|
|
|
21
21
|
<p align="center">Long-term Memory for AI Agents.</p>
|
|
22
22
|
|
|
23
|
-
ShellBrain
|
|
23
|
+
ShellBrain carries useful lessons from one agent task to the next. It preserves decision reasons, failed approaches, product direction, and preferences that the resulting code does not explain.
|
|
24
24
|
|
|
25
25
|
## Install
|
|
26
26
|
|
|
@@ -53,13 +53,13 @@ You can also run `curl -L shellbrain.ai/upgrade | bash`. Manual alternative: `pi
|
|
|
53
53
|
|
|
54
54
|
## Architecture
|
|
55
55
|
|
|
56
|
-
ShellBrain
|
|
56
|
+
ShellBrain stores evidence and two forms of reusable knowledge:
|
|
57
57
|
|
|
58
58
|
- **Episodic knowledge records evidence.** It stores prompts, agent steps, tool calls, and outputs from each session.
|
|
59
59
|
- **Empirical knowledge extracts concrete memories.** It organizes problems, solutions, failed tactics, facts, preferences, and changes in a semantic graph for **case-based reasoning**.
|
|
60
60
|
- **Conceptual knowledge abstracts reusable ideas.** Its concept graph connects claims, relations, and implementations to empirical knowledge.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Memories and concept claims link to supporting evidence. A concept can express a product principle without a duplicate memory. Current code remains the source of truth for implementation details.
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -98,7 +98,7 @@ shellbrain recall "What is ShellBrain, and how does it help a working coding age
|
|
|
98
98
|
}
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
Recall selects an evidence pack in code, then asks an inner agent to summarize it. Source attribution comes from the selected records. Fast mode and provider failures return a brief directly from that same pack.
|
|
102
102
|
|
|
103
103
|
### Teach
|
|
104
104
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<p align="center">Long-term Memory for AI Agents.</p>
|
|
8
8
|
|
|
9
|
-
ShellBrain
|
|
9
|
+
ShellBrain carries useful lessons from one agent task to the next. It preserves decision reasons, failed approaches, product direction, and preferences that the resulting code does not explain.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -39,13 +39,13 @@ You can also run `curl -L shellbrain.ai/upgrade | bash`. Manual alternative: `pi
|
|
|
39
39
|
|
|
40
40
|
## Architecture
|
|
41
41
|
|
|
42
|
-
ShellBrain
|
|
42
|
+
ShellBrain stores evidence and two forms of reusable knowledge:
|
|
43
43
|
|
|
44
44
|
- **Episodic knowledge records evidence.** It stores prompts, agent steps, tool calls, and outputs from each session.
|
|
45
45
|
- **Empirical knowledge extracts concrete memories.** It organizes problems, solutions, failed tactics, facts, preferences, and changes in a semantic graph for **case-based reasoning**.
|
|
46
46
|
- **Conceptual knowledge abstracts reusable ideas.** Its concept graph connects claims, relations, and implementations to empirical knowledge.
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Memories and concept claims link to supporting evidence. A concept can express a product principle without a duplicate memory. Current code remains the source of truth for implementation details.
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
@@ -84,7 +84,7 @@ shellbrain recall "What is ShellBrain, and how does it help a working coding age
|
|
|
84
84
|
}
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
Recall selects an evidence pack in code, then asks an inner agent to summarize it. Source attribution comes from the selected records. Fast mode and provider failures return a brief directly from that same pack.
|
|
88
88
|
|
|
89
89
|
### Teach
|
|
90
90
|
|
|
@@ -31,15 +31,5 @@ class BackupManifest:
|
|
|
31
31
|
compression: str
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
@dataclass(frozen=True)
|
|
35
|
-
class BackupVerificationResult:
|
|
36
|
-
"""Stable result for a verified backup artifact."""
|
|
37
|
-
|
|
38
|
-
backup_id: BackupId
|
|
39
|
-
artifact_sha256: str
|
|
40
|
-
artifact_size_bytes: int
|
|
41
|
-
verified: bool
|
|
42
|
-
|
|
43
|
-
|
|
44
34
|
class BackupPolicyError(RuntimeError):
|
|
45
35
|
"""Raised when a backup or restore request violates core safety policy."""
|
|
@@ -159,14 +159,6 @@ class ConceptCreatedBy(str, Enum):
|
|
|
159
159
|
IMPORT = "import"
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
class GraphPatchStatus(str, Enum):
|
|
163
|
-
"""Allowed graph patch lifecycle states."""
|
|
164
|
-
|
|
165
|
-
PENDING = "pending"
|
|
166
|
-
APPLIED = "applied"
|
|
167
|
-
REJECTED = "rejected"
|
|
168
|
-
|
|
169
|
-
|
|
170
162
|
@dataclass(frozen=True, kw_only=True)
|
|
171
163
|
class Concept:
|
|
172
164
|
"""One durable concept container."""
|
|
@@ -311,18 +303,3 @@ class ConceptEvidence:
|
|
|
311
303
|
transcript_ref: str | None = None
|
|
312
304
|
note: str | None = None
|
|
313
305
|
created_at: datetime | None = None
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
@dataclass(frozen=True, kw_only=True)
|
|
317
|
-
class GraphPatch:
|
|
318
|
-
"""Minimal reserved future graph-patch proposal record."""
|
|
319
|
-
|
|
320
|
-
id: str
|
|
321
|
-
repo_id: str
|
|
322
|
-
schema_version: str
|
|
323
|
-
status: GraphPatchStatus
|
|
324
|
-
proposed_by: ConceptCreatedBy
|
|
325
|
-
operations_json: list[dict[str, Any]]
|
|
326
|
-
evidence_summary: str | None = None
|
|
327
|
-
created_at: datetime | None = None
|
|
328
|
-
applied_at: datetime | None = None
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""This module defines episodic session entities
|
|
1
|
+
"""This module defines episodic session entities."""
|
|
2
2
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
from datetime import datetime
|
|
@@ -30,8 +30,6 @@ class Episode:
|
|
|
30
30
|
repo_id: str
|
|
31
31
|
host_app: str
|
|
32
32
|
thread_id: str | None = None
|
|
33
|
-
title: str | None = None
|
|
34
|
-
objective: str | None = None
|
|
35
33
|
status: EpisodeStatus = EpisodeStatus.ACTIVE
|
|
36
34
|
started_at: datetime | None = None
|
|
37
35
|
ended_at: datetime | None = None
|
|
@@ -77,18 +75,3 @@ class EpisodeEvent:
|
|
|
77
75
|
source: EpisodeEventSource
|
|
78
76
|
content: str
|
|
79
77
|
created_at: datetime | None = None
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
@dataclass(kw_only=True)
|
|
83
|
-
class SessionTransfer:
|
|
84
|
-
"""This dataclass models immutable cross-session transfer provenance."""
|
|
85
|
-
|
|
86
|
-
id: str
|
|
87
|
-
repo_id: str
|
|
88
|
-
from_episode_id: str
|
|
89
|
-
to_episode_id: str
|
|
90
|
-
event_id: str
|
|
91
|
-
transfer_kind: str
|
|
92
|
-
rationale: str | None = None
|
|
93
|
-
transferred_by: str | None = None
|
|
94
|
-
created_at: datetime | None = None
|
|
@@ -26,7 +26,6 @@ class GuidanceDecision:
|
|
|
26
26
|
problem_id: str | None = None
|
|
27
27
|
memory_ids: list[str] = field(default_factory=list)
|
|
28
28
|
vote_scale_hint: dict[str, float] | None = None
|
|
29
|
-
setup_hint: str | None = None
|
|
30
29
|
|
|
31
30
|
def to_payload(self) -> dict[str, Any]:
|
|
32
31
|
"""Serialize one guidance decision into the public response shape."""
|
|
@@ -42,6 +41,4 @@ class GuidanceDecision:
|
|
|
42
41
|
payload["memory_ids"] = list(self.memory_ids)
|
|
43
42
|
if self.vote_scale_hint is not None:
|
|
44
43
|
payload["vote_scale_hint"] = dict(self.vote_scale_hint)
|
|
45
|
-
if self.setup_hint is not None:
|
|
46
|
-
payload["setup_hint"] = self.setup_hint
|
|
47
44
|
return payload
|
|
@@ -17,17 +17,6 @@ class IdentityTrustLevel(str, Enum):
|
|
|
17
17
|
SUPPORTED_HOST_APPS = frozenset({"codex", "claude_code", "cursor"})
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def build_canonical_caller_id(
|
|
21
|
-
*, host_app: str, host_session_key: str, agent_key: str | None = None
|
|
22
|
-
) -> str:
|
|
23
|
-
"""Build the canonical caller identifier from one host session and optional agent key."""
|
|
24
|
-
|
|
25
|
-
canonical = f"{host_app}:{host_session_key}"
|
|
26
|
-
if agent_key:
|
|
27
|
-
canonical = f"{canonical}:agent:{agent_key}"
|
|
28
|
-
return canonical
|
|
29
|
-
|
|
30
|
-
|
|
31
20
|
@dataclass(frozen=True, kw_only=True)
|
|
32
21
|
class CallerIdentity:
|
|
33
22
|
"""Canonical caller identity used to scope episodes, session state, and guidance."""
|
|
@@ -57,11 +46,9 @@ class CallerIdentity:
|
|
|
57
46
|
object.__setattr__(
|
|
58
47
|
self, "trust_level", IdentityTrustLevel(str(self.trust_level))
|
|
59
48
|
)
|
|
60
|
-
canonical_id =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
agent_key=self.agent_key,
|
|
64
|
-
)
|
|
49
|
+
canonical_id = f"{host_app}:{host_session_key}"
|
|
50
|
+
if self.agent_key:
|
|
51
|
+
canonical_id = f"{canonical_id}:agent:{self.agent_key}"
|
|
65
52
|
if self.canonical_id is not None and self.canonical_id != canonical_id:
|
|
66
53
|
raise ValueError(
|
|
67
54
|
"canonical_id must match host_app, host_session_key, and agent_key"
|
|
@@ -10,9 +10,7 @@ RepoId = NewType("RepoId", str)
|
|
|
10
10
|
EpisodeId = NewType("EpisodeId", str)
|
|
11
11
|
EvidenceRefText = NewType("EvidenceRefText", str)
|
|
12
12
|
EvidenceId = NewType("EvidenceId", str)
|
|
13
|
-
InvocationId = NewType("InvocationId", str)
|
|
14
13
|
AssociationEdgeId = NewType("AssociationEdgeId", str)
|
|
15
14
|
|
|
16
15
|
Confidence = NewType("Confidence", float)
|
|
17
16
|
Salience = NewType("Salience", float)
|
|
18
|
-
UtilityVote = NewType("UtilityVote", float)
|
|
@@ -15,7 +15,7 @@ InnerAgentName = Literal["build_context", "build_knowledge", "teach"]
|
|
|
15
15
|
InnerAgentProviderName = str
|
|
16
16
|
InnerAgentReasoningLevel = Literal["none", "minimal", "low", "medium", "high", "xhigh"]
|
|
17
17
|
BuildContextStrategy = Literal[
|
|
18
|
-
"deterministic_synthesis", "deterministic_only"
|
|
18
|
+
"deterministic_synthesis", "deterministic_only"
|
|
19
19
|
]
|
|
20
20
|
TokenCaptureQuality = Literal["exact", "estimated"]
|
|
21
21
|
InnerAgentRunStatus = Literal[
|
|
@@ -36,7 +36,6 @@ class BuildContextSettings(_StrictModel):
|
|
|
36
36
|
model: str = Field(min_length=1)
|
|
37
37
|
reasoning: InnerAgentReasoningLevel
|
|
38
38
|
timeout_seconds: int = Field(ge=1, le=600)
|
|
39
|
-
max_private_reads: int = Field(default=0, ge=0, le=10)
|
|
40
39
|
max_brief_tokens: int | None = Field(default=None, ge=1, le=100_000)
|
|
41
40
|
|
|
42
41
|
|
|
@@ -34,17 +34,11 @@ class MemoryKind(str, Enum):
|
|
|
34
34
|
|
|
35
35
|
return self in {MemoryKind.SOLUTION, MemoryKind.FAILED_TACTIC}
|
|
36
36
|
|
|
37
|
-
MATURE_MEMORY_KINDS: Final[tuple[MemoryKind, ...]] = (
|
|
38
|
-
MemoryKind.PROBLEM,
|
|
39
|
-
MemoryKind.SOLUTION,
|
|
40
|
-
MemoryKind.FAILED_TACTIC,
|
|
41
|
-
MemoryKind.FACT,
|
|
42
|
-
MemoryKind.PREFERENCE,
|
|
43
|
-
MemoryKind.CHANGE,
|
|
44
|
-
)
|
|
45
37
|
MATURE_MEMORY_KIND_VALUES: Final[tuple[str, ...]] = tuple(
|
|
46
|
-
kind.value for kind in
|
|
38
|
+
kind.value for kind in MemoryKind
|
|
47
39
|
)
|
|
40
|
+
|
|
41
|
+
|
|
48
42
|
class MemoryScope(str, Enum):
|
|
49
43
|
"""This enum defines shellbrain visibility scope."""
|
|
50
44
|
|
|
@@ -89,28 +89,8 @@ class ReadPolicySettings:
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
@dataclass(frozen=True)
|
|
93
|
-
class CreatePolicySettings:
|
|
94
|
-
"""Create-policy validation and hydration settings."""
|
|
95
|
-
|
|
96
|
-
gates: tuple[str, ...]
|
|
97
|
-
defaults: Mapping[str, Any]
|
|
98
|
-
|
|
99
|
-
def hydration_defaults(self) -> dict[str, Any]:
|
|
100
|
-
return dict(self.defaults)
|
|
101
|
-
|
|
102
|
-
def to_dict(self) -> dict[str, Any]:
|
|
103
|
-
return {"gates": list(self.gates), "defaults": dict(self.defaults)}
|
|
104
|
-
|
|
105
92
|
|
|
106
|
-
@dataclass(frozen=True)
|
|
107
|
-
class UpdatePolicySettings:
|
|
108
|
-
"""Update-policy validation settings."""
|
|
109
93
|
|
|
110
|
-
gates: tuple[str, ...]
|
|
111
|
-
|
|
112
|
-
def to_dict(self) -> dict[str, Any]:
|
|
113
|
-
return {"gates": list(self.gates)}
|
|
114
94
|
|
|
115
95
|
|
|
116
96
|
@dataclass(frozen=True)
|
|
@@ -32,13 +32,6 @@ class ShadowGitPathChangeStatus(str, Enum):
|
|
|
32
32
|
RENAMED = "renamed"
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
class CodeDeltaContextStatus(str, Enum):
|
|
36
|
-
"""Public availability states for code-delta context."""
|
|
37
|
-
|
|
38
|
-
AVAILABLE = "available"
|
|
39
|
-
UNAVAILABLE = "unavailable"
|
|
40
|
-
|
|
41
|
-
|
|
42
35
|
class CodeDeltaUnavailableReason(str, Enum):
|
|
43
36
|
"""Expected reasons an event window cannot expose code-delta context."""
|
|
44
37
|
|
|
@@ -211,13 +204,10 @@ class AvailableCodeDeltaContext:
|
|
|
211
204
|
final_shadow_commit_sha: str
|
|
212
205
|
patch_sha: str
|
|
213
206
|
path_changes: tuple[ShadowGitPathChange, ...]
|
|
214
|
-
status: CodeDeltaContextStatus = CodeDeltaContextStatus.AVAILABLE
|
|
215
207
|
|
|
216
208
|
def __post_init__(self) -> None:
|
|
217
209
|
"""Reject invalid available-context states."""
|
|
218
210
|
|
|
219
|
-
if self.status is not CodeDeltaContextStatus.AVAILABLE:
|
|
220
|
-
raise ValueError("available code delta context requires available status")
|
|
221
211
|
for field_name in (
|
|
222
212
|
"base_snapshot_id",
|
|
223
213
|
"final_snapshot_id",
|
|
@@ -248,7 +238,7 @@ class AvailableCodeDeltaContext:
|
|
|
248
238
|
"""Return the stable JSON payload for bounded events."""
|
|
249
239
|
|
|
250
240
|
return {
|
|
251
|
-
"status":
|
|
241
|
+
"status": "available",
|
|
252
242
|
"base_snapshot_id": self.base_snapshot_id,
|
|
253
243
|
"final_snapshot_id": self.final_snapshot_id,
|
|
254
244
|
"base_shadow_commit_sha": self.base_shadow_commit_sha,
|
|
@@ -266,22 +256,17 @@ class UnavailableCodeDeltaContext:
|
|
|
266
256
|
"""Expected absence of code-delta evidence for one event window."""
|
|
267
257
|
|
|
268
258
|
reason: CodeDeltaUnavailableReason
|
|
269
|
-
status: CodeDeltaContextStatus = CodeDeltaContextStatus.UNAVAILABLE
|
|
270
259
|
|
|
271
260
|
def __post_init__(self) -> None:
|
|
272
261
|
"""Reject unavailable-context states without a typed reason."""
|
|
273
262
|
|
|
274
|
-
if self.status is not CodeDeltaContextStatus.UNAVAILABLE:
|
|
275
|
-
raise ValueError(
|
|
276
|
-
"unavailable code delta context requires unavailable status"
|
|
277
|
-
)
|
|
278
263
|
if not isinstance(self.reason, CodeDeltaUnavailableReason):
|
|
279
264
|
raise ValueError("reason must be a CodeDeltaUnavailableReason")
|
|
280
265
|
|
|
281
266
|
def to_response_data(self) -> dict[str, str]:
|
|
282
267
|
"""Return the stable JSON payload for bounded events."""
|
|
283
268
|
|
|
284
|
-
return {"status":
|
|
269
|
+
return {"status": "unavailable", "reason": self.reason.value}
|
|
285
270
|
|
|
286
271
|
|
|
287
272
|
CodeDeltaContext = AvailableCodeDeltaContext | UnavailableCodeDeltaContext
|
|
@@ -16,12 +16,9 @@ class ErrorCode(str, Enum):
|
|
|
16
16
|
NOT_FOUND = "not_found"
|
|
17
17
|
CONFLICT = "conflict"
|
|
18
18
|
INTERNAL_ERROR = "internal_error"
|
|
19
|
-
HOST_IDENTITY_UNAVAILABLE = "host_identity_unavailable"
|
|
20
19
|
HOST_IDENTITY_UNSUPPORTED = "host_identity_unsupported"
|
|
21
20
|
HOST_IDENTITY_DRIFTED = "host_identity_drifted"
|
|
22
21
|
HOST_HOOK_MISSING = "host_hook_missing"
|
|
23
|
-
TRANSCRIPT_SOURCE_NOT_FOUND = "transcript_source_not_found"
|
|
24
|
-
INNER_AGENT_ERROR = "inner_agent_error"
|
|
25
22
|
|
|
26
23
|
|
|
27
24
|
class ErrorDetail(BaseModel):
|
|
@@ -36,9 +36,6 @@ class BM25ScoredDocument:
|
|
|
36
36
|
def score_documents(
|
|
37
37
|
query_terms: Sequence[str],
|
|
38
38
|
documents: Sequence[BM25Document],
|
|
39
|
-
*,
|
|
40
|
-
k1: float = _K1,
|
|
41
|
-
b: float = _B,
|
|
42
39
|
) -> list[BM25ScoredDocument]:
|
|
43
40
|
"""Return BM25 scores and weighted query coverage for partially matching documents."""
|
|
44
41
|
|
|
@@ -81,12 +78,12 @@ def score_documents(
|
|
|
81
78
|
score = 0.0
|
|
82
79
|
matched_query_weight = 0.0
|
|
83
80
|
document_length = len(document.terms)
|
|
84
|
-
normalization =
|
|
81
|
+
normalization = _K1 * (1 - _B + _B * document_length / average_length)
|
|
85
82
|
for term in matched_terms:
|
|
86
83
|
inverse_document_frequency = inverse_document_frequencies[term]
|
|
87
84
|
term_frequency = frequencies[term]
|
|
88
85
|
score += inverse_document_frequency * (
|
|
89
|
-
(term_frequency * (
|
|
86
|
+
(term_frequency * (_K1 + 1)) / (term_frequency + normalization)
|
|
90
87
|
)
|
|
91
88
|
matched_query_weight += inverse_document_frequency
|
|
92
89
|
|
|
@@ -43,8 +43,6 @@ _STOPWORDS = frozenset(
|
|
|
43
43
|
class LexicalQuery:
|
|
44
44
|
"""Normalized lexical query terms used by the keyword retrieval lane."""
|
|
45
45
|
|
|
46
|
-
raw_terms: tuple[str, ...]
|
|
47
|
-
informative_terms: tuple[str, ...]
|
|
48
46
|
terms: tuple[str, ...]
|
|
49
47
|
uses_stopword_fallback: bool
|
|
50
48
|
|
|
@@ -68,14 +66,11 @@ def build_lexical_query(query_text: str) -> LexicalQuery:
|
|
|
68
66
|
"""Build a normalized lexical query with strict informative-term semantics."""
|
|
69
67
|
|
|
70
68
|
normalized = normalize_lexical_text(query_text)
|
|
71
|
-
raw_terms =
|
|
72
|
-
informative_terms =
|
|
69
|
+
raw_terms = tuple(dict.fromkeys(normalized.raw_terms))
|
|
70
|
+
informative_terms = tuple(dict.fromkeys(normalized.informative_terms))
|
|
73
71
|
uses_stopword_fallback = not informative_terms and bool(raw_terms)
|
|
74
|
-
terms = raw_terms if uses_stopword_fallback else informative_terms
|
|
75
72
|
return LexicalQuery(
|
|
76
|
-
|
|
77
|
-
informative_terms=informative_terms,
|
|
78
|
-
terms=terms,
|
|
73
|
+
terms=raw_terms if uses_stopword_fallback else informative_terms,
|
|
79
74
|
uses_stopword_fallback=uses_stopword_fallback,
|
|
80
75
|
)
|
|
81
76
|
|
|
@@ -88,16 +83,3 @@ def normalize_lexical_text(text: str) -> NormalizedLexicalText:
|
|
|
88
83
|
return NormalizedLexicalText(
|
|
89
84
|
raw_terms=raw_terms, informative_terms=informative_terms
|
|
90
85
|
)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def _unique_terms(terms: tuple[str, ...]) -> tuple[str, ...]:
|
|
94
|
-
"""Deduplicate terms while preserving original order."""
|
|
95
|
-
|
|
96
|
-
seen: set[str] = set()
|
|
97
|
-
ordered: list[str] = []
|
|
98
|
-
for term in terms:
|
|
99
|
-
if term in seen:
|
|
100
|
-
continue
|
|
101
|
-
seen.add(term)
|
|
102
|
-
ordered.append(term)
|
|
103
|
-
return tuple(ordered)
|
|
@@ -5,34 +5,23 @@ from __future__ import annotations
|
|
|
5
5
|
from collections import Counter
|
|
6
6
|
from typing import Any, Iterable, Mapping
|
|
7
7
|
|
|
8
|
+
from app.core.entities.memories import (
|
|
9
|
+
DEFAULT_RETRIEVABLE_MEMORY_STATUS_VALUES,
|
|
10
|
+
MemoryLifecycleStatus,
|
|
11
|
+
)
|
|
8
12
|
|
|
9
|
-
ACTIVE_STATUS = "active"
|
|
10
|
-
MAYBE_STALE_STATUS = "maybe_stale"
|
|
11
|
-
STALE_STATUS = "stale"
|
|
12
|
-
SUPERSEDED_STATUS = "superseded"
|
|
13
|
-
WRONG_STATUS = "wrong"
|
|
14
|
-
ARCHIVED_STATUS = "archived"
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
ACTIVE_STATUS = MemoryLifecycleStatus.ACTIVE.value
|
|
15
|
+
MAYBE_STALE_STATUS = MemoryLifecycleStatus.MAYBE_STALE.value
|
|
16
|
+
STALE_STATUS = MemoryLifecycleStatus.STALE.value
|
|
17
|
+
SUPERSEDED_STATUS = MemoryLifecycleStatus.SUPERSEDED.value
|
|
18
|
+
WRONG_STATUS = MemoryLifecycleStatus.WRONG.value
|
|
19
|
+
ARCHIVED_STATUS = MemoryLifecycleStatus.ARCHIVED.value
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
ACTIVE_STATUS: 1.0,
|
|
22
|
-
MAYBE_STALE_STATUS: 0.65,
|
|
23
|
-
STALE_STATUS: 0.25,
|
|
24
|
-
SUPERSEDED_STATUS: 0.0,
|
|
25
|
-
WRONG_STATUS: 0.0,
|
|
26
|
-
ARCHIVED_STATUS: 0.0,
|
|
27
|
-
}
|
|
21
|
+
POSITIVE_LIFECYCLE_STATUSES = frozenset(DEFAULT_RETRIEVABLE_MEMORY_STATUS_VALUES)
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
MAYBE_STALE_STATUS: 0.75,
|
|
32
|
-
STALE_STATUS: 0.45,
|
|
33
|
-
SUPERSEDED_STATUS: 0.0,
|
|
34
|
-
WRONG_STATUS: 0.0,
|
|
35
|
-
ARCHIVED_STATUS: 0.0,
|
|
23
|
+
LIFECYCLE_RETRIEVAL_MULTIPLIERS: Mapping[str, float] = {
|
|
24
|
+
status.value: status.retrieval_multiplier for status in MemoryLifecycleStatus
|
|
36
25
|
}
|
|
37
26
|
|
|
38
27
|
CONCEPT_MEMORY_HIGH_SIGNAL_ROLES = frozenset(
|
|
@@ -54,13 +43,6 @@ STRUCTURAL_FACT_UPDATE_RELATION_PREDICATES = (
|
|
|
54
43
|
|
|
55
44
|
REVERSIBLE_ASSOCIATION_RELATION_TYPES = frozenset({"associated_with"})
|
|
56
45
|
|
|
57
|
-
_STATUS_PRECEDENCE = (
|
|
58
|
-
WRONG_STATUS,
|
|
59
|
-
ARCHIVED_STATUS,
|
|
60
|
-
SUPERSEDED_STATUS,
|
|
61
|
-
STALE_STATUS,
|
|
62
|
-
MAYBE_STALE_STATUS,
|
|
63
|
-
)
|
|
64
46
|
_STRUCTURAL_EXPANSION_BY_PREDICATE = {
|
|
65
47
|
"solved_by": "problem_attempt",
|
|
66
48
|
"failed_with": "problem_attempt",
|
|
@@ -87,6 +69,8 @@ def lifecycle_retrieval_multiplier(status: Any) -> float:
|
|
|
87
69
|
"""Return the default positive retrieval multiplier for one lifecycle status."""
|
|
88
70
|
|
|
89
71
|
return LIFECYCLE_RETRIEVAL_MULTIPLIERS[normalize_lifecycle_status(status)]
|
|
72
|
+
|
|
73
|
+
|
|
90
74
|
def is_active_lifecycle(status: Any) -> bool:
|
|
91
75
|
"""Return whether a lifecycle status is active."""
|
|
92
76
|
|
|
@@ -111,37 +95,14 @@ def lifecycle_status_counts(statuses: Iterable[Any]) -> dict[str, int]:
|
|
|
111
95
|
}
|
|
112
96
|
|
|
113
97
|
|
|
114
|
-
def
|
|
115
|
-
"""Return
|
|
116
|
-
|
|
117
|
-
normalized = tuple(normalize_lifecycle_status(status) for status in statuses)
|
|
118
|
-
for status in _STATUS_PRECEDENCE:
|
|
119
|
-
if status in normalized:
|
|
120
|
-
return status
|
|
121
|
-
return ACTIVE_STATUS
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def concept_bundle_retrieval_multiplier(statuses: Iterable[Any]) -> float:
|
|
125
|
-
"""Return the freshness multiplier for an aggregate concept bundle."""
|
|
98
|
+
def bundle_lifecycle_statuses(bundle: Mapping[str, Any]) -> tuple[str, ...]:
|
|
99
|
+
"""Return lifecycle status values across every truth-bearing concept facet."""
|
|
126
100
|
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
) -> dict[str, str]:
|
|
133
|
-
"""Return currentness text for a group of truth-bearing records."""
|
|
134
|
-
|
|
135
|
-
status = dominant_lifecycle_status(statuses)
|
|
136
|
-
if status == ACTIVE_STATUS:
|
|
137
|
-
return {
|
|
138
|
-
"currentness": "current",
|
|
139
|
-
"temporal_reason": f"all included {record_label} are active",
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
"currentness": status,
|
|
143
|
-
"temporal_reason": f"one or more {record_label} are marked {status}",
|
|
144
|
-
}
|
|
101
|
+
return tuple(
|
|
102
|
+
record.lifecycle.status.value
|
|
103
|
+
for key in ("claims", "relations", "groundings", "memory_links")
|
|
104
|
+
for record in bundle[key]
|
|
105
|
+
)
|
|
145
106
|
|
|
146
107
|
|
|
147
108
|
def lifecycle_currentness_payload(
|
|
@@ -203,7 +164,9 @@ def structural_relation_expansion_type(predicate: Any) -> str:
|
|
|
203
164
|
try:
|
|
204
165
|
return _STRUCTURAL_EXPANSION_BY_PREDICATE[value]
|
|
205
166
|
except KeyError as exc:
|
|
206
|
-
raise ValueError(
|
|
167
|
+
raise ValueError(
|
|
168
|
+
f"unsupported structural memory relation predicate: {value}"
|
|
169
|
+
) from exc
|
|
207
170
|
|
|
208
171
|
|
|
209
172
|
def why_included_for_expansion(expansion_type: str) -> str:
|
|
@@ -12,7 +12,6 @@ from app.core.entities.concepts import (
|
|
|
12
12
|
ConceptLifecycleTargetType,
|
|
13
13
|
ConceptMemoryLink,
|
|
14
14
|
ConceptRelation,
|
|
15
|
-
GraphPatch,
|
|
16
15
|
)
|
|
17
16
|
|
|
18
17
|
|
|
@@ -84,10 +83,6 @@ class IConceptsRepo(ABC):
|
|
|
84
83
|
) -> ConceptLifecycleEvent:
|
|
85
84
|
"""This method appends one auditable concept lifecycle transition."""
|
|
86
85
|
|
|
87
|
-
@abstractmethod
|
|
88
|
-
def create_graph_patch(self, patch: GraphPatch) -> GraphPatch:
|
|
89
|
-
"""This method stores one future graph-patch proposal record."""
|
|
90
|
-
|
|
91
86
|
@abstractmethod
|
|
92
87
|
def get_concept_bundle(
|
|
93
88
|
self,
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
"""Repository ports for episode persistence."""
|
|
2
2
|
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
|
-
from datetime import datetime
|
|
5
4
|
from typing import Sequence
|
|
6
5
|
|
|
7
|
-
from app.core.entities.episodes import
|
|
8
|
-
Episode,
|
|
9
|
-
EpisodeBuildSnapshot,
|
|
10
|
-
EpisodeEvent,
|
|
11
|
-
SessionTransfer,
|
|
12
|
-
)
|
|
6
|
+
from app.core.entities.episodes import Episode, EpisodeBuildSnapshot, EpisodeEvent
|
|
13
7
|
|
|
14
8
|
|
|
15
9
|
class IEpisodesRepo(ABC):
|
|
@@ -55,10 +49,6 @@ class IEpisodesRepo(ABC):
|
|
|
55
49
|
) -> EpisodeEvent | None:
|
|
56
50
|
"""This method fetches one repo-visible event by id inside an episode."""
|
|
57
51
|
|
|
58
|
-
@abstractmethod
|
|
59
|
-
def list_event_keys(self, *, episode_id: str) -> Sequence[str]:
|
|
60
|
-
"""This method returns already-imported upstream event keys for one episode."""
|
|
61
|
-
|
|
62
52
|
@abstractmethod
|
|
63
53
|
def next_event_seq(self, *, episode_id: str) -> int:
|
|
64
54
|
"""This method returns the next append sequence number for one episode."""
|
|
@@ -71,14 +61,6 @@ class IEpisodesRepo(ABC):
|
|
|
71
61
|
def append_event_if_new(self, event: EpisodeEvent) -> bool:
|
|
72
62
|
"""This method appends an event only when its host_event_key is not already present."""
|
|
73
63
|
|
|
74
|
-
@abstractmethod
|
|
75
|
-
def close_episode(self, *, episode_id: str, ended_at: datetime) -> None:
|
|
76
|
-
"""This method marks an active episode closed."""
|
|
77
|
-
|
|
78
|
-
@abstractmethod
|
|
79
|
-
def append_transfer(self, transfer: SessionTransfer) -> None:
|
|
80
|
-
"""This method appends a cross-session transfer row."""
|
|
81
|
-
|
|
82
64
|
@abstractmethod
|
|
83
65
|
def list_existing_event_ids(self, *, event_ids: Sequence[str]) -> Sequence[str]:
|
|
84
66
|
"""This method returns episode-event ids that exist anywhere in storage."""
|
|
@@ -31,12 +31,10 @@ class InnerAgentRunRequest(_StrictModel):
|
|
|
31
31
|
model: str = Field(min_length=1)
|
|
32
32
|
reasoning: InnerAgentReasoningLevel
|
|
33
33
|
timeout_seconds: int = Field(ge=1, le=600)
|
|
34
|
-
max_private_reads: int = Field(default=0, ge=0, le=10)
|
|
35
34
|
max_brief_tokens: int | None = Field(default=None, ge=1, le=100_000)
|
|
36
35
|
query: str = Field(min_length=1)
|
|
37
36
|
repo_root: str | None = None
|
|
38
|
-
|
|
39
|
-
deterministic_pack: dict[str, Any] | None = None
|
|
37
|
+
deterministic_pack: dict[str, Any]
|
|
40
38
|
|
|
41
39
|
|
|
42
40
|
class InnerAgentRunResult(_StrictModel):
|
|
@@ -61,7 +59,6 @@ class InnerAgentRunResult(_StrictModel):
|
|
|
61
59
|
concept_expansion_count: int = Field(default=0, ge=0)
|
|
62
60
|
error_code: str | None = None
|
|
63
61
|
error_message: str | None = None
|
|
64
|
-
read_trace: dict[str, Any] = Field(default_factory=dict)
|
|
65
62
|
|
|
66
63
|
|
|
67
64
|
class BuildKnowledgeAgentRequest(_StrictModel):
|
{shellbrain-0.1.56 → shellbrain-0.1.58}/app/core/use_cases/admin/backfill_model_usage/__init__.py
RENAMED
|
@@ -5,13 +5,11 @@ from app.core.use_cases.admin.backfill_model_usage.backfill_model_usage import (
|
|
|
5
5
|
linked_session_from_mapping,
|
|
6
6
|
)
|
|
7
7
|
from app.core.use_cases.admin.backfill_model_usage.request import (
|
|
8
|
-
BackfillModelUsageRequest,
|
|
9
8
|
LinkedModelUsageSession,
|
|
10
9
|
)
|
|
11
10
|
from app.core.use_cases.admin.backfill_model_usage.result import BackfillSummary
|
|
12
11
|
|
|
13
12
|
__all__ = [
|
|
14
|
-
"BackfillModelUsageRequest",
|
|
15
13
|
"BackfillSummary",
|
|
16
14
|
"LinkedModelUsageSession",
|
|
17
15
|
"backfill_model_usage",
|