dialectical-framework 2.0.7__tar.gz → 2.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/PKG-INFO +1 -1
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/pyproject.toml +1 -1
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/consultant/consultant.py +39 -3
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/transformation_sketch.py +39 -5
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/views.py +32 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/bedrock_provider.py +14 -1
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/format_compat.py +51 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/LICENSE +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/PATENTS +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/README.md +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/advisor.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/build_policy.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/migration.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/reply_hygiene.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/system_prompts.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/anchor.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/deepen.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/explore.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/ingest.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/note.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/record_decision.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/scoped.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/advisor/tools/sync.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/agent_context.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/analyst.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/anchor_theses.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/edit_perspective.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/expand_polarities.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/find_polarities.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/introduce_polarity.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/sketch_tetrad.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/skills/surface_theses.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/system_prompts.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/tools/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/analyst/tools/place_statement.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/app_spec.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/apps.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/consultant/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/conversation_facilitator.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/execution_report.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/explorer.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/skills/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/skills/build_wheels.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/skills/explore_transformations.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/skills/generate_synthesis.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/system_prompts.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/tools/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/tools/create_nexus.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/tools/expand_nexus.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/tools/generate_synthesis.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/explorer/tools/present_exploration.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/add_input.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/audit_feasibility.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/create_dx_input.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/digest_input.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/discard.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/get_schema.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/inspect_node.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/present_analysis.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/query_graph.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/read_digest.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/orchestrator/tools/read_input.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/reasonable_concern.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/stream_events.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/toolsets.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/turn_timing.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/ac_re_taxonomy.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/action_extraction.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/add_input.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/ai_dto/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/ai_dto/statement_dto.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/ai_dto/statements_deck_dto.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/antithesis_classification.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/antithesis_extraction.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/antithetical_thesis_detection.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/aspect_classification.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/aspect_generation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/build_status.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/causality_estimator.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/causality_estimator_balanced.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/causality_estimator_criteria.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/causality_estimator_desirable.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/causality_estimator_feasible.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/causality_estimator_realistic.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/causality_normalizer.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality/estimator_resolver.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/causality_estimation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/control_statements_check.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/create_dx_input.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/create_nexus.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/decision_coherence_check.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/decision_confirmation_check.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/diagonal_oppositions_check.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/dialectical_context.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/discard.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/display_text_edit.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/expand_nexus.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/perspective_combination.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/perspective_validation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/positive_ac_re_apex_derivation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/record_decision.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/scoring_scales.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/source_digest.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/statement_classification.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/statement_deduplication.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/statement_headline.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/statement_placement.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/synthesis_generation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/tetrad_candidates.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/tetrad_grounding.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/tetrad_sketch.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/thesis_extraction.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/transformation_audit.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/transformation_generation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/concerns/view_sketch.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/dialectical_reasoning.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/enums/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/enums/causality_preset.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/enums/di.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/events/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/events/graph_event.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/events/graph_event_bus.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/events/progress_event.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/exceptions/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/exceptions/node_errors.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/exceptions/provider_errors.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/exceptions/resolver_errors.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/composite_input_resolver.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/dialexity_input_resolver.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/estimation_manager.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/mixins/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/mixins/incremental_build_mixin.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/mixins/intent_mixin.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/mixins/persistable_mixin.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/assessable_entity.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/base_node.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/case.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/cycle.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/decision.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/estimation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/ideas.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/input.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/nexus.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/note.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/perspective.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/polarity.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/rationale.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/statement.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/synthesis.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/transformation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/transition.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/nodes/wheel.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationship_manager.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/action_reflection_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/belongs_to_cycle_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/belongs_to_nexus_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/changed_to_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/contradiction_of_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/critiques_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/distilled_to_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/estimates_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/explains_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/grounded_in_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/has_input_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/has_statement_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/has_wheel_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/immutable_structure.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/is_source_of_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/is_target_of_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/negative_side_of_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/opposite_direction_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/opposite_of_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/polarity_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/positive_side_of_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/provides_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/relationships/synthesis_of_relationship.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/rendering.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/case_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/cycle_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/decision_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/input_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/nexus_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/node_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/note_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/perspective_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/polarity_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/schema_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/statement_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/transformation_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/repositories/wheel_repository.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/scope_context.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/verbatim_input_resolver.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/wheel_segment.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/wheel_segment_polar_pair.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/protocols/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/protocols/has_config.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/protocols/input_resolver.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/py.typed +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/settings.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/settings_context.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/__init__.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/async_drain.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/call_census.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/chunking.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/concurrency.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/dc_replace.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/decompose_probability_uniformly.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/edge_context.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/effect_logger.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/input_context.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/order_transitions.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/progress.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/retry_accounting.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/sequence_generation.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/thinking_compat.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/use_brain.py +0 -0
- {dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/utils/utterance.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: dialectical-framework
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.9
|
|
4
4
|
Summary: A dialectical framework for augmented intelligence. AI reasoning powered with dialectics supports humans in: system optimization (psychology, engineering, business, politics, etc.); dispute resolution (mediation, conflicts, negotiations, etc.); decision-making (dilemmas, challenging situations, win-win, etc.).
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: dialectics,dialectical-reasoning,synthesis,thesis-antithesis,ai,artificial-intelligence,llm,reasoning-framework,philosophy,logic,argumentation,conflict-resolution,decision-making,critical-thinking,semantic-graph,mirascope,pydantic,perspectives,polarity-reasoning
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "dialectical-framework"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.9"
|
|
4
4
|
description = "A dialectical framework for augmented intelligence. AI reasoning powered with dialectics supports humans in: system optimization (psychology, engineering, business, politics, etc.); dispute resolution (mediation, conflicts, negotiations, etc.); decision-making (dilemmas, challenging situations, win-win, etc.)."
|
|
5
5
|
authors = ["Evaldas Taroza <evaldas@dialexity.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -36,6 +36,7 @@ dropped from BOTH the product and the baseline.
|
|
|
36
36
|
|
|
37
37
|
from __future__ import annotations
|
|
38
38
|
|
|
39
|
+
import logging
|
|
39
40
|
import re
|
|
40
41
|
from contextlib import aclosing
|
|
41
42
|
from typing import Any, AsyncGenerator, Optional
|
|
@@ -51,7 +52,14 @@ from dialectical_framework.agents.conversation_facilitator import (
|
|
|
51
52
|
FROM_SETTINGS, ConversationFacilitator)
|
|
52
53
|
from dialectical_framework.agents.stream_events import StreamEvent
|
|
53
54
|
from dialectical_framework.agents.turn_timing import TurnTiming
|
|
54
|
-
from dialectical_framework.
|
|
55
|
+
from dialectical_framework.exceptions.provider_errors import ModelRefusal
|
|
56
|
+
from dialectical_framework.graph.views import (
|
|
57
|
+
ExplorationView,
|
|
58
|
+
FailedDrawView,
|
|
59
|
+
PerspectiveView,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
logger = logging.getLogger(__name__)
|
|
55
63
|
|
|
56
64
|
#: Tool verbs → mental acts. These are REWRITES, not drops: dropping every
|
|
57
65
|
#: paragraph that mentions a tool name would also delete the discrimination test
|
|
@@ -135,6 +143,16 @@ _TOOL_TOKENS = (
|
|
|
135
143
|
)
|
|
136
144
|
|
|
137
145
|
|
|
146
|
+
def _failed_draw(error: BaseException) -> FailedDrawView:
|
|
147
|
+
"""A failed draw's record: the exception's type, the provider's refusal
|
|
148
|
+
category when it is a `ModelRefusal` that carries one, and its text."""
|
|
149
|
+
return FailedDrawView(
|
|
150
|
+
kind=type(error).__name__,
|
|
151
|
+
category=getattr(error, "category", None) if isinstance(error, ModelRefusal) else None,
|
|
152
|
+
message=str(error) or None,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
138
156
|
def _apply_rewrites(section: str) -> tuple[str, list[str]]:
|
|
139
157
|
"""Apply the rewrite table whitespace-insensitively.
|
|
140
158
|
|
|
@@ -425,8 +443,22 @@ class Consultant:
|
|
|
425
443
|
# measured cold-start rate.
|
|
426
444
|
drawn = await asyncio.gather(*(draw() for _ in range(n)), return_exceptions=True)
|
|
427
445
|
sketches = [d for d in drawn if not isinstance(d, BaseException)]
|
|
446
|
+
failures = [d for d in drawn if isinstance(d, BaseException)]
|
|
447
|
+
# A failed draw is a finding, not noise: it costs the card a candidate
|
|
448
|
+
# (or its whole comparison, when two fail) and it costs time before it
|
|
449
|
+
# fails. Said once per failure, by type — the host that counted 8 lost
|
|
450
|
+
# draws in 240 on Opus 5.5 had no cause on record because this branch
|
|
451
|
+
# was silent — and carried on the view as `failed_draws`.
|
|
452
|
+
failed_draws = [_failed_draw(e) for e in failures]
|
|
453
|
+
for failed in failed_draws:
|
|
454
|
+
logger.warning(
|
|
455
|
+
"A view-turn draw failed (%d of %d drawn): %s%s: %s",
|
|
456
|
+
len(sketches), n, failed.kind,
|
|
457
|
+
f" ({failed.category})" if failed.category else "",
|
|
458
|
+
failed.message,
|
|
459
|
+
)
|
|
428
460
|
if not sketches:
|
|
429
|
-
raise
|
|
461
|
+
raise failures[0]
|
|
430
462
|
# With several draws the framework's own coherence check picks the one
|
|
431
463
|
# whose FIRST tension holds best (`concerns/tetrad_candidates.py`); a
|
|
432
464
|
# draw with no complete first tension sorts last. The card a blindspot
|
|
@@ -447,7 +479,11 @@ class Consultant:
|
|
|
447
479
|
sketch = sketches[judgeable[0]] if judgeable else sketches[0]
|
|
448
480
|
else:
|
|
449
481
|
sketch = sketches[0]
|
|
450
|
-
view = dataclasses.replace(
|
|
482
|
+
view = dataclasses.replace(
|
|
483
|
+
exploration_view_from_sketch(sketch),
|
|
484
|
+
runners_up=runners_up,
|
|
485
|
+
failed_draws=failed_draws,
|
|
486
|
+
)
|
|
451
487
|
# What the turn leaves behind is NOT what it sent: the long request and
|
|
452
488
|
# the DTO come off, and the person's ask plus the drawing in words go
|
|
453
489
|
# on. Kept as a request→prose pair, the long request taught the next
|
|
@@ -53,8 +53,30 @@ one-shot can replace it there is a separate, gated measurement
|
|
|
53
53
|
(`one-shot-transformation.md`, "Open"). Texts only, nothing persisted, no
|
|
54
54
|
scores — a number here would be an unchecked guess.
|
|
55
55
|
|
|
56
|
-
Unthinking, like every concern
|
|
57
|
-
|
|
56
|
+
Unthinking, like every concern. Measured once, on Sonnet 5.5 under the
|
|
57
|
+
structured-output constraint (2026-10-09, `probe_structured_s_minus.py`, 100
|
|
58
|
+
pairs): the same call thinking at `low` (`format_mode="json", thinking="low"`)
|
|
59
|
+
kept Ac- (+4, within noise) where the in-turn wording alone cost it a little
|
|
60
|
+
(−8 / −4 over two runs), at no latency on that model (4.7 s against 4.4 s a
|
|
61
|
+
write); on S- it added nothing beyond the wording (+15 either way). Not wired:
|
|
62
|
+
on a model that keeps forced tool use it would also move this call to JSON
|
|
63
|
+
mode, where no figure for it was taken. The next lever, if Ac- under the
|
|
64
|
+
constraint needs one.
|
|
65
|
+
|
|
66
|
+
THE CONSTRAINT AND S- (2026-10-09)
|
|
67
|
+
=================================
|
|
68
|
+
On a model whose structured calls carry `output_config.format`
|
|
69
|
+
(`format_compat.structured_output_format`; Sonnet 5.5 first), the reply comes
|
|
70
|
+
back as one compact line with terser texts — no prose, no thinking, the same
|
|
71
|
+
request otherwise (`probe_structured_wire.py`) — and S- came back as the two
|
|
72
|
+
traps IN TURN: a distinct third failure in 42% of 100 (four runs: 42/44/41/42)
|
|
73
|
+
against 57% for the same call without the constraint (+15, CI +2..+28), which
|
|
74
|
+
is what the first app measured on its cards (63% → 41% / 33%). Ac-/Re- were
|
|
75
|
+
not hurt; the constraint helps them (96-98% valid against 91-93%). The rule
|
|
76
|
+
now names the in-turn forms (`SYNTHESIS_SHAPE`), which restores S- to the
|
|
77
|
+
unconstrained level under the constraint and is neutral without it. The
|
|
78
|
+
constraint stays: it ended the parse re-asks, and the loss was a shape the
|
|
79
|
+
rule did not name.
|
|
58
80
|
|
|
59
81
|
SELECTION: AVAILABLE, OFF BY DEFAULT
|
|
60
82
|
====================================
|
|
@@ -99,8 +121,19 @@ TRANSFORMATION_POSITIONS = """1. The action (Ac): the concrete move that carries
|
|
|
99
121
|
|
|
100
122
|
#: What the developments produce together. The S- sentences are the measured
|
|
101
123
|
#: fix (`one-shot-transformation.md`: third-trap 4/17 → 12/17 on graph-built
|
|
102
|
-
#: wheels once the synthesis prompt carried them) and are kept word for word
|
|
103
|
-
|
|
124
|
+
#: wheels once the synthesis prompt carried them) and are kept word for word,
|
|
125
|
+
#: with the two IN-TURN forms added on 2026-10-09: a writer under a structured-
|
|
126
|
+
#: output constraint (Sonnet 5.5, `format_compat.structured_output_format`)
|
|
127
|
+
#: wrote S- as the two traps in sequence ("X, then Y", "X alternating with Y")
|
|
128
|
+
#: in 13-14 of ~58 failures per 100 against 4 of 43 without the constraint,
|
|
129
|
+
#: and the rule named only the side-by-side forms. With them named: S- as a
|
|
130
|
+
#: distinct third failure 42% → 57% on 100 pairs, twice (+15 / +16, both clear
|
|
131
|
+
#: of noise), back to the unconstrained writer's 57%; neutral on Sonnet 5
|
|
132
|
+
#: (−1, 100 pairs). Price: a pairwise "which S- is more specific" judge
|
|
133
|
+
#: prefers the trap-restating headline (30-48 against this wording; an arm
|
|
134
|
+
#: that asked for particulars won that read 60-19 and lost the whole shape
|
|
135
|
+
#: gain), so that read is not a shape read. `tests/e2e/probe_structured_s_minus.py`.
|
|
136
|
+
SYNTHESIS_SHAPE = """S+ is what emerges only when Ac+ and Re+ run together — a gain in dimension, not a middle: not "both", not the two strengths listed side by side. S- is the ONE named state Ac- and Re- produce together: a single way of failing that is neither trap on its own and not a choice between them. "Either X or Y", "X versus Y", "X while Y", "X, then Y" and "X alternating with Y" with X and Y the two traps are the inputs listed, side by side or in turn, not the collapse named."""
|
|
104
137
|
|
|
105
138
|
#: How a one-shot call builds it: the poles FIRST, because a degraded action
|
|
106
139
|
#: needs an action to degrade (the measured order), then the developments,
|
|
@@ -236,7 +269,8 @@ class TransformationSketchDto(BaseModel):
|
|
|
236
269
|
s_minus: str = Field(
|
|
237
270
|
description=(
|
|
238
271
|
"S- — what Ac- and Re- running together collapse into: ONE named way of "
|
|
239
|
-
"failing that is neither T- nor A- on its own. Never 'either X or Y'
|
|
272
|
+
"failing that is neither T- nor A- on its own. Never 'either X or Y', "
|
|
273
|
+
"'X then Y' or 'X alternating with Y'."
|
|
240
274
|
)
|
|
241
275
|
)
|
|
242
276
|
|
{dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/graph/views.py
RENAMED
|
@@ -326,6 +326,32 @@ class WheelView:
|
|
|
326
326
|
return dataclasses.asdict(self)
|
|
327
327
|
|
|
328
328
|
|
|
329
|
+
@dataclass(frozen=True)
|
|
330
|
+
class FailedDrawView:
|
|
331
|
+
"""One best-of-N draw that produced nothing — what failed, by type.
|
|
332
|
+
|
|
333
|
+
A drawn view is best-of-N (`Consultant.exploration_view(attempts=)`), and a
|
|
334
|
+
draw that raises used to vanish: the gather dropped it, nothing logged it,
|
|
335
|
+
and the census never saw a call it could not record. A host measured the
|
|
336
|
+
gap as 8 of 240 draws on Opus 5.5 with no cause on record. `kind` is the
|
|
337
|
+
exception's class name (`ModelRefusal`, `ParseError`, a provider error);
|
|
338
|
+
`category` is the provider's refusal category when the kind is a refusal
|
|
339
|
+
and it sent one; `message` is the exception's text, for a log, never for
|
|
340
|
+
a screen — `without_terminology()` drops it, since a parse error names DTO
|
|
341
|
+
fields.
|
|
342
|
+
"""
|
|
343
|
+
|
|
344
|
+
kind: str
|
|
345
|
+
category: Optional[str] = None
|
|
346
|
+
message: Optional[str] = None
|
|
347
|
+
|
|
348
|
+
def without_terminology(self) -> FailedDrawView:
|
|
349
|
+
return dataclasses.replace(self, message=None)
|
|
350
|
+
|
|
351
|
+
def to_dict(self) -> dict[str, Any]:
|
|
352
|
+
return dataclasses.asdict(self)
|
|
353
|
+
|
|
354
|
+
|
|
329
355
|
@dataclass(frozen=True)
|
|
330
356
|
class ExplorationView:
|
|
331
357
|
"""The perspectives seen together — an exploration's (a Nexus's) members,
|
|
@@ -344,6 +370,11 @@ class ExplorationView:
|
|
|
344
370
|
#: host's "again"/"another" can show one without a new reasoning call.
|
|
345
371
|
#: Empty for a view read off the graph, or drawn once.
|
|
346
372
|
runners_up: list[PerspectiveView] = field(default_factory=list)
|
|
373
|
+
#: The best-of-N draws that FAILED, in no particular order — so a host can
|
|
374
|
+
#: count them and tell a card chosen among three from one that was the only
|
|
375
|
+
#: draw left. Empty for a view read off the graph. A view with every draw
|
|
376
|
+
#: failed is never returned: the method raises the first failure instead.
|
|
377
|
+
failed_draws: list[FailedDrawView] = field(default_factory=list)
|
|
347
378
|
|
|
348
379
|
def without_terminology(self) -> ExplorationView:
|
|
349
380
|
return dataclasses.replace(
|
|
@@ -351,6 +382,7 @@ class ExplorationView:
|
|
|
351
382
|
perspectives=[p.without_terminology() for p in self.perspectives],
|
|
352
383
|
nexus_hash=None,
|
|
353
384
|
runners_up=[p.without_terminology() for p in self.runners_up],
|
|
385
|
+
failed_draws=[f.without_terminology() for f in self.failed_draws],
|
|
354
386
|
)
|
|
355
387
|
|
|
356
388
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -20,6 +20,7 @@ from dialectical_framework.exceptions.provider_errors import ModelRefusal
|
|
|
20
20
|
from dialectical_framework.settings import Settings
|
|
21
21
|
from dialectical_framework.utils.format_compat import (
|
|
22
22
|
learn_format_mode_from_error,
|
|
23
|
+
structured_output_format,
|
|
23
24
|
with_format_compat,
|
|
24
25
|
)
|
|
25
26
|
from dialectical_framework.utils.thinking_compat import (
|
|
@@ -381,7 +382,9 @@ class BedrockAnthropicProvider(AnthropicProvider):
|
|
|
381
382
|
5.5); see format_compat. Encoding happens here, BEFORE the request is
|
|
382
383
|
built, because the mode decides the request's shape — tools and
|
|
383
384
|
tool_choice for one, system instructions for the other — and the
|
|
384
|
-
decoded response's parser follows the resolved format.
|
|
385
|
+
decoded response's parser follows the resolved format. A JSON-mode
|
|
386
|
+
call to such a model also carries its schema as a structured output
|
|
387
|
+
(`output_config.format`, see `structured_output_format`). Earlier turns'
|
|
385
388
|
thinking blocks are dropped here too, for a model that binds them to
|
|
386
389
|
their prefix (see `without_earlier_turn_thinking`).
|
|
387
390
|
|
|
@@ -411,6 +414,16 @@ class BedrockAnthropicProvider(AnthropicProvider):
|
|
|
411
414
|
)
|
|
412
415
|
if compatible is not format and "thinking" not in kwargs:
|
|
413
416
|
kwargs["thinking"] = {"type": "disabled"}
|
|
417
|
+
# A JSON-mode call to a model whose structured calls go in JSON mode
|
|
418
|
+
# is constrained to its schema (`output_config.format`): JSON asked for
|
|
419
|
+
# in prose came back with trailing commas often enough to cost a whole
|
|
420
|
+
# re-ask per 2.5 cards on Sonnet 5.5 (see format_compat). The thinking
|
|
421
|
+
# layer merges its `effort` into the same `output_config` later.
|
|
422
|
+
constraint = structured_output_format(model_name, compatible)
|
|
423
|
+
if constraint is not None:
|
|
424
|
+
output_config = dict(kwargs.get("output_config") or {})
|
|
425
|
+
output_config["format"] = constraint
|
|
426
|
+
kwargs["output_config"] = output_config
|
|
414
427
|
_fix_cache_breakpoints(kwargs)
|
|
415
428
|
return input_messages, resolved_format, kwargs
|
|
416
429
|
|
|
@@ -23,6 +23,32 @@ that accept both. It parses as reliably on a DTO-shaped call and costs less
|
|
|
23
23
|
prefill (`probe_format_mode_thinking.py`), but the framework's measured figures
|
|
24
24
|
were taken on forced tool use, so switching every model is a measurement, not
|
|
25
25
|
a compatibility fix.
|
|
26
|
+
|
|
27
|
+
**A JSON-mode call to such a model is also sent as a structured output**
|
|
28
|
+
(`output_config.format`, a JSON-schema constraint on the reply; since
|
|
29
|
+
2026-10-09). JSON mode alone asks for JSON and gets prose-shaped JSON back
|
|
30
|
+
often enough to cost whole calls: a host measured 32 parse re-asks in 80 cards
|
|
31
|
+
on Sonnet 5.5 (25 on `TransformationSketchDto`, 7 on `ViewSketchDto` —
|
|
32
|
+
trailing commas, invalid JSON), each a full extra generation on the
|
|
33
|
+
framework's parse ladder. The constraint removes the class; Bedrock takes it
|
|
34
|
+
through the client the framework uses on Sonnet 5, Sonnet 5.5 and Opus 5.5,
|
|
35
|
+
with every thinking shape the framework sends and with the real DTO schemas
|
|
36
|
+
(`tests/e2e/probe_structured_outputs.py`). Applied to the SAME models that
|
|
37
|
+
refuse forced tool use — the ones whose structured calls go in JSON mode in
|
|
38
|
+
the first place, explicitly (`format_mode="json"`) or by substitution — and
|
|
39
|
+
to no other: Sonnet 5 / Opus 5 took it too in the probe, but every judged
|
|
40
|
+
figure there was taken without it, so widening it is a measurement.
|
|
41
|
+
|
|
42
|
+
**The constraint changes what is written, not only how it parses.** Under it
|
|
43
|
+
the reply is one compact line with terser texts (`tests/e2e/
|
|
44
|
+
probe_structured_wire.py`), and `TransformationSketch`'s S- came back as the
|
|
45
|
+
two traps in turn: a distinct third failure 42% against 57% unconstrained on
|
|
46
|
+
Sonnet 5.5 (100 pairs, +15 clear of noise; the first app saw 63% → 33-41%),
|
|
47
|
+
while Ac-/Re- validity rose. The repair was the prompt, not the constraint:
|
|
48
|
+
`SYNTHESIS_SHAPE` names the in-turn forms since 2026-10-09 and S- is back at
|
|
49
|
+
57% with the constraint on (`tests/e2e/probe_structured_s_minus.py`, the gate
|
|
50
|
+
for this seam on the transformation layer). A judged figure taken on a
|
|
51
|
+
forced-tool model does not transfer to the constrained call by itself.
|
|
26
52
|
"""
|
|
27
53
|
|
|
28
54
|
from __future__ import annotations
|
|
@@ -31,8 +57,10 @@ import logging
|
|
|
31
57
|
import re
|
|
32
58
|
from typing import Any, Optional, get_origin
|
|
33
59
|
|
|
60
|
+
from anthropic.lib._parse._transform import transform_schema
|
|
34
61
|
from mirascope import llm
|
|
35
62
|
from mirascope.llm.formatting.format import Format
|
|
63
|
+
from pydantic import BaseModel
|
|
36
64
|
|
|
37
65
|
logger = logging.getLogger(__name__)
|
|
38
66
|
|
|
@@ -131,6 +159,29 @@ def learn_format_mode_from_error(
|
|
|
131
159
|
return True
|
|
132
160
|
|
|
133
161
|
|
|
162
|
+
def structured_output_format(model_name: str, format: Any) -> Optional[dict[str, Any]]:
|
|
163
|
+
"""The ``output_config.format`` for this request, or None when it gets none.
|
|
164
|
+
|
|
165
|
+
Given the format AS RESOLVED for the model (after `with_format_compat`):
|
|
166
|
+
a `Format` in JSON mode on a model whose structured calls go in JSON mode
|
|
167
|
+
(`refuses_forced_tool_use`) gets a ``json_schema`` constraint on the reply;
|
|
168
|
+
everything else — forced tool use, parser mode, a primitive or an output
|
|
169
|
+
parser, a model that keeps forced tool use — gets None and goes as it
|
|
170
|
+
always did. The schema is the SDK's own strict transform of the DTO
|
|
171
|
+
(``additionalProperties: false`` on every object, the constraints the
|
|
172
|
+
grammar cannot hold moved into descriptions), the same one
|
|
173
|
+
``messages.parse`` would send.
|
|
174
|
+
"""
|
|
175
|
+
if format is None or not refuses_forced_tool_use(model_name):
|
|
176
|
+
return None
|
|
177
|
+
if not isinstance(format, Format) or format.mode != JSON:
|
|
178
|
+
return None
|
|
179
|
+
formattable = format.formattable
|
|
180
|
+
if not (isinstance(formattable, type) and issubclass(formattable, BaseModel)):
|
|
181
|
+
return None
|
|
182
|
+
return {"type": "json_schema", "schema": transform_schema(formattable)}
|
|
183
|
+
|
|
184
|
+
|
|
134
185
|
def reset_learned_format_modes() -> None:
|
|
135
186
|
"""Test seam — the learned map is process-global by design."""
|
|
136
187
|
_LEARNED.clear()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dialectical_framework-2.0.7 → dialectical_framework-2.0.9}/src/dialectical_framework/agents/apps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|