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,96 @@
|
|
|
1
|
+
"""Runtime validation helpers for Atomic Claim Graph artifacts."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections import Counter
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
ATOMIC_CLAIM_GRAPH_VALIDATION_PREFIX = "atomic_claim_graph_validation_error"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def validate_atomic_claim_graph_against_ledger(
|
|
13
|
+
*,
|
|
14
|
+
graph_payload: dict[str, Any],
|
|
15
|
+
ledger_claims: list[dict[str, Any]],
|
|
16
|
+
) -> str | None:
|
|
17
|
+
"""Return the first deterministic graph/ledger validation reason, if any.
|
|
18
|
+
|
|
19
|
+
This helper validates machine-checkable coverage and type consistency only.
|
|
20
|
+
It does not infer atomization quality or judge support sufficiency.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
graph_claims = [claim for claim in graph_payload.get("claims", []) if isinstance(claim, dict)]
|
|
24
|
+
graph_claim_ids = [
|
|
25
|
+
str(claim.get("claim_id")).strip()
|
|
26
|
+
for claim in graph_claims
|
|
27
|
+
if isinstance(claim.get("claim_id"), str) and claim.get("claim_id").strip()
|
|
28
|
+
]
|
|
29
|
+
ledger_by_id = {
|
|
30
|
+
str(claim.get("claim_id")).strip(): claim
|
|
31
|
+
for claim in ledger_claims
|
|
32
|
+
if isinstance(claim, dict)
|
|
33
|
+
and isinstance(claim.get("claim_id"), str)
|
|
34
|
+
and claim.get("claim_id").strip()
|
|
35
|
+
}
|
|
36
|
+
ledger_ids = set(ledger_by_id)
|
|
37
|
+
|
|
38
|
+
duplicate_ids = sorted(claim_id for claim_id, count in Counter(graph_claim_ids).items() if count > 1)
|
|
39
|
+
if duplicate_ids:
|
|
40
|
+
return f"duplicate_claim_coverage:{duplicate_ids[0]}"
|
|
41
|
+
|
|
42
|
+
unknown_ids = sorted(claim_id for claim_id in graph_claim_ids if claim_id not in ledger_ids)
|
|
43
|
+
if unknown_ids:
|
|
44
|
+
return f"unknown_claim_reference:{unknown_ids[0]}"
|
|
45
|
+
|
|
46
|
+
missing_ids = sorted(ledger_ids - set(graph_claim_ids))
|
|
47
|
+
if missing_ids:
|
|
48
|
+
return f"missing_claim_coverage:{missing_ids[0]}"
|
|
49
|
+
|
|
50
|
+
graph_by_claim_id = {
|
|
51
|
+
str(claim.get("claim_id")).strip(): claim
|
|
52
|
+
for claim in graph_claims
|
|
53
|
+
if isinstance(claim.get("claim_id"), str) and claim.get("claim_id").strip()
|
|
54
|
+
}
|
|
55
|
+
for claim_id in sorted(ledger_ids):
|
|
56
|
+
reason = _type_consistency_reason(
|
|
57
|
+
claim_id=claim_id,
|
|
58
|
+
ledger_claim=ledger_by_id[claim_id],
|
|
59
|
+
graph_claim=graph_by_claim_id.get(claim_id) or {},
|
|
60
|
+
)
|
|
61
|
+
if reason:
|
|
62
|
+
return reason
|
|
63
|
+
|
|
64
|
+
return None
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _type_consistency_reason(
|
|
68
|
+
*,
|
|
69
|
+
claim_id: str,
|
|
70
|
+
ledger_claim: dict[str, Any],
|
|
71
|
+
graph_claim: dict[str, Any],
|
|
72
|
+
) -> str | None:
|
|
73
|
+
roles = {
|
|
74
|
+
str(atom.get("claim_role")).strip()
|
|
75
|
+
for atom in graph_claim.get("atoms", [])
|
|
76
|
+
if isinstance(atom, dict)
|
|
77
|
+
and isinstance(atom.get("claim_role"), str)
|
|
78
|
+
and atom.get("claim_role").strip()
|
|
79
|
+
}
|
|
80
|
+
claim_type = str(ledger_claim.get("claim_type") or "fact").strip()
|
|
81
|
+
if claim_type == "number" and "numeric_fact" not in roles:
|
|
82
|
+
return f"claim_type_number_missing_numeric_fact:{claim_id}"
|
|
83
|
+
if claim_type == "forecast" and "forward_looking_inference" not in roles:
|
|
84
|
+
return f"claim_type_forecast_missing_forward_looking_inference:{claim_id}"
|
|
85
|
+
if claim_type == "risk" and "risk_or_limitation" not in roles:
|
|
86
|
+
return f"claim_type_risk_missing_risk_atom:{claim_id}"
|
|
87
|
+
if _has_limitations(ledger_claim) and "risk_or_limitation" not in roles:
|
|
88
|
+
return f"claim_limitations_missing_risk_atom:{claim_id}"
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _has_limitations(claim: dict[str, Any]) -> bool:
|
|
93
|
+
limitations = claim.get("limitations")
|
|
94
|
+
return isinstance(limitations, list) and any(
|
|
95
|
+
isinstance(item, str) and item.strip() for item in limitations
|
|
96
|
+
)
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
"""Claim Ledger freeze transaction.
|
|
2
|
+
|
|
3
|
+
Python-owned freeze: reads agent-drafted claim_drafts.json, assigns
|
|
4
|
+
deterministic sorted-sequential claim IDs, writes canonical
|
|
5
|
+
claim_ledger.json atomically, and records freeze metadata.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
import uuid
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import Any
|
|
14
|
+
|
|
15
|
+
from multi_agent_brief.contracts.schemas.claim_draft import (
|
|
16
|
+
ClaimDraftContract,
|
|
17
|
+
claim_draft_diagnostics,
|
|
18
|
+
)
|
|
19
|
+
from multi_agent_brief.core.claim_ledger import ClaimLedger
|
|
20
|
+
from multi_agent_brief.orchestrator_contract import resolve_repo_workdir
|
|
21
|
+
from multi_agent_brief.orchestrator.runtime_state._io import (
|
|
22
|
+
_read_json,
|
|
23
|
+
_restore_state_files,
|
|
24
|
+
_sha256_file,
|
|
25
|
+
_snapshot_state_files,
|
|
26
|
+
_write_json_atomic,
|
|
27
|
+
)
|
|
28
|
+
from multi_agent_brief.orchestrator.runtime_state._transactions import (
|
|
29
|
+
_current_run_start_event_exists,
|
|
30
|
+
_load_manifest_and_workflow,
|
|
31
|
+
_preflight_transaction_files,
|
|
32
|
+
_restore_file_paths,
|
|
33
|
+
_sha256_bytes,
|
|
34
|
+
_snapshot_file_paths,
|
|
35
|
+
_write_bytes_atomic,
|
|
36
|
+
)
|
|
37
|
+
from multi_agent_brief.orchestrator.runtime_state.artifact_registry import (
|
|
38
|
+
ARTIFACT_VALID,
|
|
39
|
+
CLAIM_LEDGER_FROZEN_EDIT_GUIDANCE,
|
|
40
|
+
_build_artifact_registry,
|
|
41
|
+
)
|
|
42
|
+
from multi_agent_brief.orchestrator.runtime_state.completion_gates import (
|
|
43
|
+
_raise_completion_reasons,
|
|
44
|
+
)
|
|
45
|
+
from multi_agent_brief.orchestrator.runtime_state.contracts_loader import (
|
|
46
|
+
load_artifact_contracts,
|
|
47
|
+
load_stage_specs,
|
|
48
|
+
)
|
|
49
|
+
from multi_agent_brief.orchestrator.runtime_state.errors import (
|
|
50
|
+
E_ARTIFACT_INVALID,
|
|
51
|
+
E_CLAIM_DRAFT_CONTRACT_INVALID,
|
|
52
|
+
E_REQUIRED_ARTIFACT_MISSING,
|
|
53
|
+
E_RUNTIME_STATE_NOT_INITIALIZED,
|
|
54
|
+
E_STAGE_MISMATCH,
|
|
55
|
+
E_TRANSACTION_INTEGRITY,
|
|
56
|
+
E_TRANSACTION_PARTIAL_WRITE,
|
|
57
|
+
RuntimeStateError,
|
|
58
|
+
)
|
|
59
|
+
from multi_agent_brief.orchestrator.runtime_state.event_log import (
|
|
60
|
+
append_event,
|
|
61
|
+
read_event_log_records_strict,
|
|
62
|
+
)
|
|
63
|
+
from multi_agent_brief.orchestrator.runtime_state.identity import utc_now
|
|
64
|
+
from multi_agent_brief.orchestrator.runtime_state.lifecycle import show_runtime_state
|
|
65
|
+
from multi_agent_brief.orchestrator.runtime_state.paths import (
|
|
66
|
+
_require_workspace,
|
|
67
|
+
_workspace_relative,
|
|
68
|
+
runtime_state_paths,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
CLAIM_DRAFTS_PATH = Path("output/intermediate/claim_drafts.json")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
CLAIM_LEDGER_FREEZE_SCHEMA = "mabw.claim_ledger_freeze.v1"
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
CLAIM_LEDGER_PATH = Path("output/intermediate/claim_ledger.json")
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
CLAIM_LEDGER_FREEZE_ID_STRATEGY = "sorted_sequential_v1"
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
CLAIM_DRAFT_PROVENANCE_METADATA_FIELDS = (
|
|
85
|
+
"published_at",
|
|
86
|
+
"retrieved_at",
|
|
87
|
+
"source_path",
|
|
88
|
+
"source_title",
|
|
89
|
+
"source_name",
|
|
90
|
+
"publisher",
|
|
91
|
+
"source_url",
|
|
92
|
+
"source_type",
|
|
93
|
+
"source_category",
|
|
94
|
+
"retrieval_source_type",
|
|
95
|
+
"underlying_evidence_type",
|
|
96
|
+
"raw_underlying_evidence_type",
|
|
97
|
+
"topic",
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _normalize_claim_text(value: str) -> str:
|
|
102
|
+
return " ".join(value.casefold().split())
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def _claim_draft_sort_key(
|
|
106
|
+
indexed_draft: tuple[int, dict[str, Any]],
|
|
107
|
+
) -> tuple[str, str, str, int]:
|
|
108
|
+
index, draft = indexed_draft
|
|
109
|
+
return (
|
|
110
|
+
_normalize_claim_text(str(draft.get("source_id") or "")),
|
|
111
|
+
_normalize_claim_text(str(draft.get("statement") or "")),
|
|
112
|
+
_normalize_claim_text(str(draft.get("evidence_text") or "")),
|
|
113
|
+
index,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _claim_draft_warnings(drafts: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
|
118
|
+
buckets: dict[str, list[int]] = {}
|
|
119
|
+
for idx, draft in enumerate(drafts):
|
|
120
|
+
key = _normalize_claim_text(str(draft.get("statement") or ""))
|
|
121
|
+
if key:
|
|
122
|
+
buckets.setdefault(key, []).append(idx)
|
|
123
|
+
return [
|
|
124
|
+
{
|
|
125
|
+
"warning_type": "lexical_duplicate_statement",
|
|
126
|
+
"draft_indexes": indexes,
|
|
127
|
+
"normalized_statement": statement,
|
|
128
|
+
}
|
|
129
|
+
for statement, indexes in sorted(buckets.items())
|
|
130
|
+
if len(indexes) > 1
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _read_claim_drafts_for_freeze(
|
|
135
|
+
workspace: Path,
|
|
136
|
+
) -> tuple[Path, dict[str, Any], list[dict[str, Any]]]:
|
|
137
|
+
path = workspace / CLAIM_DRAFTS_PATH
|
|
138
|
+
if not path.exists():
|
|
139
|
+
raise RuntimeStateError(
|
|
140
|
+
"Claim drafts are required before freezing the Claim Ledger.",
|
|
141
|
+
details={"path": _workspace_relative(workspace, path)},
|
|
142
|
+
error_code=E_REQUIRED_ARTIFACT_MISSING,
|
|
143
|
+
)
|
|
144
|
+
payload = _read_json(path)
|
|
145
|
+
violations = ClaimDraftContract.validate(payload)
|
|
146
|
+
errors = [violation for violation in violations if violation.severity == "error"]
|
|
147
|
+
if errors:
|
|
148
|
+
first = errors[0]
|
|
149
|
+
diagnostics = claim_draft_diagnostics(errors)
|
|
150
|
+
raise RuntimeStateError(
|
|
151
|
+
"Claim drafts failed contract validation.",
|
|
152
|
+
details={
|
|
153
|
+
"path": _workspace_relative(workspace, path),
|
|
154
|
+
"field": first.field,
|
|
155
|
+
"error": first.error,
|
|
156
|
+
"required_fields": ["statement", "source_id", "evidence_text"],
|
|
157
|
+
"forbidden_fields": ["claim_id"],
|
|
158
|
+
"diagnostics": diagnostics,
|
|
159
|
+
},
|
|
160
|
+
error_code=E_CLAIM_DRAFT_CONTRACT_INVALID,
|
|
161
|
+
)
|
|
162
|
+
drafts = payload.get("drafts") or []
|
|
163
|
+
if not drafts:
|
|
164
|
+
raise RuntimeStateError(
|
|
165
|
+
"Claim drafts must contain at least one draft before freezing the Claim Ledger.",
|
|
166
|
+
details={
|
|
167
|
+
"path": _workspace_relative(workspace, path),
|
|
168
|
+
"field": "drafts",
|
|
169
|
+
"error": "must contain at least one draft",
|
|
170
|
+
"required_fields": ["statement", "source_id", "evidence_text"],
|
|
171
|
+
"forbidden_fields": ["claim_id"],
|
|
172
|
+
"diagnostics": [
|
|
173
|
+
{
|
|
174
|
+
"field": "drafts",
|
|
175
|
+
"error": "must contain at least one draft",
|
|
176
|
+
"severity": "error",
|
|
177
|
+
"required_fields": ["statement", "source_id", "evidence_text"],
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
error_code=E_CLAIM_DRAFT_CONTRACT_INVALID,
|
|
182
|
+
)
|
|
183
|
+
return path, payload, [dict(draft) for draft in drafts]
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def _canonical_claims_from_drafts(drafts: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
|
187
|
+
claims: list[dict[str, Any]] = []
|
|
188
|
+
for seq, (_original_index, draft) in enumerate(
|
|
189
|
+
sorted(enumerate(drafts), key=_claim_draft_sort_key),
|
|
190
|
+
start=1,
|
|
191
|
+
):
|
|
192
|
+
metadata = dict(draft.get("metadata") or {})
|
|
193
|
+
if draft.get("draft_id"):
|
|
194
|
+
metadata["draft_id"] = str(draft["draft_id"])
|
|
195
|
+
if draft.get("candidate_id"):
|
|
196
|
+
metadata["candidate_id"] = str(draft["candidate_id"])
|
|
197
|
+
source_type = _claim_draft_source_type(draft)
|
|
198
|
+
for field in CLAIM_DRAFT_PROVENANCE_METADATA_FIELDS:
|
|
199
|
+
if draft.get(field) is not None:
|
|
200
|
+
if field == "source_type":
|
|
201
|
+
raw_source_type = draft.get("source_type")
|
|
202
|
+
if isinstance(raw_source_type, str) and raw_source_type.strip():
|
|
203
|
+
metadata.setdefault(field, source_type)
|
|
204
|
+
else:
|
|
205
|
+
metadata.setdefault(field, str(draft[field]).strip())
|
|
206
|
+
claim = {
|
|
207
|
+
"claim_id": f"CL-{seq:04d}",
|
|
208
|
+
"statement": str(draft["statement"]).strip(),
|
|
209
|
+
"source_id": str(draft["source_id"]).strip(),
|
|
210
|
+
"evidence_text": str(draft["evidence_text"]).strip(),
|
|
211
|
+
"source_url": str(draft.get("source_url") or ""),
|
|
212
|
+
"source_type": source_type,
|
|
213
|
+
"claim_type": str(draft.get("claim_type") or "fact"),
|
|
214
|
+
"confidence": str(draft.get("confidence") or "medium"),
|
|
215
|
+
"requires_audit": bool(draft.get("requires_audit", True)),
|
|
216
|
+
"created_by": str(draft.get("created_by") or "claim-ledger"),
|
|
217
|
+
"used_in_sections": list(draft.get("used_in_sections") or []),
|
|
218
|
+
"metadata": metadata,
|
|
219
|
+
"schema_version": "v2",
|
|
220
|
+
"epistemic_type": str(draft.get("epistemic_type") or "observed"),
|
|
221
|
+
"evidence_relation": str(draft.get("evidence_relation") or "direct"),
|
|
222
|
+
"applicability_reason": str(draft.get("applicability_reason") or ""),
|
|
223
|
+
"limitations": list(draft.get("limitations") or []),
|
|
224
|
+
}
|
|
225
|
+
claims.append(claim)
|
|
226
|
+
return claims
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def _claim_draft_source_type(draft: dict[str, Any]) -> str:
|
|
230
|
+
source_type = draft.get("source_type")
|
|
231
|
+
if isinstance(source_type, str):
|
|
232
|
+
return source_type.strip() or "local_file"
|
|
233
|
+
if source_type is None:
|
|
234
|
+
return "local_file"
|
|
235
|
+
return str(source_type).strip() or "local_file"
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def _claim_ledger_bytes(claims: list[dict[str, Any]]) -> bytes:
|
|
239
|
+
text = json.dumps(claims, ensure_ascii=False, indent=2, sort_keys=True)
|
|
240
|
+
return (text + "\n").encode("utf-8")
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def _claim_ledger_freeze_manifest(
|
|
244
|
+
*,
|
|
245
|
+
workspace: Path,
|
|
246
|
+
frozen_at: str,
|
|
247
|
+
draft_path: Path,
|
|
248
|
+
draft_payload: dict[str, Any],
|
|
249
|
+
drafts: list[dict[str, Any]],
|
|
250
|
+
ledger_path: Path,
|
|
251
|
+
ledger_bytes: bytes,
|
|
252
|
+
warnings: list[dict[str, Any]],
|
|
253
|
+
transaction_id: str,
|
|
254
|
+
) -> dict[str, Any]:
|
|
255
|
+
return {
|
|
256
|
+
"schema_version": CLAIM_LEDGER_FREEZE_SCHEMA,
|
|
257
|
+
"status": "frozen",
|
|
258
|
+
"frozen_at": frozen_at,
|
|
259
|
+
"transaction_id": transaction_id,
|
|
260
|
+
"id_strategy": CLAIM_LEDGER_FREEZE_ID_STRATEGY,
|
|
261
|
+
"id_stability_scope": "per_freeze_input",
|
|
262
|
+
"id_strategy_description": (
|
|
263
|
+
"Deterministic for identical claim_drafts.json content under sorted_sequential_v1; "
|
|
264
|
+
"not a cross-incremental stability guarantee when drafts are added, removed, or changed."
|
|
265
|
+
),
|
|
266
|
+
"source_artifact_id": "claim_drafts",
|
|
267
|
+
"source_path": _workspace_relative(workspace, draft_path),
|
|
268
|
+
"source_schema_version": draft_payload.get("schema_version"),
|
|
269
|
+
"source_sha256": _sha256_file(draft_path),
|
|
270
|
+
"claim_ledger_path": _workspace_relative(workspace, ledger_path),
|
|
271
|
+
"claim_ledger_sha256": _sha256_bytes(ledger_bytes),
|
|
272
|
+
"claim_count": len(drafts),
|
|
273
|
+
"source_ids": sorted(
|
|
274
|
+
{
|
|
275
|
+
str(draft.get("source_id") or "")
|
|
276
|
+
for draft in drafts
|
|
277
|
+
if draft.get("source_id")
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
"warnings": warnings,
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def _claim_ledger_freeze_reasons(
|
|
285
|
+
*,
|
|
286
|
+
workspace: Path,
|
|
287
|
+
manifest: dict[str, Any],
|
|
288
|
+
) -> list[str]:
|
|
289
|
+
freeze = manifest.get("claim_ledger_freeze")
|
|
290
|
+
if not isinstance(freeze, dict):
|
|
291
|
+
return [
|
|
292
|
+
"Claim Ledger has not been frozen. Run `multi-agent-brief state freeze-claim-ledger --workspace <workspace>`."
|
|
293
|
+
]
|
|
294
|
+
reasons: list[str] = []
|
|
295
|
+
if freeze.get("schema_version") != CLAIM_LEDGER_FREEZE_SCHEMA:
|
|
296
|
+
reasons.append("Claim Ledger freeze metadata has an unsupported schema.")
|
|
297
|
+
if freeze.get("status") != "frozen":
|
|
298
|
+
reasons.append("Claim Ledger freeze metadata is not frozen.")
|
|
299
|
+
draft_path = workspace / str(freeze.get("source_path") or CLAIM_DRAFTS_PATH)
|
|
300
|
+
ledger_path = workspace / str(freeze.get("claim_ledger_path") or CLAIM_LEDGER_PATH)
|
|
301
|
+
if not draft_path.exists() or not draft_path.is_file():
|
|
302
|
+
reasons.append(
|
|
303
|
+
f"Claim Ledger freeze source is missing: {_workspace_relative(workspace, draft_path)}."
|
|
304
|
+
)
|
|
305
|
+
elif _sha256_file(draft_path) != str(freeze.get("source_sha256") or ""):
|
|
306
|
+
reasons.append(
|
|
307
|
+
"Claim Ledger freeze source hash does not match current claim_drafts.json."
|
|
308
|
+
)
|
|
309
|
+
if not ledger_path.exists() or not ledger_path.is_file():
|
|
310
|
+
reasons.append(
|
|
311
|
+
f"Frozen Claim Ledger is missing: {_workspace_relative(workspace, ledger_path)}."
|
|
312
|
+
)
|
|
313
|
+
elif _sha256_file(ledger_path) != str(freeze.get("claim_ledger_sha256") or ""):
|
|
314
|
+
reasons.append(
|
|
315
|
+
f"Frozen Claim Ledger hash does not match current claim_ledger.json. {CLAIM_LEDGER_FROZEN_EDIT_GUIDANCE}"
|
|
316
|
+
)
|
|
317
|
+
return reasons
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def freeze_claim_ledger_transaction(
|
|
321
|
+
*,
|
|
322
|
+
workspace: str | Path,
|
|
323
|
+
repo_workdir: str | Path | None = None,
|
|
324
|
+
actor: str = "cli",
|
|
325
|
+
) -> dict[str, Any]:
|
|
326
|
+
ws = _require_workspace(workspace)
|
|
327
|
+
paths = runtime_state_paths(ws)
|
|
328
|
+
_preflight_transaction_files(paths)
|
|
329
|
+
ws, paths, manifest, workflow = _load_manifest_and_workflow(ws)
|
|
330
|
+
if not paths["event_log"].exists():
|
|
331
|
+
raise RuntimeStateError(
|
|
332
|
+
"Event log is required before freezing the Claim Ledger.",
|
|
333
|
+
details={"missing": str(paths["event_log"])},
|
|
334
|
+
error_code=E_RUNTIME_STATE_NOT_INITIALIZED,
|
|
335
|
+
)
|
|
336
|
+
event_records = read_event_log_records_strict(paths["event_log"])
|
|
337
|
+
if workflow.get("current_stage") != "claim-ledger":
|
|
338
|
+
raise RuntimeStateError(
|
|
339
|
+
"Claim Ledger can only be frozen while claim-ledger is the current stage.",
|
|
340
|
+
details={"current_stage": workflow.get("current_stage")},
|
|
341
|
+
error_code=E_STAGE_MISMATCH,
|
|
342
|
+
)
|
|
343
|
+
repo = resolve_repo_workdir(repo_workdir, workspace=ws)
|
|
344
|
+
stages = load_stage_specs(repo)
|
|
345
|
+
artifacts = load_artifact_contracts(repo)
|
|
346
|
+
run_id = str(manifest["run_id"])
|
|
347
|
+
if not _current_run_start_event_exists(event_records, run_id):
|
|
348
|
+
raise RuntimeStateError(
|
|
349
|
+
"Event log does not contain a current-run start event; refusing Claim Ledger freeze.",
|
|
350
|
+
details={"run_id": run_id, "event_log": str(paths["event_log"])},
|
|
351
|
+
error_code=E_TRANSACTION_INTEGRITY,
|
|
352
|
+
)
|
|
353
|
+
transaction_id = uuid.uuid4().hex
|
|
354
|
+
frozen_at = utc_now()
|
|
355
|
+
draft_path, draft_payload, drafts = _read_claim_drafts_for_freeze(ws)
|
|
356
|
+
warnings = _claim_draft_warnings(drafts)
|
|
357
|
+
claims = _canonical_claims_from_drafts(drafts)
|
|
358
|
+
ledger_bytes = _claim_ledger_bytes(claims)
|
|
359
|
+
ledger_path = ws / CLAIM_LEDGER_PATH
|
|
360
|
+
source_sha = _sha256_file(draft_path)
|
|
361
|
+
ledger_sha = _sha256_bytes(ledger_bytes)
|
|
362
|
+
|
|
363
|
+
if "claim_ledger_freeze" in manifest:
|
|
364
|
+
existing_freeze = manifest.get("claim_ledger_freeze")
|
|
365
|
+
if not isinstance(existing_freeze, dict):
|
|
366
|
+
raise RuntimeStateError(
|
|
367
|
+
"Claim Ledger freeze metadata is malformed; refusing to freeze again.",
|
|
368
|
+
details={"field": "claim_ledger_freeze"},
|
|
369
|
+
error_code=E_TRANSACTION_INTEGRITY,
|
|
370
|
+
)
|
|
371
|
+
freeze_reasons = _claim_ledger_freeze_reasons(workspace=ws, manifest=manifest)
|
|
372
|
+
frozen_source_sha = str(existing_freeze.get("source_sha256") or "")
|
|
373
|
+
frozen_ledger_sha = str(existing_freeze.get("claim_ledger_sha256") or "")
|
|
374
|
+
if (
|
|
375
|
+
not freeze_reasons
|
|
376
|
+
and frozen_source_sha == source_sha
|
|
377
|
+
and frozen_ledger_sha == ledger_sha
|
|
378
|
+
):
|
|
379
|
+
state = show_runtime_state(workspace=ws)
|
|
380
|
+
state["claim_ledger_freeze"] = existing_freeze
|
|
381
|
+
state["transaction"] = {
|
|
382
|
+
"transaction_id": existing_freeze.get("transaction_id"),
|
|
383
|
+
"stage_id": "claim-ledger",
|
|
384
|
+
"decision": "freeze_claim_ledger_idempotent",
|
|
385
|
+
}
|
|
386
|
+
return state
|
|
387
|
+
message = (
|
|
388
|
+
"Claim Ledger is already frozen; repeat freeze requires unchanged claim_drafts.json "
|
|
389
|
+
"and claim_ledger.json. Route repair/reset before freezing changed drafts."
|
|
390
|
+
)
|
|
391
|
+
if any(
|
|
392
|
+
CLAIM_LEDGER_FROZEN_EDIT_GUIDANCE in reason for reason in freeze_reasons
|
|
393
|
+
):
|
|
394
|
+
message = f"{message} {CLAIM_LEDGER_FROZEN_EDIT_GUIDANCE}"
|
|
395
|
+
raise RuntimeStateError(
|
|
396
|
+
message,
|
|
397
|
+
details={
|
|
398
|
+
"freeze_reasons": freeze_reasons,
|
|
399
|
+
"frozen_source_sha256": frozen_source_sha,
|
|
400
|
+
"current_source_sha256": source_sha,
|
|
401
|
+
"frozen_claim_ledger_sha256": frozen_ledger_sha,
|
|
402
|
+
"current_claim_ledger_sha256": ledger_sha,
|
|
403
|
+
},
|
|
404
|
+
error_code=E_TRANSACTION_INTEGRITY,
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
next_manifest = dict(manifest)
|
|
408
|
+
next_manifest["updated_at"] = frozen_at
|
|
409
|
+
next_manifest["claim_ledger_freeze"] = _claim_ledger_freeze_manifest(
|
|
410
|
+
workspace=ws,
|
|
411
|
+
frozen_at=frozen_at,
|
|
412
|
+
draft_path=draft_path,
|
|
413
|
+
draft_payload=draft_payload,
|
|
414
|
+
drafts=drafts,
|
|
415
|
+
ledger_path=ledger_path,
|
|
416
|
+
ledger_bytes=ledger_bytes,
|
|
417
|
+
warnings=warnings,
|
|
418
|
+
transaction_id=transaction_id,
|
|
419
|
+
)
|
|
420
|
+
registry = _build_artifact_registry(
|
|
421
|
+
workspace=ws,
|
|
422
|
+
run_id=run_id,
|
|
423
|
+
artifacts=artifacts,
|
|
424
|
+
workflow=workflow,
|
|
425
|
+
updated_at=frozen_at,
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
file_snapshots = _snapshot_file_paths([ledger_path])
|
|
429
|
+
state_snapshots = _snapshot_state_files(
|
|
430
|
+
paths, ("runtime_manifest", "artifact_registry")
|
|
431
|
+
)
|
|
432
|
+
try:
|
|
433
|
+
_write_bytes_atomic(ledger_path, ledger_bytes)
|
|
434
|
+
registry = _build_artifact_registry(
|
|
435
|
+
workspace=ws,
|
|
436
|
+
run_id=run_id,
|
|
437
|
+
artifacts=artifacts,
|
|
438
|
+
workflow=workflow,
|
|
439
|
+
updated_at=frozen_at,
|
|
440
|
+
)
|
|
441
|
+
ledger_record = (registry.get("artifacts") or {}).get("claim_ledger") or {}
|
|
442
|
+
if ledger_record.get("status") != ARTIFACT_VALID:
|
|
443
|
+
raise RuntimeStateError(
|
|
444
|
+
"Frozen Claim Ledger failed artifact validation.",
|
|
445
|
+
details={
|
|
446
|
+
"artifact_id": "claim_ledger",
|
|
447
|
+
"status": ledger_record.get("status"),
|
|
448
|
+
"validation_result": ledger_record.get("validation_result"),
|
|
449
|
+
},
|
|
450
|
+
error_code=E_ARTIFACT_INVALID,
|
|
451
|
+
)
|
|
452
|
+
_write_json_atomic(paths["runtime_manifest"], next_manifest)
|
|
453
|
+
_write_json_atomic(paths["artifact_registry"], registry)
|
|
454
|
+
append_event(
|
|
455
|
+
workspace=ws,
|
|
456
|
+
run_id=run_id,
|
|
457
|
+
event_type="claim_ledger_frozen",
|
|
458
|
+
actor=actor,
|
|
459
|
+
stage_id="claim-ledger",
|
|
460
|
+
artifact_id="claim_ledger",
|
|
461
|
+
reason="Claim Ledger frozen from claim_drafts.json.",
|
|
462
|
+
metadata={
|
|
463
|
+
"transaction_id": transaction_id,
|
|
464
|
+
"source_artifact_id": "claim_drafts",
|
|
465
|
+
"source_path": _workspace_relative(ws, draft_path),
|
|
466
|
+
"source_sha256": source_sha,
|
|
467
|
+
"claim_ledger_path": _workspace_relative(ws, ledger_path),
|
|
468
|
+
"claim_ledger_sha256": ledger_sha,
|
|
469
|
+
"claim_count": len(claims),
|
|
470
|
+
"id_strategy": CLAIM_LEDGER_FREEZE_ID_STRATEGY,
|
|
471
|
+
"warning_count": len(warnings),
|
|
472
|
+
},
|
|
473
|
+
)
|
|
474
|
+
except RuntimeStateError as exc:
|
|
475
|
+
try:
|
|
476
|
+
_restore_state_files(paths, state_snapshots)
|
|
477
|
+
_restore_file_paths(
|
|
478
|
+
file_snapshots,
|
|
479
|
+
rollback_message="Claim Ledger freeze rollback failed after partial write.",
|
|
480
|
+
)
|
|
481
|
+
except RuntimeStateError as rollback_exc:
|
|
482
|
+
raise RuntimeStateError(
|
|
483
|
+
"Claim Ledger freeze partially wrote files and failed rollback.",
|
|
484
|
+
details={
|
|
485
|
+
"transaction_id": transaction_id,
|
|
486
|
+
"freeze_error": str(exc),
|
|
487
|
+
"freeze_details": exc.details,
|
|
488
|
+
"rollback_error": str(rollback_exc),
|
|
489
|
+
"rollback_details": rollback_exc.details,
|
|
490
|
+
},
|
|
491
|
+
error_code=E_TRANSACTION_PARTIAL_WRITE,
|
|
492
|
+
) from rollback_exc
|
|
493
|
+
raise RuntimeStateError(
|
|
494
|
+
"Claim Ledger freeze failed; written files were restored.",
|
|
495
|
+
details={
|
|
496
|
+
"transaction_id": transaction_id,
|
|
497
|
+
"freeze_error": str(exc),
|
|
498
|
+
"freeze_details": exc.details,
|
|
499
|
+
},
|
|
500
|
+
error_code=exc.error_code,
|
|
501
|
+
) from exc
|
|
502
|
+
|
|
503
|
+
state = show_runtime_state(workspace=ws)
|
|
504
|
+
state["claim_ledger_freeze"] = next_manifest["claim_ledger_freeze"]
|
|
505
|
+
state["transaction"] = {
|
|
506
|
+
"transaction_id": transaction_id,
|
|
507
|
+
"stage_id": "claim-ledger",
|
|
508
|
+
"decision": "freeze_claim_ledger",
|
|
509
|
+
}
|
|
510
|
+
return state
|