briefloop 0.11.12__py3-none-any.whl
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.
- briefloop-0.11.12.dist-info/METADATA +473 -0
- briefloop-0.11.12.dist-info/RECORD +424 -0
- briefloop-0.11.12.dist-info/WHEEL +5 -0
- briefloop-0.11.12.dist-info/entry_points.txt +3 -0
- briefloop-0.11.12.dist-info/licenses/LICENSE +22 -0
- briefloop-0.11.12.dist-info/top_level.txt +1 -0
- multi_agent_brief/__init__.py +36 -0
- multi_agent_brief/analysis_blocks/__init__.py +11 -0
- multi_agent_brief/analysis_blocks/builder.py +206 -0
- multi_agent_brief/analysis_blocks/renderer.py +237 -0
- multi_agent_brief/analysis_blocks/schemas.py +52 -0
- multi_agent_brief/analysis_modules/__init__.py +8 -0
- multi_agent_brief/analysis_modules/base.py +87 -0
- multi_agent_brief/analysis_modules/market_competitor/__init__.py +68 -0
- multi_agent_brief/analysis_modules/market_competitor/auditor.py +290 -0
- multi_agent_brief/analysis_modules/market_competitor/config.py +187 -0
- multi_agent_brief/analysis_modules/market_competitor/event_builder.py +226 -0
- multi_agent_brief/analysis_modules/market_competitor/renderer.py +199 -0
- multi_agent_brief/analysis_modules/market_competitor/schemas.py +518 -0
- multi_agent_brief/analysis_modules/policy_regulatory/__init__.py +7 -0
- multi_agent_brief/analysis_modules/policy_regulatory/audit.py +195 -0
- multi_agent_brief/analysis_modules/policy_regulatory/module.py +387 -0
- multi_agent_brief/analysis_modules/policy_regulatory/schemas.py +129 -0
- multi_agent_brief/analysis_modules/registry.py +73 -0
- multi_agent_brief/audience/__init__.py +19 -0
- multi_agent_brief/audience/profiles.py +246 -0
- multi_agent_brief/audience_memory/__init__.py +23 -0
- multi_agent_brief/audience_memory/profile.py +358 -0
- multi_agent_brief/audit/__init__.py +36 -0
- multi_agent_brief/audit/case_applicability.py +181 -0
- multi_agent_brief/audit/deterministic.py +471 -0
- multi_agent_brief/audit/editorial_governance.py +404 -0
- multi_agent_brief/audit/final_quality.py +764 -0
- multi_agent_brief/audit/harness.py +242 -0
- multi_agent_brief/audit/interfaces.py +96 -0
- multi_agent_brief/audit/limitation_hygiene.py +238 -0
- multi_agent_brief/audit/proposal_boundary.py +34 -0
- multi_agent_brief/audit/redaction.py +27 -0
- multi_agent_brief/audit/rule_packs.py +96 -0
- multi_agent_brief/audit/semantic.py +435 -0
- multi_agent_brief/capabilities/__init__.py +22 -0
- multi_agent_brief/capabilities/catalog.py +215 -0
- multi_agent_brief/capabilities/detect.py +199 -0
- multi_agent_brief/capabilities/models.py +60 -0
- multi_agent_brief/capabilities/recommend.py +206 -0
- multi_agent_brief/cli/__init__.py +2 -0
- multi_agent_brief/cli/analysis_commands.py +140 -0
- multi_agent_brief/cli/approval_commands.py +107 -0
- multi_agent_brief/cli/audit_commands.py +59 -0
- multi_agent_brief/cli/capability_commands.py +548 -0
- multi_agent_brief/cli/claude_commands.py +159 -0
- multi_agent_brief/cli/competitors_commands.py +182 -0
- multi_agent_brief/cli/controls_commands.py +137 -0
- multi_agent_brief/cli/deliver_commands.py +942 -0
- multi_agent_brief/cli/eval_cases_commands.py +99 -0
- multi_agent_brief/cli/experiments_commands.py +395 -0
- multi_agent_brief/cli/feedback_commands.py +192 -0
- multi_agent_brief/cli/finalize_commands.py +153 -0
- multi_agent_brief/cli/gates_commands.py +174 -0
- multi_agent_brief/cli/hermes_commands.py +356 -0
- multi_agent_brief/cli/improve_commands.py +224 -0
- multi_agent_brief/cli/init_commands.py +564 -0
- multi_agent_brief/cli/init_wizard.py +1473 -0
- multi_agent_brief/cli/input_commands.py +237 -0
- multi_agent_brief/cli/main.py +288 -0
- multi_agent_brief/cli/onboard_commands.py +193 -0
- multi_agent_brief/cli/product_commands.py +1449 -0
- multi_agent_brief/cli/provenance_commands.py +100 -0
- multi_agent_brief/cli/release_commands.py +68 -0
- multi_agent_brief/cli/repair_commands.py +169 -0
- multi_agent_brief/cli/run_commands.py +292 -0
- multi_agent_brief/cli/runtime_commands.py +81 -0
- multi_agent_brief/cli/secrets_commands.py +232 -0
- multi_agent_brief/cli/semantic_support_commands.py +80 -0
- multi_agent_brief/cli/sources_commands.py +647 -0
- multi_agent_brief/cli/start_commands.py +8 -0
- multi_agent_brief/cli/state_commands.py +446 -0
- multi_agent_brief/cli/status_commands.py +26 -0
- multi_agent_brief/cli/workbuddy_commands.py +103 -0
- multi_agent_brief/configs/artifact_contracts.yaml +514 -0
- multi_agent_brief/configs/orchestrator_contract.yaml +181 -0
- multi_agent_brief/configs/policy_packs/default.yaml +65 -0
- multi_agent_brief/configs/policy_profiles/evidence_extract_default.yaml +58 -0
- multi_agent_brief/configs/policy_profiles/finance_default.yaml +44 -0
- multi_agent_brief/configs/policy_profiles/internet_default.yaml +44 -0
- multi_agent_brief/configs/policy_profiles/manufacturing_default.yaml +33 -0
- multi_agent_brief/configs/policy_profiles/solar_manufacturing_default.yaml +64 -0
- multi_agent_brief/configs/report_packs/evidence_extract.yaml +48 -0
- multi_agent_brief/configs/report_packs/management_monthly.yaml +36 -0
- multi_agent_brief/configs/report_packs/market_weekly.yaml +36 -0
- multi_agent_brief/configs/report_packs/solar_industry_periodic.yaml +50 -0
- multi_agent_brief/configs/report_templates/evidence_extract.yaml +55 -0
- multi_agent_brief/configs/report_templates/management_monthly.yaml +48 -0
- multi_agent_brief/configs/report_templates/market_weekly.yaml +49 -0
- multi_agent_brief/configs/report_templates/solar_industry_periodic.yaml +75 -0
- multi_agent_brief/configs/stage_specs.yaml +180 -0
- multi_agent_brief/contracts/__init__.py +41 -0
- multi_agent_brief/contracts/base.py +99 -0
- multi_agent_brief/contracts/errors.py +41 -0
- multi_agent_brief/contracts/migrations/__init__.py +5 -0
- multi_agent_brief/contracts/migrations/claim_v1_to_v2.py +33 -0
- multi_agent_brief/contracts/registry.py +159 -0
- multi_agent_brief/contracts/role_topology.py +25 -0
- multi_agent_brief/contracts/schemas/__init__.py +35 -0
- multi_agent_brief/contracts/schemas/analysis_pack.py +135 -0
- multi_agent_brief/contracts/schemas/atomic_claim_graph.py +304 -0
- multi_agent_brief/contracts/schemas/audit_report.py +80 -0
- multi_agent_brief/contracts/schemas/candidate_item.py +51 -0
- multi_agent_brief/contracts/schemas/claim.py +197 -0
- multi_agent_brief/contracts/schemas/claim_draft.py +386 -0
- multi_agent_brief/contracts/schemas/claim_support_matrix.py +334 -0
- multi_agent_brief/contracts/schemas/evidence_span_registry.py +270 -0
- multi_agent_brief/contracts/schemas/policy_profile.py +247 -0
- multi_agent_brief/contracts/schemas/report_spec.py +257 -0
- multi_agent_brief/contracts/schemas/semantic_assessment_report.py +480 -0
- multi_agent_brief/contracts/schemas/source_evidence_pack_manifest.py +233 -0
- multi_agent_brief/contracts/schemas/source_item.py +96 -0
- multi_agent_brief/contracts/semantic_assessment_status.py +12 -0
- multi_agent_brief/contracts/source_metadata.py +252 -0
- multi_agent_brief/contracts/target_contract.py +460 -0
- multi_agent_brief/contracts/validator.py +225 -0
- multi_agent_brief/controls/__init__.py +23 -0
- multi_agent_brief/controls/contract.py +106 -0
- multi_agent_brief/controls/switchboard.py +1076 -0
- multi_agent_brief/core/__init__.py +2 -0
- multi_agent_brief/core/citations.py +14 -0
- multi_agent_brief/core/claim_ledger.py +94 -0
- multi_agent_brief/core/config.py +191 -0
- multi_agent_brief/core/env.py +69 -0
- multi_agent_brief/core/previous.py +83 -0
- multi_agent_brief/core/schemas.py +181 -0
- multi_agent_brief/core/selection.py +189 -0
- multi_agent_brief/delivery/__init__.py +6 -0
- multi_agent_brief/delivery/base.py +36 -0
- multi_agent_brief/delivery/feishu.py +204 -0
- multi_agent_brief/delivery/gws.py +237 -0
- multi_agent_brief/evaluation_cases/__init__.py +15 -0
- multi_agent_brief/evaluation_cases/contract.py +429 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/approved_guidance_materialized/workspace/config.yaml +18 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/approved_guidance_materialized/workspace/improvement/ledger.jsonl +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/approved_guidance_materialized/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/approved_guidance_materialized/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/company_event_missing_latest_official_check/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/company_event_missing_latest_official_check/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/company_event_missing_latest_official_check/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/control_switchboard_selection_is_not_execution/workspace/config.yaml +12 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/control_switchboard_selection_is_not_execution/workspace/sources.yaml +6 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/control_switchboard_selection_is_not_execution/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/feedback_triage_required/workspace/config.yaml +6 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/feedback_triage_required/workspace/input/human_feedback.md +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/feedback_triage_required/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/feedback_triage_required/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/config.yaml +8 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/output/brief.md +14 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/output/intermediate/audit_report.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/output/intermediate/audited_brief.md +5 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/output/intermediate/candidate_claims.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/output/intermediate/claim_ledger.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/output/intermediate/screened_candidates.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/final_abstract_quality_warning_surface/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/formal_release_missing_human_approval/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/formal_release_missing_human_approval/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/formal_release_missing_human_approval/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/guidance_manifestation_not_observable/workspace/config.yaml +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/guidance_manifestation_not_observable/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/guidance_manifestation_not_observable/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/media_only_legal_policy_blocks_research_review/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/media_only_legal_policy_blocks_research_review/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/media_only_legal_policy_blocks_research_review/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/mixed_metric_scope_support_blocker/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/mixed_metric_scope_support_blocker/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/mixed_metric_scope_support_blocker/workspace/user.md +5 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/config.yaml +6 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/output/intermediate/audited_brief.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/output/intermediate/candidate_claims.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/output/intermediate/claim_ledger.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/output/intermediate/feedback_issues.json +25 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/output/intermediate/repair_plan.json +27 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/output/intermediate/screened_candidates.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/planned_blocking_issue_cannot_continue/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/config.yaml +8 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/output/intermediate/audit_report.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/output/intermediate/audited_brief.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/output/intermediate/candidate_claims.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/output/intermediate/claim_ledger.json +11 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/output/intermediate/quality_gate_report.json +22 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/output/intermediate/screened_candidates.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/provenance_projection_minimal/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/output/intermediate/audit_report.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/output/intermediate/audited_brief.md +5 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/output/intermediate/candidate_claims.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/output/intermediate/claim_ledger.json +40 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/output/intermediate/screened_candidates.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/sources.yaml +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_source_appendix/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/config.yaml +8 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/output/brief.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/output/intermediate/audit_report.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/output/intermediate/audited_brief.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/output/intermediate/candidate_claims.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/output/intermediate/claim_ledger.json +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/output/intermediate/screened_candidates.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reader_facing_target_relevance/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/release_readiness_forged_event_blocker/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/release_readiness_forged_event_blocker/workspace/output/intermediate/release_readiness_report.json +31 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/release_readiness_forged_event_blocker/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/release_readiness_forged_event_blocker/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reverted_entry_removed_from_next_snapshot/workspace/config.yaml +18 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reverted_entry_removed_from_next_snapshot/workspace/improvement/ledger.jsonl +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reverted_entry_removed_from_next_snapshot/workspace/improvement/memory.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reverted_entry_removed_from_next_snapshot/workspace/output/intermediate/improvement_memory_snapshot.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reverted_entry_removed_from_next_snapshot/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/reverted_entry_removed_from_next_snapshot/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/config.yaml +12 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/input/sources/source-001.txt +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/brief.md +37 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/delivery/brief.md +37 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/atomic_claim_graph.json +17 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/audit_report.json +5 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/audited_brief.md +37 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/claim_ledger.json +20 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/evidence_span_registry.json +20 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/finalize_report.json +40 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/gates/auditor_quality_gate_report.json +42 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/gates/finalize_quality_gate_report.json +42 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/intermediate/screened_candidates.json +33 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/source_appendix.md +12 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/output/source_appendix_trace.md +10 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/report_spec.yaml +24 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/sources.yaml +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/same_evidence_reader_quality_regression/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/source_evidence_pack_blocks_non_evidence_file/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/source_evidence_pack_blocks_non_evidence_file/workspace/input/sources/README.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/source_evidence_pack_blocks_non_evidence_file/workspace/output/intermediate/source_evidence_pack_manifest.json +26 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/source_evidence_pack_blocks_non_evidence_file/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/source_evidence_pack_blocks_non_evidence_file/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/config.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/output/intermediate/audit_report.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/output/intermediate/audited_brief.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/output/intermediate/candidate_claims.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/output/intermediate/claim_ledger.json +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/output/intermediate/screened_candidates.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/stale_current_claim/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/third_party_price_snapshot_formal_block/workspace/config.yaml +13 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/third_party_price_snapshot_formal_block/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/third_party_price_snapshot_formal_block/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/trajectory_retry_budget_exhausted/workspace/config.yaml +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/trajectory_retry_budget_exhausted/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/trajectory_retry_budget_exhausted/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unapproved_entry_not_materialized/workspace/config.yaml +18 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unapproved_entry_not_materialized/workspace/improvement/ledger.jsonl +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unapproved_entry_not_materialized/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unapproved_entry_not_materialized/workspace/user.md +4 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unauthorized_institution_branding_blocks_release/workspace/config.yaml +18 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unauthorized_institution_branding_blocks_release/workspace/sources.yaml +9 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unauthorized_institution_branding_blocks_release/workspace/user.md +5 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/config.yaml +8 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/output/intermediate/audit_report.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/output/intermediate/audited_brief.md +8 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/output/intermediate/candidate_claims.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/output/intermediate/claim_ledger.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/output/intermediate/screened_candidates.json +1 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/sources.yaml +2 -0
- multi_agent_brief/evaluation_cases/fixtures/cases/unsupported_material_fact/workspace/user.md +3 -0
- multi_agent_brief/evaluation_cases/fixtures/manifest.yaml +861 -0
- multi_agent_brief/evaluation_cases/fixtures.py +20 -0
- multi_agent_brief/evaluation_cases/runner.py +1603 -0
- multi_agent_brief/experiments/__init__.py +45 -0
- multi_agent_brief/experiments/experiment_080.py +5835 -0
- multi_agent_brief/experiments/schemas.py +63 -0
- multi_agent_brief/experiments/target_contract.py +10 -0
- multi_agent_brief/feedback/__init__.py +17 -0
- multi_agent_brief/feedback/feedback_contract.py +482 -0
- multi_agent_brief/feedback/feedback_state.py +898 -0
- multi_agent_brief/hermes/__init__.py +25 -0
- multi_agent_brief/hermes/adapter.py +832 -0
- multi_agent_brief/improvement/__init__.py +83 -0
- multi_agent_brief/improvement/contract.py +1114 -0
- multi_agent_brief/improvement/memory.py +451 -0
- multi_agent_brief/improvement/product_definition.py +228 -0
- multi_agent_brief/improvement/state.py +961 -0
- multi_agent_brief/inputs/__init__.py +2 -0
- multi_agent_brief/inputs/classifier.py +322 -0
- multi_agent_brief/inputs/contracts.py +59 -0
- multi_agent_brief/inputs/extractor.py +310 -0
- multi_agent_brief/install/__init__.py +2 -0
- multi_agent_brief/install/writer.py +97 -0
- multi_agent_brief/onboarding/__init__.py +11 -0
- multi_agent_brief/onboarding/io.py +103 -0
- multi_agent_brief/onboarding/mapper.py +484 -0
- multi_agent_brief/onboarding/schema.py +46 -0
- multi_agent_brief/orchestrator/__init__.py +2 -0
- multi_agent_brief/orchestrator/fact_layer_import.py +352 -0
- multi_agent_brief/orchestrator/handoff.py +2209 -0
- multi_agent_brief/orchestrator/role_topology.py +42 -0
- multi_agent_brief/orchestrator/run_archive.py +888 -0
- multi_agent_brief/orchestrator/run_integrity.py +346 -0
- multi_agent_brief/orchestrator/runtime_state/__init__.py +70 -0
- multi_agent_brief/orchestrator/runtime_state/_io.py +167 -0
- multi_agent_brief/orchestrator/runtime_state/_transactions.py +298 -0
- multi_agent_brief/orchestrator/runtime_state/artifact_registry.py +1825 -0
- multi_agent_brief/orchestrator/runtime_state/atomic_claim_graph.py +96 -0
- multi_agent_brief/orchestrator/runtime_state/claim_ledger_freeze.py +510 -0
- multi_agent_brief/orchestrator/runtime_state/claim_metadata_enrichment.py +836 -0
- multi_agent_brief/orchestrator/runtime_state/claim_support_matrix.py +582 -0
- multi_agent_brief/orchestrator/runtime_state/completion_gates.py +672 -0
- multi_agent_brief/orchestrator/runtime_state/contracts_loader.py +66 -0
- multi_agent_brief/orchestrator/runtime_state/decisions.py +239 -0
- multi_agent_brief/orchestrator/runtime_state/errors.py +61 -0
- multi_agent_brief/orchestrator/runtime_state/event_log.py +256 -0
- multi_agent_brief/orchestrator/runtime_state/evidence_span_registry.py +233 -0
- multi_agent_brief/orchestrator/runtime_state/fact_layer.py +755 -0
- multi_agent_brief/orchestrator/runtime_state/identity.py +90 -0
- multi_agent_brief/orchestrator/runtime_state/lifecycle.py +675 -0
- multi_agent_brief/orchestrator/runtime_state/manifest.py +82 -0
- multi_agent_brief/orchestrator/runtime_state/operations.py +224 -0
- multi_agent_brief/orchestrator/runtime_state/paths.py +38 -0
- multi_agent_brief/orchestrator/runtime_state/repair.py +984 -0
- multi_agent_brief/orchestrator/runtime_state/safety_surfaces.py +147 -0
- multi_agent_brief/orchestrator/runtime_state/semantic_assessment_report.py +692 -0
- multi_agent_brief/orchestrator/runtime_state/semantic_support_acceptance.py +683 -0
- multi_agent_brief/orchestrator/runtime_state/source_evidence_pack.py +131 -0
- multi_agent_brief/orchestrator/runtime_state/stage_completion.py +1320 -0
- multi_agent_brief/orchestrator/runtime_state/trajectory.py +200 -0
- multi_agent_brief/orchestrator/runtime_state/workflow.py +350 -0
- multi_agent_brief/orchestrator/source_evidence.py +43 -0
- multi_agent_brief/orchestrator/timing.py +410 -0
- multi_agent_brief/orchestrator_contract.py +96 -0
- multi_agent_brief/outputs/__init__.py +2 -0
- multi_agent_brief/outputs/atomic_reader_projection.py +288 -0
- multi_agent_brief/outputs/docx.py +32 -0
- multi_agent_brief/outputs/finalize.py +1036 -0
- multi_agent_brief/outputs/ib_docx.py +983 -0
- multi_agent_brief/outputs/naming.py +38 -0
- multi_agent_brief/outputs/pdf.py +20 -0
- multi_agent_brief/outputs/reader_final_gate.py +509 -0
- multi_agent_brief/outputs/reader_projection.py +397 -0
- multi_agent_brief/outputs/source_appendix.py +753 -0
- multi_agent_brief/outputs/templates/__init__.py +112 -0
- multi_agent_brief/product/__init__.py +49 -0
- multi_agent_brief/product/bundle_projection.py +686 -0
- multi_agent_brief/product/citation_profile.py +145 -0
- multi_agent_brief/product/guidance_manifestation.py +421 -0
- multi_agent_brief/product/materiality_selection.py +472 -0
- multi_agent_brief/product/policy_gate_adapter.py +116 -0
- multi_agent_brief/product/policy_profile.py +39 -0
- multi_agent_brief/product/policy_projection.py +161 -0
- multi_agent_brief/product/policy_registry.py +83 -0
- multi_agent_brief/product/policy_resolver.py +225 -0
- multi_agent_brief/product/quality_closeout.py +188 -0
- multi_agent_brief/product/quality_panel.py +2217 -0
- multi_agent_brief/product/release_approval.py +1034 -0
- multi_agent_brief/product/report_pack.py +130 -0
- multi_agent_brief/product/report_pack_aliases.py +68 -0
- multi_agent_brief/product/report_registry.py +101 -0
- multi_agent_brief/product/report_spec.py +181 -0
- multi_agent_brief/product/support_wording.py +525 -0
- multi_agent_brief/product/template_conformance.py +516 -0
- multi_agent_brief/product/template_projection.py +123 -0
- multi_agent_brief/product/template_registry.py +244 -0
- multi_agent_brief/product/template_render_plan.py +315 -0
- multi_agent_brief/product/template_renderer.py +224 -0
- multi_agent_brief/product/trajectory_regulation.py +441 -0
- multi_agent_brief/provenance/__init__.py +5 -0
- multi_agent_brief/provenance/builder.py +841 -0
- multi_agent_brief/provenance/contract.py +21 -0
- multi_agent_brief/provenance/io.py +144 -0
- multi_agent_brief/provenance/model.py +110 -0
- multi_agent_brief/provenance/references.py +43 -0
- multi_agent_brief/provenance/validator.py +135 -0
- multi_agent_brief/quality_gates/__init__.py +19 -0
- multi_agent_brief/quality_gates/contract.py +581 -0
- multi_agent_brief/quality_gates/state.py +2498 -0
- multi_agent_brief/repair/__init__.py +5 -0
- multi_agent_brief/repair/router.py +842 -0
- multi_agent_brief/runtime_assets.py +431 -0
- multi_agent_brief/sources/__init__.py +16 -0
- multi_agent_brief/sources/api_filings.py +236 -0
- multi_agent_brief/sources/api_news.py +174 -0
- multi_agent_brief/sources/base.py +142 -0
- multi_agent_brief/sources/cached_package.py +119 -0
- multi_agent_brief/sources/cli_provider.py +263 -0
- multi_agent_brief/sources/coverage.py +336 -0
- multi_agent_brief/sources/decider.py +756 -0
- multi_agent_brief/sources/doctor.py +373 -0
- multi_agent_brief/sources/evidence_pack.py +364 -0
- multi_agent_brief/sources/feishu_provider.py +326 -0
- multi_agent_brief/sources/filing_resolver.py +400 -0
- multi_agent_brief/sources/industry_packs.py +130 -0
- multi_agent_brief/sources/join.py +206 -0
- multi_agent_brief/sources/local_signal.py +81 -0
- multi_agent_brief/sources/local_signal_planner.py +636 -0
- multi_agent_brief/sources/manual.py +259 -0
- multi_agent_brief/sources/mcp_provider.py +309 -0
- multi_agent_brief/sources/mineru_provider.py +601 -0
- multi_agent_brief/sources/normalizer.py +95 -0
- multi_agent_brief/sources/opencli_provider.py +282 -0
- multi_agent_brief/sources/planner.py +178 -0
- multi_agent_brief/sources/registry.py +367 -0
- multi_agent_brief/sources/rss.py +190 -0
- multi_agent_brief/sources/search_backends/__init__.py +31 -0
- multi_agent_brief/sources/search_backends/base.py +51 -0
- multi_agent_brief/sources/search_backends/brave.py +192 -0
- multi_agent_brief/sources/search_backends/capabilities.py +94 -0
- multi_agent_brief/sources/search_backends/exa.py +180 -0
- multi_agent_brief/sources/search_backends/firecrawl.py +164 -0
- multi_agent_brief/sources/search_backends/serper.py +241 -0
- multi_agent_brief/sources/search_backends/tavily.py +124 -0
- multi_agent_brief/sources/sourcehub.py +505 -0
- multi_agent_brief/sources/web_search.py +267 -0
- multi_agent_brief/status.py +966 -0
- multi_agent_brief/tools/__init__.py +3 -0
- multi_agent_brief/tools/draft_cleanup.py +198 -0
- multi_agent_brief/workbuddy/__init__.py +1 -0
- multi_agent_brief/workbuddy/diagnose.py +569 -0
- multi_agent_brief/workbuddy/skill_pack.py +309 -0
- multi_agent_brief/workspace/__init__.py +1 -0
- multi_agent_brief/workspace/init_profile.py +45 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Runtime manifest helpers for Orchestrator runtime state."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from multi_agent_brief.orchestrator_contract import CONTRACT_REFERENCES
|
|
8
|
+
from multi_agent_brief.orchestrator.runtime_state.contracts_loader import _stage_ids
|
|
9
|
+
from multi_agent_brief.orchestrator.runtime_state.errors import (
|
|
10
|
+
E_MANIFEST_EXTENSION_LOST,
|
|
11
|
+
RuntimeStateError,
|
|
12
|
+
)
|
|
13
|
+
from multi_agent_brief.orchestrator.runtime_state.identity import _source_or_package_version
|
|
14
|
+
from multi_agent_brief.orchestrator.runtime_state.paths import RUNTIME_STATE_FILES
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
RUNTIME_MANIFEST_SCHEMA = "multi-agent-brief-runtime-manifest/v1"
|
|
18
|
+
PRESERVED_RUNTIME_MANIFEST_EXTENSION_KEYS = (
|
|
19
|
+
"improvement",
|
|
20
|
+
"recipe",
|
|
21
|
+
"fact_layer_import",
|
|
22
|
+
"claim_ledger_freeze",
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _runtime_manifest(
|
|
27
|
+
*,
|
|
28
|
+
run_id: str,
|
|
29
|
+
created_at: str,
|
|
30
|
+
updated_at: str,
|
|
31
|
+
runtime: str,
|
|
32
|
+
stages: list[dict[str, Any]],
|
|
33
|
+
artifacts: list[dict[str, Any]],
|
|
34
|
+
) -> dict[str, Any]:
|
|
35
|
+
return {
|
|
36
|
+
"schema_version": RUNTIME_MANIFEST_SCHEMA,
|
|
37
|
+
"run_id": run_id,
|
|
38
|
+
"created_at": created_at,
|
|
39
|
+
"updated_at": updated_at,
|
|
40
|
+
"workspace": ".",
|
|
41
|
+
"runtime": runtime,
|
|
42
|
+
"mabw_version": _source_or_package_version(),
|
|
43
|
+
"contract_references": dict(CONTRACT_REFERENCES),
|
|
44
|
+
"runtime_state_files": dict(RUNTIME_STATE_FILES),
|
|
45
|
+
"stage_order": _stage_ids(stages),
|
|
46
|
+
"expected_artifacts": [
|
|
47
|
+
{
|
|
48
|
+
"artifact_id": artifact.get("artifact_id", ""),
|
|
49
|
+
"path": artifact.get("path", ""),
|
|
50
|
+
"required": bool(artifact.get("required", False)),
|
|
51
|
+
"producer_stage": artifact.get("producer_stage", ""),
|
|
52
|
+
"consumer_stages": artifact.get("consumer_stages", []),
|
|
53
|
+
}
|
|
54
|
+
for artifact in artifacts
|
|
55
|
+
],
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _preserved_manifest_extensions(manifest: dict[str, Any]) -> dict[str, Any]:
|
|
60
|
+
return {
|
|
61
|
+
key: manifest[key]
|
|
62
|
+
for key in PRESERVED_RUNTIME_MANIFEST_EXTENSION_KEYS
|
|
63
|
+
if key in manifest
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _assert_manifest_extensions_preserved(
|
|
68
|
+
*,
|
|
69
|
+
before: dict[str, Any],
|
|
70
|
+
after: dict[str, Any],
|
|
71
|
+
) -> None:
|
|
72
|
+
missing = [
|
|
73
|
+
key
|
|
74
|
+
for key, value in before.items()
|
|
75
|
+
if key not in after or after.get(key) != value
|
|
76
|
+
]
|
|
77
|
+
if missing:
|
|
78
|
+
raise RuntimeStateError(
|
|
79
|
+
"Registered runtime_manifest extension keys were lost.",
|
|
80
|
+
details={"missing_extensions": missing},
|
|
81
|
+
error_code=E_MANIFEST_EXTENSION_LOST,
|
|
82
|
+
)
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"""Compatibility facade for runtime-state operations.
|
|
2
|
+
|
|
3
|
+
The implementation moved to transaction-scoped modules in this package:
|
|
4
|
+
_transactions, trajectory, fact_layer, lifecycle, claim_ledger_freeze,
|
|
5
|
+
claim_metadata_enrichment, repair, stage_completion, and decisions.
|
|
6
|
+
This module re-exports the previous public surface for older imports and
|
|
7
|
+
for tests that reach constants, errors, and seams via
|
|
8
|
+
runtime_state.operations.<name>.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from multi_agent_brief.orchestrator.run_archive import ( # noqa: F401
|
|
14
|
+
E_RUN_ARCHIVE_CONFLICT,
|
|
15
|
+
RunArchiveError,
|
|
16
|
+
)
|
|
17
|
+
from multi_agent_brief.orchestrator.runtime_state._io import ( # noqa: F401
|
|
18
|
+
_write_json_atomic,
|
|
19
|
+
)
|
|
20
|
+
from multi_agent_brief.orchestrator.runtime_state.artifact_registry import ( # noqa: F401
|
|
21
|
+
_build_artifact_registry,
|
|
22
|
+
)
|
|
23
|
+
from multi_agent_brief.orchestrator.runtime_state.claim_ledger_freeze import ( # noqa: F401
|
|
24
|
+
CLAIM_DRAFTS_PATH,
|
|
25
|
+
CLAIM_DRAFT_PROVENANCE_METADATA_FIELDS,
|
|
26
|
+
CLAIM_LEDGER_FREEZE_ID_STRATEGY,
|
|
27
|
+
CLAIM_LEDGER_FREEZE_SCHEMA,
|
|
28
|
+
CLAIM_LEDGER_PATH,
|
|
29
|
+
_canonical_claims_from_drafts,
|
|
30
|
+
_claim_draft_sort_key,
|
|
31
|
+
_claim_draft_source_type,
|
|
32
|
+
_claim_draft_warnings,
|
|
33
|
+
_claim_ledger_bytes,
|
|
34
|
+
_claim_ledger_freeze_manifest,
|
|
35
|
+
_claim_ledger_freeze_reasons,
|
|
36
|
+
_normalize_claim_text,
|
|
37
|
+
_read_claim_drafts_for_freeze,
|
|
38
|
+
freeze_claim_ledger_transaction,
|
|
39
|
+
)
|
|
40
|
+
from multi_agent_brief.orchestrator.runtime_state.claim_metadata_enrichment import ( # noqa: F401
|
|
41
|
+
CLAIM_LEDGER_METADATA_ENRICHMENT_SCHEMA,
|
|
42
|
+
CLAIM_METADATA_ENRICHMENT_ALLOWED_FIELDS,
|
|
43
|
+
CLAIM_METADATA_ENRICHMENT_FORBIDDEN_FIELDS,
|
|
44
|
+
CLAIM_METADATA_REPLACEABLE_DEFAULTS,
|
|
45
|
+
_claim_ledger_enrichment_authority,
|
|
46
|
+
_claims_with_enriched_metadata,
|
|
47
|
+
_imported_claim_ledger_record,
|
|
48
|
+
_imported_source_evidence_authority,
|
|
49
|
+
_normalize_source_evidence_taxonomy,
|
|
50
|
+
_source_evidence_ids,
|
|
51
|
+
_source_evidence_metadata_from_file,
|
|
52
|
+
_source_evidence_metadata_from_markdown,
|
|
53
|
+
_sync_enriched_claim_source_fields,
|
|
54
|
+
_valid_imported_claim_ledger_derivation,
|
|
55
|
+
_workflow_allows_claim_metadata_enrichment,
|
|
56
|
+
_workflow_with_enriched_claim_ledger_hash,
|
|
57
|
+
enrich_claim_metadata_transaction,
|
|
58
|
+
)
|
|
59
|
+
from multi_agent_brief.orchestrator.runtime_state.decisions import record_decision # noqa: F401
|
|
60
|
+
from multi_agent_brief.orchestrator.runtime_state.errors import ( # noqa: F401
|
|
61
|
+
E_ACTIVE_REPAIR_OPEN,
|
|
62
|
+
E_ARTIFACT_INVALID,
|
|
63
|
+
E_ASSESSMENT_TARGET_COMPLETE,
|
|
64
|
+
E_CLAIM_DRAFT_CONTRACT_INVALID,
|
|
65
|
+
E_COMPLETION_TRANSACTION_REQUIRED,
|
|
66
|
+
E_FACT_LAYER_IMPORT_INVALID,
|
|
67
|
+
E_ILLEGAL_TRANSITION,
|
|
68
|
+
E_QUALITY_GATE_REQUIRED,
|
|
69
|
+
E_READER_FINAL_GATE_FAILED,
|
|
70
|
+
E_REPAIR_IMPORTED_FACT_LAYER_FORBIDDEN,
|
|
71
|
+
E_REPAIR_NO_LEGAL_ROUTE,
|
|
72
|
+
E_REPAIR_TRANSACTION_REQUIRED,
|
|
73
|
+
E_REQUIRED_ARTIFACT_MISSING,
|
|
74
|
+
E_RUNTIME_STATE_NOT_INITIALIZED,
|
|
75
|
+
E_STAGE_ALREADY_COMPLETED,
|
|
76
|
+
E_STAGE_MISMATCH,
|
|
77
|
+
E_TRANSACTION_INTEGRITY,
|
|
78
|
+
E_TRANSACTION_PARTIAL_WRITE,
|
|
79
|
+
RuntimeStateError,
|
|
80
|
+
_wrap_archive_error,
|
|
81
|
+
)
|
|
82
|
+
from multi_agent_brief.orchestrator.runtime_state.event_log import ( # noqa: F401
|
|
83
|
+
EVENT_LOG_SCHEMA,
|
|
84
|
+
append_event,
|
|
85
|
+
read_event_log_records_strict,
|
|
86
|
+
record_handoff_written,
|
|
87
|
+
)
|
|
88
|
+
from multi_agent_brief.orchestrator.runtime_state.fact_layer import ( # noqa: F401
|
|
89
|
+
FACT_LAYER_IMPORT_FORBIDDEN_ARTIFACT_IDS,
|
|
90
|
+
FACT_LAYER_IMPORT_REQUIRED_ARTIFACT_IDS,
|
|
91
|
+
FACT_LAYER_IMPORT_SCHEMA,
|
|
92
|
+
FACT_LAYER_IMPORT_SINGLETON_PATHS,
|
|
93
|
+
FACT_LAYER_IMPORT_SOURCE_PACK_ARTIFACT_ID,
|
|
94
|
+
_archive_fact_layer_path_for,
|
|
95
|
+
_copy_import_files,
|
|
96
|
+
_imported_required_artifact_reasons,
|
|
97
|
+
_path_text_is_unsafe,
|
|
98
|
+
_read_fact_layer_import_plan,
|
|
99
|
+
_reject_duplicate_fact_layer_import_targets,
|
|
100
|
+
_reject_existing_fact_layer_import_leftovers,
|
|
101
|
+
_reject_existing_fact_layer_import_targets,
|
|
102
|
+
_reject_source_plan_fact_layer_record,
|
|
103
|
+
_require_fact_layer_file_record,
|
|
104
|
+
_resolve_fact_layer_archive_manifest,
|
|
105
|
+
_source_archive_path,
|
|
106
|
+
_target_workspace_path,
|
|
107
|
+
_validate_fact_layer_import_record_scope,
|
|
108
|
+
import_fact_layer_transaction,
|
|
109
|
+
)
|
|
110
|
+
from multi_agent_brief.orchestrator.runtime_state.identity import ( # noqa: F401
|
|
111
|
+
new_run_id,
|
|
112
|
+
utc_now,
|
|
113
|
+
)
|
|
114
|
+
from multi_agent_brief.orchestrator.runtime_state.contracts_loader import ( # noqa: F401
|
|
115
|
+
load_artifact_contracts,
|
|
116
|
+
load_stage_specs,
|
|
117
|
+
)
|
|
118
|
+
from multi_agent_brief.orchestrator.runtime_state.lifecycle import ( # noqa: F401
|
|
119
|
+
_archive_reset_run_scoped_control_artifact,
|
|
120
|
+
_recompute_stage_state,
|
|
121
|
+
_remove_reset_archive_copy,
|
|
122
|
+
_reset_run_scoped_control_artifact_paths,
|
|
123
|
+
_restore_reset_control_artifacts,
|
|
124
|
+
check_runtime_state,
|
|
125
|
+
initialize_runtime_state,
|
|
126
|
+
show_runtime_state,
|
|
127
|
+
)
|
|
128
|
+
from multi_agent_brief.orchestrator.runtime_state.manifest import RUNTIME_MANIFEST_SCHEMA # noqa: F401
|
|
129
|
+
from multi_agent_brief.orchestrator.runtime_state.paths import ( # noqa: F401
|
|
130
|
+
RUNTIME_STATE_FILES,
|
|
131
|
+
runtime_state_paths,
|
|
132
|
+
)
|
|
133
|
+
from multi_agent_brief.orchestrator.runtime_state.repair import ( # noqa: F401
|
|
134
|
+
_active_repair_blocking_error,
|
|
135
|
+
_artifact_allowed,
|
|
136
|
+
_artifact_path_matches,
|
|
137
|
+
_delegate_repair_transaction_required_error,
|
|
138
|
+
_repair_artifact_baseline,
|
|
139
|
+
_repair_changed_artifact_reasons,
|
|
140
|
+
_repair_event_metadata,
|
|
141
|
+
_repair_route_error,
|
|
142
|
+
_source_stage_for_repair_route,
|
|
143
|
+
_stale_artifact_baselines_for_stage,
|
|
144
|
+
_workflow_after_repair_completion,
|
|
145
|
+
_workflow_with_active_repair,
|
|
146
|
+
_workflow_with_repair_run_integrity_effect,
|
|
147
|
+
complete_repair_transaction,
|
|
148
|
+
raise_if_active_repair_open,
|
|
149
|
+
start_repair_transaction,
|
|
150
|
+
)
|
|
151
|
+
from multi_agent_brief.orchestrator.runtime_state.stage_completion import ( # noqa: F401
|
|
152
|
+
ANALYST_DRAFT_SNAPSHOT_PATH,
|
|
153
|
+
_append_transaction_events,
|
|
154
|
+
_auditable_target_auditor_gate_pass_reasons,
|
|
155
|
+
_auditor_completion_metadata,
|
|
156
|
+
_complete_stage_transaction,
|
|
157
|
+
_manifest_with_fast_rerun_freshness_at_finalize,
|
|
158
|
+
_older_stage_replay_message,
|
|
159
|
+
_repair_transaction_ids_for_artifact,
|
|
160
|
+
_snapshot_analyst_draft,
|
|
161
|
+
_stage_runtime_provenance,
|
|
162
|
+
_stale_artifact_baseline_sha,
|
|
163
|
+
_stale_expected_artifact_refresh_reasons,
|
|
164
|
+
_topology_satisfaction_required_reasons,
|
|
165
|
+
_topology_satisfaction_target_blocking_reasons,
|
|
166
|
+
_topology_satisfaction_targets_for_completion,
|
|
167
|
+
_topology_satisfier_aliases,
|
|
168
|
+
_validate_completion_target,
|
|
169
|
+
_workflow_with_topology_satisfaction,
|
|
170
|
+
complete_finalize_transaction,
|
|
171
|
+
complete_stage_transaction,
|
|
172
|
+
raise_if_auditable_target_complete_blocks_downstream,
|
|
173
|
+
)
|
|
174
|
+
from multi_agent_brief.orchestrator.runtime_state.trajectory import ( # noqa: F401
|
|
175
|
+
TRAJECTORY_DECISION_NARROWING_STATUS,
|
|
176
|
+
TRAJECTORY_NARROWED_DECISIONS,
|
|
177
|
+
_raise_if_trajectory_narrows_repair_route,
|
|
178
|
+
_raise_if_trajectory_narrows_success_path,
|
|
179
|
+
_trajectory_decision_narrowing,
|
|
180
|
+
_trajectory_narrowing_changed,
|
|
181
|
+
_workflow_with_trajectory_decision_narrowing,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
__all__ = [
|
|
186
|
+
"E_ACTIVE_REPAIR_OPEN",
|
|
187
|
+
"E_ARTIFACT_INVALID",
|
|
188
|
+
"E_ASSESSMENT_TARGET_COMPLETE",
|
|
189
|
+
"E_CLAIM_DRAFT_CONTRACT_INVALID",
|
|
190
|
+
"E_COMPLETION_TRANSACTION_REQUIRED",
|
|
191
|
+
"E_FACT_LAYER_IMPORT_INVALID",
|
|
192
|
+
"E_ILLEGAL_TRANSITION",
|
|
193
|
+
"E_QUALITY_GATE_REQUIRED",
|
|
194
|
+
"E_READER_FINAL_GATE_FAILED",
|
|
195
|
+
"E_REPAIR_IMPORTED_FACT_LAYER_FORBIDDEN",
|
|
196
|
+
"E_REPAIR_NO_LEGAL_ROUTE",
|
|
197
|
+
"E_REPAIR_TRANSACTION_REQUIRED",
|
|
198
|
+
"E_REQUIRED_ARTIFACT_MISSING",
|
|
199
|
+
"E_RUNTIME_STATE_NOT_INITIALIZED",
|
|
200
|
+
"E_STAGE_ALREADY_COMPLETED",
|
|
201
|
+
"E_STAGE_MISMATCH",
|
|
202
|
+
"E_TRANSACTION_INTEGRITY",
|
|
203
|
+
"E_TRANSACTION_PARTIAL_WRITE",
|
|
204
|
+
"RUNTIME_MANIFEST_SCHEMA",
|
|
205
|
+
"RUNTIME_STATE_FILES",
|
|
206
|
+
"RuntimeStateError",
|
|
207
|
+
"append_event",
|
|
208
|
+
"check_runtime_state",
|
|
209
|
+
"complete_finalize_transaction",
|
|
210
|
+
"complete_stage_transaction",
|
|
211
|
+
"enrich_claim_metadata_transaction",
|
|
212
|
+
"freeze_claim_ledger_transaction",
|
|
213
|
+
"import_fact_layer_transaction",
|
|
214
|
+
"initialize_runtime_state",
|
|
215
|
+
"load_artifact_contracts",
|
|
216
|
+
"load_stage_specs",
|
|
217
|
+
"new_run_id",
|
|
218
|
+
"read_event_log_records_strict",
|
|
219
|
+
"record_decision",
|
|
220
|
+
"record_handoff_written",
|
|
221
|
+
"runtime_state_paths",
|
|
222
|
+
"show_runtime_state",
|
|
223
|
+
"utc_now",
|
|
224
|
+
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Runtime-state workspace path helpers."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from multi_agent_brief.orchestrator.runtime_state.errors import RuntimeStateError
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
RUNTIME_STATE_FILES = {
|
|
11
|
+
"runtime_manifest": "output/intermediate/runtime_manifest.json",
|
|
12
|
+
"workflow_state": "output/intermediate/workflow_state.json",
|
|
13
|
+
"artifact_registry": "output/intermediate/artifact_registry.json",
|
|
14
|
+
"event_log": "output/intermediate/event_log.jsonl",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def runtime_state_paths(workspace: str | Path) -> dict[str, Path]:
|
|
19
|
+
ws = Path(workspace).expanduser().resolve()
|
|
20
|
+
return {key: ws / rel_path for key, rel_path in RUNTIME_STATE_FILES.items()}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _require_workspace(workspace: str | Path) -> Path:
|
|
24
|
+
ws = Path(workspace).expanduser().resolve()
|
|
25
|
+
if not (ws / "config.yaml").exists():
|
|
26
|
+
raise RuntimeStateError(
|
|
27
|
+
f"Workspace config.yaml not found: {ws / 'config.yaml'}",
|
|
28
|
+
details={"workspace": str(ws)},
|
|
29
|
+
)
|
|
30
|
+
return ws
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _workspace_relative(workspace: Path, path: Path) -> str:
|
|
34
|
+
resolved = path.expanduser().resolve()
|
|
35
|
+
try:
|
|
36
|
+
return resolved.relative_to(workspace).as_posix()
|
|
37
|
+
except ValueError:
|
|
38
|
+
return path.as_posix()
|