conscio 2.2.1__tar.gz → 2.2.2__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 (249) hide show
  1. {conscio-2.2.1 → conscio-2.2.2}/CHANGELOG.md +25 -0
  2. {conscio-2.2.1/conscio.egg-info → conscio-2.2.2}/PKG-INFO +4 -3
  3. {conscio-2.2.1 → conscio-2.2.2}/README.md +3 -2
  4. {conscio-2.2.1 → conscio-2.2.2}/conscio/__init__.py +1 -1
  5. conscio-2.2.2/conscio/agency/trial.py +97 -0
  6. {conscio-2.2.1 → conscio-2.2.2}/conscio/cli.py +64 -0
  7. {conscio-2.2.1 → conscio-2.2.2}/conscio/engine.py +63 -0
  8. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/quarantine.py +67 -1
  9. {conscio-2.2.1 → conscio-2.2.2/conscio.egg-info}/PKG-INFO +4 -3
  10. {conscio-2.2.1 → conscio-2.2.2}/conscio.egg-info/SOURCES.txt +5 -0
  11. conscio-2.2.2/tests/test_agency_trial.py +107 -0
  12. conscio-2.2.2/tests/test_cli_trial.py +55 -0
  13. conscio-2.2.2/tests/test_engine_trial.py +196 -0
  14. conscio-2.2.2/tests/test_quarantine_trial.py +109 -0
  15. {conscio-2.2.1 → conscio-2.2.2}/LICENSE +0 -0
  16. {conscio-2.2.1 → conscio-2.2.2}/MANIFEST.in +0 -0
  17. {conscio-2.2.1 → conscio-2.2.2}/conscio/__main__.py +0 -0
  18. {conscio-2.2.1 → conscio-2.2.2}/conscio/adapter_config.py +0 -0
  19. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/__init__.py +0 -0
  20. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/act.py +0 -0
  21. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/actor.py +0 -0
  22. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/adapter.py +0 -0
  23. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/adapters.py +0 -0
  24. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/breaker.py +0 -0
  25. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/contracts.py +0 -0
  26. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/fingerprint.py +0 -0
  27. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/gateway.py +0 -0
  28. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/grammar.py +0 -0
  29. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/host_act.py +0 -0
  30. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/ledger.py +0 -0
  31. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/loop.py +0 -0
  32. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/profiles.py +0 -0
  33. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/skeptic.py +0 -0
  34. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/skills.py +0 -0
  35. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/tools.py +0 -0
  36. {conscio-2.2.1 → conscio-2.2.2}/conscio/agency/trust.py +0 -0
  37. {conscio-2.2.1 → conscio-2.2.2}/conscio/auto_evolution.py +0 -0
  38. {conscio-2.2.1 → conscio-2.2.2}/conscio/axis_pack.py +0 -0
  39. {conscio-2.2.1 → conscio-2.2.2}/conscio/bench.py +0 -0
  40. {conscio-2.2.1 → conscio-2.2.2}/conscio/coherence.py +0 -0
  41. {conscio-2.2.1 → conscio-2.2.2}/conscio/content_layer.py +0 -0
  42. {conscio-2.2.1 → conscio-2.2.2}/conscio/content_store.py +0 -0
  43. {conscio-2.2.1 → conscio-2.2.2}/conscio/context_manager.py +0 -0
  44. {conscio-2.2.1 → conscio-2.2.2}/conscio/daemon.py +0 -0
  45. {conscio-2.2.1 → conscio-2.2.2}/conscio/dreaming.py +0 -0
  46. {conscio-2.2.1 → conscio-2.2.2}/conscio/event_bus.py +0 -0
  47. {conscio-2.2.1 → conscio-2.2.2}/conscio/goal_generator.py +0 -0
  48. {conscio-2.2.1 → conscio-2.2.2}/conscio/guards.py +0 -0
  49. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/__init__.py +0 -0
  50. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/config.py +0 -0
  51. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/model_test.py +0 -0
  52. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/providers.py +0 -0
  53. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/server.py +0 -0
  54. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/static/app.js +0 -0
  55. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/static/index.html +0 -0
  56. {conscio-2.2.1 → conscio-2.2.2}/conscio/hub/static/style.css +0 -0
  57. {conscio-2.2.1 → conscio-2.2.2}/conscio/inner_monologue.py +0 -0
  58. {conscio-2.2.1 → conscio-2.2.2}/conscio/mcp/__init__.py +0 -0
  59. {conscio-2.2.1 → conscio-2.2.2}/conscio/mcp/jsonrpc.py +0 -0
  60. {conscio-2.2.1 → conscio-2.2.2}/conscio/mcp/protocol.py +0 -0
  61. {conscio-2.2.1 → conscio-2.2.2}/conscio/mcp/schemas.py +0 -0
  62. {conscio-2.2.1 → conscio-2.2.2}/conscio/mcp/seen.py +0 -0
  63. {conscio-2.2.1 → conscio-2.2.2}/conscio/mcp/server.py +0 -0
  64. {conscio-2.2.1 → conscio-2.2.2}/conscio/meta_cognition.py +0 -0
  65. {conscio-2.2.1 → conscio-2.2.2}/conscio/metabolic.py +0 -0
  66. {conscio-2.2.1 → conscio-2.2.2}/conscio/migrate.py +0 -0
  67. {conscio-2.2.1 → conscio-2.2.2}/conscio/models.py +0 -0
  68. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/__init__.py +0 -0
  69. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/artifact.py +0 -0
  70. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/audit.py +0 -0
  71. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/catalog.py +0 -0
  72. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/cli.py +0 -0
  73. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/identity.py +0 -0
  74. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/importer.py +0 -0
  75. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/paths.py +0 -0
  76. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/publish.py +0 -0
  77. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/record.py +0 -0
  78. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/record_catalog.py +0 -0
  79. {conscio-2.2.1 → conscio-2.2.2}/conscio/noosphere/record_publish.py +0 -0
  80. {conscio-2.2.1 → conscio-2.2.2}/conscio/output_filter.py +0 -0
  81. {conscio-2.2.1 → conscio-2.2.2}/conscio/perception/__init__.py +0 -0
  82. {conscio-2.2.1 → conscio-2.2.2}/conscio/perception/agent_sensor.py +0 -0
  83. {conscio-2.2.1 → conscio-2.2.2}/conscio/perception/host_sensor.py +0 -0
  84. {conscio-2.2.1 → conscio-2.2.2}/conscio/perception/sensor.py +0 -0
  85. {conscio-2.2.1 → conscio-2.2.2}/conscio/plugins.py +0 -0
  86. {conscio-2.2.1 → conscio-2.2.2}/conscio/presets/__init__.py +0 -0
  87. {conscio-2.2.1 → conscio-2.2.2}/conscio/py.typed +0 -0
  88. {conscio-2.2.1 → conscio-2.2.2}/conscio/risk.py +0 -0
  89. {conscio-2.2.1 → conscio-2.2.2}/conscio/self_prompt.py +0 -0
  90. {conscio-2.2.1 → conscio-2.2.2}/conscio/semantic.py +0 -0
  91. {conscio-2.2.1 → conscio-2.2.2}/conscio/session_lifecycle.py +0 -0
  92. {conscio-2.2.1 → conscio-2.2.2}/conscio/session_rag.py +0 -0
  93. {conscio-2.2.1 → conscio-2.2.2}/conscio/session_rag_factory.py +0 -0
  94. {conscio-2.2.1 → conscio-2.2.2}/conscio/shard_engine.py +0 -0
  95. {conscio-2.2.1 → conscio-2.2.2}/conscio/structural.py +0 -0
  96. {conscio-2.2.1 → conscio-2.2.2}/conscio/structural_consent.py +0 -0
  97. {conscio-2.2.1 → conscio-2.2.2}/conscio/structural_drift.py +0 -0
  98. {conscio-2.2.1 → conscio-2.2.2}/conscio/timeutil.py +0 -0
  99. {conscio-2.2.1 → conscio-2.2.2}/conscio/token_tracker.py +0 -0
  100. {conscio-2.2.1 → conscio-2.2.2}/conscio/voice_preset.py +0 -0
  101. {conscio-2.2.1 → conscio-2.2.2}/conscio/workspace.py +0 -0
  102. {conscio-2.2.1 → conscio-2.2.2}/conscio/world_model.py +0 -0
  103. {conscio-2.2.1 → conscio-2.2.2}/conscio.egg-info/dependency_links.txt +0 -0
  104. {conscio-2.2.1 → conscio-2.2.2}/conscio.egg-info/entry_points.txt +0 -0
  105. {conscio-2.2.1 → conscio-2.2.2}/conscio.egg-info/requires.txt +0 -0
  106. {conscio-2.2.1 → conscio-2.2.2}/conscio.egg-info/top_level.txt +0 -0
  107. {conscio-2.2.1 → conscio-2.2.2}/pyproject.toml +0 -0
  108. {conscio-2.2.1 → conscio-2.2.2}/setup.cfg +0 -0
  109. {conscio-2.2.1 → conscio-2.2.2}/tests/test_adapter_config.py +0 -0
  110. {conscio-2.2.1 → conscio-2.2.2}/tests/test_adapter_config_api_key_env.py +0 -0
  111. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_act.py +0 -0
  112. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_act_immunity.py +0 -0
  113. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_actor.py +0 -0
  114. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_adapter.py +0 -0
  115. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_adapters_http.py +0 -0
  116. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_adversarial.py +0 -0
  117. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_arbiter.py +0 -0
  118. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_bench.py +0 -0
  119. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_breaker.py +0 -0
  120. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_contracts.py +0 -0
  121. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_engine_immunity.py +0 -0
  122. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_gateway.py +0 -0
  123. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_grammar.py +0 -0
  124. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_host_act.py +0 -0
  125. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_ledger.py +0 -0
  126. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_ledger_v201.py +0 -0
  127. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_loop.py +0 -0
  128. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_no_network.py +0 -0
  129. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_profiles.py +0 -0
  130. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_skeptic.py +0 -0
  131. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_skills.py +0 -0
  132. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_skills_wiring.py +0 -0
  133. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_state.py +0 -0
  134. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_tools.py +0 -0
  135. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_tools_manifest.py +0 -0
  136. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_trust.py +0 -0
  137. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agency_volition.py +0 -0
  138. {conscio-2.2.1 → conscio-2.2.2}/tests/test_agent_sensor.py +0 -0
  139. {conscio-2.2.1 → conscio-2.2.2}/tests/test_auto_evolution.py +0 -0
  140. {conscio-2.2.1 → conscio-2.2.2}/tests/test_awake.py +0 -0
  141. {conscio-2.2.1 → conscio-2.2.2}/tests/test_axis_pack.py +0 -0
  142. {conscio-2.2.1 → conscio-2.2.2}/tests/test_axis_pack_battery.py +0 -0
  143. {conscio-2.2.1 → conscio-2.2.2}/tests/test_cli.py +0 -0
  144. {conscio-2.2.1 → conscio-2.2.2}/tests/test_coherence.py +0 -0
  145. {conscio-2.2.1 → conscio-2.2.2}/tests/test_coherence_engine_integration.py +0 -0
  146. {conscio-2.2.1 → conscio-2.2.2}/tests/test_coherence_state.py +0 -0
  147. {conscio-2.2.1 → conscio-2.2.2}/tests/test_consciousness.py +0 -0
  148. {conscio-2.2.1 → conscio-2.2.2}/tests/test_content_layer.py +0 -0
  149. {conscio-2.2.1 → conscio-2.2.2}/tests/test_content_layer_manager.py +0 -0
  150. {conscio-2.2.1 → conscio-2.2.2}/tests/test_content_store.py +0 -0
  151. {conscio-2.2.1 → conscio-2.2.2}/tests/test_content_store_battery.py +0 -0
  152. {conscio-2.2.1 → conscio-2.2.2}/tests/test_content_store_r05.py +0 -0
  153. {conscio-2.2.1 → conscio-2.2.2}/tests/test_contradiction_detector.py +0 -0
  154. {conscio-2.2.1 → conscio-2.2.2}/tests/test_daemon.py +0 -0
  155. {conscio-2.2.1 → conscio-2.2.2}/tests/test_daemon_battery.py +0 -0
  156. {conscio-2.2.1 → conscio-2.2.2}/tests/test_daemon_config.py +0 -0
  157. {conscio-2.2.1 → conscio-2.2.2}/tests/test_daemon_heartbeat.py +0 -0
  158. {conscio-2.2.1 → conscio-2.2.2}/tests/test_daemon_structure_sync.py +0 -0
  159. {conscio-2.2.1 → conscio-2.2.2}/tests/test_dream_coherence.py +0 -0
  160. {conscio-2.2.1 → conscio-2.2.2}/tests/test_dream_distill.py +0 -0
  161. {conscio-2.2.1 → conscio-2.2.2}/tests/test_dream_reconcile.py +0 -0
  162. {conscio-2.2.1 → conscio-2.2.2}/tests/test_dreaming.py +0 -0
  163. {conscio-2.2.1 → conscio-2.2.2}/tests/test_dreaming_friction.py +0 -0
  164. {conscio-2.2.1 → conscio-2.2.2}/tests/test_durable_guards.py +0 -0
  165. {conscio-2.2.1 → conscio-2.2.2}/tests/test_embedder.py +0 -0
  166. {conscio-2.2.1 → conscio-2.2.2}/tests/test_engine_advisory.py +0 -0
  167. {conscio-2.2.1 → conscio-2.2.2}/tests/test_engine_host_act.py +0 -0
  168. {conscio-2.2.1 → conscio-2.2.2}/tests/test_engine_init.py +0 -0
  169. {conscio-2.2.1 → conscio-2.2.2}/tests/test_engine_meta_reflect.py +0 -0
  170. {conscio-2.2.1 → conscio-2.2.2}/tests/test_engine_propose.py +0 -0
  171. {conscio-2.2.1 → conscio-2.2.2}/tests/test_engine_recall.py +0 -0
  172. {conscio-2.2.1 → conscio-2.2.2}/tests/test_event_bus.py +0 -0
  173. {conscio-2.2.1 → conscio-2.2.2}/tests/test_event_bus_act_result.py +0 -0
  174. {conscio-2.2.1 → conscio-2.2.2}/tests/test_event_bus_purge.py +0 -0
  175. {conscio-2.2.1 → conscio-2.2.2}/tests/test_examples.py +0 -0
  176. {conscio-2.2.1 → conscio-2.2.2}/tests/test_goal_provenance.py +0 -0
  177. {conscio-2.2.1 → conscio-2.2.2}/tests/test_goal_source.py +0 -0
  178. {conscio-2.2.1 → conscio-2.2.2}/tests/test_host_sensor.py +0 -0
  179. {conscio-2.2.1 → conscio-2.2.2}/tests/test_hub_config.py +0 -0
  180. {conscio-2.2.1 → conscio-2.2.2}/tests/test_hub_model_test.py +0 -0
  181. {conscio-2.2.1 → conscio-2.2.2}/tests/test_hub_providers.py +0 -0
  182. {conscio-2.2.1 → conscio-2.2.2}/tests/test_hub_server.py +0 -0
  183. {conscio-2.2.1 → conscio-2.2.2}/tests/test_loop_failure_brake.py +0 -0
  184. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_adapter_parity.py +0 -0
  185. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_battery.py +0 -0
  186. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_fuzz.py +0 -0
  187. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_jsonrpc.py +0 -0
  188. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_package.py +0 -0
  189. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_protocol.py +0 -0
  190. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_schemas.py +0 -0
  191. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_seen.py +0 -0
  192. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_server.py +0 -0
  193. {conscio-2.2.1 → conscio-2.2.2}/tests/test_mcp_server_cli.py +0 -0
  194. {conscio-2.2.1 → conscio-2.2.2}/tests/test_metabolic.py +0 -0
  195. {conscio-2.2.1 → conscio-2.2.2}/tests/test_migrate.py +0 -0
  196. {conscio-2.2.1 → conscio-2.2.2}/tests/test_model_auto_detect.py +0 -0
  197. {conscio-2.2.1 → conscio-2.2.2}/tests/test_model_offline_default.py +0 -0
  198. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_artifact.py +0 -0
  199. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_audit.py +0 -0
  200. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_audit_integration.py +0 -0
  201. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_catalog.py +0 -0
  202. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_cli.py +0 -0
  203. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_engine_free.py +0 -0
  204. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_fingerprint.py +0 -0
  205. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_identity.py +0 -0
  206. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_importer.py +0 -0
  207. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_integration.py +0 -0
  208. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_parity.py +0 -0
  209. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_paths.py +0 -0
  210. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_publish.py +0 -0
  211. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_quarantine.py +0 -0
  212. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_record.py +0 -0
  213. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_record_catalog.py +0 -0
  214. {conscio-2.2.1 → conscio-2.2.2}/tests/test_noosphere_record_publish.py +0 -0
  215. {conscio-2.2.1 → conscio-2.2.2}/tests/test_ontological_semantic.py +0 -0
  216. {conscio-2.2.1 → conscio-2.2.2}/tests/test_output_filter.py +0 -0
  217. {conscio-2.2.1 → conscio-2.2.2}/tests/test_output_filter_stages.py +0 -0
  218. {conscio-2.2.1 → conscio-2.2.2}/tests/test_packaging.py +0 -0
  219. {conscio-2.2.1 → conscio-2.2.2}/tests/test_perception.py +0 -0
  220. {conscio-2.2.1 → conscio-2.2.2}/tests/test_perf_reflection.py +0 -0
  221. {conscio-2.2.1 → conscio-2.2.2}/tests/test_plugins.py +0 -0
  222. {conscio-2.2.1 → conscio-2.2.2}/tests/test_recursive_loop_integration.py +0 -0
  223. {conscio-2.2.1 → conscio-2.2.2}/tests/test_risk.py +0 -0
  224. {conscio-2.2.1 → conscio-2.2.2}/tests/test_self_prompt.py +0 -0
  225. {conscio-2.2.1 → conscio-2.2.2}/tests/test_self_prompt_state.py +0 -0
  226. {conscio-2.2.1 → conscio-2.2.2}/tests/test_semantic_dedup.py +0 -0
  227. {conscio-2.2.1 → conscio-2.2.2}/tests/test_semantic_engine.py +0 -0
  228. {conscio-2.2.1 → conscio-2.2.2}/tests/test_semantic_reconcile_integration.py +0 -0
  229. {conscio-2.2.1 → conscio-2.2.2}/tests/test_session_lifecycle.py +0 -0
  230. {conscio-2.2.1 → conscio-2.2.2}/tests/test_session_lifecycle_battery.py +0 -0
  231. {conscio-2.2.1 → conscio-2.2.2}/tests/test_session_lifecycle_dream.py +0 -0
  232. {conscio-2.2.1 → conscio-2.2.2}/tests/test_session_rag.py +0 -0
  233. {conscio-2.2.1 → conscio-2.2.2}/tests/test_shard_engine.py +0 -0
  234. {conscio-2.2.1 → conscio-2.2.2}/tests/test_state_loaders_battery.py +0 -0
  235. {conscio-2.2.1 → conscio-2.2.2}/tests/test_state_persistence_battery.py +0 -0
  236. {conscio-2.2.1 → conscio-2.2.2}/tests/test_structural.py +0 -0
  237. {conscio-2.2.1 → conscio-2.2.2}/tests/test_structural_consent.py +0 -0
  238. {conscio-2.2.1 → conscio-2.2.2}/tests/test_structural_drift.py +0 -0
  239. {conscio-2.2.1 → conscio-2.2.2}/tests/test_structural_inject.py +0 -0
  240. {conscio-2.2.1 → conscio-2.2.2}/tests/test_timeutil.py +0 -0
  241. {conscio-2.2.1 → conscio-2.2.2}/tests/test_token_tracker.py +0 -0
  242. {conscio-2.2.1 → conscio-2.2.2}/tests/test_trajectory_vector.py +0 -0
  243. {conscio-2.2.1 → conscio-2.2.2}/tests/test_v2_debt_zero.py +0 -0
  244. {conscio-2.2.1 → conscio-2.2.2}/tests/test_voice_preset.py +0 -0
  245. {conscio-2.2.1 → conscio-2.2.2}/tests/test_workspace.py +0 -0
  246. {conscio-2.2.1 → conscio-2.2.2}/tests/test_world_contradictions.py +0 -0
  247. {conscio-2.2.1 → conscio-2.2.2}/tests/test_world_model_entropy.py +0 -0
  248. {conscio-2.2.1 → conscio-2.2.2}/tests/test_world_model_prediction.py +0 -0
  249. {conscio-2.2.1 → conscio-2.2.2}/tests/test_world_model_prune.py +0 -0
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.2.2] - 2026-06-22 — "Trial / execution path"
11
+
12
+ ### Added
13
+ - **Sandboxed trial of a quarantined skill.** A quarantined imported skill can
14
+ now be replayed in a **throwaway, fs-only sandbox** to earn local,
15
+ execution-grade pass/fail stats — `conscio trial --storage DIR --quarantine
16
+ ROWID --model NAME --enable-trial`. The foreign plan's fixed steps run through
17
+ the full safety stack (`validate → precheck → HIGH-block → Skeptic → dispatch`)
18
+ against a `make_default_registry` confined to a `mkdtemp` dir (`fs_read`/
19
+ `fs_write` only), stopping at the first failure. Binary outcome
20
+ (`trial_successes`/`trial_failures` + `last_trial_*`) is recorded on the
21
+ quarantine row; v2.3 promotion will read it.
22
+ - **Trial isolation.** A trial never writes the agent's `ActionLedger`, `skills`
23
+ table, `TrustMatrix`, or trips the breaker — a foreign skill's failure cannot
24
+ dent the local agent. The sandbox dir is always removed; tamper / corrupt-plan
25
+ refuse **without** bumping any counter.
26
+ - **Opt-in, default off.** `--enable-trial` is required to dispatch and is
27
+ independent of `--enable-act` (trial uses the local sandboxed registry, never
28
+ `host_act`). Skeptic always audits foreign content (no LOW-risk fast path).
29
+ - New engine method `ConsciousnessEngine.trial_quarantined(rowid, *,
30
+ enable_trial=False)`; new `conscio/agency/trial.py` (engine-side mechanic,
31
+ imports nothing from `noosphere`); `noosphere/quarantine.py` gains 5 trial
32
+ columns + an idempotent `PRAGMA table_info` migration + `record_trial` /
33
+ `note_trial` (still engine-free). Purely additive; cognition untouched.
34
+
10
35
  ## [2.2.1] - 2026-06-22 — "Mutual audit"
11
36
 
12
37
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conscio
3
- Version: 2.2.1
3
+ Version: 2.2.2
4
4
  Summary: Self-awareness framework for AI agents — emergent consciousness via context-aware memory, introspection, and goal generation
5
5
  Author-email: Neguiolidas <neguitech@proton.me>
6
6
  License: MIT
@@ -46,8 +46,9 @@ nothing else). It is designed to make small, local models punch far above their
46
46
  size by giving them memory, self-judgment, and procedural skill — and to prove
47
47
  that claim by measurement, not assertion.
48
48
 
49
- - **Current release:** `v2.2.1` — "Mutual audit": an instance publishes a non-sensitive projection of its action ledger (`conscio noosphere publish-record`) to the host-shared `noosphere.db`, and a peer **independently audits** it (`conscio noosphere audit`) deterministic, read-only, engine-free. The auditor re-derives track-record, breaker quarantines, and a foreign-trust level under its **own** thresholds (parity-tested against the engine) and runs a discipline check (did the peer execute actions its own Skeptic FAILed?). No inherited trust; report-only; the auditor persists nothing. `pip install conscio`.
50
- - **Prior:** `v2.2.0` — "Society" (Noosphere Core): same-host Conscio instances **share locally-proven skills as data**. `conscio noosphere publish` copies your proven skills (stats stripped) into a host-shared `noosphere.db`; `conscio noosphere import` pulls another instance's skills into a local **quarantine** after execution-free static revalidation. Engine-free; opens your live `conscio.db` **read-only**; zero network/socket. Nothing imported is trusted, served, executed, or promoted trust is never inherited.
49
+ - **Current release:** `v2.2.2` — "Trial / execution path": a quarantined imported skill can now **prove itself locally** before any promotion. `conscio trial --quarantine ROWID --enable-trial` replays the foreign plan's fixed steps in a **throwaway, fs-only sandbox** through the full safety stack (`validate precheck HIGH-block Skeptic dispatch`), recording a binary pass/fail on the quarantine row. Fully **isolated** never writes the live agent's ledger/skills/trust/breaker; tamper refuses without counting. Off by default; independent of `--enable-act`. `pip install conscio`.
50
+ - **Prior:** `v2.2.1` — "Mutual audit": an instance publishes a non-sensitive projection of its action ledger (`conscio noosphere publish-record`) to the host-shared `noosphere.db`, and a peer **independently audits** it (`conscio noosphere audit`) deterministic, read-only, engine-free. The auditor re-derives track-record, breaker quarantines, and a foreign-trust level under its **own** thresholds (parity-tested against the engine) and runs a discipline check (did the peer execute actions its own Skeptic FAILed?). No inherited trust; report-only; the auditor persists nothing.
51
+ - **Earlier:** `v2.2.0` — "Society" (Noosphere Core): same-host Conscio instances **share locally-proven skills as data**. `conscio noosphere publish` copies your proven skills (stats stripped) into a host-shared `noosphere.db`; `conscio noosphere import` pulls another instance's skills into a local **quarantine** after execution-free static revalidation. Engine-free; opens your live `conscio.db` **read-only**; zero network/socket. Nothing imported is trusted, served, executed, or promoted — trust is never inherited.
51
52
  - **Earlier:** `v2.1.0` — "Hub": a **localhost stdlib HTTP control plane** (`conscio-hub`) to swap the active model/provider and register custom OpenAI-compatible providers without hand-editing JSON. Engine-free; config applies on next boot. Per-provider model auto-discovery; one-shot smoke test before save. `api_key_env` resolution (env var name → value at adapter build time) is now additive to raw `api_key` — daemon + MCP inherit it. Hub never returns a raw API key.
52
53
  - **Earlier:** `v2.0.1` — "Connect" continued: **opt-in, host-executed audited `act` over MCP**. Conscio audits + gates + ledgers an action and returns an *execution packet*; the **host** executes and reports the outcome back — Conscio still never touches the world. Off by default (`conscio-mcp --enable-act`, requires the engine **Awake**); the host declares its tool manifest (`name`/`params`/`risk`/`approval_policy`) in `initialize`; HIGH-risk / `require_approval` actions stay **queued for human/Hermes approval** (`conscio.pending` → `conscio.approve`). Also: `conscio-mcp` adapter parity (six providers from config) and the **R-05** content-store dedup fix — shipping **debt-zero**. Cognition (`reflect()`) untouched; purely additive.
53
54
  - **Earlier:** `v2.0.0` — "Connect", the **Embodiment** phase: Conscio becomes embeddable in **any** MCP host (CLI, IDE, agent) via a hand-rolled **stdlib-only** MCP stdio server (`conscio-mcp`, newline-delimited JSON-RPC 2.0). Zero new runtime dependency; nothing opens a socket. The v2.0.0 surface was **propose-only** — perceive, reflect, recall, and **audit**, but never execute. Cognition (`reflect()`) untouched; the public API unchanged (MCP purely additive).
@@ -11,8 +11,9 @@ nothing else). It is designed to make small, local models punch far above their
11
11
  size by giving them memory, self-judgment, and procedural skill — and to prove
12
12
  that claim by measurement, not assertion.
13
13
 
14
- - **Current release:** `v2.2.1` — "Mutual audit": an instance publishes a non-sensitive projection of its action ledger (`conscio noosphere publish-record`) to the host-shared `noosphere.db`, and a peer **independently audits** it (`conscio noosphere audit`) deterministic, read-only, engine-free. The auditor re-derives track-record, breaker quarantines, and a foreign-trust level under its **own** thresholds (parity-tested against the engine) and runs a discipline check (did the peer execute actions its own Skeptic FAILed?). No inherited trust; report-only; the auditor persists nothing. `pip install conscio`.
15
- - **Prior:** `v2.2.0` — "Society" (Noosphere Core): same-host Conscio instances **share locally-proven skills as data**. `conscio noosphere publish` copies your proven skills (stats stripped) into a host-shared `noosphere.db`; `conscio noosphere import` pulls another instance's skills into a local **quarantine** after execution-free static revalidation. Engine-free; opens your live `conscio.db` **read-only**; zero network/socket. Nothing imported is trusted, served, executed, or promoted trust is never inherited.
14
+ - **Current release:** `v2.2.2` — "Trial / execution path": a quarantined imported skill can now **prove itself locally** before any promotion. `conscio trial --quarantine ROWID --enable-trial` replays the foreign plan's fixed steps in a **throwaway, fs-only sandbox** through the full safety stack (`validate precheck HIGH-block Skeptic dispatch`), recording a binary pass/fail on the quarantine row. Fully **isolated** never writes the live agent's ledger/skills/trust/breaker; tamper refuses without counting. Off by default; independent of `--enable-act`. `pip install conscio`.
15
+ - **Prior:** `v2.2.1` — "Mutual audit": an instance publishes a non-sensitive projection of its action ledger (`conscio noosphere publish-record`) to the host-shared `noosphere.db`, and a peer **independently audits** it (`conscio noosphere audit`) deterministic, read-only, engine-free. The auditor re-derives track-record, breaker quarantines, and a foreign-trust level under its **own** thresholds (parity-tested against the engine) and runs a discipline check (did the peer execute actions its own Skeptic FAILed?). No inherited trust; report-only; the auditor persists nothing.
16
+ - **Earlier:** `v2.2.0` — "Society" (Noosphere Core): same-host Conscio instances **share locally-proven skills as data**. `conscio noosphere publish` copies your proven skills (stats stripped) into a host-shared `noosphere.db`; `conscio noosphere import` pulls another instance's skills into a local **quarantine** after execution-free static revalidation. Engine-free; opens your live `conscio.db` **read-only**; zero network/socket. Nothing imported is trusted, served, executed, or promoted — trust is never inherited.
16
17
  - **Earlier:** `v2.1.0` — "Hub": a **localhost stdlib HTTP control plane** (`conscio-hub`) to swap the active model/provider and register custom OpenAI-compatible providers without hand-editing JSON. Engine-free; config applies on next boot. Per-provider model auto-discovery; one-shot smoke test before save. `api_key_env` resolution (env var name → value at adapter build time) is now additive to raw `api_key` — daemon + MCP inherit it. Hub never returns a raw API key.
17
18
  - **Earlier:** `v2.0.1` — "Connect" continued: **opt-in, host-executed audited `act` over MCP**. Conscio audits + gates + ledgers an action and returns an *execution packet*; the **host** executes and reports the outcome back — Conscio still never touches the world. Off by default (`conscio-mcp --enable-act`, requires the engine **Awake**); the host declares its tool manifest (`name`/`params`/`risk`/`approval_policy`) in `initialize`; HIGH-risk / `require_approval` actions stay **queued for human/Hermes approval** (`conscio.pending` → `conscio.approve`). Also: `conscio-mcp` adapter parity (six providers from config) and the **R-05** content-store dedup fix — shipping **debt-zero**. Cognition (`reflect()`) untouched; purely additive.
18
19
  - **Earlier:** `v2.0.0` — "Connect", the **Embodiment** phase: Conscio becomes embeddable in **any** MCP host (CLI, IDE, agent) via a hand-rolled **stdlib-only** MCP stdio server (`conscio-mcp`, newline-delimited JSON-RPC 2.0). Zero new runtime dependency; nothing opens a socket. The v2.0.0 surface was **propose-only** — perceive, reflect, recall, and **audit**, but never execute. Cognition (`reflect()`) untouched; the public API unchanged (MCP purely additive).
@@ -6,7 +6,7 @@ and goal generation. Adapts behavior based on the underlying model's
6
6
  context window size.
7
7
  """
8
8
 
9
- __version__ = "2.2.1"
9
+ __version__ = "2.2.2"
10
10
  __author__ = "Neguiolidas / Neguitech"
11
11
 
12
12
  from .engine import ConsciousnessEngine
@@ -0,0 +1,97 @@
1
+ # conscio/agency/trial.py
2
+ """Trial replay of a quarantined foreign skill (v2.2.2).
3
+
4
+ A pure mechanic: replay fixed foreign plan steps through the existing safety
5
+ stack (validate -> precheck -> HIGH-block -> Skeptic -> dispatch) against an
6
+ INJECTED sandboxed registry, stopping at the first failure. Records nothing,
7
+ imports nothing from conscio.noosphere or conscio.engine. The caller (the
8
+ engine) owns the sandbox lifecycle, the tamper guard, and persistence, and
9
+ guarantees trial isolation (no agent ledger/skills/trust/breaker writes)."""
10
+ from __future__ import annotations
11
+
12
+ from dataclasses import dataclass
13
+ from typing import Any
14
+
15
+ from .contracts import ActionProposal, validate
16
+ from .tools import Risk
17
+
18
+ # stage -> the word used in TrialOutcome.result
19
+ _RESULT_WORD = {
20
+ "unknown_tool": "unknown_tool",
21
+ "invalid_args": "invalid_args",
22
+ "precheck": "precheck",
23
+ "high_risk": "high_risk_blocked",
24
+ "skeptic": "skeptic_reject",
25
+ "exec": "exec_fail",
26
+ }
27
+
28
+
29
+ @dataclass(frozen=True)
30
+ class StepResult:
31
+ tool: str
32
+ ok: bool
33
+ stage: str # unknown_tool|invalid_args|precheck|high_risk|skeptic|exec|ok
34
+ error: str = ""
35
+
36
+
37
+ @dataclass(frozen=True)
38
+ class TrialOutcome:
39
+ passed: bool
40
+ result: str # "passed" or "<word>:<tool>"
41
+ error: str
42
+ steps: list[StepResult] # always supplied explicitly by run_trial
43
+
44
+
45
+ @dataclass(frozen=True)
46
+ class TrialRefusal:
47
+ reason: str
48
+
49
+
50
+ def run_trial(steps: list[dict], *, goal_text: str, skeptic: Any,
51
+ registry: Any) -> TrialOutcome:
52
+ done: list[StepResult] = []
53
+ for step in steps:
54
+ tool = str(step.get("tool", ""))
55
+ args = step.get("args", {})
56
+ rationale = str(step.get("rationale", ""))
57
+ # Foreign steps carry no expected_outcome; the Skeptic tolerates "".
58
+ proposal = ActionProposal(tool=tool, args=args, rationale=rationale,
59
+ expected_outcome="")
60
+ spec = registry.get(tool)
61
+ if spec is None:
62
+ done.append(StepResult(tool, False, "unknown_tool",
63
+ f"tool '{tool}' not registered"))
64
+ break
65
+ errs = (validate(args, spec.params) if isinstance(args, dict)
66
+ else ["args must be a dict"])
67
+ if errs:
68
+ done.append(StepResult(tool, False, "invalid_args",
69
+ "; ".join(errs)))
70
+ break
71
+ if spec.precheck is not None:
72
+ pre = spec.precheck(args)
73
+ if pre:
74
+ done.append(StepResult(tool, False, "precheck", str(pre)))
75
+ break
76
+ if spec.risk is Risk.HIGH:
77
+ done.append(StepResult(tool, False, "high_risk",
78
+ "HIGH-risk tool blocked in trial"))
79
+ break
80
+ verdict = skeptic.audit(proposal, goal_text=goal_text) # forced audit
81
+ if not verdict.passed:
82
+ done.append(StepResult(tool, False, "skeptic",
83
+ "; ".join(verdict.reasons)))
84
+ break
85
+ res = registry.dispatch(tool, args)
86
+ if not res.ok:
87
+ done.append(StepResult(tool, False, "exec", res.error))
88
+ break
89
+ done.append(StepResult(tool, True, "ok"))
90
+
91
+ passed = bool(done) and len(done) == len(steps) and all(s.ok for s in done)
92
+ if passed:
93
+ return TrialOutcome(True, "passed", "", done)
94
+ last = done[-1] if done else StepResult("", False, "empty", "no steps")
95
+ word = _RESULT_WORD.get(last.stage, last.stage)
96
+ result = f"{word}:{last.tool}" if last.tool else word
97
+ return TrialOutcome(False, result, last.error, done)
@@ -68,6 +68,18 @@ def _build_parser() -> argparse.ArgumentParser:
68
68
  p_sleep.add_argument("--model", default=DEFAULT_MODEL)
69
69
  p_sleep.add_argument("--storage", default="", help="storage dir (default: temp)")
70
70
 
71
+ p_trial = sub.add_parser(
72
+ "trial",
73
+ help="trial a quarantined imported skill in a throwaway sandbox")
74
+ p_trial.add_argument("--storage", default="",
75
+ help="instance storage dir (default: ~/.hermes)")
76
+ p_trial.add_argument("--quarantine", type=int, required=True,
77
+ metavar="ROWID", help="quarantine row id to trial")
78
+ p_trial.add_argument("--model", default=DEFAULT_MODEL)
79
+ p_trial.add_argument(
80
+ "--enable-trial", action="store_true",
81
+ help="required: actually run the sandboxed trial (off by default)")
82
+
71
83
  # Listed for discoverability; routed to conscio.{bench,daemon} before argparse.
72
84
  sub.add_parser("bench", add_help=False,
73
85
  help="measure an inference backend (see: conscio bench --help)")
@@ -231,6 +243,55 @@ def _cmd_structure(storage: str) -> int:
231
243
  return 0
232
244
 
233
245
 
246
+ def _run_trial(*, model: str, storage: str, quarantine_id: int,
247
+ enable_trial: bool):
248
+ """Build an engine with an adapter and run one trial. The single seam the
249
+ CLI tests monkeypatch (so they never build a real adapter)."""
250
+ from .adapter_config import build_adapter_from_config, load_config
251
+ from .engine import ConsciousnessEngine
252
+ eng = ConsciousnessEngine(model_name=model, storage_path=_storage(storage))
253
+ try:
254
+ adapter, _ = build_adapter_from_config(load_config(),
255
+ fallback_model=model)
256
+ eng.attach_adapter(adapter)
257
+ return eng.trial_quarantined(quarantine_id, enable_trial=enable_trial)
258
+ finally:
259
+ eng.close()
260
+
261
+
262
+ def _cmd_trial(model: str, storage: str, quarantine_id: int,
263
+ enable_trial: bool) -> int:
264
+ from .agency.trial import TrialRefusal
265
+ try:
266
+ outcome = _run_trial(model=model, storage=storage,
267
+ quarantine_id=quarantine_id,
268
+ enable_trial=enable_trial)
269
+ except Exception as exc: # adapter build / engine wiring failure
270
+ print(f"error: {exc}")
271
+ return 1
272
+ if isinstance(outcome, TrialRefusal):
273
+ print(f"error: {outcome.reason}")
274
+ return 1
275
+ if outcome.passed:
276
+ print(f"TRIAL PASSED (#{quarantine_id})")
277
+ else:
278
+ print(f"TRIAL FAILED (#{quarantine_id}): {outcome.result}")
279
+ if outcome.error:
280
+ print(f" {outcome.error}")
281
+ # best-effort: show the running counts (skipped if the row can't be read)
282
+ try:
283
+ from .noosphere import quarantine
284
+ from .noosphere.paths import quarantine_db_path
285
+ row = quarantine.get(quarantine_db_path(Path(_storage(storage))),
286
+ quarantine_id)
287
+ if row is not None:
288
+ print(f" trials: {row.trial_successes} passed / "
289
+ f"{row.trial_failures} failed")
290
+ except Exception:
291
+ pass
292
+ return 0
293
+
294
+
234
295
  def main(argv: list[str] | None = None) -> int:
235
296
  argv = list(sys.argv[1:] if argv is None else argv)
236
297
 
@@ -266,6 +327,9 @@ def main(argv: list[str] | None = None) -> int:
266
327
  return _cmd_set_awake(args.model, args.storage, awake=True)
267
328
  if args.command == "sleep":
268
329
  return _cmd_set_awake(args.model, args.storage, awake=False)
330
+ if args.command == "trial":
331
+ return _cmd_trial(args.model, args.storage, args.quarantine,
332
+ args.enable_trial)
269
333
 
270
334
  parser.print_help()
271
335
  return 2
@@ -1001,6 +1001,69 @@ class ConsciousnessEngine:
1001
1001
  return []
1002
1002
  return self._act_pipeline.ledger.pending(limit)
1003
1003
 
1004
+ # --- v2.2.2 "Trial": sandboxed replay of a quarantined foreign skill ---
1005
+
1006
+ def trial_quarantined(self, rowid: int, *, enable_trial: bool = False):
1007
+ """Replay a quarantined foreign skill in a throwaway fs-only sandbox
1008
+ and record a binary pass/fail on its quarantine row. Fully isolated —
1009
+ never writes the agent's ledger/skills/trust/breaker. Default off.
1010
+
1011
+ Returns a trial.TrialOutcome (ran) or trial.TrialRefusal (refused)."""
1012
+ import json
1013
+ import shutil
1014
+ import tempfile
1015
+ import time
1016
+ from pathlib import Path
1017
+
1018
+ from .agency import trial as trial_mod
1019
+ from .agency.tools import make_default_registry
1020
+ from .noosphere import artifact, quarantine
1021
+ from .noosphere.paths import quarantine_db_path
1022
+
1023
+ if not enable_trial:
1024
+ return trial_mod.TrialRefusal("trial disabled; pass --enable-trial")
1025
+ pipe = getattr(self, "_act_pipeline", None)
1026
+ if pipe is None or getattr(pipe, "skeptic", None) is None:
1027
+ return trial_mod.TrialRefusal("trial requires an adapter")
1028
+
1029
+ qdb = quarantine_db_path(self.storage)
1030
+ row = quarantine.get(qdb, rowid)
1031
+ if row is None:
1032
+ return trial_mod.TrialRefusal(f"no quarantine row #{rowid}")
1033
+ if row.import_status != "quarantined":
1034
+ return trial_mod.TrialRefusal(
1035
+ f"row #{rowid} is not quarantined (status={row.import_status})")
1036
+ if artifact.content_hash(row.artifact_json) != row.content_sha256:
1037
+ quarantine.note_trial(qdb, rowid, result="tampered",
1038
+ error="content_sha256 mismatch",
1039
+ ts=time.time())
1040
+ return trial_mod.TrialRefusal(
1041
+ f"row #{rowid} tampered (content_sha256 mismatch)")
1042
+ try:
1043
+ steps = json.loads(row.plan_template)
1044
+ if not isinstance(steps, list):
1045
+ raise ValueError("plan_template is not a list")
1046
+ except (ValueError, TypeError) as exc:
1047
+ quarantine.note_trial(qdb, rowid, result="corrupt_plan",
1048
+ error=str(exc), ts=time.time())
1049
+ return trial_mod.TrialRefusal(f"row #{rowid} has a corrupt plan")
1050
+
1051
+ tmp = tempfile.mkdtemp(prefix="conscio-trial-")
1052
+ try:
1053
+ reg = make_default_registry(
1054
+ sandbox_root=Path(tmp), content_store=None, event_bus=None,
1055
+ goal_generator=None)
1056
+ outcome = trial_mod.run_trial(
1057
+ steps, goal_text=row.goal_text, skeptic=pipe.skeptic,
1058
+ registry=reg)
1059
+ finally:
1060
+ shutil.rmtree(tmp, ignore_errors=True)
1061
+
1062
+ quarantine.record_trial(qdb, rowid, passed=outcome.passed,
1063
+ result=outcome.result, error=outcome.error,
1064
+ ts=time.time())
1065
+ return outcome
1066
+
1004
1067
  # --- v2.0 "Connect": propose-only cognition (never executes) ---
1005
1068
 
1006
1069
  def propose_action(self, intent: dict) -> dict:
@@ -28,10 +28,33 @@ CREATE TABLE IF NOT EXISTS quarantine (
28
28
  revalidation_result TEXT NOT NULL,
29
29
  revalidation_error TEXT NOT NULL DEFAULT '',
30
30
  schema_version INTEGER NOT NULL DEFAULT 1,
31
+ trial_successes INTEGER NOT NULL DEFAULT 0,
32
+ trial_failures INTEGER NOT NULL DEFAULT 0,
33
+ last_trial_ts REAL NOT NULL DEFAULT 0,
34
+ last_trial_result TEXT NOT NULL DEFAULT '',
35
+ last_trial_error TEXT NOT NULL DEFAULT '',
31
36
  UNIQUE(origin_instance_id, content_sha256)
32
37
  );
33
38
  """
34
39
 
40
+ # v2.2.2: trial-stats columns added to pre-existing DBs via _migrate.
41
+ _TRIAL_COLS = {
42
+ "trial_successes": "INTEGER NOT NULL DEFAULT 0",
43
+ "trial_failures": "INTEGER NOT NULL DEFAULT 0",
44
+ "last_trial_ts": "REAL NOT NULL DEFAULT 0",
45
+ "last_trial_result": "TEXT NOT NULL DEFAULT ''",
46
+ "last_trial_error": "TEXT NOT NULL DEFAULT ''",
47
+ }
48
+
49
+
50
+ def _migrate(conn: sqlite3.Connection) -> None:
51
+ """Idempotent ADD COLUMN for pre-v2.2.2 DBs. SQLite has no ADD COLUMN IF
52
+ NOT EXISTS, so guard with PRAGMA table_info."""
53
+ have = {r["name"] for r in conn.execute("PRAGMA table_info(quarantine)")}
54
+ for col, decl in _TRIAL_COLS.items():
55
+ if col not in have:
56
+ conn.execute(f"ALTER TABLE quarantine ADD COLUMN {col} {decl}")
57
+
35
58
 
36
59
  @dataclass(frozen=True)
37
60
  class QuarantineRow:
@@ -50,6 +73,11 @@ class QuarantineRow:
50
73
  revalidation_result: str
51
74
  revalidation_error: str
52
75
  schema_version: int
76
+ trial_successes: int = 0
77
+ trial_failures: int = 0
78
+ last_trial_ts: float = 0.0
79
+ last_trial_result: str = ""
80
+ last_trial_error: str = ""
53
81
  id: int | None = None
54
82
 
55
83
 
@@ -61,6 +89,7 @@ def _connect(db: Path) -> sqlite3.Connection:
61
89
  conn.execute(f"PRAGMA busy_timeout={BUSY_TIMEOUT_MS}")
62
90
  conn.execute("PRAGMA journal_mode=WAL")
63
91
  conn.executescript(_SCHEMA)
92
+ _migrate(conn)
64
93
  return conn
65
94
 
66
95
 
@@ -84,7 +113,10 @@ def _row(r: sqlite3.Row) -> QuarantineRow:
84
113
  tool_seq=r["tool_seq"], plan_template=r["plan_template"],
85
114
  artifact_json=_as_bytes(r["artifact_json"]), import_status=r["import_status"],
86
115
  revalidation_result=r["revalidation_result"],
87
- revalidation_error=r["revalidation_error"], schema_version=r["schema_version"])
116
+ revalidation_error=r["revalidation_error"], schema_version=r["schema_version"],
117
+ trial_successes=r["trial_successes"], trial_failures=r["trial_failures"],
118
+ last_trial_ts=r["last_trial_ts"], last_trial_result=r["last_trial_result"],
119
+ last_trial_error=r["last_trial_error"])
88
120
 
89
121
 
90
122
  def insert(db: Path, row: QuarantineRow) -> bool:
@@ -130,3 +162,37 @@ def get(db: Path, rowid: int) -> QuarantineRow | None:
130
162
  finally:
131
163
  conn.close()
132
164
  return _row(r) if r else None
165
+
166
+
167
+ def record_trial(db: Path, rowid: int, *, passed: bool, result: str,
168
+ error: str, ts: float) -> bool:
169
+ """Bump one trial counter and set the last_trial_* fields. Returns True
170
+ iff a row was updated. `col` is from a fixed internal set — never user
171
+ input — so the f-string carries no injection surface."""
172
+ col = "trial_successes" if passed else "trial_failures"
173
+ conn = _connect(db)
174
+ try:
175
+ cur = conn.execute(
176
+ f"UPDATE quarantine SET {col} = {col} + 1, last_trial_ts = ?,"
177
+ " last_trial_result = ?, last_trial_error = ? WHERE id = ?",
178
+ (ts, result, error, rowid))
179
+ conn.commit()
180
+ return cur.rowcount > 0
181
+ finally:
182
+ conn.close()
183
+
184
+
185
+ def note_trial(db: Path, rowid: int, *, result: str, error: str,
186
+ ts: float) -> bool:
187
+ """Record a non-counting trial note (refusal / tamper). Returns True iff a
188
+ row was updated. Never touches the success/failure counters."""
189
+ conn = _connect(db)
190
+ try:
191
+ cur = conn.execute(
192
+ "UPDATE quarantine SET last_trial_ts = ?, last_trial_result = ?,"
193
+ " last_trial_error = ? WHERE id = ?",
194
+ (ts, result, error, rowid))
195
+ conn.commit()
196
+ return cur.rowcount > 0
197
+ finally:
198
+ conn.close()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conscio
3
- Version: 2.2.1
3
+ Version: 2.2.2
4
4
  Summary: Self-awareness framework for AI agents — emergent consciousness via context-aware memory, introspection, and goal generation
5
5
  Author-email: Neguiolidas <neguitech@proton.me>
6
6
  License: MIT
@@ -46,8 +46,9 @@ nothing else). It is designed to make small, local models punch far above their
46
46
  size by giving them memory, self-judgment, and procedural skill — and to prove
47
47
  that claim by measurement, not assertion.
48
48
 
49
- - **Current release:** `v2.2.1` — "Mutual audit": an instance publishes a non-sensitive projection of its action ledger (`conscio noosphere publish-record`) to the host-shared `noosphere.db`, and a peer **independently audits** it (`conscio noosphere audit`) deterministic, read-only, engine-free. The auditor re-derives track-record, breaker quarantines, and a foreign-trust level under its **own** thresholds (parity-tested against the engine) and runs a discipline check (did the peer execute actions its own Skeptic FAILed?). No inherited trust; report-only; the auditor persists nothing. `pip install conscio`.
50
- - **Prior:** `v2.2.0` — "Society" (Noosphere Core): same-host Conscio instances **share locally-proven skills as data**. `conscio noosphere publish` copies your proven skills (stats stripped) into a host-shared `noosphere.db`; `conscio noosphere import` pulls another instance's skills into a local **quarantine** after execution-free static revalidation. Engine-free; opens your live `conscio.db` **read-only**; zero network/socket. Nothing imported is trusted, served, executed, or promoted trust is never inherited.
49
+ - **Current release:** `v2.2.2` — "Trial / execution path": a quarantined imported skill can now **prove itself locally** before any promotion. `conscio trial --quarantine ROWID --enable-trial` replays the foreign plan's fixed steps in a **throwaway, fs-only sandbox** through the full safety stack (`validate precheck HIGH-block Skeptic dispatch`), recording a binary pass/fail on the quarantine row. Fully **isolated** never writes the live agent's ledger/skills/trust/breaker; tamper refuses without counting. Off by default; independent of `--enable-act`. `pip install conscio`.
50
+ - **Prior:** `v2.2.1` — "Mutual audit": an instance publishes a non-sensitive projection of its action ledger (`conscio noosphere publish-record`) to the host-shared `noosphere.db`, and a peer **independently audits** it (`conscio noosphere audit`) deterministic, read-only, engine-free. The auditor re-derives track-record, breaker quarantines, and a foreign-trust level under its **own** thresholds (parity-tested against the engine) and runs a discipline check (did the peer execute actions its own Skeptic FAILed?). No inherited trust; report-only; the auditor persists nothing.
51
+ - **Earlier:** `v2.2.0` — "Society" (Noosphere Core): same-host Conscio instances **share locally-proven skills as data**. `conscio noosphere publish` copies your proven skills (stats stripped) into a host-shared `noosphere.db`; `conscio noosphere import` pulls another instance's skills into a local **quarantine** after execution-free static revalidation. Engine-free; opens your live `conscio.db` **read-only**; zero network/socket. Nothing imported is trusted, served, executed, or promoted — trust is never inherited.
51
52
  - **Earlier:** `v2.1.0` — "Hub": a **localhost stdlib HTTP control plane** (`conscio-hub`) to swap the active model/provider and register custom OpenAI-compatible providers without hand-editing JSON. Engine-free; config applies on next boot. Per-provider model auto-discovery; one-shot smoke test before save. `api_key_env` resolution (env var name → value at adapter build time) is now additive to raw `api_key` — daemon + MCP inherit it. Hub never returns a raw API key.
52
53
  - **Earlier:** `v2.0.1` — "Connect" continued: **opt-in, host-executed audited `act` over MCP**. Conscio audits + gates + ledgers an action and returns an *execution packet*; the **host** executes and reports the outcome back — Conscio still never touches the world. Off by default (`conscio-mcp --enable-act`, requires the engine **Awake**); the host declares its tool manifest (`name`/`params`/`risk`/`approval_policy`) in `initialize`; HIGH-risk / `require_approval` actions stay **queued for human/Hermes approval** (`conscio.pending` → `conscio.approve`). Also: `conscio-mcp` adapter parity (six providers from config) and the **R-05** content-store dedup fix — shipping **debt-zero**. Cognition (`reflect()`) untouched; purely additive.
53
54
  - **Earlier:** `v2.0.0` — "Connect", the **Embodiment** phase: Conscio becomes embeddable in **any** MCP host (CLI, IDE, agent) via a hand-rolled **stdlib-only** MCP stdio server (`conscio-mcp`, newline-delimited JSON-RPC 2.0). Zero new runtime dependency; nothing opens a socket. The v2.0.0 surface was **propose-only** — perceive, reflect, recall, and **audit**, but never execute. Cognition (`reflect()`) untouched; the public API unchanged (MCP purely additive).
@@ -66,6 +66,7 @@ conscio/agency/profiles.py
66
66
  conscio/agency/skeptic.py
67
67
  conscio/agency/skills.py
68
68
  conscio/agency/tools.py
69
+ conscio/agency/trial.py
69
70
  conscio/agency/trust.py
70
71
  conscio/hub/__init__.py
71
72
  conscio/hub/config.py
@@ -126,6 +127,7 @@ tests/test_agency_skills_wiring.py
126
127
  tests/test_agency_state.py
127
128
  tests/test_agency_tools.py
128
129
  tests/test_agency_tools_manifest.py
130
+ tests/test_agency_trial.py
129
131
  tests/test_agency_trust.py
130
132
  tests/test_agency_volition.py
131
133
  tests/test_agent_sensor.py
@@ -134,6 +136,7 @@ tests/test_awake.py
134
136
  tests/test_axis_pack.py
135
137
  tests/test_axis_pack_battery.py
136
138
  tests/test_cli.py
139
+ tests/test_cli_trial.py
137
140
  tests/test_coherence.py
138
141
  tests/test_coherence_engine_integration.py
139
142
  tests/test_coherence_state.py
@@ -162,6 +165,7 @@ tests/test_engine_init.py
162
165
  tests/test_engine_meta_reflect.py
163
166
  tests/test_engine_propose.py
164
167
  tests/test_engine_recall.py
168
+ tests/test_engine_trial.py
165
169
  tests/test_event_bus.py
166
170
  tests/test_event_bus_act_result.py
167
171
  tests/test_event_bus_purge.py
@@ -212,6 +216,7 @@ tests/test_packaging.py
212
216
  tests/test_perception.py
213
217
  tests/test_perf_reflection.py
214
218
  tests/test_plugins.py
219
+ tests/test_quarantine_trial.py
215
220
  tests/test_recursive_loop_integration.py
216
221
  tests/test_risk.py
217
222
  tests/test_self_prompt.py
@@ -0,0 +1,107 @@
1
+ # tests/test_agency_trial.py
2
+ from pathlib import Path
3
+
4
+ from conscio.agency import trial
5
+ from conscio.agency.contracts import AuditVerdict
6
+ from conscio.agency.tools import Risk, make_default_registry
7
+
8
+
9
+ class _Skeptic:
10
+ """Stub: PASS unless told to FAIL; records every audited tool."""
11
+ def __init__(self, ok=True):
12
+ self.ok = ok
13
+ self.seen = []
14
+
15
+ def audit(self, proposal, *, goal_text):
16
+ self.seen.append(proposal.tool)
17
+ return AuditVerdict(verdict="PASS" if self.ok else "FAIL",
18
+ reasons=[] if self.ok else ["nope"])
19
+
20
+
21
+ def _fs_registry(tmp):
22
+ return make_default_registry(sandbox_root=tmp, content_store=None,
23
+ event_bus=None, goal_generator=None)
24
+
25
+
26
+ def test_self_contained_plan_passes(tmp_path):
27
+ reg = _fs_registry(tmp_path)
28
+ steps = [
29
+ {"tool": "fs_write", "args": {"path": "t.txt", "content": "hi"},
30
+ "rationale": "write"},
31
+ {"tool": "fs_read", "args": {"path": "t.txt"}, "rationale": "read"},
32
+ ]
33
+ out = trial.run_trial(steps, goal_text="demo",
34
+ skeptic=_Skeptic(ok=True), registry=reg)
35
+ assert out.passed is True and out.result == "passed"
36
+ assert [s.stage for s in out.steps] == ["ok", "ok"]
37
+
38
+
39
+ def test_unknown_tool_fails_and_stops(tmp_path):
40
+ reg = _fs_registry(tmp_path)
41
+ spy = _Skeptic(ok=True)
42
+ steps = [{"tool": "nope", "args": {}, "rationale": ""},
43
+ {"tool": "fs_write", "args": {"path": "x", "content": "y"},
44
+ "rationale": ""}]
45
+ out = trial.run_trial(steps, goal_text="g", skeptic=spy, registry=reg)
46
+ assert out.passed is False and out.result == "unknown_tool:nope"
47
+ assert len(out.steps) == 1 # stopped at step 1
48
+ assert spy.seen == [] # skeptic never reached
49
+
50
+
51
+ def test_invalid_args_fails(tmp_path):
52
+ reg = _fs_registry(tmp_path)
53
+ steps = [{"tool": "fs_write", "args": {"path": "x"}, "rationale": ""}]
54
+ out = trial.run_trial(steps, goal_text="g", skeptic=_Skeptic(),
55
+ registry=reg)
56
+ assert out.passed is False and out.result == "invalid_args:fs_write"
57
+
58
+
59
+ def test_precheck_sandbox_escape_fails(tmp_path):
60
+ reg = _fs_registry(tmp_path)
61
+ steps = [{"tool": "fs_write",
62
+ "args": {"path": "../escape.txt", "content": "x"},
63
+ "rationale": ""}]
64
+ out = trial.run_trial(steps, goal_text="g", skeptic=_Skeptic(),
65
+ registry=reg)
66
+ assert out.passed is False and out.result == "precheck:fs_write"
67
+
68
+
69
+ def test_skeptic_reject_fails_without_dispatch(tmp_path):
70
+ reg = _fs_registry(tmp_path)
71
+ steps = [{"tool": "fs_write", "args": {"path": "t.txt", "content": "x"},
72
+ "rationale": ""}]
73
+ out = trial.run_trial(steps, goal_text="g", skeptic=_Skeptic(ok=False),
74
+ registry=reg)
75
+ assert out.passed is False and out.result == "skeptic_reject:fs_write"
76
+ # dispatch never ran -> the sandbox file must not exist
77
+ assert not (Path(tmp_path) / "t.txt").exists()
78
+
79
+
80
+ def test_exec_fail_on_missing_read(tmp_path):
81
+ reg = _fs_registry(tmp_path)
82
+ steps = [{"tool": "fs_read", "args": {"path": "absent.txt"},
83
+ "rationale": ""}]
84
+ out = trial.run_trial(steps, goal_text="g", skeptic=_Skeptic(),
85
+ registry=reg)
86
+ assert out.passed is False and out.result == "exec_fail:fs_read"
87
+
88
+
89
+ def test_high_risk_blocked_without_dispatch():
90
+ # Inject a registry whose tool is HIGH risk; the rule must block it
91
+ # before dispatch regardless of registry contents.
92
+ from conscio.agency.tools import ToolRegistry
93
+ reg = ToolRegistry()
94
+ dispatched = []
95
+ reg.register("danger", lambda **kw: dispatched.append(kw) or "x",
96
+ params={}, risk=Risk.HIGH, description="d")
97
+ out = trial.run_trial([{"tool": "danger", "args": {}, "rationale": ""}],
98
+ goal_text="g", skeptic=_Skeptic(), registry=reg)
99
+ assert out.passed is False and out.result == "high_risk_blocked:danger"
100
+ assert dispatched == [] # never executed
101
+
102
+
103
+ def test_empty_plan_fails():
104
+ from conscio.agency.tools import ToolRegistry
105
+ out = trial.run_trial([], goal_text="g", skeptic=_Skeptic(),
106
+ registry=ToolRegistry())
107
+ assert out.passed is False