dialectical-framework 2.0.4__tar.gz → 2.0.6__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.
Files changed (230) hide show
  1. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/PKG-INFO +1 -1
  2. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/pyproject.toml +1 -1
  3. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/transformation_generation.py +2 -2
  4. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/transformation_sketch.py +14 -12
  5. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/dialectical_reasoning.py +38 -5
  6. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/settings.py +15 -0
  7. dialectical_framework-2.0.6/src/dialectical_framework/settings_context.py +104 -0
  8. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/LICENSE +0 -0
  9. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/PATENTS +0 -0
  10. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/README.md +0 -0
  11. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/__init__.py +0 -0
  12. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/__init__.py +0 -0
  13. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/__init__.py +0 -0
  14. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/advisor.py +0 -0
  15. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/build_policy.py +0 -0
  16. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/migration.py +0 -0
  17. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/reply_hygiene.py +0 -0
  18. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/system_prompts.py +0 -0
  19. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/__init__.py +0 -0
  20. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/anchor.py +0 -0
  21. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/deepen.py +0 -0
  22. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/explore.py +0 -0
  23. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/ingest.py +0 -0
  24. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/note.py +0 -0
  25. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/record_decision.py +0 -0
  26. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/scoped.py +0 -0
  27. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/advisor/tools/sync.py +0 -0
  28. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/agent_context.py +0 -0
  29. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/__init__.py +0 -0
  30. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/analyst.py +0 -0
  31. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/__init__.py +0 -0
  32. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/anchor_theses.py +0 -0
  33. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/edit_perspective.py +0 -0
  34. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/expand_polarities.py +0 -0
  35. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/find_polarities.py +0 -0
  36. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/introduce_polarity.py +0 -0
  37. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/sketch_tetrad.py +0 -0
  38. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/skills/surface_theses.py +0 -0
  39. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/system_prompts.py +0 -0
  40. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/tools/__init__.py +0 -0
  41. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/analyst/tools/place_statement.py +0 -0
  42. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/app_spec.py +0 -0
  43. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/apps.py +0 -0
  44. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/consultant/__init__.py +0 -0
  45. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/consultant/consultant.py +0 -0
  46. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/conversation_facilitator.py +0 -0
  47. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/execution_report.py +0 -0
  48. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/__init__.py +0 -0
  49. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/explorer.py +0 -0
  50. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/skills/__init__.py +0 -0
  51. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/skills/build_wheels.py +0 -0
  52. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/skills/explore_transformations.py +0 -0
  53. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/skills/generate_synthesis.py +0 -0
  54. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/system_prompts.py +0 -0
  55. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/tools/__init__.py +0 -0
  56. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/tools/create_nexus.py +0 -0
  57. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/tools/expand_nexus.py +0 -0
  58. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/tools/generate_synthesis.py +0 -0
  59. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/explorer/tools/present_exploration.py +0 -0
  60. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/__init__.py +0 -0
  61. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/__init__.py +0 -0
  62. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/add_input.py +0 -0
  63. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/audit_feasibility.py +0 -0
  64. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/create_dx_input.py +0 -0
  65. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/digest_input.py +0 -0
  66. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/discard.py +0 -0
  67. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/get_schema.py +0 -0
  68. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/inspect_node.py +0 -0
  69. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/present_analysis.py +0 -0
  70. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/query_graph.py +0 -0
  71. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/read_digest.py +0 -0
  72. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/orchestrator/tools/read_input.py +0 -0
  73. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/reasonable_concern.py +0 -0
  74. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/stream_events.py +0 -0
  75. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/toolsets.py +0 -0
  76. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/agents/turn_timing.py +0 -0
  77. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/__init__.py +0 -0
  78. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/ac_re_taxonomy.py +0 -0
  79. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/action_extraction.py +0 -0
  80. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/add_input.py +0 -0
  81. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/ai_dto/__init__.py +0 -0
  82. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/ai_dto/statement_dto.py +0 -0
  83. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/ai_dto/statements_deck_dto.py +0 -0
  84. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/antithesis_classification.py +0 -0
  85. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/antithesis_extraction.py +0 -0
  86. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/antithetical_thesis_detection.py +0 -0
  87. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/aspect_classification.py +0 -0
  88. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/aspect_generation.py +0 -0
  89. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/build_status.py +0 -0
  90. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/__init__.py +0 -0
  91. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/causality_estimator.py +0 -0
  92. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/causality_estimator_balanced.py +0 -0
  93. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/causality_estimator_criteria.py +0 -0
  94. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/causality_estimator_desirable.py +0 -0
  95. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/causality_estimator_feasible.py +0 -0
  96. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/causality_estimator_realistic.py +0 -0
  97. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/causality_normalizer.py +0 -0
  98. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality/estimator_resolver.py +0 -0
  99. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/causality_estimation.py +0 -0
  100. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/control_statements_check.py +0 -0
  101. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/create_dx_input.py +0 -0
  102. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/create_nexus.py +0 -0
  103. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/decision_coherence_check.py +0 -0
  104. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/decision_confirmation_check.py +0 -0
  105. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/diagonal_oppositions_check.py +0 -0
  106. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/dialectical_context.py +0 -0
  107. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/discard.py +0 -0
  108. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/display_text_edit.py +0 -0
  109. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/expand_nexus.py +0 -0
  110. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/perspective_combination.py +0 -0
  111. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/perspective_validation.py +0 -0
  112. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/positive_ac_re_apex_derivation.py +0 -0
  113. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/record_decision.py +0 -0
  114. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/scoring_scales.py +0 -0
  115. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/source_digest.py +0 -0
  116. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/statement_classification.py +0 -0
  117. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/statement_deduplication.py +0 -0
  118. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/statement_headline.py +0 -0
  119. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/statement_placement.py +0 -0
  120. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/synthesis_generation.py +0 -0
  121. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/tetrad_candidates.py +0 -0
  122. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/tetrad_grounding.py +0 -0
  123. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/tetrad_sketch.py +0 -0
  124. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/thesis_extraction.py +0 -0
  125. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/transformation_audit.py +0 -0
  126. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/concerns/view_sketch.py +0 -0
  127. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/enums/__init__.py +0 -0
  128. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/enums/causality_preset.py +0 -0
  129. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/enums/di.py +0 -0
  130. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/events/__init__.py +0 -0
  131. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/events/graph_event.py +0 -0
  132. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/events/graph_event_bus.py +0 -0
  133. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/events/progress_event.py +0 -0
  134. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/exceptions/__init__.py +0 -0
  135. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/exceptions/node_errors.py +0 -0
  136. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/exceptions/resolver_errors.py +0 -0
  137. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/__init__.py +0 -0
  138. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/composite_input_resolver.py +0 -0
  139. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/dialexity_input_resolver.py +0 -0
  140. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/estimation_manager.py +0 -0
  141. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/mixins/__init__.py +0 -0
  142. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/mixins/incremental_build_mixin.py +0 -0
  143. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/mixins/intent_mixin.py +0 -0
  144. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/mixins/persistable_mixin.py +0 -0
  145. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/__init__.py +0 -0
  146. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/assessable_entity.py +0 -0
  147. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/base_node.py +0 -0
  148. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/case.py +0 -0
  149. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/cycle.py +0 -0
  150. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/decision.py +0 -0
  151. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/estimation.py +0 -0
  152. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/ideas.py +0 -0
  153. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/input.py +0 -0
  154. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/nexus.py +0 -0
  155. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/note.py +0 -0
  156. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/perspective.py +0 -0
  157. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/polarity.py +0 -0
  158. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/rationale.py +0 -0
  159. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/statement.py +0 -0
  160. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/synthesis.py +0 -0
  161. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/transformation.py +0 -0
  162. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/transition.py +0 -0
  163. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/nodes/wheel.py +0 -0
  164. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationship_manager.py +0 -0
  165. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/__init__.py +0 -0
  166. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/action_reflection_relationship.py +0 -0
  167. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/belongs_to_cycle_relationship.py +0 -0
  168. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/belongs_to_nexus_relationship.py +0 -0
  169. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/changed_to_relationship.py +0 -0
  170. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/contradiction_of_relationship.py +0 -0
  171. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/critiques_relationship.py +0 -0
  172. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/distilled_to_relationship.py +0 -0
  173. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/estimates_relationship.py +0 -0
  174. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/explains_relationship.py +0 -0
  175. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/grounded_in_relationship.py +0 -0
  176. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/has_input_relationship.py +0 -0
  177. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/has_statement_relationship.py +0 -0
  178. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/has_wheel_relationship.py +0 -0
  179. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/immutable_structure.py +0 -0
  180. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/is_source_of_relationship.py +0 -0
  181. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/is_target_of_relationship.py +0 -0
  182. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/negative_side_of_relationship.py +0 -0
  183. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/opposite_direction_relationship.py +0 -0
  184. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/opposite_of_relationship.py +0 -0
  185. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/polarity_relationship.py +0 -0
  186. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/positive_side_of_relationship.py +0 -0
  187. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/provides_relationship.py +0 -0
  188. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/relationships/synthesis_of_relationship.py +0 -0
  189. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/rendering.py +0 -0
  190. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/__init__.py +0 -0
  191. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/case_repository.py +0 -0
  192. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/cycle_repository.py +0 -0
  193. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/decision_repository.py +0 -0
  194. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/input_repository.py +0 -0
  195. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/nexus_repository.py +0 -0
  196. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/node_repository.py +0 -0
  197. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/note_repository.py +0 -0
  198. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/perspective_repository.py +0 -0
  199. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/polarity_repository.py +0 -0
  200. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/schema_repository.py +0 -0
  201. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/statement_repository.py +0 -0
  202. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/transformation_repository.py +0 -0
  203. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/repositories/wheel_repository.py +0 -0
  204. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/scope_context.py +0 -0
  205. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/verbatim_input_resolver.py +0 -0
  206. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/views.py +0 -0
  207. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/wheel_segment.py +0 -0
  208. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/graph/wheel_segment_polar_pair.py +0 -0
  209. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/protocols/__init__.py +0 -0
  210. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/protocols/has_config.py +0 -0
  211. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/protocols/input_resolver.py +0 -0
  212. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/py.typed +0 -0
  213. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/__init__.py +0 -0
  214. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/async_drain.py +0 -0
  215. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/bedrock_provider.py +0 -0
  216. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/call_census.py +0 -0
  217. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/chunking.py +0 -0
  218. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/concurrency.py +0 -0
  219. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/dc_replace.py +0 -0
  220. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/decompose_probability_uniformly.py +0 -0
  221. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/edge_context.py +0 -0
  222. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/effect_logger.py +0 -0
  223. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/input_context.py +0 -0
  224. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/order_transitions.py +0 -0
  225. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/progress.py +0 -0
  226. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/retry_accounting.py +0 -0
  227. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/sequence_generation.py +0 -0
  228. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/thinking_compat.py +0 -0
  229. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/src/dialectical_framework/utils/use_brain.py +0 -0
  230. {dialectical_framework-2.0.4 → dialectical_framework-2.0.6}/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.4
3
+ Version: 2.0.6
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.4"
3
+ version = "2.0.6"
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"
@@ -251,8 +251,8 @@ class ReSideCompletionDto(BaseModel):
251
251
  # Re- fields. The weak position of the staged generator, measured
252
252
  # 2026-10-06 (`tests/e2e/probe_staged_endpoints.py`, 102 Transformations on
253
253
  # 17 one-tension wheels, read with the theory-faithful `TransitionVerdict`):
254
- # Re- valid 49% against Ac- 70%, and it is the LANDING that fails (59%
255
- # land in T-; 27% valid on T->A edges). The prompt asked for "the
254
+ # Re- valid 42% against Ac- 71% (the corrected auditor, 2026-10-07), and it
255
+ # is the LANDING that fails (58% land in T-; 20% valid on T->A edges). The prompt asked for "the
256
256
  # reflection without the action", which the writer read as "keep watching,
257
257
  # do nothing" — and wherever A is the passive pole, doing nothing is A's
258
258
  # trap, not T's. Two `re_minus_from` / `re_minus_into` fields ahead of these
@@ -145,24 +145,26 @@ class TransformationSketchDto(BaseModel):
145
145
  `ac_minus_from` / `ac_minus_into` (and the Re- pair) come BEFORE their
146
146
  line on purpose, and they are the measured fix, not decoration. Stating the
147
147
  ends in the definition does not make the writer use them: with the text
148
- alone a valid Ac- (lands in A-, is the action degenerated, does not start
149
- from A+) came back in 30% of drafts and a valid Re- in 26%, because "the
148
+ alone a valid Ac- (lands in A-, is the action degenerated, the action
149
+ causing the landing) came back in 32% of drafts and a valid Re- in 30%, because "the
150
150
  action without the reflection" reads like the tetrad's own "T+ without A+
151
151
  yields T-" and the line lands on T's OWN trap. Making the writer name the
152
- start and the landing first moved them to 56% / 62% (paired +26 / +36, both
153
- clearing noise), S- unchanged within noise (`tests/e2e/probe_transformation_sketch.py`,
152
+ start and the landing first moved them to 62% / 64% (paired +30 / +34, both
153
+ clearing noise), S- unchanged (third failure 75% / 75%; crossed pairwise 57-56 over 113 decided pairs) (`tests/e2e/probe_transformation_sketch.py`,
154
154
  25 tetrads x 2 reps, 2026-10-06, re-read by `probe_transition_rescore.py`
155
- with the auditor three blind theory reviewers agreed with on 51/52 clear
156
- cases; the app's stricter auditor had read 22/18% -> 60/58%). A host may
155
+ with the auditor two blind theory panels agree with on 54/60 clear cases;
156
+ the app's stricter auditor had read 22/18% -> 60/58%). A host may
157
157
  ignore the four scaffold fields; their job is done by the time the line is
158
158
  written.
159
159
 
160
- The price to watch, OPEN: the ends rose and the makeup reads dipped
161
- ("Re- is the reflection itself" 94% -> 88% here, within noise; the first
162
- app's pill measured 98% -> 80% in its own voice). A line written to land
163
- on A+ -> T- can stop reading as the reflection overdone. If a host's
164
- makeup read keeps falling, that is a trade to measure on this probe, not
165
- a reason to drop the fields by eye.
160
+ The price, measured: the ends rose and the makeup reads dip a little — a
161
+ line written to land on its trap can stop reading as the operation
162
+ overdone. "Re- is the reflection itself" 94% -> 88% (within noise) in the
163
+ first run, "Ac- is the action itself" 100% -> 93% (-7, clears) in the
164
+ second (2026-10-07, 100 pairs); the first app's pill saw Re- 98% -> 80% in
165
+ its own voice. Against +30 / +34 on validity it is a good trade; if a
166
+ host's makeup read keeps falling, measure it on this probe, do not drop the
167
+ fields by eye.
166
168
 
167
169
  Hosts SUBCLASS it to add their own person-facing fields after these, so
168
170
  the derivation and the words that rest on it stay one call: the first
@@ -13,9 +13,30 @@ from dialectical_framework.graph.composite_input_resolver import CompositeInputR
13
13
  from dialectical_framework.agents.execution_report import ExecutionReport
14
14
  from dialectical_framework.events.graph_event_bus import GraphEventBus
15
15
  from dialectical_framework.graph.scope_context import get_current_sid
16
+ from dialectical_framework.settings_context import (get_base_settings,
17
+ get_current_settings,
18
+ set_base_settings)
16
19
  from dialectical_framework.utils import progress
17
20
 
18
21
 
22
+ class _PerRequestSettings(providers.Callable):
23
+ """`settings` resolved per request (`settings_context`), and NOT overridable.
24
+
25
+ An override would replace this provider with one fixed object and silently
26
+ put the whole process back on a single settings slot — every concurrent
27
+ request answering on whichever settings were set last. That was the only
28
+ per-user mechanism before 2026-10-07 and is the defect this exists to end,
29
+ so it fails loudly and names the replacement.
30
+ """
31
+
32
+ def override(self, provider): # noqa: D102 - see the class docstring
33
+ raise RuntimeError(
34
+ "container.settings cannot be overridden: it is resolved per request. "
35
+ "Wrap the calls in `with using_settings(settings):` "
36
+ "(dialectical_framework.settings_context) instead."
37
+ )
38
+
39
+
19
40
  class DialecticalReasoning(containers.DeclarativeContainer):
20
41
  """
21
42
  Main DI container for the Dialectical Reasoning Framework.
@@ -29,9 +50,16 @@ class DialecticalReasoning(containers.DeclarativeContainer):
29
50
 
30
51
  @classmethod
31
52
  def setup(cls, settings: Settings) -> 'DialecticalReasoning':
32
- """Create a new container instance with user-specific settings."""
53
+ """Create the container with the process's BASE settings.
54
+
55
+ The base is what every read sees outside a `using_settings(...)` scope,
56
+ and the only source of the read-once fields (graph connection, provider
57
+ timeout, effect log). Per-person settings in a server are
58
+ `using_settings` around each request, never another `setup()` and never
59
+ an override (`settings_context`).
60
+ """
33
61
  container = cls()
34
- container.settings.override(settings)
62
+ set_base_settings(settings)
35
63
  ExecutionReport.set_event_bus(container.event_bus())
36
64
  # Same bus object, different channel (`sid:progress`). Wired separately
37
65
  # because progress is not a graph mutation — see `utils/progress.py`.
@@ -41,8 +69,10 @@ class DialecticalReasoning(containers.DeclarativeContainer):
41
69
  ExecutionReport.set_effect_logger(EffectLogger(settings.effect_log_dir))
42
70
  return container
43
71
 
44
- # It will be the same settings for all services in the container
45
- settings = providers.Dependency(instance_of=Settings)
72
+ # Per request: the innermost `using_settings(...)`, else the base (`settings_context`).
73
+ settings = _PerRequestSettings(get_current_settings)
74
+ # The base alone, for what is built ONCE per process (the graph connection).
75
+ base_settings = providers.Callable(get_base_settings)
46
76
 
47
77
  @staticmethod
48
78
  def _create_graph_db(settings: Settings) -> Union[Memgraph, Neo4j]:
@@ -228,9 +258,12 @@ class DialecticalReasoning(containers.DeclarativeContainer):
228
258
  )
229
259
 
230
260
  # Graph database (Memgraph or Neo4j) for graph-native dialectical structures
261
+ # Built from the BASE, never the per-request settings: the connection is one
262
+ # Singleton per process, so whichever request first resolved it would
263
+ # otherwise decide the database for everyone.
231
264
  graph_db: providers.Singleton[Union[Memgraph, Neo4j]] = providers.Singleton(
232
265
  _create_graph_db,
233
- settings=settings
266
+ settings=base_settings
234
267
  )
235
268
 
236
269
  # -- Content Resolution --
@@ -30,6 +30,21 @@ def _env_thinking_level() -> dict[str, Optional[str]]:
30
30
 
31
31
 
32
32
  class Settings(BaseModel):
33
+ """Framework configuration, in TWO TIERS by when a field is read.
34
+
35
+ Per request (read at call time, so `with using_settings(...)` from
36
+ `dialectical_framework.settings_context` scopes them to one asyncio context):
37
+ `ai_model`, `reasoning_model`, and everything read through
38
+ `SettingsAware.settings` — word limits, the thinking level, the Advisor's
39
+ floors and caps, the audit switches.
40
+
41
+ Per process (read once, from the base `DialecticalReasoning.setup()` installs;
42
+ a value inside `using_settings` has no effect): `graph_db_*` (the connection is
43
+ a Singleton), `llm_connect_timeout_s` (the provider is registered once),
44
+ `effect_log_dir` (installed in `setup`). `DIALEXITY_MAX_CONCURRENT_LLM_CALLS`
45
+ is not a field at all: an env var behind one process-wide semaphore.
46
+ """
47
+
33
48
  model_config = ConfigDict(
34
49
  arbitrary_types_allowed=True,
35
50
  )
@@ -0,0 +1,104 @@
1
+ """
2
+ Settings per request: a ContextVar over a process base, the way `sid` works.
3
+
4
+ WHY
5
+ ===
6
+ The container's `settings` used to be ONE slot (`providers.Dependency`, filled by
7
+ `DialecticalReasoning.setup`). A host serving many people from one process could
8
+ only change a person's settings with `container.settings.override(...)`, which
9
+ swaps the slot for EVERY call in flight: two concurrent requests answered on each
10
+ other's model, thinking level, word limits. The first app met it with a
11
+ process-wide lock around every framework call, one card at a time (handoff from
12
+ alsotrue-app, 2026-10-06).
13
+
14
+ Now `settings` resolves through `get_current_settings()` on every read: the
15
+ innermost `using_settings(...)` of the current asyncio context, else the base
16
+ `setup()` installed. Every `Provide[DI.settings]` and every `SettingsAware.settings`
17
+ read goes through it unchanged.
18
+
19
+ from dialectical_framework.settings_context import using_settings
20
+
21
+ with using_settings(base.model_copy(update={"ai_model": person_model})):
22
+ reply = await consultant.chat(text) # this request, this model
23
+
24
+ `create_task` / `gather` copy the context, so the framework's own fan-out (best-of-N
25
+ draws, the coherence judge, the off-turn weave) runs on the settings of the turn
26
+ that started it. Composes with `scope(sid)`; the two stay separate on purpose
27
+ (`scope` is whose data, this is how to reason).
28
+
29
+ TWO TIERS, as the code already treats them (see `Settings`):
30
+ - read at call time, per request: `ai_model`, `reasoning_model`, everything read
31
+ through `SettingsAware.settings` (word limits, thinking level, the Advisor's
32
+ floors and caps, the audit switches);
33
+ - read ONCE per process, from the base only: `graph_db_*` (the connection is a
34
+ Singleton), `llm_connect_timeout_s` (the provider is registered once),
35
+ `effect_log_dir` (installed in `setup`). A value for these inside
36
+ `using_settings` has no effect, by construction, not by accident.
37
+
38
+ `container.settings.override(...)` RAISES: it would replace this provider with one
39
+ fixed object and silently put the whole process back on a single settings slot.
40
+ """
41
+
42
+ from __future__ import annotations
43
+
44
+ import contextvars
45
+ from typing import TYPE_CHECKING, Optional
46
+
47
+ if TYPE_CHECKING:
48
+ from dialectical_framework.settings import Settings
49
+
50
+ _base: Optional["Settings"] = None
51
+ _current: contextvars.ContextVar[Optional["Settings"]] = contextvars.ContextVar(
52
+ "current_settings", default=None
53
+ )
54
+
55
+
56
+ def set_base_settings(settings: Settings) -> None:
57
+ """The process default, installed by `DialecticalReasoning.setup()`. A later
58
+ `setup()` replaces it, as a second container always replaced the first."""
59
+ global _base
60
+ _base = settings
61
+
62
+
63
+ def get_base_settings() -> Settings:
64
+ """The process base. Raises when nothing called `setup()` — an unconfigured
65
+ process must fail loudly, not run on a default nobody chose."""
66
+ if _base is None:
67
+ raise RuntimeError(
68
+ "No settings installed: call DialecticalReasoning.setup(settings) "
69
+ "once per process before using the framework."
70
+ )
71
+ return _base
72
+
73
+
74
+ def get_current_settings() -> Settings:
75
+ """The innermost `using_settings` of this context, else the base. The DI
76
+ container's `settings` provider calls this on every resolution."""
77
+ return _current.get() or get_base_settings()
78
+
79
+
80
+ class _SettingsContextManager:
81
+ def __init__(self, settings: Settings) -> None:
82
+ self._settings = settings
83
+ self._token: Optional[contextvars.Token] = None
84
+
85
+ def __enter__(self) -> Settings:
86
+ self._token = _current.set(self._settings)
87
+ return self._settings
88
+
89
+ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
90
+ if self._token is not None:
91
+ _current.reset(self._token)
92
+
93
+
94
+ def using_settings(settings: Settings) -> _SettingsContextManager:
95
+ """Run framework calls inside this context on `settings` (HOST LAYER).
96
+
97
+ Async-safe: each asyncio task sees only what was set in its own context;
98
+ tasks created inside inherit it; code outside sees the base. Nesting: the
99
+ innermost wins and the outer is restored on exit. An explicit
100
+ `use_brain(ai_model=...)` still wins over both. Build the value from the base
101
+ (`get_base_settings().model_copy(update=...)`) so per-request choices do not
102
+ drop the deployment's own values.
103
+ """
104
+ return _SettingsContextManager(settings)